0% found this document useful (0 votes)
84 views28 pages

Exercise 1

1. The document describes exercises using a programmable logic controller to control various inputs and outputs through simple ladder logic diagrams. 2. The exercises demonstrate using normally open and normally closed contacts to control lamps through different switch combinations. 3. More complex concepts like latching and self-latching outputs are also illustrated to explore how PLCs can be programmed to remember states even after the input is removed.

Uploaded by

HOW MAN KIEN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views28 pages

Exercise 1

1. The document describes exercises using a programmable logic controller to control various inputs and outputs through simple ladder logic diagrams. 2. The exercises demonstrate using normally open and normally closed contacts to control lamps through different switch combinations. 3. More complex concepts like latching and self-latching outputs are also illustrated to explore how PLCs can be programmed to remember states even after the input is removed.

Uploaded by

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

Exercise 1

5
Review Question

Exercise 1 lab2
10s

3
4

Review question

once
Repeat
Lab c

hold close
PRESS OPEN

HOLD OPEN

PRESS CLOSE

STOP TENGAH

LABC EXERCISE 2
closing
open half
fully open
half close
Introduction and Literature Review
PLC
A programmable logic controller (PLC) is a unique way of micro-processor-based controller
that uses a programmable memory to store instructions and to implement functions such as
logic, sequencing, timing counting and arithmetic to control machines and processes. [1]

1. The central processing unit (CPU), containing the microprocessor. It evaluates the
incoming signals and executes the control operations in accordance with the programe
that is stored in its memory and sending action signals to outputs.
2. In order to provide the CPU and the circuits in the input and output interface modules
with the low DC voltage (5 V) they require, the power supply unit must convert the
main AC voltage.
3. The necessary program is loaded into the processor's memory using the programming
device. The PLC's memory unit receives the programme after it has been created in
the device.
4. The memory unit is where the programme that will be utilised for the
microprocessor's control activities, as well as data stored from the input for processing
and for the output for outputting, is stored.
5. Input and output sections are where the processor receives data from external devices
and give out specific information to external device. It acts as the entrance and the
exit of the PLC system respectively.
6. Communications interface receives and transfer data on communication networks
from or to other remote PLCs to verify other devices and to synchronise action
between users.

Applications of PLC [1]


1. Conveyor belt system
-Can be used to transport products from production area to packaging area. Before it
reaches the packaging area, quality check should be conducted, hence devices like
timers and sensors are able to check the quality of the product from the aspect of size,
weight, and other factors. After the quality has been ensured, the product can move
along the conveyor belt to the packaging spot. This is done by triggering an ON
switch on the loading section and allow the product to trigger an OFF switch when it
reaches the spot.
2. Liquid level monitoring
When the liquid level falls, the ring circling the sensor probe and a magnetic float
falls with it. When it reaches the critical level, a reed switch will be opened. The reed
switch is arranged in series with a small value resistor (39 Ω) to all it to be switched
in parallel with a high value resistor (1 kΩ). The increase in resistance gives suitable
on-off signals.

Advantages of PLC [2]


1. Reliability
-A PLC program can be used on many devices when downloaded. This reduces
the chance of making a logic wiring error. It also offers reliability associated with
solid-state components.
2. Flexibility
-It is easier to create and change a program in PLC rather than wire and rewire a
circuit. Original manufacturers can provide system upgrades by sending out a new
program. The users can modify the program to their desired needs through
software.
3. Fast response time
-PLC operates in real time. An event taking place in the field will results in the
execution of an operation or output. This is especially useful for systems that
requires quick-response to adhere to pre-set values and make changes
immediately.
4. Communications capability
-PLC can communicate with other devices to perform functions such as
supervisory control and monitoring processes.
Lab 2A: Programmable logic controller I/O and logics

Objectives: Refer to lab manual

Procedure: Refer to lab manual

Results and Discussions:

Exercise 1

