213
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Timer and Counter Instructions
3
Example 4: One-shot Bit
A TIM timer can be combined with OUT or OUT NOT to control how long a particular bit is ON or OFF.
In this example, CIO 2.04 will be ON for 1.5 seconds (the SV of T0001) after CIO 0.00 goes ON.
Example 5: Flicker Bit
1) Two TIM Instructions
Two TIM timers can be combined to make a bit turn ON and OFF at regular intervals while the execution
condition is ON. In this example, CIO 2.05 will be OFF for 1.0 second and then ON for 1.5 seconds as
long as CIO 0.00 is ON.
2) Clock Pulse
The desired execution condition can be combined with a clock pulse to mimic the clock pulse (0.1 s, 0.2
s, or 1.0 s).
0.00
10.00
100.00
10.00
10.00
1
#0015
T0001
100.00
10.00
100.00
2.04
0.00
OR LD
AND NOT
0.00
10.00
100.00
100.00
100.0010.00
10.00
10.00
2.04
(1.5seconds)
--
Instruction Operands
LD
TIM
LD
LD
OUT
LD
OUT
OUT
LD
AND NOT
0.00
T0002
1
#0010
2.05
2
#0015
2.05
LD
LD
LD
TIM
TIM
OUT
AND LD
2.05
2.05
0.00
(1 second)
(1.5 seconds)
T0001
0.00
Instruction Operands
P. 1s (1-s clock pulse)
P. 1s
0.00
0.00
2.06
2.06
1s
2.6
LD
OUT
AND
0.00
Instruction Operands
• The internal clock pulse (0.1 s, 0.2 s, 1 s) can be
used to easily program a flicker circuit.
For information on clock pulses, refer to the CJ-Series
CJ2 CPU Unit Software User's Manual (W473).