Delta DVP-ES3 — 6.2.2 Explanation of Arithmetic Instructions

Chapter 6 Applied Instructions 6.2.2 Explanation of Arithmetic Instructions Symbol S 1 : Augend S 2 : Addend D : Sum 6_ Explanation 1. This instruction adds the binary value in S 2 to the binary value in S 1 , and stores the sum in D . 2. Only the 32-bit instructions can use the 32-bit counter, but not the device E. 3. Instruction flags: SM600 (zero flag), SM601 (borrow flag), and SM602 (carry flag) 4. When the operation result is zero, SM600 is ON. Otherwise, it is OFF. 5. For 16-bit binary values, when the operation result exceeds the range of 16-bit binary values, SM602 is ON. Otherwise, it is OFF.

6-47 API Instruction code Operand Function 0100 D + P S1,S2,D Adding binary numbers Device X Y M S T C HC D FR SM SR E K 16# “$” F S1          S2          D       BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S1        S2        D        Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 ES3