
High-speed
Counter Function
10-26
10.4.4 Sample Program (Upper Limit Control, Subtraction)
The following shows the program for performing three cam outputs (R100-R102) according to
the elapsed value of the high-speed counter CH0. In the case of subtraction, when the
elapsed value falls below the target value (OFF set value), the cam output turns off, and when
it falls below the target value (ON set value, the cam output turns on. When it falls below the
target value (OFF set value), the interrupt program is started. When the elapsed value falls
below 0, it returns to the upper limit.
Code
Value
Description
ⓐ
Upper limit
When the elapsed value falls below 0, it returns to the upper limit.
ⓑ
Elapsed value
The control is started from the elapsed value when executed. In this example,
the elapsed value 13000 is preset.
ⓒ
Target value 3: 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 any
target values. Therefore,
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.
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.
ⓓ
Target value 2: OFF
set value
ⓔ
Target value 1: OFF
set value
ⓕ
Target value 3: ON
set value
ⓖ
Target value 2: ON
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.
③
Cam output
The output turns ON/OFF according the set values.
④
Interrupt program
activation
In the case of subtraction, when the elapsed value falls below the OFF set
value, the interrupt program is started.
Содержание FP0H Series
Страница 1: ......
Страница 11: ...1 Functions of Unit and Restrictions on Combination ...
Страница 19: ...2 Wiring ...
Страница 23: ...3 Power ON and OFF and Items to Check ...
Страница 30: ...Power ON and OFF and Items to Check 3 8 ...
Страница 31: ...4 Settings of Control Unit ...
Страница 52: ...Settings of Control Unit 4 22 ...
Страница 53: ...5 Operation Patterns ...
Страница 89: ...6 Operating Characteristics ...
Страница 93: ...7 Instruction References ...
Страница 124: ...Instruction References 7 32 ...
Страница 125: ...8 Troubleshooting ...
Страница 133: ...9 PWM Output Function ...
Страница 140: ...PWM Output Function 9 8 ...
Страница 141: ...10 High speed Counter Function ...
Страница 151: ...10 3 High speed Counter Instruction 10 11 MEMO ...
Страница 170: ......
Страница 171: ...11 FPΣ Mode ...
Страница 180: ...FP Mode 11 10 ...
Страница 181: ...12 Specifications ...
Страница 196: ...Specifications 12 16 ...
Страница 198: ......
Страница 199: ......
Страница 200: ......