
High-speed
Counter Function
10-24
10.4.3 Sample Program (Upper Limit Control, Instruction Clear, Addition)
The following shows the program for performing two cam outputs (R100, R101) according to
the elapsed value of the high-speed counter CH0. In the case of addition, when the elapsed
value reaches the target value (ON set value), the cam output turns on, and when it reaches
the target value (OFF set value), it turns off. When it reaches the target value (ON set value),
the interrupt program is started. When the elapsed value exceeds the upper limit, it returns to
0. The instruction is cleared by the high-speed counter control instruction F0 (MV).
Code
Value
Description
ⓐ
Positive maximum
value
When the instruction clear is executed, the upper limit control is canceled and
the counting continues up to the positive maximum value.
ⓑ
Upper limit
When the elapsed value exceeds the upper limit, it returns to 0.
ⓒ
Target value 2: OFF
set value
The cam output is performed according to the target values.
In this example, the ON set value is smaller than the OFF set value for each
target value. Therefore,
When added: When the elapsed value reaches the ON set value, the cam
output turns on, and when it reaches the OFF set value, it turns off.
When subtracted: When the elapsed value falls below the OFF set value, the
cam output turns on, and when it falls below the ON set value, it turns off.
ⓓ
Target value 2: ON
set value
ⓔ
Target value 1: OFF
set value
ⓕ
Target value 1: ON
set value
①
Execution condition
When the execution condition turns on from off, the instruction is executed
and the cam control starts.
②
High-speed counter
instruction active flag
The high-speed counter instruction active flag turns on during the execution of
the instruction. When the high-speed counter control instruction F0 (MV) is
executed, it turns off.
③
Cam output
The output turns ON/OFF according the set values.
④
Interrupt
In the case of addition, when the elapsed value reaches the ON set value, the
interrupt program is started.
⑤
Clear high-speed
counter instruction
By the high-speed counter control instruction F0 (MV), when the bit 3 of the
special data register DT90052 turns on from off, the executed F165 (CAM0)
instruction is cleared.
Summary of Contents for FP0H Series
Page 1: ......
Page 11: ...1 Functions of Unit and Restrictions on Combination ...
Page 19: ...2 Wiring ...
Page 23: ...3 Power ON and OFF and Items to Check ...
Page 30: ...Power ON and OFF and Items to Check 3 8 ...
Page 31: ...4 Settings of Control Unit ...
Page 52: ...Settings of Control Unit 4 22 ...
Page 53: ...5 Operation Patterns ...
Page 89: ...6 Operating Characteristics ...
Page 93: ...7 Instruction References ...
Page 124: ...Instruction References 7 32 ...
Page 125: ...8 Troubleshooting ...
Page 133: ...9 PWM Output Function ...
Page 140: ...PWM Output Function 9 8 ...
Page 141: ...10 High speed Counter Function ...
Page 151: ...10 3 High speed Counter Instruction 10 11 MEMO ...
Page 170: ......
Page 171: ...11 FPΣ Mode ...
Page 180: ...FP Mode 11 10 ...
Page 181: ...12 Specifications ...
Page 196: ...Specifications 12 16 ...
Page 198: ......
Page 199: ......
Page 200: ......