Page 185 - Programmable Logic Controllers, Fifth Edition - Mobile version
P. 185
L1 Inputs T4:6 Ladder logic program Output L2
TON
TIMER ON DELAY EN
DN Timer T4:5 DN
FS Time base 1.0 Light
Preset 1
Accumulated 0
T4:5
TON
TIMER ON DELAY EN
DN Timer T4:6 DN
Time base 1.0
Preset 1
Accumulated 0
FS
CTU
COUNT-UP COUNTER CU
OFF ON Counter C5:1
Preset 1 DN
Accumulated 0
SS
C5:1 T4:5 Light
DN DN
C5:1 FS
DN
SS
C5:1
RES
Figure 8-21 Alarm monitor program.
• When the timer is running, SW (I:1/1) closed, the 8.3 Down-Counter
accumulated value changes rapidly.
• Closing the momentary pushbutton PB (I:1/0) The down-counter instruction will count down or dec-
rement by 1 each time the counted event occurs. Each
will freeze and display the value at that point in time the down-count event occurs, the accumulated
time.
value is decremented. Normally the down-counter is
The alarm monitor PLC program of Figure 8-21 illus- used in conjunction with the up-counter to form an up/
trates the application of an up-counter used in conjunction down-counter.
with the programmed timed oscillator circuit studied in Figure 8-22 shows the program and timing dia-
Chapter 7. The operation of the program can be summa- gram for a generic, block-formatted up/down-counter.
rized as follows: The operation of the program can be summarized as
• The alarm is triggered by the closing of float switch FS. follows:
• The light will flash whenever the alarm condition is • Separate count-up and count-down inputs are
triggered and has not been acknowledged, even if provided.
the alarm condition clears in the meantime. • Assuming the preset value of the counter is 3 and
• The alarm is acknowledged by closing selector the accumulated count is 0, pulsing the count-up
switch SS. input (PB1) three times will switch the output light
• The light will operate in the steady on mode when from off to on.
the alarm trigger condition still exists but has been • This particular PLC counter keeps track of the
acknowledged. number of counts received above the preset value.
166 Chapter 8 Programming Counters
pet73842_ch08_156-183.indd 166 03/11/15 3:58 PM