Chapter 6 Applied Instructions Symbol S 1 : Minuend S 2 : Subtrahend n : Data length D : Difference 6_ Explanation 1. This instruction subtracts n pieces of data in devices starting from S 2 from those in devices starting from S 1 . The minuends and the subtrahends are binary values, and the instruction stores the differences in D . 2. The operand n must be between 1–256. 3. Only the 32-bit instructions can use the 32-bit counter. 4. When the operation result is zero, SM600 is ON. 5. For 16-bit instructions, when the operation result is less than –32,768, SM601 is ON. 6. For 16-bit instructions, when the operation result is larger than 32,767, SM602 is ON. 7.
For 32-bit instructions, when the operation result is less than –2,147,483,648, SM601 is ON. 6-67 API Instruction code Operand Function 0113 D BK- P S ,S ,n,D 1 2 Subtracting binary values in blocks Device X Y M S T C HC D FR SM SR E K 16# “$” F S 1 S 2 n D BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S 1 S 2 n D Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 ES3