}

Mirror Controller Actor

Overview

The mirrorCtrl mirror controller actor controls one telescope mirror. It accepts desired orientation and commands mirror motion accordingly.

Information on directly commanding mirrors from the TCC can be found here

mirrorCtrl is written in pure python. It is presently designed to command a Galil mirror controller, but one may add support for other low-level motion controllers.

mirrorCtrl is written pure Python. Source code documentation is available, generated by Doxygen.

Commands

connDev

Connect the mirror controller to the galil. This command will be necessary after talk2boxes is used.

disconnDev

Disconnect the mirror controller from the galil.

exit

Disconnect yourself from the mirror controller.

galil Galil Command

Send an arbitrary Galil command to the Galil mirror controller. The command may include spaces and punctuation, as needed. The command need not be surrounded by double quotes, but if you do provide them, they will be ignored.

Example Galil commands:

  • galil A=1; B=1; C=1; XQ#HOME (though the command home is easier and safer)
  • galil MG MARGA will print the value of variable MARGA (though the command showparams is easier)

Note: this command attempts to be clever about making sure it sees a terminating OK from the Galil. If your command includes an XQ#... command, or if your command ends with MG "OK" then it passes the command along "as is"; otherwise it appends ; MG "OK" to your command.

home actuatorList

Home the desired actuators, where actuator list is a comma-separated list of actuator letters A through F (but some mirrors have fewer than 6 actuators).

  • 2.5m M1 valid actuators: A-F
  • 2.5m M2 valid actuators: A-E
  • 3.5m M2 valid actuators: A-E
  • 3.5m M3 valid actuators: A-C

Warning: this command typically takes a very long time and typically shoul be performed with the telescope at a specific altitude.

move [piston [,tiltX [,tiltY [,transX [,transY]]]]]

Move the mirror to the desired orientation. Units are um for lengths and arcseconds for angles. Arguments may only appear in the exact order listed above. If fewer than 5 axes are specified, the remaining non-specified axes are assumed to be zero. At least 1 axis (piston) must be specified for a valid command.

You may not command orientation for constrained axes (e.g. rotation about Z). Most mirrors have 5 degrees of freedom, but a few only have 3.

In detail, moves are performed as follows:

  • Compute the orientation for constrained axes, resulting in a full 6 axis desired orientation.
  • Compute desired encoder lengths (for axes without encoders, this is the commanded mount position).
  • Compute predicted actuator.
  • Repeat the following until the number of iterations exceeds some maximum or the encoder error is sufficiently small:
    • Move the actuators.
    • Read the encoders and compute encoder error (actual - desired encoder length).
    • Use the encoder error to compute an actuator length correction.

offset [piston [,tiltX [,tiltY [,transX [,transY]]]]]

Offset the mirror orientation by the desired amount. Units are um for lengths and arcseconds for angles. Arguments may only appear in the exact order listed above. If fewer than 5 axes are specified, the remaining non-specified axes are assumed to be zero. At least 1 axis (piston) must be specified for a valid command.

See move for more information.

showparams

Query the Galil for parameters. See Galil Documentation for more info.

init (or stop, a deprecated alias)

Reconnect the Galil, if disconnected, stop motion and any executing commands, and return status.

status

Query the Galil for status.

Updating the keyword manual

The keyword manual doc/messageKeywords.html is auto-generated from the mirror.py file in the actorkeys package. To generate a new copy:

  • $ setup mirrorCtrl
  • $ cd $MIRRORCTRL_DIR
  • $ACTORKEYS_DIR/doc/describe.py --actor mirror --tohtml messageKeywords.html

The default title and header are simply "mirror"; I recommend manually changing those two instances to "mirror controller keywords".

Installation Instructions

The following packages are required:

The following packages are optional:

  • eups (from LSST): mirrorCtrl may be managed using eups
  • sconsUtils (from LSST): mirrorCtrl is pure python, so it need not be built or installed, but if you build it with scons then documentation is built and unit tests are run.

The simplest way to build this package is:

  • Install the minimal LSST software stack, which includes eups and sconsUtils.
  • Install twistedActor
  • Use "eups declare -r ." to declare this package
  • Use "scons" to build it
  • Use "eups declare -r . mirrorCtrl git --current" to declare it or "scons install" to install it (either is fine).

Log Files

Log files for the 3.5m mirror controller actors are kept on hub35m in the directory /home/tron/logs/tcc35m/.