SlideShare a Scribd company logo
PLC SIMULATION
TERM PROJECT
MTRE 4100 – INSTRUMENTS & CONTROLS
by MATTHEW HENSLEY and JOSEPH SANGESE
For Dr. Wang and Dr. McFall
1
TABLE OF CONTENTS
Abstract……………………………………………......... 3
Project Description…………………………………… 4
HMI Interconnection………………………………… 7
AD HOC Approach to Logic Programming… 9
Logic Programming Best Practices…………… 10
Photoelectric Sensor Description……………… 11
Conclusion………………………………………………… 12
Appendix A - Tag Table……………………………… 14
Appendix B - PLC Program………………………… 15
Appendix C - HMI Screen Design………………… 17
2
ABSTRACT
In the mid-1950’s, relays and contactors were common denominators of control technology. In
1955, Siemens developed its first circuit regulators with germanium transistors. In 1958, Simatic
became a registered trademark, although limited to logical functions, the first germanium-
based Simatic G was soon used for counting tasks.
It was not until 1970’s that a new controller type was winning the hearts and minds of
engineers and customers alike: the programmable logic controller (PLC), where the
functionality is ruled by a stored program rather than the hard-wired control system.
A programmable logic controller (PLC) is a digital computer used to automate industrial
processes. The purpose of this project is to become familiar with PLC programming and the
human machine interface (HMI) by automating a bottle filling process. Start and pause buttons
are placed on the HMI screen to control a conveyor belt that transports the bottles. The
conveyor will continue until a photoelectric sensor detects a bottle in place. Once a bottle is in
place, the conveyor stops and the bottle is filled by opening a valve. When the bottle is filled, it
is then ejected. If a problem is encountered with a bottle, the operator needs a mechanism to
reject the bottle. A reject button is placed on the HMI to satisfy this condition. The reject
button may be pressed at any time; however, the conveyor must keep moving until the bottle
reaches the photoelectric sensor or else the bottle will not be successfully rejected. In the case
that the reject button is pressed while the bottle is filling, the filler valve immediately closes
and the bottle is rejected. The conveyor begins moving again either the “Eject” or “Reject”
process is complete. Count indicators are placed on the HMI to show how many bottles have
been ejected and rejected. The conveyor speed and filling time are controlled by analog dials
and are indicated on the HMI.
3
PROJECT DESCRIPTION
Due to lack of access to the machinery necessary to automate this process, a simulation must
suffice. A visualization of the project is shown in Figure 1:
Figure 1 - Project Visualization
4
It is assumed that the scope of the process beyond the conveyor that transports the bottles to
be filled is not included in this project. The remainder of the process for the bottle is handled by
different stations, such as what happens to the bottles once rejected.
The bottle filling process is simulated with the Siemens PLC trainer as shown in Figure 2.
Figure 2 - Siemens S7-1200 Trainer
The conveyor is replaced with the stepper motor on the trainer; where the speed is controlled
by an analog dial that ranges from 1 to 5 inches per second and is displayed on the HMI. A
simulated pushbutton on the HMI replaces the VEX Light Sensor to indicate that a bottle is
detected by the photoelectric sensor. This action illuminates the red LED on the trainer
representing that the bottle is being filled. Another analog knob adjusts a timer which is used to
control the filling time (LED illumination time and fill valve opening). This time is also displayed
on the HMI. The filling time ranges between 2 and 8 seconds. Once the fill timer reaches its
preset value, the ejection simulation begins.
5
Ejecting a bottle is simulated by the paddle motor on the trainer. The motor has three sensors;
left, center, and right. The home position of the paddle is at the position of the center sensor,
oriented vertically upward, until the eject process is initiated. Once the eject process is
initiated, the paddle motor rotates clockwise and stops on the left sensor, located 120 degrees
counterclockwise from center, and after one second, the paddle returns to center.
Rejecting a bottle is also simulated with the paddle motor; however, for rejection, the paddle
motor first rotates counterclockwise until it reaches the right limit switch, located 120 degrees
clockwise from center. Then, similar to the eject process, the paddle stops for one second
before returning to the center or “home” position.
Figure 3 - PLC Trainer I/O Device Assignments
6
HMI INTERCONNECTION
The HMI is used for operator interaction with the PLC. Configuration of the HMI screen is shown
in Figure 4.
A Button designated as “HOME PADDLE” returns the paddle motor to the Home position should
the paddle not be in the Home or activating the Center Switch. By holding the button, the
paddle motor will rotate clockwise until the Center Switch is reached.
The Start Button starts the sequence, which moves the conveyor to the velocity selected
through the trainer and displayed as “Conveyor Speed Setting” on the HMI.
Selecting the “Vex Sensor” button will simulate the Vex Light Sensor detecting a bottle in the
correct position for filling and will automatically stop the conveyor and open the simulated fill
valve (indicated by the red LED on the trainer). The fill timer is set by the analog input (dial on
the trainer) and is indicated also on the HMI as “Fill Time Setting”. After the timer has
completed and if the REJECT button was not pressed, the eject cycle will start. If the REJECT
button is pressed anytime except during the EJECT step, the filling process will be interrupted
and the bottle will be rejected immediately once the Vex Light Sensor senses a bottle in
position.
To stop the conveyor or pause between or after the EJECT or REJECT sequence, you can press
the PAUSE button. The pause will not interrupt any of the processes: Filling, Eject, or Reject.
These processes, whichever the program is in, will complete and at the end of the process, the
program will pause until the Start button is pressed.
7
Counters in the program count how many bottles are EJECTED or REJECTED. These numeric
values are indicated on the HMI. Provision to reset both counters is included on the HMI as a
“RESET COUNTERS” button which resets the counter in the ladder logic and the indicated value
on the HMI.
Three indicators (denoted by circles on the HMI) indicate if the any switch is activated by the
paddle. Figure 4 below shows that the center switch graphic indicates red showing that the
paddle is activating the Center Switch and simulating the Home Position. The other two
switches (left and right) are green indicating they are not active.
Figure 4 - HMI - Operator Station
8
AD HOC APPROACH TO LOGIC PROGRAMMING
The ad hoc approach is used to program the ladder logic necessary for this project.
The first step determines a draft of the inputs and outputs needed for the entire process.
The eject process was considered as the “normal” (or main) process and was written first. The
project requirements are then added along with the reject process to come up with the
comprehensive results as shown in Appendix B.
A simple mode diagram was used as shown as a guideline to ad hoc what requirements were
needed to set the modes and what happened during each mode. This process is similar to the
State Machine Method but as shown in Appendix B, the programming method challenges the
creativeness of the programmer and this method resulted in a more compact program as far as
the amount of programming required.
As the programming progressed, input and output signals were added and changes were made
to the ladder logic program to meet the lab requirements and also allow for the Pause and
Reject processes.
9
LOGIC PROGRAMMING BEST PRACTICES
It is found that the best practices of PLC ladder logic programming are as follows:
● understand and determine the desired outcome (function) of the process(s)
● work on the functionality in increments, building upon the program to progress to the
completed project
● test at regular intervals to ensure a desired function works
● determine what inputs and outputs are available
● minimize the program by not overcomplicating
● monitor the program while running to view what energizes a rung or prevents a rung
from energizing continuously save the project incrementally after successful milestones
so if the program becomes too complex, there is no requirement to start from the
beginning and the last successful milestone is saved.
10
PHOTOELECTRIC SENSOR DESCRIPTION
The light sensor to be used to indicate a bottle is in position for filling in this project is shown
below.
As indicated previously, the project entails simulation for the activation of the sensor via a
button on the HMI and the light sensor was not installed.
Although a digital signal was used in the project, the light sensor indicated in the lab
requirements shows an analog device which uses a Cadmium Sulfoselenide photoconductive
photocell which changes its resistive value based on light. Based on the amount of light, a
voltage value (0 volts for the brightest light and 5 volts for the darkest) is sent to the PLC. A
mathematical comparison of any value between 0 and 5 can be used to trigger the signal on or
off, making it a digital signal. The light sensor has a useable range of 6 feet.
As shown, the light sensor has a 3-wire connection: black connected to ground, red connecting
+5 volts, and white being the control signal.
The provided light switch is to be connected to an unused 24 volt DC input signal (Input I8.4)
and ground (2M) on the PLC Expansion Module and the switch is to be externally powered. A
signal of 10 volts is suspected to turn on the digital input signal, indicating a positive indication
of light (or a bottle in location for filling).
Figure 5 - Vex Light Switch P/N: 276-2158 Figure 6 - I/O Expansion Module
11
CONCLUSION
The goal of this project, to program a PLC to simulate control of an automated bottle filling
process, is achieved and demonstrated successfully along with additional provisions.
In addition to the minimum requirements of the exercise, additional provisions were made:
1. a button “Home Paddle” to center or “home” the paddle should it not be set to the
center limit switch- this would move the paddle to the home position, ensuring the
conveyor is clear,
2. to detect the values of the analog dials to indicate to the conveyor speed and fill time to
the operator, and
3. limit switch feedback to indicate which of the three positions (Center, Left, or Right
Switch) the paddle is located.
12
Appendix A - Tag Table
13
Appendix B - PLC Program
14
Appendix B - PLC Program (continued)
15
Appendix B - PLC Program (continued)
16
Appendix C - HMI Screen Design
17

