Subject: making the calc record process in CS studio
From : ws275820 at ohio.edu
To: tech-talk at aps.anl.gov
Hi, I am a student working at Edwards Accelerator lab. I am trying to use the calc record. I am using the EPICS IOC (7.0) and I am interfacing with it using CS-Studio to control an Agilent technologies 34980A.
Goal: read a pressure from a vacuum gauge. The pressure is read as a voltage then I want to use the calc record to convert it to a pressure in torr.
My current code looks like this for two separate vacuum gauges "CG1" and "CG2"
#Vacume gauge measurement records using DMM card
#reads voltage output from the BRAX vacume guage controller for CG1 from port 02
record(ai, "$(P)$(R)readCG1"){
field(DESC, "convection guage one on the turbo molecular pump")
field(SCAN, "Passive")
field(DTYP, "stream")
field(INP, "@devKS_34980A_EPICS.proto getVoltageDCAuto(1001) $(PORT) $(A)")
field(PINI, "YES")
field(EGU, "Volts")
}
#reads voltage output from the BRAX vacume guage controller for CG1 from port 03
record(ai, "$(P)$(R)readCG2"){
field(DESC, "convection guage two on the roughing pump")
field(SCAN, "Passive")
field(DTYP, "stream")
field(INP, "@devKS_34980A_EPICS.proto getVoltageDCAuto(1002) $(PORT) $(A)")
field(PINI, "YES")
field(EGU, "Volts")
}
#converts the voltage from CG1 to a preshure in toor
#this record hase not been tested i asume it will run when called and it will then call the read record to atain a value to procese
record(calc, "$(P)$(R)VacumelevelCG1") {
field(DESC, "vacume level on convection guage one on the turbo molecular pump")
field(CALC, "10^(a-5)")
field(INPA, "$(P)$(R)readCG1")
field(PINI, "YES")
field(SCAN, "Passive")
field(EGU, "Torr")
}
#converts the voltage from CG2 to a preshure in toor
#this record hase not been tested i asume it will run when called and it will then call the read record to atain a value to procese
record(calc, "$(P)$(R)VacumelevelCG2") {
field(DESC, "vacume level on convection guage two roughing pump")
field(CALC, "10^(a-5)")
field(INPA, "$(P)$(R)readCG2")
field(PINI, "YES")
field(SCAN, "Passive")
field(EGU, "Torr")
}
The best way I have found to make a record process is to set an action button to execute a command in the action's menu the command i use is. caput "record name" 1
This works well for my ai records as it returns the value just like I want it to, and I can see the commands being sent to the Agilent box. However, when I try this same thing with the calc record it will not process the record. I do not see commands sent to
the Agilent box.
Assumption: When the calc record is called it will make all other records that it takes as inputs process, in order to do its calculation.
Question 1: is my assumption correct about the calc record?
Question 2: is there a better way to make a record process using an action button?
Thanks,
Wyatt
|