next up previous contents
Next: 3 End of Night Up: Enterprise Flight Manual for Previous: 1 Typical Beginning of

2 Beginning of the Night Procedure

All communications with the Enterprise Z-80 which runs the MX probes occur over a serial link to the control room. A set of IRAF tasks from ``mxpackage.mxobserve'' manage commands and data sent to/from the Enterprise. Pre-run configuration of ``mxpackage'' on the workstation ``bok.as.arizona.edu'' is described in the script ``mxpackage.setup_bok'' (see previous chapter).

2.1 Procedure for Starting Enterprise Window

2.1.1 Condition before Startup

2.1.2 Procedure for Startup of Communication Program

If the Enterprise is already running, a carriage return should produce a prompt. Hitting the delete key is even better than a carriage return because it flushes the communications buffers. If the Enterprise is not running or does not respond, proceed to the next section.

``listen'' is a cl script that runs task ``ttarget'' without all the cl overhead. It is normally run in the background, but could be in the foreground of a separate window.

Note that ``listen'' and ``subspace'' are permanently rather experimental and not particularly robust. Before you complain too loudly, remember that the alternative is a Z-80 with 8-inch floppy disks.

2.1.3 ``listen'' and ``subspace'' parameters

listen.par

        (port = "/dev/ttya")    serial port for enterprise
       (tfile = "")             stream file
       (necho = 1)              echo interval
        (verb = 4)              verbosity
     (version = "03 June 1992") Version date of this routine
        (mode = "ql")

``listen'' also creates a temporary script file named ``.listen_temp''. ``tmp$ttarget.txt'' is a stream file that is only used for probe alignment. See ``readcenters'' below.

subspace.par

    (portname = "/dev/ttya")    Name of the serial port
  (instrument = "mxspect")       Instrument pset
   (verbosity = 4)              Output verbosity parameter
        (mode = "ql")

2.1.4 How to exit ``listen'' and ``subspace''

``listen'' exits whenever the Enterprise echoes a Cntrl-D. Type a Cntrl-D in ``subspace'' to exit gracefully. Then type a Cntrl-C to exit ``subspace'' or ``readcenters''.

If your window crashes and you have a rogue (dettached from the parent window) ``listen'' task, you will have to hunt it down with the Unix commands ``!ps -efc'' and destroy it with ``!kill -9''. There may be as many as three PIDs. Otherwise, the rogue task will continue to interact with the serial port producing very erratic communications. See the task ``killer'' to make the hunt easier. Sometimes ``listen/ttarget'' exits accidentally, if that occurs type a Cntrl-C to exit ``subspace'' and restart both of them as above.

2.2 Procedure for Starting the Enterprise

The Enterprise is the Z-80 microprocessor onboard the MX Spectrometer on the telescope which controls all of the motions of the 32 probes. It receives commands over a serial link from the workstation and the astronomer in the control room. The Enterprise moves the fibers probes with 32 intelligent stepper controller cards connected to an extension of the Z-80 STD bus. These controller cards are located in the 2 auxilliary Eurocard racks on the flanks of the MX.

2.2.1 Procedure for Power-up of Enterprise

2.2.2 Running the Enterprise Program

The Enterprise Program will respond with:

EPROG3 -- Enterprise Control Program -- Version of 01-JAN-87
 -- Type H to get a menu of commands.

2.2.3 Normal Startup Commands (if software is already loaded)

`` A/ ''
to reset all the motor controller
`` A? ''
to verify that all probes are alive
`` A* ''
to initialize the controllers and zeropoints by moving all probes back to their optical limits

Note that the `` A '' performs the following commands on all the probes. i.e. `` / '' resets the active probe while `` A/ '' resets all probes.

See the Enterprise Menus section of this manual for a full list of commands.

2.3 Downloading Fresh Software to the Enterprise

The ``listen'' program should be running on the workstation and the Enterprise power should be ON. Remember this is NOT a normal observing procedure. Fresh software should only be needed when something has glitched the Enterprise memory, or when Enterprise has been turned off for a long time, or when the CMOS RAM batteries are dead. Typical symptoms of corrupted Enterprise software are ``G0100'' not producing a response or ``#'' hanging in a loop.

