Vous êtes sur la page 1sur 214

Nikini

INTRODUCTION TO
PROGRAMMABLE
LOGIC CONTROLLERS

Nikini Automation Systems (Pvt.) Ltd.


Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Overview

Introduction to PLC

Introduction to automation technology


Introduction to micro PLC systems
General Structure of PLC System
Installing PLC and configuring hardware
CPU memory and data types
Basic programming concepts
Programming languages
Programming instructions
Programming of control systems
Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Automation Technology

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

What is automation?

Manual Process

Mechanized Process

Automation is aimed at reducing human effort in


performing a task.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

What is automation?
Automation (ancient Greek: = self dictated)
or industrial automation is the use of
electronic controllers to control industrial
machinery and processes, replacing human
operators.
It is a step beyond mechanization, where
human operators are provided with
machinery to help them in their jobs.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Where used?

Introduction to PLC

Production Industry
Offices
Buildings
Construction Industry
Medical field
Household equipment
Aerospace Industry
???
Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example of a Manual process

Drilling machine
Clamping device

Work piece
Manual Process of Drilling a work piece
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Processes carried out

Introduction to PLC

Keeping the work piece


Clamp the work piece
Drill the work piece
Un clamp work piece
Remove the work piece
Sensing each operation

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Elements of the manual system


Actuators

Decision making element

Sensors
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Automating the Process:


Step 1 :Replacement of humans muscles (hands) by some
actuators, e.g. the pneumatic cylinders
Step 2 :Replacement of humans brain by a logic signal
processing device, e.g. PLC, electrical relay circuit.
Step 3 :Replacement of humans senses (eyes, ears, etc.)
by some input devices (electrical sensors).
Step 4 :Use set of instructions to control output element
according to the signal inputs present.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Automated System
Drill Cylinder

Limit switches/
sensors to detect
end limits of
cylinder movement

Clamp
Cylinder

Operator panel
Introduction to PLC

Signal Processor
Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Industrial Automation

Pentagon of
Automation

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Signal Processors
Hard-wired Control
Electrical
Pneumatics
Hydraulic

Programmable Control
Programmable Logic
Controller (PLC)
Embedded Controller

Digital
Electronics

Micro controller (PIC)


Industrial PC

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Hardwired Control &


Programmable Control

Nikini

Hard-wired control
Wiring of mechanical, electrical, electromechanical or electronic components to obtain
desired control

Programmable control
Programming and reprogramming of an
electronic component to obtain desired control

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

What is PLC?
PLC is an abbreviation for Programmable Logic
Controller.
PLC is a microprocessor-based electronic device.
This equipment controls a process/ machine.
a printing machine for printing newspapers, a bagging
plant to bag cement, a press for pressing plastic-shaped
parts,

This process occurs according to the instructions


of a program in the memory of the equipment.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

What is PLC?
PLC is primarily used as an Industrial Machine
Controller.
PLC is a small, but powerful Computer which is
designed for industrial Controlling.
To control process/ Machine
Sensors
Signal Inputs
Control switches (Push buttons, Switches)
Signal
Actuators (Solenoid Valves, Motor controllers)
Outputs
should be wired to the PLC
Program with instructions stating how the process/
machine works should be written into the PLC memory
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

What is PLC?
Program loaded into
the memory of PLC..
routed to the
machine

Program with
instructions
PLC
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

Machine
11/19/2010 8:48 AM

Nikini

Basic Principle of a PLC

Program (Instructions)

Input Signals

Introduction to PLC

Signal Processing

Nikini Automation Systems (Pvt) Ltd

Output Signals

11/19/2010 8:48 AM

Nikini

What PLC can do?


PLCs have inbuilt..
1. Logic controls
2. Timers
3. Counters
4. Analogue Signals
5. Closed loop Control
6. Arithmetic Functionsetc.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Advantages of PLC
Greater Flexibility and reliability
Changes to the design can easily be made on the
program.
Easy debugging
Error detection program available.
Low power consumption & space requirement
Based on solid-state electronics rather than electromechanical technology.
Little maintenance
No moving parts.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Advantages of PLC
No special programming skills required
Computer programming knowledge is not required.
Low Cost
Prices of microprocessor-based devices reduced more
than those of electro-mechanical devices.
Easy Archiving & Documentation
Programming, Parameter changes, etc. can be noted and stored in
the computer and documented without effort.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Advantages of PLC
Less project planning work
tested programs and subprograms can be used for a
number of different control setups
but each relay control circuit has to be wired and tested
from scratch
Faster control development
programming and wiring can be carried out in parallel
Simpler monitoring of stations by a higher-level host
computer
a programmable logic controller can easily exchange
data with the host computer

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

