7
Chapter 4.  Communication
4 - 1  Overview of Communication
Communication procedure
The simplest way to describe the communication procedure is as follows.
1.   The master station sends a command message to the specified slave station.
2.   The slave station processes the message, which is a command to read or write data.
3.   Additionally, the slave station sends a response message whose contents 
correspond to the type of processing.
4.   The master station receives and processes the response.
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 communication. For 
example, it has the destination of the command message and the checksum 
information.
•  Application layer  
Data is read and written in this layer. The content of the layer varies according to 
the purpose of the message.
Messages include parts 1 to 9 in the figure below.
The command in a command message from the master station and the response in 
a response message from the slave station are stored in the application layer.
Data link layer
z
Overview
The data link layer has a fixed length. The relative position of each item of data 
and its length are prescribed. Note, however, that the position of data in the data 
link layer from ETX onwards shifts according to the number of characters in the 
application layer. The length of the data link layer text remains unchanged.
02H
58H30H30H 0DH03H
STX
X00 ETX
0AH
CR LF
Data link layer Application layer Data link layer
1 frame
  STX (start of message)
  Device address
  Subaddress (xed at “00”)
  Device code
  In command message = the command, in response message = the response
  ETX (end of command or response)
 Checksum
  CR (delimiter)
  LF (delimiter)
1 2 3 4 5 6 7 8 9
1
2
3
4
5
6
7
8
9