Hi:
Yes, for getting data from python into EPICS, using Channel Access it definitely a worthwhile approach.
You can add CA server to python so that it serves the data right away,
or add a CA client to python which writes the data to records in a "real" IOC as Tim explains.
The CA client approach is less code, especially if you already have an IOC.
An advantage of the CA server approach:
When using cainfo to see where the PV is coming from, you can (with a few intermediate steps) identify the python process.
If the python process crashes, you'll know, because the PV is gone.
With the python-client-writes-to-IOC approach, the python code is a layer removed.
If the python client crashes, your PV simply won't update, and you might notice that too late.
Rod's suggestion to turn the python script into a simple TCP server, then read that via stream device can be in-between:
Not too much code, and stream device will tell you right away about read errors when the python process dies.
-Kay
On Feb 5, 2015, at 12:56 PM, "Mooney, Tim M." <[email protected]>
wrote:
> I just wrote some python code...write the sensor value to an EPICS PV
- References:
- Fetching return value from external program call in StreamDevice Christian Pauly
- RE: Fetching return value from external program call in StreamDevice Mooney, Tim M.
- Navigate by Date:
- Prev:
Re: Fetching return value from external program call in StreamDevice Rod Nussbaumer
- Next:
RE: Fetching return value from external program call in StreamDevice Al Honey
- 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: Fetching return value from external program call in StreamDevice Mooney, Tim M.
- Next:
Re: Fetching return value from external program call in 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
|