179
Industrial Control Behzad Samadi Department of Electrical Engineering Amirkabir University of Technology Winter 2011 Tehran, Iran Behzad Samadi (Amirkabir University) Industrial Control 1/1

Industrial Control Systems - PLC

Embed Size (px)

Citation preview

Page 1: Industrial Control Systems - PLC

Industrial Control

Behzad Samadi

Department of Electrical EngineeringAmirkabir University of Technology

Winter 2011Tehran, Iran

Behzad Samadi (Amirkabir University) Industrial Control 1 / 1

Page 2: Industrial Control Systems - PLC

Programmable Logic Controllers

Outline:

Introduction

Hardware

Programming

Ladder DiagramsInstruction ListStructured TextSequential Function ChartFunction Block Diagram

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 2 / 1

Page 3: Industrial Control Systems - PLC

Programmable Logic Controllers

Outline:

Introduction

Hardware

Programming

Ladder DiagramsInstruction ListStructured TextSequential Function ChartFunction Block Diagram

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 2 / 1

Page 4: Industrial Control Systems - PLC

Programmable Logic Controllers

Outline:

Introduction

Hardware

Programming

Ladder DiagramsInstruction ListStructured TextSequential Function ChartFunction Block Diagram

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 2 / 1

Page 5: Industrial Control Systems - PLC

Programmable Logic Controllers

Outline:

Introduction

Hardware

Programming

Ladder Diagrams

Instruction ListStructured TextSequential Function ChartFunction Block Diagram

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 2 / 1

Page 6: Industrial Control Systems - PLC

Programmable Logic Controllers

Outline:

Introduction

Hardware

Programming

Ladder DiagramsInstruction List

Structured TextSequential Function ChartFunction Block Diagram

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 2 / 1

Page 7: Industrial Control Systems - PLC

Programmable Logic Controllers

Outline:

Introduction

Hardware

Programming

Ladder DiagramsInstruction ListStructured Text

Sequential Function ChartFunction Block Diagram

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 2 / 1

Page 8: Industrial Control Systems - PLC

Programmable Logic Controllers

Outline:

Introduction

Hardware

Programming

Ladder DiagramsInstruction ListStructured TextSequential Function Chart

Function Block Diagram

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 2 / 1

Page 9: Industrial Control Systems - PLC

Programmable Logic Controllers

Outline:

Introduction

Hardware

Programming

Ladder DiagramsInstruction ListStructured TextSequential Function ChartFunction Block Diagram

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 2 / 1

Page 10: Industrial Control Systems - PLC

Programmable Logic Controllers

Definition:

A digitally operating electronic system, designed for use in anindustrial environment, which uses memory for the internal storage ofuser-oriented instructions for implementing specific functions such aslogic, sequencing, timing, counting and arithmetic to control, throughdigital or analog inputs and outputs, various types of machines orprocesses.

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 3 / 1

Page 11: Industrial Control Systems - PLC

Programmable Logic Controllers

What is a PLC?

A programmable logic controller (PLC) is a specialized computer toperform logic functions for machine control.

PLCs are used to implement logic functions such as not allowing adrill press to start unless the operator has one hand on each of thetwo start switches.

Such control functions used to be implemented using relays. PLCsrevolutionized this by allowing the control logic to be implementedusing software.

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 4 / 1

Page 12: Industrial Control Systems - PLC

Programmable Logic Controllers

PLC Origin:

Developed to replace relays in the late 1960s

Costs dropped and became popular by 1980s

Now used in many industrial designs

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 5 / 1

Page 13: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliable

Highly versatile (universal applicability)Simple troubleshootingSimple installationQuick modification of the program (highly flexible)Capable of tasks not possible with relays before:

calculationinformation exchangetext and graphic displaydata processingnetworking

Low space requirementLow power consumptionHigh processing speedNo moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 14: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliableHighly versatile (universal applicability)

Simple troubleshootingSimple installationQuick modification of the program (highly flexible)Capable of tasks not possible with relays before:

calculationinformation exchangetext and graphic displaydata processingnetworking

Low space requirementLow power consumptionHigh processing speedNo moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 15: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliableHighly versatile (universal applicability)Simple troubleshooting

Simple installationQuick modification of the program (highly flexible)Capable of tasks not possible with relays before:

calculationinformation exchangetext and graphic displaydata processingnetworking

Low space requirementLow power consumptionHigh processing speedNo moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 16: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliableHighly versatile (universal applicability)Simple troubleshootingSimple installation

Quick modification of the program (highly flexible)Capable of tasks not possible with relays before:

calculationinformation exchangetext and graphic displaydata processingnetworking

Low space requirementLow power consumptionHigh processing speedNo moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 17: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliableHighly versatile (universal applicability)Simple troubleshootingSimple installationQuick modification of the program (highly flexible)

Capable of tasks not possible with relays before:

calculationinformation exchangetext and graphic displaydata processingnetworking

Low space requirementLow power consumptionHigh processing speedNo moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 18: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliableHighly versatile (universal applicability)Simple troubleshootingSimple installationQuick modification of the program (highly flexible)Capable of tasks not possible with relays before:

calculationinformation exchangetext and graphic displaydata processingnetworking

Low space requirementLow power consumptionHigh processing speedNo moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 19: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliableHighly versatile (universal applicability)Simple troubleshootingSimple installationQuick modification of the program (highly flexible)Capable of tasks not possible with relays before:

calculation

information exchangetext and graphic displaydata processingnetworking

Low space requirementLow power consumptionHigh processing speedNo moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 20: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliableHighly versatile (universal applicability)Simple troubleshootingSimple installationQuick modification of the program (highly flexible)Capable of tasks not possible with relays before:

calculationinformation exchange

text and graphic displaydata processingnetworking

Low space requirementLow power consumptionHigh processing speedNo moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 21: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliableHighly versatile (universal applicability)Simple troubleshootingSimple installationQuick modification of the program (highly flexible)Capable of tasks not possible with relays before:

calculationinformation exchangetext and graphic display

data processingnetworking

