Instcon

What in the world in instcon, I hear you asking.

"instcon" is a program written to facilitate the use of legacy intruments on the new MMT. By legacy, we mean instruments that used the TCS protocols implemented by Dave Harvey to manipulate TCS over a serial link.

I should note here that this compliance is not strict, but it should become more so in the future, especially as RA/DEC offsets and beam switching are implemented.

One particular difference is that offsets are simply read in arc seconds, and are typically limited to no more that 600 arc seconds (10 arc minutes). The Harvey TCS document states the input is hhmmss.s and ddmmss.s, but we don't do this, maybe we should.

At this time, 3 instruments are known to make use of instcon, namely:

New instruments should use socket communication via the native MMT protocols. (These will someday be documented somewhere.)

instcon must be run as a background task on the computer "hoseclamp". (since it listens to the serial port on hoseclamp, running it on hacksaw won't produce any useful effect). What I would do (since the operator is typically running on hacksaw) is to remotely login to hoseclamp from a window on hacksaw and then run instcon there by typing:

	instcon
There is some bizarre anecdotal advice about needing to run this via:
	perl instcon
There should be no reason to do this, if there is, please let me know and I will fix the problem.

instcon may need to be started with special switches for special cases. The switches are as follows:

For example, to run instcon with checksums, do this:
This should be done for FSPEC, but not MIRAC. PISCES is unknown at this time.
	instcon -c

You could put instcon in the background, but I would not. I would dedicate the terminal window to instcon, and just make an icon of it, so you can peek at it later if you need to. I logs all commands and their effect to the screen, and this information can be very useful in case of problems.

Format of commands

Commands are sent as newline terminated ascii strings. Each command consists of a command word, followed by an optional argument. The word and argument must be separated by at least one blank (an arbitrary amount of "white space" is allowed). If the word is unrecognized, the command is ignored (instcon prints what it did see, preceded by a ? on the console log).

Changes for RA/DEC offsets

Significant changes were made 11/30/2000 to introduce RA/DEC offsets with an effort to make their behaviour strictly compatible with the Harvey TCS commands.

The following commands now use RA/DEC offsets in a way that should be completely compatible with the Harvey TCS documentation.

The WOBRA and WOBDEC commands are new. Some of the changes may be in conflict with what the MIRAC code expects, so the old behaviour may be available via the -m switch. In the past OFFRA and OFFDEC set alt/az values in a deceptive stopgap fashion, but this is no more.

Exhaustive table of commands

The following table won't mean much to you, but I sure find it handy.
It is a list of the commands now defined within instcon and their effects.

    SWITCH: {
        /^MOVB1$/       and go_b1(),       last SWITCH;
        /^MOVB2$/       and go_b2(),       last SWITCH;
        /^OFFRA/        and off_ra($_),    last SWITCH;
        /^OFFDEC/       and off_dec($_),   last SWITCH;
        /^MOVOFF$/      and go_off(),      last SWITCH;
        /^OFFAZ/        and off_az($_),    last SWITCH;
        /^OFFXALT/      and off_xalt($_),  last SWITCH;
        /^OFFALT/       and off_alt($_),   last SWITCH;
        /^MOVOFFAA$/    and go_offaa(),    last SWITCH;
        /^MOVEOFFAA$/   and go_offaa(),    last SWITCH;
        /^MOVOFFAX$/    and go_offax(),    last SWITCH;
        /^MOVEOFFAX$/   and go_offax(),    last SWITCH;
        /^WOBAZ/        and wob_az($_),    last SWITCH;
        /^WOBALT/       and wob_alt($_),   last SWITCH;
        /^MOVB1AA$/     and go_b1aa(),     last SWITCH;
        /^MOVEB1AA$/    and go_b1aa(),     last SWITCH;
        /^MOVB2AA$/     and go_b2aa(),     last SWITCH;
        /^MOVEB2AA$/    and go_b2aa(),     last SWITCH;
        /^STATUS$/      and get_stat(),    last SWITCH;
        /^TELPOS1$/     and get_pos1(),    last SWITCH;
        /^S$/           and get_stat(),    last SWITCH;
        print "?\n";