69
Block Format
Section 1-2
1-2
Block Format
The following format is used for the command and response blocks used in
E5ZE systems.
Start Character:Each block begins with a start character, @ (40H).
Unit Number:
The unit number of the E5ZE is required so that the host
computer can identify the E5ZE.
Header Code:
The header code consists of two letters identifying the type of
command being sent.
Text:
The text consists of command or response data in detail.
FCS:
The FCS is calculated as the exclusive OR of all characters
from the start character through the final data character. The
resulting 8
-
bit data is converted to two ASCII characters for
transmission as an FCS.
Terminator:
Each block ends with a terminator consisting of
*
(2AH) and
a carriage return
s
(0DH).
If the host computer is connected to more than one E5ZE for RS
-
422 or RS
-
485 communications, each of the E5ZE must have a unique unit number, oth-
erwise communications will not be possible.
1-3
FCS Calculations
Write a program for the host computer so that the host computer can calculate
the FCS in each command block and each response block to ensure problem
-
free communications.
Calculation Example
The result
“
4A
”
is transmitted as the FCS of the transmission command.
*
Symbols
H:
Hexadecimal code
(+):
Exclusive OR
@
X
X
X
X
s
*
Start
character
00 to 0F Header
code (2 al-
phabetical
digits)
FCS calculation range
FCS
Terminator
Text
Unit no.
X16
X16
1
0
@
0
0
R
X
0
0
0
0
40H
30H
30H
52H 58H
30H 30H 30H
30H
2AH 0DH
s
*
FCS
FCS = 40H (+) 30H (+) 30H (+) 52H (+) 58H (+) 30H (+) 30H (+) 30H (+) 30H = 4AH
34H
41H
Transmission command
FCS calculation range
Command converted to ASCII code
FCS converted to ASCII code
Transmission code