Wrd reads d registers on a word-by-word basis, Reads d registers on a word-by-word basis -7, Function – Yokogawa PR300 Power and Energy Meter User Manual

Page 68: Command/response (for normal operation), Example

Advertising
background image

<Toc> <Ind>

<4. PC Link Communication Protocol>

4-7

IM 77C01E01-10E

WRD

Reads D registers on a word-by-word basis

Function

This function code reads a sequence of contiguous register information on a word-by-word
basis by the specified number of words, starting with a specified register number.

The number of words to be read at a time is 1 to 64.

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

The command shown below includes the checksum function. When performing
communication without the checksum, do not include the 2-byte checksum element in
the command.

Command/Response (for normal operation)

The response is returned in a 4-digit character string (0000 to FFFF) in hexadecimal.

ddddn: read data of the specified number of words

ddddn = character string in hexadecimal

n = 1 to 64 words

Number of

Bytes

Response

element

1

STX

3

WRD

2

Station

number

(ST-NO)

2

01

4

dddd1

4

dddd2

4

ddddn

2

OK

2

Checksum

1

ETX

1

CR

Number of

Bytes

Command

element

1

STX

2

Station

number

(ST-NO)

2

01

1

Comma

or

space

2

Number

of words

(n)

1

0

2

Checksum

5

Register

number

1

ETX

1

CR

Example

Read the active energy (register symbol: kWh L and kWh H) of the PR300 at station num-
ber 01.

The register numbers for active energy are D0001 and D0002.

[Command]

[STX]01010WRDD0001, 0272 [ETX] [CR]

The data of active energy (2 words) will be returned in response to the command above.

[Response]

[STX]0101OK7840017D0B [ETX] [CR]

25000000 [kWh] in decimal.

See the Note below.

Note: To use the response data as the reading, reverse the order of the upper and lower words.

Hex 7840 017D

(reversed)

Hex 017D 7840

Decimal 25000000

Advertising