Delta DVP-ES2 — 3.8 Detailed Instruction Explanation

3. Instruction Set API 121 Operands: S 1 : Minuend S 2 : Subtrahend D : Subtraction result Explanation: 1. S 1  S 2  D . The floating point value in S 2 is subtracted from the floating point value in S 1 and the result is stored in D . The subtraction is conducted in binary floating point format. 2. If S 1 or S 2 is designated as constant K or H, the instruction will convert the constant into a binary floating point value before the operation. 3. S 1 and S 2 can designate the same register. In this case, if the instruction is specified as the register will be subtracted once in every scan. “continuous execution instruction” (generally DESUBP instruction) and the drive contact is ON, 4.

Flags: M1020 (Zero flag), M1021 (Borrow flag) and M1022 (Carry flag) If absolute value of the result exceeds max. floating point value, carry flag M1022 = ON. If absolute value of the result is less than min. floating point value, borrow flag M1021 = ON. If the conversion result is 0, zero flag M1020 = ON. Program Example 1: When X0 = ON, binary floating point value (D1, D0) minuses binary floating point value (D3, D2) and the result is stored in (D11, D10). X0 Program Example 2: When X2 = ON, K1234 (automatically converted into binary floating point value) minuses binary floating point (D1, D0) and the result is stored in (D11, D10).

X2 3-329 Mnemonic Operands Function Controllers D ESUB P Floating point subtraction ES2/EX2 SS2 SA2 SX2 SE Typ e OP Bit Devices X Y M S Word devices Program Steps Y M S K H KnX KnY KnM KnS T C D E F DESUB, DESUBP: 13 steps S 1 * * * S 2 * * * D * PULSE 16-bit 32-bit SA2 SA2 SA2 ES2/EX2 SS2 SX2 ES2/EX2 SS2 SX2 ES2/EX2 SS2 SX2 SE SE SE DESUB D0 D2 D10 DESUB K1234 D0 D10