
70
Note:
If the DLE (10h) is included in data other than the header or terminator, the DLE is applied to the front of the
header before the data is transferred. When performing data packing (data packetizing) using a device other than
the communications adapter, the applied DLE must be deleted by CRC calculation and retrieving the transferred
data.
Received packet analysis example
Received data (hexadecimal notation)
10h 02h 00h 11h 00h 00h 31h 32h 33h 34h 35h 36h 37h 38h 0Dh A3h C6h 10h 03h
(1) Confirm data length.
Data length stored in received data = 0011h = 17 bytes
Data length of received data = 17 bytes
(2) Confirm CRC.
1) Set CRC value to 0.
2) Retrieve the first data byte (00h).
3) Shift CRC value 1 bit to the left.
When there are too many digits due to the shift, XOR the 1021h at the CRC value.
4) Shift the retrieved data 1 bit to the left.
When there are too many digits due to the shift, XOR the 0001h at the CRC value.
5) Repeat the calculations in 3) and 4) 8 times.
6) Retrieve the second data byte (13h).
7) Repeat the calculations in 3) and 4) 8 times.
8) Repeat this calculation up to the final byte.
9) Finally, perform the same calculation on 2 byte CRC storage area (A3h C6h).
Data
CRC
-
0000h
00h
0000h
11h
1100h
00h
0011h
00h
0108Ah
31h
BD49h
32h
ED78h
33h
CC22h
34h
36DCh
35h
29D7h
36h
941Bh
37h
99C6h
38h
9BA3h
0Dh
9A0Ah
A3h
0CC0h
C6h
0000h
(3) If the result of the calculation is 0000h, data has been received successfully.
If the result of the calculation is a value other than 0000h, data has not been received successfully.
Transmission data
Reserve
Data length
CRC
Header
Terminator
Container number