Experimental Physics and Industrial Control System
Hi:
I ran into a problem with not getting the expected CA monitors
from a calc record.
It's a simple calc record meant to count whenever it's processed.
To reset the counter, we write 0 to its VAL field:
record (calc, "XYZ_Cnt")
{
field (INPA, "XYZ_Cnt")
field (CALC, "A+1")
}
Many times, that works OK. But at least with R3.14.8.2,
it omits the monitor for the initial count from 0 to one
after a reset.
Example 'camonitor' output:
# After IOC start, the record is invalid
XYZ_Cnt <undefined> 0 UDF INVALID
# After "caput XYZ_Cnt.PROC 1", it counts up to 1
XYZ_Cnt 2009-02-03 09:33:01.570935 1
# With "caput XYZ_Cnt.VAL 0" it resets to 0 and sends a monitor for that
XYZ_Cnt 2009-02-03 09:33:01.570935 0
# BUT: When checking dbpr on the IOC, I finds MLST: 1,
# so the record thinks that the monitor sent out was 1,
# even though I just got the value 0?!
# When I issue another "caput XYZ_Cnt.PROC 1", dbpr will
# show VAL:1, so the record counts OK, but it fails
# to send a monitor, which makes sense with MLST: 1.
# After another "caput XYZ_Cnt.PROC 1", it counts again,
# and this time also sends a monitor
XYZ_Cnt 2009-02-03 09:33:23.019859 2
In general, simply performing a "caput XYZ_Cnt.VAL 0"
seems to leave the calc's MLST where it was.
I assume that's because Channel Access & the database code
directly update the VAL field without triggering the CALC's
process routine.
The "fix" for me is to set MDEL=-1, always getting monitors
even though the record's idea of the last value, MLST,
is wrong.
Thanks,
-Kay
- Replies:
- Re: CALC record monitors Andrew Johnson
- Navigate by Date:
- Prev:
Re: wrong timestamps in monitors Benjamin Franksen
- Next:
MaxP PCI motor interface Dalesio, Leo
- 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:
EPICS Codeathon 2009 at Brookhaven Andrew Johnson
- Next:
Re: CALC record monitors Andrew Johnson
- 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