Observation Discussion
Switch 0 (I:1/0) has a normally open contact.
When it is switched ON, the contact will close
and Lamp 0 (O:2/0) will energize. This ladder
diagram is applied on simple mechanism such as
pushing a button to turn on a motor.

Switch 0 Lamp 0
0 0
1 1

Exercise 2

Observation Discussion
When Switch 0 (I:1/0) is ON, Lamp 0 (O:2/0) will
be energized due to the closing of the normally
open contact. Switch 1 (I:1/1) has a normally closed
contact; the contact opens when triggered and de-
energizes Lamp-1 (O:2/1). In this exercise,
normally-closed contacts is shown to be useful in
situations where an output is expected to always be
ON unless a certain condition is triggered. For
example, a system can always be in operation
unless a component is malfunctioned, when this
happens, the NC switch will be triggered to stop the
operation.
Switch 0 Switch 1 Lamp 0 Lamp 1
0 0 0 1
0 1 0 0
1 0 1 1
1 1 1 0

Exercise 3

Observation Discussion
When the start
button (I:1/2) is
triggered (NO)
Lamp -2 is
energized. Lamp – 2
has a latching
characteristic, hence
Lamp-2 remains ON
even after Start-NO
is switched OFF.
Start - Stop - NO Lamp 2 (L) Lamp 2
When Stop-NO is
NO (U)
triggered, only then
0 0 0 0 Lamp-2 will OFF.
1 0 1 1 Latching output is
0 0 1 1 useful when a
0 1 0 0 process will be
1 1 0 0 stopped only when a
stop signal is
received. For an
example, when a
motor is operated
(Lamp -2) by a
switch, a respective
stop switch can be
used to unlatch it
and stop the motor.
Exercise 4

Observation Discussion
When Start-NO(I:1/3) is ON, Lamp-2 (O:2/2) will
ON. Lamp-2 is in a ON state, therefore even when
Start-NO is OFF, Lamp-2 acts as an input for its own
output. Thus, this creates a self-latching output. To
turn OFF Lamp-2, Stop-NC (I:1/4) must be
triggered. Although I:1/4 is illustrated as a NO input,
it is used as a NC switch. This is useful to provide
Start – NO Stop – NC Lamp - 2 additional safety, for example it can be used to
0 0 0 monitor a conveyor belt system, the NC switch will
1 0 1 be triggered to change into an open state and stop the
0 1 0 operation.
1 1 0

Exercise 5

Observation Discussion
Exercise 5 differs from Exercise 4 by an addition of
a new rung connected parallel to Lamp- 2 (O:2/2).
Switch-0 (I:1/0) and O:2/3 is connected parallel to
Lamp-2. The purpose of this is to allow O:2/3 to be
triggered only when Lamp -2 is triggered. This can
be applied when an output can only be expected
when certain condition is achieved. For example, an
infrared sensor to detect presence of human in a
space can be taken as an output trigger (O:2/2)
while an air-conditioner is O:2/3. The air
conditioner can only be ON when O:2/2 is detected
to be TRUE.
Start – Stop – Switch – Lamp – O:
NO NC 0 2 2/3
0 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 1 1 0 0
1 0 0 1 0
1 1 0 0 0
1 0 1 1 1
1 1 1 0 0

Review Questions:
1. List the different types of PLC programming languages. [2]
Ladder Diagram (LD) Instructions are
arranged in rungs like
ladder-formatted
schematic diagram. It
is the most used PLC
language. It defines
control actions in
terms of relay
contacts and coil.
Function Block Diagram (FBD) Graphical depiction of
process flow using
interconnecting
blocks. The
instructions are wired
together in a block to
accomplish certain
functions.
Sequential Function Chart (SFC) Graphical depiction of
interconnecting steps,
actions and
transitions. It works
like a flow chart and
used to accommodate
the programming of
more advanced
processes.

Instruction List (IL) A text-based language


that uses mneumonic
instructions.
Structured Text (ST) A high-level, text-
based language such
as C, which is
developed for
industrial control
applications.It is used
to implement complex
procedures that
cannot be expressed
with graphical form
easily.

2. What are the differences between Compact and Modular PLC? 


Compact PLC [3][4] Modular PLC[3][4]
-Initial configuration cannot be altered over time -Able to conduct multiple expansions using
because the components are integrated into the modules.
unit.
-The system combines a CPU, power supply, -Consists of motherboard, CPU, memory, input
input and output modules together. module or output module, sometimes even both.
-Fixed number of digital Ios -Support thousands of inputs and outputs
-1/2 communication channels -Has a separate communication module
-Mainly for small-size applications so that it can -Has various field of applications, not limited to
be mounted. one field only. Able to work accordingly using
different modules.
-Programming is simpler than a modular PLC -Have a scalable capacity to meet changing
because it does not have more internal variables. demand for processes that increases complexity
over time.
-Economical wise, would be the best option for -Offers simpler troubleshooting to reduce system
specific applications. downtime.

3. Write a PLC ladder diagram to control a staircase lamp from two switches.

Observation Discussion
Switch 1 (I:1/0) is in series
with Switch 2 (I:1/1), which
has a NC contact, the same
goes for Switch 2 which has a
NO contact. When both
switches are ON, the
respective NC switches will
prevent Lamp-1 (O:2/0) from
turning ON. Thus, it can be
controlled on 2 different
floors.
Switch 1 Switch 2 Lamp 1
0 0 0
1 0 1
0 1 1
1 1 0

4. Explain the OSR function.

One-Shot Rising is a retentive input instruction that triggers an event to occur one time. It is used when
an event must start based on the change of state of the rung from FALSE to TRUE. OSR instruction is
placed in the ladder logic before output instruction. The output is referenced as the one-shot within the
program. A bit address is entered for the OSR whether it is a binary file or an integer file address. The
bit address cannot be used anywhere else in your program. The address assigned to the OSR is not the
address referenced by the program, nor does it indicate the state of the OSR. The address only allows
the OSR to remember which state the rung was previously in. When the rung conditions preceding the
OSR goes from False to True, the OSR instruction goes true for 1 scan only. [1]
Lab 2B: Programmable Logic Controller Timer Functions

Objective: Refer to lab manual

Procedure: Refer to lab manual

Exercise 1 – Timer On Delay

Observation Discussion
Timer-On Delay (T4:1) starts accumulating when
input (I:1/0) is ON. At the same time, the Timer-
Enable Bit (T4:/1 EN) and Timer-Timing Bit
(T4:1/TT) acts as a switch in its ON state, energizing
the output (O:2/0 and O:2/1). After 10 seconds which
is set by the preset value, T4:1/EN Bit and T4:/1 TT
Bit will be in their OFF state, while Timer Done Bit
(T4:/1 DN) will ON and energize the output (O:2/2).
This program can be applied in situations where a
delayed action occurs after a countdown. For
example, to turn on a gas supply after the ON switch
is triggered.

Exercise 2 – Cascaded Timer

Observation Discussion
Timer-On Delay starts accumulating when input
(I:1/0) is ON. After 10 seconds, the Timer-Done bit
(T4:/1 DN) contacts closes and trigger the Timer-On
Delay (T4:2). Due to the pre-set value being 80, after
8 seconds, T4:2 will stop accumulating. When I:1/0
is OFF, T4:1 and T4:2 will restart their accumulation
from 0. This program can be applied to a conveyor
belt system, T4:1 could have a pre-set time value for
an object to travel to the designated point. At the
designated point, T4:2 would be triggered to time the
process of checking the product, it will only initialise
the next process after the 8 seconds (preset time).
When there is no product in the belt system, both
timers can be reset to 0.

Exercise 3 – Self-resetting Cascaded Timer

