Displaying report 1-1 of 1.
Reports until 14:15, Tuesday 23 September 2014
X1 SUS (CDS)
jeffrey.kissel@LIGO.ORG - posted 14:15, Tuesday 23 September 2014 (14097)
Damping Loop Functionality Restored on X1SUSQUAD, new safe.snap captured
J. Kissel, J. Bartlett, J. Batch

Bartlett reported that the damping loops were non-functional on his newest QUAD, using the now ancient infrastructure on bscteststand2, the front end which runs the x1susquad model. After a cursory check of COILOUT gains, EUL2OSEM and OSEM2EUL matrices, reminding ourselves that that test stand still uses old versions of the AA and AI chassis which invert the sign of the signals, confirming that these are compensated for in the OSEMINF and COILOUTF banks, and confirming that calibration filters are not needed, I found they were still non-functional. So, I tried the classic "I don't know what's happening" debug move and inverted the sign on the DAMP filter gains. With the sign flip, the damping loops are now stable. 

In order to capture these EPICs records so we don't have to go through this process again, Jeff suggested I show him how to take a safe.snap. I said "sure!" hoping that I can just use
/opt/rtcds/userapps/release/cds/common/scripts/makeSafeBackup
That didn't work (for reasons you'll find out later), so I just went for the core bit of code run in every burt capture,
burtrb -f /opt/rtcds/${site}/${ifo}/target/${ifo}sus${optic}/${ifo}sus${optic}epics/burt/autoBurt.req > ${snapFileName}
however, I thought for a second, "wait ... this is ancient RCG we're dealing with ... where is it looking to find the safe.snap?"
Turns out, this test stand's RCG version is so old, the start script was still looking at files in the /tmp/ directory, which we know gets blown away upon computer reboot. Bad news.

So, I dug into the 
/opt/rtcds/tst/x1/scripts/startx1susquad
start up script, found the line that calls burtwb to burt restore the "safe.snap" file, and replaced the line
fname='ls -t /tmp/x1susquad_burt_*.snap  2>/dev/null | head -1'
with 
fname='ls -t /opt/rtcds/${site}/${ifo}/target/${ifo}susquad/${ifo}susquadepics/burt/safe.snap  2>/dev/null | head -1'
which is where the current RCG startup script look. Indeed, most, if not all of these files in the target directory are soft-links to their respective location in the version controlled userapps repo:
/opt/rtcds/userapps/release/sus/${ifo}/burtfiles/${ifo}sus${optic}_safe.snap
I confirmed that this soft link does exist on the front end, so now the 
/opt/rtcds/tst/x1/scripts/startx1susquad
uses the 
/opt/rtcds/${site}/${ifo}/target/${ifo}susquad/${ifo}susquadepics/burt/safe.snap
to burt restore upon startup, which is a soft link to 
/opt/rtcds/userapps/release/sus/x1/burtfiles/x1susquad_safe.snap
NOTE: If this model ever gets recompiled with the same RCG version, this startup script will be over-written with the old badness. As such, I've copied both the old and new versions of the startup script to
/opt/rtcds/tst/x1/scripts/startx1susquad_looksattmpforsafe        #bad old RCG auto-genetared version
/opt/rtcds/tst/x1/scripts/startx1susquad_looksatuserappsforsafe   #good new version
Hopefully the filenames themselves are self-explanatory.

Finally, I had to get back to my original problem, and make sure that the userapps copy of the safe.snap file was up-to-date. Turns out
/opt/rtcds/userapps/release/cds/common/scripts/makeSafeBackup
was failing because the environment variable ${USERAPP_DIR} was not defined on the suswork1 work station. #facepalm
So I created the environment variable on both the work station (suswork1) and the front end (bscteststand2),
export USERAPPS_DIR=/opt/rtcds/userapps/release
and checked that it worked,
controls@bscteststand2 /opt/rtcds/tst/x1/scripts $ echo ${USERAPPS_DIR}
/opt/rtcds/userapps/release
controls@suswork1:/opt/rtcds/tst/x1$ echo ${USERAPPS_DIR}
/opt/rtcds/userapps/release

Good great. Now save the dang backup.
controls@suswork1:$ /opt/rtcds/userapps/release/cds/common/scripts/makeSafeBackup sus x1susquad
controls@suswork1:$ cd controls@suswork1:/opt/rtcds/userapps/release/sus/x1/burtfiles
controls@suswork1:$ svn commit -m "Saved with functional damping loop settings for latest testing." x1susquad_safe.snap
controls@suswork1:$
Displaying report 1-1 of 1.