mV-RS485 Adapter Modbus-RTU Register Information
The following Modbus register information can be used to read/write the Modbus address, read the mV values from a connected sensor, and read/write the calibration values within the mV-RS485 adapter.
Read Input Registers
Read Current Address Using Universal Address
The mV-RS485 adapter is programmed such that any sensor will respond to Modbus address 251. This is implemented for the event that the sensor’s current address is unknown.
| Function 0x04 (Read input registers) | |||
| Registers | Data Type | Data Size | Purpose |
| 0x1000 | 16-bit integer | 1 register | Uses the univeral address (251) to read the current mV-RS485 adapter address. |
Example:
| Request | Response | ||
| Field Name | Hex | Field Name | Hex |
| Slave Address | 0xFB | Slave Address | 0xFB |
| Function | 0x04 | Function | 0x04 |
| Start Address Hi | 0x10 | Byte count | 0x02 |
| Start Address Lo | 0x00 | Register Value Hi | 0x00 |
| Quantity of register | 0x00 | Register Value Lo | 0x07 |
| Quantity of register | 0x01 | CRC Lo | 0x20 |
| CRC Lo | 0x21 | CRC Hi | 0xE6 |
| CRC Hi | 0x50 | ||
- Using the universal address of 251 (0xFB), the user has read that the current Modbus address of the sensor is 7 (0x0007).
Read mV Value
| Function 0x04 (Read input registers) | |||
| Registers | Data Type | Data Size | Purpose |
| 0x0002, 0x003 | 32-bit Float, Big-endian | 2 registers | Requests the mV value recorded by the mV-RS485 adapter. |
Example:
| Request | Response | ||
| Field Name | Hex | Field Name | Hex |
| Slave Address | 0x01 | Slave Address | 0x01 |
| Function | 0x04 | Function | 0x04 |
| Start Address Hi | 0x00 | Byte count | 0x04 |
| Start Address Lo | 0x02 | Register Value Hi | 0xC1 |
| Quantity of register | 0x00 | Register Value Lo | 0xC8 |
| Quantity of register | 0x02 | Register Value Hi | 0xBF |
| CRC Lo | 0xD0 | Register Value Lo | 0x9A |
| CRC Hi | 0x0B | CRC Lo | 0xB7 |
| CRC Hi | 0xDD | ||
- The user has requested the mV value reading from the mV-RS485 adapter. The sensor responded with 0xc1c8bf9a (-25.09356 mV).
Read Point 1 Calibration Values (mV and concentration)
| Function 0x04 (Read input registers) | |||
| Registers | Data Type | Data Size | Purpose |
| 0x4000, 0x4001, 0x4002, 0x4003 | 32-bit Float, Big-endian | 4 registers | Requests the point 1 calibration values (usually 0) set internally on the mV adapter. |
Example:
| Request | Response | ||
| Field Name | Hex | Field Name | Hex |
| Slave Address | 0x01 | Slave Address | 0x01 |
| Function | 0x04 | Function | 0x04 |
| Start Address Hi | 0x40 | Byte count | 0x08 |
| Start Address Lo | 0x00 | Register Value Hi | 0x00 |
| Quantity of register | 0x00 | Register Value Lo | 0x00 |
| Quantity of register | 0x04 | Register Value Hi | 0x00 |
| CRC Lo | 0xE5 | Register Value Lo | 0x00 |
| CRC Hi | 0x8D | Register Value Hi | 0x00 |
| Register Value Lo | 0x00 | ||
| Register Value Hi | 0x00 | ||
| Register Value Lo | 0x00 | ||
| CRC Lo | 0x31 | ||
| CRC Hi | 0x3D | ||
- The user has requested the point 1 calibration values from the mV-RS485 adapter. The sensor responded with 0x00000000 (0 mV, 0 value).
Read Point 2 Calibration Values (mV and concentration)
| Function 0x04 (Read input registers) | |||
| Registers | Data Type | Data Size | Purpose |
| 0x4004, 0x4005, 0x4006, 0x4007 | 32-bit Float, Big-endian | 4 registers | Requests the point 2 calibration values set internally on the mV adapter. |
Example:
| Request | Response | ||
| Field Name | Hex | Field Name | Hex |
| Slave Address | 0x01 | Slave Address | 0x01 |
| Function | 0x04 | Function | 0x04 |
| Start Address Hi | 0x40 | Byte count | 0x08 |
| Start Address Lo | 0x04 | Register Value Hi | 0x3F |
| Quantity of register | 0x00 | Register Value Lo | 0x80 |
| Quantity of register | 0x04 | Register Value Hi | 0x00 |
| CRC Lo | 0xA4 | Register Value Lo | 0x00 |
| CRC Hi | 0x4C | Register Value Hi | 0x43 |
| Register Value Lo | 0x73 | ||
| Register Value Hi | 0xCA | ||
| Register Value Lo | 0x3D | ||
| CRC Lo | 0x80 | ||
| CRC Hi | 0x8F | ||
- The user has requested the point 2 calibration values from the mV-RS485 adapter. The sensor responded with 0x3f8000004373ca3d (1 mV, 243.79 value).
Write Multiple Registers
Change the Modbus Address
| Function 0x10 (Write Multiple registers) | |||
| Registers | Data Type | Data Size | Purpose |
| 0x1000 | 16-bit Integer | 1 register | Changes the Modbus Address of the mV-RS485 adapter. |
Example:
| Request | Response | ||
| Field Name | Hex | Field Name | Hex |
| Slave Address | 0x01 | Slave Address | 0x01 |
| Function | 0x10 | Function | 0x10 |
| Start Address Hi | 0x10 | Start Address Hi | 0x10 |
| Start Address Lo | 0x00 | Start Address Lo | 0x00 |
| Quantity of register | 0x00 | Quantity of Outputs Hi | 0x00 |
| Quantity of register | 0x01 | Quantity of Outputs Hi | 0x01 |
| Byte count | 0x02 | CRC Lo | 0x05 |
| Outputs Value Hi | 0x00 | CRC Hi | 0x09 |
| Outputs Value Lo | 0x05 | ||
| CRC Lo | 0x77 | ||
| CRC Hi | 0x92 | ||
- Using the known address of 1, the user has changed the Modbus address of the sensor with address 1 to 5.
Write New Point 2 mV Calibration Value
| Function 0x10 (Write Multiple registers) | |||
| Registers | Data Type | Data Size | Purpose |
| 0x4004, 0x4005 | 32-bit Float, Big-endian | 2 registers | Change the point 2 mV calibration value. |
Example:
| Request | Response | ||
| Field Name | Hex | Field Name | Hex |
| Slave Address | 0x01 | Slave Address | 0x01 |
| Function | 0x10 | Function | 0x10 |
| Start Address Hi | 0x40 | Start Address Hi | 0x40 |
| Start Address Lo | 0x04 | Start Address Lo | 0x04 |
| Quantity of register | 0x00 | Quantity of Outputs Hi | 0x00 |
| Quantity of register | 0x02 | Quantity of Outputs Hi | 0x02 |
| Byte count | 0x04 | CRC Lo | 0x14 |
| Outputs Value Hi | 0x3f | CRC Hi | 0x4D |
| Outputs Value Lo | 0x80 | ||
| Outputs Value Hi | 0x00 | ||
| Outputs Value Lo | 0x00 | ||
| CRC Lo | 0xDB | ||
| CRC Hi | 0x53 | ||
- The new point 2 mV calibration value has been set to 1.0 (0x3f800000).
Write New Point 2 Concentration Calibration Value
| Function 0x10 (Write Multiple registers) | |||
| Registers | Data Type | Data Size | Purpose |
| 0x4006, 0x4007 | 32-bit Float, Big-endian | 2 registers | Change the point 2 concentration calibration value. |
Example:
| Request | Response | ||
| Field Name | Hex | Field Name | Hex |
| Slave Address | 0x01 | Slave Address | 0x01 |
| Function | 0x10 | Function | 0x10 |
| Start Address Hi | 0x40 | Start Address Hi | 0x40 |
| Start Address Lo | 0x06 | Start Address Lo | 0x06 |
| Quantity of register | 0x00 | Quantity of Outputs Hi | 0x00 |
| Quantity of register | 0x02 | Quantity of Outputs Hi | 0x02 |
| Byte count | 0x04 | CRC Lo | 0xB5 |
| Outputs Value Hi | 0x43 | CRC Hi | 0x8D |
| Outputs Value Lo | 0x7C | ||
| Outputs Value Hi | 0x8F | ||
| Outputs Value Lo | 0x5C | ||
| CRC Lo | 0xE7 | ||
| CRC Hi | 0x23 | ||
- The new point 2 concentration calibration value has been set to 252.56 (0x437c8f5c).
Note: Point 1 calibration values are typically set at zero; however, the Modbus registers for the point 1 values are 0x4000,0x4001 (mV) and 0x4002, 0x4003 (concentration).