7 Applied Instructions
7.9 External Device (optional device)
416
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
Function and operation explanation
1. 16-bit operation(CCD/CCDP)
The addition data and horizontal parity of the data stored in the device specified by are calculated, and
the addition data and the horizontal parity are stored in the device specified by .
In this instruction, the mode usable when calculating includes 16-bit mode and 8-bit mode. As for the
operation of each mode, refer to the following pages.
2. <16-bit conversion mode> When M8161=OFF(M8161 is used commonly with RS, ASCI, HEX,
CRC instructions)
Of the data of n points starting from the device specified by , the addition data and the horizontal parity
data of higher and lower 8 bits are stored in the device specified by .
M8161 is used commonly with RS, ASCI, HEX, CRC instructions. When using in 16 bits, you must keep
always OFF.
M8161 is cleared when changed from RUN to STOP.
Example of 16-bit conversion
In the case of the program shown below, the conversion is executed as follows.
Example of data content
D 100 lower K100 = 01100100
D 100 higher K111
= 0110111
←
D 101 lower K100 = 01100100
D 101 higher K 98 = 01100010
D 102 lower K123
= 0111101
←
D 102 higher K 66 = 01000010
D 103 lower K100 = 01100100
D 103 higher K 95
= 0101111
←
D 104 lower K210 = 11010010
D 104 higher K 88 = 01011000
Total K1091
Horizontal parity
1000010
←When the number of "1" is an odd number, the horizontal parity is 1.
When the number of "1" is an even number, the horizontal parity is 0.
CCD
EN
s
n
ENO
d
Command input
Head object device
Number of data
Head storage destination
device of calculated data
CCD
EN
s
n
ENO
d
M8000
16-bit mode
OUT
EN ENO
d
M8161
Command input
Head object device Head storage destination
device of calculated data
Number of data
X010
CCD
EN
s
ENO
d
n
D100
K10
D0
M8000
OUT
EN ENO
d
M8161
16-bit mode