beautypg.com

16ć2, 1 filećtoćfile and – Rockwell Automation 1772-LP3 PLC - 2/30 Programmable Controller Programming and Operations Manual User Manual

Page 281

background image

File Logic Instructions

Chapter 16

16Ć2

This output instruction operates on the contents of two data files A and B
and places the result of the operation AND in a third File R.

The logic operation AND compares each bit in File A to the corresponding
bit in File B. If the compared bits are both 1, a 1 is stored in the
corresponding bit location in File R. If the bits are other than both 1, a 0 is
stored in the corresponding bit in File R (Table 16.A).

Table 16.A

Truth Table for Logical AND

Bit In File A

Bit In File B

Bit In File R

1

1

0

0

1

0

1

0

1

0

0

0

Instruction Overview:

Output Instruction
Key sequence [FILE] 14
Requires 6 words of user program
Can operate in incremental, distributed complete or complete mode
Counter is internally indexed by the instruction

Programming FileĆtoĆFile AND Instruction

WARNING: The counter address for the File-to-File AND
instruction should be reserved for that instruction. Do
not manipulate the counter accumulated or preset values.
Inadvertent changes to these could result in unpredictable or
hazardous machine operation or a run-time error. Damage to
equipment and/or personal injury could result.

To program a File-to-File AND instruction, press keys [FILE] 14. A
display represented by Figure 16.2 will appear.

16.1.1
FileĆtoĆFile AND