zelio soft codes

Description

for all 10 use zelio soft for codes for each 10 parts a/b and show all steps n codes

Don't use plagiarized sources. Get Your Custom Assignment on
zelio soft codes
From as Little as $13/Page

Unformatted Attachment Preview

EE302 Basic Electrical Engineering II
Introduction to Zelio Smart Relays
and
ZelioSoft2 Ladder Logic: Lecture 1
Mr. Jason Sternhagen
March 19, 2024
1
Electromechanical Relay
• Electrically operated switch
– Coil of wire around an iron core creates a magnetic field when
energized
– Magnetic field caused an armature to move which makes or breaks
contacts
• Uses:
– Control a high power circuit with a low power signal
– Control several circuits with one signal
2
Electromechanical Relay
3
Microcontroller
• Analog/ Digital inputs
• Low power analog outputs (can’t control a large
load directly; need external transistor or relay)
• Low cost ~$1 each, designed to be embedded
into products
4
Schneider Smart Relay (PLC)
• Combines
microcontroller with
electromechanical relays
• Eight analog/ digital
inputs
• Four soft keys
• Four SPST relay contacts
• Simple programming
using ladder logic
• Much higher cost $270
• Generally used for
industrial process control
and automation
5
Electrical Connections
• 12VDC power supply*
• 4 digital inputs
• 4 digital/ analog
inputs
• 4 relay contacts
• 4 soft keys
• Backlit LCD display
6
Microcontroller vs PLC Ladder Logic
• Microcontroller (C, C++, Assembly):
– Starts at MAIN
– Moves to the next line and executes that
command
– Moves to the next line and executes that
command
– Etc
• Ladder logic:
– Scans all inputs
– Executes logic
– Updates all outputs
– Code is NOT executed from the top downward
7
Ladder Logic Introduction
• Ladder logic is a
graphical programming
language historically
based on relay logic
• Power flows from left
to right across the
“rungs” of a ladder
shaped program
• We have already
introduced the concept
of ladder logic in the
previous (digital)
section
8
AND Gate
• The AND gate is
equal in function to
two switches wired
in series
• Power flows from
left to right
• The light is only ON
when both switches
are closed
https://www.ibiblio.org/kuphaldt/electricCircuits/Digital/DIGI_7.html
9
OR Gate
• The OR gate is
equal in function
to two switches
wired in parallel
• Power flows from
left to right
• Closing either
switch will power
the light
https://www.ibiblio.org/kuphaldt/electricCircuits/Digital/DIGI_7.html
10
NOT (Inverter)
• The inverter is
equivalent to one
normally closed
switch in series with
the light
• When the input is low,
the normally closed
switch supplies power
to the light
• When the input is
high, the normally
closed switch opens
and the light is OFF
https://www.ibiblio.org/kuphaldt/electricCircuits/Digital/DIGI_7.html
11
Elevator Control System
• At one time, “programs” were “coded” with
wires and mechanical relays
• PLCs use software which enables field changes
and simulation before implementation
12
ZelioSoft2
• Free downloadable software
– See the Software section of D2L
• Windows based and easy to use
• Can use ladder logic or free body diagram to
write programs
• Can simulate programs without the hardware
(other PLC software packages do not allow for
this!!!)
• Do not remove USB programming cable when
in use; will immediately crash Windows….
13
Programming Window
Inputs
Outputs
• First five yellow
columns are for
inputs/ contacts
• Sixth blue column is
for output coils
(internal OR
external)
• An output may only
be used ONCE*
• Can also add
comments to
explain a row’s
function
14
Software Modes
• Edit Mode:
– Click on the ruler/ triangle button
– Code is written and can be transferred to the PLC
• Simulation Mode:
– Click on the “S” button
– Then the “Run” button
– Inputs can be stimulated and outputs observed
15
Simulation
• There are three icons at the bottom of the
Simulation screen which allow you to monitor:
– Digital Inputs
– Z keys
– Digital Outputs
16
Simulation
• The color of a rung changes from blue to red
as power flows and the rung’s logic becomes
true
17
Simulation
• Momentarily pressing the Z1 key toggles Q1
coil
• Q1 contact then closes and energizes Q2 coil
18
Inputs (I)
• 4 digital inputs (I1, I2, I3, and I4).
• 4 digital (or analog) inputs (IB, IC, ID, and IE).
• Logic high/ low and analog inputs similar to microcontroller (Arduino)
19
Inputs
• Inputs can be configured as normally open or
normally closed
• Note uppercase “I” for normally open and
lowercase “i” for normally closed
– Normally open input needs a logic high input to close
the switch
– Normally closed input needs a logic high input to open
20
the switch
Z Buttons/ Soft Keys
• 4 soft key buttons on the front panel
• Can be used for anything where a MOMENTARY
21
switch is needed
Z Buttons/ Soft Keys
• Z-buttons are the four dark gray pushbuttons on the front
panel of the PLC
• Inputs can be configured as normally open or normally
closed
• Note uppercase Z for normally open and lowercase z for
normally closed
– Normally open = open circuit until pressed
– Normally closed = short circuit until pressed
22
Output Contacts/ Coils
• 4 external relay contacts controlled by coils in the program
• 24VDC or 240VAC at 8A
• Can also use the associated contacts for state monitoring
23
• Three ways of actuating the external contacts/ coils
Active On Coil [Q






Coil is energized only when the ladder rung is true (power flows all the way across)
This mode is like a traditional relay
When true, the contacts that it is connected to are closed; otherwise not energized
Here we are using the Z1 soft key to energize the Q1 contact.
Q1 contact is closed every time the Z1 button is pressed.
We could also configure Z1 as normally open; then the Q1 contacts are closed until we
push the Z1 button
24
Pulse Coil ʃQ
• Coil state is toggled on and off by a
rising edge
– Pushing the Z1 button once closes the
Q1 external contact.
– External contact Q1 stays closed
until…
– Pushing Z1 button again opens the
Q1 contact
– External contact Q1 stays open until…
25
Set/ Reset Coil: SQ RQ
• Set coil is energized momentarily to latch
the contacts shut
• Reset coil is energized momentarily to
unlatch the contacts
26
Memory Contacts/ Coils
• Same concept as Output Contacts/ Coils
except these are INTERNAL
• Often used for memory and control purposes
27
Timers
• Ten types of timers differing in how the
process is triggered and/ or reset
28
Timer Function A: Active, control held down
• Timer contact T closes after TT coil is energized
• Time delayed load is turned off when the TT coil
is de-energized or if RT reset coil is energized
29
Function a: Active, Press to start/ stop
• Rising edge/pulse on TT coil starts timer count
• Timer contacts T are closed after time delay and stay
closed until…
• Rising edge/pulse of RT coil opens timer contacts
30
Timer Function C: Off delay
• Timer contacts close immediately when TT coil is energized
• Timer contacts stay closed as long as TT coil is energized
• After TT coil is energized and time has elapsed, timer
contacts open
31
Timer Function: One pulse one shot
• Timer contact T closes on rising edge of TT coil
• Timer contact T opens after preset time of
rising edge
32
Counters
• Up-counting to a preset value
• Down-counting to a preset value
33
Counter Parameters
• Contacts closed when preset number of pulses
(here, 5) has occurred Or…
• Contacts closed when value reaches zero
34
Counter Example
• CC1 coil up-counts value from zero
• After pressing Z1 button five times, C1
contacts close
• Pressing Z2 button resets count back to zero
35
Fast Counter
• Can count at up a 1kHz rate (tachometer, etc)
• Otherwise, similar functionality to “slow” counter 36
Counter Comparator
• Compares the numerical value of two counters.
37
Analog Comparator
• Measures analog inputs IB, IC, ID, and IE
– Compares measured analog value with an internal reference value
– Compares two measured analog values
• Result is in the form of a contact (normally open or normally closed)
38
Analog Comparator Types
• An example would be reading a distance
sensor with the PLC’s analog input, comparing
it to a set-point, and then using the output to
turn on a warning light (EE302L laboratory)
39
Analog Input Simulation
Rotate the knob with the mouse to vary the
voltage input to the PLC during simulation
• Click on the voltmeter icon at the bottom of the screen; this
will allow testing of an analog comparator
• Rotate the knob with the mouse to vary the voltage input
to the PLC
40
Real Time Clock
• Control a device during a particular day and time
• Implemented as a contact (normally open or
closed)
41
Text Blocks
• Display text or numerical value on the LCD screen
• Text block has a maximum of 4 lines
• Can have 16 different text blocks
42
Text Blocks
• Pressing Z1 energizes coil TX1
• Text “Hello” is then displayed on the LCD screen
• Pressing Z2 energizes RX1 reset coil which
removes text from display
43
Text Box Simulation
• On the “Window” tab, select “Front Panel”
44
LCD Backlighting
• Normally, the display is lit for 30 seconds after pressing
any of the front panel buttons
• Can also use ladder logic to illuminate the display
45
Summer/ Winter
• Allows for seasonal changes
• Requires relay with real-time clock
46
Assignment for Next Time
• Install the software as described in the
following slides
• Try out each of the contacts and coils outlined
in this lecture
• Review slides 58-71 before the laboratory
• We will be starting the next lecture by walking
through examples; please be prepared to use
your laptop in class
47
How to Install ZelioSoft2
• Unzip the files using 7zip or equivalent
• Double click on “autorun”
48
How to Install ZelioSoft2
• Select preferred language
49
How to Install ZelioSoft2 V4.6
• Select “Install Zelio Soft”
50
How to Install ZelioSoft2 V4.6
• Follow the prompts to completion!
51
Software Modes
• Edit Mode:
– Click on the ruler/ triangle button
– Code is written and can be transferred to the PLC
• Simulation Mode:
– Click on the “S” button; then the “Run” button
– Inputs can be stimulated and outputs observed
52
Create New Program
• Open ZelioSoft2 version 4.6 from the start
menu
• Select “Create new program”
53
Select Module Type
• Select the top left module type.
54
Select Module Part Number
• Find and highlight the “SR2B121JD” module
part number (this is the only 12V model)
55
Extension Modules
• We are not using any extension modules.
• Click NEXT without adding any extension
modules.
56
Select Programming Method
• We have the option of programming in ladder
logic or free body diagram.
• We are going to use ladder logic.
57
Select Symbol Type
• Ladder Symbol (your preference)
• Electrical Symbol
58
Transferring the Program to the PLC
• There are two ways that the program can be
transferred to (and from) the PLC: modem and
USB
• We are going to use the SR2USB01 which
connects to the USB port
• The first step is to configure and test the
communication
59
Configure the USB Interface
• Click on “Transfer” from the top menu
60
Configure the USB Interface
• Select “COMMUNICATION Configuration”
61
Configure the USB Interface
• Select the COM port with “USB” in the name
• In our lab, it will NOT be COM1 or COM 3
62
Test the USB Interface Communication
• Click “Test” to verify communication with PLC
• A message box will appear indicating successful
communication
63
Transfer Program to PLC
• Make sure that the USB interface has been configured
and the PC is communicating with the PLC
• Click “Transfer” from the top menu
64
Transfer Program to PLC
• Select “Transfer Program” then “PC > Module”
65
Transfer Program to PLC
• Click “Yes” to stop the program currently
operating in the PLC
66
Transfer Program to PLC
• We want the new program to be executed after
transfer to the PLC
• Select “Run mode after loading”
67
Transfer Program to PLC
• Zeliosoft gives the option of saving the ladder
logic program before programming
• However, we will select “Cancel”
68
Transfer Program to PLC
• This is to remind you that the program
currently in the PLC will be overwritten
• Note that it is possible to read the program
from the PLC to the PC (this is not possible
with the Arduino)
69
Transfer Program to PLC
• Several message boxes
will appear with the
status of the transfer
• The last two message
indicate that the PLC
has been programmed
and is now running the
program
70
EE302 Basic Electrical Engineering II
Introduction to Zelio Smart Relays
and
ZelioSoft2 V4.5 Ladder Logic:
Lecture 2
Mr. Jason Sternhagen
March 21, 2023
71
Simple Pump Control
I1 is HIGH if
water present
at that level;
LOW if tank
empty
• Press START to pump water out of tank, STOP to stop pump.
When tank is empty, pump stops. Can’t start pump if tank
is empty
– Z1 starts pump
– Z2 stops pump
– Level detector I1 is high if water is present; low if tank is empty 72
Pump Control Ladder Logic
• Z1 sets Q1
• Z2 resets Q1
• When tank is empty, I1 is low and reset coil Q1 is
continually reset
• When water level is high, I1 is high and opens N/C
contact enabling motor to be turned on
73
Fallen Bottle Detector
Upright; Q1 LOW
Fallen; Q1 HIGH
I1
I2
• Develop ladder logic to detect fallen bottles and
push them off of the conveyor belt
– Inputs I1 and I2 detect height (high if object detected)
– Output Q1 pushes the bottles off of the conveyor belt74
Fallen Bottle Detector Ladder Logic
Upright; Q1 LOW
Fallen; Q1 HIGH
I1
I2
• If I1 detects (upright bottle), it opens up the N/C
contact
• If I2 detects an object it closes the N/O contact
• Q1 should only be energized if I2 is high and I1 is
low
75
Simple Conveyor Belt Start/ Stop
• A conveyor belt moves parts to an unloading area where the conveyor belt ends
at a stop bar. These parts are located approximately five seconds apart. If the
operator is not present to remove the part or slipping behind, we want the
controller to automatically stop the conveyor so that parts are not accumulating
or spilling onto the floor.
– Conveyor belt start button (I1) must be held down for three seconds continuously
before the conveyor is allowed to start.
– Conveyor belt motor controlled by Q1
– Conveyor is automatically stopped if a part is detected in the unload area for more
than five seconds (I3).
– If automatically stopped, operator must manually restart the system (I1).
76
– Manual push button stop (I2)
Simple Conveyor Belt Start/ Stop Ladder Logic
• I1 starts timer TT1
• T1 contacts close after 3 seconds which starts conveyor via
SQ1
• I2 turns off conveyor via RQ1
• I3 starts timer TT2
• T2 turns off conveyor after 5 seconds.
77
Paint Can Filling Process
• Rotary switch selects color
• Outputs Q1 and Q2 control dispenser valve
• I4 starts filling process
78
Paint Can Filling Process Ladder Logic
Toggle
Switch
Toggle
Switch
Yellow
Blue
• I4 starts process
• I1 selects yellow dispenser only
• I2 selects blue and yellow dispenser
• I3 selects blue dispenser only
79
Conveyor Belt / Box Packaging
I1 counts boxes
Q2 starts
boxing
process
I2 goes
HIGH when
boxing
process is
done
• Once the photoelectric sensor detects 10 products have passed and dropped into
the box, the conveyor belt stops, the robotic arm folds and tapes box lid, a new
box is pushed into place, and the conveyor belt restarted
– Z1 starts conveyor
– Z2 stops conveyor
– I1 detects products moving on conveyor belt
– I2 indicates when box has been successfully sealed and a new box is in place
– Q1 controls the conveyor belt
– Q2 is robot arm process to fold and seal the box, and put new box into place
80
Conveyor Belt / Box Packaging Ladder Logic
Start
Stop




Z1 and Z2 start and stop conveyor (Q1)
I1 is monitored via CC1 counter
Output of counter (C1) stops conveyor (RQ1) and starts robot arm (SQ2)
I2 restarts conveyor (SQ1) stops robot arm(RQ2)
81
Sequential Motor Control
82
Sequential Motor Control Ladder Logic
Start
10 seconds
10 seconds
5 seconds
5 seconds
Stop




Z1 starts Q1; Q1 starts timer TT1
TT1 contact closes after 10 seconds which starts Q2 and TT2
T2 closes after 5 seconds which starts Q3
Z2 resets all coils
83
Automatic Mixing System
I1 high when tank full
I2 high when tank empty
• Liquids A and B begin filling when start button pressed
• Level sensor (I1) goes high when tank is full which turns off
Q1 and Q2 and starts mixer (Q4)
• Mixer (Q4) is operated for 10 seconds
• Outlet valve (Q3) is turned on until I2 indicates tank is
84
empty
Automatic Mixing System
Start
Valve A
Valve B
Stop
Valve A
Full
Valve B
Full
Mixer On
10s timer




10s
timer
Mixer Off
Empty
Outlet closed
Outlet open
Z1/ Z2 start and stop Q1 and Q2
I1 float stops Q1 and Q2, starts Q4 mixer, and timer TT1
Output of timer T1 turns off mixer (Q4) and opens drain valve (Q3)
Drain valve (Q3) runs until I2 indicates empty
85
EE302 Basic Electrical Engineering II
Introduction to Zelio Smart Relays
and
ZelioSoft2 V4.5 Ladder Logic:
Lecture 3
Mr. Jason Sternhagen
March 21, 2023
Adapted from “PLC Application Exercises, NFI
Industrial Automation Training Academy”
86
Floodlight Control
IR Sensor; I1
• IR sensor (I1) detects movement and has logic
high output
• If movement is detected, turn floodlight (Q1) on
for 10 seconds and then turn off
87
Floodlight Control
Sensor
Timer
Timer
Light
• Every (I1) sensor pulse turns timer on
• Timer stays on for 10 seconds and then turns off
88
Q1 which is active on
3-Way Light Switch
• Stairwell light
(Q1) can be
turned on or
off by either I1
or I2
89
3-Way Light Switch
• Toggling I1 can make rung true or false
• Toggling I2 can make rung true or false
90
Parking Lot Interlock Circuit 1
• Parking lot has single lane in/ out. Want to only let one car
pass at a time
– Car entering is detected by I1 which goes high
– Car leaving is detected by I2 which goes high
– Q1 high indicates “GO” when on otherwise “STOP”
– Q2 high indicates “GO” when on otherwise “STOP”
91
Parking Lot Interlock Circuit 1
Parking lot has single lane in/ out. Want to only let
one car pass at a time
Car entering is detected by I1 which goes high
Car leaving is detected by I2 which goes high
Q1 high indicates “GO” when on otherwise
“STOP”
Q2 high indicates “GO” when on otherwise
“STOP”
Entering
Leaving
OK to enter from Left
OK to leave from Right
• I1 turns on entering “GO” (Q1) and disables leaving “GO”
sign (Q2)
• I2 turns on leaving “GO” (Q2) and disables entering “GO”
sign (Q1)
92
Quiz Bowl
• Indicator light should illuminate for the first
group pressing the button
• Other groups should be locked out
• Host can reset light
93
Quiz Bowl
Kids
High School
Q2 or Q3 can
prevent Q1
Q1 or Q3 can prevent Q2
Teachers
Q1 or Q2 can prevent Q3
Host Reset
• Z1 or Z2 sets Q1 coil which opens
contacts in Z3 and Z4 rungs
94
• I1 resets all coils
Parking Lot Interlock Circuit 2
If Q2 is ON, Q4 and Q1 cannot be ON
If Q4 is ON, Q2 and Q3 cannot be ON
I1
Q1
Q2
Q3
Q4
I2
• Parking ramp has single lane in/ out. Want to only let one
car pass at a time
– Car entering is detected by I1 which goes high
– Car leaving is detected by I2 which goes high
– Q1 high indicates “STOP” @ Ground Floor
– Q2 high indicates “GO” @ Ground Floor
– Q3 indicates “STOP” @ Basement
– Q4 indicates “GO” @ Basement
95
Parking Lot Interlock Circuit 2
Entering Gnd Floor
If Q4 is on, Q2 and
Q2 must be off
Exiting Basement
If Q2 is on, Q1 and
Q4 must be off
• I1 turns on Q2 and Q3
• I2 turns on Q1 and Q4
• Q4 inhibits Q2 and Q3
• Q2 inhibits Q4 and Q1
96
Forward Reverse Motor Control
• Motor starts in FWD direction after holding button for 3
seconds
• Motor starts in REV direction after holding button for 3
seconds
• Cannot have both FWD and REV active at the same time
• Cannot go from FWD to REV (or vice versus)
instantaneously; need minimum 10 seconds for motor to
slow down
97
Forward Reverse Motor Control
FWD Button
REV Interlock
10s Timer
FWD
3s Timer
10s Timer
REV Button
3s Timer
3s Timer
FWD Interlock
3s Timer
REV
Stop Button
10s Timer
• TT1 and TT1 are 3 second delay on operate timers
• N/C Q1 and Q2 prevent crossed operation
• Off button starts timer which disables I1 and I2 from
restarting operation
98
Automatic Door Control
• Door opens (Q1) when IR sensor (I1) detects someone approaching door
• Door limit switch (I2) detects when door is open and stops Q1
• If the door is open for 7 seconds (I2) and the IR sensor detects nothing
(I1), door is closed until limit switch goes high (I3)
• Door closing ceases immediately if IR sensor detects someone
99
approaching door
Automatic Door Control
IR Sensor
Open Motor
Open Switch
Open Motor
Open Switch
7s Timer
7s Timer
Closed Switch
Reset Timer if
some walks up
Close Motor
Close Motor
Reset Close Motor if
someone walks up






IR sensor (I1) sets door opener (Q1)
Door open limit switch (I2) resets door opener (Q1)
If I2 is high and I1 low, 7 second timer is started
Output of timer sets door closer motor (Q2)
Door closed limit switch (I3) resets door closer motor (Q2)
IR sensor (I1) can also reset door closer motor (Q2)
100
Product Inventory 1
• Want an alarm (Q1) to indicate if remaining stock
is 5 pieces or less
• Each incoming product triggers Z1
• Each outgoing product triggers Z2
101
Product Inventory 1
Incoming
Count
Outgoing
Outgoing
Direction
Counter Comp.
Alarm
Reset Button
Count
Reset
Count
• Z1 up-counts CC1
• Z2 changes count direction at DC1 and down-counts CC1
• Counter comparator V1 compares CC1 with constant (5) and turns on
alarm Q1
102
• Z3 used to reset CC1 counter value
Product Inventory 2
• Additional features:
– Display current product quantity on screen
– Flash backlight and alarm if low inventory
– Add labels for up/ down
103
Product Inventory 2
Outgoing
Direction
Textbox
Counter Comp.
Timer
Timer
Alarm
Timer
Backlight
• Add textbox TX1
• Select current value in counter C1
• Add labels for up/ down buttons
• Use flash timer for backlight and alarm
104
Automatic Coffee Maker
Q2 concentrated
coffee valve
Q2 water valve
Q4 coffee valve
Q1 pushes out
coffee cup
I2 high when
container is full
• Coin insertion triggers momentary contact (I1) which starts machine
– Paper cup is pushed to outlet using actuator (Q1)
– Coffee solution and hot water (Q2) poured into mixing container until full (I2
high when container is full)
– Actuator returned when tank full (I2)
– Stirred (Q3) for 10 seconds
– Valve (Q4) opened for 5 seconds to pour coffee into cup
105
Automatic Coffee Maker






Coin Detector
Push Cup
Presence of cup opens valves
Valves Open
Tank Full
Valves Closed
Tank Full
10s Timer
10s Timer
Stirrer
Stirrer On
5s Timer
5s Timer
Output
Valve
I1 sets Q1 actuator which sets Q2 valves open
I2 tank level resets Q1 and Q2
I2 starts TT1: 10 second, on pulse, one shot
Output of T1 operates Q3 stirrer
Q3 also starts TT2: 5 second timing after pulse timer
After Q3 goes low, Q4 delivery valve is operated for 5 seconds
106
Fail Safe Design
• There are many ways to develop hardware
and software which meet requirements
• However, some methods are better than
others
• A circuit should default to the safest mode in
the event of a common failure (broken or
failed wiring)
Fail Safe Modes
• A washing machine uses a solenoid to control
the water entering the tub
– How should the solenoid fail?
– Energized to open; spring to close
• Controlling cooling water
– Better to have the valves fail open instead of
closed
– Energized to close; spring to open
Fire Alarm Using OR Logic
• Simplest means of enabling any one of four
switches to trigger alarm siren
Likely Failure Mode
• Statistically, an open circuit is much more likely to occur than any
other failure
– Open, damaged, or burned switch contacts
– Open relay coils
– Blown fuses
– Poor connections
– Accidentally cut wires
Fail Safe Fire Alarm
• Fire alarm switches are in normally closed condition
• CR1 held open by continuity of alarm switches
• Opening any one of the switches energizes CR1 coil
which opens CR1 normally closed contact
• A failed wire or contact will cause a nuisance fire alarm
• Better than not being able to respond to a real fire
EE 302L: Basic Electrical Engineering II
Laboratory #10
Introduction to Zelio Programmable Logic Controllers and Ladder Logic
Revised: 3-13-2023
Name
Date
Name
Section
Objectives:
 Examine the Schneider Electric Zelio PLC and develop ladder logic code to perform
basic operations.
Materials:
 Schnieder Electric Zelio PLC (SR2 B121JD)
 Schnieder Electric Zelio USB Programmer (SR2USB01)
 One yellow 12V incandescent lamp/ wood base
 One red 12V incandescent lamp/ wood base
 Sharp 2Y0A21YK0F IR distance sensor (Digikey p/n 28995) with JST to breadboard (3pin) cable (Sparkfun p/n CAB-13685)
 Three pushbutton switches (Sparkfun p/n COM-09190)
 NPN inductive proximity sensor (LJ12A3-4-Z/BX)
 12V or 24V Fan
 Slotted screwdrivers (Jameco p/n 127271)
Test Equipment:
 DC Power Supply
 PC with ZelioSoft and USB driver installed
 PC with Zeliosoft lecture powerpoint copy on the desktop
Preparation:
 Each student shall bring a printed copy of this laboratory manual.
 Each student shall complete the pre-laboratory portion before class begins.
 GTA shall ensure that all components/ materials are available and all equipment is
functional before class begins.
 GTA shall complete pre-laboratory assignments, demonstrate laboratory requirements to
the instructor at least 24 hours before the laboratory is scheduled, and bring a printed
copy of this laboratory manual to class.
 GTA shall have a working copy of each circuit available for inspection by students.
1 of 10
Introduction and Background:
Figure 1. Schneider Electric model SR2B121JD.
The PLC combines the computational capability of a microcontroller with power electronics and
signal conditioning. Think of the PLC as an industrial computer/ controller. The code can be
written in ladder logic which is fairly intuitive and easy for simple systems or C which is more
powerful for complicated systems. There is even a PLC which can be programmed using
Arduino (we will discuss the Arduino microcontroller later)
The PLC has screw terminals for power, relay, and input connections. Screw terminals are ideal
for an industrial environment but may not be as suitable for prototyping in a laboratory. The best
way to build these circuits is to use a breadboard. Most of the circuits in this laboratory utilize
12V DC power. Therefore, the most efficient way to prototype these circuits is to connect the
+12V power supply to the top rail of the breadboard and the ground of the power supply to the
bottom rail of the breadboard (Figure 2). Power for the PLC is then made with jumper wires
from the breadboard to the screw terminals of the PLC. Power for loads (fans and lights) is then
2 of 10
routed from the +12V breadboard rail, to the PLC contact (Q1, Q2, etc), to the load, and then to
the ground rail of the breadboard.
Figure 2. Breadboard +12V supply and ground connections.
Figure 3. PLC Wiring.
The PLC software, Zeliosoft, has a really nice software package that lets the user easily simulate
the design to check for operation. As is good practice, we are going to develop the code,
simulate and the test the code, and then, build and test the circuit. The benefit of validating the
code first is that it simplifies the troubleshooting process.
3 of 10
Prelab:
Review and study the ZelioSoft Introduction powerpoint located on D2L. A copy will also be
located on each laboratory PC for student use.
Print 8 copies (or more, if you like) of the ladder logic code template available on D2L. For
parts 1 through 8 (highlighted in yellow below, i.e., prelab), using a pen and straight edge and/or
plastic template of some sort, neatly draw out the ladder logic code on these printed sheets. For
each part, 2 of the 10 points is awarded for completing each sheet and showing at start of class.
1. Simple Motor Start/ Stop [10 points
]
a) Requirements:
a. Develop a simple ladder logic program where pressing one momentary button
starts a fan and pressing a second, momentary button stops the fan. Do not use
the Z buttons for this.
b) Develop the code and simulate using Zeliosoft.
c) Once verified as meeting requirements, build the circuit on the breadboard.
a. Connect +12V to the top rail of the breadboard and ground to the bottom rail of
the breadboard.
b. Connect the fan (load) as shown in Figure 3.
c. Assemble the buttons onto the breadboard. There are four leads on the
pushbuttons; use your ohmmeter to determine the pinout.
d. The digital inputs of the PLC require +12V for a logic high. Connect one end of
the pushbutton to 12V and the other to the digital input of the PLC. When the
pushbutton is pressed, the PLC input will receive a logic high.
e. Use the jumper wires and PLC screw terminals to make connections to the
breadboard.
d) Demonstrate the circuit to your TA. TA signoff
.
e) Do not disassemble the circuit as you will need it for the next part.
2. Simple Motor Start/ Stop with Counter and Indicator [10 points
]
a) Requirements: modify the prior code to:
a. Count the number of times a fan has been turned on and display the counter value
as a text box. The counter should only be incremented each time the light is
turned on; not every time the switch is pressed.
b. Illuminate a warning light after the fan has been turned on three times. The
warning light should not affect the operation of the fan.
c. Add a line to use a Z key to reset the counter value.
b) Develop the code and simulate using Zeliosoft.
c) Test the code by building the circuit.
d) Demonstrate the circuit to your TA. TA signoff
.
4 of 10
3. Fan Safety Start [10 points
]
a) Requirements:
a. A fan requires a startup protocol wherein two pushbuttons need to be pushed at
the same time for 5 seconds to start a process motor (think logic AND combined
with a timer).
b. Pressing a third pushbutton will turn off the fan.
c. A magnetic proximity sensor (which is an analog input, not digital) detects when
ferrous metal is near the end of the sensor (refer to Figure 4 and 5). In this case, it
is used to detect when the fan’s exterior weather shutters are closed. The fan shall
not operate when the shutters are closed.
b) Develop the code and simulate using Zeliosoft.
c) Test the code by building the circuit (don’t forget the 1kΩ pullup resistor). Any piece of
ferrous metal such as the laboratory bench frame or shelving can be used to trigger the
sensor. Note that there is a red LED built into the cord end of the sensor indicating when
metal is detected. This is useful for troubleshooting.
d) Demonstrate to your TA. TA signoff
.
Figure 4. LJ12A3-4-Z/BX NPN Inductive Proximity Sensor.
Figure 5. LJ12A3-4-Z/BX Inductive Proximity Sensor Schematic Showing Required
External Load Resistor.
5 of 10
4. Lab Partner Name Text Box with Counter [10 points
]
a) Requirements:
a. Display the name of one student when Z1 is pressed and the other student’s name
when Z2 is pressed. One of the names should always be displayed; pressing Z1 or
Z2 just toggles between the two names.
b. Increment the counter every time Z1 is pressed and decrement the counter every
time Z2 is pressed.
c. The text box should always display the value of the counter.
b) Develop the code and simulate using Zeliosoft.
c) Test the code by building the circuit.
d) Demonstrate the circuit to your TA. TA signoff
.
5. Railroad Light Flasher [10 points
]
a) Requirements:
a. Alternately flash two lights: red, yellow, red, yellow, etc with a one second
period.
b. Refer to Figure 3 for the connection of the lights.
b) Develop the code and simulate using Zeliosoft.
c) Test the code by building the circuit
d) Demonstrate the circuit to your TA. TA signoff
.
6. Dusk to Dawn Light Controller (Dark Activated) [10 points
]
a) Requirements:
a. The circuit in Figure 6 outputs a voltage which varies inversely with ambient
light.
b. Use the circuit in Figure 6 to turn on a light under dark conditions.
b) Develop the code and simulate using Zeliosoft.
c) Build the circuit of Figure 6
 The light detector uses a photoresistor/ resistor voltage divider.
 Measure the output voltage of the light detector under light:
and
dark conditions:
.
 Set the analog comparator threshold at the midpoint between these two
voltages.
d) Test the code by building the circuit.
e) Demonstrate to your TA. TA signoff
.
6 of 10
Figure 6. Photoresistor Circuit.
7. Light Activated Circuit [10 points
]
a) Requirements:
 We want to reverse the operation of the prior circuit. Instead of the light turning
on under dark conditions, we want the light to turn on under lighted conditions.
In a prior laboratory, we would have reversed the location of the photoresistor/
resistor voltage divider. An advantage of PLCs is that we can easily make this
change in code; no hardware changes required or should be made.
b) Develop the code and simulate using Zeliosoft.
c) Test the code using the same circuit from part 6.
d) Demonstrate to your TA. TA signoff
.
7 of 10
8. Go/ No-go Distance Indicator [10 points
]
a) Requirements:
 Illuminate a yellow lamp if an object is