High-speed Counter Function
10-12
10.3.3 [F166 HC1S] High-speed Counter Target Value Match ON Instruction
[F167 HC1R] High-speed Counter Target Value Match OFF Instruction
Turns on or off the specified output when the elapsed value of the high-speed counter
matches the target value set by the operand.
Instruction format
R0
K10000H0
F166 HC1S
Y2
n
( )
DF
DS
Operand
n Target channel number of the high-speed counter for the match output
S
Target value data of the high-speed counter or the starting number of the area storing data
D
Output coil which turns on or off when the values match (Y0 to Y1F)
Memory area type that can be specified
Operand WX WY WR WL SV EV DT LD I
Constant
Index
modifier
A
A
A
A
A
A
A
A
A
A
A
A
A
A
Outline of operation
• Sets the value specified by [S] as the target value of the high-speed counter, and controls
the specified output [Yn] when the elapsed value matches the target value. This operation is
executed as an interrupt processing.
• In the case of [F166 HC1S] instruction, the output turns on from off. In the case of [F167
HC1R] instruction, the output turns off from on.
• Stores the value of [S] in the target value area when the instruction is executed.
• Clears the setting of the target value and the control of the target value match output when
the value matches the target value.
• For resetting the output turned ON/OFF when the values match, use the RST instruction or
F0 (MV) instruction, or use the F166 (HC1R) instruction and F167 (HC1R) instruction in a
pair.