Telescope Servo Controller Users Manual

The Danbury Corporation

February 4, 1998
Gary J. McGrath
Updated by Bruce Truax
August 1, 2003


Introduction

The E.O.S.T. Telescope axes are controlled by four computers, which communicate through a common STD 32 bus. The first computer, CPU0, acts as the master controller, and performs some of the less time critical tasks such as terminal I/O, serial communications, trajectory computations, diagnostics, etc. The name of this program is MASTER. It is executed from CPU0.

The other three computers each execute a servo loop program that is dedicated to the time critical tasks involved in controlling the servo loop. The processes that run on each of the three servo CPUs is the exact same executable program. This program is called SERVO. The only difference in these three programs is their configurations. Each program receives its own configuration from the master CPU. The SERVO program must be executing on each of the servo CPU's that are to be controlled prior to executing the MASTER program.

For diagnostic purposes, the user can switch between each of the four CPUs by pressing the space bar while holding down the Ctrl and Alt keys simultaneously ([CTRL][ALT][SPACE]). Although, there will be little need for the user to switch to the servo CPUs since the SERVO program does not accept user input (except ESC to exit), and displays only a few messages for troubleshooting. Almost all of the user interaction will be performed through the MASTER program running on CPU0. This feature is disabled by default because it tends to slow down the servo processing. To enable this function set the IRQ ENABLE flat to 1 in MASTER.CFG

At the present time, SERVO.EXE, MASTER.EXE and the configuration files are all located in C:\BIN\. The plan has been to move these to the EPROM drive P:\ once the programs were stable to enhance reliability. This has not been done as of 8/1/03.


The Axis Screens

When the MASTER program first starts, it displays a blank screen. Pressing F8 will toggle first to the Axis Screen and then to the Status Display and finally back again to the Blank Screen.<\P>

There is an axis screen for each axis. The user can switch from one axis to another by pressing the F7 Key. The axis screen gives the user an indication of what is happening in the servo CPU, and allows some interaction with it.

There is a box that displays some of the configuration parameters that are more frequently modified. Although these parameters can only be modified by a configuration file, they allow the user to instantly determine some of the settings such as the PID coefficients, the input command source, which encoder is being used, etc. These parameters are described in detail in the section on Configuration Files.

The last line of the screen will display any messages that the user should be aware of, such as errors in program execution.

The Axis Screen also contains a box that displays dynamically changing information in the axis CPU. The following list describes these values:

The value of the commanded position used to calculate the error signal.

The position value as read by the Farrand encoder.

The position value as read by the Heidenhain encoder.