Observation Discussion
When input (I:1/0) is closed, the first Timer-On
Delay (T4:1) will trigger and starts accumulating.
After 10 seconds, the Timer-Done Bit (T4:1/DN) will
ON. Hence, Timer- On Delay (T4:2) will starts
accumulating. After 8 seconds, the Timer-Done Bit
(T4:2 DN) will open. At this instance, T4:2/DN
opens and remain as its closed state. T4:1 will restart
its accumulation from 0. When I:1/0 is opened, both
timer’s accumulation will reset to 0. This is applied
to control movement of boxes along a conveyor belt
to ensure each box is weighed and inspected as set.
Exercise 4 – Timer Off Delay

Observation Discussion
When input (I:1/0) is ON, the Timer-Enable Bit
(T4:1/EN) and the Timer-Done Bit (T4:1/ DN) will
ON and energizes output (O:2/0 and O:2/2). When
I:1/0 is OFF, the Timer-Off Delay (T4:1) will starts
accumulating. Hence, the Timer-Timing Bit (T4:1/
TT) will energize the output (O:2/1). At this moment,
T4:1/EN will de-energize O:2/0. After the pre-set 10
seconds, all bits will be OFF and all output is de-
energized. It can be used when a conveyor belt needs
to be stopped after a certain amount of time to
prevent overloading. When a product reaches the end
of the conveyor, the motor will turn off and activate
the Timer-Off Delay to ensure efficient operation.

Exercise 5 – Retentive On Timer

Observation Discussion
Retentive On Timer will not reset its
accumulation value when it is not
enabled. Toggle Switch 0 (I:1/0) is used
to energize the Retentive Timer On
(T4:1), output (O:2/0 and O:2/2) are
energized. When T4:1 has accumulated
for 20 seconds, the Timer Done Bit
(T4:1/DN) is closed, de-energizing
output O:2/1. When Toggle-Switch 1 is
closed, the reset output will be ON, thus
it will reset the accumulation of T4:1.
RTO is used to monitor the run time of a
machine to ease the maintenance
scheduling before any breakdown
occurs.
Review Questions:
1. List the different types of PLC timer functions. [1]
On-delay timer Activated when the instruction is true.

Off-delay timer Output is energized for a time period after the


rung containing the timer enter an OFF state.

Retentive timer Count time-based intervals when instruction is


true, it can retain the accumulated value event
when the instruction goes false.

2. What are the differences between Timer-On Delay and Timer-Off-Delay? 


Timer-On Delay Timer-Off Delay
Starts counting only when input is turned on Starts counting only when the input is turned off
Turns on output after preset time has elapsed Turns output off after preset time has elapsed
Reset by turning off input and turning back on Reset by turning on input and turning back off
Used in lighting control by delay switching In a lighting control system, the timer can be set
multiple rows of lamps in production facilities for a specific amount of time for which the lights
will automatically turn off to conserve power.
Timing diagram Timing diagram

3. Give an example application where Retentive-On-Timer can be used.

4. Write a PLC ladder diagram to control a set of 2 running lights. Maintain a 5s light on interval.
Observation Discussion

When ON Switch-NO is triggered, Timer On


Delay (T4:1) starts accumulating and Timer
Timing Bit (T4:1/TT) is closed thus output
Light 1(O:2/1) is energizes. After 5 seconds,
T4:1/TT will open and de-energizes Light 1. At
the same time, Timer Done Bit (T4:1/DN) will
close its contact and Timer On Delay (T4:2)
starts accumulating. After 5 seconds, Timer
Timing Bit (T4:2 TT) is closed. Light-2 (O:2/1)
will be energized for 5 seconds and Timer
Done Bit (T4:2/DN) will trigger the reset
button to reset the accumulation of T4:1 and
T4:2. OFF Switch NC is triggered when the
light needs to be OFF.
Lab 2C – PLC Garage Door Scenario Quiz

Exercise 1

Observation Discussion
When door is fully closed, the SHUT lamp (O:2/4) is
energized. This is because LS 2 (I:1/4) is fully
closed. This changes the state of LS 2 in rung 001 to
be opened, this prevent the motor from going further
downwards.