More Related Content

Viewers also liked

NY Court of Appeals Motion to Accept Town of Middlefield Ban Case
NY Court of Appeals Motion to Accept Town of Middlefield Ban CaseNY Court of Appeals Motion to Accept Town of Middlefield Ban Case
NY Court of Appeals Motion to Accept Town of Middlefield Ban Case
Marcellus Drilling News
 
Historia de la infancia
Historia de la infanciaHistoria de la infancia
Historia de la infancia
Pedro Herrera
 
Brief Filed by Tom West in Town of Dryden Fracking Ban Court Case
Brief Filed by Tom West in Town of Dryden Fracking Ban Court CaseBrief Filed by Tom West in Town of Dryden Fracking Ban Court Case
Brief Filed by Tom West in Town of Dryden Fracking Ban Court Case
Marcellus Drilling News
 
Letter from 3 NY Assembly Democrats to Gov. Cuomo Demanding the Public Commen...
Letter from 3 NY Assembly Democrats to Gov. Cuomo Demanding the Public Commen...Letter from 3 NY Assembly Democrats to Gov. Cuomo Demanding the Public Commen...
Letter from 3 NY Assembly Democrats to Gov. Cuomo Demanding the Public Commen...
Marcellus Drilling News
 
Eett libro sesion1
Eett libro sesion1Eett libro sesion1
Eett libro sesion1
Nelly Zeballos Medina
 