PLCs Vs Other Microprocessor


Based Devices

Modularity
Expansion possible.
Dedicated Input/Output Units
Inputs & outputs can be easily connected without interfacing.
Programmability
User friendly. No prior computer language required.
IEC 1131-3 Languages
Predictability
Designed to fail predictably. Outputs will turn off when program
fails.
Single-Source Support
Most PLC manufacturers have complete range of input & output
devices.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Major PLC manufacturers

Introduction to PLC

ABB
Koyo
Honeywell
Siemens
Modicon
Omron
Allen-Bradley
General Electric
Tesco Controls
Panasonic (Matsushita)
Mitsubishi
Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

SIEMENS SIMATIC S7
SIEMENS SIMATIC S7 consists of 3
families.
S7-200
S7-300
S7-400

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

S7-200

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

S7-200
The SIMATIC S7-200 is the CPU for the lower level
performance range.
It is available in various grades.
The CPU is qualified for open and closed loop control tasks in
machines and system construction.
It is real time capable and offers extensive communication
possibilities over a PROFIBUS or PC/PPI cable and over a free
programmable interface protocol.
The SIMATIC S7-200 offers modular extensibility and integrated
PID closed loop control functions.
The program software STEP 7 Micro/Win enables a quick
introduction in the programming and configuration.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

S7-300

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

S7-300
The SIMATIC S7-300 family offers the automation
solutions for the lower and middle performance range.
Properties of the SIMATIC S7-300
Program memory up to 85 K instructions
Up to 1024 digital in- and outputs
Multipoint capable interface for the configuration of smaller
networks and for configuration with help of a PC/PG.
Quick execution time in which the performance capable CPU
executes 1024 binary instructions inside of 0.1 ms.
Modular configuration and quick enhancements are possible
through interface modules with an integrated back plane bus.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

S7-400

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

S7-400
The CPUs of the family SIMATIC S7-400 build the
solutions for the middle and higher performance range
(e.g. automobile and machine tool construction or
instrumentation and control).
Properties of the SIMATIC S7-400
Program memory up to 660 K instructions.
Up to 131056 digital in- and outputs.
Multipoint capable interface for the configuration of smaller
networks and for configuration with help of the PC/PG.
Quick execution time that the performance capable CPU executes
1024 binary instructions inside of 0.1 s.
Modular configuration and quick enhancements are possible
through interface modules with integrated back plane bus.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Components of a PLC system

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

PLC Components

PLC - Program

Input Module

Central Processing
Unit

Sensors

Introduction to PLC

Modular PLC
Compact
PLC

Output Module

Actuators

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Hardware Components of a PLC


A PLC is made up of two basic sections
Input/Output (I/O) Interface
Central Processing Unit (CPU)

CPU consists of two main parts


Processor
Memory

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Firmware
Firmware is the software part, which is
permanently installed and supplied by the PLC
manufacturer.
This includes fundamental system routines, used
for starting the processor after the power has been
switched on.
Additionally, there is the operating system in the
case of programmable logic controllers, which is
generally stored in a ROM, a read-only memory,
or in the EPROM.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Software Components
Firmware
Keeps information about hardware
Should be stored in CPU for proper use of
hardware

Operating System
Controls the basic functions of PLC

User Program
Instructions written by the user (programmer)

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Structure of a S7-200 (CPU 222)

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Mode Selector Switch


RUN
TERM
STOP

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Expansion Modules

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Cartridge
Portable EEPROM
Battery
Real Time Clock

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Steps to follow

Steps to follow when using a PLC for the


first time
1. Wire PLC and all the modules
2. Configure Hardware
3. PLC Programming

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Wiring PLC
Follow the instructions/ manual given by
the manufacturer
Correctly connect the power supplies, etc.
Find the required type of inputs (Voltage,
current, etc)
Connect all the modules and wire the
modules as pre given instructions
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Hardware Configuration
Configuring connected hardware units and
downloading the firmware into CPU.
Enables CPU to identify the connected
hardware modules and their capabilities.
This is essential for using the modules.
S7 200 provides facility to read the PLC
rather than manually configuring each
connected unit.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Hardware Configuration
1. Connect wired PLC to Computer
2. Set PLC & PG (Computer) Interface
(Identify the correct connecting cable)
3. Set communication with PLC
4. Configure connected components (or
identify PLC type)
5. Download the settings to PLC
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

