EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20202021  2022  2023  2024  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Pure Python IOC (CAProcess issue)
From: Bruno Martins via Tech-talk <tech-talk at aps.anl.gov>
To: Simon Reiter <simon.reiter at exp2.physik.uni-giessen.de>
Cc: tech-talk <tech-talk at aps.anl.gov>
Date: Thu, 16 Jul 2020 09:09:06 -0400
Hi Simon,

At FRIB we have a number of "high level" IOCs that run Python. We use Michael's pyDevSup [1] package for all of them, as well as pyepics. I like pyDevSup better than pcaspy because you end up with a real IOC with real records. Sometimes there are some conflicts between pyDevSup and pyepics (c.f. [2]), but as long as both modules are using the same instance of libca and one module is not trying to de-initialize libca before the other module is done, everything runs pretty well. An alternative is to use pyDevSup with caproto [3] instead, which is a pure Python implementation of Channel Access. I don't have experience with this combination, however.

On Thu, Jul 16, 2020 at 7:03 AM Simon Reiter via Tech-talk <tech-talk at aps.anl.gov> wrote:
Dear all,

*Introduction*
the main part of our slow control is running in EPICS quite well. But for calibration steps some scripts developed over time fully in Python.

The idea was to provide some EPICS interface to the shifter to start calibrations without the usage of logging into a system and executing a script manually with correct parameters.

*So far*
We started utilizing the pcaspy package and provide PVs to be set in order to start the calibration. Since these read/write functions should be short, we decided to create and start a CAThread. This thread itself is doing some steps, one of them includes the analysis of some data, where we wanted to speed up by using CAProcess.
Using CA in order to give some feedback to the shifter that the calibration is not stuck or something else..

*Problem*
But we ran into some issues by using CAProcess. I already reported this issue on github/pyepics (https://github.com/pyepics/pyepics/issues/210), but it was (highly ;) ) recommended to ask this topic in a bigger round.

It seems that creating a CAProcess is not always successful, please see the detailed information on github. Somehow stuck at "libca.ca_context_create(ctx)”. The example shown there was only used to disclose and pin down the problem.

*And now*
The combination of pcaspy and pyepics was not recommended. So I would like to ask for your experience and/or recommendations using Python based IOCs. Would you maybe recommend to disentangle pcaspy and pyepics completely? Maybe only using pyepics with a callback?


Happy to hear some ideas and comments.

Best regards,
        Simon



Simon Reiter
II. Physikalisches Institut
Justus-Liebig-Universität
Heinrich-Buff-Ring 14
D-35392 Giessen
Tel: +49 641 99 33250
simon.reiter at physik.jlug.de


Replies:
Re: Pure Python IOC (CAProcess issue) Ralph Lange via Tech-talk
References:
Pure Python IOC (CAProcess issue) Simon Reiter via Tech-talk

Navigate by Date:
Prev: Re: Stream device - general concept how to use Mark Rivers via Tech-talk
Next: Re: Stream device - general concept how to use Arnold, Ned D. 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Pure Python IOC (CAProcess issue) Simon Reiter via Tech-talk
Next: Re: Pure Python IOC (CAProcess issue) 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  <20202021  2022  2023  2024 
ANJ, 17 Jul 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·