PLC2
PLC2
PLC2
net/publication/307954016
CITATIONS READS
0 1,201
2 authors:
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.
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)
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.
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?
Run motor 1
Read size of
item
No Yes
Item dropped Run motor 3 & pull cylinder
to box1? back
Yes
No
Item dropped
to box2?
Yes
Fig.10. I/O wiring diagram and pneumatic connections for the system.
Stop motor 3
Stop