2] basic format of computer link commands, 1) communication format, 2] basic format of computer link commands -19 – Sharp Z-336J User Manual

Page 96: 1) communication format -19

Advertising
background image

9-19

Chapter 9: Message transfers

9

[2] Basic format of computer link commands

(1) Communication format

When a computer link is used, data sent from this node to a target node is referred to as a [com-
mand], and data received from the target node by this node is referred to as a [response]. The
communication format for commands and responses is as follows.

Header

: Normally, all 40 bytes are 00

(H)

.

If you want to communicate with Ethernet over two layers, you have to use an exten-
sion header.
(See "[5] Two-layer communication with Ethernet")

c-ID

: 47

(H)

r-ID

: 45

(H)

ATTR

: 00

(H)

COM

: Command code (See page 9-14)

RSLT

: Command execution result

Normally terminated with 00

(H)

If any byte other than 00

(H)

is found, an error code will be output (See "[4] Computer

link error code table").
If an error code is output, there is no response text.

Command Text : Command details (See "[3] Descriptions of each command")
Response Text : Response details (See "[3] Descriptions of each command")

[Example] When you want to monitor the ON/OFF status of relay 04033

See page 9-17.

Remarks

The maximum data length for read/write operations is 1024 bytes. In case of two-layer communication
with the Ethernet, however, the maximum length is 256 bytes. For the UDP, the total number of bytes
from the header to the command text must be less than 1024 bytes.

Ë

Command

Ë

Response

c-ID

ATTR

COM

Command Text

r-ID

ATTR

COM

RSLT

Response Text

ON

00

00

00

00

03

01

03

20

47

00

00

00

00

00

03

01

03

01

20

45

Header (40 bytes)

Header (40 bytes)

File address

000403

(8)

= 0103

(H)

File address

000403

(8)

= 0103

(H)

File 0

File 0

Bit 3

Bit 3

Relay No. 04033

Relay No. 04033

Ë

Command

Ë

Response

Header (40 bytes)

Header (40 bytes)

c-ID

r-ID

ATTR

ATTR

COM

COM

Command Text

Response Text

RSLT

+2000

+2047 +2050

+2051

+2052

+2053

+0000

+0047 +0050

+0051

+0052

+0053

+0054

Advertising
This manual is related to the following products: