ljean / modbus-tk

Create Modbus app easily with Python
Other
566 stars 212 forks source link

Exception response when slave is missing #105

Closed Slasktra closed 4 years ago

Slasktra commented 5 years ago

When modbus_tk server receives a request for a slave, that is not defined in the server, an exception code (131 - 4) is sent as a reply. This is also described in this conversation: https://groups.google.com/forum/?hl=sv#!topic/modbus-tk/K0U54m0TqXM

According to "MODBUS Application Protocol Specification V1.1b3", www.modbus.org, a server (slave) should not respond for a non-existing slave ID.

So instead of sending 131 - 4 the server should be silent.