And (and), Updates to arithmetic status bits, Entering the instruction – Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual

Page 201

Advertising
background image

Chapter 11
Using Data Handling Instructions

11–18

The value at source A is ANDed bit by bit with the value at source B and
then stored in the destination. (This instruction differs from the AND input
instruction discussed in chapter 8.)

Truth Table

Dest = A AND B

A

B

Dest

0

0

0

1

0

0

0

1

0

1

1

1

Source A and B can either be a word address or a constant; however, both
sources cannot be a constant. The destination must be a word address.

Updates to Arithmetic Status Bits

With this Bit:

The controller:

S0/0

Carry (C)

always resets.

S0/1

Overflow (V)

always resets.

S0/2

Zero (Z)

sets if result is zero; otherwise resets.

S0/3

Sign (S)

sets if most significant bit is set; otherwise resets.

Entering the Instruction

You enter the instruction from within the program monitor functional area.

P 0 0 0

A N D

S R C A

2 5 5

P 0 0 0

A N D

S R C B

N 0

1 0 0

P 0 0 0

A N D

D E S T

N 0

1 0 0

AND

BITWISE AND
Source A

255

Source B

N7:0

100

Dest

N7:0

100

Execution Times (

µ

sec) when:

True

False

34.00

6.78

Ladder representation:

And (AND)

8

ENT

ANB

0

1

FUN

To enter the function code, press:

Advertising