キオクの場所 - 同期と位置関係のみによる不明で不整合な空間情報の処理 -
キオクの場所 - 同期と位置関係のみによる不明で不整合な空間情報の処理 -キオクの場所 - 同期と位置関係のみによる不明で不整合な空間情報の処理 -
キオクの場所 - 同期と位置関係のみによる不明で不整合な空間情報の処理 -
yamahige
 
Implementación de la GPC de uso seguro de opioides en situación terminal
Implementación de la GPC de uso seguro de opioides en situación terminalImplementación de la GPC de uso seguro de opioides en situación terminal
Implementación de la GPC de uso seguro de opioides en situación terminal
GuíaSalud
 
CARD MBA experience on its microinsurance program: How can mutual insurance l...
CARD MBA experience on its microinsurance program: How can mutual insurance l...CARD MBA experience on its microinsurance program: How can mutual insurance l...
CARD MBA experience on its microinsurance program: How can mutual insurance l...
ICMIF Microinsurance
 
Hoover Dam by John Howard
Hoover Dam by John HowardHoover Dam by John Howard
Hoover Dam by John Howard
geographystudents
 
Searles Lake and the Trona Pinnacles
Searles Lake and the Trona PinnaclesSearles Lake and the Trona Pinnacles
Searles Lake and the Trona Pinnacles
Chris Austin
 
LBC newsletter issue 11
LBC newsletter issue 11LBC newsletter issue 11
LBC newsletter issue 11
Martin Wilesmith
 
Modelos de discapacidad
Modelos de discapacidadModelos de discapacidad
Modelos de discapacidad
Katy Guadalupe Campos Fabela
 
