4.7.4 AND operations
Note that the programming software uses the same icons and function keys for the AND and
ANI instructions as for the LD and LDI instructions. When you program in Ladder Diagram for
-
mat the software automatically assigns the correct instructions on the basis of the insertion
position.
When you program in Instruction List format remember that you can’t use the AND and ANI
instructions at the beginning of circuit (a program line in ladder diagram format)! Circuits must
begin with an LD or LDI instruction (see Chapter 4.7.1).
Example of an AND instruction
In the example output Y10 is only switched on when inputs X0 and X1 are both on:
MELSEC System Q Beginners Manual 4 – 17
An Introduction to Programming The Basic Instruction Set
Instruction Function Ladder Diagram IEC Instruction List
AND
Logical AND (AND operation with poll for
signal state “1” or ON)
AND
ANI
Logical AND NOT (AND operation with
poll for signal state “0” or OFF)
ANDN
An AND operation is logically the same as a
serial connection of two or more switches in
an electrical circuit. Current will only flow if all
the switches are closed. If one or more of the
switches are open no current flows – the AND
condition is false.
Ladder Diagram
MELSEC Instruction List
LD X0
AND X1
OUT Y10
AND instruction
IEC Instruction List
LD X0
AND X1
ST Y10
Y10
X0
OFF
ON
OFF
ON
t
(0)
(1)
(0)
(1)
X1
OFF
ON
(0)
(1)