Difference between revisions of "Protocol decoder:Modbus"
(Created page with "{{Infobox protocol decoder | id = Modbus | name = Modbus RTU | description = Modbus RTU | status = supported | license = GPLv3+ |...") |
(No difference)
|
Revision as of 17:53, 28 July 2015
Name | Modbus RTU |
---|---|
Description | Modbus RTU |
Status | supported |
License | GPLv3+ |
Source code | decoders/modbus |
Input | uart |
Output | Modbus |
Probes | — |
Optional probes | — |
Options | channel |
The modbus decoder supports the Modbus bus protocol. Right now it only supports Modbus RTU, but it could be extended to support Modbus Ascii.
Protocol
Modbus RTU is a single client, multi-server protocol that is normally used over RS485 for simple networks of devices. It can also be used over RS232.
It can be used in several different setups, but normally it's used with the following settings:
- Baud rate
- 19200
- Parity
- none or even
- Stopbits
- 1 or 2
Modbus RTU is a Client/Server (or Master/slave) protocol, where one device on the bus is a client, and the rest are servers. The client makes a request and (usually) a client responds; there is no other communication. Every server has an id between 1 and 247, these have to be set in advance.
Every message starts with the server ID (or 0 for broadcast messages), then the function code. It ends with a 2 byte CRC. Because both client→server and server→client messages have the same format, it can be impossible for a logic sniffer to determine which is which.
Modbus is an open protocol that is managed by the modbus organization. The newest version of the specification at the time of writing is V1.1b3