Delta AH500 — 6.1.2 Explanation of Comparison Instructions

Chapter 6 0BApplied Instructions Example: The data in D0~D3 are compared with that in D10~D13. If the comparison result is that the data in D0~D3 is the same as that in D10~D13, Y0.1~Y0.4 will be ON. Comparison result D0 1000 Comparison sign D10 1000 Y0.1 1 D1 2000 = D11 1000 Y0.2 0 4000 D3 D2 3000 1000 D13 D12 1000 Y0.3 0 Y0.4 0 Additional remark: 1. If the value in the operand n is not within the range between 1 and 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-32 API 16-bit Comparison operation result number instruction ON OFF 0059 CMPT= S =S 1 2 S ≠S 1 2 0060 CMPT<> S ≠S 1 2 S =S 1 2 0061 CMPT> S >S 1 2 S ≦S 1 2 0062 CMPT>= S ≧S 1 2 S <S 1 2 0063 CMPT< S <S 1 2 S ≧S 1 2 0064 CMPT<= S ≦S 1 2 S >S 1 2