10
DEVICE EXPLANATION
10.2 Internal User Devices
10.2.11 Counter (C)
10
- 38
9
P
a
ra
met
e
rs
10
Device
Exp
la
n
at
ion
11
CP
U
M
odu
le
P
ro
cessi
ng
Ti
m
e
12
P
roc
e
d
ure
f
or W
rit
in
g
P
rog
ra
m t
o CP
U Mo
du
le
A
p
pe
nd
ic
e
s
In
de
x
(c) Resetting the counter
Counter current values are not cleared even if the OUT C instruction switches
OFF. Use the RST C instruction to clear the counter's current value and switch
the contact OFF.
The count value is cleared and the contact is switched OFF at execution of when
the RST C instruction.
1) Precautions for resetting the counter
When the RST C instruction is executed, the coil of C also turns OFF.
If the execution condition of the OUT C instruction is still ON after execution
of the RST C instruction, the coil of C is turned ON at the execution of the
OUT C instruction to update the current value (increment the count value by
1).
In the above ladder example, when M0 turns from OFF to ON, the coil of C0
turns ON, updating the current value. When C0 reaches the preset value
finally, the contact of C0 turns ON, and the execution of the RST C0 instruction
clears the current value of C0. At this time, the coil of C0 also turns OFF.
When M0 is still ON in the next scan, the current value is updated since the
coil of C0 turns from OFF to ON at the execution of the OUT C0 instruction.
(The current value turns to 1.)
Figure 10.31 Counter resetting
Figure 10.32 Counter resetting ladder example
X0
RST
C0
X0
OFF
OFF
ON
END
END
END
RST C0
RST C0
RST C0
[Ladder example]
[Counter reset timing]
Sequence
program
Execution
Count value cleared
& contact OFF
Count value cleared
& contact OFF
RST C0
instruction
C0
RST
C0
M0
C0
K10
[Ladder example]
Содержание Q00CPU
Страница 1: ......
Страница 2: ......
Страница 972: ...Index 6 Memo ...
Страница 975: ......
Страница 976: ......