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: Philippe Laurent <[email protected]>
To: "[email protected]" <[email protected]>
Date: Tue, 2 Feb 2016 14:38:18 +0000
Hi Mark,

I get the same bahaviour with my waveform SCAN at 1 second.

I believe I see an error in the readInt32Array fonction of drvModbusAsyn.c when you increment i to read data from the memory buffer. You always increment by 1.

Best regards.
Laurent.



________________________________________
De : Mark Rivers [[email protected]]
Envoyé : mardi 2 février 2016 15:26
À : Philippe Laurent; [email protected]
Objet : RE: Modbus 2.5 How to read a INT32_BE array from a modbus function

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.
________________________________
Préservons notre environnement, n’imprimez ce mail que si nécessaire.
Preserve our environment, print this email only if necessary.


References:
Modbus 2.5 How to read a INT32_BE array from a modbus function Philippe Laurent
RE: Modbus 2.5 How to read a INT32_BE array from a modbus function Mark Rivers

Navigate by Date:
Prev: RE: Modbus 2.5 How to read a INT32_BE array from a modbus function Mark Rivers
Next: Active modbus read function upon request 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: RE: Modbus 2.5 How to read a INT32_BE array from a modbus function Mark Rivers
Next: Active modbus read function upon request 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 ·