1 configuration of command, Configuration of command -2 – Yokogawa PR300 Power and Energy Meter User Manual

Page 63

Advertising
background image

4-2

<Toc> <Ind>

<4. PC Link Communication Protocol>

IM 77C01E01-10E

4.1.1

Configuration of Command

Commands sent from a higher-level device to the PR300 consist of the following elements.

Number

of Bytes

1

2

2

1

3

2

1

1

Variable length

(1)

(2)

(3)

(4)

(5)

(7)

(8)

(9)

(6)

Element

STX

Station

number

(ST-NO)

CPU

number

01

Time to wait

for response

0

Command

Data

corresponding

to command

Checksum

ETX

CR

(1)

STX (Start of Text)

This control code indicates the start of a command. The ASCII code is 02 in hexadeci-
mal.

(2)

Station Number (01 to 99)

Station numbers are used by the higher-level device to identify the PR300 at the
communication destination. (These numbers are identification numbers specific to
individual PR300.) P1: Broadcasting mode (See subsection 4.1.4, “Specifying Broad-
cast")

(3)

CPU number

This number is fixed to ‘01.’ The ASCII codes are 30 and 31 in hexadecimal.

(4)

Time to Wait for Response

This is fixed to ‘0’. The ASCII code is 30 in hexadecimal.

(5)

Command (See section 4.2, “Command and Response”)

Specify a command to be issued from the higher-level device.

(6)

Data Corresponding to Command

Specify an internal register (D register), number of data pieces, and others.

(7)

Checksum

This is required if the protocol with checksum is selected for the RS-485 communica-
tion protocol parameter COMM.

It converts the ASCII codes of texts between the character next to STX and the char-
acter immediately before the checksum into hexadecimal values and adds them byte
by byte. It then fetches the single lowermost byte of the added results as the
checksum.

This column is required only for PC link communication with checksum. PC link
communication without checksum does not require this 2-byte space of ASCII code.

[Example]
[STX]01010WRDD0001, 02

ᮀᮀ

[ETX][CR]

Add up the hexadecimal values of the ASCII codes of each text.
(‘0’ : 30, ‘1’ : 31, ‘W’ : 57, ‘R’ : 52, ‘D’ : 44, ‘,’ : 2C, ‘2’ : 32)

30+31+30+31+30+57+52+44+44+30+30+30+31+2C+30+32
=372

Lowermost two digits of the added results as the checksum.
[STX]01010WRDD0001,0272[ETX][CR]

Advertising