Mitsubishi MELSEC System Q Manual page 79

Hide thumbs Also See for MELSEC System Q:
Table of Contents

Advertisement

An Introduction to Programming
Example (LDI and OUT instructions)
Ladder Diagram
The condition of the LDI instruction (poll for signal state "0") is no
longer true so the output is reset.
NOTE
Double assignment of relays or outputs
The result of an operation should not assigned to the same device in more than one place in
the program!
The program is executed
sequentially from top to bot-
tom, so in this example the
second assignment of M10
would simply overwrite the
result of the first assign-
ment.
You can solve this problem
with modification shown on
the right. This takes all the
required input conditions
into account and sets the
result correctly.
But there is an exception for every rule! You can take advantage of the top-to-bottom-execution
of a PLC program and place instructions with high priority at the end of the program to inten-
tionally overwrite previous results. An example is shown in chapter 4.9.1. Here safety facilities
are used to reset internal devices of the PLC and bring a motor to a stop. But the outputs for the
motor are only assigned once in the whole program!
MELSEC System Q Beginners Manual
ON
(1)
X0
OFF
(0)
(1)
ON
Y10
OFF
(0)
X001
X004
X001
X004
MELSEC Instruction List
LDI
X0
OUT
Y10
X003
X005
X003
X005
The Basic Instruction Set
IEC Instruction List
LDI
X0
ST
Y10
t
M10
M10
M10
4 – 15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents