Chapter 7 XGT Dedicated Protocol
7-8
(d) XGB response format (NAK response)
Format name
Heade
r
Station
No.
Command Command type
Error code
(Hex 2 Byte)
Tail Frame check
Ex. of frame NAK H20 R(r) SS H1132 ETX BCC
ASCII value H15 H3230 H52(72) H5353 H31313332 H03
Item Explanation
BCC
When command is lowercase(r), only one lower byte of the value resulted by adding 1 Byte each to
ASCII values from NAK to ETX is converted into ASCII and added to BCC.
Error code
Hex and 2 bytes (ASCII code, 4 bytes) indicate error type. Refer to 10.1.4 XGT dedicated
communication error codes and countermeasures.
(e) Example
This example supposes when 1 WORD from M20 and 1 WORD from P001 address of station No.1
are read
(At this time, it is supposed that H1234 is entered in M20, and data of H5678 is entered in P001.)
1) PC request format (PC → XGB)
Format name
Header
Station
No.
Command
Comman
d type
Ex. of frame ENQ H01 R(r) SS H02 H06 %MW020 H06 %PW001 EOT BCC
ASCII value H05 H3031 H52(72) H5353 H3032 H3036
H254D573032
30
H3036
H255057303030
31
H04
2) For ACK response after execution of command (PC ← XGB)
Format name
Header
Station
No.
Command
Command
type
Number of
blocks
Number of
data
Data
Number of
data
Data
Tail
Frame
check
Ex. of frame ACK H01 R(r) SS H02 H02 H1234 H02 H5678 ETX BCC
ASCII value H06
H303
1
H52(72) H5353 H3032 H3032 H31323334 H3032 H35363738 H03
3) For NAK response after execution of command (PC ← XGB)
Format name Header Station No. Command Command type Error code
Tail
Frame
check
Ex. of frame NAK H01 R(r) SS Error code (2 Byte) ETX BCC
ASCII value H15 H3031 H52(72) H5353 Error code (4 Byte) H03
XGB main unit