0% found this document useful (0 votes)
53 views26 pages

Programmable Logic Controllers: Counters (Cont'd)

This document provides examples of how programmable logic controllers (PLCs) can be used with counters and timers for various automation applications. It describes counter types like up/down counters and how they work. It also provides examples of using counters and timers together for tasks like automatic stacking, length measurement, and long time delays. Cascading counters and combining counter and timer functions are also discussed.

Uploaded by

Dhanush S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views26 pages

Programmable Logic Controllers: Counters (Cont'd)

This document provides examples of how programmable logic controllers (PLCs) can be used with counters and timers for various automation applications. It describes counter types like up/down counters and how they work. It also provides examples of using counters and timers together for tasks like automatic stacking, length measurement, and long time delays. Cascading counters and combining counter and timer functions are also discussed.

Uploaded by

Dhanush S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 26

Programmable

Logic Controllers
Counters (cont’d)
Example 1
An Alarm Monitor
Program
An Alarm Monitor Program

 The alarm is triggered by the closing of liquid level switch


LS1.

 The light will flash whenever the alarm condition is triggered


and has not been acknowledged (reset), even if the alarm
condition clears in the meantime

 The alarm is acknowledged (reset) by closing selector switch


SS1.

 The light will operate in the steady mode when the alarm
trigger condition exists but has been acknowledged (reset).
Down-Counter
The down-counter output instruction will count down
or decrement by 1 each time the counted event occurs.
Each time the down-count event occurs, the
accumulated value is decremented. Normally the down-
counter is used in conjunction with the up counter to
form an up/down counter.

Generic up/down
counter program
Up/Down Counter Timing diagram

Preset Value = 3
Example 2
A Parking Garage
Counter Program
A Parking Garage Counter Program

 As a car enters, it triggers the up-counter output instruction and


increments the accumulated count by 1.
 As a car leaves, it triggers the down-counter output
instruction and decrements the accumulated count by 1.
 Since both the up- and down-counters have the same address,
the accumulated value will be the same in both.
 Whenever the accumulated value equals the preset value, the
counter output is energized to light up the Lot Full sign.
PLC-5 And SLC-500
Count-Down Counter Instruction

If the accumulation value is below the


minimum range then the underflow
(UN) bit will be true.
Example 3
The Up and Down
Counter
One-Shot Rising (OSR) Instruction

• Triggers a one-time event.


• The OSR instruction is a retentive input instruction
that triggers an event to occur only one time. Use the
OSR instruction when an event must start based on
change of state of the rung from false to true.
• When the input instruction goes from false to true, the
OSR instruction conditions the rung so that the output
goes true for one scan. The output goes false and
remains false for successive scans until the input makes
another false to true transition.
Example 4
An In-Process
Monitor System
An In-Process Monitoring System

After processing,
Before start-up, finished
the systemparts appearing empty
is completely at the out-feed
of parts, sensor
and
When the
generate operation
down begins, raw parts move through the in-feed
the counter is counts, so the accumulated
reset manually to zero. count of the counter
sensor, with each
continuously part generating
indicates the numberan of up count. parts.
in-process
Counter Speed

The maximum speed of transitions you can count is


determined by your program's scan time. Any counter
input signal must be fixed for one scan time to be
counted reliably.

If the input changes faster


than one scan period, the
count value will become
unreliable because counts
will be missed. When this is
the case you need to use a
high-speed counter.
Cascading Counters

Depending on the
application, it may be
necessary to count events
that exceed the maximum
number allowable per
counter instruction. One way
of accomplishing this is by
interconnection, or
cascading, two counters.
Example 5
A 24 Hour Clock
Program
Example 6
An Incremental
Encoder
An Incremental Encoder
An incremental encoder creates a
series of square waves as its shaft
is rotated.
The encoder disk interrupts the light
as the encoder shaft is rotated to
produce the square wave output
waveform.
Incremental Encoder

The number of square waves obtained


from the output of the encoder can be
made to correspond to the mechanical
movement required.

To divide a shaft revolution into 100


parts, an encoder could be selected
to supply 100 square wave cycles per
revolution. By using a counter to
those cycles, we could tell how far
the shaft has rotated.
Example 7
Cutting Objects to
Specific Size
Cutting Objects To A Specific Size

The object is advanced for a specific distance and measured


by encoder pulses to determine the correct length for
cutting.
Counter Used For Length Measurement
Count input pulses are generated by the magnetic sensor, which
detects passing teeth on a conveyor drive sprocket. If 10 teeth per
foot of conveyor motion pass the sensor, the accumulated count of
the counter would indicate feet in tenths.

The photoelectric sensor monitors a reference point on the


conveyor. When activated, it prevents the unit from counting,
thus permitting the counter to accumulate counts only when bar
stock is moving.
Example 8
Automatic Stacking
Program
Combining Counter And Timer Functions
When the start button is pressed,
conveyor M1 begins running.

After 15 plates have been stacked,


conveyor M1 stops and conveyor
M2 begins running.

After conveyor M2 has been


operated for 5 s, it stops and the
sequence is repeated
automatically.

The done bit of the timer resets


the timer and counter, and
Automatic Stacking Process provides a momentary pulse to
automatically restart conveyor
M1.
Example 9
Achieving Long Time
Delay
Binary (B3:0) Internal Instruction

• B3:0/X can be used as a Internal Binary Output.


• Notice the File Number 3 is the Binary Data Table.
• In our Trainer you can have up to 32 Binary Data
Outputs (B3:0 toB3:31) and each one outputs can have up
to 16 bits (0-15).
• Notice in above schematic that it can be used to control
an input to a rung.

You might also like