Example:
1.
Define the following parameters as below.
CurNo
(Current Group
Number)
1
2
3
4
5
6
2.
When M0 is ON, the instruction is executed.
The instruction is firstly executed, comparing the current counter value and the value set in CmpS (HC202).
And set the value in CurNo to 1 and Y0.4 output to ON accordingly.
When the current counter value reaches 2000, CurNo = 2 and Y0.5 is ON.
When the current counter value reaches 3000, CurNo = 3 and Y0.6 is ON.
When the current counter value reaches 4500, CurNo = 4 and Y0.4 is OFF.
When the current counter value reaches 5500, CurNo = 5 and Y0.5 is OFF.
When the current counter value reaches 6500, CurNo = 6 and Y0.6 is OFF.
The external interrupt is triggered to clear. CurNo = 0 and HC202 = 0.
When the current counter value reaches 1000, CurNo = 1 and Y0.4 is ON.
External interrupt is triggered at X0.4.
CmpS
(The source value of data in 32-
bit to be compared)
D100 = 1000
D102 = 2000
D104 = 3000
D106 = 4500
D108 = 5500
D110 = 6500
Ch ap te r 6 Ap pl ie d Instruc ti ons
Action
(Action to be taken when
the comparison is made.)
D200 = 1 (Set)
D201 = 1 (Set)
D202 = 1 (Set)
D203 = 0 (Reset)
D204 = 0 (Reset)
D205 = 0 (Reset)
Yno
(The number of
Y output point)
D300 = 16#04 (Y0.4)
D301 = 16#05 (Y0.5)
D302 = 16#06 (Y0.6)
D303 = 16#04 (Y0.4)
D304 = 16#05 (Y0.5)
D305 = 16#06 (Y0.6)
6 - 3 0 7
6_