Subject: |
Re: [EXTERNAL] Camonitor with client dictated update rate |
From: |
Klemen Vodopivec via Tech-talk <[email protected]> |
To: |
[email protected] |
Date: |
Thu, 30 May 2019 10:11:59 -0400 |
Hi Hinko,
usually the device driver developer knows best what the update rate is
for the particular device. That said, you'll probably have to write some
code. Using the monitor updates, you can reduce the frequency on the
client side by skipping some updates but you can't get more updates than
the IOC is pushing out. Also, timing of updates depends on the IOC and
record definition, you may not be getting updates at regular intervals.
So if you want to do some regular periodic updates, CA get is your best
friend. Here's proof of concept code using PyEpics for a PV that changes
at 60Hz:
$ cat slow_camonitor.py
#!/usr/bin/env python
import epics
import sys
import time
pv = epics.PV(sys.argv[1])
interval = float(sys.argv[2])
while True:
print pv.get()
time.sleep(interval)
$ python slow_camonitor.py BL2:Det:rtdl:Timestamp 1
2019/05/30 09:52:03.200780666
2019/05/30 09:52:04.200765666
2019/05/30 09:52:05.217418666
$ python slow_camonitor.py BL2:Det:rtdl:Timestamp .1
2019/05/30 09:52:08.917366666
2019/05/30 09:52:09.017365666
2019/05/30 09:52:09.117363666
2019/05/30 09:52:09.217362666
2019/05/30 09:52:09.317360666
2019/05/30 09:52:09.417359666
2019/05/30 09:52:09.517358666
2019/05/30 09:52:09.617356666
On 5/29/19 1:21 PM, Hinko Kocevar via Tech-talk wrote:
This might sound like a silly motion, but you are probably used to those from me by now.
A non-EPICS person at my facility wonders if EPICS could support camonitor like PV monitoring, but with CA client dictating the rate of value updates. Imagine 1s update rate, that certain slow client would use, while the PV would update much faster, and the rest of existing CA clients just use regular camonitor’ing.
I can see answers like, just use caget like approach and poll or define a new (set) of PVs for that slow rate, but that is IOC material. My use case revolves around very, very busy IOC devs that have no time to support crazy ideas of individuals who want slow updates.
Any insights appreciated!
Thanks (and have a nice weekend to those living in Sweden),
Hinko
- References:
- Camonitor with client dictated update rate Hinko Kocevar via Tech-talk
- Navigate by Date:
- Prev:
Re: pmac driver bug Davis, Mark via Tech-talk
- Next:
How to share asyn's queue thread among ports? Klemen Vodopivec 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:
Camonitor with client dictated update rate Hinko Kocevar via Tech-talk
- Next:
Re: Camonitor with client dictated update rate Ralph Lange 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
|