EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025 
<== Date ==> <== Thread ==>

Subject: making the calc record process in CS studio
From: "Saunders, Wyatt via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 9 Oct 2024 14:00:00 +0000
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

Replies:
Re: making the calc record process in CS studio Michael Davidsaver via Tech-talk

Navigate by Date:
Prev: Re: Avantes AvaSpec Support John Dobbins via Tech-talk
Next: Re: making the calc record process in CS studio Michael Davidsaver via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025 
Navigate by Thread:
Prev: Re: Avantes AvaSpec Support John Dobbins via Tech-talk
Next: Re: making the calc record process in CS studio Michael Davidsaver via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025 
ANJ, 09 Oct 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·