546
7 APPLICATION INSTRUCTION
7.16 Check code
• 8-bit conversion mode (while SM8161 is ON)
With regard to (n) data points starting from (s), the addition data and horizontal parity data of only low-order 8 bits are stored to (d) and (d)+1 respectively.
SM8161 is shared with the RS2, ASCI(P), HEX(P), and CRC(P) instructions. SM8161 must always be on in the 8-bit mode.
SM8161 is cleared when the CPU module mode is changed from RUN to STOP.
In the following program, conversion is executed as follows:
Error code
(SD0/SD8067)
Description
2820 The device range specified by (s) or (d) exceeds the corresponding device range.
3405 The value specified by (n) is outside the following range.
1 to 32767
(s)
D100 K100 = 0 1 1 0 0 1 0 0
K111 = 0 1 1 0 1 1 1
D105
D106
D107
D109
D108
D101
K100 = 0 1 1 0 0 1 0 0
K 98 = 0 1 1 0 0 0 1 0
D102
D103
D104
K123 = 0 1 1 1 1 0 1
K 66 = 0 1 0 0 0 0 1 0
K100 = 0 1 1 0 0 1 0 0
K 95 = 0 1 0 1 1 1 1
K210 = 1 1 0 1 0 0 1 0
K 88 = 0 1 0 1 1 0 0 0
K1091
1 0 0 0 0 1 0
CCD D100 D0 K10
SM400
SM8161
X10




0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 1
D0
0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1
D1
Example of data contents
(1)
(1)
(1)
Total
Horizontal parity (1)
8-bit conversion mode
When the number of "1" is odd, the horizontal parity is "1".
When the number of "1" is even, the horizontal parity is "0".
1091 in BCD.
Horizontal parity
Ignored Low-order 8 bits
16 bits
Source data