www.wobit.com.pl
User manual -ADT42 – 23.06.2015 – v.1.3
page 13
6000 (*6002)
6001 (*6003)
OUT1
OUT2
W(0x05)
bit 0 – OUT1
bit 1 – OUT2
*
for addresses beginning from 1 (offset of a1)
R – register reading, W - record
CAUTION: 4-byte number
REAL type
is contained in two registers. The first registry contains younger part of the number,
the second - its older part. In order to read
REAL
number value correctly, read two registers (X, X+1), and then conduct
appropriate conversion.
Conversion of 2 registries (4 Byte) into 32 Bit number REAL
Register _X HI
Register _X LO
Register _X+1 HI
Register _X+1 LO
<-> Byte1
<-> Byte0
<-> Byte3
<-> Byte2
Number_32_bit
=
Byte3
<<24 +
Byte2
<<16 +
Byte1
<<8 +
Byte0,
or
Number_32_bit
= Regi Register_3<<16
Example of MODBUS communication table
Reading of measurements from SUM_IREAL register (
Function: 03,
Register address: 0
)
Request (MODBUS MASTER -> ADT42)
Response (ADT42-> MODBUS MASTER)
Device address
0x01
Device address
0x01
Function
0x03
Function
0x03
Hi registry address
0x00
Number of bytes
0x04
Lo registry address
0x00
Register 0x02 Hi
REAL (Byte 1)
Number of Hi registries
0x00
Register 0x02 Lo
REAL (Byte 0)
Number of Lo registries
0x02
Register 0x03 Hi
REAL (Byte 3)
CRC Hi
0xC4
Register 0x03 Lo
REAL (Byte 2)
CRC Lo
0x0B
CRC Hi
8 bit
CRC Lo
8 bit
Tare – bit setting of
TARA
register (
Function: 05,
Register address: 4001
)
Request (MODBUS MASTER -> ADT42)
Response (ADT42) -> MODBUS MASTER)
Device address
0x01
Device address
0x01
Function
0x05
Function
0x05
Hi registry address
0x0F
Hi register address
0x0F
Lo registry address
0xA1
Lo register address
0xA1
Register 0x00 Hi
0xFF
Register 0x00 Hi
0xFF
Register 0x00 Lo
0x00
Register 0x00 Lo
0x00
CRC
16 bit
CRC
16 bit