4. COMMUNICATION PROTOCOL
IMSRM04-E8
27
c
cc
c
[STX]
Transmission control character showing the beginning of the text (identifier and data).
d
dd
d
Identifier
A code which identifies the data to be sent to the host computer. It is expressed using a 2-digit
alphanumeric ASCII code.
For details on the identifiers, see 5. COMMUNICATION IDENTIFIERS
.
e
ee
e
Data
Data which is indicated by an identifier of this device, consisting of channel Nos., data, etc. Each
channel No. and data are delimited by a space (20H). The data and the next channel No. are
delimited by a comma.
Channel No.: 2-digit ASCII code, not zero-suppressed. Channels without channel Nos. may exist
depending on the type of identifier.
Data: ASCII code, zero-suppressed with spaces (20H). The number of digits varies
depending on the type of identifier.
The number of digits (length) and data configuration vary depending on the type of identifier. For
details on the number of data digits and data configuration, see 4.3 Communications Data
Configuration and 5. COMMUNICATION IDENTIFIERS
.
f
ff
f
[ETB]
Transmission control character indicating the end of the block.
g
gg
g
[ETX]
Transmission control character indicating the end of the text.
h
hh
h
[BCC]
Block check character for error-detection, uses horizontal parity. [BCC] is calculated by horizontal
parity (even number).
Calculation method
[BCC] is obtained by EX-OR (exclusive OR) of all characters from the character next to [STX] to
[ETB] or [ETX]. No [STX] is included.
Example:
The calculation method for the following data is shown below.
STXM101 150 . 0ETX
02H
4DH
31H
30H
31H
20H
20H
31H
35H
30H
2EH
30H
03H
( ) : Hexadecimal number : Space
BCC = 4DH⊕31H⊕30H⊕31H⊕20H⊕20H⊕31H⊕35H⊕30H⊕2EH⊕30H⊕03H
= 54H (⊕ : EX-OR)
The value of BCC becomes 54H.