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.
|