PLC2

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

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/307954016

Project-Based Programmable Logic Controller Application

Article · September 2015


DOI: 10.1166/jom.2015.1107

CITATIONS READS

0 1,201

2 authors:

Mustafa Engin Dilsad Engin


Ege University Ege University
33 PUBLICATIONS   133 CITATIONS    23 PUBLICATIONS   59 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Ultrasonik Transmiter ile SCADA Uyumlu PLC Kullanılarak Seviye Kontrolünü Sağlayan Bir Sistemin Tasarımı ve Uygulanması View project

All content following this page was uploaded by Mustafa Engin on 03 February 2017.

The user has requested enhancement of the downloaded file.


Project-based Programmable Logic Controller
Application
Mustafa Engin

Ege University Ege Higher Vocational School, Department of Electronics Technology 35100
Bornova, Izmir, Turkey

Dilşad Engin

Ege University Ege Higher Vocational School, Department of Control and Automation
Technology 35100 Bornova, Izmir, Turkey

(Received/Accepted: xxx)

The necessity of accomplished engineers and technicians who are competent in


handling the problems of the emerging industry brings the conventional teaching
approaches into question. Engineering technology students should be skilled to
confront the technical challenges they will come across in their professional career by
innovative teaching methods based on projects and real industrial applications. We
offered three main topics for projects as discrete control, process control and
supervisory control for a new course “Programmable Controller Applications” in Ege
University for Control and Automation technology students. In this paper, one of the
projects, a prototype of a conveyor belt system will be dis- cussed. This project deals
with a system where items are separated according to their sizes, and it is designed
and in- stalled for programmable logic controller applications in order to meet the
requirements of Mechatronics, Control and Automation, and Electronics technology
students’ hands on training on machine and process control. The main objective of
this work emphasize that the students should participate in a design project to have
an understanding of how industrial machines are controlled by programmable
controllers and to gain the ability to wire the input/output (I/O) devices to controllers.
The practice has been encouraging, and accordingly the students have
comprehended discrete control of machines using programmable controllers. As a
case study, a prototype of a conveyor belt system, where items are separated
according to their sizes, is designed and installed for programmable logic controller
applications in order to meet the requirements of automation and control students’
hands on training on machine and process control. The main objective of this work is
that the students participate in a project rather than just using an experiment set in
which the system components are not flexible.

Keywords: PLC, Automatic control, programmable control, automation, project-based


education.
work cooperatively with the engineers. To be properly
1. INTRODUCTION
prepared for such positions, it is desirable that students
Programmable logic controllers (PLCs) are widely used be exposed to the topics of process control, discrete logic
in manufacturing to coordinate a wide variety of control, and the fundamentals of manufacturing [2]. It is
complex tasks, including security monitoring, energy a fact that in discrete logic control, PLCs are mostly used
consumption management, control of machines and controllers since their functionality got improved, they
automatic production lines [1]. For this reason, qualified have been smaller in size, and costs have been reduced.
personnel are needed to work in industry. Higher Thus, there is a growing need for engineers and
education institutes are the resources for candidates for technicians with the theoretical knowledge and practical
qualified employee. Electrical and Mechatronics skills on this field.
Engineering students are employed in control systems Students in higher education should be prepared to meet
area concerning manufacturing process applications. the requirements of automation and control industry by
Control and Automation, Mechatronics and Electronic hands-on experience in using the “tools of the trade”
Technologies students are also employed in this area to such as PLCs, digital controllers, and software for
equipment operation and communications. Education in and the client can be allowed to take over the server to
many different engineering fields demands laboratory carry out a remote monitoring and control function.
work in order to provide practical knowledge and skills Bellmunt et.al. [6] also offer a remote laboratory where
to students and to demonstrate different real life a flexible cell is used. This flexible cell is a small-scale
processes [3]. Although students are provided with PLC industrial system in which the students can learn and
programming skills in many faculties of engineering and become familiar with real industrial components, such
associate degree programs, they could hardly have the as position sensors, pneumatic and electrical actuators,
chance to work on real PLCs and PLC-controlled plants. drives, PLCs, and industrial communication networks. It
This might be somehow due to the large number of is stated that there are no differences in the connection,
students in a class, or the budget constraint of the programming, and debugging procedures that exist
institutions. between the local and the remote students, since all of
A solution for these problems have been overcome by them connect to the same Ethernet card of the PLC, and
development of virtual PLC components [1], design that such skills can be better acquired allowing the
projects aided with PLCs [4], a web-based students to connect directly to all the devices by means
implementation of industrial control systems with PLCs of Ethernet cards, with no need for computers working
[5], remote laboratories for automatic control [6], [7], by as servers.
developing a PLC based motion control training package Project-based learning (PBL) is a well-known method
offering a wide range of resources as dynamic simulators for imparting thinking competencies and creating
and remote lab [8], a remote laboratory aided by a web flexible learning environments [10]. Therefore, project-
programmable logic controller for teaching industrial based PLC training has been widely used in engineering
electronics [9] or by development of projects based on and technology classes in order for the students to get
PLC controls of discrete systems with small budgets. involved in a PLC-controlled system project where they
It is usually convenient to give design projects to the learn how to apply I/O wiring of sensors and actuators
students according to some control scenarios and let to a PLC and write an associated control program.
them write control programs. These programs are then In Department of Control and Automation Technology,
transferred to the PLC, and using the connected inputs a two-year associate degree program, a prototype of a
such as push buttons, magnetic switches, and proximity conveyor belt system, where items are separated
sensors or by animated inputs, the control program’s according to their sizes, is designed and installed for
results can be viewed by animating the program. In the programmable logic controller applications in order to
paper of Guo [4], it is stated that a design project is given meet the requirements of automation and control
to the students. The proposals for the project are students’ hands-on training on machine control. The
evaluated based on the contents and feasibility of the system includes a Schneider Electric Twido PLC,
projects and necessary modifications are made. The PLC sensors and actuators which are installed and wired by
program simulation is used to view the results of the the students. This project is for experiments on
control program. The written reports and oral “Programmable Controller Applications” course in the
presentations prepared by the students are used to assess fourth semester.
knowledge and skills acquired and utilized for the
2. COURSE DESCRIPTION
project.
As in the paper of Hsieh [1], the web-based intelligent In Control and Automation Technologies Department,
tutoring system (ITS) and simulation components of the students attend two 4-credit hour PLC courses in
Virtual PLC is described. The ITS component is used to consecutive semesters in the second year. The main
teach about PLC programming instructions. It is stated objectives of these courses are to up skill the students in
that this approach was selected because it was relatively hands-on-training by giving them the chance to program
easy to implement with available resources and a control task, to make the I/O wiring, and edit the user
appropriate for teaching this type of information and that programs.
the approach involves recording facts about PLC The first part of the PLC courses, “Programmable
instructions in a database. Controllers”, aims that the students will apprehend the
Remote laboratories are another approach for access of logic on controlling machines and processes. To
many students to real world of PLC control without accomplish this target, the functions and role of PLCs in
having an on-site lab. Lin [7] offers a remote monitoring industry, PLC hardware components, programming PLC
and control-based system where a PLC controls the using an associated software, developing control
riveting machine as well as X/Y platform using its I/O programs using timers, counters, numerical processing,
interface. A graphical programming using Lab-VIEW sequential programming is covered letting the students
package is proposed which presents a human-machine to work on design projects aided with PLCs, and edit the
interface (HMI), that is, friendly for operating the programs using debugging and troubleshooting
riveting machine, and particularly, it constructs the techniques.
capability of remote monitoring and control via the The main scope of the subsequent course,
Internet. In this paper, it is stated that from the World “Programmable Controller Applications” is: controlling
Wide Web, the client at the remote PC can view the motors using pulse and PWM generation, interface
panel that is the same image as the panel of the server, circuit implementation of sensors and motor drives,
frequency measurement of the motors with very fast two are transistor and the rest is relay outputs. It has two
counters, managing analogue modules, real-time clock potentiometers that can be used to change the frequency
(RTC) applications, I/O wiring of various sensors and of a pulse output or change the preset value of a counter
actuators, and editing the user programs. during operation. In this system, there are three conveyor
As the students have practiced PLC programming using belts which are actuated with three AC motors. These
Twido Controllers, observed the operation of the motors are controlled via relay outputs of the controller.
program, and learned how to make necessary For discarding the item that has an inappropriate size, a
modifications, on the succeeding course, they should short stroke pneumatic cylinder from ASCO Joucomatic
improve their practical abilities by working on a real Numatic [12] is used as shown in Fig.3. The 5/2 24V DC
control task, design and implement control projects single solenoid control valve from Freeway Ltd. [13] in
using PLCs. This paper discusses one of the design Fig.4 is used to actuate a pneumatic double-acting
projects controlled with PLCs to solve practical cylinder. For air preparation, a filter regulator, adjustable
machinery problems in industrial environments. between 0 to 10 bars, is used. Air is supplied by a
compressor where the compressed air is distributed
3. Description of the System Hardware
through the air pipe line.
In this project, a prototype of a conveyor belt system,
where items are separated according to their sizes, is
designed and installed for programmable logic controller
applications in order to meet the requirements of
automation and control students’ hands-on training on
machine control.

FLOWMETER

LT
I/O
POWER
S INTERFACE
M SUPPLY Fig. 2. Architecture of a programmable controller.

CENTRAL PROCESSING
UNIT (CPU)

USER
PROGRAM
STORE
PROGRAMMING DEVICE

Fig. 1. Architecture of a programmable controller. Fig. 3. Double-acting cylinder (ASCO Joucomatic Numatic Ltd).

PLC is a specially designed microcontroller-based The sensors used are five photoelectric and one magnetic
computer which can be programmed to control the switch. The magnetic switch is for detecting the full-
operation of process and machines. For this reason, stroke position of the pneumatic cylinder and
switches, transmitters should be connected to the photoelectric switches are for sensing the position and
controller as inputs, and pumps, motors, valves as size of the items carried by the conveyor belts. Each
outputs via an input/output (I/O) interface. The main photoelectric sensor is built up using an infrared light
architecture of a programmable logic controller is shown emitting diode (IR LED) and a phototransistor switch.
in Fig.1 Basically a PLC comprises of a central Phototransistors are solid-state light detectors with
processing unit (CPU), a programming device, user internal gain that are used to provide analogue or digital
program storage unit, a power supply unit, and I/O signals. They detect visible, ultraviolet and near-infrared
interface. The CPU consists of a 16-bit microcontroller light from a variety of sources and are more sensitive
where the instructions are fetched and executed. PLC is than photodiodes. Black-coloured phototransistors,
programmed mostly using a computer with special PLC shown in Fig.5a, have a visible light filter and respond
software. The user program should be saved to the hard principally to infrared light. Phototransistors circuits
drive or a USB memory device for long-lasting storage. may be adjusted for a selected sensitivity range and often
Input interface adopt the input states or data to the digital do not require additional amplification. They can be
inputs of the processor and the digital outputs of the applied in two modes: active or switch mode. “Switch
processor is also adopted to control various actuators by mode” means the phototransistor will either be “off” or
means output interface. “on” for a digital logic response to the object sensed.
The logic controller used in this project is a 40 I/O Twido “Active mode” means the phototransistor generates an
Controller (PLC), TWDLCAE40DRF from Schneider output response based on the light or irradiance level.
Electric [11]. This Twido controller which is shown in IC(on) will be proportional to the coupled light intensity
Fig.2 has 24 digital inputs, and 16 digital outputs where [14].
4. THE SOFTWARE
As the main goal in this project is to control the system
elements, the students should learn how to write control
programs associated with the control tasks in real world
of industry. PLC software is a tool to write the control
programs not as machine codes but as instructions or in
a graphical manner. Programming language software
also allows the user to transfer the control program to a
PLC via a programming console, or a PC with a serial
connection to the controller.
Fig.4. 5/2 DC 24V single solenoid control valve (Fenghua Xikou PLC manufacturers offer various PLC software, but they
Nuoling Pneumatic Components Factory, Freeway) all serve the same purpose: control of the system by
instructions. The PLC programming languages may be
categorized into 6 as:
• IL: Instruction List
• LD: Ladder Diagram
• ST: Structured Text
• FBD: Function Block Diagram
• SFC: Sequential Function Chart
• CFC: Continuous Function Chart
(a) IR phototransistor
Basic PLC languages, Instruction List and Ladder
Diagram, are used mostly by the beginners to PLC
programming. These programming languages have an
instruction set which is adequate and capable of writing
control programs that include basic relay type
instructions, timers, counters, fast and very fast counters,
sequential control functions, arithmetic and logic
instructions, registers, PWM and pulse functions. In
“Programmable Controllers” course, students learn and
practice the basic and some part of the advanced
instructions and functions in class and then in laboratory
using Twido controllers. In the following course,
(b) phototransistor switch circuit “Programmable Controller Applications”, advanced
Fig. 1. The photo detector circuit and the phototransistor used as instructions and functions, such as arithmetic and logic
PLC input. instructions, registers, PWM and pulse functions are
In this study, the IR LED and phototransistor pair, as needed to have a more extended control on the outputs.
shown in Fig.5b, is used in a common-emitter circuit to Also, managing analogue modules, real-time clock
obtain a high output when the light is blocked by an (RTC) and time/date stamping applications, and editing
object. The circuit is designed to have a “high” logic user programs comprise the main scope of the course.
level for PLC input. The typical forward current (IF) and Twido controllers are programmed using TwidoSoft or
voltage (VF) values of the IR LED is used to obtain R1 TwidoSuite software. An example “ladder diagram”
as program which is written using TwidoSuite for
controlling the speed of a DC motor with PWM function
1 (1) block is shown in Fig.6a, and the “statement list” is in
Fig.6b. In this program, the given control task is mainly
Where VF = 1.5V and IF = 20mA. on the speed control of a DC motor by two proximity
The “on” current for the phototransistor should not switches symbolized by S1 and S2. The motor is driven
exceed the maximum current rating of the PLC input. by a driver circuit implemented by L298, and PWM
The phototransistor should be kept in saturation for output of the controller is connected to the “enable”
compatible operation with the PLC. R2 resistor value is input of L298 to change the speed. The control program
calculated to meet the aforementioned conditions as supported by the I/O wiring and external modules or
2 (2) circuits, has speed control on the motor.
To accomplish the requirements of the course, PLC
Where VCEsat = 0.2V (typical) and IC(on)max = 7mA software should be used to write, transfer and edit
or 11mA for TWDLCAE40DRF inputs[11]. The sensing control programs, and wiring of various I/O elements as
circuit is implemented by students in a previous course sensors and actuators is essential as well.
dealing with sensors.
inputs following the written directions. This target
oriented project is for comprehension of speed and
direction control of motors that is indispensable in
machine control.

