Page 242 - Programmable Logic Controllers, Fifth Edition - Mobile version
P. 242
L1 Input Ladder logic program Output L2
Sensor
CTU
COUNT UP CU SOL
Counter C5:1
Preset 50 DN
Sensor
Accumulated 0
LES SOL
LESS THAN
Source A C5:1.ACC
0
Source B 20
C5:1 C5:1
RES
DN
Figure 10-36 Counter program implemented using the LES instruction.
Source: Photo courtesy Turck, Inc., www.turck.com.
• When the accumulated value of the timer reaches 15,
the EQU instruction of rung 3 will be true for 1 second.
• As a result, the unlatch output will energize to
switch the pilot light PL1 off.
• Therefore, when the switch is closed, the pilot
light will come on after 5 seconds, stay on for
10 seconds, and then turn off.
Figure 10-36 shows an application of an up-counter
program implemented using the LES instruction. The op-
eration of the program can be summarized as follows:
• Up-counter C5:1 will increment by 1 for every false-
to-true transition of the proximity sensor switch.
• Source A of the LES instruction is addressed to the
accumulated value of the counter and source B has a
constant value of 20.
• The LES instruction will be true as the long as
the value contained in source A is less than that of
source B.
• Therefore, output solenoid SOL will be energized
when the accumulated value of the counter is be-
tween 0 and 19.
• When the counter’s accumulated value reaches 20,
the LES instruction will go false, de-energizing
output solenoid SOL.
• When the counter’s accumulated value reaches its Figure 10-37 Vessel filling operation.
preset value of 50, the counter reset will be ener- Source: Courtesy Feige Filling.
gized through the counter done bit (C5:1/DN) to
reset the accumulated count to 0. the flow in vessel filling operations (Figure 10-37). This
control scenario can be summarized as follows:
The use of comparison instructions is generally
straightforward. However, one precaution involves the • The receiving vessel has its weight monitored con-
use of these instructions in PLC programs used to control tinuously by the PLC program as it fills.
Data Manipulation Instructions Chapter 10 223
pet73842_ch10_207-233.indd 223 03/11/15 4:03 PM