![Omron CJ1G-CPUxx Instructions Manual Download Page 802](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491802.webp)
781
High-speed Counter/Pulse Output Instructions
Section 3-21
• If there is no reason to execute an interrupt task, specify AAAA hex as the
interrupt task number. The range comparison results can be read with
PRV(881) or using the Range Comparison In-progress Flags.
Note An error will occur if the upper limit is less than the lower limit for any one
range.
Flags
Example
When CIO 000000 turns ON in the following programming example,
CTBL(882) registers a target value comparison table and starts comparison
for high-speed counter 0. The PV of the high-speed counter is counted incre-
mentally and when it reaches 500, it equals target value 1 and interrupt task 1
is executed. When the PV is incremented to 1000, it equals target value 2 and
interrupt task 2 is executed.
3-21-4 SPEED OUTPUT: SPED(885) (CJ1M-CPU22/CPU23 Only)
Purpose
SPED(885) is used to set the output pulse frequency for a specific port and
start pulse output without acceleration or deceleration. Either independent
mode positioning or continuous mode speed control is possible. For indepen-
dent mode positioning, the number of pulses is set using PULS(886).
SPED(885) can also be executed during pulse output to change the output
frequency, creating stepwise changes in the speed.
This instruction is supported by the CJ1M-CPU22/CPU23 CPU Units only.
Name
Label
Operation
Error Flag
ER
ON if the specified range for P or C is exceeded.
ON if the same target value is specified more than once in
the same comparison direction for target comparison.
ON if the upper value is less than the lower value for any
range.
ON if the high-speed counter is set for incremental pulse
mode and decrementing is set in the table as the direction
for comparison.
ON if specified for a port not set for a high-speed counter.
ON if executed for a different comparison method while
comparison is already in progress.
@CTBL
#0000
#0000
D00100
0002
01F4
0000
0001
03E8
0000
0002
000000
High-speed counter input 0
D00100
D00101
D00102
D00103
D00104
D00105
D00106
Two target values
Target value 1: 0000 01F4 hex (500)
Incrementing, Interrupt task number 1
Target value 2: 0000 03E8 hex (1000)
Incrementing, Interrupt task number 2
Register target comparison table
and start comparison
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...