Lecture 008
Lecture 008
Types of counters:
Up-counters, CTU = count up (count up 1,2,3...).
Down counters, CTD = countdown (count down 9,8,7,...).
Up-Down counters, UDC = up-down counter (count up and/or down
1,2,3,4,3,2,3,4,5,...).
To use counter you need 3 things:
1) Where counted pulses are coming from. Typically this is from one of the inputs.
Counter pins
Reset pin. When turns ON the current (accumulated) count value will return to zero.
Pulse pin. Connected to input address where the pulses we are counting are coming from.
Counter accumulated value ONLY when ON signal on pulse pin changes back to OFF
(Use Spring loaded / Momentary switch)
Ladder program example (CTU and CTD only)
Instead of having only one input for the pulse counting we now have 2:
One for counting Up.
One for counting Down.
Ladder program example (UDC only)
The PLC task is to control a simple machine which counts and batches components
moving along a conveyor. It is required that 10 components be channeled down
route A and 20 components down route B.
Car park example
Simple control system is fitted inside a car
park which can host up to 100 cars at any
time. Each time a car enters the parking are,
PLC automatically adds it to a total sum of
other cars found in the garage. Each car that
comes out will automatically be taken off.
When 100 cars parks, a red light signal will
turn ON signalizing that the garage is full.
Design ladder program to do that.