And and andn (and not), Or and orn (or not) – IDEC MicroSmart User Manual

Page 188

Advertising
background image

7: B

ASIC

I

NSTRUCTIONS

7-4

« FC4A M

ICRO

S

MART

U

SER

S

M

ANUAL

»

AND

and ANDN (And Not)

The AND instruction is used for programming a NO contact in series. The ANDN instruction is used for programming a
NC contact in series. The AND or ANDN instruction is entered after the first set of contacts.

OR

and ORN (Or Not)

The OR instruction is used for programming a NO contact in parallel. The ORN instruction is used for programming a NC
contact in parallel. The OR or ORN instruction is entered after the first set of contacts.

Ladder Diagram

I0

Instruction

Data

LOD
AND
OUT
LOD
ANDN
OUT

I0
I1
Q0
I0
I1
Q1

Program List

I1

I1

I0

I0

ON

OFF

I1

ON

OFF

Q0

ON

OFF

Q1

ON

OFF

Timing Chart

When both inputs I0 and I1 are on, output Q0 is on. When either input I0 or I1 is off, output Q0 is off.

When input I0 is on and input I1 is off, output Q1 is on. When either input I0 is off or input I1 is on, output Q1 is off.

Valid Operands

The valid operand range depends on the CPU module type. For details, see pages 6-1 and 6-2.

Instruction

I

Q

M

T

C

R

AND
ANDN

0-307

0-307

0-1277

8000-8157

0-99

0-99

0-127

Q0

Q1

Ladder Diagram

I0

I0

I0

ON

OFF

I1

ON

OFF

Q0

ON

OFF

Q1

ON

OFF

Timing Chart

When either input I0 or I1 is on, output Q0 is on. When both inputs I0 and I1 are off, output Q0 is off.

When either input I0 is on or input I1 is off, output Q1 is on. When input I0 is off and input I1 is on, output Q1 is off.

I1

I1

Instruction

Data

LOD
OR
OUT
LOD
ORN
OUT

I0
I1
Q0
I0
I1
Q1

Program List

Valid Operands

The valid operand range depends on the CPU module type. For details, see pages 6-1 and 6-2.

Instruction

I

Q

M

T

C

R

OR
ORN

0-307

0-307

0-1277

8000-8157

0-99

0-99

0-127

Q0

Q1

Advertising