Description
for all 10 use zelio soft for codes for each 10 setups a/b and show all steps n codes
Unformatted Attachment Preview
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 at a safe distance (>8.5”) and a red lamp if
too close ( 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
Purchase answer to see full
attachment