0% found this document useful (0 votes)
9 views48 pages

Course and Example

This document provides an introduction to Programmable Logic Controllers (PLCs), detailing their hardware components, software functionalities, and operational principles. It covers the design, types, and tasks of PLCs, as well as programming languages and structures used in PLC programming. The document serves as a basic course material for understanding PLCs in industrial automation environments.

Uploaded by

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

Course and Example

This document provides an introduction to Programmable Logic Controllers (PLCs), detailing their hardware components, software functionalities, and operational principles. It covers the design, types, and tasks of PLCs, as well as programming languages and structures used in PLC programming. The document serves as a basic course material for understanding PLCs in industrial automation environments.

Uploaded by

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

Step7

Programmable logic controllers


Part 1 - Introduction
PLC basic course
Fest AG

October 2004
Introduction Hardware Software

Table of contents

Introduction
Hardware
Design
Manufacturer
Function
Software
Mode of operation
Variables
Program structures

2
Introduction Hardware Software

General description
„ Features:
Data capture
„ Collection of analogue values (flow rate, temperatures,
„ positions as well as e.g. speeds of drives, frequency
„ converters)
„ Collection of digital signals (e.g. pressure switch or
„ feedback signals from drives)

Control
„ frequency converters / positioning drives / rolls etc.

Visualization
„ OPs (e.g. OP170 with Pro-Tool)
„ PCs (e.g. standard PC with WinCC, LabView, Intouch)

3
Introduction Hardware Software

General description

„ PLC tasks:

ƒ Measuring
ƒ Controlling
ƒ Feedback controlling

4
Introduction Hardware Software

General description
Definition PLC: Small computers with automation functions in
industrial environments

Formerly: relais controls, pneumatic and hydraulic


valves / controllers
¾hardwired programmed or wired programmed!
Fixed programming given by wiring, or free
programming by changeable connexions.

Today: Highly specialized computers with controlling and


feedback controlling
¾Stored-program! Free programming by
RAM memory, reprogrammable by EPROM
Memory or replacement programmable by
PROM- and ROM- memory.

5
Introduction Hardware Software

HPC PLC
Hardwired programmed vs. Programmable logic controller

S1 S4 K1 K1 S1 S4 S2 S3

S2
Automation unit

S3

K1 H1 H1

Function change by:


Rewiring Reprogramming
6
Introduction Hardware Software

Table of contents

Introduction
Hardware
Design
Function
Software
Mode of operation
Variables
Program structures

7
Introduction Hardware Software

Basic design of PLC

8
Introduction Hardware Software

Why different types of PLCs?

„ - processor speed
„ - addressability
„ - memory

„ - plant size

9
Introduction Hardware Software

Design
Power supply

CPU modules

Input modules

Output modules

Communication modules

Function modules

Operating units

10
Introduction Hardware Software

Power supply

-provides internal supply voltage for the individual


components
-designed for power supply of controllers, and not for
signal and actuating elements
- Permanent surveillance of voltage with regard to
overvoltage or undervoltage
- additional converters for power rating units if
necessary
- Battery for memory buffering

11
Introduction Hardware Software

CPU modules

• processor

• memory

• EPROM with program (optional)

• programming interface (optional)

12
Introduction Hardware Software

Input modules

• digital inputs

• analogue inputs

• special inputs for:


temperature sensor
resistance measurement
etc.

13
Introduction Hardware Software

output modules

• digital outputs

• analogue outputs

• relais outputs

14
Introduction Hardware Software

Communication modules

• field busses (ASI, profibus ...)

• Industrial Ethernet, TCP/IP

• programming interfaces

• serial interfaces (RS422, RS485 ...)

15
Introduction Hardware Software

Function modules

• positioning units

• control units

• counter units

• timepiece units

• image evaluation module

• etc.

16
Introduction Hardware Software

Operating units

• Operator Panels

• Touch Screens

• Text Displays

• Keyboards

17
Introduction Hardware Software

Structure automation system


PC PC
Station 1 Station 2

comm. bus system


(e.g. Ethernet)

SPC SPC

COM
COM

CPU
CPU

COM

I/O
I/O
I/O

I/O
I/O
I/O

I/O
I/O

I/O

field bus

COM
COM

COM
CPU

CPU
I/O

I/O
I/O

I/O

I/O
I/O

I/O
input and output
decentral periphery

sensors bus system (e.g. ASI)


18
Introduction Hardware Software

Basic design of PLC

Data flow

Data input Data processing Data output

Signal Adaption Processing Amplification Output


input

Power supply

19
Introduction Hardware Software

Design of PLC
Programmable controller

Signal
generator Inputs Central unit Outputs Positioner

Program memory

Control unit

Timing
Flag
elements

Process Counter
image

Accu Address and


Data bus

Central power supply


Power supply for Power supply for
signal generator actuating elements,
signal lamps

20
Introduction Hardware Software

Table of contents

Introduction
Hardware
Design
Manufacturer
Function
Software
Mode of operation
Variables
Program structures

21
Introduction Hardware Software

PLC program flow

22
Introduction Hardware Software

Cycle time PLC

serial processing of instructions


Time need for processing the program: cycle time
depends on program length and microprocessor pulse frequency of PLC
used
also depends on program structure and efficiency of program
Performance characteristic of PLC, indicate in milliseconds per 1 K
(1024 binary instructions).
Example: PLC with a cycle time of 20 msec /1 K instructions, program 5
kbyte, PII is updated during a time slice of about 100 ms.
Processor does not work with the real inputs and outputs, but only with
copies of signal conditions (updated at the beginning / end of a cycle)

23
Introduction Hardware Software

Process image of inputs and outputs

Inputs

0 1 PII 1

Read inputs
Times
Counters
Flags

Process
program Alarm
program
e.g.
time,
process
alarm

Write outputs
Processor Program memory
0 1 PIO 1

Outputs

24
Introduction Hardware Software

Information processing terms

Value (condition) “0“ or “1“

1 BIT

7 6 5 4 3 2 1 0
1 BYTE = 8 Bits

15 8 7 0
1 word = 16 Bits = 2 Bytes

Byte Byte

25
Introduction Hardware Software

Bit-, Byte, word address

7 6 5 4 3 2 1 0

BIT ADRESS .0 ... .7

E1.7 E1.6 E1.5 E1.4 E1.3 E1.2 E1.1 E1.0

7 6 5 4 3 2 1 0

BYTE ADRESS E1.0 ... E1.7

WORD ADRESS EW0 EW2

EB0 EB1 EB2 EB3

EW1

26
Introduction Hardware Software

Number formats

binary
decimal
hexadecimal

27
Introduction Hardware Software

Decimal numbers

base = 10
figures: 0 . . . 9

e.g.: 234510
= 2 • 10 3 + 3 • 10 2 + 4 • 10 + 5
= 2 • 1000 + 3 • 100 + 4 • 10 + 5
= 2000 + 300 + 40 + 5

28
Introduction Hardware Software

Binary numbers
base = 2
figures: 0 . . 1

e.g.: 1001012
=1•25+0•24+0•23+1•22+0•2+1
= 1 • 32 + 0 • 16 + 0 • 8 + 1 • 4 + 0 • 2 + 1
= 32 + 4 + 1
= 3710

29
Introduction Hardware Software

Hexadecimal numbers
base = 16
figures: 0 . . . 9 A B C D E F
A=10, B=11, C=12, D=13, E=14, F=15

e.g.: FEDC16
= 15 • 16 3 + 14 • 16 2 + 13 • 16 + 12
= 15 • 4096 + 14 • 256 + 13 • 16 + 12
= 61440 + 3584 + 208 + 12
= 6524410

30
Introduction Hardware Software

Control instruction

Control instruction
(smallest unit in the user program)

U E 1.0

Operation part Operand part


(What has to be (What can it be done with?)
done?)
U E 1.0

Operand Parameter
characteristic

E 1.0

Byte adress Bit adress

31
Introduction Hardware Software

Variable declaration
A 7.3 address of variable

single-bit value
I Input B Byte (8 Bit)-value
O Output W Word (16 Bit)-value
F Flag D Double word (32 Bit)-value
DM Data module

Bit: E40.5 - A40.2 - M40.1 - DB1.DBX40.7


Byte: EB24 - AB24 - MB24 - DB1.DBB24
Word: EW8 - AW8 - MW8 - DB1.DBW8
Real: ED12 - AD12 - MD12 - DB1.DBD12