CARD MBA experience in consumer education
CARD MBA experience in consumer educationCARD MBA experience in consumer education
CARD MBA experience in consumer education
ICMIF Microinsurance
 

Viewers also liked (13)

NY Court of Appeals Motion to Accept Town of Middlefield Ban Case
NY Court of Appeals Motion to Accept Town of Middlefield Ban CaseNY Court of Appeals Motion to Accept Town of Middlefield Ban Case
NY Court of Appeals Motion to Accept Town of Middlefield Ban Case
 
Historia de la infancia
Historia de la infanciaHistoria de la infancia
Historia de la infancia
 
Brief Filed by Tom West in Town of Dryden Fracking Ban Court Case
Brief Filed by Tom West in Town of Dryden Fracking Ban Court CaseBrief Filed by Tom West in Town of Dryden Fracking Ban Court Case
Brief Filed by Tom West in Town of Dryden Fracking Ban Court Case
 
Letter from 3 NY Assembly Democrats to Gov. Cuomo Demanding the Public Commen...
Letter from 3 NY Assembly Democrats to Gov. Cuomo Demanding the Public Commen...Letter from 3 NY Assembly Democrats to Gov. Cuomo Demanding the Public Commen...
Letter from 3 NY Assembly Democrats to Gov. Cuomo Demanding the Public Commen...
 
Eett libro sesion1
Eett libro sesion1Eett libro sesion1
Eett libro sesion1
 
キオクの場所 - 同期と位置関係のみによる不明で不整合な空間情報の処理 -
キオクの場所 - 同期と位置関係のみによる不明で不整合な空間情報の処理 -キオクの場所 - 同期と位置関係のみによる不明で不整合な空間情報の処理 -
キオクの場所 - 同期と位置関係のみによる不明で不整合な空間情報の処理 -
 
Implementación de la GPC de uso seguro de opioides en situación terminal
Implementación de la GPC de uso seguro de opioides en situación terminalImplementación de la GPC de uso seguro de opioides en situación terminal
Implementación de la GPC de uso seguro de opioides en situación terminal
 
CARD MBA experience on its microinsurance program: How can mutual insurance l...
CARD MBA experience on its microinsurance program: How can mutual insurance l...CARD MBA experience on its microinsurance program: How can mutual insurance l...
CARD MBA experience on its microinsurance program: How can mutual insurance l...
 
Hoover Dam by John Howard
Hoover Dam by John HowardHoover Dam by John Howard
Hoover Dam by John Howard
 
Searles Lake and the Trona Pinnacles
Searles Lake and the Trona PinnaclesSearles Lake and the Trona Pinnacles
Searles Lake and the Trona Pinnacles
 
LBC newsletter issue 11
LBC newsletter issue 11LBC newsletter issue 11
LBC newsletter issue 11
 
Modelos de discapacidad
Modelos de discapacidadModelos de discapacidad
Modelos de discapacidad
 
CARD MBA experience in consumer education
CARD MBA experience in consumer educationCARD MBA experience in consumer education
CARD MBA experience in consumer education
 

Similar to TermProject

Lecture_05_Design_of_Mechatronics_Systems_03.pdf
Lecture_05_Design_of_Mechatronics_Systems_03.pdfLecture_05_Design_of_Mechatronics_Systems_03.pdf
Lecture_05_Design_of_Mechatronics_Systems_03.pdf
mohamedsamy9878
 
Advanced insrumentation lab manual
Advanced insrumentation lab manualAdvanced insrumentation lab manual
Advanced insrumentation lab manual
Gautam sai teza
 
Controlling the Filling and Capping Operation of a Bottling Plant using PLC a...
Controlling the Filling and Capping Operation of a Bottling Plant using PLC a...Controlling the Filling and Capping Operation of a Bottling Plant using PLC a...
Controlling the Filling and Capping Operation of a Bottling Plant using PLC a...
ijeei-iaes
 
Functional Design Specification of Hyperglass Cleaning
Functional Design Specification of Hyperglass CleaningFunctional Design Specification of Hyperglass Cleaning
Functional Design Specification of Hyperglass Cleaning
ShwetonKedia
 
Full report of hyperglass cleaner
Full report of hyperglass cleanerFull report of hyperglass cleaner
Full report of hyperglass cleaner
ShwetonKedia
 
Full report of hyperglass cleaner
Full report of hyperglass cleanerFull report of hyperglass cleaner
Full report of hyperglass cleaner
ShwetonKedia
 
Parking Control System using PLC
Parking Control System using PLCParking Control System using PLC
Parking Control System using PLC
ZunAib Ali
 
PLC Programming Example - Conveyor Reject (Shift Register)
PLC Programming Example - Conveyor Reject  (Shift Register)PLC Programming Example - Conveyor Reject  (Shift Register)
PLC Programming Example - Conveyor Reject (Shift Register)
ACC Automation
 
PLC Industrial Application -- Continuous Bottling Filling System
PLC Industrial Application -- Continuous Bottling Filling SystemPLC Industrial Application -- Continuous Bottling Filling System
PLC Industrial Application -- Continuous Bottling Filling System
ZunAib Ali
 
Industrial Automation Using PLC.
Industrial Automation Using PLC.Industrial Automation Using PLC.
Industrial Automation Using PLC.
Chinaza Clement Owuamalam
 
Vt training plc_1
Vt training plc_1Vt training plc_1
Vt training plc_1
Kumar Navaneethan
 
Seminar INDUSTRIAL AUTOMATION & CONTROL THROUGH PLC AND LABVIEW presentation
Seminar INDUSTRIAL AUTOMATION & CONTROL THROUGH PLC AND LABVIEW presentationSeminar INDUSTRIAL AUTOMATION & CONTROL THROUGH PLC AND LABVIEW presentation
Seminar INDUSTRIAL AUTOMATION & CONTROL THROUGH PLC AND LABVIEW presentation
APJ ABDUL KALAM TECHNICAL UNIVERSITY
 
autometic watter bottle filling system
autometic watter bottle filling systemautometic watter bottle filling system
autometic watter bottle filling system
patilshiv407
 
Vt training plc_1
Vt training plc_1Vt training plc_1
Vt training plc_1
Kumar Navaneethan
 
finalpaper.doc
finalpaper.docfinalpaper.doc
finalpaper.doc
Yuval Levental
 
PLC programming example - Paint Spray
PLC programming example - Paint SprayPLC programming example - Paint Spray
PLC programming example - Paint Spray
ACC Automation
 
Plc ppt
Plc pptPlc ppt
Plc ppt
Shehda Seifan
 
Ch. 5 Control Task Basics 1 Chapter 5 Control Task Basi.docx
 Ch. 5  Control Task Basics 1 Chapter 5  Control Task Basi.docx Ch. 5  Control Task Basics 1 Chapter 5  Control Task Basi.docx
Ch. 5 Control Task Basics 1 Chapter 5 Control Task Basi.docx
aryan532920
 
Industrial automation (cold drink factory)
Industrial automation (cold drink factory)Industrial automation (cold drink factory)
Industrial automation (cold drink factory)
Alok Singh
 
BOTTLE LINE SIMULLATION IN LOGIXPRO
BOTTLE LINE SIMULLATION IN LOGIXPROBOTTLE LINE SIMULLATION IN LOGIXPRO
BOTTLE LINE SIMULLATION IN LOGIXPRO
Mohan Tangudu
 

Similar to TermProject (20)

Lecture_05_Design_of_Mechatronics_Systems_03.pdf
Lecture_05_Design_of_Mechatronics_Systems_03.pdfLecture_05_Design_of_Mechatronics_Systems_03.pdf
Lecture_05_Design_of_Mechatronics_Systems_03.pdf
 
Advanced insrumentation lab manual
Advanced insrumentation lab manualAdvanced insrumentation lab manual
Advanced insrumentation lab manual
 
Controlling the Filling and Capping Operation of a Bottling Plant using PLC a...
Controlling the Filling and Capping Operation of a Bottling Plant using PLC a...Controlling the Filling and Capping Operation of a Bottling Plant using PLC a...
Controlling the Filling and Capping Operation of a Bottling Plant using PLC a...
 
Functional Design Specification of Hyperglass Cleaning
Functional Design Specification of Hyperglass CleaningFunctional Design Specification of Hyperglass Cleaning
Functional Design Specification of Hyperglass Cleaning
 
Full report of hyperglass cleaner
Full report of hyperglass cleanerFull report of hyperglass cleaner
Full report of hyperglass cleaner
 
Full report of hyperglass cleaner
Full report of hyperglass cleanerFull report of hyperglass cleaner
Full report of hyperglass cleaner
 
Parking Control System using PLC
Parking Control System using PLCParking Control System using PLC
Parking Control System using PLC
 
PLC Programming Example - Conveyor Reject (Shift Register)
PLC Programming Example - Conveyor Reject  (Shift Register)PLC Programming Example - Conveyor Reject  (Shift Register)
PLC Programming Example - Conveyor Reject (Shift Register)
 
PLC Industrial Application -- Continuous Bottling Filling System
PLC Industrial Application -- Continuous Bottling Filling SystemPLC Industrial Application -- Continuous Bottling Filling System
PLC Industrial Application -- Continuous Bottling Filling System
 
Industrial Automation Using PLC.
Industrial Automation Using PLC.Industrial Automation Using PLC.
Industrial Automation Using PLC.
 
Vt training plc_1
Vt training plc_1Vt training plc_1
Vt training plc_1
 
Seminar INDUSTRIAL AUTOMATION & CONTROL THROUGH PLC AND LABVIEW presentation
Seminar INDUSTRIAL AUTOMATION & CONTROL THROUGH PLC AND LABVIEW presentationSeminar INDUSTRIAL AUTOMATION & CONTROL THROUGH PLC AND LABVIEW presentation
Seminar INDUSTRIAL AUTOMATION & CONTROL THROUGH PLC AND LABVIEW presentation
 
autometic watter bottle filling system
autometic watter bottle filling systemautometic watter bottle filling system
autometic watter bottle filling system
 
Vt training plc_1
Vt training plc_1Vt training plc_1
Vt training plc_1
 
finalpaper.doc
finalpaper.docfinalpaper.doc
finalpaper.doc
 
PLC programming example - Paint Spray
PLC programming example - Paint SprayPLC programming example - Paint Spray
PLC programming example - Paint Spray
 
Plc ppt
Plc pptPlc ppt
Plc ppt
 
Ch. 5 Control Task Basics 1 Chapter 5 Control Task Basi.docx
 Ch. 5  Control Task Basics 1 Chapter 5  Control Task Basi.docx Ch. 5  Control Task Basics 1 Chapter 5  Control Task Basi.docx
Ch. 5 Control Task Basics 1 Chapter 5 Control Task Basi.docx
 
Industrial automation (cold drink factory)
Industrial automation (cold drink factory)Industrial automation (cold drink factory)
Industrial automation (cold drink factory)
 
BOTTLE LINE SIMULLATION IN LOGIXPRO
BOTTLE LINE SIMULLATION IN LOGIXPROBOTTLE LINE SIMULLATION IN LOGIXPRO
BOTTLE LINE SIMULLATION IN LOGIXPRO
 

