Mitsubishi Electric MELSEC-Q00U(J)CPU User Manual page 371

Table of Contents

Advertisement

[Precautions for resetting the counter]
Execution of the RST C
If the execution condition for the OUT C
turn on the coil of C
at execution of the OUT C
[Ladder example]
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.)
END
Sequence
program
ON
M0
OFF
Coil of C0
OFF
Current value
update, turning on
the contact
RST C0
OFF
Count value cleared, the contact turned off
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.
[Modified ladder example]
instruction also turns off the coil of C .
instruction is still ON after execution of the RST C
instruction and update the current value (count value + 1).
M0
C0
END
OUT C0
RST C0
ON
Turning off the
coil of C0
M0
C0
M0
K10
C0
RST C0
END
OUT C0
RST C0
Current value is
updated since the coil
of C0 turns on from off.
K10
C0
RST C0
CHAPTER 4 DEVICES
instruction,
4
369

Advertisement

Table of Contents
loading

Table of Contents