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: RE: making the calc record process in CS studio
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: Michael Davidsaver <mdavidsaver at gmail.com>, "Saunders, Wyatt" <ws275820 at ohio.edu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 9 Oct 2024 18:14:19 +0000

Hi Wyatt,

 

I agree with what Michael said.  In general you should not be using the OPI to processes records.  But there are times when it is OK, if it is rarely used or used for debugging.

 

Here is a little more explanation of what is happening in your case.

 

  • 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.

 

When you do “caput record_name 1” that is equivalent to “caput record_name.VAL 1”, i.e. you are writing to the .VAL field.  That is really not what you should be writing to in order to process an ai or calc record.  You should be doing “caput record_name.PROC 1”.  That will force the record to process.

 

  • 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.

 

That depends on whether the calc record input links have the PP or NPP attribute.  PP means that the records will process when the CALC record processes, NPP means that they will not process.

 

Mark

 

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Michael Davidsaver via Tech-talk
Sent: Wednesday, October 9, 2024 9:34 AM
To: Saunders, Wyatt <ws275820 at ohio.edu>
Cc: tech-talk at aps.anl.gov
Subject: Re: making the calc record process in CS studio

 

On 10/9/24 07:00, Saunders, Wyatt via Tech-talk wrote:

...

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?

 

No.  I would suggest reading the sections on the SCAN fields, which is how you would arrange to periodically process one record.  And the FLNK field, which is one way to sequence processing of multiple records.

 

https://docs.epics-controls.org/en/latest/process-database/EPICS_Process_Database_Concepts.html#periodic-scanning

 

https://docs.epics-controls.org/en/latest/process-database/EPICS_Process_Database_Concepts.html#forward-links

 

Question 2: is there a better way to make a record process using an action button?

 

When thinking about this, consider that EPICS is a distributed system.  The normal situation will have multiple clients accessing the same records.  Think what happens if all of these users are clicking their action buttons?


References:
making the calc record process in CS studio Saunders, Wyatt via Tech-talk
Re: making the calc record process in CS studio Michael Davidsaver via Tech-talk

Navigate by Date:
Prev: Re: making the calc record process in CS studio Michael Davidsaver via Tech-talk
Next: Video Matrix Switcher Mrinal Bera 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: making the calc record process in CS studio Michael Davidsaver via Tech-talk
Next: Video Matrix Switcher Mrinal Bera 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 ·