4 - 2
Message Structure
8
Chapter 4. COMMUNICATION PROCEDURE
■
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 the communication 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.
Messages comprise parts (1) to (9) as shown in the figure below.
The command (details sent from the master station) and the response (details
returned from the slave station) are stored in the application layer.
■
Data link layer
●
Outline
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. The character length, however, remains
unchanged.
●
Response start conditions
• The device sends the response message only when (1) message structure, station
address, sub-address, checksum and message length of a single frame in the data
link layer are all correct. If even one of these is incorrect, no response messages
are sent, and the device waits for new message.
• Number of word addresses accessible by a single frame
02H
58H
0DH
03H
STX
X
ETX
0AH
CR LF
(2)
(1)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
Data link layer
Application layer
Data link layer
1 frame
(1) STX (start of message)
(2) Station address
(3) Sub-address
(4) Device code
(5) Send message = command,
response message = response
(6) ETX (end of command/response)
(7) Checksum
(8) CR (delimiter)
(9) LF (delimiter)
Type
Description of command
RAM area
EEPROM area
RS
Decimal format read command
1 to 10
1 to 10
WS
Decimal format write command
1 to 10
1 to 10
RD
Hexadecimal format read command
1 to 10
1 to 10
WD
Hexadecimal format write command
1 to 10
1 to 10
Содержание Azbil CMQ-V Series
Страница 43: ...35 Chapter 6 COMMUNICATION PROGRAM FOR MASTER STATION ...
Страница 44: ...36 Chapter 6 COMMUNICATION PROGRAM FOR MASTER STATION ...
Страница 45: ...37 Chapter 6 COMMUNICATION PROGRAM FOR MASTER STATION ...
Страница 46: ...38 Chapter 6 COMMUNICATION PROGRAM FOR MASTER STATION ...
Страница 52: ......
Страница 53: ...Revision History Printed Manual Number Edition Revised pages Description date Jan 2007 CP SP 1197E 1st Edition ...
Страница 54: ......
Страница 55: ......