Page 229 - Programmable Logic Controllers, Fifth Edition - Mobile version
P. 229
Inputs Ladder logic program Output
L1 PB1 TON L2
1 TIMER ON DELAY EN
Timer T4:1
PB1 Time base 1.0 DN
Preset 0 PL1
10 s 5 s Accumulated 0
SS1
SS1 MOV
2 MOVE
Source N7:1
10
Destination T4:1.PRE
0
SS1
MOV
3 MOVE
Source N7:2
5
Destination T4:1.PRE
0
T4:/DN PL1
4
Figure 10-6 Move instruction used to change the preset time of a timer.
• Where there is a 1 in the mask, data will pass from • When pushbutton PB1 is closed, there will be
the source to the destination. a 10 s delay period before the pilot light is
• Where there is a 0 in the mask, data in the destina- energized.
tion will remain in their last state. • When the selector switch is in the closed 5 s
• Status in bits 4–7 are unchanged due to zeroes in the position, rung 3 has logic continuity and rung 2
mask (remained in their last state). does not.
• Status in bits 0–3 and 8–15 were copied from the source • As a result, the value 5 stored at the source address,
to destination when the MVM instruction went true. N7:2, is copied into the destination address, T4:1.
• The mask must be the same word size as the source PRE.
and destination. • Closing pushbutton PB1 will now result in a
5 s time-delay period before the pilot light is
The program of Figure 10-6 illustrates how the move energized.
(MOV) instruction can be used to create variable preset
timer values. A two-position selector switch is operated The program of Figure 10-7 illustrates how the move
to select one of two preset timer values. Operation of the (MOV) instruction can be used to create variable preset
program can be summarized as follows: counter values. The operation of the program can be sum-
marized as follows:
• When the selector switch is in the open 10 s
position, rung 2 has logic continuity and rung 3 • Limit switch LSI is programmed to the input of
does not. up-counter C5:1 and counts the number of parts
• As a result, the value 10 stored at the source ad- coming off a conveyor line onto a storage rack.
dress, N7:1, is copied into the destination address, • Three different types of products are run on this line.
T4:1.PRE. • The storage rack has room for only 300 boxes of
• Therefore, the preset value of timer T4:1 will product A or 175 boxes of product B or 50 boxes of
change from 0 to 10. product C.
210 Chapter 10 Data Manipulation Instructions
pet73842_ch10_207-233.indd 210 03/11/15 4:02 PM