Mitsubishi MELSEC iQ-F FX5 series Programming Manual page 547

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

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
D100
D0
(s)
Example of data contents
D100
lowest-order byte
K100 = 0 1 1 0 0 1 0 0
D100
highest-order byte
K111 = 0 1 1 0 1 1 1
D101
lowest-order byte
K100 = 0 1 1 0 0 1 0 0
D101
highest-order byte
K 98 = 0 1 1 0 0 0 1 0
lowest-order byte
D102
K123 = 0 1 1 1 1 0 1
D102
highest-order byte
K 66 = 0 1 0 0 0 0 1 0
D103
lowest-order byte
K100 = 0 1 1 0 0 1 0 0
D103
highest-order byte
K 95 = 0 1 0 1 1 1 1
lowest-order byte
D104
K210 = 1 1 0 1 0 0 1 0
D104
highest-order byte
K 88 = 0 1 0 1 1 0 0 0
Total
K1091
Horizontal parity
1 0 0 0 0 1 0
0
0
0
0
0
D0
D1
0
0
0
0
0
16-bit conversion mode
SM8161
K10
(1)
(1)
(1)
(1)
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
1
0
0
0
0
0
1
0
0
0
0
0
1
1
1091 in BCD.
0
1
0
1
Horizontal parity
7 APPLICATION INSTRUCTION
7.16 Check code
7
545

Advertisement

Table of Contents
loading

Table of Contents