Page 230 - Programmable Logic Controllers, Fifth Edition - Mobile version
P. 230
LS1 Ladder logic program Output
L1 Inputs CTU L2
1 COUNT UP CU
Counter C5:1
Preset 0 DN
LS1 Accumulated 0
Full
A
A MOV
2 MOVE
Source N7:1
300
B Destination C5:1.PRE
0
C B
MOV
3 MOVE
Source N7:2
Reset 175
Destination C5:1.PRE
0
A B C C
MOV
4 MOVE
Source N7:3
50
Destination C5:1.PRE
0
C5:1/DN Full
5
Reset
C5:1
6 RES
Figure 10-7 Move instruction used to change the preset count of a counter.
• Three momentary switches are used to select the de- In some instances it may be necessary to shift complete
sired preset counter value depending on the product files from one location to another within the program-
line (A, B, or C) being manufactured. mable controller memory. Such data shifts are termed
• A reset button is provided to reset the accumulated file-to-file shifts. File-to-file shifts are used when the data
count to 0. in one file represent a set of conditions that must interact
• A pilot lamp is switched on to indicate when the with the programmable controller program several times
storage rack is full. and, therefore, must remain intact after each operation.
Because the data within this file must also be changed by
• The program has been constructed so that normally
only one of the three switches will be closed at any the program action, a second file is used to handle the data
one time. If more than one of the preset counter changes, and the information within that file is allowed
switches is closed, the last value is selected. to be altered by the program. The data in the first file,
however, remain constant and therefore can be used many
A file is a group of related consecutive words in the times. Other types of data manipulation used with file in-
data table that have a defined start and end and are used to structions include word-to-file and file-to-word moves, as
store information. For example, a batch process program illustrated in Figure 10-8.
may contain several separate recipes in different files that Files allow large amounts of data to be scanned
can be selected by an operator. quickly and are useful in programs requiring the transfer,
Data Manipulation Instructions Chapter 10 211
pet73842_ch10_207-233.indd 211 03/11/15 4:02 PM