advertisement
from the R&D department...
ModBus Exception Responses for User defined Function Codes
Communications systems and equipment. topic
Posted by Ian Melville on 16 August, 2012 - 8:12 am
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?


Posted by Lynn August Linse on 16 August, 2012 - 1:34 pm
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.


Posted by Fred Loveless on 17 August, 2012 - 12:03 pm
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.

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2013 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.


Fortune
It is not enough to succeed. Others must fail.
-- Gore Vidal
Advertise here
Advertisement
our advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive