0% found this document useful (0 votes)
112 views58 pages

Introduction To PLC

Uploaded by

Ammar Alkindy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views58 pages

Introduction To PLC

Uploaded by

Ammar Alkindy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Al-Nahrain University

Information
Engineering Systems
Department

PLC (Programmable Logic Controller) LAB


GEMO PLC Module

Lab Trainer by:


Trainer: Abdulhakeem Amer A.
Introduction to PLC
Introduction
PLC stands for "Programmable Logic Controller". It is a type of industrial computer system
is used to automate and control manufacturing processes, machines, and equipment. PLCs
are designed to withstand harsh industrial environments. PLCs are programmable, meaning
that they can be configured to perform specific functions based on the input and output
signals that they receive.
The PLC may be used to control a simple and repetitive task, or a few of them may be
interconnected together with other host controllers or host computer through a sort of
communication network, in order to integrate the control of complex process.

Applications of PLCs
When the first electronic machine controls were designed, they used relays to control the
machine logic (i e. press "Start" to start the machine and press "Stop" to stop the machine).
A complex machine might need a wall covered in relays to control all of its functions.
□ Agriculture : On many agricultural sites, PLCs are primarily used to control the
mechanical level, PLCs in the agriculture industry have been used in simple tasks,
such as modular PLC controllers , to highly specialized tasks, such as fully automated
irrigation systems that monitor soil moisture levels and replenishes them
appropriately.
□ Robotics : PLCs are used in robotics applications to control robot movements,
motor control, and feedback systems.
□ Transportation: PLCs are used in transportation applications such as railway
signaling and control, airport baggage handling, and traffic control systems.
□ Energy and Utilities: PLCs are used in energy and utility applications such as
power generation and distribution, water treatment, and oil and gas refining.
□ Manufacturing: PLCs are widely used in manufacturing industries such as
automotive, electronics, and food and beverage to automate production processes such
Introduction to PLC
as assembly lines, material handling, and quality control.

Advantages of PLCs
□ Reliability.
□ Flexibility in programming and reprogramming.
□ Cost effective for controlling complex systems.
□ High speed of operation.
□ Ability to communicate with computer systems in the plant.
□ Ease of maintenance /troubleshooting.
□ Reduced space.
□ Energy saving.

Disadvantages of PLCs
□ PLC devices are proprietary it means that part or software of one manufacturer
can’t be used in combination with parts of another manufacturer.
□ Debugging the PLC sometimes consumes a lot of time.
2 Introduction to PLC
3 Introduction to PLC
Major components of a common PLC

Inputs and Outputs Modules


4 Introduction to PLC
The two major types of PLC
When it comes to the types of PLC, these two are the most common answer that you will
find in any source from the internet simply because they are the least subtle of all the
classifications available.
a- Fixed/Integrated/Compact PLC

This type of PLC is most commonly called the Fixed I/O PLC. “Fixed I/O” actually stands
for Fixed “Input/Output”. When you buy Compact PLCs, you will notice that the input
section and the output sections of the PLC are integrated into the microcontroller itself.
This means that every type of output or input is fixed and is determined by the
manufacturer. Furthermore, the number of inputs and outputs may not be expanded in this
type of PLC.
I Introduction to PLC
b- Modular PLC

The modular PLC is a type that allows multiple expansions of the PLC system through the
use of modules, hence the term “modular”.
Modules give the programmable logic controller additional features like increased
number of I/O units, and they are usually easier to use because each component is
independent of each other.
The power supply, communications module, Input/Output module are all separate to the
actual microcontroller so you have to manually connect them to each other to create your
PLC control system.
5 Introduction to PLC
A type of modular PLC is the rack-mounted or rack mount PLC. In a rack mount PLC, the
communications module of the PLC resides in the rack itself, so all connections are
centralized.

PLC models

Siemens PLC

The PLC which is used in this laboratory is a modular GEMO


6 Introduction to PLC

PLC GEMON Characteristics


• Free of charge Ladder Logic Editor with GUI running on PC, “GEMO LADDER
EDITOR”; programming, simulation, download.
• 256 lines, 5 contact column, 1 coil column
• Rising / Falling Edge option for contacts
• Up to 28 Discrete Inputs, built-in filter for each input
• Up to 20 Discrete Outputs
• 32 Timers (11 modes, 9-time bases)
• 2 Timer Ticks (Event Counting)
• 32 Counters (16 bits, Up/Down)
• 32 Counter Comparators (with Offset feature)
• 2 Fast Input Counters
• 2 Independent State Machines (Internal Timer)
• 3 Front Panel F Keys, with built in filter for each
• 48 Auxiliary Relays
• 16 Analog Comparators (with hysteresis)
• Up to 4 x 0-10V Analog Inputs
• Up to 2 x PTC Temperature Sensor Input
• 32 Run Time Screens with internal timer; each having 4 sub screens
• Welcome screen with 4 sub screens
• 3 Level user programmable menu system
• 4 Password contacts
• 4 Configuration contacts
Introduction to PLC
• Real Time Clock - optional
• Weekly / Yearly Alarms (for RTC option)
• RS-485 port to connect to extension modules
• Communicates with a MOSBUS RTU Master via AR2 MODBUS Gateway (AR2-
S-24VDC-MB1)
• Scan time < 10msec.
• 2x16 character back-light LCD display
• 18...32VDC or 100...240VAC supply options, 18Vdc Auxiliary Supply Out for
discrete inputs

Simulation software
The Simulation software used in this laboratory is GEMO programming software which is
used to develop the ladder programs “off-line”.

PLC Programming Language


1. Ladder Diagram (LD)
Ladder Diagram was originally modeled from relay-logic which used physical devices,
such as switches and mechanical relays to control processes. Ladder Diagram utilizes
internal logic to replace all, except the physical devices that need an electrical signal to
activate them.

Ladder Diagram is built in the form of horizontal rungs with two vertical rails that represent
the electrical connection on relay-logic schematics.
You can program all the necessary input conditions to affect the output conditions, whether
logical or physical.
8 Introduction to PLC

1- 1. Ladder Diagram Advantages


The main advantages of the Ladder Diagram language are:
1. The rungs allow it to be organized and easy to follow.
2. It also lets you document comments that are readily visible.
3. It supports online editing very successfully.
1- 2. Ladder Diagram Disadvantages
The main disadvantage is that there are some instructions that are not available, which
might make it more difficult for programming such as motion or batching.
2. Sequential Function Charts (SFC)
If you have any experience with flowcharts, then this PLC Programming language will feel
familiar to you. In Sequential Function Charts, you use steps and transitions to achieve your
end results.
9 Introduction to PLC

Unlike traditional flowcharts, the Sequential Function Charts can have multiple paths. You
can use branches to initiate multiple steps at one time.
2- 1. Sequential Function Charts Advantages A couple of
the advantages of Sequential Function Charts are:
1. Processes can be broken into major steps that can make troubleshooting faster and
easier.
2. You have direct access in the logic to see where a piece of equipment faulted.
3. It can be faster to design and write the logic due to the ability to use repeated
executions of individual pieces of logic.
2- 2. Sequential Function Charts Disadvantages
Even when you consider the advantages of the Sequential Function Charts, this PLC
Programming Language does not always fit every application.

3. Function Block Diagram (FBD)


The Function Block Diagram which is also a graphical type of language. The Function
Block Diagram describes a function between inputs and outputs that are connected in blocks
by connection lines.
Function Blocks were originally developed to create a system that you could set up many
10 Introduction to PLC
of the common, repeatable tasks, such as counters, timers, PID Loops, etc.

3- 1. Function Block Diagram Disadvantages


The code can get disorganized using this PLC Programming Language because you can
place the function blocks anywhere on the sheet. This can also make it more difficult to
troubleshoot.
3- 2. Function Block Diagram Advantages
1. The Function Block Diagram does work well with motion controls.
2. The visual method is easier for some users.
3. The biggest advantage of Function Block Diagram is that you can take many lines
of programming and put it into one or several function blocks.
4. Structured Text (ST)
The 4th PLC Programming Language is the Structured Text. This language is a textual
based language.
Structured Text is a high-level language that is like Basic, Pascal and “C”.
It is a very powerful tool that can execute complex tasks utilizing algorithms and
mathematical functions along with repetitive tasks.
The code uses statements that are separated by semicolons and then either inputs, outputs,
11 Introduction to PLC
or variables are changed by these statements.
You must write out each line of code and it uses functions such as FOR, WHILE, IF, ELSE,
ELSEIF AND CASE.
If you have experience with Basic or C languages, this PLC Programming Language will
come easier than some of the other types of PLC languages.

