DVP-ES3 Series Programming Manual 6. If the operand S 1 is a constant between -32768 to 32767, the comparison is as shown below. 1111(B IN) 2222(BIN) 3333(BIN) 4444(BIN) Comparison result 0 0 1 0 S2 S2 +1 D D +1 S1 n 3333(BIN) Compariosn sign = S2 S2 +2 +3 D D +2 +3 ~ 8888(BIN) 9999(BIN) ~ 0 0 +(N-1) S2 S2 +(N-2) +(N-1) D D +(N-2) 7. The corresponding comparison operation results of the instructions are listed in the following table. Example The data in D0–D3 are compared with that in D10–D13. If the comparison result is that the data in D0–D3 are the same as that in D10–D13, M11–M14 are ON.
_6 C ompari son resul t 比較結果 D0 1000 D10 1000 M11 1 D1 D2 3000 2000 D11 D12 1000 1000 M12 M13 0 0 4000 D3 1000 D13 0 M14 Additional remarks 1. If the value in the operand n is not between 1–256, the instruction is not executed, SM is ON, and the error code in SR0 is 16#200B. 2. If the number of devices specified by S 1 – S 1 + n , S 2 – S 2 + n , or D is insufficient, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003. 6-36 Comparison operation result API number 16-bit instruction ON OFF 0059 CMPT= S1=S2 S1≠S2 0060 CMPT<> S1≠S2 S1=S2 0061 CMPT> S1>S2 S1≦S2 0062 CMPT>= S1≧S2 S1<S2 0063 CMPT< S1<S2 S1≧S2 0064 CMPT<= S1≦S2 S1>S2 C om pari son 比較 si g符n 號 =