13
Modbus Configuration & Commands
5.1
5. Modbus Configuration & Commands
Modbus Serial Configuration
ODO RTU operates over RS485. The serial configuration can be modified, including the baud rate, parity, and Modbus slave
address. By default, the baud rate is 9600, slave address is 0x01, and parity is even. As per the Modbus serial specification, there is
one stop bit when parity is set, and two stop bits when there is no parity. All values are big-endian byte ordered.
Slave Addresses
The slave address is set using a single register write command (function code 0x06) of address 0x0000. Addresses in range of 1 to
247 are supported. Devices will allow broadcast write access using address 0x255. The default address is 0x01.
The slave address can also be read using a read holding registers command (function code 0x03) of address 0x0000
Request
Function Code
1 byte
0x06
Register Address
2 bytes
0x0000
Register Value
2 bytes
0x0001
Request
Function Code
1 byte
0x03
Register Address
2 bytes
0x0000
Number Registers
2 bytes
0x0001
Response
Function Code
1 byte
0x06
Register Address
2 bytes
0x0000
Register Value
2 bytes
0x0001
Response
Function Code
1 byte
0x03
Byte Count
1 byte
0x02
Register Value
2 bytes
0x0001
Error
Error Code
1 byte
0x86
Exception Code
1 bytes
0x03 (Illegal Data Value)