2.3.1 Download Software Procedure

  1. Reset the Enterprise or return it to monitor mode with a `` ! ''.
  2. Load ``mxpackage'' and the ``mxobserve'' package in your cl window.
  3. Run ``loadcode'' to send the program file ``eprog3.hex''.

    The hexadecimal address readout will update on the screen as the .HEX file is shipped across the serial link and loaded into Enterprise memory. The data area ends around 97C0. (This file is an ascii hexadecimal representation of the Z-80 binary code.) Downloading takes about 70 seconds.

  4. Run ``loadcode'' again to repeat the download procedure with ``pivot.hex'' if the probe geometry has been recently updated ( usually). The pivot decenter offsets must be reloaded each time you reload the program code.
  5. Run ``loadcenters'' if a center alignment has been performed at the beginning of the observing run (always!). Center coordinates are kept in a file usually named `date.set'. A center alignment is performed at the beginning of each observing run and should be repeated whenever MX is remounted on the telescope. The center coordinate offsets must be reloaded each time you reload the program code.
  6. Run ``makeitso''. After all information has been downloaded, return to communicating with Enterprise via the ``subspace'' program. You may now execute the new Enterprise program by typing `` G0100 '' in the Enterprise window. There is a task to automatically send this and the following initialization commands (7,8,9) from the workstation. See ``makeitso'' below.
  7. After loading fresh software (eprog3.hex), reload the neutral coordinate buffer by typing `` ''. You must do this before trying to move the probes.
  8. Apply any platescale or rotation alignment changes at this time. A rotation correction is determined from a star field each time the instrument is mounted on the telescope. The platescale should be stable with time.
  9. You will also wish to create the standard circle patterns with the command. (see below)

2.3.2 ``loadcode'' and ``loadcenters'' parameters

loadcode.par

       (hfile = "mxobserve$eprog3.hex") Name of the program (.hex) file
    (portname = "/dev/ttya")    Name of the serial port
       (delay = 20)             Output delay in milliseconds
  (instrument = "mxspect")       Instrument pset
   (verbosity = 4)              Output verbosity parameter
        (mode = "ql")

loadcenters.par

        cfile =                 Name of the center calibration file
    (portname = "/dev/ttya")    Name of the serial port
       (delay = 50)             Output delay in milliseconds
  (instrument = "mxspect")       Instrument pset
   (verbosity = 5)              Output verbosity parameter
        (mode = "ql")

2.3.3 Typical Circle Patterns

Operation of MX will be smoother if you use the first three or four coordinate buffers to store several standard circle patterns. You must reload these each time the software is reloaded. These patterns are not loaded automatically because they are sometimes different for engineering tests or special observing programs. See the section on how to create a circle pattern for more details.

2.3.4 Sample ``makeitso'' session

``mxobserve.makeitso'' sends a series of initialization commands to the Enterprise after power up or reloading fresh software. The idea is to save the observer from a lot of typing in the Enterprise window with the Z-80 interface. ``makeitso'' does not handshake with the Enterprise, but simply sends the commands at pre-arranged intervals. Remember to set (epar) the current rotation angle before you run ``makeitso''.

MAKEITSO Program to Initialize the ENTERPRISE, SPP Version of 12-SEP-93
       Executed on: Sun 18:31:03 12-Sep-93
MAKEITSO:  G0100         Run Enterprise Program.
MAKEITSO:  \             Create Neutral Buffer.
MAKEITSO:  R 00000800    Using fangle 00000800.
MAKEITSO:  | 00000000 00000000 Creating circle.
MAKEITSO:  B B000        Using buffer B000.
MAKEITSO:  #             Conversion to steps.
MAKEITSO:  | 00010000 00000000 Creating circle.
MAKEITSO:  B B800        Using buffer B800.
MAKEITSO:  #             Conversion to steps.
MAKEITSO:  B C400        Using default buffer C400.
MAKEITSO:  B 0000        List buffers.
MAKEITSO:  A/            Reset controllers.
MAKEITSO:  A*            Initializing all probes.
MAKEITSO:  Please wait for probes to complete setup.
 
MAKEITSO is complete.

2.3.5 ``makeitso'' parameters

makeitso.par

(fangle =             00000800) Field rotation angle R
(portnam=            /dev/ttya) Name of the serial port
(circle =                  yes) Generate circle buffers?
(fix =                     yes) Replace broken fibers?
(move   =                  yes) Move the Probes?
(delay  =                   75) Serial delay in milliseconds
(instrum=              mxspect) Instrument pset
(verbosi=                    4) Output verbosity parameter
(mode   =                   ql)


next up previous contents
Next: 3 End of Night Up: Enterprise Flight Manual for Previous: 1 Typical Beginning of

John Hill
Wed Jan 26 18:59:36 MST 2000