The gmech actor is an interface to the NA2 guide camera mechanical controller, which sets the filter number and focus position of the NA2 off-axis guider.
Gmech actor is based on TclActor. As such it has TclActor's standard commands and standard keywords. There are additional gmech-specific commands and keywords which are described in this manual.
Note: one may command piston or focus and these are related by by a constant offset: piston = focus + focusOffset. The idea is that each instrument at NA2 has its own focus offset, such that when gmech focus = 0 the instrument is in focus if the guide camera is in focus.
In addition to the standard commands from TclActor, gmech supports the following commands (none of which are case-sensitive):
Set the specified filter. Filters numbers are integers, starting at 0.
Set the desired focus, in μm.
Piston = focus + focusOffset
Set the desired focus offset, in μm, where:
The piston is changed to preserve the current desired focus (unless the desired focus is unknown). Thus:
New focus = current focus New piston = current piston + (new focusOffset - current focusOffset)
Stop all motion and initializes the controller. This is the only command that can interrupt the remap command.
Note: the init command does not connect disconnected devices; use the connDev for that purpose.
Display parameters such as filter names and motion limits for the actuators. Note: the information is only displayed to the user requesting it.
Set the piston of the guider to the specified value in μm.
Read filter names from the file $HOME/config/gmech.filters. The file format as follows:
If the filter names file cannot be found or contains unusable data then an error is reported and the old filter names are retained.
Offset the piston, and thus the focus, of the guider by the specified value in μm.
New piston/focus = current piston/focus + relPiston.
Note that there is no separate "relFocus" command because this command does the job.
Remap the actuators. This commands takes a long time to finish, but if necesary you can interrupt it using the init command.
Display the state of the piston and filter actuators. The output is described in the Keywords section. If doQuery is specified and is one of no, f, false, 0 or none then the hardware controller is not queried and the reported status is based on the last values read from the controller.
Note: if doQuery is false then the actuator status is only shown to the one user requesting it. This is because such status is considered somewhat less accurate than if it is freshly queried from the hardware controller.
Keyword data is output whenever the state of the gmech actor or underlying hardware and hardware controller changes. In addition to the standard keywords from TclActor, gmech supports a number of gmech-specific keywords described here.
Notes:
Indicates that ActuatorStatus is bad (one or more bad bits are set). The bad bits are 0-3: limit switches and software position limits.
Position of the of the actuator.
Position error for the actuator (only reported if not moving).
Elapsed time (sec) and predicted total time (sec) for the current move. This keyword is only reported if the actuator is moving.
Actuator status word. The bits are as follows:
Desired (commanded) position of actuator.
Desired (commanded) focus.
The name of each filter, in increasing numerical order. Each name is "" if the filter position is blank and "?" if the filter is unknown. The name may contain spaces or other special characters.
Current focus.
Focus offset.
State of connection to the gmech hardware controller. State is one of Connecting, Authorizing, Connected, Disconnecting, Failing, Disconnected or Failed (the states of an RO.Comm.TCPConnection object). Reason is the reason it got to this state ("" if no reason given).
Maximum position of the of the actuator that may be commanded (inclusive).
Minimum position of the of the actuator that may be commanded (inclusive).
The first beta release.