PLC Programming

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Programming Concept
1. Specification: Description of the task
2. Design: Description of the solution
3. Realisation: Implementation of the
solution
4. Integration/commissioning: Incorporating
into environment and testing the solution

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Programming Concept
1.

Prepare flow chart or Ladder diagram according to the functional


specifications of the machine
2.
Assign Input/ Output terminal addresses to the PLC as per the wiring
diagram and List of symbols
3.
Write program in to the PLC using the software
4.
Simulate operation and debug program (with PLC programming software,
if possible, or with switches and bulbs)
5.
Is Program correct?

<YES>: Go to step 6

<NO>:
Modify program and go to step 4
6.
Connect external devices such as Operator panel switches, sensors of the
machine, relays, solenoids, etc.
7.
Trial Run monitoring the functions closely
8.
Is Program correct?

<YES>: Go to step 9

<NO>:
Modify program and go to step 7
9.
Store Program
10. Run
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini
Prepare flow chart or ladder
program

Assign Input/ Output terminal


addresses

Write program into PLC

Simulate operation and


debug program

Introduction to PLC

Correct program

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini
Is program correct?

No

Yes

Connect external devices

Trial Run

Is program correct?

Correct program

No

Yes

Store program

Run
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Programming Method
Console or
Programming Keypad
Peripheral Device
Connecting Cable

PLC

Link with Console / Programming Keypad


Programming
Software

Computer

Link with Computer


Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Programming Languages
IEC 61131-3 Languages

Introduction to PLC

Ladder diagram (LD)


Function block diagram (FBD)
Instruction list (IL)
Structured text (ST)
Sequential function chart (SFC)

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Comparison of Programming
Methods
Graphical Programming (LD, FBD, SFC)
Windows-based graphical programming environment on a
computer, to compose the ladder diagram.
Equipped with good monitoring tools and programming aids.
Good for program development.
Mnemonic Code Programming (IL, ST)

Compact handheld device to key in programming instructions in


mnemonic codes.
Ideal for on-site debugging and minor circuit modification.
Requires knowledge of the programming codes.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Ladder Diagram Programming

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example
Actuation of a push button (S1) is to cause a lamp (B1) to
be switched on.
The lamp is to be illuminated as long as the push button is
actuated.

S1
B1
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

YES Function
+24V

START

Input

Output

0 (Off)

0 (Off)

1 (On)

1 (On)

0V

Truth Table
Electrical Circuit
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

YES Function

Ladder Diagram
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Symbolic Addressing
For symbolic addressing, the symbol table must be
filled in.
Select the symbol table from the operations tree or
by selecting Symbol table in the View menu.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Symbol Table
A window is displayed in which you can edit the symbol
table.
Enter the element that you want to appear as plain text later
on under name.
Under address, enter the operand that you want to have
replaced by a symbolic name.
Under comment, you can enter a text that you find helpful.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Ladder Diagram
The ladder programs allow the CPU to emulate the flow of
electric current from a power source through a series of
logical input conditions that in turn enable logical output
conditions.
The logic is separated into networks.
The program is executed as dictated by the program, one
network at a time, from left to right and then top to bottom.
Once the CPU has reached the end of the program, it starts
over again at the top of the program.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Elements of Ladder Diagram


Contacts Represent a switch through which power can flow.
Coils Represent a relay or output that is energized by power flow.
Boxes Represent a function (for instance, a timer, counter, or
mathematical operation) that is executed when power flow reaches the
box.
A network is composed of these elements and represents a complete
circuit.
Power flows from the left power rail (represented in the LAD editor by
a vertical line on the left side of the window) through the closed
contacts to energize the coils or boxes.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example of a Ladder Program


Coil

Contact

Networks

Box

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Memory Addressing

Introduction to PLC

Inputs

Outputs

I0.0
I0.1
.
.
.
.
I0.7

Q0.0
Q0.1
.
.
.
.
Q0.5

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Statements
Control Statements
The control statement is the smallest unit of
a PLC user program. A statement consists
of an
operation part
operand part

Introduction to PLC

(I0.0, I0.1, Q0.4)

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Ladder Programming Rules


Rules about Placing Contacts
Each network must begin with a contact.
You cannot terminate a network with a contact

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Ladder Programming Rules


Rules about Placing Coils
You cannot begin a network with a coil
Coils are used to terminate a network of logic.
A single network can have several coils, as long as the
coils exist on parallel branches of that particular
network. Otherwise there can be only one coil per
network.
You cannot place more than one coil in a series

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Ladder Programming Rules


Rules about Placing Boxes
You cannot begin a network with a box.
Boxes are used to terminate a network of logic.
If a box has ENO, you can place further instructions
after the box.
You can have several boxes with ENO in a series on the
same network.
If a box does not have ENO, rules are similar to that of
a coil.
There cannot be more than one box in a network.
You cannot place any instructions after it
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Ladder Programming Rules

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Ladder Programming Guide


Number of contacts for I / Os , timers, counters, etc. is
unlimited.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Ladder Programming Guide


Number of contacts to be connected in series or parallel is
unlimited.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Ladder Programming Guide


An output coil name can only be assigned once. There cannot
be two (or more) coils (or boxes) with same name.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Ladder Programming Guide


A network of the ladder diagram is keyed into PLC from
left to right.
Programming for counter and other modules having more
than one input must be performed in a pre-determined order.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Ladder Programming Guide


Timer & counter data should be entered at the time of
programming.

Timer call with a pre-set


time of 5.5 seconds

Input/output number, step number, timer/counter values,


etc. can be written with only the significant digits.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Drawing Lines
You can use the horizontal and vertical lines from
the Program toolbar, or hold down the CTRL key
and press the LEFT, RIGHT, UP, or DOWN
ARROW key on your keyboard, to draw lines
between the elements of your network and the lefthand power rail when necessary to complete a
network.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Enter Instructions

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Assigning Addresses
To assign a constant value (such as 100) or an absolute
address (such as I0.1), simply type the desired value in the
address area of the instruction. (Use the mouse or the
ENTER key to select the address area for typing.)

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Compile in LAD
You can compile by using the toolbar
buttons or the PLC menu.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example: Burglar Alarm


A thin wire has been stretched behind a display window,
which breaks if a burglary is attempted.
A closed circuit is interrupted as a result of this and a
buzzer is sounded.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

NOT Function
+24V

START

Input

Output

0 (Off)

1 (On)

1 (On)

0 (Off)

0V

Truth Table
Electrical Circuit
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

NOT Function

Ladder Diagram
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Press with protective guard


A press stamp 1.0 is to advance
only if a push button S1 is
actuated and a protective guard
is closed.
If one of these conditions is not
met, the press tool is to return
immediately.
The position of the closed
protective guard B1 is monitored
by a proximity switch B1.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

AND Function
+24V

S1

Input 1

Input 2

Output

S2

0V

Truth Table

Electrical Circuit
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

AND Function

Ladder Diagram
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Bell system
An apartment bell is to ring if bell button S1 at the front
door is pressed or bell button S2 at the apartment door.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

OR Function
+24V

S1

S2

Input 1

Input 2

Output

0V

Truth Table

Electrical Circuit
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

OR Function

Ladder Diagram
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Function Block Diagram


There are no contacts and coils, but there are
equivalent instructions that appear as box
instructions.
The program logic is derived from the connections
between these box instructions.
The output from one instruction (such as an AND
box) can be used to enable another instruction
(such as a timer) to create the necessary control
logic.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

YES Function

Functional Block Diagram


Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

NOT Function

Functional Block Diagram


Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

AND Function

Functional Block Diagram


Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

OR Function

Functional Block Diagram


Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Statement List
Statement List (STL) editor allows to create
control programs by entering the instruction
mnemonics.
This text-based concept is very similar to
assembly language programming.
The CPU executes each instruction, in the order
dictated by the program, from top to bottom, and
then restarts at the top.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example

Statement List

Ladder Diagram
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

YES Function
Statement Logic
LD I0.0
=
Q0.0

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

NOT Function
Statement Logic
LDN
=

Introduction to PLC

I0.0
Q0.0

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

AND Function
Statement Logic
LD I0.0
A I0.1
= Q0.0

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

AND Function
Statement Logic
LD I0.0
LD I0.1
ALD
= Q0.0

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

OR Function
Statement Logic
LD I0.0
O I0.1
= Q0.0

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

OR Function
Statement Logic
LD I0.0
LD I0.1
OLD
= Q0.0

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

