Setting M3 Mirror Actuator Home Offsets

In Summer-2017 new limit switches were installed on the SX M3 mirror actuators. Below is a description of how to set up the new home offsets in the OSS after the hardware change.

Mike Gardiner adjusts the limit switches so there is about +/- 4 mm travel, centered around the actuator center of travel. This is purely mechanical.

Next measure the distance in motor counts (D) between the positive and negative limits for all actuators. Mike Gusick does this by direct jogging of each axis with his laptop running PEWIN (it could be done with the OSSGUI, but you have to know the special UMAC commands). Note that the UMAC soft limits must be disabled here. Power cycling the controller clears the soft limits, and so do 'Init' and "De-Init' on the OSSGUI. The OSSGUI can be used to see when each leg is in the limit, and to see the position in motor counts.

Now use the OSSGUI to 'Init' the controller, and then 'Home' the mirror. This will home it using the current values of the home offsets in the OSS. When the home is complete the positions will be zero.

Homing enables the soft limits, so disable them by clicking either the 'Init' or 'De-Init' buttons on the OSSGUI. Then Mike Gusick jogs each axis from the home position into the positive limit. You can get the position from the OSSGUI in motor counts. Call this value P in motor counts.

We need to make sure the encoder index mark will always be on the same side of the positive limit position during the home sequence. To be safe we want the index mark to be between 2048 and 6144 counts away from the positive limit (one encoder rotation is 8192 counts).

In the calculations below note that D, P, and I are positive, and HOold and HO are negative.

The home offsets are in oss/Tertiary.cpp and are called


They have units of motor counts * 16. The distance from the index mark to the positive limit is

I = P + HOold/16

If I is not OK, Mike Gardiner must adjust the limit switch mechanism, and then we repeat the above measurements.

Once the index mark is OK, the new home offset is

HO = (I - D/2) * 16

The final step is to set new soft limits in the UMAC firmware. For the SX M3 unit, the soft positive limit values are in I713, I813, and I913, and the soft negative limit values are in I714, I814, and I914. These are set in PLC 6. For convenience we like the soft limits for the actuators to be the same. The limits should be changed in an OSS working copy(oss/etc/terc/umac_m3s_config_SX_source.CFG), and then the file downloaded into the controller and tested.

Before downloading new firmware, be sure the OSS is not connected to the controller. Either stop the OSS, or disable communication on the appropriate Tertiary window. The download is done with a script: oss/etc/terc/SXterc

cd oss/etc/terc
source SXterc

When everything is OK, put the new home offsets into the OSS, and test that both the hard limits are symmetric, and that the soft limits are set correctly. If the travel range has changed, measure the time for a move from max tip to min tip (this takes the longest). If needed change the timeout value oss.terc.tiptilt.timeout in oss/etc/oss.conf. Finally patch the OSS on the mountain.

For the DX M3 unit, the old home offsets are also in oss/Tertiary.cpp and are called


The soft positive limit values are in I113, I213, and I313, and the soft negative limit values are in I114, I214, and I314. These are set in PLC 12 in file oss/etc/terc/umac_m3s_config_DX_source.CFG

The download script to use is oss/etc/terc/DXterc
Topic revision: r6 - 25 Aug 2017, ChrisBiddick
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback