Jenne, Jim W, Dave:
In order to run the a2l_min_LHO.py script from an MEDM shell launcher, I had to explicitly define full paths for all files used. Jenne created a testWrite.py which I used to test this out.
The MEDM command block in the A2L_screen.adl file (callable from SITEMAP via the SUS pulldown) is
command[0] {
label="A2L Script"
name="xterm"
args="-hold -e 'cd /opt/rtcds/userapps/trunk/isc/common/scripts/decoup; /usr/bin/python /opt/rtcds/userapps/trunk/isc/common/scripts/decoup/a2l_min_LHO.py'"
}
This is used on the A2L screen that Jim made, accessible from the SUS tab on the sitemap. You can now run the A2L script by just clicking the button on the screen.
The first 3 times that this was used / tested, the A2L ran successfully and wrote the appropriate EPICS values, but the text files that summarize the results (so we don't have to trend for the data) didn't get written when the script was run from medm. Dave's work was to fix this.
I plan to trend the data and hand-create the summary files for the three times they didn't get written, so that it's easier to run the beam position calculation script without losing these data points: