Hi Simon,
On 01/30/2018 10:20 AM, Simon Reiter wrote:
> Up to now, my event record has an INP field, which links to a calc record.
> This calc record only provides the correct value under some conditions.
> How can I do this without using a state machine?
>
> record(calc,"$(BOARDNAME):ErrorFlags:calc")
> {
> field(INPA, "$(BOARDNAME):InitDone:S CPP")
> field(CALC, "A ? 2 : 0")
> }
>
> record(event, "$(BOARDNAME):ErrorFlags:trg")
> {
> field(INP, "$(BOARDNAME):ErrorFlags:calc CPP")
> }
>
> This is my current code. The value of event is now 2.000000 in the
> correct case.
For conditional processing of your event record I would recommend using
the SDIS input link and DISV field which all records have, something
like this:
record(event, "$(BOARDNAME):ErrorFlags:trg") {
field(VAL, "2")
field(SDIS, "$(BOARDNAME):InitDone:S CPP")
field(DISV, 0)
}
This keeps the event name/number associated with the record rather than
having to go looking at the calc record to work out which event(s) it
might trigger, and it only needs the one record.
See
https://wiki-ext.aps.anl.gov/epics/index.php/RRM_3-14_dbCommon#Scan_Fields
for a description of the scan disable mechanism.
You might have to adjust the value of the DISV field depending on what
your $(BOARDNAME):InitDone:S record actually returns.
HTH,
- Andrew
--
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon
- Replies:
- Re: Scanning on event number fails with EPICS 3.16 Simon Reiter
- References:
- Scanning on event number fails with EPICS 3.16 Simon Reiter
- Re: Scanning on event number fails with EPICS 3.16 Benjamin Franksen
- Re: Scanning on event number fails with EPICS 3.16 Simon Reiter
- Navigate by Date:
- Prev:
Re: pvPut error message by Sequencer Andrew Johnson
- Next:
Re: Scanning on event number fails with EPICS 3.16 Simon Reiter
- 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
2024
- Navigate by Thread:
- Prev:
Re: Scanning on event number fails with EPICS 3.16 Michael Davidsaver
- Next:
Re: Scanning on event number fails with EPICS 3.16 Simon Reiter
- 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
2024
|