Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 646

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Processing details
• These instructions calculate the addition data and horizontal parity value of data stored in (s) to (s)+(n)-1. The addition data
is stored to (d), and the horizontal parity value is stored to (d)+1. The 16-bit mode and 8-bit mode are available for these
instructions. For the operation in each mode, refer to the proceeding pages.
• 16-bit conversion mode (while SM8161 is OFF)
With regard to (n) data points starting from (s), the addition data and horizontal parity data of high-order 8 bits and 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 off in the 16-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:
SM400
X10
CCD
(s)
D100
lowest-order byte
D100
highest-order byte
D101
lowest-order byte
D101
highest-order byte
D102
lowest-order byte
D102
highest-order byte
D103
lowest-order byte
D103
highest-order byte
D104
lowest-order byte
D104
highest-order byte
Total
Horizontal parity
0
0
0
D0
D1
0
0
0
8 APPLICATION INSTRUCTION
644
8.21 Check Code
SM8161
D100
D0
K10
Example of data contents
K100 = 0 1 1 0 0 1 0 0
K111 = 0 1 1 0 1 1 1
(1)
K100 = 0 1 1 0 0 1 0 0
K 98 = 0 1 1 0 0 0 1 0
K123 = 0 1 1 1 1 0 1
(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
(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
(1)
0
0
1
0
0
0
0
0
0
0
0
1
16-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".
1
0
0
0
0
1
0
0
0
0
1
0
1
1091 in BCD.
1
Horizontal parity

Hide quick links:

Advertisement

loading