40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  40m Log  Not logged in ELOG logo
Entry  Fri Dec 8 23:31:31 2017, johannes, Frogs, ASS, c1ass slow channel offloading scripts with small  
    Reply  Wed Dec 13 09:49:23 2017, johannes, Update, ASS, wiring diagram 1Y9.pdf
       Reply  Thu Dec 14 00:32:56 2017, johannes, Update, ASS, Acromag new crate; c1auxex2 configured as gateway server for acromag fp_mod_4U.pdfIMG_20171213_171541850_HDR.jpg
          Reply  Thu Dec 14 23:27:46 2017, johannes, Update, DAQ, aux chassis design auxdaq_40m_4U_front.pdfauxdaq_40m_4U_rear.pdfauxdaq_40m_4U_DSub37x2.pdfauxdaq_40m_4U_IDC50.pdf
             Reply  Tue Jan 9 00:07:03 2018, johannes, Update, DAQ, etmx slow daq chassis 
                Reply  Wed Jan 10 22:24:28 2018, johannes, Update, DAQ, etmx slow daq chassis 
                   Reply  Thu Jan 11 09:57:17 2018, Steve, Update, DAQ, acromag at ETMX Acromg_in_action.png
                   Reply  Thu Jan 11 20:59:41 2018, gautam, Update, DAQ, etmx slow daq chassis 
                      Reply  Wed Jan 17 14:32:51 2018, gautam, Update, DAQ, Acromag checks OSEMPDmon_Acro.png
                         Reply  Wed Jan 17 22:44:14 2018, johannes, Update, DAQ, Acromag checks 
                            Reply  Sun Jan 21 13:11:25 2018, johannes, Update, DAQ, Acromag checks 
                   Reply  Fri Jan 12 10:02:05 2018, johannes, Update, DAQ, etmx slow daq chassis 
                      Reply  Fri Jan 12 19:15:34 2018, johannes, Update, DAQ, etmx slow daq chassis 
                         Reply  Wed Jan 24 18:12:31 2018, johannes, Update, DAQ, ETMX auxiliary DAQ work IMG_20180124_120202019.jpgIMG_20180124_120123064.jpgIMG_20180124_120219278.jpgIMG_20180124_120059765.jpg
                            Reply  Wed Jan 24 19:17:06 2018, johannes, Update, DAQ, c1auxex2 startup behavior 
                               Reply  Wed Jan 24 23:13:30 2018, johannes, Update, DAQ, c1auxex2 startup behavior 
    Reply  Thu Dec 14 19:33:20 2017, gautam, Frogs, ASS, c1ass slow channel offloading scripts with small  
Message ID: 13578     Entry time: Wed Jan 24 19:17:06 2018     In reply to: 13576     Reply to this: 13580
Author: johannes 
Type: Update 
Category: DAQ 
Subject: c1auxex2 startup behavior 

I compiled the burt binaries on c1auxex2 which took a little fiddling with dependencies and paths but nothing too major. The complete local epics folder (/opt/epics/) which contains the base epics binaries, modbus and burt for 32-bit linux has been copied to the shared drive at /opt/rtapps/epics-3.15.5. They belong to the most recent stable release. This was so we can now automatically call burt after the IOC initialization on c1auxex2 to restore the backed-up channel values.

I also copied the database definition and modbus instruction files to /cvs/cds/caltech/target/c1auxex2, from where they are now being read upon IOC initialization. This is an excerpt of the service file:

#ExecStart=/usr/bin/procServ -f -L /home/controls/modbusIOC/modbusIOC.log -p /run/modbusioc.pid 8008 /opt/epics/modules/modbus/bin/linux-x86/modbusApp /cvs/cds/caltech/target/c1auxex2/ETMXaux2.cmd   <-- Contains logging to file, see note 1)
ExecStart=/usr/bin/procServ -f -p /run/modbusioc.pid 8008 /opt/epics/modules/modbus/bin/linux-x86/modbusApp /cvs/cds/caltech/target/c1auxex2/ETMXaux2.cmd <-- Initializes the EPICS IOC with Modbus support
ExecStop=/bin/kill -9 ` cat /run/modbusioc.pid` <-- Kills the detached process by its process ID
ExecStartPost=/bin/bash -c "/opt/epics/extensions/bin/linux-x86/burtwb -f /opt/rtcds/caltech/c1/burt/autoburt/latest/c1auxex.snap" <-- Restores general channel values
ExecStartPost=/bin/bash -c "/opt/epics/extensions/bin/linux-x86/burtwb -f /opt/rtcds/caltech/c1/medm/MISC/ifoalign/burt/ETMX.snap" <-- Restores PIT and YAW values from align MEDM screen
ExecStartPost=/bin/bash -c ". /home/controls/modbusIOC/ETMXaux2.sh" <-- Enables writing to PIT and YAW DAC channels, see note 2)

Note 1) I removed the logging to file for now because I noticed that if there are Acromag communication issues the logfile tends to grow in size VERY fast. In the cryo lab is had gotten to over 70GB just over the winter break. I don't think it's absolutely necessary to have it, and if diagnostics are needed we can easily uncomment it temporarily.

Note 2) I modified the static EPICS records of the four OSEM bias adjust channels so they won't start updating as soon as the IOC starts up (and before the channel defaults are restored by burt). This was done by setting the OMSL (output mode select) field from "closed_loop" to "supervisory". Sample record:

record(ao,"C1:SUS-ETMX_ULBiasAdj")
{
        field(DESC,"Bias Adjust for ETMX UL Coil Output")
        field(DTYP,"asynInt32")
        field(OUT, "@asynMask(C1AUXEX_XT1541A_DAC, 0, -16)MODBUS_DATA")
        field(SCAN,".1 second")
        field(OMSL,"supervisory")  <-- Used to be "closed_loop"
        field(DOL, "C1:SUS-ETMX_ULBiasSet  PP")
        field(PREC,"3")
        field(EGUF,"10.923")
        field(EGUL,"-10.923")
        field(EGU, "Volts")
        field(LINR,"LINEAR")
        field(DRVH,"10")
        field(DRVL,"-10")
        field(HOPR,"10")
        field(LOPR,"-10")
}

Now, on reboort/IOC re-initialization the physical DAC channels are performing a one-time readback of the last stored value in the Acromag's register, then idle until the last StartPost statement executes the script ETMXaux.sh, which changes their OMSL field back to "closed_loop". This causes them to start updating their output from the calc records defined in their DOL field (which have by then recovered their default values curtesy of burt). The result is a smooth transition from idling to the controlled state with no sudden or large offset changes. yes

ELOG V3.1.3-