Delta AH500 Programming Manual page 236

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
0059~
CMPT※
0064
Device X Y
M
S
 
S
1
 
S
2
 
n
 
D
Symbol:
Explanation:
1.
The instruction is used to compare n pieces of data in devices starting from S
devices starting from S
comparison results are stored in D.
2.
The operand n should be within the range between 1 and 256.
3.
The value which is written into the operand D is a one-bit value.
4.
When the results gotten from the comparison by using the instruction CMPT# are that all
devices are ON, SM620 is ON. Otherwise, SM620 is OFF.
5.
If the operand S
is a device, the comparison will be as shown below.
1
1234(BIN)
S 1
5678(BIN)
S 1
+1
5000(BIN)
S 1
+2
n
1000(BIN)
S 1
+3
10(BIN)
S 1
+( N- 2)
90(BIN)
S 1
+( N- 1)
6.
If the operand S
is a constant within the range between -32768 and 32767, the comparison
1
will be as shown below.
Compar iosn sign
S 1
3333(BIN)
7.
The corresponding comparison operation results of the instructions are listed below.
Operand
P
S
, S
, n, D
1
2
T
C
HC
D
Pulse instruction 16-bit instruction (9 steps) 32-bit instruction
AH500
: Source device 1
S
1
: Source device 2
S
2
n : Data length
D : Comparison result
. The values compared are signed decimal numbers, and the
2
S 2
S 2
+1
Compar ison sign
S 2
+2
>
S 2
+3
S 2
+( N- 2)
S 2
+( N- 1)
1111(B IN)
S 2
2222(BIN)
S 2
+1
3333(BIN)
S 2
+2
=
4444(BIN)
S 2
+3
8888(BIN)
S 2
+( N- 2)
9999(BIN)
S 2
+( N- 1)
Comparing the tables
L
SM SR
E
PR
AH500
Word
Word
Word
Bit
1111(B IN)
2222(BIN)
3333(BIN)
n
4444(BIN)
8888(BIN)
9999(BIN)
n
D
D
Function
K
16# "$"
DF
with those in
1
Compar ison result
1
D
1
D
+1
1
D
+2
0
D
+3
0
D
+( N- 2)
0
D
+( N- 1)
Compar ison result
0
D
0
D
+1
1
D
+2
0
D
+3
0
+( N- 2)
0
+( N- 1)
6 - 3 1

Advertisement

Table of Contents
loading

Table of Contents