Reading the parameter 3; Temperature median, in float32 data type.
Address =56 = 0x0038 (word) (Address in Hex of the first register)
Functional code= 04=0x0004 (word)-Read input registers
Number of registers = 02=0x0002 (word)
Unit ID = 255 = 0xFF
Command Structure:
Trans. ID (Hi Byte)
00 | Trans. ID (Lo Byte)
00 | Protocol ID (Hi Byte)
00 | Protocol ID (Lo Byte)
00 | Length (Hi byte)
00 | Length (Lo byte)
06 | Unit ID
FF | Function Code
04 | Address 1st reg. (Hi byte)
00 | Address 1st reg. (Lo Byte) 38 | # of registers (Hi Byte)
00 | # of registers (Lo Byte)
02 |
Command Response
Functional Code
04 | Number of Bytes
04 | Value of the first register (Hi Byte)
41 | Value of the first register (Lo Byte)
B1 | Value of the second register (Hi Byte) 5C | Value of the second register (Lo Byte) 29 |
040441B15C29
Data = 0x41B15C29 = 22.17 (float32)
Reading the Parameter 1; Viscosity median, status
Address =43 = 0x002B (word) (Address in Hex of the first register)
Functional code= 04=0x0004 (word)-Read input registers
Number of registers = 01=0x0001 (word)
Unit ID = 255 = 0xFF
Command Structure:
Trans. ID (Hi Byte)
00 | Trans. ID (Lo Byte)
00 | Protocol ID (Hi Byte)
00 | Protocol ID (Lo Byte)
00 | Length (Hi byte)
00 | Length (Lo byte)
06 | Unit ID
FF | Function Code
04 | Address 1st reg. (Hi byte)
00 | Address 1st reg. (Lo Byte) 2B | # of registers (Hi Byte)
00 | # of registers (Lo Byte)
01 |
Command Response
Functional Code
04 | Number of Bytes
02 | Value of the first register (Hi Byte) 00 | Value of the first register (Lo Byte) 01 |
04020001
Data = 0x0001 = 1 (Uint16)
Referring to the parameter status, this value means a general error occurred.
Reading the Parameter 8; Temperature raw, Int16 value.
Address =98 = 0x0062 (word) (Address in Hex of the first register)
Functional code= 04=0x0004 (word)-Read input registers
Number of registers = 01=0x0001 (word)
Unit ID = 255 = 0xFF
Command Structure:
Trans. ID (Hi Byte)
00 | Trans. ID (Lo Byte)
00 | Protocol ID (Hi Byte)
00 | Protocol ID (Lo Byte)
00 | Length (Hi byte)
00 | Length (Lo byte)
06 | Unit ID
FF | Function Code
04 | Address 1st reg. (Hi byte)
00 | Address 1st reg. (Lo Byte) 62 | # of registers (Hi Byte)
00 | # of registers (Lo Byte)
01 |
Command Response
Functional Code
04 | Number of Bytes
02 | Value of the first register (Hi Byte) 08 | Value of the first register (Lo Byte) 9E |
0402089E
Data = 0x089E = 2206 (Int16)
Since the register value is the temperature scaled by 100. The actual temperature value is 22.06 °C.
This register is useful for devices in which single point conversion requires too much computation.
Reading Multiple parameters; Viscosity Average value in float, Uint and status.
Address =64 = 0x0040 (word) (Address in Hex of the first register)
Functional code= 04=0x0004 (word)-Read input registers
Number of registers = 04=0x0004 (word)
Unit ID = 255 = 0xFF
Command Structure:
Trans. ID (Hi Byte)
00 | Trans. ID (Lo Byte)
00 | Protocol ID (Hi Byte)
00 | Protocol ID (Lo Byte)
00 | Length (Hi byte)
00 | Length (Lo byte)
06 | Unit ID
FF | Function Code
04 | Address 1st reg. (Hi byte)
00 | Address 1st reg. (Lo Byte) 40 | # of registers (Hi Byte)
00 | # of registers (Lo Byte)
04 |
Command Response
Functional Code
04 | Number of Bytes
08 | 1th reg. (Hi Byte)
41 | 1th reg. (Lo Byte)
F4 | 2th reg. (Hi Byte)
51 | 2th reg. (Lo Byte)
EC | 3th reg. (Hi Byte)
0B | 3th reg. (Lo Byte)
EE | 4th reg. (Hi Byte)
00 | 4th reg. (Lo Byte)
00 |
040841F451EC0BEE0000
Viscosity Average (float32) = 30.54 cP
Viscosity Average (UInt16) = 3054 cP
Viscosity Average Status (UInt16) = 0