PLC Programming For Industrial Automation Part3
PLC Programming For Industrial Automation Part3
Fig 2.21
When the start button is pressed the start_latch relay is energised. The
Start_latch relay switches on the timer input and the alarm. When the timer set value
has elapsed the alarm switches off and the solenoid Y1 is energised. When the
cylinder is fully extended the limit switch a+ de-energises the start_latch relay which
de-energises the solenoid and resets the timer.
The input to the delay-on timer must remain on for the duration of the timer set
value otherwise the timer will not operate. If the signal to start the timer is only
momentary then a latch is used to sustain it. When the input to the timer switches off,
the timer contacts revert immediately to their normal states.
In some PLC models a timer function block can be is located in the centre of a
rung as shown in Fig 2.22. When the timer set value has elapsed the timer output
switches on allowing a software signal to energise an internal relay coil or an output.
In this book all timer function blocks are located at the right hand side of the ladder
diagram and their contacts, normally-open or normally closed, have the same label as
the timer.
Timer 1
5 sec
in out
Fig 2.22
The delay-off timer causes a delay between its input switching off and its contacts
reverting to their normal states. The delay-on timer is used throughout this book.
2.7 The Pulse Generator
Y1
Fig 2.23
Start Stop
X1 X2
Y1
Fig 2.24
When the Start button in Fig 2.24 is pressed the cylinder in Fig 2.23 oscillates,
extending for 2 s and returning for 1 s until the Stop button is pressed.
Fig 2.25 Pulse Generator
It can take a while to figure out how the pulse generator works but it is time very
well spent. The flow chart in Fig 2.26 should help.
Start pressed
N
Stop
pressed?
Y End
Timer 1 input on
Timer 1 delay
Output on
Timer 2 input on
Timer 2 delay
Fig 2.27
When a start button has been pressed the shaft is to make 10 revolutions and then
stop. Pressing the start button also resets the counter. The PLC wiring diagram is
shown in Fig 2.28.
Start d
X1 X2
Y1
Motor
contactor
Fig 2.28
Fig 2.29
The pulse generator and counter can be combined as shown in this final
example.
When a start push button is pressed and held down, an alarm sounds six times
before a conveyor starts. Pressing the conveyor stop button also resets the counter.
Fig 2.30 and Fig 2.31 show a solution to the problem.
Start Stop
X1 X2
Y1
Conveyor
Fig 2.30
Fig 2.31
Questions and Exercises
Fig 2.32
2. Pick the incorrect statement below about the ladder diagram shown
Fig 2.33
3. Which form of logic gate system is given by a ladder diagram with a rung having two
normally open sets in parallel as shown?
Fig 2.34
Answer: a. OR
b. NOR
c. AND
d. NAND
4. Which form of logic gate system is given by a ladder diagram with a rung having two
normally open sets of contacts in series as shown?
Fig 2.35
Answer: a. NOR
b. NAND
c. OR
d. AND
Fig 2.36
5.
Fig 2.37
Pick the one correct statement below regarding the ladder diagram Fig 2.37
Fig 2.38
Pick the one incorrect statement below regarding the ladder diagram Fig 2.38.
Answer: a. When the alarm is switched on it keeps going until S3 switches on.
b. S1 and S2 form an exclusive or (XOR) function
c. The alarm is switched on when S1 or S2 or S3 is on.
d. The alarm is started when S1 or S2 is switched on but not both
together
7.
Fig 2.39
Pick the one correct statement below regarding the ladder diagram Fig 2.39
8.
Fig 2.40
Pick the one incorrect statement below regarding the ladder diagram Fig 2.40
Answer: a. S2 can be used to switch off the light before the timer delay is
complete.
b. The light output is latched on.
c. When the timer delay is finished the light comes on.
d. The light remains on for a time equal to the timer delay setting.
9.
Fig 2.41
Pick the one correct statement below regarding the ladder diagram Fig 2.41
Answer: a. When switch S1is pressed and released there is a delay equal to the
timer setting before the alarm sounds.
b. If S1 is to latch on immediately it has been pressed, a normally-open
timer contact should be connected in parallel with it.
c. When switch S1is pressed and released the alarm sounds for a time
equal to the timer setting.
d. The normally-closed timer contact prevents the alarm sounding or the
timer being energised.
10.
Fig 2.42
In the ladder diagram Fig 2.42 the counter preset = 5. Choose the one incorrect
statement below
Answer: a. When S1 is momentarily pressed the light comes on and stays on.
b. When the light goes out the counter is reset.
c. When switch S1 is pressed the light will come on until S2 is pressed.
d. When switch S1 is pressed the light will come on until S2 is pressed 5
times