beautypg.com

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

Page 290

background image

File Logic Instructions

Chapter 16

16Ć11

Figure 16.8 shows the format of Figure 16.7 after data has been entered for
the following conditions:

COUNTER ADDR – Word 200
POSITION (set by program) – 003
FILE LENGTH – Each file has 6 steps
WORD ADDR – The Data Table word being compared with the words
in File B is located at address 400
FILE B – Starts at word 500, ends at word 505
FILE R – Starts at word 600, ends at word 605

The procedure for using the data monitor mode for data entry or monitor is
presented in Chapter 12.

Figure 16.8

WORDĆTOĆFILE AND Example Rung

WORD TO FILE AND

COUNTER ADDR: 200
POSITION: 003
FILE LENGTH: 006
WORD ADDR: 400
FILE B: 500- 505
FILE R: 600- 605

200

(DN)

15

This instruction performs an OR operation on the contents of a specified
word in the data table and a word from File B. It places the result of the
operation in the corresponding word of File R (Figure 16.6).

The logic operation OR compares each bit in the word to the
corresponding bit in the File B word at the location of the contents. If
either bit is 1, a 1 is stored in the corresponding bit in the File R word. If
neither of the compared bits is 1, a 0 is stored in File R (Table 16.E).

16.2.2
WordĆtoĆFile OR