> I will consider the phyton solutions, but I agree the cronjob is an easy and elegant solution.
A cron job that periodically fetches your data and then calls `caput SomeRecord ThatData` is certainly a very easy way to get started. It's perfectly fine if you run that cronjob once an hour.
It would be bad to run such a setup every few seconds, because each call to caput will send a name search, establish the network connection, write a value, disconnect, ... and then do the same a second later.
For that scenario, a python script that uses PyEpics as a client would be much better:
from time import sleep
from epics import caput
while True:
# .. somehow get your data ..
caput('SomePV', that_data)
sleep(1)
The Pyepics `caput` will under the hood only connect once and then keep reusing that connection.
Or look at PCASPY to create a CA server in python.
Thanks,
Kay
- References:
- Getting data from a shell script into an ioc Bo Jakobsen via Tech-talk
- Re: Getting data from a shell script into an ioc Pearson, Matthew R. via Tech-talk
- Re: Getting data from a shell script into an ioc Bo Jakobsen via Tech-talk
- Navigate by Date:
- Prev:
Problem in Stream Out of two 8 bit data Ashish Sharma via Tech-talk
- Next:
EPICS in Docker containers Gabriel de Souza Fedel 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: Getting data from a shell script into an ioc Bo Jakobsen via Tech-talk
- Next:
Re: Getting data from a shell script into an ioc Sebastian Marsching 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
|