Potentiometer
Potentiometer
Experiment 03
Study of a Digital Programmable Logic Controller using Totally
Integrated Automation (TIA) Portal
Evaluation Form:
IMPORTANT! You must complete this experiment during your scheduled lab period.
All work for this experiment must be demonstrated to and verified by your lab instructor
before the end of your scheduled lab period.
“In signing this statement, I hereby certify that the work on this experiment is my own and that I have not copied
the work of any other student (past or present) while completing this experiment. I understand that if I fail to honor
this agreement, I will receive a score of ZERO for this experiment and be subject to possible disciplinary action.”
1 Experiment Objective
When you have completed this exercise, you will be familiar with the programmable logic
controller (PLC). You will know how to configure the inputs and outputs of a PLC, familiarize
yourselves with the ladder diagram logic and be able to apply your knowledge to engineering
problems with the PLC.
2 Theory
2.1 Background
In every industrial environment, all critical control processes rely on automated machinery to
perform the repeated tasks, from mounting tiny pieces of SMDs on the PCB board to weaving
fabric in garments. An integral component of current level of automation in this regard is called
the programmable logic controller (PLC). A programmable logic controller is a type of computer
that can receive data through its inputs and send operating instructions through its outputs to
control after processing the input in its CPU, and automate a particular work process. A PLC takes
in inputs, whether from automated data capture points or from human input points such as switches
or buttons. Based on its programming, the PLC then decides whether or not to change the output.
A PLC’s outputs can control a huge variety of equipment, including motors, solenoid valves,
lights, switchgear, safety shut-offs and many others.
PLCs largely replaced the manual relay-based control systems that were common in older
industrial facilities. Relay systems are complex and prone to failure and, in the 1960s, the inventor
Richard Morley introduced the first PLCs as an alternative. PLCs have been a standard element of
industrial machinery design for many decades. Moreover, PLCs are completely solid-state devices,
which means they have no moving parts. That makes them exceptionally reliable and more able to
survive the challenging conditions present in many industrial facilities.
Most PLCs can be programmed using a standard computer and PLC programming software. In
this experiment, we use the ‘Totally Integrated Automation’, or TIA Portal in short as the software
for programming the PLC. The programming language can be based on graphical interfaces or text
interfaces. Ladder logic has traditionally been the most commonly used programming language
for PLCs. It’s one of the most intuitive languages available because it uses a graphic interface
that’s designed to resemble electrical diagrams, even using many of the same symbols for contacts
Page -01
Experiment 3 EEE318
and relays to keep a similarity of the older relay-based control system. Ladder logic uses a series
of “rungs” to represent a controller’s I/O channels, each of which can be programmed with
conditions and rules.
Ladder Logic is laid out in the shape of a ladder, with on the left side, ladder logic instructions are
set as conditions, while the ones on the right side are instructions that are triggered if the conditions
are met. Each rung of the ladder spans from left to right and is executed from top to bottom by the
PLC.
An example of a simple ladder diagram is shown in Figure 1. The logic is to start a motor when
the START push button is pressed and released, and to stop the motor when a similar STOP push
button is pressed and released. A lamp indicator is also included to show if the motor is running
or not.
PLCs operate with binary signals; each input and output condition can be set to zero or one. There
are special symbols that are commonly used in PLC programming. These ladder diagram symbols
are the building blocks of ladder diagrams.
Contact Symbols:
Normally Open Contact (NO): Contact can represent any types of input such as push button,
sensor, current in the output coils or state of any output actuators. When the condition is true (push
button is pressed or current is flowing in the output coil), then the contact is closed and output
Page -02
Experiment 3 EEE318
logic flow is enabled. When the condition is FALSE then the contact is OPEN and output logic
flow is blocked.
Normally Closed Contact (NC): NC contact is similar to NO Contact, but logic is reversed. When
the condition is true then the contact is OPEN and output logic flow is blocked. And when the
condition is FALSE then the contact is CLOSED and output logic flow is enabled. The NC contact
can be thought of as NO contact followed by a NOT gate.
Coil Symbols:
Output Coil: Generic coil symbol can represent any sorts of output actuators such as solenoid,
motor Etc. When the input condition is TRUE then the output is ON. And when the input condition
is FALSE then the output is OFF.
Set Coil: When the input condition transitions from FALSE to TRUE then the output is set ON
and once the output is set ON, it stays ON, even if the input condition goes FALSE.
Reset Coil: When the input condition is TRUE, the output is reset to OFF. And when the input
condition is FALSE it has no effect on the output. The SET and RESET coils can share the same
variable address and therefore work hand in hand.
Timer symbol:
Page -03
Experiment 3 EEE318
Timer Delay ON: The ON delay timer begins counting time when the start input is TRUE. After
the preset time expires, the DONE output goes to TRUE. If at any time, the start input goes FALSE,
the timer is reset and the done output goes to FALSE.
Timer Delay OFF: Opposite to the Timer Delay ON element, when the input condition is true
then the output turns ON. Then if the input condition goes false the timer begins and when the
preset time set point has been reached the output turns OFF. If the input condition goes TRUE, at
any stage, the timer stops and the output turns ON as well.
Suppose, there is an LED that can be turned ON using a pushbutton switch. Once the switch is
pressed, the LED will stay bright until another pushbutton switch is pressed to turn it off. The
objective is to setup a programmable logic controller and draw appropriate ladder diagram to solve
this problem.
The first step to solve the problem is to construct the ladder diagram. Below is a step by step
process of analyzing the problem and constructing the ladder diagram:
➢ Since we are using a pushbutton switch (let us call this switch pushON) to turn the LED on,
we can use a normally open contact in series with an output valve that effectively lights the
LED.
➢ The other switch (let us call this switch pushOFF) is used to turn the LED off, so we can place
it in the same rung as the normally open contact and the valve.
➢ Finally, since the LED is kept on even after the pushON switch is turned off, hence we need
to latch the output valve in parallel with the pushON switch. This means, that once the LED
turns on and the state of the output valve becomes true, then it will keep the LED on until the
pushOFF switch is turned on.
Page -04
Experiment 3 EEE318
Following the steps, we can visualize a ladder diagram as shown in Figure 8. You may construct
this using the online simulator and use the run button shown in green to validate your diagram.
Once you have validated the ladder diagram, you may setup the digital PLC as detailed in the next
section.
The following is a list of steps that you will need to follow in general for any problem you are
solving with the digital PLC:
➢ Turn on your PLC. Start the TIA portal and create a new project. Give a suitable project name
and save the project in your group's folder. Click on create.
➢ Go to Devices and Networks from the leftmost pan and click on ‘Add New Device’. Select
your controller by looking at the PLC hardware. For our experiments, we will be using
'Controller/SIMATIC S7-1500/CPU/CPU 1512-C-1 PN/6ES7 512-1CK01-0AB0'. Select that
device and click Add.
➢ A new window will open up asking for a password to proceed. Uncheck the checkbox on top
of password as shown in Figure 9, click next, then again click next on the next window.
Page -05
Experiment 3 EEE318
Page -06
Experiment 3 EEE318
Page -07
Experiment 3 EEE318
➢ Click on ‘Consider as trusted source and make connection’. Click on 'Continue without
synchronization'. Click on Load and click Finish.
➢ If you are asked to reset, then delete all previously loaded programs.
➢ Click on ‘Go online’ to establish a virtual connection between the computer and the PLC.
Turn on monitoring as shown by the goggles symbol in Figure 14.
For the following two problems, construct the ladder diagram and verify your logic in the
digital PLC hardware.
Problem 1:
Initial position
• All Switches in the OFF position
• Lights 3, 4, 5 are ON but other Lights OFF
Tasks
• Light 0 turns ON when Switch 0 and Switch 1 are ON.
• Light 1 turns ON when Switch 2 and Switch 3 are ON.
• Light 2 turns ON when Light 0 and Light 1 are ON.
• Light 3 turns OFF when Switch 4 is ON.
• Light 4 turns OFF when Switch 4 and Switch 5 are ON.
• Light 5 turns OFF when Switch 6 or Switch 7 are ON.
• Light 6 turns ON when Switch 0 is OFF and Switch 7 is ON.
• Light 7 turns ON when Switch 0 and Switch 1 are ON and Switch 4 and Switch 6 are
OFF.
Problem 2:
A PLC system has 5 push button switches, labelled 1,2,3,4 and "Stop" and 2 lights: red and
green. When the switches are pressed in a particular order, one light is energized.
Page -08
Experiment 3 EEE318
Page -09
Experiment 3 EEE318
5 Conclusion
In this experiment, you have learnt the basics of programmable logic controller and familiarized
yourself with the different symbols used in PLC programming along with the digital PLC software
by solving an example problem using programmable logic.
6 Review Questions
Problem:
Initial position
• All Switches in the OFF position
• All Lights OFF
Tasks
1. Write a PLC program that will control three Lights.
2. Each Light will have its own Start and Stop switch. When the Start switch is ON, the
Light turns ON. When the Start switch is turned OFF, the Light stays ON until the Stop
switch is turned ON.
3. The program will not allow more than one Light to be turned ON at a time.
4. Modify your program so that any two Lights can be turned ON at a time.
5. The Lights are still allowed to be operated individually.
For this problem, construct the ladder diagram and attach it with the lab report.
7 Appendix
7.1 Acknowledgements
The labsheet is prepared by Shafin Bin Hamid, Mrinmoy Kundu and Azazul Islam at the Dept. of
EEE, BUET, on 07/07/2023 under the supervision of Dr. Pran Kanai Saha, Dr. Shaikh Anowarul
Fattah, Dr. Celia Shahnaz and Dr. Mohammad Ariful Haque.
Page -10