The position that is used to generate the position error. (Only one of the two encoders can be used at one time to calculate the position error.

The time between successive servo samples. This is important in determining if the CPU is able to perform all of its computations fast enough to keep up with the desired loop time. If the displayed loop time varies from the time, T, given in the command file, then the servo may perform erratically.

An indication of the servo velocity computed by numerically differentiating the position signal.

The Time is measured in seconds since noon on December 31 of the previous year. This value is used to calculate the position command from a trajectory polynomial equation. Each servo CPU keeps track of time using its own clock, and therefore it is important to know that the time is correct.

The day of the year as indicated by the servo CPU clock.

The time since midnight of the present day given in hours minutes and seconds.

The running RMS position error computed from the last 100 samples of position error taken every T seconds. The sample time, T, is the servo loop time.

There are several function keys that can be used to control the operation of the servo. The function keys for a particular Axis Screen act only on that axis, and do not affect the other two axes. The function keys are used as follows:

The Farrand encoder has 512 sectors, each of which is divided into 16-bits of resolution. In order to subtract the residual periodic error from the Farrand, one of the servo tuning procedures requires knowledge of the Farrand sector.

The ESC key is used to exit the program. The program can only be exited from one of the Axis Screens. If all of the axis are not parked, the esc. key will not exit the program and you will be warned that all axes must be parked in order to exit. If for some reason you need to exit MASTER without parking all of the axis you can force the program to quite by pressing -x.

The F1 key puts the axis in a known state by reading its configuration file and resetting system parameters. This function is also performed automatically when MASTER first begins execution. If the command position is in constant velocity mode or analog input mode, the position encoder offsets are reset so that the position and the position command are identical. This avoids a large step response due to discrepancy between the position and the position command. When in polynomial trajectory mode, the encoder offsets are not reset.

The F2 Key removes the brakes and starts the servo loop processing. This command should only be used when the axis has been halted. Using this command while in polynomial trajectory mode may cause large step inputs which will cause the servo to go out of control.

The F3 key halts the axis by stopping the servo processing zeroing out the amplifier drive signal and applying the brakes.

Attempts to recover from a servo automatic shutdown caused by a tachometer or speed switch over speed. If the error signal is too great, the axis may shutdown again. If this happens, the axes should be parked by hand, then a startup should be performed.

The F5 key performs a startup sequence that removes the brakes or park pin, then moves the axis from its park position through the reference point (Hall sensor or Sony Magnaswitch). As the axis passes the reference point, the encoder hardware counter and software offset are reset to a known position. This gives the encoder an accurate absolute reference. This function must be performed when using the polynomial trajectory mode. If the axis is not in the park position, the startup sequence will be aborted with an error message. This is necessary since the servo must know approximately where it is (within a few degrees) to avoid a large step response when the encoders are reset.

The F6 key performs a shutdown sequence that moves the axis to its park position and applies the brakes or inserts the park pin. The servo loop processing then stops and the amplifier drive signal is zeroed out.

Each time the F7 key is pressed, the axis screen switches to the next axis in the following sequence; Azimuth, Altitude, Instrument Rotator, then back to Azimuth.

The F8 key switches the screen between the Axis Screen and, the Status Screen and a blank screen. During normal telescope operation the Ziatech should be left in the blank screen mode to minimize traffic on the STD-32 bus. It has been found that the excessive bus traffic generated by updating these display screens can result in intermittent communications errors between the TCC and the Ziatech. The communications errors can cause erratic axis behavior and result in unpredictable telescope tracking halts.


Status Screen

The status screen displays the status of various diagnostics that are not determined from the state of the servo process, such as limit switches and temperatures. Most of these diagnostics are read in through the ZT8961 Digital I/O Board, VL-1297 Analog I/O board, or the RTI-1260 Analog Input Board. These three boards are located in the STD bus card cage. The following briefly describes some of the diagnostics:

The limit switches indicate if any axis has moved out of the allowed range of motion, if an Emergency Shutdown switch has been pressed, if there is no air pressure to drive the brakes and bellows, or if a tachometer or speed switch has detected an over speed condition. The status of the limit switches is read in from the Limit Switch Relay Assembly (LSRA) through the ZT8961.

The status of each amplifier is displayed (either enabled or disabled). The status is read in from the ZT8961.

The sector of each axis indicates weather the axis is in the clockwise or counterclockwise half of its rotation. For the azimuth axis, counter clockwise is considered positive looking down through the axis. For the instrument rotators, counter clockwise is considered positive looking at the telescope. The sector is read in through the ZT8961.

The reading from various temperature sensors throughout the telescope are read in from the temperature board through the VL-1297. The motor winding temperatures are measured by reading the motor current and voltage through the RTI-1260 board and calculating the temperature from the change in electrical resistance of the winding.

Indicates weather the secondary controller assembly has power for the controller, communications, and motors.

The park switches indicate weather each axis is in the park position. This is a requirement for the startup sequence.

The current supplied to the Current/Pressure (I/P) transducer and the desired pressure to be applied to the primary air support bellows.

The pressure of the primary support bellows as read by the primary air pressure sensor.

The Voltage and Respective Force measured by the primary support Load Cell.


Configuration Files

There are four axis configuration files and one master configuration file that must be located in the current directory when MASTER is executed. These files must have the following filenames:

The rotator CPU (CPU3) is initially set up to use the left rotator, so it loads the left rotator configuration. When the rotator CPU switches from left to right (or vice versa) the corresponding configuration file is loaded. The format of each axis configuration file is exactly the same. The files are written as ASCII text, and can be edited with a text editor. The DOS Editor can be used to edit these files by typing "EDIT FILENAME" from the directory where the file is located.

Servo Configuration File

Each line must start with an integer number that is used as a key. The program uses this number to determine which parameter is being defined. After one or more spaces a value is given. The value must be given as either an ASCII integer, floating point, or hex number (beginning with 0x). Following the value can be any number of spaces followed by an optional comment. Any line that does not begin with a number is considered to be a comment line.

The following lists the parameter descriptions by key number:

1 floating_point (LIMIT1)

This value used to limit integration in the PID compensation. If the integrator reaches a value of +/- LIMIT1, the integrator is reset to zero. A value of LIMIT1=LIMIT2/(Kp*Ki) will limit the integrator to a value that would correspond to the output limit (LIMIT2).

2 floating_point (LIMIT2)

The output limit of the D/A converter (in volts). The motor drive signal is limited to +/- LIMIT2 volts.

3 integer (T)

The number of milliseconds between each sample period of the servo loop.

4 integer (ENCODER)

Determines which encoder to use for the servo position signal; 0=Farrand, 1=Heidenhain

5 integer (VCMD_SOURCE)

The source of the command signal; 0=polynomial trajectory command, 1=analog input velocity command (divided by ten), 2=constant velocity command. In the polynomial trajectory mode, the axis will only move if a MOVE command is sent to the serial communications port from the TCC. If the analog input mode is selected, The velocity command is input from input channel 0 of the VL1297 analog I/O board with base I/O address 0400h. The command velocity becomes 0.1 degrees/sec per volt of input. In the constant velocity mode, the command signal is determined by parameter 14 (CONST_VELOCITY).


6 floating_point (P_TERM)

The proportional coefficient (Kp) of the digital PID Compensation H(s) = Kp( Ki/s +s*Kd + 1 ).

7 floating_point (I_TERM)

The integral coefficient (Ki) of the digital PID Compensation H(s) = Kp( Ki/s +s*Kd + 1 ).

8 floating_point (D_TERM)

The derivative coefficient (Kd) of the digital PID Compensation H(s) = Kp( Ki/s +s*Kd + 1 ).


9 floating_point (DIAGNOSTIC)

Flag to determine which signal is to be outputted on the diagnostic analog output channel (channel 0 VL-1297 board). The following lists the possible values:

A closed loop frequency response measurement can be made by commanding a sinusoidal velocity input using the analog velocity input command mode, and measuring the output velocity using this diagnostic output mode. The scale factors will cancel and the integral input and derivative output will also cancel giving a closed loop position response. In addition the closed loop response can be transformed mathematically on the signal analyzer to an open loop position response.

No more than 1 servo should use diagnostic output at a time, or contention will occur when more than one CPU tries to output to the same channel of the same board at the same time. Set this flag to zero for normal use.

10 floating_point (MAX_ACCEL)

Maximum acceleration (deg/sec^2) used to calculate trajectories for a MOVE command from the TCC. This parameter is not used for constant velocity command mode or analog input command mode.

11 floating_point (MAX_VEL)

Maximum velocity (deg/sec) used to calculate trajectories for a MOVE command from the TCC. This parameter is not used for constant velocity command mode or analog input command mode.

12 floating_point (MAX_POS)

Maximum Position (deg) used to calculate trajectories for a MOVE command from the TCC. This parameter is not used for constant velocity command mode or analog input command mode.

13 floating_point (MIN_POS)

Minimum Position (deg) used to calculate trajectories for a MOVE command from the TCC. This parameter is not used for constant velocity command mode or analog input command mode.

14 floating_point (CONST_VELOCITY)

Constant Velocity command signal (deg/sec) used in constant velocity command mode (VCMD_SOURCE = 2).


15 floating_point (HEID_SCALE)

Heidenhain encoder scale factor (deg/count)

16 floating_point (HEID_OFFSET)

Heidenhain encoder offset (degrees)

17 floating_point (FARRAND_SCALE)

Farrand encoder scale factor (deg/count)

18 floating_point (FARRAND_OFFSET)

Farrand encoder offset (degrees)


19 integer (NOTCH1ON)

Flag to turn digital notch filter #1 on and off; 0=off, 1=on.

20 integer (NOTCH2ON)

Flag to turn digital notch filter #2 on and off; 0=off, 1=on.

21 integer (NOTCH3ON)

Flag to turn digital notch filter #3 on and off; 0=off, 1=on.

22 integer (NOTCH4ON)

Flag to turn digital notch filter #4 on and off; 0=off, 1=on.

23 floating_point (NOTCH1FREQ)

Notch Frequency (Hz) of digital notch filter #1.

24 floating_point (NOTCH2FREQ)

Notch Frequency (Hz) of digital notch filter #2.

25 floating_point (NOTCH3FREQ)

Notch Frequency (Hz) of digital notch filter #3.

26 floating_point (NOTCH4FREQ)

Notch Frequency (Hz) of digital notch filter #4.

27 floating_point (NOTCH1ZN)

Damping factor (zeta) for the numerator polynomial of notch filter #1.

28 floating_point (NOTCH2ZN)

Damping factor (zeta) for the numerator polynomial of notch filter #2.

29 floating_point (NOTCH3ZN)

Damping factor (zeta) for the numerator polynomial of notch filter #3.

30 floating_point (NOTCH4ZN)

Damping factor (zeta) for the numerator polynomial of notch filter #4.

31 floating_point (NOTCH1ZD)

Damping factor (zeta) for the denominator polynomial of notch filter #1.

32 floating_point (NOTCH2ZD)

Damping factor (zeta) for the denominator polynomial of notch filter #2.

33 floating_point (NOTCH3ZD)

Damping factor (zeta) for the denominator polynomial of notch filter #3.

34 floating_point (NOTCH4ZD)

Damping factor (zeta) for the denominator polynomial of notch filter #4.


35 floating_point (PARK_POSITION)

The park position in degrees relative to the center of rotation (for elevation 0=horizon, 90=zenith). Counter-clockwise is considered positive when looking toward the telescope.

36 floating_point (REF_POSITION)

The reference position (Hall effect sensor or Sony Magnasensor) in degrees relative to the center of rotation (for elevation horizon=0, zenith=90). Counter-clockwise is considered positive when looking toward the telescope.


37 16_bit_hex_value (ENCODER_BASE)

16 bit hex base address of the encoder interface board (Az=0xd000, El=0xd010, LftRot=0xd020, RghtRot=0xd030).

38 16_bit_hex_value (DAC_BASE)

D/A (Servo Board) Base Address

39 floating_point (DAC_SCALE)

D/A (Servo Board) Scale Factor

40 floating_point (DAC_OFFSET)

D/A (Servo Board) Offset


41 integer (sos5on)

Second Order System Servo Compensation stage 5 on/off (0=off, 1=on)

42 integer (sos6on)

Second Order System Servo Compensation stage 6 on/off (0=off, 1=on)

43 integer (sos7on)

Second Order System Servo Compensation stage 7 on/off (0=off, 1=on)

44 integer (sos8on)

Second Order System Servo Compensation stage 8 on/off (0=off, 1=on)


45 floating point (b0_5)

Second Order System Servo Compensation stage 5 b0 coefficient

46 floating point (b1_5)

Second Order System Servo Compensation stage 5 b1 coefficient

47 floating point (b2_5)

Second Order System Servo Compensation stage 5 b2 coefficient

48 floating point (a1_5)

Second Order System Servo Compensation stage 5 a1 coefficient

49 floating point (a2_5)

Second Order System Servo Compensation stage 5 a2 coefficient


50 floating point (b0_6)

Second Order System Servo Compensation stage 6 b0 coefficient

51 floating point (b1_6)

Second Order System Servo Compensation stage 6 b1 coefficient

52 floating point (b2_6)

Second Order System Servo Compensation stage 6 b2 coefficient

53 floating point (a1_6)

Second Order System Servo Compensation stage 6 a1 coefficient

54 floating point (a2_6)

Second Order System Servo Compensation stage 6 a2 coefficient


55 floating point (b0_7)

Second Order System Servo Compensation stage 7 b0 coefficient

56 floating point (b1_7)

Second Order System Servo Compensation stage 7 b1 coefficient

57 floating point (b2_7)

Second Order System Servo Compensation stage 7 b2 coefficient

58 floating point (a1_7)

Second Order System Servo Compensation stage 7 a1 coefficient

59 floating point (a2_7)

Second Order System Servo Compensation stage 7 a2 coefficient


60 floating point (b0_8)

Second Order System Servo Compensation stage 8 b0 coefficient

61 floating point (b1_8)

Second Order System Servo Compensation stage 8 b1 coefficient

62 floating point (b2_8)

Second Order System Servo Compensation stage 8 b2 coefficient

63 floating point (a1_8)

Second Order System Servo Compensation stage 8 a1 coefficient

64 floating point (a2_8)

Second Order System Servo Compensation stage 8 a2 coefficient


65 integer (FarrandCorrectOn)

Turns on correction of Farrand Periodic Error

66 floating point (omega1)

Frequency of Periodic Error correction Term 1

67 floating point (C1)

Amplitude of Periodic Error correction Term 1

68 floating point (phi1)

Phase of Periodic Error correction Term 1

69 floating point (omega2)

Frequency of Periodic Error correction Term 2

70 floating point (C2)

Amplitude of Periodic Error correction Term 2

71 floating point (phi2)

Phase of Periodic Error correction Term 2

72 floating point (omega3)

Frequency of Periodic Error correction Term 3

73 floating point (C3)

Amplitude of Periodic Error correction Term 3

74 floating point (phi3)

Phase of Periodic Error correction Term 3


75 integer (FarrandBaseSector)

Base (0) sector of Farrand encoder

75 integer (FarrandSectorDisplay)

Turn Farrand Sector display on (1) or off (0).

Master Configuration File - Master.cfg

The format of the Master Configuration file is slightly different than the axis configuration files. Instead of a key number, a key word is used to determine which parameter is being defined. The format of each line is a key word followed by and equal sign (=) followed by the value, followed by an optional comment. The following is a list of key words and values that are recognized in the MASTER.CFG file.

DIOBASE = 16_bit_hex_value {value}

16 bit hex base address of the ZT8961 digital I/O board.

PM_ENABLE = integer {value}

Enables (1), or disables (0) primary air pressure control based on elevation position.

The primary mirror support system is controlled using the following equation:

P = (W*cos(theta) + B + E*sin(theta) ) / (24*A)

Where P is the air pressure in the support bellows (psi), theta is the zenith angle (radians).

PM_WEIGHT = floating_point {value}

Primary mirror weight (W) (lbf) used to calculate air pressure in primary support system using the above equation.

PM_OFFSET = floating_point {value}

Primary mirror support offset (B) (lbf) used calculate air pressure in primary support system using the above equation.

PM_AREA = floating_point {value}

Bellows area (A) (square inches) used calculate air pressure in primary support system using the above equation.

PM_E = floating_point {value}

Horizon error (E) (lbf) used calculate air pressure in primary support system using the above equation.

PSENSE_SCALE = floating_point {value}

Primary air pressure sensor scale factor (psi/volt).

PSENSE_OFFSET = floating_point {value}

Primary air pressure sensor offset (psi).

LDCELL_SCALE = floating_point {value}

load cell scale factor (lbf/volt)

IP_SCALE = floating_point {value}

Current-Pressure (I/P) transducer scale factor (ma/psi)

IP_OFFSET = floating_point {value}

Current-Pressure (I/P) transducer offset (ma)


T(N)_SCALE = floating_point {value}

Temperature sensor scale factor (deg C / volt). Where (N) is the sensor number. Currently there are twelve temperature sensors numbered 1 through 12 (T1 through T12).

T(N)_OFFSET = floating_point {value}

Temperature sensor offset (deg C). Where (N) is the sensor number. Currently there are twelve temperature sensors numbered 1 through 12 (T1 through T12).

N_AVERAGES = integer {value}

The number of samples used for averaging the analog input channels.


RTI1260_BASE = hex {value}

Base address of RTI 1260 card

RTI1260_SCALE = floating point {value}

Scale factor of RTI-1260 in volts/count.

RTI1260_OFFSET = floating point {value}

Offset of RTI-1260 in volts.

IRQ0_ENABLE = integer {value}

Enable IRQ0 on servo CPU's (causes servo delays). 0 - normal operation, 1 - allow CPU console switching.


Serial Communications

This section describes the set of commands that the master controller can receive through the RS-232 serial link from the TCC. The master controller communicates directly with each of the axis controllers, eliminating the need for more than one serial link. The commands are recieved on CPU0 (Master) through COM1 (connector J8) of the ZT8902 board (located in the Ziatech STD32 Bus rack in NEMA enclosure #1. Commands that are not used by the Telescope Control Computer (TCC) are marked with and asterisk (*) and may be issued by the Telescope Operator Interface (TOI) by use of the TCC "TALK" command.

The format of these commands must follow some simple rules:

Commands are sent as ASCII characters. There must be one command per line. Each line must be ended with either a carriage return (CR) or a carriage return - line feed combination (CR LF). Commands can be sent in either uppercase, lower case, or any combination of upper and lower case. The full command is echoed back followed by a space (SP) and the two characters "OK" . If any other responses are sent, they will be on separate lines following the echoed command. The "OK" will be at the end of the last line of response.

As a diagnostic tool, instead of using the TCC to send commands to the master controller, a communications program such as procomm can be used. Procomm can be run on any unused servo CPU with settings of 9600 baud, no parity, 8 data bits, 1 stop bit. Switch to the unused servo CPU by successively pressing [CTRL][ALT][SPACE]. Then change directory to the C:\PROCOMM directory, and enter the command PROCOMM. A null modem cable should be connected between connectors J8 (COM1) on each of the communicating CPUs. This will allow the user to type commands to the procomm terminal emulator, and have these commands executed by the master controller and receive a response back.

Axis Specific Commands:

For the axis specific commands, {AXIS} can be any of the following: AZ, ALT, or ROT, or optionally TEL1, TEL2 and ROT

{AXIS} BRAKE.ON (*)

Applies the brakes on the specified AXIS (AZ or ALT only)

{AXIS} BRAKE.OFF (*)

Releases the brakes on the specified AXIS (AZ or ALT only)

{AXIS} DRIFT

Causes the AXIS to immediately move at its current velocity until further notice. All PVT's are removed from the motor control buffer. The command returns the following info: position, velocity, and time. the TCC always issues a DRIFT command (and uses the info as the initial path of the telescope) before computing a new slew.

{AXIS} ENCODER.F (*)

Switch to the Farrand encoder if not already in Farrand mode. Power Up default is selectable via the axis configuration file (AZ or ALT only).

{AXIS} ENCODER.H (*)

Causes the Heidenhain incremental encoder offset to be updated so that the output matches the output of the Farrand encoder. Then switches to the Heidenhain encoder if not already in Heidenhain mode (AZ or ALT only).

{AXIS} INIT

Halts the AXIS by clearing the motor control buffer, and puts the controller in a known state by reading the axis configuration file and initializing the servo process.

{AXIS} MOVE

Stops the axis at the current position (overshoots then returns).

{AXIS} MOVE {pos}

Moves to the given position and stops axis.

{AXIS} MOVE {pos} {vel}

Moves along the path p(t) = pos + vel (t - tnow), where tnow = time at which the servo reaches position pos. Note that the axis may overshoot the requested position in order to turn around and assure that it is travelling at velocity vel when it reaches position pos.

{AXIS} MOVE {pos} {vel} {time}

Specifies the final position, velocity, and time for the interpolated path. When this command is received, one of four things happens:

Once an interpolated-motion command expires, one of two things happens:

Several commands immediately supersede interpolated motion and flush the command buffer, including:

{AXIS} +MOVE {pos}

Offsets by the given amount. See note below.

{AXIS} +MOVE {pos} {vel}

Offsets by the amount p(t) = pos + vel (t - time_of_command), where time_of_command is the time at which the command was issued. See note below.

{AXIS} +MOVE {pos} {vel} {time}

Offsets by the amount p(t) = pos+ vel (t - time). See note below.

note on +MOVE commands

+MOVE commands are applied to all MOVE commands (all flavors) already received and still in the command buffer. +MOVE commands are NOT applied to commands received after the +MOVE is received. this is crucial for the TCC to correctly track. Also, the +MOVE command does not affect the trajectory that is currently being executed.

{AXIS} PARK (*)

Moves the AXIS from its current position to its park position taking into account the sector position to avoid a cable wrap-up problem. Once the axis is in the park position, the brakes or park pins are applied/inserted as necessary to prevent any further motion of the axis. The servo loop is shut down and the amplifier drive signal is set to zero. This command can be made for more than one axis without waiting for the first axis to finish.

ROT.{LEFT/RIGHT} (*)

Selects new instrument. The new instrument amplifier and encoder are selected. If the current instrument rotator is not parked, the error Error Switching Rotators: Not Parked is issued.

SEC.POWER.{ON/OFF} (*)

Turns on or off the power to the secondary controller. The power can be turned off while the secondary is not moving to reduce heat generated by the controller and drive circuitry.

SECONDARY {COMMAND} (*)

Communicates the COMMAND string to the secondary controller. The COMMAND string is any valid secondary controller command (See "Secondary Controller Functional Description" for the command syntax).

{AXIS} SEEK.REF (*)

A check is made to see if the axis is parked. If the axis is parked, the following sequence is performed (otherwise an error message is returned):

{AXIS} SET.TIME {date}

Sets the axis controllers internal clock to the time specified. Each controller is also synchronized to the 1 Hz pulse from the GPS clock. So, the time specified can be off by as much as 1/2 second. The date is specified as: mm dd yy hh mm ss.sss. The servo task must be running during or immediately after an {AXIS} SET.TIME command is given, since the command is not executed until the servo task is running. If a trajectory is being followed when a SET.TIME command is given, the axis could jump to a new position.

SHOW.TERT

Reports the current position of the tertiary mirror.

Returns:
TERTIARY RIGHT OK
TERTIARY CENTER OK
TERTIARY LEFT OK
TERTIARY FAULT OK

{AXIS} STATUS

Returns: {pos} {vel} {time} {status} 0.0000000 OK

Sample output:

6.7625 0.00000 4562621841.08128 34406 0.000000 OK

Position is reported in degrees, velocity is reported in degrees/second, time is defined in terms of seconds from noon on the last day of the previous year and the status word is defined as follows:

-----------------------------------------------------------------------
ALT AXIS

0  Alt Axis Bit 1    00 = Lost          01 = Initializing
1  Alt Axis Bit 2    10 = Initialized   11 = Undefined 

2  Alt Axis Bit 3    00 = Stopped       01 = Running
3  Alt Axis Bit 4    10 = Undefined     11 = Open Loop


AZ AXIS

4  Az Axis Bit 1     00 = Lost          01 = Initializing
5  Az Axis Bit 2     10 = Initialized   11 = Undefined 

6  Az Axis Bit 3     00 = Stopped       01 = Running
7  Az Axis Bit 4     10 = Undefined     11 = Open Loop

ROT AXIS

8  Rot Axis Bit 1    00 = Lost          01 = Initializing
9 Rot Axis Bit 2     10 = Initialized   11 = Undefined 

10 Rot Axis Bit 3    00 = Stopped       01 = Running
11 Rot Axis Bit 4    10 = Undefined     11 = Open Loop

SWITCHES
	   0                     1
12    Not Parked (ALT)         Parked
13    Not Parked (AZ)          Parked
14    Not Parked (LROT)        Parked
15    Not Parked (RROT)        Parked
		 0                  1
16    SpeedSw No Fault    SpeedSw Fault
		0                    1
17    Az1Amp Enabled     Az1Amp Not Enabled
18    Az2Amp Enabled     Az2Amp Not Enabled
19    AltAmp Enabled     AltAmp Not Enabled
20    LRotAmp Enabled    LRotAmp Not Enabled
21    RRotAmp Enabled    RRotAmp Not Enabled
		0                    1
22    MirCov CLOSED          MirCov OPEN
23    MirCov No Fault        MirCov Fault

COMPOUND BITS FOR LIMITSW/TACHOMETER

VALUE            X (>0)        X (>0)

24 LSw/Tach bit1  0 = no fault,  1 = esd,       2 = az_cw,    3 = az_ccw,
25 LSw/Tach bit2  4 = alt_zeni,  5 = alt_hori,  6 = lrot_cw,  7 =  lrot_ccw,
26 LSw/Tach bit3  8 = rrot_cw,   9 = rrot_ccw, 10 = Undefined, 11 = Undefined ,
27 LSw/Tach bit4 12 = Undefined, 13 = Undefined, 14 = Undefined, 15 = Undefined 

28   az_ovs (either motor 1 or 2)
29   alt_ovs
30   rot_ovs (either one, but it should only be the one which is selected since the other is disabled.

31            1        AxisWarn    AxisBad (Not Implemented - top bit
                cannot be used.

TERTIARY.{RIGHT/CENTER/LEFT} (*)

Moves the tertiary mirror to point to the indicated instrument by performing the following:

{AXIS} TIME? (*)

Returns the current date and time in the format: mm dd yy sssss.sss, where sssss.sss is seconds of the day. Valid data will only be returned if the servo task is running. Therefore, an {AXIS} SEEK.REF should be issued before the {AXIS} TIME? command.

Sample output:

4 23 97 72451.340

ROT LOCK

Inserts the park pin for the active instrument rotator axis. If the axis is not parked, this command returns an error message and does nothing. This command is used for manually parking the instrument rotator axis.

ROT UNLOCK

Extracts the park pin for the active instrument rotator axis. This command is used for manually parking the instrument rotator axis.

Non-Axis Specific Commands:

EMERGENCY.STOP (*)

Immediately stops all servo loops, zeros drive amplifier command signals, disables all amplifiers, and applies brakes on azimuth and elevation. This is similar to pressing an ESD Switch. This command is only for emergency purposes and requires manually releasing the brakes and moving each axis to its park position before operations can be resumed. It may not be possible to close the telescope enclosure after an EMERGENCY.STOP.

HIGH.WIND.SHUTDOWN {wind_direction} (*) (NOT YET IMPLEMENTED)

This command is issued to shutdown the entire telescope during periods of high wind when the elevation axis may not have enough power to park if it is pointed directly into the wind. The following sequence occurs:

MIRROR.OPEN (*)

Opens the primary mirror cover and dampers.

MIRROR.CLOSE (*)

Closes the primary mirror cover and dampers.

RESET.ALL(*)

Attempts to reset fault conditions caused by automatic shutdown. Servo processing is stopped. Faults are cleared. A RESUME.ALL command should be issued to attempt to resume servoing.

RESUME.ALL(*)

Attempts to resume servo processing after a RESET.ALL command. Releases brakes and starts servos.

SHOW.BELAIR (*)

Returns the keyword "BELLOWS=" followed by the bellows air pressure (psi).

SHOW.ERROR (*)

Returns the RMS servo errors (arc seconds) for each of the servos (one on each line), preceded by the keywords "AZRMSERROR=", "ALTRMSERROR=" and "ROTRMSERROR=".

SHOW.I/P (*)

Returns the I/P transducer current (amps), preceded by the keyword "I/P_CURRENT=", and returns the I/P transducer pressure preceded by the keyword "I/P _PRESSURE=".

SHOW.LCELL (*)

Returns the load cell reading (lbf), preceded by the keyword "LCELL="

SHOW.STATUS (*)

Returns The status of each servo as either "LOST", "INITIALIZING" , or "INITIALIZED". Also returns the status of the servo processing for each axis as "STOPPED", "OPEN-LOOP", or "RUNNING".

SHOW.SWITCHES (*)

Returns the status of the switches as given below:

SHOW.TEMP (*)

Returns the temperature values in Celsius (one per line), preceded by its respective keyword: