10.4 High-speed Counter Cam Control Instruction
10-25
Sample program
For FP0H mode
R9013
R0
( )
DF F165 CAM0 DT100
H10 DT100F1 DMV
K1 DT102F1 DMV
K10 DT104F1 DMV
K2
DT106
F1 DMV
K1000
DT108F1 DMV
K5000 DT110F1 DMV
K7000
DT112F1 DMV
K9000 DT114F1 DMV
K11000 DT116F1 DMV
K0 DT90300F1 DMV
R1
( )
DF
H8 DT90052F0 DMV
H0 DT90052F0 DMV
R9110
①
②
④
③
⑥
⑤
⑧
⑦
⑩
⑨
⑪
⑫
⑬
①
High-speed counter channel H10: Performs the upper limit control. CH0
②
Cam output device type K1: Internal relay (R)
③
Word number of cam output device K10
④
Specification of the number of target values K2
⑤
Target value 1: ON set value K1000
⑥
Target value 1: OFF set value K5000
⑦
Target value 2: ON set value K7000
⑧
Target value 2: OFF set value K9000
⑨
Upper limit value K11000
⑩
Presets 0 as the elapsed value.
⑪
Executes the F165 (CAM0) instruction and starts the cam control.
⑫
Clears the executed F165 (CAM0) instruction by turning the DT90052 (bit 3) off -> on -> off.
(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".