LD Language
Ladder logic is easy for beginning programmers to
use.
Graphical representation is often easy to
understand, and is popular around the world.
The LAD editor can be used with both the
SIMATIC and IEC 1131-3 instruction sets.
You can always use the STL editor to display a
program created with the LAD editor.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

FBD Language
The graphical logic gate style of representation is
good for following program flow.
The FBD editor can be used with both the
SIMATIC and IEC 1131-3 instruction sets.
You can always use the STL editor to display a
program created with the LAD editor.
The expandable AND/OR boxes make it easier to
draw complex input combinations.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

STL Language
STL is most appropriate for experienced programmers.
STL sometimes allows you to solve problems that you
cannot solve easily with the LAD or FBD editor.
While you can always use the STL editor to view or edit a
program that was created with the SIMATIC LAD or FBD
editors, the reverse is not always true.
You cannot always use the SIMATIC LAD or FBD editors
to display a program that was written with the STL editor.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

PLC Exercises

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Exercise 1: NAND

Introduction to PLC

S1

S2

B1

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Exercise 1: NOR

Introduction to PLC

S1

S2

B1

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Exercise 1: X-OR

Introduction to PLC

S1

S2

B1

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Exercise 2-Logic

Introduction to PLC

Input 1

Input 2

Input 3

Output 1

Output 2

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Silo control system for two bulk


materials

2A
1A

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Silo control system for two bulk


materials

A mixing plant permits a selection between two


bulk materials per selector switch (S2).
In switch position 1 (S2 = 0 signal), bulk material
A reaches a mixing container, if push button S1 is
actuated simultaneously.
If selector switch S2 is in position 2 (S2 = 1
signal) and push button S1 is actuated bulk
material B is conveyed.
Silo A is opened via cylinder 1A (solenoid 1M1),
Silo B via cylinder 2A (solenoid 2M1).
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Programming Concept
1. Specification: Description of the task
2. Design: Description of the solution
3. Realisation: Implementation of the
solution
4. Integration/commissioning: Incorporating
into environment and testing the solution

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Design steps
1.
2.
3.
4.
5.

Sketch the system


Identify the sequence
Design the power circuits
Identify the input signals & Output Signals
Design the control circuit according to the
control requirement
6. If there are signal overlaps, necessary actions
should be taken to overcome signal overlap
problems
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Silo control system for two bulk


materials

Introduction to PLC

S2

S1

Y1

Y2

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Heavy Work piece feeding

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Exercise 3
A1

1.

Piston moves forward when


Start button Pressed

2.

Return to initial position when


Reset button pressed

Y1

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

+24V

3 4

START

Nikini

RESET

24V I0 I1 I2 I3 I4 I5 I6 I7

0V Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7

Y1
0V

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

PLC Hardware Components

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Hardware Components of a PLC


A PLC is made up of two basic sections
Input/Output (I/O) Interface
Central Processing Unit (CPU)

CPU consists of two main parts


Processor
Memory

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Input Modules
Input Modules
Interface for input devices.
CPU works in 5V . Input modules convert 24V
DC (or higher voltage) to 5V DC.
Isolate Signal given to the CPU.
Input delay to screen input signals.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Types of Input modules

Sink-type input module interfaced with dry


contact switches and PNP sensor
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Types of Input modules

Source-type input module interfaced with


dry contact switches and NPN sensor
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Output Modules
Output Modules
The signals coming from CPU are 0V or 5V.
Amplify and condition the output.
Relay/ Transistor/ Triac Output.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Types of output modules

Transistor Output (Source Type)


Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Types of output modules

Transistor Output (Sink Type)


Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Types of output modules

Relay Output
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Types of output modules

Triac Type Output


Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Types of Memory
Types of Memory
RAM
ROM

Random Access Memory

Erasing

Programming

When power is
removed,
Memory
contents are:

Electrical

Electrical

Volatile

Not possible

Using masks in
Manufacturing
process

Read Only Memory

PROM

Programmable ROM

EPROM

Erasable PROM

Non volatile

With UV light
RPROM

Reprogrammable PROM

Electrical

EEPROM Electrically Erasable PROM


Electrical
EAPROM Electrically Alterable PROM
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Basic Memory Areas


The Basic memory areas of a PLC :
CPU
Work Memory (RAM)
contains the executable user program
(for example logic and data blocks)
Load Memory
(EEPROM/RAM)
Contains the entire
User Program

System Memory (RAM)


Block stack, Interrupt stack
Diagnostic buffer, Local data stack
process image input/output tables,
bit memory, timers, counters

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

