Reports until 13:27, Wednesday 17 September 2014
H1 SUS (CDS, SYS)
jeffrey.kissel@LIGO.ORG - posted 13:27, Wednesday 17 September 2014 (13958)
New HSTS Front-end Model Library Part, H1SUSPRM modified to use it, M3 Compensation Filters Changed
J. Kissel, A. Staley

After the L1200226 Modified TACQ Driver LHO aLOG 13956 on the M3 stage of H1 SUS PRM was installed (as a start of the proposal outlined in G1401125), I was quickly reminded that one needs to change the COILOUTF compensation filters *and* the BIO/switching logic in the front end code in order to support the new driver. Thankfully, since we already have the materials we need from when we increased the M2 stages (see E1200931), the process was pretty darn quick. The repercussion is that we now have *another* HSTS library part, called "RC_MASTER.mdl," with the changes outlined in LLO aLOG 4237, except done for M3, and PRM is currently using this new library part. 

Compensation filters have been updated, and the switchable logic follows the expected behavior. All models, new library parts, and filter files have been committed to the userapps repo.


Detailed log of activity. (Start at Step 2 for future HSTS installations that have both M2 and M3 modified).
(1) Created new HSTS library part called "RC_MASTER.mdl" (RC is for "Recycling Cavity") 
    - cd /opt/rtcds/userapps/release/sus/common/models/
    - cp MC_MASTER.mdl RC_MASTER.mdl
    - open new library part in matlab
    - Copy the TACQ_M2_BIO_MASTER" L1200226 modified coil driver logic block from M2 to M3 in the first level's "BIO" block, and rename to "M3". The only difference between these two blocks is the function call to CD_STATE_MACHINE, where it calls the inner function "TACQ_M2" instead of "TACQ," which you can only see if you right-click "Properties..." and look at the description line.
    - At the top level, change the name of the block from "MC_MASTER" to "RC_MASTER"
    - Right-click, "Properties..." > change Description from MC MASTER to RC MASTER
    - Save
    - svn add
    - svn commit -m "New library part to support an HSTS with both lower stage coil drivers modified as per L1200226." RC_MASTER.mdl
    - svn propset svn:keywords 'Id' RC_MASTER.mdl
    - svn commit -m "Set Id property." RC_MASTER.mdl
    - svn propset svn:keywords 'HeadURL' RC_MASTER.mdl
    - svn commit -m "Set HeadURL property." RC_MASTER.mdl
(2) Switch h1susprm model to use RC_MASTER.mdl library part
    - open h1susprm.mdl in matlab
    - delete main library block (was an MC_MASTER.mdl)
    - copy in RC_MASTER.mdl from library part
    - reconnect all top-level connections (there's no new inputs or outputs, so all connections should be identical)
    - Change name of block from "RC_MASTER" to "PRM"
    - Save
    - svn commit -m "Switched main library part to use RC_MASTER.mdl to support installation of modified TACQ drivers, now on M2 and M3." /opt/rtcds/userapps/release/sus/h1/models/h1susprm.mdl
(3) Capture, Recompile, Reinstall, Restart, and Restore
    - open PRM guardian
    - Note in what state PRM is currently (MANAGED to be MISALIGNED)
    - Change PRM Guardian mode to EXEC (normally in MANAGED)
    - Change state request to SAFE, wait for it to finish
    - cd /opt/rtcds/userapps/release/sus/h1/burtfiles/
    - makeSafeBackup sus h1susprm
    - svn commit -m "Captured latest EPICs values, just in case." h1susprm_safe.snap
    - ssh controls@h1build
    - cdsCode (same as cd /opt/rtcds/lho/h1/release/)
    - make h1susprm
    - make install-h1susprm
    - open prm's GDS_TP screen, keep your hand on the "BURT" button 
    - ssh controls@h1sush2a
    - starth1susprm
    - hit BURT button, once EPICs values start to return
    - Go back to Guardian, change state request back to "MISALIGNED"
    - Change Guardian state back to MANAGED
(4) Change M3 compensation filters to match the frequency response of the modified TACQ driver
    - cd /opt/rtcds/userapps/release/sus/h1/filterfiles/
    - open foton, navigate to H1SUSPRM.txt
    - Uncheck "read only" from "File..." toolbar menu
    - Navigate to one of the M2 coil compensation filter banks, e.g. PRM_M2_COILOUTF_LL, switch to "multiple" filter mode
    - copy all four filter banks, FM1, FM2, FM6, FM7
    - Navigate to each of the M3 coil compensation filter banks, i.e. PRM_M3_COILOUTF_[UL, LL, UR, LR] 
        - Paste FM1, FM2, FM6, FM7
        - Change the ends of the name from "M2" to "M3"
        - Select FM3 and FM8, and cut them to clear them
    - Once complete, Save
    - Go to GDS_TP screen, and load coefficients
    - Confirm properly loaded by going to M3 COILOUTF screen, right click, "Execute > Foton (Pick Filter PV)"
    - Compare with M2, to be sure they're the same
    - svn commit -m "Changed M3 coil driver compensation filters to account for new L1200226 modified driver." 
(5) Confirm compensation filter switching logic works as expected
    - Open Binary IO control screen, switch between states 1 through 4, make sure it matches the behavior of T1100507.