Mark, that did fix the problem - changing nbits in INP asynMask from 16 (for unipolar) to -16 (for bipolar). Thanks so much! -- Jon
PS - so now small negative input voltages result in small negative integer RVAL,
with Vin -0.005 V:
epics> dbgf Iso:GantryCouch:Collimator:Actual.RVAL
DBR_LONG: -8 0xfffffff8
On Mon, 14 Dec 2015, Mark Rivers wrote:
I believe I may have found your problem.
...
field(DTYP, "asynInt32")
field(INP, "@asynMask(CollimCouch, $(OFFSET), 16, 1000)MODBUS_DATA")
So you are using asynInt32 device support with the asynMask link syntax.
This is the documentation from for asynInt32 and asynMask from http://cars9.uchicago.edu/software/epics/modbusDoc.html
...
field(INP,"@asynMask(portName,offset,nbits,timeout)drvUser")
....
nbits>0 for a unipolar device. For example, nbits=12 means unipolar 12-bit device, with a range of 0 to 4095. nbits<0 for a bipolar device. For example, nbits=-12 means bipolar 12-bit device, with a range of -2048 to 2047)
...
So you have set nbits=16. But the documentation explains the nbits>0 is for unipolar devices. Yours is not a unipolar device, it is a bipolar device, so you should be setting nbits=-16.
I believe that will fix your problem.
- References:
- RE: ai RVAL via asyn + modbus: getting unsigned integer Mark Rivers
- Navigate by Date:
- Prev:
Re: MEDM Extension Make Failed on Ubuntu 15.10 Jeong Han Lee
- Next:
areaDetector plugins: what variables can be accessed while unlocked? Phil Atkin
- 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: ai RVAL via asyn + modbus: getting unsigned integer Mark Rivers
- Next:
EPICS 2016 Spring Meeting at ESS, Lund, Sweden Timo Korhonen
- 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
|