Fig.7. Input wiring diagram for TWDLCAE40DRF controller.

The driver used in this project is L298, which is a high


voltage, high current dual full-bridge driver designed to
accept standard TTL logic levels and drive inductive
Figure 2a Ladder diagram of a motor control program loads such as relays, solenoids, DC and stepping motors.
Two enable inputs (ENA and ENB) are provided to
enable or disable the device independently of the input
signals. The emitters of the lower transistors of each
bridge (SENSA and SENSB) are connected together and
the corresponding external terminal can be used for the
connection of an external sensing resistor. An additional
supply input (VCC) is provided so that the logic works
at a lower voltage [16].
By completion of this project, students gain the skills to
use PWM output for controlling the speed of a DC
motor, connect transistor outputs as well as relay outputs
of the controller, to learn and practice how to use a driver
in conjunction with a programmable controller.
Figure 6b Statement list equivalent
4.3. Conveyor Belt Control Project
4. HARDWARE IMPLEMENTATION In this project, there is a prototype with previously
mounted three conveyor belts driven by AC motors, a
4.1. Input/output Wiring double-acting pneumatic cylinder controlled by a 5/2
Two and three-wire sensors with internal and external pneumatic directional control valve, five photoelectric
power supply connections are practiced by students in switches and a magnetic switch. The AC motors are
the first laboratory exercise according to the input wiring connected to the relay outputs of the controller. For
diagram for the PLC which is shown in Fig.7 [15]. discarding the item that has an incorrect size, a short
Having completed their duty on input wiring stroke pneumatic cylinder is used. The 5/2 24V DC
successfully, the students are given the output wiring single solenoid control valve is connected to the
diagram as shown in Fig.8 [15]. DC loads such as lamps, controller relay output in order to actuate a pneumatic
solenoids and motors are wired to the relay outputs. double-acting cylinder. The PLC I/O wiring diagram and
Following a check for the wiring by the instructor, they the necessary pneumatic connections for the system is
are told to write simple control programs to check shown in Fig. 10 and the photograph of the system
whether the I/O connections operate properly configuration is shown in Fig.11.
4.2. Motor Control Project
After understanding PWM and PLS (pulse generation)
function blocks’ configuration, programming techniques
and application fields, students are given a DC motor
control project. In this project, they should control a 24V
DC motor’s speed and direction with L298 dual full-
bridge driver making the connections as shown in Fig.9, Fig. 8. Output wiring diagram for TWDLCAE40DRF controller.
wiring appropriate outputs of the controller to the driver
Using the input and output wiring diagrams of
TWDLCAE40DRF PLC, students are encouraged to
connect the sensors, the AC motors and the 24V DC
single solenoid control valve. Sensor wiring is almost
the same as they have practiced before, so the students
do not have hard times in this part of the work. As the
motors are AC type, they are advised to use relay outputs
and wire extra AC relays as the motors draw higher
output current than the PLC outputs can handle.
Vcc Vss
VALUE=5V VALUE=24V

C2 C1 D1
DIODE
100nF 100nF

9 4 U1 D2
DIODE
5
7
IN1 VCC VS
2 Fig.11. The 3 belt conveyor system configuration including all
IN2 OUT1
10
12
IN3
3
D3 electrical, pneumatic parts and the controller.
IN4 OUT2 DIODE
6
ENA
11 13

1
ENB OUT3
14 +88.8 D4
After wiring of I/O has been accomplished, given the
SENSA OUT4
15
SENSB GND DIODE flowchart in Fig.12, students are instructed to write a
8 L298 control program that distinguishes between the correct
and incorrect size of items. When the program is
transferred and executed, they have the chance to
Fig.9. DC motor driver circuit for speed and direction control.
observe whether the connections are properly done for
both inputs and outputs. Animating the program lets
The solenoid control valve is DC type, so they may them to follow the program execution, and check the I/O
choose the transistor or relay output according to the status.
current specifications given for it. For practical Start
purposes, the connections are done using electric
Read presence
terminals. In this system, rather than just electrical data of item
wiring, pneumatic connections for the cylinder are also No

made by the students based upon the basic knowledge Item present?

and experience on Hydraulics and Pneumatics course. Yes

Run motor 1

Read size of
item

Stop motor 1 &


Item correct size? No
Activate solenoid
Yes
Read ylinder
After 10secs, stop motor 1 & position
run motor 2 No

Read item position Cylinder full stroke?

No Yes
Item dropped Run motor 3 & pull cylinder
to box1? back
Yes

Stop motor 2 Read item position

No
Item dropped
to box2?

Yes
Fig.10. I/O wiring diagram and pneumatic connections for the system.
Stop motor 3

Stop

Fig.12. Flowchart of the control task


Having accomplished the control task, the students are
let to use drum function for sequential programming and
count the number of discarded and correct size items as
a final task.
CONCLUSION [11] Product data sheet, TWDLCAE40DRF compact PLC base Twido-
100..240V AC supply–24 I 24V DC - 16 O,
This paper presented one of the main design projects Twido_TWDLCAE40DRF.pdf, http://www.schneider-
controlled with PLCs to solve practical machinery electric.com, downloaded in June 2011.
problems in industrial environments. The industrial [12] ASCO Joucomatic Numatic Ltd, http://www.asconumatics.eu
/products/catalogues/ pneumatic-components-for-industrial-
controller is used for improving practical abilities of the automation/pneumatic-actuators.html#micro, downloaded in June
students by working on prototype of a real control task. 2012.
The design and implementation of the project with PLC [13] Freeway Ltd., original manufacturer: Fenghua Xikou Nuoling
control is previously done by students in “System Pneumatic Components Factory, http://www.alibaba.com/product-
Analysis and Design” course. This system is revised and gs/563630633/4V210_08_
solenoid_valve_pneumatic_solenoid.html, downloaded in June
improved in components by the part-time working 2012.
students under supervisory control of the instructor. [14] Optek Technology TT Electronics, Application Bulletin 213,
The primer work on input and output connections are Application Circuits for the Phototransistor Switch, website:
done by the students followed by the dc motor control http://www.optekinc.com/pdf/App%20Bulletin%20213-
Opto%20Assemblies.pdf, Issue 1.1, pp. 3, Dec 2004.
project. This preparatory work has complemented the
[15] http://www.schneider-electric.com
theoretical part of the course. Most of the students stated
that after they have succeeded in the dc motor control [16] http://www.datasheetcatalog.org/datasheet2/2/52daje928cw
7pc0uqs1ipyryppy.pdf
project, they have almost completely understood how
the connections should be made to a programmable
controller to control outputs. After working on a
prototype of a real conveyor belt control system, they
declared that they have comprehended sequential control
programming that was covered in the former course.
This work has shown how effectively hands on training
could be done with a small budget involving the students
work on the project and let them make modifications on
a previously designed and implemented system, and
engaging the students to learn intuitively. More
importantly, it is presented in this paper that how a
project task is used as a tool for learning.
References
[1] S.J. Hsieh, P.Y. Hsieh, Web-Based Modules for Programmable
Logic Controller Education, Computer Applications in Engineering
Education, Vol. 13, no. 4, 2005, pp. 266–279.
[2] E.W. Kamen, M.J. Gazarik, J. Napolitano, A Course in Industrial
Controls and Manufacturing for EE Students and Other Engineering
Majors, Proceedings of the American Control Conference, June
1997, pp. 3160–3165, New Mexico, Mexico.
[3] M. Matijević, M. Stefanović, V. Cvjetković, V. Joković, N. Babajić,
M. Ravlić, S. Nestic, The Development and Implementation of a
Thermal Process Trainer for Control and Measurement via the
Internet, Computer Applications in Engineering Education, DOI:
10.1002/cae.20543, April 2011.
[4] L. Guo, Design Projects in a Programmable Logic Controller (PLC)
Course in Electrical Engineering Technology, the Technology
Interface Journal, Vol. 10, no. 1, 2009
[5] G. Hassapis An Interactive Electronic Book Approach for Teaching
Computer Implementation of Industrial Control Systems, IEEE
Transactions on Education, Vol. 46, No. 1, 2003, pp. 177–184.
[6] O.G. Bellmunt, D.M. Miracle, S.G. Arellano, A. Sumper, A.S.
Andreu, A Distance PLC Programming Course Employing a
Remote Laboratory Based on a Flexible Manufacturing Cell, IEEE
Transactions on Education, Vol. 49, No. 2, 2006, pp. 278–284.
[7] H.C. Lin, A Remote Monitoring and Control-Based Precise
Multilocation Riveting System, Computer Applications in
Engineering Education, Vol.13, Issue 4, 2005, pp. 316–323.
[8] C. Buiu, Design and Evaluation of an Integrated Online Motion
Control Training Package, IEEE Transactions on Education, Vol.
52, No. 3, August 2009, pp. 385–393.
[9] R. Marques, J. Rocha, S. Rafael, and J. F. Martins, Design and
Implementation of a Reconfigurable Remote Laboratory, Using
Oscilloscope/PLC Network for WWW Access, IEEE Transactions
on Industrial Electronics, Vol. 55, No. 6, June 2008, pp. 2425–2432.
[10] Y. Doppelt, Implementation and Assessment of Project-Based
Learning in a Flexible Environment, International Journal of
Technology and Design Education, Vol.13, 2003, pp. 255–272.

View publication stats

You might also like