So I
have just installed SL5.4 x86_64 in a virtual machine and compiled EPICS 3.14.12
and CaChannel-1.5.
Running the script gives the same results: signed
number becomes unsigned.
This
problem is that dbr_long_t is actually epicsUInt32. While in Py_BuildValue "l"
formater converts it to 64bit long.
So in
the attachment, "i" is used for dbr_long_t. That solves the
problem.
I will
put up a new release soon as possible.
Best,
Xiaoqiang
Dear sir ,
thanks for your reply,
The EPICS is build with x86-64 target and the python is 64 bit.
Now, I will rebuild the CaChannel from source and check the build process
and make carefully and return back to you.
Best regards,
Ritesh sugandhi
On Wed, Dec 1, 2010 at 12:47 PM, Wang Xiaoqiang <[email protected]>
wrote:
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
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
interface
Dear 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 is
epics>
dbpf long 1234
DBR_LONG:
1234 0x4d2
epics>
dbpf long 2147483647
DBR_LONG:
2147483647 0x7fffffff
epics>
dbpf long 2147483648
DBR_LONG:
-2147483648 0x80000000
epics>
dbpf long -1
DBR_LONG:
-1 0xffffffff
epics>
dbpf long -2
DBR_LONG:
-2 0xfffffffe
a.py script output is
================================
[codac-dev@trunk ~]$ python
a.py
2010-12-01
11:09:19
long
2010-12-01 11:09:19 0
long
2010-12-01 11:13:30 1234
long
2010-12-01 11:13:44 2147483647
long
2010-12-01 11:14:07 2147483648
long
2010-12-01 11:14:21 4294967295
long
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"?
I did a
test with your snippet, into which I have added the trivial missing
imports. I have attached the script and database
My test
system is:
EPICS 3.14.8
Python 2.4.3
Here 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
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 interface
Dear 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, now
print monPV, now,
epics_args['pv_value']
def main():
global stop, now
try:
monChan = CaChannel()
monChan.search(monPV)
monChan.pend_io()
print now
except 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
- References:
- Long out record PV Monitoring error in client using CaChannel-1.5 python interface Ritesh Sugandhi
- RE: Long out record PV Monitoring error in client using CaChannel-1.5 python interface Wang Xiaoqiang
- Navigate by Date:
- Prev:
EPID Capfast symbol Philip Taylor
- Next:
RE: Build EPICS Base3.14.9 on Windows Jeff Hill
- 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: Long out record PV Monitoring error in client using CaChannel-1.5 python interface Wang Xiaoqiang
- Next:
How to use BOY/OPI to produce standalone simple displays Jimmy Johnson
- 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
|