9
-
36
CHAPTER9 DEVICES
9
9.2 Int
ernal User Devices
9.2.11
Counter
(C)
1) Precautions for resetting the counter
Execution of the RST C instruction also turns off the coil of C .
If the execution condition for the OUT C instruction is still ON after execution of the RST C instruction, turn
on the coil of C at execution of the OUT C instruction and update the current value (count value + 1).
In the above ladder example, when M0 turns on from off, the coil of C0 turns on, updating the current value.
When C0 reaches the preset value finally, the contact of C0 turns on, and execution of the RST C0 instruction
clears the current value of C0. At this time, the coil of C0 also turns off.
If M0 is still on in the next scan, the current value is updated since the coil of C0 turns on from off at execution
of the OUT C0 instruction. (The current value is changed to 1.)
To prevent the above, it is recommended to add a normally closed contact of the OUT C0 instruction
execution to the condition for the RST C0 instruction execution so that the coil of C0 does not turn off while
the execution condition (M0) of the OUT C0 instruction is on.
Figure 9.35 Counter resetting ladder example
Figure 9.36 Current value update timing
Figure 9.37 Counter resetting ladder example (recommended)
C0
RST
C0
M0
C0
K10
[Ladder example]
M0
OFF
OFF
ON
RST C0
OUT C0
END
RST C0
OFF
RST C0
OUT C0
END
END
ON
Sequence
program
Coil of C0
Current value
update, turning on
the contact
Turning off the
coil of C0
Current value is
updated since the coil
of C0 turns on from off.
Count value cleared, the contact turned off
C0
RST
C0
M0
C0
K10
M0
[Modified ladder example]
Содержание 00JCPU
Страница 1: ......
Страница 2: ......
Страница 96: ...2 51 2 4 5 Character string data 1 Definition The CPU module uses shift JIS code character strings...
Страница 541: ......
Страница 542: ......