Hi,
I'm wondering if there is a way to set a delay time (say 10 seconds) for
record processing based on whether an input is in a BAD state. If the
record is still in a BAD state after the delay of 10 seconds, I'd like
to process the record and change its value. If the value went BAD, but
changed back to OKAY, then I'd like to ignore the alarm.
I'm using a calcout record to determine if a temperature is below -180
C. If the temperature increases above -180 C, the calcout record outputs
a 0. The CALC condition is the following: TEMP<-180?1:0. This output is
tied to a hardware relay channel which opens a relay when its value is 0
and closes a relay when its value is 1. The temperature signal is from
an RTD temperature sensor controller which outputs an analog voltage
proportional to temperature and is wired into an analog-to-digital
converter. We suspect that there is sometimes noise on the analog
signals, causing false readings, which causes the relay to open and
systems to shut down immediately. A small delay check would help filter
noise and false readings.
I'd like to make a delay condition where the temperature must be BAD
(above -180 C) for a certain amount of time before opening the relay. If
the temperature turns back to OKAY within the time period, then I'd like
to ignore the condition, and have the relay not change state.
The analog voltage is digitized using the same I/O controller (United
Electronic Industries, UEI <http://www.ueidaq.com/>, Model UEIPAC 1200R)
that drives the relays. The UEIPAC contains an embedded Linux romdisk
which is running EPICS 3.14.12.
I've tried using the calcout record's DLYA field, but it seems to only
delay the processing of the record, and changes its value whether or not
the INP (temperature) has changed back to an OKAY state.
Has anyone had a need for this type of delay conditional check? If so,
is it possible/recommended to write the logic using EPICS records, or by
using another method, such as adding a feature to the driver? What might
be necessary to implement a check like this in EPICS?
Thanks!
Chris Whiting
CHESS, Cornell University