330
4
4 Instructions4.12.4 Other Peripheral Instructions
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S1 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
S2 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
n X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
◆
Function
Multi-segment comparison is performed for cam control. The data table and counters used by comparison
are congured in incremental mode. This instruction is executed during the scan process of the main
program. The comparison result is affected by scan delay.
The complete ag M8029 is set to ON after comparison of n data entries is completed.
Example:
X10
〔INCD D100 C20 M0 K5 〕
S1 S2 D n
〔C20 K400〕
M8013
Assume that related variables are assigned values as follows. When X10 = ON, the execution result is
shown in the following gure.
Comparison
Point
Comparison
Output
D100=40
D101=50
D102=20
D103=60
M 0
M 1
M 2
M 3
40
50
C20
S1
n
D
S2
30104D=
M 4
20
60
30
40
50
40
0
1
2
3
4
0
1
2
0
1
C21
M0
M1
M2
M3
M4
X10
M8029
Usage:
• Before the INCD instruction is executed, use the MOV instruction to assign values to variables of the related table.
• The comparison result is affected by the scan delay of the user program. The HSZ instruction for high-speed
comparison can be used for applications that require timely response.