PLC Memory
Bit is the abbreviation for binary digit.
The BIT is the smallest binary (bivalent) information
unit.
It can accept a signal status of 1 or 0.
0

BYTE.
A byte has the size of 8 bits.
0 1 0 1 1 0 0 1

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

PLC Memory
WORD
The word length corresponds to the number from 16
binary characters.
A word also has the size of 2 bytes or 16
MSB

LSB

1 0 1 0 0 0 0 1 1 0 1 0 0 1 0 0

DOUBLE-WORD
A double-word corresponds to the word length of 32
binary characters.
MSB

LSB

1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 1 0 1 0 0
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

PLC Memory
MSB

Bit

20

Byte

27

26

25

24

23

22

21

20

LSB

0 1 0 1 1 0 0 1

MB100

0
MS Byte

Word

MW100
LS Byte

MS Byte

Double Word

MD100

LS Byte
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Memory addressing
MSB
0

LSB
7

Bit

I 0 . 3

0
M
1
0
V
1
0

Area
Identifier
Introduction to PLC

Byte
Bit of
Address Byte

Q
1

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Memory addressing
Byte/ Word/ Double word addressing
<Area><Size> <Starting byte address>
MB0
MB1
VW10
VD100
Timer and Counter addressing are different

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

How the Control Program Works


PLC performs the following operations repeatedly:

Read the states of the input devices.


Copy input status into the Process-Image Input
(PII) register.
CPU execute the user program stored in the Load
Memory and stores the results of the program
logic in various memory areas including ProcessImage Output (PIQ) register.
Transfer status from the PIQ to the field outputs.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Scan Cycle of the PLC


One Scan Cycle
Reading the inputs

Writing to the outputs


Executing the program

Executes the CPU self test diagnostics

Process any communication requests

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Scan Cycle of the PLC


Reading the inputs: The S7-200 copies the state of the physical
inputs to the process-image input register.
Executing the control logic in the program: The S7-200 executes
the instructions of the program and stores the values in the
various memory areas.
Processing any communication requests: The S7-200 performs
any tasks required for point-to-point or network
communications.
Executing the CPU self-test diagnostics: The S7-200 ensures
that the firmware, the program memory, and any expansion
modules are working properly.
Writing to the outputs: The values stored in the process-image
output register are written to the physical outputs.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

The execution of the scan cycle is dependent upon whether the S7-200
is in STOP mode or in RUN mode. In RUN mode, your program is
executed; in STOP mode, your program is not executed.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

PLC scan cycle time


The time that the processor requires for this
execution is called a cycle time.
This time is dependent on the number
instructions and types of commands.
Also cycle time is dependent on CPU speed
and I/O conversion time delay

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Exercise 4
1B2

1.

Piston moves forward when


Start button Pressed

2.

Return to initial position


automatically when piston
moved to 1B2

1M1

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

+24V

3 4

START

Nikini

A2

24V I0 I1 I2 I3 I4 I5 I6 I7

0V Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7

Y1
0V

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Exercise 5
1B1

1B2

1.

Piston moves forward when it


reaches to 1B1

2.

Return to initial position


automatically when piston
moved to 1B2

3.

Continuous cycle starts with


S1 (Start) push button

4.

Continuous cycle stops with


S2 (Stop) push button

1M1

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

+24V

3 4

START

RESET

A1

Nikini

A2

24V I0 I1 I2 I3 I4 I5 I6 I7

0V Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7

Y1
0V
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Counters

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Counters
Up Counter (CTU)
Down Counter (CTD)
Up-Down Counter (CTUD)

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Up Counter
Counts up from the current value each time the
count-up input CU makes the transition from off to
on.
When the current value (Cxxx) is greater than or
equal to the Preset Value (PV), the counter bit
(Cxxx) turns on.
The counter is reset when the Reset (R) input turns
on, or when the Reset instruction is executed.
The counter stops counting when it reaches the
maximum value (32,767).
Counter ranges:Cxxx=C0 through C255
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example-LAD

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example-FBD

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example-STL

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Down Counter
Counts down from the current value of that
counter each time the count down input CD makes
the transition from off to on.
When the current value Cxxx is equal to zero, the
counter bit (Cxxx) turns on.
The counter resets the counter bit (Cxxx) and
loads the current value with the preset value (PV)
when the load input (LD) turns on.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example-LAD

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example-FBD

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example-STL

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Up Down Counter
Counts up each time the count-up input CU makes the transition from
off to on.
Counts down each time the count-down input CD makes the transition
from off to on.
The current value Cxx of the counter maintains the current count.
The preset value PV is compared to the current value each time the
counter instruction is executed.
When the current value Cxx is greater than or equal to the preset value
PV, the counter bit Cxx turns on.
Otherwise, the counter bit turns off.
The counter is reset when the Reset (R) input turns on, or when the
Reset instruction is executed. The CTUD counter stops counting when
it reaches PV.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example-LAD

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example-FBD

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example-STL

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Timers

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Timer Types
Delay On timer (TON)
Delay OFF timer (TOF)
Retentive On Delay timer (TONR)

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Timer Numbers
Timer Type
TONR

