Delta DVP-ES3 — 6.1.2 Explanation of Comparison Instructions

Chapter 6 Applied Instructions Symbol S 1 : Floating-point comparison value1 S 2 : Floating-point comparison value2 D : Comparison result 6_ Explanation 1. This instruction compares the floating-point numbers in S 1 and S 2 , and stores the comparison results ( >,=,< ) in D . 2. The operand D occupies three consecutive devices. The comparison results are stored in D , D +1, and D +2. If the value in S 1 is greater than the value in S 1 , D is ON. If the value in S 1 is equal to the value in S 2 , D +1 is ON. If the value in S 1 is less than the value in S 2 , D +2 is ON. Example 1. If the operand D is M10, the comparison results is stored in M10, M11 and M12, as shown below. 2.

When M0 is ON, the FCMP instruction is executed. M10, M11, or M12 is ON. When M0 is OFF, the FCMP 3. If you want to get the comparison result ≧ , ≦ , or ≠, connect M10–M12 is series or in parallel. instruction is not executed and the state of M10, the state of M11, and the state of M12 remain unchanged. 4. If you want to clear the comparison result, use the RST or ZRST instruction.

6-29 API Instruction code Operand Function 0056 FCMP P S1,S2,D Comparing floating-point 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