new post:
these work
device.quad.ReadHoldingFloat(100, 28673,1)
device.quad.readHoldingU16(27, 4,1)
then this works
device.quad.readholdingu16(50, 42305,1)
after that, the first one fails
device.quad.readholdingu16(100, 28673,1)
with this error:
P-ModbusRTU 0002: Illegal Data Address: LoopQuadMain Line 220 in PLCSteam
until daqfactory is restarted
I need to be able to read both devices, the read 50002 first trick seems to make no difference.
What should I do?
old post: So i have read and understand the various permutations on modbus addressing, that is, 0 based, 30-40000, and 50000+ (i am ignoring the 400001 ones). My system has 5 or 6 modbus devices from different manufacturers, and I have had DAQFactory using some 42006 kinds of addresses, where I think it is subtracting stripping the 4 and subtracting 1 before it sends the address down the wire, and all was well. Now, I have a device that seems intent on wanting the 0 based addressing, and fails access to any any addresses until I use the "write to a modbus address over 50000" trick to force the scheme back to a 0 index approach...then the new device works fine, but all the other addresses are now off by one. I really don't want to have to go and find all the locations that specify modbus address constants and subtract one from them, because i will have to go back and test each and every different system to make sure it still works. Is there an explicit control of the scheme, so that I can specify which address mode to use for a given device access? What i see now is even for testing, if I read an address over 50000, the mode changes to 0 index, all the prior devices begin to fail, and the only way to change it back is to restart the program.
this fails, until I read an address over 50000, then this works fine, but other addresses like 42006 start failing
?device.plc1.ReadHoldingFloat(17,28673,1)
P-ModbusRTU 0002: Illegal Data Address