Experimental Physics and Industrial Control System
> On May 15, 2017, at 6:00 PM, Madden, Timothy J. <[email protected]> wrote:
>
> This is probably a bad idea... But if I were to take a python object, call pickle.dumps() to convert it into a string, I could then caput it to a waveform record. Then some other py client could caget, then call pickle.loads() from the waveform record. then we get the object back. So we are sending python objects over epics CA.
>
> Has anyone tried this? Seems straightforward. Just how bad an idea is this?
Hi Tim—
We are doing this. We use pcaspy [1] on our beam lines as a python “IOC” for some applications. In some cases, we need to transfer a table generated by the Python code. We pickle the table into a CA byte waveform, transfer with channel access, un-pickle in a Python script associated with a CS-Studio GUI and display the table in a CS-Studio table widget for the user. This works reasonably well. The arrays can be large, but our update rate is typically low for these cases.
We *should* be using pvAccess instead of Channel Access for this, though, The limitation has been the ease of creating these python services with pcaspy. However, we see that now pvaPy [2] can also be used as a server. Since CS-Studio is already a pvAccess client, this will be much easier, and pvAccess is better suited to this structured data than Channel Access. We are just starting to look at this approach.
[1] https://github.com/paulscherrerinstitute/pcaspy
[2] https://github.com/epics-base/pvaPy
--
Steven Hartman
[email protected]
- References:
- sending pickled python objects of epics channel access Madden, Timothy J.
- Navigate by Date:
- Prev:
Re: sending pickled python objects of epics channel access Andrew Johnson
- Next:
Re: sending pickled python objects of epics channel access Kasemir, Kay
- 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: sending pickled python objects of epics channel access Wang Xiaoqiang
- Next:
Callback queue overflow Eric Norum
- 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