Low space requirementLow power consumptionHigh processing speedNo moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 22: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliableHighly versatile (universal applicability)Simple troubleshootingSimple installationQuick modification of the program (highly flexible)Capable of tasks not possible with relays before:

calculationinformation exchangetext and graphic displaydata processing

networking

Low space requirementLow power consumptionHigh processing speedNo moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 23: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliableHighly versatile (universal applicability)Simple troubleshootingSimple installationQuick modification of the program (highly flexible)Capable of tasks not possible with relays before:

calculationinformation exchangetext and graphic displaydata processingnetworking

Low space requirementLow power consumptionHigh processing speedNo moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 24: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliableHighly versatile (universal applicability)Simple troubleshootingSimple installationQuick modification of the program (highly flexible)Capable of tasks not possible with relays before:

calculationinformation exchangetext and graphic displaydata processingnetworking

Low space requirement

Low power consumptionHigh processing speedNo moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 25: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliableHighly versatile (universal applicability)Simple troubleshootingSimple installationQuick modification of the program (highly flexible)Capable of tasks not possible with relays before:

calculationinformation exchangetext and graphic displaydata processingnetworking

Low space requirementLow power consumption

High processing speedNo moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 26: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliableHighly versatile (universal applicability)Simple troubleshootingSimple installationQuick modification of the program (highly flexible)Capable of tasks not possible with relays before:

calculationinformation exchangetext and graphic displaydata processingnetworking

Low space requirementLow power consumptionHigh processing speed

No moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 27: Industrial Control Systems - PLC

Programmable Logic Controllers

Advantages of using PLCs:

Highly reliableHighly versatile (universal applicability)Simple troubleshootingSimple installationQuick modification of the program (highly flexible)Capable of tasks not possible with relays before:

calculationinformation exchangetext and graphic displaydata processingnetworking

Low space requirementLow power consumptionHigh processing speedNo moving parts, hence no wearing parts

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 1

Page 28: Industrial Control Systems - PLC

Programmable Logic Controllers

Disadvantages of using PLCs:

High initial cost ( for a simple process )

Sensitive to dust, high temperature and high humidity

Repair must be made by a qualified personnel

Not very widespread

No uniform programming language

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 7 / 1

Page 29: Industrial Control Systems - PLC

Programmable Logic Controllers

Disadvantages of using PLCs:

High initial cost ( for a simple process )

Sensitive to dust, high temperature and high humidity

Repair must be made by a qualified personnel

Not very widespread

No uniform programming language

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 7 / 1

Page 30: Industrial Control Systems - PLC

Programmable Logic Controllers

Disadvantages of using PLCs:

High initial cost ( for a simple process )

Sensitive to dust, high temperature and high humidity

Repair must be made by a qualified personnel

Not very widespread

No uniform programming language

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 7 / 1

Page 31: Industrial Control Systems - PLC

Programmable Logic Controllers

Disadvantages of using PLCs:

High initial cost ( for a simple process )

Sensitive to dust, high temperature and high humidity

Repair must be made by a qualified personnel

Not very widespread

No uniform programming language

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 7 / 1

Page 32: Industrial Control Systems - PLC

Programmable Logic Controllers

Disadvantages of using PLCs:

High initial cost ( for a simple process )

Sensitive to dust, high temperature and high humidity

Repair must be made by a qualified personnel

Not very widespread

No uniform programming language

