EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Modbus 2.5 How to read a INT32_BE array from a modbus function
From: Philippe Laurent <[email protected]>
To: "[email protected]" <[email protected]>
Date: Tue, 2 Feb 2016 08:37:12 +0000
Hello,

I try to read a INT32_BE array from a modbus function into a Waveform using dtyp = asynInt32Array.

I get a array of long in the waveform, but the data are not correctly read from modbus.

It looks like, the driver constitutes a long with :

modbus index 0 + modbus index 1-> waveform data[0]
modbus index 1 + modbus index 2-> waveform data[1]
modbus index 2 + modbus index 3-> waveform data[2]
...
Instead of :

modbus index 0 + modbus index 1-> waveform data[0]
modbus index 2 + modbus index 3-> waveform data[2]
modbus index 3 + modbus index 4-> waveform data[3]

My record is :

record(waveform, $(EQPT):PostMortemRaw2) {
  field(DTYP, "asynInt32ArrayIn")
  field(DESC, "input modbus data")
  field(NELM, "50")
  field(FTVL, "LONG")
  field(SCAN, "I/O Intr")
  field(INP,  "@asyn($(EQPT):PostMortemRd2 0)INT32_BE")
}


My modbus function is :

drvAsynIPPortConfigure("LBEC-DCCT31","172.16.60.231:502",0,0,1)
modbusInterposeConfig("LBEC-DCCT31",0,300,2)
drvModbusAsynConfigure("LBEC-DCCT31:PostMortemRd2","LBEC-DCCT31",1,3,228,100,6,2000,"PLC")





Préservons notre environnement, n’imprimez ce mail que si nécessaire.
Preserve our environment, print this email only if necessary.


Replies:
RE: Modbus 2.5 How to read a INT32_BE array from a modbus function Mark Rivers

Navigate by Date:
Prev: Re: Error in compiling masar Shen, Guobao
Next: RE: Modbus 2.5 How to read a INT32_BE array from a modbus function Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Error in compiling masar Shen, Guobao
Next: RE: Modbus 2.5 How to read a INT32_BE array from a modbus function Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·