06 writes data into d register, Writes data into d register -7, Function – Yokogawa PR300 Power and Energy Meter User Manual

Page 101: Request (for nomal operation), Response (for normal operation), Example

Advertising
background image

<Toc> <Ind>

< 6. Modbus/TCP Communication Protocol>

6-7

IM 77C01E01-10E

06

Writes data into D register

Function

This function code writes data into a specified D register number.

The maximum number of D registers to be written into at a time is 1.

For the format of response in the event of failure, see subsection 6.4.4.

Request (for nomal operation)

Element

Number of bytes

Command

element

MBAP Header

2

2

2

2

2

1

1

Hex value

Arbitrary

0000

0006

01 to 99

06

PDU

Unit ID

Function

code

Transaction ID

Protocol ID

Register

start number

Write data

Number of

bytes

Response (for normal operation)

01 to 99

Element

Number of bytes

Command

element

MBAP Header

2

2

2

2

2

1

1

Hex value

Arbitrary

0000

0006

06

PDU

Unit ID

Function

code

Transaction ID

Protocol ID

Register

start number

Write data

Number of

bytes

Example

Write 5 (500Wh/pls) into the D0209 (pulse unit) at station number 01.

[Request] 000100000006010600D00005

(1) “0001”: Arbitrary 2-byte data

(2) “0000”: Protocol ID=0000 (fixed)

(3) “0006”: Number of bytes

(4) “01”: Unit ID=01 indicating PR300

(5) “06”: Function code=06

(6) “00D0”: D register number 209

(7) “0005”: Write data

The following response will be returned to the request above.

[Response]

000100000006010600D00005

(1) “0001”: Arbitrary 2-byte data in the request
(2) “0000”: Protocol ID=0000 (fixed)

(3) “0006”: Number of bytes

(4) “01”: Unit ID=01 indicating PR300

(5) “06”: Function code=06

(6) “00D0”: D register number 209

(7) “0005”: Write data

* Numbers in quotation marks are hexadecimal.

(1)

(2)

(3)

(6)

(7)

(4) (5)

(1)

(2)

(3)

(6)

(7)

(4) (5)

Advertising