On-line display of TCS status

Jim Harwood

June 18, 1999

 

Quick start:

If you want to get a TCS display up immediately and read the background later, mount the TCS diskettes that say "XTERM - VT100".

  1. Bring up an Xterm window on your workstation. (Do not resize it.)
  2. Type tcsdisplay in the Xterm window. You should now have a full TCS display. (Nothing will show except the template until GO is typed to the TCS.)
  3. Read "To run the TCS display" section when you get a chance.

 

Contents:

Introduction

Organization

To run the TCS display

Make your own customized Xterm window for the display

Running the display program on a PC

Should I download the program to my local Sun workstation?

If something goes wrong...

Additional points

 

Introduction

Summary:

The display of the telescope status on TV monitors has now been replaced by an Xterm window on any IRTF workstation. The display consists of a template with continuously updated fields, as on the hardware monitors. This document gives the background and instructions for operating the TCS display program.

The IRTF telescope control system has traditionally displayed its status update on 2 or 3 NTSC television monitors spaced around the observatory. These monitors are fed from two proprietary controllers interfaced to the LSI-11/23 telescope control computer. The coax signal is daisy chained from monitor to monitor. Unless care is taken in the cabling and termination, a particular monitor may have a degraded image which is difficult to read.

The two channels of TV monitor controllers are switch-selectable from the telescope control console. Channel 1 is the main on-line presentation from the TCS, showing the position coordinates, time, epoch, dome position, and other changing parameters. Channel 2 is used for system diagnostics and trouble shooting when in "Super Tech" mode with the off line LSI-11 computer. The two controllers are all we have. There is no servicing or backup to these proprietary devices, which are at least 20 years old. TV monitors of course are a dime a dozen, but that doesn't help if the source of signal has died and can't be fixed.

We need to break away from dependence on this technology. I have created a software system that reads a standard serial port on a workstation (max), fed from a serial port card recently installed in the TCS backplane for this purpose. A version of the TCS diskettes is available at the IRTF to feed the 5-hz monitor update out the serial port card to max's serial port. From there the TCS status presentation is available to any computer that is allowed to log into the summit network. The presentation takes place in an Xterm window on the workstation that needs to display it. We now can dispense with the proprietary TV controllers and the TV monitors piled on top of workstations.

There are no restrictions on the location or quantity of the computers that need to read the TCS status display, as long as they can connect to max. The TCS presentation is completely networked out of max. It can be displayed on anything that is VT-102 compatible, which is the ANSI standard for terminal emulation. This includes an Xterm window on a workstation, a stand-alone terminal with VT-102 emulation, or a PC running HyperTerminal in Windows 9x with a phone modem.

We have backups for the serial port card in the TCS, and if max fails, the TCS display system can be brought up quickly on any other workstation that has an available serial port within range of the cable coming from the TCS. A quick recompilation would be necessary to change the name of the host computer in the TCS display software and the supporting daemon currently running on max. At the very least, you could put an available terminal on the cable and have at least one running display.

This TCS display system will be ideal for use in remote observing. The remote observer can see the TCS real time display on his or her monitor without having to deal with a separate video camera system.

How it's organized

A daemon, tvmond, is running continuously on max, reading characters generated by the TCS on a dedicated serial port line. Whenever an instance of the client display program tcsdisplay executes, either on an IRTF network computer or remotely, it connects via sockets to the daemon and receives a copy of the character stream from the TCS, which it displays on a terminal emulator window. The display entity can be an Xterm window, a PC terminal emulator, or a hardware terminal in VT-102 mode.

A detailed technical description is on the web, "TCS Monitor Display: Technical Description".

 

To run the TCS display

1. Make sure the TCS floppy diskettes show "Xterm" or "VT-102" on the labels and boot the TCS system, if it is not already running. Currently, the TCS versions 1999-C and 2000-A support the new TCS display.

2. You need to be on either max, herschel, or stefan. If you are on another workstation, you will need to do a remote login to one of them. Bring up an Xterm window configured to 24 lines, which is the default. Do not resize it right now, or the displayed data probably won't line up with the template of headers for the display fields. If you have to resize it horizontally and it gets out of registration, resize it vertically a little at a time until you get back to exactly 24 lines and the presentation looks correct. This is discussed in detail below (rewriting the template).

3. Type the command tcsdisplay in the Xterm window. The template will be written to the window. If GO had been typed already to the TCS, the template will immediately fill with updating fields. Otherwise, it will be quiescent until GO is entered. You can now position the window wherever you want it, probably out of the way up in a corner.

4. To redraw the template, type t <CR> into the display window. This is useful if the display gets corrupted for some reason, such as resizing it. You may want to reduce the width of the window at this time, so it will occupy a minimum of screen real estate. If the display gets out of registration, type t between resizings as an aid.

5. To exit the program, type into the window the <ESC> and <CR> keys.

NOTE: You can type TEMPLATE into the TCS (not the display window) to redraw the display at the source. This will redraw it for all users. Typing t into an individual display window just redraws the template for that window.

NOTE: There is nothing you can do while executing tcsdisplay that will crash or otherwise affect either the TCS display daemon program or the TCS. The character stream from the TCS is one way only.

NOTE: Redrawing the template with the t command causes information to be sent to the TCS through the comm link daemon (tcsd). If this daemon isn't running, or the comm link isn't working (A/B switch?), you will get an error in your TCS display window.

 

Make your own customized Xterm window

If you need to use tcsdisplay frequently, it is convenient to set up a customized Xterm window. Here's how to do it.

Go to your home directory and edit the file .openwin-menu . (Starts with a dot.) You can either create a top level menu item, or include the command line within another top level menu. Here's how it looks configured as a main menu item. When implemented, pressing the right mouse button on the desktop will bring up a menu with "TCS Disp" as a menu choice. Putting the cursor on this item produces "TCS Display" which you select to bring up the customized window. The display program tcsdisplay is executed automatically as soon as the window comes up.

"TCS Disp" MENU

"TCS Display" exec $OPENWINHOME/bin/xterm -g 40x24+850+0 -tn vt102 -fn Courier-Bold-12 -n "Tcs Dsp" -T TCS_Display -e /usr/local/bin/tcsdisplay

"TCS Disp" END PIN

You want to type everything between the first and last lines on the same line, even though they are wrapped here.

 

Explanation of xterm parameters:

-g 40x24+850+0

The size of the Xterm window is 40 characters by 24 lines. The window is positioned 850 pixels from the left edge and 0 pixels from the top edge, which puts it in the upper right corner on my monitor. Monitors that have different resolutions and pixel dimensions from mine will have to use different numbers for these parameters if you want the window in the upper right corner.

-tn vt102

Specifies VT-102 terminal emulation. (The alternative is Tektronix.) Xterm windows can have one or the other emulation, but no other.

-fn Courier-Bold-12

Specifies the font. The size of the font determines the size of the Xterm window, so make is as small as you can and still read the information. On my monitor 12-point is about right. If you don't want bold, specify normal or medium.

-n "Tcs Dsp"

The title for the minimized icon.

-T TCS_Display

The title in the top bar of the Xterm window. I suppose you can use a space instead of an underline between the words, but you would then need to use quotes.

-e /usr/local/bin/tcsdisplay

This tells Xterm to execute the program right after bringing up the window, so it starts running as soon as the window comes up. Very convenient, but it has the disadvantage of the window disappearing immediately if an error occurs causing tcsdisplay to exit, so you don't have time to see the error message. The window also disappears as soon as you exit tcsdisplay with the <ESC> key, convenient unless you wanted the window to stay there. I suggest not using this option which will give you better control, at least until you get used to the program.

 

How to run the TCS display program on a PC

1. Bring up HyperTerminal on your PC, or whatever other ANSI standard terminal emulation you have. On Oahu, dial in to the terminal server at 988-2317.

2. You are asked: Host:

Reply- max (or herschel or stefan)

Log in to max

On the Big Island, dial into the IRTF network and log into max.

3. Type tcsdisplay

 

Should I download and execute the display program on my local workstation?

If you are at a remote location it's hard to know which provides better performance, logging in remotely and running tcsdisplay on an IRTF workstation or downloading a copy of tcsdisplay and running it directly on your computer.

