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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Long out record PV Monitoring error in client using CaChannel-1.5 python interface |
From: | "Wang Xiaoqiang" <[email protected]> |
To: | "Ritesh Sugandhi" <[email protected]>, <[email protected]> |
Cc: | Di Maio Franck <[email protected]> |
Date: | Wed, 1 Dec 2010 17:04:57 +0100 |
Your EPICS is built with x86_64 taget? Did you build Cachannel from source? Your python is 64 bit?Your output seems that the value is interpreted as 64 bit instead of 32bit.Best,Xiaoqiang
From: Ritesh Sugandhi [mailto:[email protected]]Sent: Wednesday, December 01, 2010 11:23 AM
To: Wang Xiaoqiang
Cc: Di Maio Franck; [email protected]
Subject: Re: Long out record PV Monitoring error in client using CaChannel-1.5 python interfaceDear Sir,thanks for your quick reply. I am using CaChannel-1.5 from http://sourceforge.net/projects/igor2epics/files/CaChannel/ ? and My test system configuration is as below
RHEL 5.5. client edition x86 -64
EPICS 3.14.11
Python 2.4.3
I run your scripts and output is as below:==========================================================EPICS output isepics> dbpf long 1234DBR_LONG: 1234 0x4d2epics> dbpf long 2147483647DBR_LONG: 2147483647 0x7fffffffepics> dbpf long 2147483648DBR_LONG: -2147483648 0x80000000epics> dbpf long -1DBR_LONG: -1 0xffffffffepics> dbpf long -2DBR_LONG: -2 0xfffffffea.py script output is================================[codac-dev@trunk ~]$ python a.py2010-12-01 11:09:19long 2010-12-01 11:09:19 0long 2010-12-01 11:13:30 1234long 2010-12-01 11:13:44 2147483647long 2010-12-01 11:14:07 2147483648long 2010-12-01 11:14:21 4294967295long 2010-12-01 11:14:45 4294967294=================================Any suggestion will be highly appreciated. do you think that is is 32 bit vs. 64 bit os issue?Regards,Ritesh Sugandhi
On Wed, Dec 1, 2010 at 9:56 AM, Wang Xiaoqiang <[email protected]> wrote:
What you mean by "When ever the record attends the –ive values"?Are you using CaChannel 1.5 from http://sourceforge.net/projects/igor2epics/files/CaChannel/ ?I did a test with your snippet, into which I have added the trivial missing imports. I have attached the script and databaseMy test system is:Scientific Linux 5.1 x86EPICS 3.14.8Python 2.4.3Here is the output. Could you run my attached script and post the output?### IOC Log ####slslc06> dbpf long 1234
DBR_LONG: 1234 0x4d2
slslc06> dbpf long 2147483647
DBR_LONG: 2147483647 0x7fffffff
slslc06> dbpf long 2147483648
DBR_LONG: 2147483647 0x7fffffff
slslc06>#### Python Monitor ###2010-12-01 09:40:59
long 2010-12-01 09:40:59 0
long 2010-12-01 09:41:16 1234
long 2010-12-01 09:41:33 2147483647######################Best,Xiaoqiang
From: Ritesh Sugandhi [mailto:[email protected]]Sent: Tuesday, November 30, 2010 4:53 PM Cc: [email protected]; Wang Xiaoqiang; Di Maio Franck
Subject: Long out record PV Monitoring error in client using CaChannel-1.5 python interfaceDear Sir,
We are using a client application develop using CaChannel-1.5 epics python interface library. The CA server is exposing a longout record which we are interested in monitoring. When ever the record attends the –ive values. The client shows 2**32-val instead of value. while the same code works well with ao record type .
The Code is as below:
###################################################def eventMon(epics_args, user_args):global monPV, nowprint monPV, now, epics_args['pv_value']def main():global stop, nowtry:monChan = CaChannel()monChan.search(monPV)monChan.pend_io()print nowexcept CaChannelException, status:print ca.message(status)try:monChan.add_masked_array_event(ca.dbf_type_to_DBR_STS(monChan.field_type()), \None, ca.DBE_VALUE | ca.DBE_ALARM, eventMon)except CaChannelException, status:print ca.message(status)while not stop:now = strftime('\t%Y-%m-%d %X\t')ca.pend_event(0.5)###################################################Best Regards,Ritesh Sugandhi
Attachment:
CaChannel_src.tar.gz
Description: CaChannel_src.tar.gz