Specifications
7. Application Instructions
© DELTA ELECTRONICS, INC. ALL RIGHTS RESERVED
7-13
Ϩʳ Program which executes the FOR to NEXT instructions when X7 is off.
It does not execute the FOR to NEXT instructions when X7 is on.
D
10 CMP
S1 S2 D Comparison Output
Bit device Word device
Device
Operand
X Y M S K H KnX KnY KnM KnS T C D E F
S1
ϨϨϨϨϨϨϨϨϨϨϨ
S2
ϨϨϨϨϨϨϨϨϨϨϨ
D
ϨϨϨ
This function compares the two values that are considered BIN values.
In the case of comparing hexadecimal. If a numeric value (8 to F)
having 1 at the highest bit (B15 in a 16-bit instruction or B31 in a 32-bit
instruction) is specified, the comparison will regard the value as the
negative of the BIN value.
The comparison instructions verifies 3 items (=, >, <) between the data
S1
and
S2
. See the example below.
X0
CMP K10 C10 M0
M2
M1
M0
K10 > C10 , ON
K10 = C10 , ON
K10 < C10 , ON
Ϩʳ If
D
is set to M0, then M0, M1, M2 will work as the program
example as above.
D
11 ZCP
S1 S2 S D Zone comparison
Bit device Word device
Device
Operand
X Y M S K H KnX KnY KnM KnS T C D E F
S1
ϨϨϨϨϨϨϨϨϨϨϨ
S2
ϨϨϨϨϨϨϨϨϨϨϨ
S
ϨϨϨϨϨϨϨϨϨϨϨ
D
ϨϨϨ
Compare the value of Operand
S
with its limits
S1
and
S2
.
If
D
is set to M0, then M0, M1, and M2 will work as follows.
X0
ZCP K10 K100 C10
M2
M1
M0
M0
C10 value < K10 , ON
K10 < = C10 value <= K100 , ON
C10 value > K100, ON
D
12 MOV
S D Data movement
Bit device Word device
Device
Operand
X Y M S K H KnX KnY KnM KnS T C D E F
S
ϨϨϨϨϨϨϨϨϨϨϨ
D
Ϩ Ϩ Ϩ ϨϨϨϨϨ
Transfers the data of device
S
to the device
D
.
If the calculation result is a 32-bit output, (i.e. the application MUL) and
the data of a 32-bit high-speed counter, users will have to use DMOV