In the first case, with tcsdisplay running remotely on the summit network, the X client there ships the characters to your local Xterm window over the network as part of the X client-server process. If you execute tcsdisplay locally, the program then has to connect over the Internet to the daemon on max and have the stream of characters downloaded through sockets over the Net to your workstation. This might give marginally better performance, since the execution of the program is taking place locally, especially if you have a fast, modern workstation. You would have no need to do a remote login.

If you want to execute tcsdisplay locally, you can FTP it (binary mode) from the IRTF network at /usr/local/bin/. Note that for tcsdisplay to work locally, your workstation must be configured to be able to recognize max without a fully qualified Internet name, and also stefan, since the program connects briefly to stefan when the template is refreshed (the t command). Workstations in Hilo and Manoa are so configured.

 

If something goes wrong...

Following are the most likely causes of failure. First, make sure the proper TCS version is running and on line and the cable that connects from the serial port on the Q-bus to the connector on max is connected correctly at both ends. The display daemon tvmond on max and the TCS communications daemon tcsd on stefan have to be running and healthy.

  1. The template comes up but no characters from the TCS are displayed.
    The connection cable between the TCS and max is faulty or not properly in place, or the wrong version of the TCS is running, or an obsolete version of tcsdisplay is used. Try it from other workstations.
  2. An error is displayed referring to the daemon tvmond.
    The display daemon may not be running. Check for its presence with
    ps -aux | grep tvmond on max. You can reload it as per the official procedure from John Sender, or start it from my directory as so, on max: ~harwood/tcsdsply/tvmond &
  3. An error is displayed referring to "socket_help.c".
    It is probably having a hard time connecting to the tcsd comm link daemon which it needs to do when a template is called for. Look for the presence of tcsd on stefan using the
    web reference to tell you how.
  4. A timeout is reported in tcsd.
    When renewing the template, the tcsdisplay program connects to the TCS through tcsd on stefan. Tcsd is having trouble communicating with the TCS though stefan's serial port. Check that the A/B switch at the terminal in the TCS room is in the "A" position and the TCS software is running and is on-line and happy. Check for "-OK" when you do <CR> on the TCS command line. You may have a connector or cable problem between stefan and the TCS. Use the command
    ~harwood/skymap/commstuff/tester to test the comm link with the TCS. You should get back "A-BEAM -OK".
  5. If nothing here helps, renew everything.
    If everything else checks out including tcsd, reboot the TCS, kill and restart tvmond, and kill and restart tcsdisplay. Double check for cabling or connector problems.

Additional points:

  1. The cursor flitting around the screen doing the updating can be distracting. I haven't figured out a way to specify the cursor as a line rather than as a character-sized box. (You can do this with VT-102 hardware terminals through the setup.) It is less distracting when the cursor box is hollow rather than filled in black. To make it hollow, remove the pointer from the window and make some other window the focus. Sometimes even this doesn't do it.

    NOTE: On a PC, a HyperTerminal window in VT-102 mode has the cursor we want, an underline. It may be that if you alter the terminfo file so the vt102 entry comes before xterm or ansi, the Xterm window will pick up the underline cursor. (Xterm picks the first terminal emulation it sees among certain closely related emulations in terminfo.)
  2. The software TCS display system works only with the LSI-11/23 on-line TCS as a source. The serial port Q-bus interface card is installed on that computer only. For "Super Tech" off-line diagnostics with the old LSI-11, you have to use the TV controllers. Some of the Super Tech commands require both channels, although I think you can get away without Channel 1 for most of the tests. Simply relocating the serial port card to the old LSI-11 Q-bus won't work, since software changes are also required. The software changes are straightforward, but somewhat time consuming and have never been started. I would be able to do this in a couple of days on a consulting basis. I would need to do this at the IRTF since there is no computer in Manoa that will boot the old LSI-11 diskettes.
  3. The set of diskettes for next year (2000) are configured to use the software TCS display system, not the old TV controllers. To use the old system next year, you will have to upgrade a copy of the current disks that use the old TV controllers to the year 2000. Instructions for doing this are on the web, "TCS Changes for Upcoming New Year".