UK Astronomy Technology Centre |
Chris Tierney |
Royal Observatory, Edinburgh |
31st March 2001 |
device.dl for the NCU lamp attenuator device
Safety
All the NAOMI mechanism control screens display two buttons - a red "Emergency" button
and a green "Safe" button - in the top right corner of the screen.
Left clicking an "Emergency" button will immediately stop any motion by any part of the
wavefront sensor or calibration unit. Thereafter, any demands for motion are rejected, until
the user left clicks on any of the "Safe" buttons. Many mechanisms will then demand to be re-indexed
before allowing the execution of any other motions.
Note: This safety feature has no effect on the motion of the Durham deformable mirror (DM) or fast
beam-steering mirror (FSM), nor any component of the electronics associated with NAOMI.
For more information, see the NAOMI mechanism software
safety page.
Mode and Directive menu buttons
- Mode - for full details of the behaviour of the record in different modes, see
documentation for the deviceControl record. A summary of the response of the record, upon receipt
of a "Go" directive, is given here for each mode:
- Init causes the record to initialise. This includes operations such as reading the lookup
table file and setting certain fields to their default values.
- Move causes the record to move the motor. The record verifies its input parameters (target
position etc), switches on motor power and deactivates the brake (if configured to do so), before commanding
the OMS card to move to the target position, at the target velocity. At the end of the move, the brake
and motor power are restored. If an encoder is being used, the feedback from this device is used to
verify the final position.
- Track causes the record to move the motor, as above, but to leave motor power switched on at the
completion of the move.
- Jog causes the record to start motion at the specified target velocity. The motor will continue to
move at this velocity until the record is given another velocity and "go" directive, receives a "stop"
directive, or until the mechanism hits a limit switch. This mode was used for engineering tests and is no longer
recommended for use on NAOMI, particularly for the linear (non-rotary) stages.
- Index causes the record to index (datum) the mechanism, using the algorithm specified in the "index"
(IALG) field. See the description of this field below.
- Park causes the record to move the motor to its default "park" position. This is not used on NAOMI.
- Test causes the record to initiate any testing of hardware that can be performed without moving any
mechanism. This record, in fact, does nothing in test mode.
- Directive - the record can be directed to perform three operations, each of which will
result in different behaviour depending upon the currently selected mode.
- Stop commands the record to terminate the current operation, whatever the current mode. If any
motion is in progress, the motor is brought to a controlled stop.
- Check commands the record to examine its input parameters/mode/etc, to determine whether
the requested operation could be performed upon receipt of a subsequent "Go" directive. The "Go"
directive performs this check automatically, so the "check" directive is infrequently used.
- Go commands the record to perform the action specified by its input parameters/mode/etc. When
in "move" mode, for instance, the "Go" directive will cause the specified motion to begin.
- Use encoder? - use this menu button to specify whether the record should use feedback from
an encoder (via the OMS VME-44 card) to verify the final position for each move.
- Debug - this menu specifies the debug level of the record (ie. the number messages printed
by the record to the vxWorks console during operation). Default is debug "none".
- Sim. - this menu specifies the simulation level of the record. For details, see documentation
for the deviceControl record.
Input parameters
The screen provides input fields for the required final position and motion velocity (called "target
position" and "target velocity"), in engineering units. Position is specified relative to the datum
position, whilst the velocity given is the maximum velocity attained (between the acceleration and
deceleration phases) during the motion.
An input field is provided also for a "named" position, labelled with the character "S". A set of recognised named
positions (usually used during indexing) are contained in the lookup table for each device (in this case,
att_device.lut). Each named position specifies an indexing algorithm, for use when the record is in "index" mode.
If the string contained in the named position field is recognised, this is used in preference to the (numeric)
position given in the input field above.
Current status information display
The screen provides displays for the current position (as derived from the motor step count or encoder reading)
and current operating mode.
The "Action state" display shows IDLE when the record is currently inactive. When given an directive, this
display will show BUSY, before returning to IDLE when the operation is complete. If any operation
fails, the record will display ERR, and print a diagnostic message in the "Error Message" output.
Index mode
A set of default indexing (datuming) procedures (called "algorithms") are provided in the deviceControl record. A user can
select one of eight algorithms, using the "Index" input field on this screen (an integer between 0 and 7 is
accepted):
- No index - this index algorithm moves the motor to the demanded position, without attempting to index (datum)
the mechanism. If the current mode is "index", the indexed flag (record field HPVL) is set. If the current
mode is "move", "track" or "park", all moves are performed in this fashion (assuming the HPVL flag has been set).
- Lower home switch - this algorithm, when the current mode is "index", instructs the OMS card to move the motor
backwards, until the home switch is seen high. The motor is then moved further until the home switch is low. The motion
velocity is reduced (to the hard-coded "index" velocity) and the motor then moves forward until the switch is seen high,
and then low again. The motor is finally returned to the location at which the home switch last underwent a transition (high
to low at the upper limit of the switch).
- Upper home switch - this algorithm is as the lower home switch algorithm above, only the motor travels forwards to
(and past) the home switch, before travelling backwards to the high to low transition at low velocity.
- Center home switch - using this algorithm, the motor travels backwards to the lower limit switch (see below), before
executing an index to an upper home switch (as above). This mode is not well tested (and, in fact, has bene removed from the
Gemini copy of the deviceControl record), so it is not recommended for normal use.
- Lower limit switch - this algorithm moves the motor a large distance in the backwards (ngeative) direction.
Eventually the stage should reach its lower limit switch, at which point the OMS card stops pulse generation to the motor
drive card, stopping the motor. The deviceControl record zeros the OMS position registers at this (datum) point.
- Upper limit switch - as above, but to the upper limit switch.
- Re-index to a limit switch - this mode is for more accurate datuming to a limit switch. If the stage is currently
in its lower limit, it is moved off the switch (forwards) and back onto it, at a low velocity. Otherwise, it is moved backwards off the limit and back onto it, at low velocity.
- Rotaty stage home switch - this algorithm is for datuming the NAOMI rotary stages, which have no limit switches
and one home switch, which is only active for a small angle. The motor is moved backwards until the home switch is seen high and then low.
The motor then searches for the low-high-low home switch transition in the forward direction, at low velocity, before returning to the
location at which the last transition occured (at normal velocity).
The screen can be used to select different index algorithms for engineering purposes. In normal operation, however, the attached
assemblyControl record sends named "index" positions to the device (the named positions are specified in the lookup table
for this device, att_device.lut). Algorithms are specified for each named position. For full details see the documentation
for the NCU calibration source assembly.
Menu items
There is one sub-menu provided from this screen. The deviceControl status screen
displays detailed information about the current state of the deviceControl record and it's associated mechanism.