When OPEN-NO (I:1/0) is triggered into its closed


position, LS 1 (I:1/3) is ON because it has not
reached its fully opened position. Motor DOWN
(O:2/1) being closed indicating that downwards
motor is not energized to prevent both motor from
energizing. Once I:1/0 is let go, it enters its open
position again, however, LS 1 and LS 2 are both in
closed state to indicate the door is not fully closed
nor fully opened.

When the door is fully opened, LS 1 enters an


opened position, but the input in rung 002 LS 1 is
normally closed, thus it acts in a closed position to
energize the OPEN lamp (O:2/3). Since LS 1 is
opened, at rung 000, the Motor UP will not be
energized despite the Open-NO is being pressed.
When Close-NO(I:1/1) is closed, LS 2 NC (I:1/4) is
in an open state indicating that the door is not yet
fully closed. Motor UP (O:2/0) is used to check
whether the Motor UP is energized or not to prevent
both motor from being energized at the same time.
Once I:1/1 is let go, it enters its open position again,
however, LS 1 and LS 2 are both in closed state to
indicate the door is not fully closed nor fully opened.
Exercise 2

Door is in its fully closed state,


limiting switch 2 (LS2, I:1/4) is
triggered, hence the SHUT lamp
(O:2/4) is energizes. This is an
indication light to not further wind
down the motor. The motor stops
because LS 2 also acts as a NC input
rung 001 which is in an opened state
when LS2 is ON.

When Open-NO (I:1/0) is pressed, it


enters a closed position. Triggering
the limiting switch 1 which has a
NC input. At the same time, it
checks for the state of the
downwards motor (O:2/1) to prevent
both motors from energizing at the
same time. In the end, it will
energize Motor-UP (O:2/0) to move
the door upwards. When this
happens, the Motor-UP (O:2/0) acts
as an input connected parallel I:1/0
to ensure that even if I:1/0 is let go,
the door will continue to open.

When door reaches its fully opened


position, limiting switch 1 NC (LS1,
I:1/3) enter its opened state, which
in return energizes the OPEN lamp
(O:2/3). This also cuts of the input
from OPEN-NO (I:1/0) OR Motor-
UP(O:2/0), hence the motor stops
opening the door.

When Close-NO (I:1/1) is triggered,


it closes its contacts. LS 2 is NC so
it allows the energization of Motor-
DOWN(O:2/1). Motor-UP (NC)
(O:2/0) acts as an input to check
whether the upward moving motor
is running or not to prevent both
motors from being energized at the
same time. At the same time, the
Motor-DOWN (O:2/1) acts as an
input connected parallel I:1/1 to
ensure that even if I:1/1 is let go, the
door will continue to close.
When MOTOR UP or MOTOR
DOWN is energizing, the operation
can stop half-way when the STOP-
NC (I:1/2) is triggered, it will open
its contact and breaking the
connection to
MOTOR-UP/MOTOR-DOWN.
However, the input MOTOR-UP
(O:2/1) and MOTOR-DOWN
(O:2/0) remains ON to ensure that
the next operation to either open or
close, both motors will not energize
at the same time. At the same time,
LS 1 and LS 2 are also triggered to
energize the AJAR lamp (O:2/2).
Reference

1. https://www.etf.ues.rs.ba/~slubura/Procesni%20racunari/Programmable%20Logic
%20Controllers%204th%20Edition%20(W%20Bolton).pdf
2. https://lib-ugtasiwfbmws47z3vw35fefu.1lib.fr/book/2849210/8d510a
3. https://www.electricalvolt.com/2022/08/difference-between-compact-plc-and-modular-plc/
#:~:text=A%20compact%20PLC%20is%20a,modules%20in%20a%20single%20package.
4. https://instrumentationtools.com/difference-between-compact-plc-and-modular-plc/
#:~:text=Modular%20Type%20PLC%20is%20a,number%20of%20inputs%2C%20and
%20outputs.

You might also like