[Fes, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 7 / 1

Page 33: Industrial Control Systems - PLC

Programmable Logic Controllers

International Standard for PLC

The IEC 1131 standards were developed to be a common and openframework for PLC architecture, agreed to by many standards groupsand manufacturers.

They were initially approved in 1992, and since then they have beenreviewed as the IEC-61131 standards.The main components of the standard are:

IEC 61131-1 OverviewIEC 61131-2 Requirements and Test ProceduresIEC 61131-3 Data types and programmingIEC 61131-4 User GuidelinesIEC 61131-5 CommunicationsIEC 61131-6 Functional SafetyIEC 61131-7 Fuzzy controlIEC 61131-8 Guidelines for the application and implementation ofprogramming languages

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 8 / 1

Page 34: Industrial Control Systems - PLC

Programmable Logic Controllers

International Standard for PLC

The IEC 1131 standards were developed to be a common and openframework for PLC architecture, agreed to by many standards groupsand manufacturers.

They were initially approved in 1992, and since then they have beenreviewed as the IEC-61131 standards.

The main components of the standard are:

IEC 61131-1 OverviewIEC 61131-2 Requirements and Test ProceduresIEC 61131-3 Data types and programmingIEC 61131-4 User GuidelinesIEC 61131-5 CommunicationsIEC 61131-6 Functional SafetyIEC 61131-7 Fuzzy controlIEC 61131-8 Guidelines for the application and implementation ofprogramming languages

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 8 / 1

Page 35: Industrial Control Systems - PLC

Programmable Logic Controllers

International Standard for PLC

The IEC 1131 standards were developed to be a common and openframework for PLC architecture, agreed to by many standards groupsand manufacturers.

They were initially approved in 1992, and since then they have beenreviewed as the IEC-61131 standards.The main components of the standard are:

IEC 61131-1 OverviewIEC 61131-2 Requirements and Test ProceduresIEC 61131-3 Data types and programmingIEC 61131-4 User GuidelinesIEC 61131-5 CommunicationsIEC 61131-6 Functional SafetyIEC 61131-7 Fuzzy controlIEC 61131-8 Guidelines for the application and implementation ofprogramming languages

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 8 / 1

Page 36: Industrial Control Systems - PLC

Programmable Logic Controllers

International Standard for PLC

The IEC 1131 standards were developed to be a common and openframework for PLC architecture, agreed to by many standards groupsand manufacturers.

They were initially approved in 1992, and since then they have beenreviewed as the IEC-61131 standards.The main components of the standard are:

IEC 61131-1 Overview

IEC 61131-2 Requirements and Test ProceduresIEC 61131-3 Data types and programmingIEC 61131-4 User GuidelinesIEC 61131-5 CommunicationsIEC 61131-6 Functional SafetyIEC 61131-7 Fuzzy controlIEC 61131-8 Guidelines for the application and implementation ofprogramming languages

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 8 / 1

Page 37: Industrial Control Systems - PLC

Programmable Logic Controllers

International Standard for PLC

The IEC 1131 standards were developed to be a common and openframework for PLC architecture, agreed to by many standards groupsand manufacturers.

They were initially approved in 1992, and since then they have beenreviewed as the IEC-61131 standards.The main components of the standard are:

IEC 61131-1 OverviewIEC 61131-2 Requirements and Test Procedures

IEC 61131-3 Data types and programmingIEC 61131-4 User GuidelinesIEC 61131-5 CommunicationsIEC 61131-6 Functional SafetyIEC 61131-7 Fuzzy controlIEC 61131-8 Guidelines for the application and implementation ofprogramming languages

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 8 / 1

Page 38: Industrial Control Systems - PLC

Programmable Logic Controllers

International Standard for PLC

The IEC 1131 standards were developed to be a common and openframework for PLC architecture, agreed to by many standards groupsand manufacturers.

They were initially approved in 1992, and since then they have beenreviewed as the IEC-61131 standards.The main components of the standard are:

IEC 61131-1 OverviewIEC 61131-2 Requirements and Test ProceduresIEC 61131-3 Data types and programming

IEC 61131-4 User GuidelinesIEC 61131-5 CommunicationsIEC 61131-6 Functional SafetyIEC 61131-7 Fuzzy controlIEC 61131-8 Guidelines for the application and implementation ofprogramming languages

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 8 / 1

Page 39: Industrial Control Systems - PLC

Programmable Logic Controllers

International Standard for PLC

The IEC 1131 standards were developed to be a common and openframework for PLC architecture, agreed to by many standards groupsand manufacturers.

They were initially approved in 1992, and since then they have beenreviewed as the IEC-61131 standards.The main components of the standard are:

IEC 61131-1 OverviewIEC 61131-2 Requirements and Test ProceduresIEC 61131-3 Data types and programmingIEC 61131-4 User Guidelines

IEC 61131-5 CommunicationsIEC 61131-6 Functional SafetyIEC 61131-7 Fuzzy controlIEC 61131-8 Guidelines for the application and implementation ofprogramming languages

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 8 / 1

Page 40: Industrial Control Systems - PLC

Programmable Logic Controllers

International Standard for PLC

The IEC 1131 standards were developed to be a common and openframework for PLC architecture, agreed to by many standards groupsand manufacturers.

They were initially approved in 1992, and since then they have beenreviewed as the IEC-61131 standards.The main components of the standard are:

IEC 61131-1 OverviewIEC 61131-2 Requirements and Test ProceduresIEC 61131-3 Data types and programmingIEC 61131-4 User GuidelinesIEC 61131-5 Communications

IEC 61131-6 Functional SafetyIEC 61131-7 Fuzzy controlIEC 61131-8 Guidelines for the application and implementation ofprogramming languages

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 8 / 1

Page 41: Industrial Control Systems - PLC

Programmable Logic Controllers

International Standard for PLC

The IEC 1131 standards were developed to be a common and openframework for PLC architecture, agreed to by many standards groupsand manufacturers.

They were initially approved in 1992, and since then they have beenreviewed as the IEC-61131 standards.The main components of the standard are:

IEC 61131-1 OverviewIEC 61131-2 Requirements and Test ProceduresIEC 61131-3 Data types and programmingIEC 61131-4 User GuidelinesIEC 61131-5 CommunicationsIEC 61131-6 Functional Safety

IEC 61131-7 Fuzzy controlIEC 61131-8 Guidelines for the application and implementation ofprogramming languages

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 8 / 1

Page 42: Industrial Control Systems - PLC

Programmable Logic Controllers

International Standard for PLC

The IEC 1131 standards were developed to be a common and openframework for PLC architecture, agreed to by many standards groupsand manufacturers.

They were initially approved in 1992, and since then they have beenreviewed as the IEC-61131 standards.The main components of the standard are:

IEC 61131-1 OverviewIEC 61131-2 Requirements and Test ProceduresIEC 61131-3 Data types and programmingIEC 61131-4 User GuidelinesIEC 61131-5 CommunicationsIEC 61131-6 Functional SafetyIEC 61131-7 Fuzzy control

IEC 61131-8 Guidelines for the application and implementation ofprogramming languages

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 8 / 1

Page 43: Industrial Control Systems - PLC

Programmable Logic Controllers

International Standard for PLC

The IEC 1131 standards were developed to be a common and openframework for PLC architecture, agreed to by many standards groupsand manufacturers.

They were initially approved in 1992, and since then they have beenreviewed as the IEC-61131 standards.The main components of the standard are:

IEC 61131-1 OverviewIEC 61131-2 Requirements and Test ProceduresIEC 61131-3 Data types and programmingIEC 61131-4 User GuidelinesIEC 61131-5 CommunicationsIEC 61131-6 Functional SafetyIEC 61131-7 Fuzzy controlIEC 61131-8 Guidelines for the application and implementation ofprogramming languages

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 8 / 1

Page 44: Industrial Control Systems - PLC

Programmable Logic Controllers

Allen-Bradley Pico Controllers

Rockwell Automation

Behzad Samadi (Amirkabir University) Industrial Control 9 / 1

Page 45: Industrial Control Systems - PLC

Programmable Logic Controllers

Allen-Bradley Pico Controllers

Rockwell Automation

Behzad Samadi (Amirkabir University) Industrial Control 10 / 1

Page 46: Industrial Control Systems - PLC

Programmable Logic Controllers

Allen-Bradley Pico Controllers

Rockwell Automation

Behzad Samadi (Amirkabir University) Industrial Control 11 / 1

Page 47: Industrial Control Systems - PLC

Programmable Logic Controllers

Allen-Bradley Pico Controllers

Rockwell Automation

Behzad Samadi (Amirkabir University) Industrial Control 12 / 1

Page 48: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens LOGO!

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 13 / 1

Page 49: Industrial Control Systems - PLC

Programmable Logic Controllers

LOGO! integrates:

Control functions

An operating and display unit

Power supply

An interface for program modules and a PC cable

Ready-to-use basic functions that are often required in day-to-dayoperation, such as functions for on/off delays and current impulserelays

Time switch

Binary markers

Inputs and outputs according to the device type

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 14 / 1

Page 50: Industrial Control Systems - PLC

Programmable Logic Controllers

What device types are available?There are LOGO! models for 12 V DC, 24 V DC, 24 V AC and 230 V ACas:

A standard variant with 6 inputs and 4 outputs with dimensions of 72x 90 x 55 mm

A variant without a display with 6 inputs and 4 outputs withdimensions of 72 x 90 x 55 mm

A variant with 8 inputs and 4 outputs with dimensions of 72 x 90 x55 mm

A long variant with 12 inputs and 8 outputs with dimensions of 126 x90 x 55 mm

A bus variant with 12 inputs and 8 outputs, and additional ASinterface bus connection, via which 4 further inputs and 4 furtheroutputs are available in the bus system. All this is packed intodimensions of 126 x 90 x 55 mm.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 15 / 1

Page 51: Industrial Control Systems - PLC

Programmable Logic Controllers

How to recognize which LOGO! model you have:LOGO!s designation contains information on various characteristics:

12: 12 V DC variant

24: 24 V DC variant

230: 115/230 V AC variant

R: Relay outputs (without R: Transistor output)

C: Integrated seven-day time switch

o: Variant without display

L: Twice the number of outputs and inputs

B11: slave with Actuator Sensor (AS) interface bus connection

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 16 / 1

Page 52: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens LOGO!

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 17 / 1

Page 53: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens LOGO! inputs and outputs

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 18 / 1

Page 54: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens LOGO! inputs

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 19 / 1

Page 55: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens LOGO! relay outputs

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 20 / 1

Page 56: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens LOGO! transistor outputs

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 21 / 1

Page 57: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 22 / 1

Page 58: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 23 / 1

Page 59: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Siemens AGBehzad Samadi (Amirkabir University) Industrial Control 24 / 1

Page 60: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Signal Modules (SM)

Digital input modules: 24V DC, 120/230V ACDigital output modules: 24V DC, RelayAnalog input modules: Voltage, current, resistance, thermocoupleAnalog output modules: Voltage, current

Interface Modules (IM): The IM360/IM361 and IM365 makemulti-tier configurations possible.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 25 / 1

Page 61: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Signal Modules (SM)Digital input modules: 24V DC, 120/230V AC

Digital output modules: 24V DC, RelayAnalog input modules: Voltage, current, resistance, thermocoupleAnalog output modules: Voltage, current

Interface Modules (IM): The IM360/IM361 and IM365 makemulti-tier configurations possible.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 25 / 1

Page 62: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Signal Modules (SM)Digital input modules: 24V DC, 120/230V ACDigital output modules: 24V DC, Relay

Analog input modules: Voltage, current, resistance, thermocoupleAnalog output modules: Voltage, current

Interface Modules (IM): The IM360/IM361 and IM365 makemulti-tier configurations possible.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 25 / 1

Page 63: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Signal Modules (SM)Digital input modules: 24V DC, 120/230V ACDigital output modules: 24V DC, RelayAnalog input modules: Voltage, current, resistance, thermocouple

Analog output modules: Voltage, current

Interface Modules (IM): The IM360/IM361 and IM365 makemulti-tier configurations possible.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 25 / 1

Page 64: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Signal Modules (SM)Digital input modules: 24V DC, 120/230V ACDigital output modules: 24V DC, RelayAnalog input modules: Voltage, current, resistance, thermocoupleAnalog output modules: Voltage, current

Interface Modules (IM): The IM360/IM361 and IM365 makemulti-tier configurations possible.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 25 / 1

Page 65: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Signal Modules (SM)Digital input modules: 24V DC, 120/230V ACDigital output modules: 24V DC, RelayAnalog input modules: Voltage, current, resistance, thermocoupleAnalog output modules: Voltage, current

Interface Modules (IM): The IM360/IM361 and IM365 makemulti-tier configurations possible.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 25 / 1

Page 66: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Dummy Modules (DM): The DM 370 dummy module reserves a slotfor a signal module whose parameters have not yet been assigned. Itcan also be used, for example, to reserve a slot for installation of aninterface module at a later date.

Function Modules (FM): Perform special functions”:

CountingPositioningClosed-loop control

Communication Processors (CP): Provide the following networkingfacilities:

Point-to-Point connectionsPROFIBUSIndustrial Ethernet.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 26 / 1

Page 67: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Dummy Modules (DM): The DM 370 dummy module reserves a slotfor a signal module whose parameters have not yet been assigned. Itcan also be used, for example, to reserve a slot for installation of aninterface module at a later date.

Function Modules (FM): Perform special functions”:

CountingPositioningClosed-loop control

Communication Processors (CP): Provide the following networkingfacilities:

Point-to-Point connectionsPROFIBUSIndustrial Ethernet.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 26 / 1

Page 68: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Dummy Modules (DM): The DM 370 dummy module reserves a slotfor a signal module whose parameters have not yet been assigned. Itcan also be used, for example, to reserve a slot for installation of aninterface module at a later date.

Function Modules (FM): Perform special functions”:

Counting

PositioningClosed-loop control

Communication Processors (CP): Provide the following networkingfacilities:

Point-to-Point connectionsPROFIBUSIndustrial Ethernet.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 26 / 1

Page 69: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Dummy Modules (DM): The DM 370 dummy module reserves a slotfor a signal module whose parameters have not yet been assigned. Itcan also be used, for example, to reserve a slot for installation of aninterface module at a later date.

Function Modules (FM): Perform special functions”:

CountingPositioning

Closed-loop control

Communication Processors (CP): Provide the following networkingfacilities:

Point-to-Point connectionsPROFIBUSIndustrial Ethernet.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 26 / 1

Page 70: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Dummy Modules (DM): The DM 370 dummy module reserves a slotfor a signal module whose parameters have not yet been assigned. Itcan also be used, for example, to reserve a slot for installation of aninterface module at a later date.

Function Modules (FM): Perform special functions”:

CountingPositioningClosed-loop control

Communication Processors (CP): Provide the following networkingfacilities:

Point-to-Point connectionsPROFIBUSIndustrial Ethernet.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 26 / 1

Page 71: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Dummy Modules (DM): The DM 370 dummy module reserves a slotfor a signal module whose parameters have not yet been assigned. Itcan also be used, for example, to reserve a slot for installation of aninterface module at a later date.

Function Modules (FM): Perform special functions”:

CountingPositioningClosed-loop control

Communication Processors (CP): Provide the following networkingfacilities:

Point-to-Point connectionsPROFIBUSIndustrial Ethernet.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 26 / 1

Page 72: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Dummy Modules (DM): The DM 370 dummy module reserves a slotfor a signal module whose parameters have not yet been assigned. Itcan also be used, for example, to reserve a slot for installation of aninterface module at a later date.

Function Modules (FM): Perform special functions”:

CountingPositioningClosed-loop control

Communication Processors (CP): Provide the following networkingfacilities:

Point-to-Point connections

PROFIBUSIndustrial Ethernet.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 26 / 1

Page 73: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Dummy Modules (DM): The DM 370 dummy module reserves a slotfor a signal module whose parameters have not yet been assigned. Itcan also be used, for example, to reserve a slot for installation of aninterface module at a later date.

Function Modules (FM): Perform special functions”:

CountingPositioningClosed-loop control

Communication Processors (CP): Provide the following networkingfacilities:

Point-to-Point connectionsPROFIBUS

Industrial Ethernet.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 26 / 1

Page 74: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Dummy Modules (DM): The DM 370 dummy module reserves a slotfor a signal module whose parameters have not yet been assigned. Itcan also be used, for example, to reserve a slot for installation of aninterface module at a later date.

Function Modules (FM): Perform special functions”:

CountingPositioningClosed-loop control

Communication Processors (CP): Provide the following networkingfacilities:

Point-to-Point connectionsPROFIBUSIndustrial Ethernet.

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 26 / 1

Page 75: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 27 / 1

Page 76: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 28 / 1

Page 77: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 29 / 1

Page 78: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 30 / 1

Page 79: Industrial Control Systems - PLC

Programmable Logic Controllers

Multipoint Interface (MPI)

Siemens AG

Behzad Samadi (Amirkabir University) Industrial Control 31 / 1

Page 80: Industrial Control Systems - PLC

Programmable Logic Controllers

Siemens S7-300

Siemens AGBehzad Samadi (Amirkabir University) Industrial Control 32 / 1

Page 81: Industrial Control Systems - PLC

Programmable Logic Controllers

PLC manufacturers:

ABB

Allen-Bradley

ALSTOM/Cegelec

Beck Electronic/Festo

Beckhoff

Bosch

Fisher & Paykel

Fuji Electric

GE-Fanuc

Hitachi

Honeywell

LG Industrial Systems

Matsushita (Europe)/Aromat

Mitsubishi

Omron

Rockwell Automation

Schneider Electric

Siemens/Moore Products

Toshiba

Yamatake

Yokogawa

Behzad Samadi (Amirkabir University) Industrial Control 33 / 1

Page 82: Industrial Control Systems - PLC

Programmable Logic Controllers

Selecting a PLC:

Number of I/Os

Kind of signals : digital or analog

Fieldbus system or standalone

Modular or compact

Operating voltage

Positive or negative triggerred input

Relay or transistor output

Operating systems

FESTO DIDACTIC

Behzad Samadi (Amirkabir University) Industrial Control 34 / 1

Page 83: Industrial Control Systems - PLC

Programmable Logic Controllers

LS Industrial Systems (lsis.biz)

Behzad Samadi (Amirkabir University) Industrial Control 35 / 1

Page 84: Industrial Control Systems - PLC

Programmable Logic Controllers

GLOFA - GM7:

Global standard (IEC61131-3) language: IL, LD, SFCVarious main module: 32 types

20(12in+8out)/30(18in+12out)/40(24in+16out)/60(36in+24out)pointsAC/DC power, DC input, Relay/Transistor output

Various expansion module: 24 typesDigital I/O 7 types, analog I/O 9 types, Communication I/F 6 types,option module 2 types

Batteryless BackupProgram backup: EEPROMData backup: Supercapacitor

LS Industrial Systems (lsis.biz)Behzad Samadi (Amirkabir University) Industrial Control 36 / 1

Page 85: Industrial Control Systems - PLC

Programmable Logic Controllers

LS Industrial Systems (lsis.biz)

Behzad Samadi (Amirkabir University) Industrial Control 37 / 1

Page 86: Industrial Control Systems - PLC

Programmable Logic Controllers

GLOFA GM4:

IEC standard programming: IL, LD, SFC

Max. I/O points: GM4A/B (2,048), GM4C (3,584)

Fast processing time with high-speed gate array

Fit for small-and medium-sized manufacturing line

In case of remote system configuration, large-scale control available

Cnet, DeviceNet, Fast Ethernet, Fnet, Profibus-DP, Rnet support

Downsizing and high performance/function

Special function modules

Analog I/O, PID, High-speed counter, Position control (APM), AT,TC, RTD, etc

LS Industrial Systems (lsis.biz)

Behzad Samadi (Amirkabir University) Industrial Control 38 / 1

Page 87: Industrial Control Systems - PLC

Programmable Logic Controllers

LS Industrial Systems (lsis.biz)

Behzad Samadi (Amirkabir University) Industrial Control 39 / 1

Page 88: Industrial Control Systems - PLC

Programmable Logic Controllers

GMWIN:

LS Industrial Systems (lsis.biz)

Behzad Samadi (Amirkabir University) Industrial Control 40 / 1

Page 89: Industrial Control Systems - PLC

Programmable Logic Controllers

LS Industrial Systems (lsis.biz)

Behzad Samadi (Amirkabir University) Industrial Control 41 / 1

Page 90: Industrial Control Systems - PLC

Programmable Logic Controllers

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 42 / 1

Page 91: Industrial Control Systems - PLC

Programmable Logic Controllers

Location and size prefix features for directly represented variables

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 43 / 1

Page 92: Industrial Control Systems - PLC

Programmable Logic Controllers

Input, Output, Memory Locations:

%QX75 and %Q75 - Output bit 75

%IW215 - Input word location 215

%QB7 - Output byte location 7

%MD48 - Double word at memory location 48

%Q* - Output at a not yet specified location

%IW2.5.7.1 - See explanation below

Depending on the manufacturer specifications, the variable %IW2.5.7.1may represent the first channel (word) of the seventh module in the fifthrack of the second I/O bus of a programmable controller system.[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 44 / 1

Page 93: Industrial Control Systems - PLC

Programmable Logic Controllers

Sequence Operation:

LS Industrial Systems (lsis.biz)

Behzad Samadi (Amirkabir University) Industrial Control 45 / 1

Page 94: Industrial Control Systems - PLC

Programmable Logic Controllers

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 46 / 1

Page 95: Industrial Control Systems - PLC

Programmable Logic Controllers

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 46 / 1

Page 96: Industrial Control Systems - PLC

Programmable Logic Controllers

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 47 / 1

Page 97: Industrial Control Systems - PLC

Programmable Logic Controllers

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 48 / 1

Page 98: Industrial Control Systems - PLC

Programmable Logic Controllers

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 49 / 1

Page 99: Industrial Control Systems - PLC

Programmable Logic Controllers

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 50 / 1

Page 100: Industrial Control Systems - PLC

Programmable Logic Controllers

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 51 / 1

Page 101: Industrial Control Systems - PLC

Programmable Logic Controllers

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 52 / 1

Page 102: Industrial Control Systems - PLC

Programmable Logic Controllers

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 53 / 1

Page 103: Industrial Control Systems - PLC

Programmable Logic Controllers

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 54 / 1

Page 104: Industrial Control Systems - PLC

Programmable Logic Controllers

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 55 / 1

Page 105: Industrial Control Systems - PLC

Programmable Logic Controllers

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 56 / 1

Page 106: Industrial Control Systems - PLC

Programmable Logic Controllers

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 57 / 1

Page 107: Industrial Control Systems - PLC

Programmable Logic Controllers

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 58 / 1

Page 108: Industrial Control Systems - PLC

Programmable Logic Controllers

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 59 / 1

Page 109: Industrial Control Systems - PLC

Programmable Logic Controllers

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 60 / 1

Page 110: Industrial Control Systems - PLC

Programmable Logic Controllers

Motor Start-Stop

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 61 / 1

Page 111: Industrial Control Systems - PLC

Programmable Logic Controllers

[Bolton, 2006]Behzad Samadi (Amirkabir University) Industrial Control 62 / 1

Page 112: Industrial Control Systems - PLC

Programmable Logic Controllers

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 63 / 1

Page 113: Industrial Control Systems - PLC

Programmable Logic Controllers

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 64 / 1

Page 114: Industrial Control Systems - PLC

Programmable Logic Controllers

Example: A signal lamp is required to be switched on if a pump is runningand the pressure is satisfactory, or if the lamp test switch is closed.

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 65 / 1

Page 115: Industrial Control Systems - PLC

Programmable Logic Controllers

Example: A signal lamp is required to be switched on if a pump is runningand the pressure is satisfactory, or if the lamp test switch is closed.

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 65 / 1

Page 116: Industrial Control Systems - PLC

Programmable Logic Controllers

Example: Consider a valve which is to be operated to lift a load when apump is running and either the lift switch is operated or a switch operatedindicating that the load has not already been lifted and is at the bottom ofits lift channel.

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 66 / 1

Page 117: Industrial Control Systems - PLC

Programmable Logic Controllers

Example: Consider a valve which is to be operated to lift a load when apump is running and either the lift switch is operated or a switch operatedindicating that the load has not already been lifted and is at the bottom ofits lift channel.

[Bolton, 2006]Behzad Samadi (Amirkabir University) Industrial Control 66 / 1

Page 118: Industrial Control Systems - PLC

Programmable Logic Controllers

Example: Consider a system where there has to be no output when anyone of four sensors gives an output, otherwise there is to be an output.

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 67 / 1

Page 119: Industrial Control Systems - PLC

Programmable Logic Controllers

Example: Consider a system where there has to be no output when anyone of four sensors gives an output, otherwise there is to be an output.

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 67 / 1

Page 120: Industrial Control Systems - PLC

Programmable Logic Controllers

Stop switches:

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 68 / 1

Page 121: Industrial Control Systems - PLC

Programmable Logic Controllers

Emergency stop switch:

[Bolton, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 69 / 1

Page 122: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

BOOL (Boolean): 0 or 1 - TRUE or FALSE

SINT (Short integer): −27 to 27 − 1

INT (Integer): −215 to 215 − 1

DINT (Double integer): −231 to 231 − 1

LINT (Long integer): −263 to 263 − 1

USINT (Unsigned short integer): 0 to 28 − 1

UINT (Unsigned integer): 0 to 216 − 1

UDINT (Unsigned double integer): 0 to 232 − 1

ULINT (Unsigned double integer): 0 to 264 − 1

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 70 / 1

Page 123: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

BOOL (Boolean): 0 or 1 - TRUE or FALSE

SINT (Short integer): −27 to 27 − 1

INT (Integer): −215 to 215 − 1

DINT (Double integer): −231 to 231 − 1

LINT (Long integer): −263 to 263 − 1

USINT (Unsigned short integer): 0 to 28 − 1

UINT (Unsigned integer): 0 to 216 − 1

UDINT (Unsigned double integer): 0 to 232 − 1

ULINT (Unsigned double integer): 0 to 264 − 1

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 70 / 1

Page 124: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

BOOL (Boolean): 0 or 1 - TRUE or FALSE

SINT (Short integer): −27 to 27 − 1

INT (Integer): −215 to 215 − 1

DINT (Double integer): −231 to 231 − 1

LINT (Long integer): −263 to 263 − 1

USINT (Unsigned short integer): 0 to 28 − 1

UINT (Unsigned integer): 0 to 216 − 1

UDINT (Unsigned double integer): 0 to 232 − 1

ULINT (Unsigned double integer): 0 to 264 − 1

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 70 / 1

Page 125: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

BOOL (Boolean): 0 or 1 - TRUE or FALSE

SINT (Short integer): −27 to 27 − 1

INT (Integer): −215 to 215 − 1

DINT (Double integer): −231 to 231 − 1

LINT (Long integer): −263 to 263 − 1

USINT (Unsigned short integer): 0 to 28 − 1

UINT (Unsigned integer): 0 to 216 − 1

UDINT (Unsigned double integer): 0 to 232 − 1

ULINT (Unsigned double integer): 0 to 264 − 1

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 70 / 1

Page 126: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

BOOL (Boolean): 0 or 1 - TRUE or FALSE

SINT (Short integer): −27 to 27 − 1

INT (Integer): −215 to 215 − 1

DINT (Double integer): −231 to 231 − 1

LINT (Long integer): −263 to 263 − 1

USINT (Unsigned short integer): 0 to 28 − 1

UINT (Unsigned integer): 0 to 216 − 1

UDINT (Unsigned double integer): 0 to 232 − 1

ULINT (Unsigned double integer): 0 to 264 − 1

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 70 / 1

Page 127: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

BOOL (Boolean): 0 or 1 - TRUE or FALSE

SINT (Short integer): −27 to 27 − 1

INT (Integer): −215 to 215 − 1

DINT (Double integer): −231 to 231 − 1

LINT (Long integer): −263 to 263 − 1

USINT (Unsigned short integer): 0 to 28 − 1

UINT (Unsigned integer): 0 to 216 − 1

UDINT (Unsigned double integer): 0 to 232 − 1

ULINT (Unsigned double integer): 0 to 264 − 1

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 70 / 1

Page 128: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

BOOL (Boolean): 0 or 1 - TRUE or FALSE

SINT (Short integer): −27 to 27 − 1

INT (Integer): −215 to 215 − 1

DINT (Double integer): −231 to 231 − 1

LINT (Long integer): −263 to 263 − 1

USINT (Unsigned short integer): 0 to 28 − 1

UINT (Unsigned integer): 0 to 216 − 1

UDINT (Unsigned double integer): 0 to 232 − 1

ULINT (Unsigned double integer): 0 to 264 − 1

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 70 / 1

Page 129: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

BOOL (Boolean): 0 or 1 - TRUE or FALSE

SINT (Short integer): −27 to 27 − 1

INT (Integer): −215 to 215 − 1

DINT (Double integer): −231 to 231 − 1

LINT (Long integer): −263 to 263 − 1

USINT (Unsigned short integer): 0 to 28 − 1

UINT (Unsigned integer): 0 to 216 − 1

UDINT (Unsigned double integer): 0 to 232 − 1

ULINT (Unsigned double integer): 0 to 264 − 1

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 70 / 1

Page 130: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

BOOL (Boolean): 0 or 1 - TRUE or FALSE

SINT (Short integer): −27 to 27 − 1

INT (Integer): −215 to 215 − 1

DINT (Double integer): −231 to 231 − 1

LINT (Long integer): −263 to 263 − 1

USINT (Unsigned short integer): 0 to 28 − 1

UINT (Unsigned integer): 0 to 216 − 1

UDINT (Unsigned double integer): 0 to 232 − 1

ULINT (Unsigned double integer): 0 to 264 − 1

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 70 / 1

Page 131: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

STRING: 8 bits per character

BYTE: Bit string of length 8

WORD: Bit string of length 16

DWORD: Bit string of length 32

LWORD: Bit string of length 64

WSTRING: Variable-length double-byte character string

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 71 / 1

Page 132: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

STRING: 8 bits per character

BYTE: Bit string of length 8

WORD: Bit string of length 16

DWORD: Bit string of length 32

LWORD: Bit string of length 64

WSTRING: Variable-length double-byte character string

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 71 / 1

Page 133: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

STRING: 8 bits per character

BYTE: Bit string of length 8

WORD: Bit string of length 16

DWORD: Bit string of length 32

LWORD: Bit string of length 64

WSTRING: Variable-length double-byte character string

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 71 / 1

Page 134: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

STRING: 8 bits per character

BYTE: Bit string of length 8

WORD: Bit string of length 16

DWORD: Bit string of length 32

LWORD: Bit string of length 64

WSTRING: Variable-length double-byte character string

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 71 / 1

Page 135: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

STRING: 8 bits per character

BYTE: Bit string of length 8

WORD: Bit string of length 16

DWORD: Bit string of length 32

LWORD: Bit string of length 64

WSTRING: Variable-length double-byte character string

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 71 / 1

Page 136: Industrial Control Systems - PLC

Programmable Logic Controllers

Elementary Data Types:

STRING: 8 bits per character

BYTE: Bit string of length 8

WORD: Bit string of length 16

DWORD: Bit string of length 32

LWORD: Bit string of length 64

WSTRING: Variable-length double-byte character string

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 71 / 1

Page 137: Industrial Control Systems - PLC

Programmable Logic Controllers

Timers:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 72 / 1

Page 138: Industrial Control Systems - PLC

Programmable Logic Controllers

ON Delay Timers:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 73 / 1

Page 139: Industrial Control Systems - PLC

Programmable Logic Controllers

ON Delay Timers:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 74 / 1

Page 140: Industrial Control Systems - PLC

Programmable Logic Controllers

OFF Delay Timers:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 75 / 1

Page 141: Industrial Control Systems - PLC

Programmable Logic Controllers

OFF Delay Timers:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 76 / 1

Page 142: Industrial Control Systems - PLC

Programmable Logic Controllers

Pulse Timers:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 77 / 1

Page 143: Industrial Control Systems - PLC

Programmable Logic Controllers

Pulse Timers:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 78 / 1

Page 144: Industrial Control Systems - PLC

Programmable Logic Controllers

Example: Write a program such that:

Lecture Notes by Nazarian

Behzad Samadi (Amirkabir University) Industrial Control 79 / 1

Page 145: Industrial Control Systems - PLC

Programmable Logic Controllers

Solution:

Lecture Notes by Nazarian

Behzad Samadi (Amirkabir University) Industrial Control 80 / 1

Page 146: Industrial Control Systems - PLC

Programmable Logic Controllers

Example: Write a program such that:

Lecture Notes by Nazarian

Behzad Samadi (Amirkabir University) Industrial Control 81 / 1

Page 147: Industrial Control Systems - PLC

Programmable Logic Controllers

Solution:

Lecture Notes by Nazarian

Behzad Samadi (Amirkabir University) Industrial Control 82 / 1

Page 148: Industrial Control Systems - PLC

Programmable Logic Controllers

Up Counter:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 83 / 1

Page 149: Industrial Control Systems - PLC

Programmable Logic Controllers

Down Counter:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 84 / 1

Page 150: Industrial Control Systems - PLC

Programmable Logic Controllers

Up-down Counter:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 85 / 1

Page 151: Industrial Control Systems - PLC

Programmable Logic Controllers

Example: A motor will be controlled by two switches. The Go switch willstart the motor and the Stop switch will stop it. If the Stop switch wasused to stop the motor, the Go switch must be thrown twice to start themotor. When the motor is active a light should be turned on. The Stopswitch will be wired as normally closed.

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 86 / 1

Page 152: Industrial Control Systems - PLC

Programmable Logic Controllers

Example: A motor will be controlled by two switches. The Go switch willstart the motor and the Stop switch will stop it. If the Stop switch wasused to stop the motor, the Go switch must be thrown twice to start themotor. When the motor is active a light should be turned on. The Stopswitch will be wired as normally closed.

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 86 / 1

Page 153: Industrial Control Systems - PLC

Programmable Logic Controllers

Example: Consider the task of counting cars as they enter a multi-storageparking lot and as they leave it. An output is to be triggered if the numberof cars entering is some number greater than the number leaving, i.e. thenumber in the parking lot has reached a saturation value.

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 87 / 1

Page 154: Industrial Control Systems - PLC

Programmable Logic Controllers

Example: Consider the task of counting cars as they enter a multi-storageparking lot and as they leave it. An output is to be triggered if the numberof cars entering is some number greater than the number leaving, i.e. thenumber in the parking lot has reached a saturation value.

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 87 / 1

Page 155: Industrial Control Systems - PLC

Programmable Logic Controllers

Timers with counters:

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 88 / 1

Page 156: Industrial Control Systems - PLC

Programmable Logic Controllers

Question:

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 89 / 1

Page 157: Industrial Control Systems - PLC

Programmable Logic Controllers

Instruction list:

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 90 / 1

Page 158: Industrial Control Systems - PLC

Programmable Logic Controllers

Instruction list:

[Jack, 2008]Behzad Samadi (Amirkabir University) Industrial Control 91 / 1

Page 159: Industrial Control Systems - PLC

Programmable Logic Controllers

Instruction list:

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 92 / 1

Page 160: Industrial Control Systems - PLC

Programmable Logic Controllers

Structured text is a programming language that strongly resembles theprogramming language PASCAL.

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 93 / 1

Page 161: Industrial Control Systems - PLC

Programmable Logic Controllers

Structured text:

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 94 / 1

Page 162: Industrial Control Systems - PLC

Programmable Logic Controllers

Structured text:

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 95 / 1

Page 163: Industrial Control Systems - PLC

Programmable Logic Controllers

Structured text:

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 96 / 1

Page 164: Industrial Control Systems - PLC

Programmable Logic Controllers

Sequential Function Chart (SFC):

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 97 / 1

Page 165: Industrial Control Systems - PLC

Programmable Logic Controllers

Sequential Function Chart (SFC):

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 98 / 1

Page 166: Industrial Control Systems - PLC

Programmable Logic Controllers

Sequential Function Chart (SFC):

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 99 / 1

Page 167: Industrial Control Systems - PLC

Programmable Logic Controllers

Sequential Function Chart (SFC):Example: A two door security system. One door requires a two digit entrycode, the second door requires a three digit entry code.

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 100 / 1

Page 168: Industrial Control Systems - PLC

Programmable Logic Controllers

Sequential Function Chart (SFC):Example: Controlling a stamping press

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 101 / 1

Page 169: Industrial Control Systems - PLC

Programmable Logic Controllers

Sequential Function Chart (SFC):

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 102 / 1

Page 170: Industrial Control Systems - PLC

Programmable Logic Controllers

Sequential Function Chart (SFC):Sequence evolution:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 103 / 1

Page 171: Industrial Control Systems - PLC

Programmable Logic Controllers

Sequential Function Chart (SFC):Sequence evolution:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 104 / 1

Page 172: Industrial Control Systems - PLC

Programmable Logic Controllers

Sequential Function Chart (SFC):Sequence evolution:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 105 / 1

Page 173: Industrial Control Systems - PLC

Programmable Logic Controllers

Sequential Function Chart (SFC):Sequence evolution:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 106 / 1

Page 174: Industrial Control Systems - PLC

Programmable Logic Controllers

Sequential Function Chart (SFC):Sequence evolution:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 107 / 1

Page 175: Industrial Control Systems - PLC

Programmable Logic Controllers

Sequential Function Chart (SFC):Sequence evolution:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 108 / 1

Page 176: Industrial Control Systems - PLC

Programmable Logic Controllers

Sequential Function Chart (SFC):Sequence evolution:

[IEC, 2003]

Behzad Samadi (Amirkabir University) Industrial Control 109 / 1

Page 177: Industrial Control Systems - PLC

Programmable Logic Controllers

Function Block Diagram (FBD):

[Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 110 / 1

Page 178: Industrial Control Systems - PLC

Programmable Logic Controllers

Function Block Diagram (FBD):

Boolean NOT, AND, OR [Jack, 2008]

Behzad Samadi (Amirkabir University) Industrial Control 111 / 1

Page 179: Industrial Control Systems - PLC

(2002).Programmable Logic Controllers: Basic Level.FESTO.

(2003).IEC 61131-3 programmable controllers - part 3: Programminglanguages.

Bolton, W. (2006).Programmable Logic Controllers.Newnes, 4 edition.

Jack, H. (2008).Automating Manufacturing Systems with PLCs.Grand Valley State University, MI, 5.2 edition.

Behzad Samadi (Amirkabir University) Industrial Control 111 / 1