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  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: question about previous value of ai
From: "Steven M. Hartman" <[email protected]>
To: tech-talk <[email protected]>
Date: Wed, 09 Mar 2011 09:29:04 -0500
Ralph Lange wrote:
On 09.03.2011 08:55 Silver wrote:
   I use an ai record to retrive the value from hardware, in my SNL program, I want to compare the previous value of ai and the new value, then do some action.
   how can I get the previous of ai?

Either - in the SNL program - by assigning the current value to a local variable as part of your action.

Or - in the database - by adding another ai record that pulls the old value from your hardware-ai before processing it via FLNK. (Won't work for I/O scanned hardware ai.)

Or - in the database - by adding a compress record that is configured as a ring buffer, which can hold the arbitrary length history of an ai.

or . . .

record(ai,"MyAi") {
. . .
  field(FLNK,"MyCalc")
}
record(calc,"MyCalc") {
  field(DESC,"ai value increasing?")
  field(INPA,"MyAi")
  field(INPB,"MyCalc.LA")
  field(CALC,"A>B")
}


--
Steven Hartman
[email protected]

References:
question about previous value of ai Silver
Re: question about previous value of ai Ralph Lange

Navigate by Date:
Prev: RE: Asyn/Modbus Delay Mark Rivers
Next: Re: EDM X/Y Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: question about previous value of ai Ralph Lange
Next: Waveform string and initialization emmanuel_mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·