7-3
Chapter 7. CPL Communication Function
7 - 2 Message Structure
Message structure
The following shows the message structure.
Messages are broadly classified into two layers: the data link layer and the
application layer.
• Data link layer
This layer contains the basic information required for communications such as
the destination of the communication message and the check information of the
message.
• Application layer
Data is read and written in this layer. The content of the layer varies according to
the purpose of the message.
A message consists of (1) to (8) below.
The command (details sent from the master station) and the response (details
returned from the slave station) are stored in the application layer.
02 h 58H 03H 0DH 0AH
STX X ETX CR LF
(1) (2) (3) (4) (5) (6) (7) (8)
Data link layer Application layer Data link layer
1 frame
(1) STX (start of message)
(2) Station address
(3) Sub-address
(4) Device ID code
(5) Instruction message = command, response
message = response
(6) ETX (end of command/response)
(7) Checksum
(8) Delimiter (end of message)
Data link layer
z
Overview
The data link layer is of a fixed length. The position of each data item and
the number of its characters are already decided. Note, however, that the data
positions of the data link layer from ETX onwards shift according to the number of
characters in the application layer.
z
Response start conditions
• This device sends a response message only when all the message components in
the data link layer of the instruction message are correct. If even one of these is
incorrect, no response message is sent, and the device stands by for reception of
STX.
• The maximum number of word addresses that can be accessed by one frame is 32.