Hints About the Stepper Motor Controller System

The Stepper Motor Control system, which controls the secondary mirror, the sidecab mirrors and the cassegrain rotation stages, lives in the sidecab rack, and receives its commands via 3 serial lines from the venerable antenna computer. It used to be necessary to command the controllers using a laptop computer in the sidecab. That should almost never be needed now.

The secondary mirror's proper position is determined from a focus curve derived from holography measurements. The proper positions for the sidecab mirrors are stored in the file canonical:sidecab_mirrors.txt . All lines in this file which begin with an exclamation point are comments. Each receiver has a single line of values, which are ENCODER values except for the receiver positions (these axies have no encoders). In most cases approximate step counts for the desired encoder positions have been included in the file for emergency use (i.e., when an encoder dies or homing fails).

If power is interrupted to the sidecab rack, the motor controllers will forget everything they know (not much, even in the best of circumstances), and will have to be re-homed (sometimes referred to as "datuming" by Ka'u residents). In almost every case, if the Stepper Motor Controller needs to be rehomed, then the antenna computer will need to be reloaded too. Even if the antenna computer does not need reloading by some miracle, you should reload it anyway. Once it has reloaded, it will detect the fact that the secondary mirror axes need to be re-homed. The antenna computer will spit messages to the console telling you what command to issue to re-home the secondary. Currently the command is TOA SMC3_HOME_SECONDARY. This command will cause the X, Y, Z and theta axes for be homed, and messages will appear on the antenna computer display telling you which axis is currently moving. How long the homing process takes is dependant on where the secondary happend to be when homing started, but if it takes longer than 15 minutes, you're probably out of luck.

The sidecab axes are on two other motor controllers. The antenna computer does not automatically check to see if these axes have been homed when it (the antenna computer) is reloaded. This is because it is often unnecessary to move the sidecabe mirrors, so they don't absolutely haved to be homed in order to observe. They *do* have to be homed if you are going to change receivers. When you try to change receivers, the antenna computer will then check that the controllers have been homed. If they have not, the antenna computer will tell you that, and it will tell you the proper commands to issue in order to home the controllers. Currently these commands are TOA SMC2_HOME_SIDECAB and SMC1_HOME_SIDECAB. Note that these commands should be issued in that order (#2 before #1), because the receiver focus motions are on controller 2, and the receivers must be moved out of the way in order to safely move the 5th mirror on its rotation axis. If you want to home the sidecab mirrors without using the LO command, you will need to issue a couple of extra commands. The complete set of commands required in this case is TOA SMC2_INIT, TOA SMC2_HOME_SIDECAB, TOA SMC1_INIT and TOA SMC1_HOME_SIDECAB. The SMCx_INIT commands are not required if you issue the LO command to trigger a receiver change. Issuing redundant SMCx_INIT commands does no harm, but redundant SMCx_HOME_SIDECAB commands will eventually cause grief.

To communicate directly with the motor controllers, one may use the SMCx commands in the UIP. For example, to get the status infromation on motor controller 1, issue the command SMC1 TS. If the 1st stepper motor controller is in its nominal, homed state, then axes 1 through 4 should report either 74 or 90, and axis 5 should report 10. If you want the status of controller 2, issue the command SMC2 TS. All axes for controller 2 should report either 74 or 90.