7 Application Instructions API 50-99 The parity is 1 when there is a odd number of 1. The parity is 0 when there is a even number of 1. Total D100 D101 Parity Program Example 2: 1. M1161 = On: The 8-bit conversion mode 2. When X0 = On, the instruction will sum up 6 data stored in the register designated in D0 (8 bits as a unit; n = 6 indicates D0 ~ D5 are designated) and store the result in the register designated in D100. The parity bits are stored in D101. M1000 X0 Total The parity is 1 when there is a odd number of 1. The parity is 0 when there is a even number of 1.
D100 D101 Parity DVP-PLC APPLICATION MANUAL 7-128 (S) Content of data D0 low byte K100 = 0 1 1 0 0 1 0 0 D0 high byte K111 = 0 1 1 0 1 1 1 1 D1 low byte K120 = 0 1 1 1 1 0 0 0 D1 high byte K202 = 1 1 0 0 1 0 1 0 D2 low byte K123 = 0 1 1 1 1 0 1 1 D2 high byte K211 = 1 1 0 1 0 0 1 1 D100 K867 D101 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 000 M1161 CCD D0 D100 K6 (S) Content of data D0 low byte K100 = 0 1 1 0 0 1 0 0 D1 low byte K111 = 0 1 1 0 1 1 1 1 D2 low byte K120 = 0 1 1 1 1 0 0 0 D3 low byte K202 = 1 1 0 0 1 0 1 0 D4 low byte K123 = 0 1 1 1 1 0 1 1 D5 low byte K211 = 1 1 0 1 0 0 1 1 D100 K867 D101 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1