D.modbus rtu register listing, 03 (0x03) read holding registers, 06 (0x06) write single register – Electro-Chemical Devices (ECD) T80 User Manual

Page 69: D.modbus

Advertising
background image

D.MODBUS

RTU

R

EGISTER

L

ISTING

03

(0

X

03)

R

EAD

H

OLDING

R

EGISTERS

This function code is used to read the contents of a contiguous block of holding registers in a remote device.
The Request Protocol Data Unit specifies the starting register address and the number of registers. In the
Protocol Data Unit Registers are addressed starting at zero. Therefore registers numbered 1-16 are address as
0-15.
The register data in the response message are packed as to bytes per register, with the binary contents right
justified within each byte. For each register, the first byte contains the high order bits and the second contains
the low order bits.
Request

Modbus ID (Slave Address)

1 Byte

1 to 247 (0x01 to 0xF7)

Function code

1 Byte

0x03

Starting Address

2 Bytes

0x0000 to 0xFFFF

Quantity of Registers

2 Bytes

1 to 125 (0x01 to 0x7D)

CRC

2 Bytes

calculated

Response

Modbus ID (Slave Address)

1 Byte

1 to 247 (0x01 to 0xF7)

Function code

1 Byte

0x03

Byte Count

1 Byte

2 X N*

Register Value(s)

*N X 2 Bytes

CRC

2 Bytes

calculated

*N = Quantity of Registers

Error

Modbus ID (Slave Address)

1 Byte

1 to 247 (0x01 to 0xF7)

Error Code

1 Byte

0x86

Exception Code

1 Byte

01, 02, 03 or 04

CRC

2 Bytes

calculated

06

(0

X

06)

W

RITE

S

INGLE

R

EGISTER

This function code is used to write a single holding register in a remote device.

The Request Protocol Data Unit specifies the address of the register to be written. Registers are addressed

starting at zero. Therefore register number 1 is addressed as 0.

The normal response is an echo of the request, returned after the register contents have been written.

Request

Modbus ID (Slave Address)

1 Byte

1 to 247 (0x01 to 0xF7)

Function code

1 Byte

0x06

Register Address

2 Bytes

0x0000 to 0xFFFF

Register Value

2 Bytes

0x0000 to 0xFFFF

CRC

2 Bytes

calculated

Response
Modbus ID (Slave Address)

1 Byte

1 to 247 (0x01 to 0xF7)

Function code

1 Byte

0x06

Register Address

2 Bytes

0x0000 to 0xFFFF

68

Advertising
This manual is related to the following products: