ModBus Exception Responses for User defined Function Codes

I

Thread Starter

Ian Melville

For the public function codes the possible Exception Response codes and message format are strictly defined by the specification. Within the ModBus specification it is allowed to create User Defined Function Codes within the specified range.

On this basis it would seem appropriate that the Exception Response Codes and message format used in conjuntion with these User Defined Function Codes would also be User Definable without going outside the ModBus specification.

So the question is whether this thinking is correct?
 
L

Lynn August Linse

Unfortually, Modbus exception responses are so limited and 'useless', that most applications just tell the user 'error exception returned' without bothering to display or guess the cause.

The other problem is a master might in effect just stop talking to a device returning unknown errors, merely marking it offline & retrying it later.

So you can create fancy exceptions codes (in violation of the Modbus standard), but I'd suggest allowing them to be turned on or off (or convert them to a few standard ones) to help users who are somehow damaged by this.
 
F

Fred Loveless

I have worked with a couple of devices that use the special function codes and what they have done is to return a standard exception on an error and then post the custom error code to a Holding register that can be read with a standard holding register call. Typically these devices are using a special function call to return a block of data with disparate data types.
 
Thread starter Similar threads Forum Replies Date
F Modbus 1
P Modbus 1
M Modbus 1
A Modbus 4
S Modbus 1
Top