TON, TOF

Introduction to PLC

Resolution Maximum Time Timer Number


1 ms
10 ms
100 ms

32.767 s
327.67 s
3276.7 s

T0, T64
T1-T4, T65-T68
T5-T31, T69-T95

1 ms
10 ms
100 ms

32.767 s
327.67 s
3276.7 s

T32, T96
T33-T36, T97-T100
T37-T63, T101-T255

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

On Delay Timer
Counts time when the enabling input is ON.
When the current value (Txxx) is greater than or
equal to the preset time (PT), the timer bit is ON.
Current value is cleared when the enabling input is
OFF.
This timer continues counting after the Preset is
reached, and it stops counting at the maximum
value of 32767.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Example-LAD

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

Nikini

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example-FBD

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example- STL

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Delay Off Timer


Delay turning an output OFF for a fixed period of
time after the input turns OFF.
When the enabling input turns ON, the timer bit
turns ON immediately, and the current value is set
to 0.
When the input turns OFF, the timer counts until
the elapsed time reaches the preset time.
When the preset is reached, the timer bit turns
OFF and the current value stops counting.
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Example-LAD

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

Nikini

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example-FBD

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example-STL

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Retentive On Delay Timer


Counts time when the enabling input is ON.
When the current value (Txxx) is greater than or
equal to the preset time (PT), the timer bit is ON.
The current value of the Retentive On-Delay timer
is maintained when the input is OFF.
A Reset instruction (R) is used to clear the current
value of the Retentive On-Delay timer.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Example-LAD

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

Nikini

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example-FBD

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Example-STL

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Exercise 6
1B1

1B2

1. Delay 3s at 1B1 and move


forward
2. Delay 2s at 1B2 and move
backward

1M1

3. Continuous Cycle with S1


(Start) push button
4. Stop when 10 cycles
completed
5. Stop with S2 (Reset) push
button immediately

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

+24V

3 4

START

RESET

A1

Nikini

A2

24V I0 I1 I2 I3 I4 I5 I6 I7

0V Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7

Y1
0V
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Silo control system for two bulk


materials

2A
1A

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Silo control system for two bulk


materials
Selector switch S2 is used to select between
material A and B.
When a push button S1 is pressed, material A
should be entered for 10 seconds or material B
should be entered for 13 seconds to the mixing
bin.
Note: What happens if push button S1 is kept
pressed (over 10 or 13 seconds)?

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Areas of System Memory


Input Image Register (I)
Output Image Register (Q)
Bit (M) memory
Variable (V) memory
Special Memory (SM) bits
Timer (T) memory
Counter (C) memory
Analog Inputs (AI) and Outputs (AQ)
Accumulators (AC)
High Speed Counters (HC)
Constant Values: Decimal, Hexadecimal, ASCII
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Instruction types
Bit logic
Timer
Counter
Program Control
Logic Operations
Logic Stack
Table
Conversion
High Speed Counter
Interrupt
Real Time Clock
Math, Increment and Decrement
PID
Move, Shift, Rotate and Fill
Communication and Networking

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Organizing the User Program


Typical User Program Structure
Main Program

Main Program : Executed once per scan


MEND

Subroutine : Executed when called


from the main program

Interrupt Routine : Executed on each


occurrence of the interrupt event

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

SBR 0
RET
SBR 1
RET
INT 0
RET
INT 1
RET

11/19/2010 8:48 AM

Nikini

Program Flow
Main Program

CALL 0

SBR 0

RET

SBR 1
RET
CALL 1
Interrupt Event
INT 0

MEND

Introduction to PLC

RET

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

SIMATIC S7-200:
Freeport communication
Option:
RS 485 or
RS 232 protocol can be used

RS 485

RS 485
modem

PPI cable

