Delta DVP-ES2 — 3.8 Detailed Instruction Explanation

3. Instruction Set API 115 Operands: S 1 : Dividend S 2 : Divisor D : Quotient Explanations: 1. DIV16 and DIV16P are 16-bit instructions. DIV32 and DIV32P are 32-bit instructions. 2. The singed binary value in S 1 is divided by the signed binary value in S 2 , and the quotient is stored in D . It is not a normal algebraic regulation. Notice the sign bits in S 1 , S 2 , and D in 16-bit binary division and 32-bit binary division. 3. If the divisor is 0, the instruction will not be executed, M1067 and M1068 will be ON, and the error code in D1067 will be H0E19. 4. The models which are supported are DVP-ES2/EX2 v. 3.22, DVP-SS2 v. 3.20, DVP-SA2/SX2 v. 2.66, and DVP-SE v. 1.60 (and above). 5.

16-bit binary division S 1 D S 2 b15................ b0 / = b15................ b0 b15................ b0 b15 is a sign bit. b15 is a sign bit. b15 is a sign bit. If D is a bit device, users can use K1~K4, and form 16 bits. D only occupies 16 bits. 6. 32-bit bianry division Quotient Remainder S 1 S 2 S 1 S 2 +1 D D +1 D +3 D +2 +1 b15.....b0 b15.....b0 b15.....b0 b15.....b0 b15.....b0 b15.....b0 b15.....b0 b15.....b0 / = If D is a word device, users can use K1~K8, and forms 32 bits. D only occupies 32 bits.

3-321 Mnemonic Operands Function Controllers ES2/EX2 SS2 SA2 SX2 SE DIV16 DIV32 P 16-bit binary division 32-bit binary division Controllers ES2/EX2 SS2 SA2 SX2 SE Typ e OP Bit Devices Word devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F DIV16, DIV16P: 7 steps DIV32, DIV32P: 13 steps S 1 * * * * * * * * * * S 2 * * * * * * * * * * D * * * * * * * PULSE 16-bit 32-bit SS2 SA2 SA2 SA2 ES2/EX2 SX2 ES2/EX2 SS2 SX2 ES2/EX2 SS2 SX2 SE SE SE