Dear experts
I am struggling right now with programming a control interface for a
device using the streamdevice module.
The device has several status variables (like eg "temperature"), and
several control variables (like eg "pump speed").
My approach is, to have for each control variable two records:
record getPumpSpeed (type analog input, ai)
record setPumpSpeed (type analog output, ao)
These are connected to two different protocol functions to set - or to
read back the value.
"caput setPumpSpeed xxx" works fine : The protocol gets executed, the
pump speed is set.
but "caget getPumpSpeed" does not execute the protocol, instead it just
returns the record value.
I could do a "caput getPumpSpeed xxx" first (with some arbitrary number
xxx, to execute the record), then the protocol is executed, and a
subsequent "caget getPumpSpeed" gives me the latest value... But that is
not really what i want. (Naively) i am looking for a "realtime" readback
everytime i do a caget.
But from the documentation i see, that this is the intended behaviour.
I could set the SCAN field of the caget record to have regular polls of
the pump speed.
But if i now imagine to have hundred such variables, i would get quite
some traffic, and the return values are still not really "real time".
So: What is the general concept how to control such a device ? (This
must be a "standard case").
Use SCAN for each status variable ?
Or combine the set- and get-record to a single record "PumpSpeed" ?
And just assume, that the latest set value (which is then returned upon
caget) is still the actual real value ?
Or am i lacking some understanding of streamdevice ?
Any help and advice greatly appreciated !
Thanks,
Christian
- Replies:
- Re: Stream device - general concept how to use Mark Rivers via Tech-talk
- Navigate by Date:
- Prev:
Re: SRQ over VXI Noboru Yamamoto via Tech-talk
- Next:
Pure Python IOC (CAProcess issue) Simon Reiter via Tech-talk
- 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: Long String support in phoebus Ralph Lange via Tech-talk
- Next:
Re: Stream device - general concept how to use Mark Rivers via Tech-talk
- 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
|