Modbus Protocol
This device communicates using the Modbus RTU protocol over the RS-485 standard.
Device Address
This device's preconfigured user-definable address is 0x16. Users can change the address using the holding registers.
Modbus Function Codes
The following Modbus function codes are functional with this device.
0x03
Read holding registers
Returns configuration parameters
2
0x04
Read input registers
Returns measured readings and statistics
2
0x06
Write single register
Writes a single configuration parameter
2
0x10
Write multiple registers
Writes multiple configuration parameters
2 x N
Device Registers
The following registers are available with this device.
Input Register (R)
0x0001
Temperature (Actual)
Input Register (R)
0x0002
Temperature (Average)
Input Register (R)
0x0003
Temperature (Min)
Input Register (R)
0x0004
Temperature (Max)
Input Register (R)
0x0005
Temperature (Std. Dev.)
Input Register (R)
0x0006
EC (Actual)
Input Register (R)
0x0007
EC (Average)
Input Register (R)
0x0008
EC (Min)
Input Register (R)
0x0009
EC (Max)
Input Register (R)
0x000A
EC (Std. Dev.)
Input Register (R)
0x000B
Moisture (Actual)
Input Register (R)
0x000C
Moisture (Average)
Input Register (R)
0x000D
Moisture (Min)
Input Register (R)
0x000E
Moisture (Max)
Input Register (R)
0x000F
Moisture (Std. Dev.)
Input Register (R)
0x0010
Device Pitch (Actual)
Input Register (R)
0x0011
Device Roll (Actual)
Input Register (R)
0x0012
Device Temperature
Holding Register (R/W)
0x0101
Device Address
Holding Register (R/W)
0x0102
Baud Rate
Holding Register (R/W)
0x0103
Statistics Period (Secs)
Holding Register (R/W)
0x0104
IMU Correction (Pitch)
Holding Register (R/W)
0x0105
IMU Correction (Roll)
Holding Register (R/W)
0x0106
Heater Config
Holding Register (R/W)
0x0107
Temperature Correction 1
Holding Register (R/W)
0x0108
Temperature Correction 2
Holding Register (R/W)
0x0109
Temperature Correction 3
Holding Register (R/W)
0x010A
EC Correction 1
Holding Register (R/W)
0x010B
EC Correction 2
Holding Register (R/W)
0x010C
EC Correction 3
Holding Register (R/W)
0x010D
Moisture Correction 1
Holding Register (R/W)
0x010E
Moisture Correction 2
Holding Register (R/W)
0x010F
Moisture Correction 3
Communication Syntax
Reading sensor data
The host device can read one or more sensor data by calling the starting register address.
Request from the host: Device address [1 Byte] + Function code (0x04) [1 Byte] + Input register start address [2 Bytes MSB first] + Requested register length [2 Bytes MSB first] + CRC [2 Bytes MSB first]
Response from the device: Device address [1 Byte] + Function code (0x04) [1 Byte] + Response register length in Bytes [1 Byte] + Register 1 [2 Bytes MSB first] + Register N [2 Bytes MSB first] + CRC [2 Bytes MSB first]
Reading configuration register
The host device can read one or more configuration registers by calling the starting register address.
Request from the host: Device address [1 Byte] + Function code (0x03) [1 Byte] + Holding register start address [2 Bytes MSB first] + Requested register length [2 Bytes MSB first] + CRC [2 Bytes MSB first]
Response from the device: Device address [1 Byte] + Function code (0x03) [1 Byte] + Response register length in Bytes [1 Byte], Register 1 [2 Bytes MSB first] + Register N [2 Bytes MSB first] + CRC [2 Bytes MSB first]
Writing single configuration register
The host device can write one configuration register.
Command from the host: Device address [1 Byte] + Function code (0x06) [1 Byte] + Holding register address [2 Bytes MSB first] + Value to be set [2 Bytes MSB first] + CRC [2 Bytes MSB first]
Response from the device: Device address [1 Byte] + Function code (0x06) [1 Byte] + Holding register address [1 Byte] + Value set [2 Bytes MSB first] + CRC [2 Bytes MSB first]
Writing multiple configuration registers
The host device can write multiple configuration registers.
Command from the host: Device address [1 Byte] + Function code (0x10) [1 Byte] + Holding register start address [2 Bytes MSB first] + Requested register length [2 Bytes] + Configuration values length in Bytes [1 Byte] + Value to be set 1 [2 Bytes MSB first] + Value to be set N [2 Bytes MSB first] + CRC [2 Bytes MSB first]
Response from the device: Device address [1 Byte] + Function code (0x10) [1 Byte] + Holding register start address [1 Byte], Value set [2 Bytes MSB first], CRC [2 Bytes MSB first]
Last updated