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: RE: Modbus 2.5 How to read a INT32_BE array from a modbus function
From: Mark Rivers <[email protected]>
To: Philippe Laurent <[email protected]>, "[email protected]" <[email protected]>
Date: Tue, 2 Feb 2016 14:26:48 +0000
Hi Philippe,

I looked at the code and I believe I see the error.  In fact I think the error occurs in 2 places.  One is for I/O Intr scanned records (like you are using) and the other is for periodically scanned records.  Can you change your database temporarily so that the waveform record is periodically scanned and see if you get the same problem?  If so I will fix the driver and have you test.

Thanks,
Mark

________________________________
From: [email protected] [[email protected]] on behalf of Philippe Laurent [[email protected]]
Sent: Tuesday, February 02, 2016 2:37 AM
To: [email protected]
Subject: Modbus 2.5 How to read a INT32_BE array from a modbus function

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 Philippe Laurent
References:
Modbus 2.5 How to read a INT32_BE array from a modbus function Philippe Laurent

Navigate by Date:
Prev: Modbus 2.5 How to read a INT32_BE array from a modbus function Philippe Laurent
Next: RE:Modbus 2.5 How to read a INT32_BE array from a modbus function Philippe Laurent
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: Modbus 2.5 How to read a INT32_BE array from a modbus function Philippe Laurent
Next: RE:Modbus 2.5 How to read a INT32_BE array from a modbus function Philippe Laurent
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 ·