The Modbus communication protocol is a serial communication protocol. The Modbus protocol does not define the physical layer. Instead it uses RS-232C compatible serial interfaces, which are very common on microcontrollers.
- Coil: Discrete output (e.g. digital GPIO output pin on microcontroller)
- Holding register: Internal, two-byte wide digital register that are used for storing values
Messages start with a colon (:) and end with a carriage return-line feed pair (CR-LF). Each byte of data between is sent as ASCII-encoded HEX (0-9, A-F).
The common function codes are shown in the below table.
|01||Read coil status|
|02||Read input status|
|03||Read holding registers|
|04||Read input registers|
|05||Force single coil|
|06||Preset single register|
|07||Read exception status|
|15||Force multiple coils|
|16||Preset multiple registers|
|17||Report slave ID|
FreeMODBUS - A Modbus ASCII/RTU and TCP implementation: Software targeted at embedded platforms.
free-dotnet-modbus: A free .NET implementation of the Modbus protocol.
ModNet: Free Windows-based Modbus protocol client, which checks Modbus RTU compliance.
- RS-232 Protocol
- February 2018 Updates
- LVDS (Low-Voltage Differential Signalling)
- How To Use SocketCAN With C++ In Linux