TermProject

  • 1. PLC SIMULATION TERM PROJECT MTRE 4100 – INSTRUMENTS & CONTROLS by MATTHEW HENSLEY and JOSEPH SANGESE For Dr. Wang and Dr. McFall 1
  • 2. TABLE OF CONTENTS Abstract……………………………………………......... 3 Project Description…………………………………… 4 HMI Interconnection………………………………… 7 AD HOC Approach to Logic Programming… 9 Logic Programming Best Practices…………… 10 Photoelectric Sensor Description……………… 11 Conclusion………………………………………………… 12 Appendix A - Tag Table……………………………… 14 Appendix B - PLC Program………………………… 15 Appendix C - HMI Screen Design………………… 17 2
  • 3. ABSTRACT In the mid-1950’s, relays and contactors were common denominators of control technology. In 1955, Siemens developed its first circuit regulators with germanium transistors. In 1958, Simatic became a registered trademark, although limited to logical functions, the first germanium- based Simatic G was soon used for counting tasks. It was not until 1970’s that a new controller type was winning the hearts and minds of engineers and customers alike: the programmable logic controller (PLC), where the functionality is ruled by a stored program rather than the hard-wired control system. A programmable logic controller (PLC) is a digital computer used to automate industrial processes. The purpose of this project is to become familiar with PLC programming and the human machine interface (HMI) by automating a bottle filling process. Start and pause buttons are placed on the HMI screen to control a conveyor belt that transports the bottles. The conveyor will continue until a photoelectric sensor detects a bottle in place. Once a bottle is in place, the conveyor stops and the bottle is filled by opening a valve. When the bottle is filled, it is then ejected. If a problem is encountered with a bottle, the operator needs a mechanism to reject the bottle. A reject button is placed on the HMI to satisfy this condition. The reject button may be pressed at any time; however, the conveyor must keep moving until the bottle reaches the photoelectric sensor or else the bottle will not be successfully rejected. In the case that the reject button is pressed while the bottle is filling, the filler valve immediately closes and the bottle is rejected. The conveyor begins moving again either the “Eject” or “Reject” process is complete. Count indicators are placed on the HMI to show how many bottles have been ejected and rejected. The conveyor speed and filling time are controlled by analog dials and are indicated on the HMI. 3
  • 4. PROJECT DESCRIPTION Due to lack of access to the machinery necessary to automate this process, a simulation must suffice. A visualization of the project is shown in Figure 1: Figure 1 - Project Visualization 4
  • 5. It is assumed that the scope of the process beyond the conveyor that transports the bottles to be filled is not included in this project. The remainder of the process for the bottle is handled by different stations, such as what happens to the bottles once rejected. The bottle filling process is simulated with the Siemens PLC trainer as shown in Figure 2. Figure 2 - Siemens S7-1200 Trainer The conveyor is replaced with the stepper motor on the trainer; where the speed is controlled by an analog dial that ranges from 1 to 5 inches per second and is displayed on the HMI. A simulated pushbutton on the HMI replaces the VEX Light Sensor to indicate that a bottle is detected by the photoelectric sensor. This action illuminates the red LED on the trainer representing that the bottle is being filled. Another analog knob adjusts a timer which is used to control the filling time (LED illumination time and fill valve opening). This time is also displayed on the HMI. The filling time ranges between 2 and 8 seconds. Once the fill timer reaches its preset value, the ejection simulation begins. 5
  • 6. Ejecting a bottle is simulated by the paddle motor on the trainer. The motor has three sensors; left, center, and right. The home position of the paddle is at the position of the center sensor, oriented vertically upward, until the eject process is initiated. Once the eject process is initiated, the paddle motor rotates clockwise and stops on the left sensor, located 120 degrees counterclockwise from center, and after one second, the paddle returns to center. Rejecting a bottle is also simulated with the paddle motor; however, for rejection, the paddle motor first rotates counterclockwise until it reaches the right limit switch, located 120 degrees clockwise from center. Then, similar to the eject process, the paddle stops for one second before returning to the center or “home” position. Figure 3 - PLC Trainer I/O Device Assignments 6
  • 7. HMI INTERCONNECTION The HMI is used for operator interaction with the PLC. Configuration of the HMI screen is shown in Figure 4. A Button designated as “HOME PADDLE” returns the paddle motor to the Home position should the paddle not be in the Home or activating the Center Switch. By holding the button, the paddle motor will rotate clockwise until the Center Switch is reached. The Start Button starts the sequence, which moves the conveyor to the velocity selected through the trainer and displayed as “Conveyor Speed Setting” on the HMI. Selecting the “Vex Sensor” button will simulate the Vex Light Sensor detecting a bottle in the correct position for filling and will automatically stop the conveyor and open the simulated fill valve (indicated by the red LED on the trainer). The fill timer is set by the analog input (dial on the trainer) and is indicated also on the HMI as “Fill Time Setting”. After the timer has completed and if the REJECT button was not pressed, the eject cycle will start. If the REJECT button is pressed anytime except during the EJECT step, the filling process will be interrupted and the bottle will be rejected immediately once the Vex Light Sensor senses a bottle in position. To stop the conveyor or pause between or after the EJECT or REJECT sequence, you can press the PAUSE button. The pause will not interrupt any of the processes: Filling, Eject, or Reject. These processes, whichever the program is in, will complete and at the end of the process, the program will pause until the Start button is pressed. 7
  • 8. Counters in the program count how many bottles are EJECTED or REJECTED. These numeric values are indicated on the HMI. Provision to reset both counters is included on the HMI as a “RESET COUNTERS” button which resets the counter in the ladder logic and the indicated value on the HMI. Three indicators (denoted by circles on the HMI) indicate if the any switch is activated by the paddle. Figure 4 below shows that the center switch graphic indicates red showing that the paddle is activating the Center Switch and simulating the Home Position. The other two switches (left and right) are green indicating they are not active. Figure 4 - HMI - Operator Station 8
  • 9. AD HOC APPROACH TO LOGIC PROGRAMMING The ad hoc approach is used to program the ladder logic necessary for this project. The first step determines a draft of the inputs and outputs needed for the entire process. The eject process was considered as the “normal” (or main) process and was written first. The project requirements are then added along with the reject process to come up with the comprehensive results as shown in Appendix B. A simple mode diagram was used as shown as a guideline to ad hoc what requirements were needed to set the modes and what happened during each mode. This process is similar to the State Machine Method but as shown in Appendix B, the programming method challenges the creativeness of the programmer and this method resulted in a more compact program as far as the amount of programming required. As the programming progressed, input and output signals were added and changes were made to the ladder logic program to meet the lab requirements and also allow for the Pause and Reject processes. 9
  • 10. LOGIC PROGRAMMING BEST PRACTICES It is found that the best practices of PLC ladder logic programming are as follows: ● understand and determine the desired outcome (function) of the process(s) ● work on the functionality in increments, building upon the program to progress to the completed project ● test at regular intervals to ensure a desired function works ● determine what inputs and outputs are available ● minimize the program by not overcomplicating ● monitor the program while running to view what energizes a rung or prevents a rung from energizing continuously save the project incrementally after successful milestones so if the program becomes too complex, there is no requirement to start from the beginning and the last successful milestone is saved. 10
  • 11. PHOTOELECTRIC SENSOR DESCRIPTION The light sensor to be used to indicate a bottle is in position for filling in this project is shown below. As indicated previously, the project entails simulation for the activation of the sensor via a button on the HMI and the light sensor was not installed. Although a digital signal was used in the project, the light sensor indicated in the lab requirements shows an analog device which uses a Cadmium Sulfoselenide photoconductive photocell which changes its resistive value based on light. Based on the amount of light, a voltage value (0 volts for the brightest light and 5 volts for the darkest) is sent to the PLC. A mathematical comparison of any value between 0 and 5 can be used to trigger the signal on or off, making it a digital signal. The light sensor has a useable range of 6 feet. As shown, the light sensor has a 3-wire connection: black connected to ground, red connecting +5 volts, and white being the control signal. The provided light switch is to be connected to an unused 24 volt DC input signal (Input I8.4) and ground (2M) on the PLC Expansion Module and the switch is to be externally powered. A signal of 10 volts is suspected to turn on the digital input signal, indicating a positive indication of light (or a bottle in location for filling). Figure 5 - Vex Light Switch P/N: 276-2158 Figure 6 - I/O Expansion Module 11
  • 12. CONCLUSION The goal of this project, to program a PLC to simulate control of an automated bottle filling process, is achieved and demonstrated successfully along with additional provisions. In addition to the minimum requirements of the exercise, additional provisions were made: 1. a button “Home Paddle” to center or “home” the paddle should it not be set to the center limit switch- this would move the paddle to the home position, ensuring the conveyor is clear, 2. to detect the values of the analog dials to indicate to the conveyor speed and fill time to the operator, and 3. limit switch feedback to indicate which of the three positions (Center, Left, or Right Switch) the paddle is located. 12
  • 13. Appendix A - Tag Table 13
  • 14. Appendix B - PLC Program 14
  • 15. Appendix B - PLC Program (continued) 15
  • 16. Appendix B - PLC Program (continued) 16
  • 17. Appendix C - HMI Screen Design 17