9
DEVICE EXPLANATION
9
- 26
9.2 Internal User Devices
9.2.9 Counter (C)
(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.)
Diagram 9.26 Counter resetting
Diagram 9.27 Counter resetting ladder example
X100
RST
C0
X100
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]
Summary of Contents for MELSEC QS Series
Page 1: ......
Page 2: ......
Page 24: ...A 22 Memo ...
Page 258: ...Index 3 Memo ...
Page 263: ......
Page 264: ......