After M3 is disassembled for mirror coating and actuator profiling, mirrors tip tilt accuators have to be adjusted.
This consist of the following steps:
Establishing a connection from the SWG group laptop to UMAC running the OSS
The Dell laptop has Windows installed, with Virtual Box image of Centos. User to Windows is swg (no password), Centos 7 username is tcs, password written on the laptop. After starting Centos (and extending the Centos screen), click on OSS icon to launch OSS GUI. Click on M3 to access M3. Configuration for OSS is specified in tcs/oss/etc/oss.conf directory, contains tertiary IP address on the following line:
oss.terc.ip map<int,string> 0:192.168.18.16 1:192.168.18.17 # ip address of the M3 UMAC.
The laptop must be connected by an ethernet cable with the tertiary UMAC box.
The connection can be verified by pinging IP from the laptop terminal.
Calculating new home offset
A new home offset must be calculated. Engineering knows the procedure (includes driving encoders to limits, obtaining free of travel range, and dividing this range by 2 to get the home position in the middle of the range). After those offsets are calculated, 3 numbers corresponding to 3 legs will be provided.
Writing new home position to the OSS source code
The home offsets are recorded (hardcoded) in (tcs)/oss/TertiaryMirror.cpp file, about lines 150:
150 // make class variables 1-Sep-16
151 // measured in lab 2-Sep-16
152 leftSelHomeOffset = "-325520";
153 // measured in lab 14-Aug-17
154 leftLeg1HomeOffset = "-428160";
155 leftLeg2HomeOffset = "-478784";
156 leftLeg3HomeOffset = "-492816";
158 // measured in lab 25-Aug-15
159 rightSelHomeOffset = "-436540";
160 // measured in lab 20-Aug-15
161 rightLeg1HomeOffset = "-265160";
162 rightLeg2HomeOffset = "-376048";
163 rightLeg3HomeOffset = "-292320";
After changing the limits (on aproprite side), compile and restart OSS by typing:
netconfig stop OSS
netconfig start OSS
Updating M3 software limits
UMAC firmware has to be updated to reflect newly calculated software limits on actuator travel. Those are stored in (tcs)/oss/etc/terc/umac_m3s_config_[SIDE]_source.CFG. The file must be edited, lines with assignment to software limits registers identified, and updated:
1001 END IF
After the I values are updated (only those, the code contains seconds assignments of 0 - leave those alone, those are to disable software limits during accuators initialization), load new firmware by typing:
Where [SIDE] should be replaced with SX
Verifying values, versioning
After you changed the values, verify that new numbers are in effect. Commit changed files (both oss/TertiaryMirror.cpp and UMAC firmware) into git current branch (as this is one time small change, directly pushing them will work - no branch needed; please keep in mind only TCS admin has direct write access, so create branch and pull request or send git diff to TCS admins if you aren't in the group