
4-3
Chapter 4. CPL Communication
Data link layer
The data link layer contains eight items of basic information necessary for
transmitting a message. The instruction message and response message have the
same structure in the data link layer.
The data link layer has a fixed length. The position of each item of data and its
length are prescribed. The position of data in the data link layer from ETX onwards
shifts according to the number of characters in the application layer, but the
number of characters does not change.
STX
Device address
Sub-address
Device code
ETX
Checksum
CR LF
02H 30H 41H 30H 30H 58H 52H 53H 2CH 31H 30H 30H 31H 57H 2CH 32H 03H 38H 41H 0DH 0AH
STX 0
A
0
0
X
R
S
,
1
0
0
1
W
,
2 ETX 8
A
CR LF
Data link layer
Application layer
Data link layer
z
STX (Start of Text)
Role
: Indicates the beginning of a message.
Description : Always 02H. If this device receives “STX,” it interprets STX to be
the first character of a new instruction message, even if it occurs
in the middle of a message.
z
Device address
Role
: This specifies the destination station. This makes it possible to
communicate with a specific device.
Description : The hexadecimal codes for two characters. For details, see the
example below.
Example: The destination device address is “10”
(1) 10 (decimal) = 0AH (0A hexadecimal)
(2) Replacement of characters by their hexadecimal character codes
0 = 30H
A = 41H
(3) The characters “0A” (30H, 41H) obtained in step 2 are used as the
device address.
Note
•
It is necessary to set the device address in advance for the slave station.
(for details on settings)
Handling Precautions
•
Note that the function of the device address differs entirely from that of the
data address in the application layer. Be sure to note the difference.
•
Set a unique device address for each multi-dropped device.
Содержание F4Q
Страница 10: ......
Страница 14: ......
Страница 46: ......
Страница 66: ...7 2 Chapter 7 Device Operation by Communication Commands...
Страница 68: ......
Страница 70: ......
Страница 71: ...Revision History CP SP 1458E Printed Edn New Page No Description June 2021 1...
Страница 72: ......
Страница 73: ......