Subject: |
Strange behavior of async calcout with CPP input link |
From: |
Benjamin Franksen via Core-talk <[email protected]> |
To: |
EPICS Core-Talk <[email protected]> |
Date: |
Mon, 26 Aug 2019 18:46:23 +0200 |
I am using base-3.15.6. This is a part of a larger database, running on
a soft IOC on Linux:
record(calc,"DEV1:st") {
# the field details are irrelevant here,
# just note this is a simple soft record
# that gets processed via CPP input links
field(INPA,"DEV1:stZ CPP")
field(INPB,"DEV1:stS CPP")
field(CALC,"A<<4|B&0xf")
}
record(calcout,"DEV1:trgOn") {
field(INPA,"DEV1:sel")
# trigger processing on change of readback
field(INPB,"DEV1:st CPP")
field(CALC,"A==B")
field(DOPT,"Transition to non-zero")
field(DTYP,"Async Soft Channel")
field(OUT,"DEV2:switch CA")
}
The values involved are all integers.
DEV1:sel is the setpoint, DEV1:st is the (soft) readback, which gets
triggered by writing DEV1.sel via a chain of FLNKs, OUT PP links and CPP
input links. The idea is to write a "1" to the DEV2:switch (which is a
different device controlled by another IOC) when the readback has
settled to the same value as the setpoint. The device DEV1 is complex
and requires various separate commands to effect the change, and the
readback can go through 2 or 3 different values before finally
coinciding with the setpoint.
When I set DEV1:sel (using caput) to different values, I can sometimes
get into a situation where the database has the following (persistent)
state:
DEV1:sel.VAL=0
DEV1:st.VAL=0
DEV1:trgOn.A=0
DEV1:trgOn.B=8
DEV1:trgOn.VAL=0
I think this should not be possible, assuming that
(1) the value of the last monitor event (here: from DEV1:st) always wins
over previous events, and
(2) if a record (here: DEV1:trgOn) is active (PACT=1) when an event
arrives, it gets processed again, after completing.
Either this is a bug or at least one of my assumptions is wrong. I
wonder which.
Cheers
Ben
Attachment:
signature.asc
Description: OpenPGP digital signature
- Replies:
- Re: Strange behavior of async calcout with CPP input link Michael Davidsaver via Core-talk
- Navigate by Date:
- Prev:
Build failed: epics-base base-iocsherr-283 AppVeyor via Core-talk
- Next:
Re: [Merge] ~epics-core/epics-base/+git/Com:iocsherr into epics-base:7.0 mdavidsaver via Core-talk
- Index:
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:
Build failed: epics-base base-iocsherr-283 AppVeyor via Core-talk
- Next:
Re: Strange behavior of async calcout with CPP input link Michael Davidsaver via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
|