I have set up the code similar to the slave example of ReadHoldingRegisters (which work fine).
I am using kepware OPC server modbus tcp environment as test. When trying to read a inputbit (100001) for example
the quality is bad and error message indicates "Bad received length on device '<device name>'"
I have defined input bits (I think) for at least 8 and 16 contiguous bits in the modbus slave. It appears that the modbus
request from the client is asking for more data bits than exists?
Any help is appreciated. Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Further information-
when the OPC requests:
It works as long as only one (1) register bit is requested at a time in a an 8 bit grouping.
ie - 100001 is ok 100009 is ok
but when 100001 and 100002 is requested - they are both 'bad' with the error message mentioned
if 100002 is requested only - ok
the modbus message packet is not quite right from the modbus server.
TIA
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have set up the code similar to the slave example of ReadHoldingRegisters (which work fine).
I am using kepware OPC server modbus tcp environment as test. When trying to read a inputbit (100001) for example
the quality is bad and error message indicates "Bad received length on device '<device name>'"
I have defined input bits (I think) for at least 8 and 16 contiguous bits in the modbus slave. It appears that the modbus
request from the client is asking for more data bits than exists?
Any help is appreciated. Thanks in advance.
Further information-
when the OPC requests:
It works as long as only one (1) register bit is requested at a time in a an 8 bit grouping.
ie - 100001 is ok 100009 is ok
but when 100001 and 100002 is requested - they are both 'bad' with the error message mentioned
if 100002 is requested only - ok
the modbus message packet is not quite right from the modbus server.
TIA