Drive
(e.g. USS protocol)

Non-Siemens
device with
RS 485

RS 232

Printer

NonSiemens
PLC

OP

Modem

PLC
Bar code scanner

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

SIMATIC S7-200:
Fieldbus Communication

Introduction to PLC

PROFIBUS-DP Slave
AS-I Master
Ethernet
IT (TCP-IP)
GSM
GPRS

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Selecting a PLC

Understand the process to be controlled


1. list the number and types of inputs and
outputs.
2. determine how the process is to be controlled.
3. determine special needs such as distance
between parts of the process.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Selecting a PLC
Consideration

Information to record

Notes

1. Proposed system
2. Environmental issues
3. Discrete devices
4. Analog devices
5.Specialty modules or features
(application-specific)
6. CPU required
7. I/O locations
8.Communications requirements
9.Programming requirements

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Selecting a PLC

Number & types of Inputs and Outputs


Analog Input and Output facility (# and types- V? I?)
Expansion facility (Maximum modules, Module types,..)
Function modules available (Weighing, Positioning, etc.)
Special Functions (HSC, PTO, Real time clock, etc.)
Software
Languages available
Monitoring/ Diagnostic facilities
Other facilities (Wizards, HW Configuration)
Ease of Programming
Memory capacity
Speed

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Selecting a PLC

Mathematical Calculations
Types of Operator Interface (Operator panels, etc.)
Communication facilities with other PLCs and Computers
Temperature/ Humidity/ Vibration resistance
Ease of Maintenance
Spare parts/ After sales service/ Reliability/ Shipping time

Cost $$

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Selecting a PLC Vendor

If not already specified, a single vendor should


be selected. Factors that might be considered
are,
1.
2.
3.
4.
5.
6.
7.
8.

Introduction to PLC

manuals and documentation


support while developing programs
the range of products available
support while troubleshooting
shipping times for emergency replacements
training
the track record for the company
business practices (billing, upgrades/obsolete
products,etc.)
Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Review
 Introduction to automation technology
 Introduction to micro PLC systems
 General Structure of PLC System
 Installing PLC and configuring hardware
 CPU memory and data types
 Basic programming concepts
 Programming languages
 Programming instructions
 Programming of control systems
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Questions??

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Basics

Introduction to PLC

Number systems
Signal Inputs
Signal Outputs
PLC memory
PLC scan cycle

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Number systems
Decimal
5238 = 5x1000 + 2x100 + 3x 10 + 8x1
5238 = 5x103 + 2x102 + 3x 101 + 8x100

Binary
101101112= 1x27 + 0x26 + 1x25 + 1x24 + 0x23
+ 1x22 + 1x21 + 1x20
= 18310

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Number systems
BCD (Binary Coded Decimal)

Introduction to PLC

Decimal number

BCD number

010

0000BCD

110

0001BCD

210

0010BCD

310

0011BCD

410

0100BCD

510

0101BCD

610

0110BCD

710

0111BCD

810

1000BCD

910

1001BCD
Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Number systems
Decimal number 3564 in BCD
0011 0101 0110 0100 BCD

16 bits required
BCD coded numbers are often used for
seven segment displays and coding
switches.

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Number systems
Hexadecimal
A =10, B =11, C =12, D =13, E =14, F =15
87BC16 = 8x163 + 7x162 + 11x161 + 12x160
=3474810

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Types of signals

Binary signal
Binary signals can take the value of 2 possible states.
Signal state 1 = voltage available = e.g. Switch on
Signal state 0 = voltage not available = e.g. Switch off

In control engineering DC voltage of 24V is used.


+ 24 V = 1 for this input.
0 V = 0
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Types of signals

Analog signal
Can take many values within a certain range
- Examples
Temperature -50 ... +150C
Current flow 0 ... 200 l/min
Number of revolutions 500 ... 1500 r/min
These measurements are converted to currents or resistances.
analog information are converted to a voltage, current or resistance
value. (analog to digital conversion -A/D conversion.)
Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

Input / Output System


Provides the physical connections between the
outside world and CPU

Introduction to PLC

Input Devices

Output Devices

Selector switches

Alarms

Push buttons

Control Relays

Sensors

Solenoids

Circuit breakers

Lights

Level sensors

Horns

Relay contactors

Valves

Motor starter Contacts

Motor Starters
Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM

Nikini

PLC Operation

Introduction to PLC

Nikini Automation Systems (Pvt) Ltd

11/19/2010 8:48 AM