Delta DVP-ES2 — 3.8 Detailed Instruction Explanation

3. Instruction Set Operands: S : source data D : Destination device for storing check sum n : Number of byte ( n = 1~256) Explanations: 1. This instruction performs a sum check for ensuring the validity of the communication data. 2. 16-bit conversion: If M1161 = OFF, n bytes of data starting from low byte of S will be summed up, the checksum is stored in D and the parity bits are stored in D+1 . 3. 8-bit conversion: If M1161 = ON, n bytes of data starting from low byte of S (only low byte is valid) will be summed up, the check sum is stored in D and the parity bits are stored in D+1 . Program Example 1: 1. M1161 = OFF, 16-bit conversion. 2.

When X0 = ON, 6 bytes from low byte of D0 to high byte of D2 will be summed up, and the checksum is stored in D100 while the parity bits are stored in D101. M1000 M1161 X0 The parity is 1 when there is an odd number of 1. The parity is 0 when there is an even number of 1. Total D100 D101 Parity 3-253 API Mnemonic Operands Function Check Code Controllers 84 CCD P ES2/EX2 SS2 SA2 SX2 SE Type OP Bit Devices Word devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F CCD, CCDP:

7 steps S * * * * * * * D * * * * * n * * * 16-bit 32-bit SA2 SA 2 SX2 SA2 SS2 SX2 ES2/EX2 SS2 ES2/EX2 SS2 SX2 SE SE SE CCD D0 D100 K6 (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