The calcout method sounds like what I'm going to use for this function.
I was just wondering if there was another way (or a simpler one) to do
the same thing.
Yes, I could set up my device driver to only write changes to the
hardware, but one of the things I've been trying to accomplish is to NOT
come up with 50 different ways to do the same thing. If there was
something already inside EPICS to accomplish this, then that's what I
would want to use, instead of coming up with my own interpretition.
My problem is this:
I've got a PLC that handles alarm notifications. This PLC runs only 2
things - a 120DB horn, and the brightest strobe light you've ever seen
in your life (OK, some of you guys have probably seen something
brighter, just not me ;-).
When a NEW alarm comes in (which is a output BIT that writes to a PLC
control register), the PLC clears that bit, resets a couple of latching
relays, and then sets off the horn, and/or the strobe. This happens
every time this bit is written as a '1'. As long as the alarm bit in
EPICS is set, I don't want to output the bit to the PLC again. Only
when the bit is initially set to a non-zero do I want to write to the
PLC.
The guys have acknowledge buttons and silence buttons to stop the light
and horn, but the alarm is still ON, and there are other indications of
the alarm that remain active.
If I were programming a PLC, I'd just use a 'positive one-shot' or
'diffentiator' to perform limiting the output, but I want to do this
inside EPICS instead.
>From my point of view, I want to only have the record process when the
value changes, either from 0-1, or from 1-0.
Got a couple of other things I need to work toward, but this is the
first one to become important (have to prevent the operation staff from
going blind and deaf, although sometimes I wonder ;-).
David
>>> Tim Mooney <[email protected]> 10/6/2008 8:49 AM >>>
David, Do you really want the record to refrain from processing,
or is it sufficient that it refrain from writing to hardware?
If you just want the record to write only *changes* to hardware,
you can do this in device support. If you want it to not process,
then I'm pretty sure no record can do this without outside help.
If a record were to decide whether or not to process based on the
value written to it, putNotify would not work for that record.
(I know because I wrote a record that did this, and decided to
abandon the tactic when putNotify was developed.)
I would use a calcout record to write to the output record, and
set the calcout record's OOPT field to "On Change".
David Dudley wrote:
> Is there a way for me to set a bo (or ao) record so that it only
> processes when it's value is changed?
>
> I've got a number of those records that I only need written to the
PLC
> when the value is changed.
>
> David
--
Tim Mooney ([email protected]) (630)252-5417
Beamline Controls & Data Acquisition Group
Advanced Photon Source, Argonne National Lab.
BEGIN:VCARD
VERSION:2.1
X-GWTYPE:USER
FN:David Dudley
TEL;WORK:826-1265
ORG:;MIS
TEL;PREF;FAX:880-3741
EMAIL;WORK;PREF;NGW:[email protected]
N:Dudley;David
TITLE:Functional Analyst
END:VCARD
- Replies:
- Re: Process 'bo' on write? Maren Purves
- Re: Process 'bo' on write? Andrew Johnson
- References:
- Process 'bo' on write? David Dudley
- Re: Process 'bo' on write? Tim Mooney
- Navigate by Date:
- Prev:
Re: Process 'bo' on write? Tim Mooney
- Next:
Re: problem of using Streamdevice Dirk Zimoch
- 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: Process 'bo' on write? Tim Mooney
- Next:
Re: Process 'bo' on write? Maren Purves
- 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
|