Partial success at Read Holding Reg. and Write Mult. Reg. commands

V

Thread Starter

Volkan Celik

Hi,

What should a Modbus device return, if it gets 'Read Holding Registers' command and if it isn't able to read one of the requested registers? Should it return a success response or an error response?

And similar to that question, what should a Modbus device return, if it gets 'Write Multiple Registers' command and if it isn't able to write one of the requested registers? Should it return a success response or an error response? And should it continue to write registers, if it realizes a write error on one of the registers?

Thanks & Regards
 
If a Modbus request cannot be completed then an error (exception) should be returned. If you perform only part of a request then you may end up with incorrect or inconsistent data so you should check for all possible errors before attempting to complete an operation. If there are multiple reasons why a request would fail, you should report the error corresponding to the order specified in the Modbus spec for that function (there are flow charts detailing this).
 
Top