40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  ATF eLog  Not logged in ELOG logo
Entry  Fri Jul 30 12:22:15 2021, Radhika, DailyProgress, CDS, Connecting CTC100 to EPICS/rtcds system 
    Reply  Fri Jul 30 17:28:14 2021, Radhika, DailyProgress, CDS, Connecting CTC100 to EPICS/rtcds system 
       Reply  Fri Jul 30 18:18:21 2021, Koji, DailyProgress, CDS, Connecting CTC100 to EPICS/rtcds system 
          Reply  Mon Aug 2 17:24:20 2021, Radhika, DailyProgress, CDS, Connecting CTC100 to EPICS/rtcds system 
             Reply  Mon Aug 2 21:51:37 2021, Koji, DailyProgress, CDS, Connecting CTC100 to EPICS/rtcds system 
Message ID: 2624     Entry time: Fri Jul 30 12:22:15 2021     Reply to this: 2627
Author: Radhika 
Type: DailyProgress 
Category: CDS 
Subject: Connecting CTC100 to EPICS/rtcds system 

Currently the CTC100 temperature data for Megastat is extracted via ethernet (telnet) through a python file. The file queries the device for temperature readings every minute and stores the data to a .txt file on QIL-WS1. Our goal is to connect the CTC100 data directly to SLOW EPICS in the QIL.

It has been helpful that the other CTC100 in the QIL (henceforth called the original CTC100), which is used for temp monitoring of the small PD testing chamber, had already been integrated into EPICS. I located the relevant files (from QIL-WS2) under /opt/rtcds/caltech/c4/target/qil-nfs/CTC100/. This will now be the called parent_directory.

The CTC100 protocol was already defined at parent_directory/iocBoot/iocCTC100/protocols/ctc100.proto. I added protocol functions corresponding to the commands I would need for querying the Megastat CTC100, of the form:

read_MS_WorkPiece {
    out "WorkPiece?";
    in "%f";
    @init {
      out "WorkPiece?";
      in "%f";
    }
}

I created a function block for each of the 4 channels read by the Megastat CTC100.

Next, I located the st.cmd file: parent_directory/iocBoot/iocCTC100/st.cmd. I added the following line to configure the port to the new CTC100, copying the sytax of the original CTC100:

drvAsynSerialPortConfigure("CTCMS", "10.0.1.158:23", 0, 0, 0)

The .db file for channels corresponding to the original CTC100 is found at parent directory/db/ctc100.db. I added blocks for the new EPICS channels to write the CTC100 data into:

record(ai, C4:CTC-MS_WORKPIECE_TEMP_VAL) {
    """
    field (INP, "@ctc100.proto read_MS_WorkPiece CTCMS")
    """
}

Here, the input field indicates the path to the protocol and which function in the protocol to call; and which port to communicate with. I added a block for each of the 4 channels of the Megastat CTC100.

The next step should be to restart the EPICS service so that these channels can be created. I have not been able to locate the right service file to restart, but hopefully once I do, I should be able to call caget on one of the channels and see a real-time value.

Next, I will create a .ini file to load into the frame builder service, so that the frame builder can record the new channels into frames and save records of data. I tried to look for this .service file with the help of Aidan and Anchal, but we have not yet been able to locate it. I hope to solicit Chris' help for both this task and the one above.

 

ELOG V3.1.3-