High-speed Counter/Pulse Output Instructions
Flags
Example
000000
3-21-5 SPEED OUTPUT: SPED(885) (CJ1M-CPU21/22/23 Only)
Purpose
Ladder Symbol
Name
Error Flag
ER
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.
@CTBL
#0000
High-speed counter input 0
Register target comparison table
#0000
and start comparison
D00100
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 CJ1M-CPU21/22/23 CPU Units only.
SPED(885)
P
M
F
Label
ON if the specified range for P or C is exceeded.
ON if the number of target values specified for target
value comparison is set to 0.
ON if the number of target values specified for target
value comparison exceeds 48.
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 set values for all ranges are disabled during a
range comparison.
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 an instruction is executed when the high-speed
counter is set to Ring Mode and the specified value
exceeds the maximum ring value.
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.
D00100
0002
D00101
01F4
D00102
0000
0001
D00103
D00104
03E8
D00105
0000
D00106
0002
P: Port specifier
M: Output mode
F: First pulse frequency word
Section 3-21
Operation
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
883
Need help?
Do you have a question about the SYSMAC CJ - REFERENCE MANUAL 01-2008 and is the answer not in the manual?
Questions and answers