MJ400215A1
5
4. Message Structure
・
Command message
The command message from the communication controller to the equipment
should be structured as shown in the following example:
STX
Communication ID
Command
Data
Check sum
ETX
@
0
0
1
W
V
S
S
1
5
5
CR
40H
30H
30H
31H
57H
56H
53H
53H
31H
35H
35H
0DH
STX
This equipment recognizes “STX” as the head of the message
unconditionally.
“@(40H)” Fixed length 1 byte
Communication ID
Specify a communication ID of the equipment to which data is sent.
“001” – “099” Fixed length 3 bytes
Command
Specify a character string to indicate a command type. Fixed length
4 bytes. For details, see the next section.
Data
Variable length according to command types. There are commands
without data. For details, see the next section.
Check sum
Added every 1 byte from STX to data and each digit of calculation
result lower 2 digits (hexadecimal) converted to ASCHII code. Fixed
length 2 bytes.
※
See below.
ETX
Indicates the end of the message. “CR (0DH)” Fixed length 1 byte
※
An example of check sum calculation
As an example, the above command message is as follows:
40H + 30H + 30H + 31H + 57H + 56H + 53H + 53H + 31H = 255H
(STX) (Communication ID) (Command) (Data)(Check sum)