Hello S Banerian -
It looks to me like you are simply missing an import in python. Since you haven't shared the whole of your python code I can't tell, but you might be missing a
from pvaccess import CA
at the top of your script. Note that according to your linked documentation there is such an object:
>>> import pvaccess
>>> dir (pvaccess)
['BOOLEAN', 'BYTE', 'CA', 'Channel', 'DOUBLE', 'FLOAT', 'FieldNotFound',
'INT', 'InvalidArgument', 'InvalidDataType', 'InvalidRequest', 'LONG',
'NtTable', 'NtType', 'PVA', 'ProviderType', 'PvAlarm', 'PvBoolean', 'PvByte',
'PvDouble', 'PvFloat', 'PvInt', 'PvLong', 'PvObject', 'PvScalar',
'PvScalarArray', 'PvShort', 'PvString', 'PvTimeStamp', 'PvType', 'PvUByte',
'PvUInt', 'PvULong', 'PvUShort', 'PvUnion', 'PvaException', 'RpcClient',
'RpcServer', 'SHORT', 'STRING', 'UBYTE', 'UINT', 'ULONG', 'USHORT', '__doc__',
'__file__', '__name__', '__package__']
See the third entry in the output of dir(pvaccess)
Cheers,
Simon
On 2023-05-10, 10:47, "Tech-talk on behalf of S Banerian via Tech-talk" <tech-talk-bounces at aps.anl.gov <mailto:tech-talk-bounces at aps.anl.gov> on behalf of tech-talk at aps.anl.gov <mailto:tech-talk at aps.anl.gov>> wrote:
I've set to work on upgrading some of our local EPICS infrastructure, and have (finally) installed Epics 7 on a couple of machines.
As part of that, we are trying out pvaccess PvaPy as an update to the pyepics that is currently used.
On a test system, i've been following the documentation [1,2] for PvaPy to monitor some pv's we track.
alas, we do not get the desired behaviour for monitoring CA PVs.
pvaChannel = Channel('enum01')
pvaChanne.isConnected()
pvaChannel.subscribe('echo', lambda x: print(f'{x}'))
pvaChannel.startMonitor()
(no errors encountered)
but when non-default is tried:
ourPVchannel = pvaccess.Channel('int01',CA)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'CA' is not defined
pvaccess.Channel('int01',providerType=CA)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'CA' is not defined
suggestions as to what I can try next?
[1] https://github.com/epics-base/pvaPy <https://github.com/epics-base/pvaPy>
[2] https://epics.anl.gov/extensions/pvaPy/production/pvaccess.html#channel <https://epics.anl.gov/extensions/pvaPy/production/pvaccess.html#channel>
s banerian
UW Clinical Cyclotron
- References:
- PvaPy pvaccess S Banerian via Tech-talk
- Navigate by Date:
- Prev:
Re: Why does libca.so depend on libreadline.so? Dmitry Yu. Bolkhovityanov via Tech-talk
- Next:
Re: [EXTERNAL] PvaPy pvaccess Kasemir, Kay 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:
PvaPy pvaccess S Banerian via Tech-talk
- Next:
Re: [EXTERNAL] PvaPy pvaccess Kasemir, Kay 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
|