PLC Lab - Day1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

WELCOME TO ME4440: SECTION 03

Teams for Lab 3: Programmable Logic Controllers (PLCs)

Teams Members First Name Last Name


6 SaiVonn Jenkins
5 Matthew Guido
Team 1
14 Blake Swanson
1 Wyatt Banfield
11 Lane Pauly
Team 2 2 Patrick Black
12 Chris Reinheimer
13 Hayden Seward
4 Taylor Corcoran
Team 3
3 Carter Cabay
9 Irtija Nazim
8 Aubrey Myers
Team 4 7 Jaden Littleton
10 Nicolas Botero
ME 4440
PROGRAMMABLE LOGIC CONTROLLERS (PLCS)

SECTION 03

TA:
SUPRATIK BHOWMIK SHOWDHO
Email: sshowdh@clemson.edu
Schedule Breakdown:

3 Experiment days

10/07 Tutorial, Home Security, Flow chart

10/09 Work on Code

Finish code, Statistical Analysis, Finish Above and Beyond

3 Writing days

Guidelines for Report.

Q/A

Q/A and check for deliverables.


Objectives:

1. Build a mechatronic system to perform a task.


2. Describe applications and use of a PLC.
3. Identify physical inputs and output of a PLC in hardware and in ladder logic code.
4. Implement fundamental ladder logic concepts.
5. Integrate hardware and software.
Aim:
To understand the functionalities and capabilities of PLCs and how to work with them.

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:

1. Equipment description and implementation.

2. Description of the logical progression of the ladder logic.

3. Statistical analysis of time required to enter disarm code.

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.

Primary side: Secondary circuit:


Provides the control Load to be controlled
signal to operate the (Fan, light bulb)
relay: Low voltage.
(Manual
switch/sensors)

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?

• Bulky; Difficult to reconfigure(requires disassembly and the rerunning of


many wires)
• The contacts wear and thus have limited life depending on loads.
• Poor performance when switching high inrush currents.

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.

PLCs read the inputs, execute the


program, and update the output.

Program in the PLC is written in a format


of Ladder Logic.

Inputs: Infrared motion detector, Magnetic


reed switch, Vibration sensor, Push-
Button, Toggle switches.

Output: 3 color light stack. (Separate


outputs; each light can be actuated
independently)
What is Ladder logic?
Ladder Logic https://www.youtube.com/watch?v=qaI48NCUvkA

Rung

Current
Ground
Source

Current Flows
Standard Output Coil

Normally Closed

Normally Open S

Set Output Coil


Ladder Logic
External input PLC outputs
%I0.2 %Q0.2
Physical wiring i/p [0 1 2] Think about..

Physical wiring i/p [0.0 - 0.9] Are the security devices normally
open or closed?

What would happen if the sensors


were wired normally open and an
intruder cut the wire to the
sensor?

Check out PLC Fiddle for creating & practicing your own
ladder logic circuits.
Human Machine Interfaces (HMIs)

• Human Machine Interfaces (HMI) are a way for the user


and PLC to communicate.

• User can enter inputs to the system (Start, Stop,


Numbers, etc.)

• HMI can display outputs of the system (States, Counters,


etc.)

For more information on HMIs: What is an HMI in PLC?


TUTORIAL

• Download Sensor connections file from canvas.


• Note: Motion Sensor #1 – Signal – connect to DIA
• Use a resistor for Motion sensor power connection(#3).
Motion
Emergency Sensor
switch

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.

• Follow 4.A from your lab manual. (Pg.23)


• Walks you through how to set physical inputs, HMI inputs, PLC outputs, and ladder logic in general.

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.

• To get a deeper understanding, you will be designing a Home Security System.

• 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

If incorrect: nothing happens


(HMI could say ‘’Incorrect
Passcode, Try Again”)

System is idle If passcode correct: green


(all sensors User hits User enters 4- light turns on/all sensors
deactivated) arm button digit passcode active
Repeat

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

If not in time or incorrect:


red light turns on.
HMI Screen Minimal Requirements

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)

→ Try to incorporate new → If three incorrect tries, then


If incorrect: nothing happens
ideas to secure the system.. turn Red/Yellow light on(or
(HMI could say ‘’Incorrect
any action)
Passcode, Try Again”)

System is idle If passcode correct: green


(all sensors User hits User enters 4- light turns on/all sensors
deactivated) arm button digit passcode active
Repeat

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

→ make detailed user manual for the


system. If not in time or incorrect:
→ Red light on and additional
→ Modifications to HMI screen. red light turns on.
action/alert
Today’s Tasks:
• Wire the sensor board to the PLC. Please verify your connections before you begin with the tutorial.
• Complete the tutorial.
• Follow 4.A from your lab manual. (Pg.23) Walks you through how to set physical inputs, HMI inputs,
PLC outputs, and ladder logic in general.
• Start working on Home security system(Flow Chart)
• Start thinking about Above and Beyond.

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

You might also like