Experimental Physics and Industrial Control System
Hi,
We are using pyEpics 3.1.1 for our application. The web page states that
CA connection can be performed auto-magically at ca.create_channel()
call, by calling ca.connect_channel(). This works fine. The connection
can also be postponed, by supplying the connect=False argument, the docs
also say.
We are unable to achieve the postponed connection. In the example I'm
supplying both connections are made instantly, even though the first one
has connect=False set.
Is there a way to achieve the delayed connection? We would need this to
more precisely control which PVs are actually 'enabled'/'used' in the
application ..
Example:
import epics
import time
import sys
def onConnectionChange(pvname=None, conn=None, chid=None):
print 'ca connection status changed: ', time.time(), pvname,
conn, chid
sys.stdout.flush()
# create channel, provide connection callback
pv1 = 'HINKS:ENV:ENV_VOLTAGE1_MONITOR'
chid1 = epics.ca.create_channel(pv1, connect=False,
callback=onConnectionChange)
# create channel, provide connection callback
pv2 = 'HINKS:ENV:ENV_VOLTAGE1_MONITOR'
chid2 = epics.ca.create_channel(pv1, connect=True,
callback=onConnectionChange)
print 'Now waiting, watching values and connection changes:'
t0 = time.time()
while time.time()-t0 < 30:
time.sleep(0.001)
print "Exiting .."
Example output:
$ python caconnect.py
ca connection status changed: 1307003655.84
HINKS:ENV:ENV_VOLTAGE1_MONITOR True 162902648
ca connection status changed: 1307003655.84
HINKS:ENV:ENV_VOLTAGE1_MONITOR True 162902648
Now waiting, watching values and connection changes:
Thank you!
--
Hinko Kocevar
Technical support software engineer
Instrumentation Technologies
Velika pot 22, SI-5250 Solkan - Slovenia
T:+386 5 3352600, F:+386 5 3352601
mailto: [email protected]
http://www.i-tech.si - When your users demand stability
The information transmitted is intended solely for the addressee and may
contain confidential and/or privileged information. Any review, retention,
disclosure or other use by persons other than the intended recipient is
prohibited. If you received this in error, please notify the sender and
delete all copies.
- Replies:
- Re: pyEpics want postponed connecting Hinko Kocevar
- Re: pyEpics want postponed connecting Matt Newville
- Navigate by Date:
- Prev:
Re: EPICS Base darwin-x86_64 target architecture? Andrew Johnson
- Next:
Re: pyEpics want postponed connecting Hinko Kocevar
- 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: EPICS Base darwin-x86_64 target architecture? J. Lewis Muir
- Next:
Re: pyEpics want postponed connecting Hinko Kocevar
- 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