PLC Lab - Day1
PLC Lab - Day1
PLC Lab - Day1
SECTION 03
TA:
SUPRATIK BHOWMIK SHOWDHO
Email: sshowdh@clemson.edu
Schedule Breakdown:
3 Experiment days
3 Writing days
Q/A
Tutorial: Set up a PLC and HMI, link them together, and program a ladder logic to accomplish desired tasks.
Goal is to develop a ladder logic program which would flash the green light in the stack for 5 seconds when a
button on the HMI( touch screen) is pressed or when a toggle switch is turned on.
Develop a home security system (Arm and disarm commands, intrusion alerts, and delay timing)
Deliverables: What is expected from you?
A comprehensive technical report(AIAA format) of maximum 20 pages (excluding title and reference pages)
covering following deliverables:
4. Recommendations to improve the methods and results of the lab with a companying justification.
For more information on relays:
Mechanical relays How Relays Work?
• Mechanical relays allows for a very small current to activate a switch for a, potentially, much higher voltage
or current system.
• To control a circuit using low power signal or where several circuits must be controlled by one signal
• Complete electrical isolation between the controlling and the controlled circuits.
If the switch is closed- Primary circuit closed- Current flows through coil- Magnetic field generated; Switch in contact-
Secondary circuit closed- Load is operated.
For more information:
Why PLCs over Mechanical relays? Why PLCs over Relay Systems?
WHY PLCs?
• Reprogramming software over
reconfiguring hardware.
• Easier to program for complex systems.
• Easier to modify/customize.
• More robust and have better tolerances in
extreme conditions.
• More user-friendly as they use well
maintained software packages.
For more information on basics of PLCs:
Programmable Logic Controllers Programable Logic Controller Basics
Microprocessor-based controller that uses a programmable memory to store instructions and to implement
functions such as logic, sequence, timing, counting, and arithmetic in order to control machines and
processes.
Rung
Current
Ground
Source
Current Flows
Standard Output Coil
Normally Closed
Normally Open S
Physical wiring i/p [0.0 - 0.9] Are the security devices normally
open or closed?
Check out PLC Fiddle for creating & practicing your own
ladder logic circuits.
Human Machine Interfaces (HMIs)
Vibration
Sensor
Toggle switch
array
Reed switch
TUTORIAL
• Inputs (NC)
Infrared motion detector, Magnetic reed switch, Vibration sensor, Push-Button, Toggle switches.
• Your Lab Manual (4.2.2) explains these sensors briefly.
• Wire the sensor board to the PLC. Please verify your connections before you begin with the tutorial.
Tips:
• Make sure your PLC is on (power switch on the top right of right side of the box)
• 7” HMI Display when you select the HMI.
• When setting physical inputs (toggle switch, door switch, motion sensor), check the bit number that this
sensor is associated with in the PLC (Switch the toggle switch and see which bit light is turning on and
off).
• When you write the ladder logic, adjust %I0.0 to whatever the actual bit number is.
Home Security System
• After finishing the tutorial, you will be familiar with PLCs.
• How to set up a PLC and HMI, link them together, and program ladder logic.
• Your security system will use ladder logic coding to program the PLC to give certain outputs (the
green, yellow, and red lights) depending on the state of the system and a series of potential inputs
(HMI and physical sensors)
• Your security system must include AT LEAST the following three components:
• The system should be set to ready when the appropriate arming code is input and the green light
should turn on (The system is now armed, and the sensors should be activated).
• When the input device or sensor detects an intrusion, the green light should turn off and the yellow
light should turn on (The system has been triggered by one of the sensors and need to be
deactivated)
• After 5 seconds, if the proper code has not been input, the yellow light should turn off and the red
light should turn on. If the proper code has been input, all lights should turn off and the system
should be deactivated.
Security System Flow Chart
Sensor is
tripped
If in time and correct: User has X seconds to hit Green light turns
yellow light turns off and “Disarm” and enter correct off and yellow
system is deactivated passcode on HMI light turns on
Arm Disarm
7 8 9
4 5 6
1 2 3
0
If you are not familiar with flow charts:
Your flow chart should look like this.. https://www.youtube.com/watch?v=iJmcgQRk048
..Each component is
explained in this figure
→ Add additional functionality to the program ( more sensors,
Above and Beyond: Stay/Away mode, ability to change the passcode)
Sensor is
tripped
If in time and correct: User has X seconds to hit Green light turns
yellow light turns off and “Disarm” and enter correct off and yellow
system is deactivated passcode on HMI light turns on
Resources:
• Basics of relays: How Relays Work?
• Why PLCs?: Why PLCs over Relay Systems?
• Basics of PLCs: Programable Logic Controller Basics
• What is Ladder logic? https://www.youtube.com/watch?v=qaI48NCUvkA
• Check out PLC Fiddle for creating & practicing your own ladder logic circuits.
• HMIs: What is an HMI in PLC?
• Flow charts: https://www.youtube.com/watch?v=iJmcgQRk048