10.3 High-speed Counter Instruction
10-17
Sample program
For FP0H mode
R101
DT90300K0
F1 DMV
K5000
K0
F167 HC1R
Y0
R100
( )
DF
R101
X5
( )
DF
R100
R100
R9110
R103
R101
Y0
< >
SET
R9110
( )
DF/
R103
R103
R100
T0
K5TMX 0
1
2
3
4
5
10
11
Y1
< >
SET
6
R100
DT90300K4500
F61 DCMP
7
R100
R102
8
R900C
R102
( )
DF
Y1
9
< >
RST
①
Positioning operation is running.
②
Positioning operation starts.
③
Resets the elapsed value of the high-speed counter CH0.
④
Target value match OFF instruction: Y0 turns off when the elapsed value of the high-speed counter
CH0 reaches 5000 pulses.
⑤
Sets Y0 (inverter operation signal).
⑥
Sets Y1 (inverter high-speed signal).
⑦
32-bit data comparison instruction: R900C turns on when the elapsed value of the high-speed counter
CH0 is larger than 4500 pulses.
⑧
Arrival at deceleration point
⑨
Resets Y1 (inverter high-speed signal).
⑩
Positioning done pulse (0.5 sec)
⑪
0.1-second timer: Sets K5. It is used as 0.5-second timer.
(Note): The allocations of control active flags and elapsed value areas for the FPΣ mode are different.
For details of the allocation of flags, refer to "12.2.4 When Using High-speed Counter Function".