Delta AH500 Programming Manual page 228

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

AH 5 00 Pr ogr am m ing Ma n ua l
API
Instruction code
0054
D
CMP
Device
X
Y
M
S
1
S
2
D
Symbol:
Explanation:
1.
The instruction is used to compare the value in S
are singed decimal numbers. The comparison results are stored in D.
2.
The operand D occupies three consecutive devices. The comparison results are stored in D,
D+1, and D+2. If the comparison value in S
be ON. If the comparison value in S
comparison value in S
3.
Only the instructions DCMP and DCMPP can use the 32-bit counter.
Example:
1.
If the operand D is M0, the comparison results will be stored in M0, M1 and M2, as shown
below.
2.
When X0.0 is ON, the instruction CMP is executed. M0, M1, or M2 is ON. When X0.0 is OFF,
the execution of the instruction CMP stops. The state of M0, the state of M1, and the state of
M1 remain unchanged
3.
If users want to clear the comparison result, they can use the instruction RST or ZRST.
Operand
P
S
, S
, D
1
2
S
T
C
HC
D
Pulse instruction 16-bit instruction (7 steps) 32-bit instruction (7 steps)
AH500
: Comparison value 1
S
1
: Comparison value 2
S
2
D : Comparison result
is greater than the comparison value in S
1
is equal to the comparison value in S
1
is less than the comparison value in S
1
.
Comparing the values
L
SM SR
E
PR
AH500
Word/Double word
Word/Double word
Bit
with that in S
, and the values compared
1
2
, D+2 will be ON.
2
Function
K
16# "$" DF
AH500
, D will
2
, D+1 is ON. If the
2
6 - 2 3

Advertisement

Table of Contents
loading

Table of Contents