Experimental Physics and Industrial Control System
|
Hi all –
I am not using a python interpreter from within the IOC; I am using python outside the IOC (but on the same VM) to test the IOC.
Something that I have noted: the default delay of 2 seconds can be shortened quite a bit (about 0.05 seconds seems as far as I can push it). However, if I run wait_for_connect() and debug what path it takes through that
function in order to connect, I see the same consistent behavior as initially described: about 1 in 5 times it fails to connect on the call to connect(), but then succeeds when it hits the call to ca.poll() (although it may take a few poll()s before it succeeds).
Note that this does not depend (!) on the length of the delay: a delay of 10 seconds yields the same pattern as a delay of 0.05 seconds.
(Regarding Jaroslav’s earlier question, although it may be moot: the PYEPICS_LIBCA in both cases is the same)
Cheers,
Simon
From: Matt Newville <newville at cars.uchicago.edu>
Date: Tuesday, 26 May 2020 at 17:08
To: Jaroslav Adam <jaroslavadam299 at gmail.com>
Cc: Simon Rose <Simon.Rose at ess.eu>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Subject: Re: Unpredictable behaviour with PyEpics
Hi Simon,
verify what PYEPICS_LIBCA is pointing to. It is the library which PyEpics
is using to make connections.
From my experience with running PyEpics inside a PythonSoftIoc, the PYEPICS_LIBCA
should point to the same channel access library as the IOC is using.
Is Simon trying to use pyepics from a Python interpreter embedded in an IOC? I do not read that from Simon's original message.
I hope that it is obvious to anyone trying to use pyepics from a Python interpreter embedded in an IOC that this definitely requires care in loading the Channel Access library. The process running
the IOC needs to have exactly one libca (and libCom) loaded. That will be set before the Python interpreter is started, so the pyepics library (which loads libca as late as possible) would need to point to the same one that the IOC is linked against.
PYEPICS_LIBCA can be used to override the default CA library used by pyepics (which is distributed with pyepics, not some "system default").
Just for completeness, a similar situation of potential conflict between versions of libca/libCom can arise if using pyepics with PCASpy. I believe that PCASpy loads libca on "import pcaspy",
so that pyepics should be imported *after* PCASpy and ensure that PYEPICS_LIBCA points to the same libca file.
|
- Replies:
- Re: Unpredictable behaviour with PyEpics Matt Newville via Tech-talk
- References:
- Unpredictable behaviour with PyEpics Simon Rose via Tech-talk
- Re: Unpredictable behaviour with PyEpics Jaroslav Adam via Tech-talk
- Re: Unpredictable behaviour with PyEpics Matt Newville via Tech-talk
- Navigate by Date:
- Prev:
Re: SoftIOC and Labview Gabriel Fedel via Tech-talk
- Next:
Re: SoftIOC and Labview 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
- Navigate by Thread:
- Prev:
Re: Unpredictable behaviour with PyEpics Matt Newville via Tech-talk
- Next:
Re: Unpredictable behaviour with PyEpics Matt Newville 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
|
ANJ, 27 May 2020 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|