Delta DVP-ES3 — 6.1.2 Explanation of Comparison Instructions

Chapter 6 Applied Instructions Symbol S 1 : Source device 1 S 2 : Source device 2 n : Data length D : Comparison result 6_ Explanation 1. This instruction compares n signed decimal numbers in devices starting at S 1 with those in devices starting at S 2 , and then stores the comparison results in D . 2. The operand n must be between 1–256. 3. The value that is written into the operand D is a one-bit value. 4. When the results of the comparison using the CMPT# instruction are that all devices are ON, SM620 is ON. Otherwise, SM620 is OFF. 5. If the operand S 1 is a device, the comparison is as shown below.

S1 1234(BIN) 5678(BIN) 5000(BIN) 1000(BIN) S2 1111(B IN) 2222(BIN) 3333(BIN) 4444(BIN) D Comparison result 1 1 1 0 S1 S1 +2 Comparison sign +1 S2 S2 +2 +3 +1 D D +2 +3 +1 S1 +3 n > S2 n D S1 +(N-2) ~ 10(BIN) 90(BIN) S2 +(N-2) ~ 8888(BIN) 9999(BIN) D +(N-2) ~ 0 0 +(N-1) S1 +(N-1) S2 +(N-1) D 6-35 API Instruction code Operand Function 0059-0064 CMPT※ P S1,S2,n,D Comparing tables Device X Y M S T C HC D FR SM SR E K 16# “$” F S1        S2      n         D      BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S1    S2    n    D  Pulse Instruction 16-bit instruction 32-bit instruction ES3 ES3 -