4- 1. Structured Text Advantages


Some of the advantages of Structured Text are:
1. It is very organized and good at computing large mathematical calculations.
2. It will enable you to cover some instructions that are not available in some other
languages like the Ladder Diagram.

4- 2. Structured Text Disadvantages


The disadvantages of the Structured Text PLC programming language are:
1. The syntax can be difficult.
2. It is hard to debug.
3. It is difficult to edit online.
5. Instruction List (IL)
I will now show you the 5th and final PLC Programming Language which is Instruction
12 Introduction to PLC
List. The Instruction List is also a textual based language.
The Instruction List language resembles Assembly Language. When you use this PLC
Programming Language, you will use mnemonic codes such as LD (Load), AND, OR, etc.
The Instruction List contains instructions with each instruction on a new line with any
comments you might want to annotate at the end of each line.
5- 1. Instruction List Advantages
The Instruction List language is valuable for applications that need code that is compact and
time critical.

5- 2. Instruction List Disadvantages


The main disadvantages of this PLC Programming Language are:
1. There are few structuring possibilities with the “Goto” command being one of them.

2. There can also be many errors that are more difficult to deal with in comparison to many
of the other languages that I have previously reviewed.
13 Introduction to PLC
1 PROGRA
M
5. Instruction List LIST OF
X ERRORS -Fatal Error -Run-time
2
3 VAR ; TON;
: TON; ERROR
5
Timer l
Timeri RQQL; ! Error -Odd Address
Tag-i INT;
6
7 Tag-i TIME;
TIME ;
Error -Programming
8 tlm
9 lOuti Error
LD Tag-i
ST Timeri.lN starts timer with rising edge, resets
GOTO marki
CAL Timeri (
PT:=tIni, REALPARS
wm
ST
Timeri.Q
Timen. IN
gets TRUE, delay time (PT) after a
i i timer with rising edge, resets
starts
marki:
LD Tag-i
AND
OR 3 -I- In the laboratory we use the ladder
programming language.

Ladder Editor
Main Screen
Main screen is seen after the application starts. Main screen is composed of; main menu,
Editor & Simulation Buttons, 5 Contact columns, 5 Link columns, Coil column and
Comment Column.
14 Introduction to PLC

Main Menu
Main menu is composed of the following sub menu items.
File
File sub menu item is composed of the following sub menu items;
• New : Starts a new/empty diagram
• Open : Opens a previously saved diagram
• Save : Saves current/open diagram
• Save as : Saves current/open diagram with a new/different name
• Print : Opens print dialog.
• Search Contact : Use to search a specific contact in the diagram. Use F3 for
• the next one.
• Search Coil : Use to search a specific coil in the diagram. Use F4 for the
• next one.
• Save As Ver2.2 : Use to save file in Ver2.2. format
• Exit : Ends application
15 Introduction to PLC

Settings
Settings sub menu item is composed of the following sub menu items.
• Discrete Inputs : Opens Discrete Inputs sub screen.
• Discrete Outputs : Opens Discrete Outputs sub screen.
• Auxiliary Relays : Opens Auxiliary Relays sub screen.
• Timers : Opens Timers sub screen.
• Timer Ticks : Opens Timer Ticks sub screen.
• Counters : Opens Counters sub screen.
• Counter Comparators : Opens Counter Comparators sub screen.
• Fast Input Counters : Opens Fast Input Counters sub screen.
• State Machines A/B : Opens State Machines sub screen.
• Front Panel F Keys : Opens Front Panel F Keys sub screen.
• 0-10V Analog Inputs : Opens 0-10V Analog Inputs sub screen.
• Analog Comparators : Opens Analog Comparators sub screen.
• Special Password Flags: Opens Special Password Flags sub screen.
• Configuration Flags : Opens Configuration Flags sub screen.
• MODBUS Setting : Opens MODBUS Setting sub screen.
• System Settings : Opens System Settings sub screen.
• Yearly Alarms : Opens Yearly Alarms sub screen.
• Weekly Alarms : Opens Weekly Alarms sub screen.
• Run Time Screens : Opens Run Time Screens sub screen.
• Menu Designer : Opens LCD Menu Designer sub screen.
16 Introduction to PLC

Diagram
Diagram sub menu item is composed of the following sub menu items.
• Ladder Symbols : Diagram is drawn with ladder symbols.
• Electrical Symbols : Diagram is drawn with electrical symbols.
File Settings Diagram Dil/Language Data Transfer Miscellaneous

v Ladder Symbol Ctrl+AH +L 1


Electrical Symbols QH+Afc+C

View
This sub menu is active in simulation mode. User selects show/hide of relevant simulation
sub screens via this sub menu.
• Discrete Inputs : Show / Hide
• Discrete Outputs : Show / Hide
• Auxiliary Relays : Show / Hide
• Timers : Show / Hide
• Counters : Show / Hide
• Counter Comparators : Show / Hide
• State Machine A : Show / Hide
17 Introduction to PLC
• State Machine B : Show / Hide
• Front Panel F Keys : Show / Hide
• Analog Comparators : Show / Hide
• Special Password Flags: Show / Hide
• Weekly Alarms : Show / Hide
• MODBUS Contacts : Show / Hide
• Analog Inputs : Show / Hide
• LCD Module : Show / Hide

Dil / Language

Dil / Language sub menu item is composed of the following sub menu items.

• Turkfe : Editor Language is Turkish.


• English : Editor Language is English.
File Settings Diagram Dil/Language Data Transl Fer Miscellaneous

Qrl+AK+T
✓ English Cbri+Alt+E k

Data Transfer

Data Transfer sub menu item is composed of the following sub menu items.
• Select Communication Port : Selects RS-232 port to download; COM1,
• COM2, COM3, COM4, COM20 or COM21.
• Set Communication Speed : Selects communication speed; Fast or normal.
• Fast is introduced with Ver2.3.
18 Introduction to PLC
• Download New Program : Starts downloading current ladder
• diagram/program to Smart Relay. Previously stored diagram/program in smart
• relay is permanently replaced with the new one.
• Erase Device Program : Previously stored diagram/program in smart
• relay is permanently erased. User can download a new one any time later on.
• Check Device Type/Version : Used to check type and version of connected
• device.
• Reset (Reboot) Device : Used to soft-reset device.
• Calibration : Used after production or maintenance.

Miscellaneous
Miscellaneous sub menu item is composed of the following sub menu items.
• About : Displays information about editor.
• Conversion Calculator: Starts 4..20mA ^ 0..10 V Conversion Calculator for
• AR2.
19 Introduction to PLC
• Read License : Displays license information

PLC Kit for Training


In the Fig. 1 below that shown the PLC Kit Tanning.

Fig.1
This kit is the design of a set of experiments that linked
with PLC. Parts of this design will be displayed as
follows:
20 Introduction to PLC

I/O ports:

Fig.2
1- Inputs Parts: this used to supply voltage to components.
2- Outputs Parts: this used to input voltage.
3- Variable Voltage: Potentiometer that is used to supply analog voltage.
4- Display Voltage (3 Digits).
5- 12 Volts Supply Voltage.
6- 5 Volts Supply Voltage.
7- Analog Inputs Parts.
8- DC Motor Forward and Reverse Movements.

Microcontroller that is used in Kit:


In fig.3 that shown the PLC Gemo Microcontroller Which is the controller that was used in
the kit.
21 Introduction to PLC

Fig.3

The List of Experiments


EXP#1: Continuous filling operation

This process in Fig.4 requires that boxes moving on a conveyor be automatically positioned
and filled. The sequence of operation for the continuous filling operation is as follows:
• Start the conveyor when the start button is momentarily pressed.
• Stop the conveyor when the stop button is momentarily pressed.
• Energize the run status light when the process is operating.
• Energize the standby status light when the process is stopped.
• Stop the conveyor when the right edge of the box is first sensed by the photosensor.
• With the box in position and the conveyor stopped, open the solenoid valve and allow
22 Introduction to PLC
the box to fill. Filling should stop when the level sensor goes true.
• Energize the full light when the box is full. The full light should remain energized until
the box is moved clear of the photosensor.
EXP#2: Soft Drink Machine

Fig.5
As in Fig.5, a coin is inserted into the coin slot. Once detected, if a drink button is pressed,
the correct drink will be dispensed and the coin kept or if the reject button is pressed, the
coin will be rejected and no drink will be dispensed.
EXP#3: Sorting Device for Packages

Fig.6
23 Introduction to PLC

As in Fig.6, a Job is travels down a conveyor. Size of the job is identified by the help of job
length sensor I/P s (I/P 0 and I/P 1). If both the sensor sensed at a time when job is passed
then the job will be treated as big job. Or if only one sensor is sensed at a time then job will
be treated as small job. When job is reached to the rotary table, the table should turn either
left or right depending upon the size of job. The relevant piston should move the box to the
correct conveyor and the box should then continue to the end of that conveyor.

EXP#4: Paint Spraying


Valve 1

Feed
PAINT
Magazine
STATION
vl
Valv
7]
e P
PAINT SPRAY
C ---- 1
----- 3
HOPPFR

START
Valve 3

Fig.7
In Fig.7 that shown the paint spraying system where boxes are fed by gravity through a
feeder magazine one at a time onto a moving conveyor belt.
EXP#5: Product Packaging

Fig.8
24 Introduction to PLC
In Fig.8 that shown the Product Package System. Once the photoelectric sensor (X0) detects
10 products, the robotic arm (Y0) will begin to pack up. When the action is completed, the
robotic arm and the counter will be reset.
EXP#6: Motor Movement

In Fig.9 that shown the Motor Forward and Reverse Movement.


25 PLC Ladder Programming with Logic Gates

LADDER Diagram
Ladder logic (also known as ladder diagram or LD) is a programming language used to
program a PLC (Programmable Logic Controller). It is a graphical PLC programming
language which expresses logic operations with symbolic notation. Ladder logic is made
out of rungs of logic, forming what looks like a ladder - hence the name ‘Ladder Logic’.
And if we were to draw a ladder scheme for lighting a flashlight with a flashlight, it would
look like this:

Switch Lamp

Digital logic functions:


1- OR Gate

2- AND Gate
26 PLC Ladder Programming with Logic Gates

3- NOT Gate

4- NAND Gate
27 PLC Ladder Programming with Logic Gates

5- Exclusive-OR Gate
Block Diagram of a PLC
m
00X1 ft L2 Y1 0(0
00X2 Y2O0
00X3 Y3 °0
00X4 PLC Y4 °0

00X5 Y5 0(0
00X6 Y6O0
Piogia
0 Common Source 0
mming
poll
Ladder programming example
Ladder Logic Program for Start/Stop of Motor:
28 PLC Ladder Programming with Logic Gates

Programming a PLC
Programming a PLC

r.u )i
SlrlM

®°x:
0ox Motor
(xxitodoi
00X3 Y3 °0
f.l >1 0 0 X4 PLC Y4«0
stop
>r
00X5 Y5
°0
0ox6 Y6 O0
I- 00 otnrr.cn So u rce

Y1

HH
29 PLC Ladder Programming with Logic Gates

Starting of motor
30 PLC Ladder Programming with Logic Gates

Continuous

Moto
r

Motor
ooiiUtolor
anergiz
P.V' PLC 4 O0 eo
StO
Nir
C 00X
5@o ¥bO
■©KG i-^
0

-Mf
31 PLC Ladder Programming with Logic Gates
To Stop the Motor
32 PLC Experiment No.1
Objectives
At the end of the session, students will be able to design PLC program to controlling motors
and design logic circuits.
Problems Description 1. Converting Hardwired relay logic circuits into a PLC based
logic diagrams:
a) Design the PLC ladder diagrams for the given hardwired relay logic circuits:

b)

b) In a certain bank each, of three bank officers has a unique switch key to the vault. The
33 PLC Experiment No.1

bank rules require that two out of three officer's switches be activated to open the vault.
Draw the PLC basic ladder logic diagram for hardwired relay logic circuit that will unlatch
the door and turn on a light when two of three switches are activated.

2. Converting the Boolean expressions into ladder logic diagrams:


a) Draw the digital circuit and the ladder logic diagram for the following Boolean
expression (do not simplify):

b) Suppose we were given the task of designing a flame detection circuit for a toxic waste
incinerator. The intense heat of the fire is intended to neutralize the toxicity of the waste
introduced into the incinerator. Such combustion-based techniques are commonly used to
neutralize medical waste, which may be infected with deadly viruses or bacteria:
Toxic waste
inlet
34 PLC Experiment No.1
Toxic waste incinerator {

So long as a flame is maintained in the incinerator, it is safe to inject waste into it to be


neutralized. If the flame were to be extinguished, however, it would be unsafe to continue
to inject waste into the combustion chamber. What we need in this system is a sure way of
detecting the presence of a flame, and permitting waste to be injected only if a flame is
“proven” by the flame detection system. Suppose that due to the high degree of hazard
involved with potentially passing un-neutralized waste out the exhaust of this incinerator, it
is decided that the flame detection system be made redundant (multiple sensors), so that
failure of a single sensor does not lead to an emission of toxins out the exhaust. Each sensor
comes equipped with a normally- open contact (open if no flame, closed if flame detected)
which we will use to activate the inputs of a logic system:
35 PLC Experiment No.1

Design the circuitry of the logic system to open the waste valve if and only if there
is good flame proven by the sensors, first when the three sensors are detects flame.
As the following truth table:
sensor
inputs
, ___i ___ ,
AB C Output
0 0 0 0 Output = 0
0 0 1 0 (close valve)
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0 Output = 1
(open valve)
1 1 1 1
36 PLC Experiment No.1

The output of the circuit will be “high” if and only if input A AND input B AND input C
are all “high".
Toxic waste inlet

If using relay circuitry, we could create this AND function by wiring three relay contacts in
series, or simply by wiring the three sensor contacts in series, so that the only way electrical
power could be sent to open the waste valve is if all three sensors indicate flame:
37 PLC Experiment No.1

Secondly suppose that any single sensor failed “high”. That mean if “two out of
three” sensor logic were detects flame, the waste valve is opened. The truth table
for such a system would look like this:
sensor
inputs

AB C Output
0 0 0 0 Output = 0
0 0 1 0 (close valve)
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1 Output = 1
(open valve)
1 1 1 1

Now that we have a Boolean Sum-Of-Products expression for the truth table’s function, and
the logic gate or relay logic circuit based on that expression:
38 PLC Experiment No.1
ABC

Output = ABC + ABC + ABC + ABC Lt

L2
A CR1

B CR2
A
J7
\C CR3
A
c R1 C R2 C R3 _ Output
_ ABC
1
}
R1 C R2 C R3
c 1
ABC

c R1 C R2 C R3
' ABC

c R1 C R2 C R3
ABC
39 PLC Experiment No.1

Discussion
Draw the logic symbol, construct a truth table, ladder logic program, and state the Boolean
equation for each of the following: 1-

Relay schematic

2-

Relay schematic
40 PLC Experiment No.1
3-
41 PLC Experiment No.1
4-
Relay schematic
LS PB SOL
1

Relay schematic
A
B
o --- o \ o-

6- A motor control circuit with two start/stop buttons. When either start button is depressed,

the motor runs. By use of a seal-in contact, it continues to run when the
42 PLC Experiment No.2
Die Stamping Application
Objectives
At the end of the session, students will be able to design PLC program to controlling
automatic Die Stamp.
Problems Description

1. Define the task:


A master switch is used to start the process and to shut it down. Two sensors: an upper limit
switch that indicates when the piston is fully retracted, and a lower limit switch that indicates
when the piston is fully extended.

When the master switch is turn on the piston reciprocates between the extended and retracted
positions. When the master switch is turned off, the piston returns to the retracted position
and all solenoids are off.
43 PLC Experiment No.2
2. Define inputs and outputs:
Inputs
Address ypeT
Function
X0 Pushbutton Master switch
X1 Limit Switch Upper limit switch
X2 Limit Switch Lower limit switch

Outputs
Address T
ype Function
Y0 solenoid Up solenoid
Y1 solenoid Down Solenoid
3. Develop the PLC ladder diagram program and test its function.

Discussion
1- Repeat the Procedure above.
2- Explain the following:
i) What is limit switch?
ii) The Application of limit switch.
44 PLC Experiment No.3
Continuous filling operation
Objectives
At the end of the session, students will be able to design PLC program to controlling
automatic Continuous filling operation.
Problems Description

1. Define the task:

This process requires that boxes moving on a conveyor be automatically positioned and
filled. The sequence of operation for the continuous filling operation is as follows:
• Start the conveyor when the start button is momentarily pressed.
• Stop the conveyor when the stop button is momentarily pressed.
• Energize the run status light when the process is operating.
• Energize the standby status light when the process is stopped.
• Stop the conveyor when the right edge of the box is first sensed by the
photosensor.
45 PLC Experiment No.3

• With the box in position and the conveyor stopped, open the solenoid valve and allow
the box to fill. Filling should stop when the level sensor goes true.
• Energize the full light when the box is full. The full light should remain energized until
the box is moved clear of the photosensor.
2. Define inputs and outputs:

Inputs
Address ype
T
Function
Start Pushbutton Start process
Stop Pushbutton Stop process
Photo Switch Sensor Sense boxes
Level Switch Sensor Sense liquid levels
Outputs
Address T
ype Function
Motor Coil Conveyor motor
Solenoid solenoid Control liquid gate
Run Pilot Led
Process operating indicator
Standby Pilot Led
Process stopping indicator
Full Pilot Led Box full indicator
3. Develop the PLC ladder diagram program and test its function.

Discussion
1. What is a logic gate?
2. Explain the basic operating principle of an electromagnetic control relay.
3. What is the operating difference between a normally open and a normally closed relay
contact?
4. Compare the method of operation of each of the following types of switches:
a. Manually operated switch
b. Mechanically operated switch
c. Proximity switch
46 PLC Experiment No.3

5. Draw the ladder diagram for the following problem:


Switching on/off the Lamp whether from the bottom or the top of the staircase switches.
47 PLC Experiment No.4
Soft Drink Machine
Objectives
At the end of the session, students will be able to design PLC program to controlling
automatic Soft Drink Machine.
Problems Description

1. Define the task:


A coin is inserted into the coin slot. Once detected, if a drink button is pressed, the correct
drink will be dispensed and the coin kept or if the reject button is pressed, the coin will be
rejected and no drink will be dispensed.
2. Define inputs and outputs:
Inputs
Address T
ype Function
I0 Infra-red sensor Coin sensing
I1 Pushbutton Cola dispenses
I2 Pushbutton Lemon dispenses
I3 Pushbutton Cherry dispenses
I4 Pushbutton Lime dispenses
I5 Pushbutton Reject
48 PLC Experiment No.4
Outputs
Address T
ype Function
Oo Solenoid Coin hold
O1 Solenoid Coin accepts
O2 Solenoid Cola release
O3 Solenoid Lemon release
O4 Solenoid Cherry release
O5 Solenoid Lime release
3. Develop the PLC ladder diagram program and test its function.

Discussion
1. Explain the function of each of the following actuators:

a. Solenoid

b. Stepper motor
2. How does an ultrasonic sensor operate?
3. How does a photoelectric sensor operate?
4. A temperature control system consists of four thermostats controlling three heating
units. The thermostat contacts are set to close at 50°, 60°, 70°, and 80°F, respectively. The
PLC ladder logic program is to be designed so that at a temperature below 50°F, three
heaters are to be ON. Between 50° to 60°F, two heaters are to be ON. For 60° to 70°F, one
heater is to be ON. Above 80°F, there is a safety shutoff for all three heaters in case one
stays on because of a malfunction. A master switch is to be used to turn the system ON and
OFF. Prepare a typical PLC program for this control process.
49 PLC Experiment No.5
Timers
Sorting Device for Packages
Objectives
At the end of the session, students will be able to design PLC program to controlling
automatic Sorting Device for Packages and they have knowledge of timers.

Problems Description 1. Define the task:


Job is travels down a conveyor. Size of the job is identified by the help of job length sensor
I/P s (I/P 0 and I/P 1). If both the sensor sensed at a time when job is passed then the job
will be treated as big job. Or if only one sensor is sensed at a time then job will be treated
as small job. When job is reached to the rotary table, the table should turn either left or right
depending upon the size of job. The relevant piston should move the box to the correct
conveyor and the box should then continue to the end of that conveyor.

H- Horizontal V conv belt


V- Vertical (O P 4)
start conv belt
Rotary fable sensor
V. conv.nntial
(L P
position Sensoi
21 H. conv. Piston
H. conv belt (IP 4

H.conv. initial position sensor (IP 3

V. conv. Piston
(O/PO)
IP
Job 0
lenstli sensor
Start push button ( I P ? 1
50 PLC Experiment No.5
2. Define inputs and outputs:
Inputs
Address T
ype Function
I0 Proxy sensor Box length sensor
I1 Proxy sensor Box length sensor
I2 Proxy sensor Rotary table sensor
I3 Proxy sensor Horizontal conv.sensor
I4 Proxy sensor Vertical conv. Sensor
I5 Push button Start button
Outputs
Address T
ype Function
O0 Solenoid Push to vertical conv.
O1 Solenoid Push to horizontal conv.
O2 Motor Starting conveyor
O3 Motor Horizontal conveyor
O4 Motor Vertical conveyor
O5 Motor Turn rotary table right
O6 Motor Turn rotary table left
3. Develop the PLC ladder diagram program and test its function.

Discussion
Q: Develop the PLC ladder diagram program and test its function for the following problem
that doing an automatic traffic light control: The sequence of the traffic lights is as follows:
RED
5 seconds later
RED & AMBER
5 seconds later
GREEN 5 seconds
delay
The sequence should be fully automatic and start with the RED 'ON' immediately
51 PLC Experiment No.5
52 PLC Experiment No.6

Counter
Product Packaging
Objectives
At the end of the session, students will be able to design PLC program to controlling
automatic Product Packaging and they have knowledge of counters.

Problems Description 1. Define the task:

Once the photoelectric sensor (X0) detects 10 products, the robotic arm (Y0) will begin to
pack up. When the action is completed, the robotic arm and the counter will be reset.
2. Define inputs and outputs.

Inputs
• X0 - Photoelectric sensor for counting products.
• X1 - Robotic arm action completed sensor.
Outputs
• Y0 - Robotic arm for packing
3. Develop the PLC ladder diagram program and test its function.
Discussion
1- Repeat the procedure above.
2- Explain the following: a-
53 PLC Experiment No.6
What is counter?
b- Applications that the counter is used for, with examples.
54 PLC Experiment No.7

Paint Spraying
Objectives
At the end of the session, students will be able to design PLC program to controlling
automatic Paint Spraying.

Problems Description 1. Define the task:

Paint spraying system where boxes are fed by gravity through a feeder magazine one at a
time onto a moving conveyor belt. Upon the start signal, boxes are pushed towards the
conveyor by valve 1. This is a cylinder which extends and retracts which operates switches
S1 and S2 respectfully. A spraying nozzle paints each box as it passes under the paint spray
controlled by valve 2. A sensor (S3) counts each box being sprayed. When 6 boxes have
been painted the valve 2 shuts off (paint spray) and valve 1 (cylinder) stops moving boxes
onto the conveyor. Three seconds later the conveyor stops moving and the hopper with its
load moves forward (valve 3) where it is emptied. Ten seconds later the hopper returns to
the original position. The cycle is then complete and waits for a start signal again.
55 PLC Experiment No.7
2. Define the Inputs and Outputs:
Inputs
• Start Switch - On/Off (Normally Open) - NO
• Stop Switch - On/Off (Normally Closed) - NC
• S1 - cylinder retract sensor (NO)
• S2 -cylinder extend sensor (NO)
• S3 - Box Detected sensor (NO)
Outputs
• Y0- Motor - On/Off (Conveyor Run)
• Y1- Cylinder to feed boxes - On/Off
• Y2- Paint Spray - On/Off
• Y3- Cylinder to move hopper - On/Off
3. Develop the PLC ladder diagram program and test its function.

Discussion
1- Repeat the procedure above.

You might also like