32
Introduction Hardware Software

Programming languages
IEC 1131 basically states 5 programming languages,
which can be divided into 2 groups:

1.Text-based 2.Graphical
Instruction Set (IS) Contact Plan (COP)

Structured Text (ST) Function Block Language (FBL)

Sequential Function Chart (SFC)

33
Introduction Hardware Software

Contact Plan (COP)

-functions represented by circuit symbols


(normally open contacts, normally closed contacts)
- packatised to networks similar to a circuit diagram
- basically restricted to binary signals

- Source: Relais wiring

34
Introduction Hardware Software

Contact Plan (COP)


Flow sheet Contact plan

S1 = E1.0 E1.0 E1.1 A2.0

S2 = E1.1

H1 = A2.0

- Representation of input variables as switch contacts


- coil turns on as result of a combination

35
Introduction Hardware Software

Instruction Set (IS)

„ universally applicable machine language


„ comparable with assembler
„ most common
„ little options for a structured programming

36
Introduction Hardware Software

Instruction Set (IS)

Flow sheet Instruction set

S1 = E1.0 U E 1 0
U E 1 1
= A 2 0
S2 = E1.1

H1 = A2.0

37
Introduction Hardware Software

Example for IS
One instruction is composed as follows:

jump label: Operator Operand (*comment*)

L E 0.1 (*Load input 0.1 into Accu *)


O E 0.2 (*Accu = Accu or input 0.2 *)
O A 1.1 (*Accu=Accu or output 1.1 *)
U E 0.3 (*Accu=Accu and input 0.3 *)
U E 0.4 (*Accu=Accu and input 0.4 *)
= A 1.1 (*output 1.1=Accu *)

38
Introduction Hardware Software

Structured Text (ST)


- C-like, high level language, uses abstract commands unlike machine-
oriented IS
Advantages:
very compact wording
Clear set-up, because of instruction blocks
Extensive and complex tasks practicable
Disadvantages:
Transformation into machine-code cannot be influenced directly, as it is generated
by compiler
loss in efficiency by higher level of abstraction (as a rule ST-Code is more slowly
than IS-Code)

39
Introduction Hardware Software

Examples for ST
Example 1:
Q1.1:=(I0.1 OR I0.2 OR Q1.1) AND I0.3 AND I0.4;

Example 2:
IF (I0.1 OR I0.2 OR Q1.1) THEN
IF (I0.3 AND I0.4) THEN
Q1.1:=1;
ELSE
Q1.0:=0;
END_IF;
END_IF;

40
Introduction Hardware Software

Sequence Control (SC)

„ Industrial automation tasks can easily be divided into


single steps.
„ SC offers tools for structuring, in order to organise the
PLC program in steps.
„ Transition from one step to one or more (parallel)
following steps is done by a transition condition.
„ The actions effected during the single steps as well as
the transitions are performed in one of the above -
mentioned languages.

41
Introduction Hardware Software

Example for SC
I0.1 Step 0
S0
R Q1.1
I0.2 I0.3 I0.4
T0
I0.3 Step 1
S1
S Q1.1
I0.4
T1

S0

42
Introduction Hardware Software

Function Plan (FUP/FBS)

„ instead of relais diagram symbols of digital circuits are


used

„ well structured and clear programming is possible

„ Operations in whole numbers / with floating point are


graphically and clearly possible

43
Introduction Hardware Software

Function Plan (FUP)

Flow sheet Function plan

S1 = E1.0 E1.0 &


A2.0
E1.1

S2 = E1.1

H1 = A2.0

44
Introduction Hardware Software

Basic program structure

1. program (PROG,OB): main program, allocation of periphery


and global variables,...

2. Function Block (FB): Block with input, output and static


variables (with memory)

3. Function (FUN, FC): subprogram with input and output


variables (without memory)

45
Introduction Hardware Software

Linear and structured program processing

Linear programming Structured programming

OB1 OB1 FB FB FC

FB FB FB

FB FC FC

Level 0 Level 0 Level 1 Level 2 Level 3

46
Introduction Hardware Software

Call of program module

Calling program module


(OB, FB, FC)

Program Program
processing processing

Operation that calls a


different program module

End of program module

47

You might also like