You are on page 1of 51

Mechatronics and control for

production plants
Programmable logic controllers (PLC) and Motion Control
(MC)

Lecture 3

Prof. Dr.-Ing. Christian Brecher


Jerome Flender, M.Sc.
Source: PhoenixContact

WZL/Fraunhofer IPT

Agenda
1

Fundamentals of information processing

Programmable logic controllers (PLCs)

WZL/Fraunhofer IPT

Slide 1

Representation of a logic network

Circuit diagram

Signal flow
Signalfluss

Inputs
Eingnge

WZL/Fraunhofer IPT

EI11
EI22
.
.
EImm

O11
A
O22
A
Logic
network
Logiknetzwerk

.
.
Onn
A

Outputs
Ausgnge

Slide 2

Logic functions and symbols


Notation nach DIN 66000

Symbol

Truth table

AND
AB=F

NOT
A=F

OR
A+B=F

A
&
B

WZL/Fraunhofer IPT

A
1
B

NAND
AB=F

NOR
A+B=F

&

A
&
B

A
1

Slide 3

Combinations of two input variables A and B


Inputs

Possible output function Fi

Meaning

F1

Never

Expression

Name

F1

F2

F3

F4

F5

F6

F7

F8

F9

F2

A and B

F3

A and not B

F4

Equal A

F5

B and not A

F6

Equal B

F7

A not equal B

XOR

F8

At least one

OR

F9

Not A nor B

NOR

F10

A equal B

XNOR

F11

Not B

F12

A or not B

F13

Not A

F14

B or not A

F15

Not one

F16

Always

Logic symbol

WZL/Fraunhofer IPT

F10 F11 F12 F13 F14 F15 F16

Function

AND

NAND

Slide 4

Theorems of Boolean Algebra


1

X+1=1

X+X=1

X+Y+Z= X+Y +Z=X+ Y+Z

1'

X 0=0

6'

X X=0

9'

XYZ = XY Z = X YZ

X+0=X

X + XY = X

10

XY + XZ = X Y + Z

2'

X 1=X

7'

X X+Y =X

10'

X + Y X + Z = X + YZ

X+X=X

X + Y Y = XY

11

X+Y Y+Z Z+X = X+Y Z+X

3'

X X=X

8'

XY + Y = X + Y

11'

XY + YZ + ZX = XY + XZ

X =X

12

X + Y X + Z =XZ + XY

4'

X=X

X+Y=Y+X

13

X+Y+Z =X Y Z

5'

X Y=Y X

13'

X Y Z =X+Y+Z

WZL/Fraunhofer IPT

Associative
law

Distributive
law

De Morgan
law

Slide 5

Truth table and disjunctive normal form


Complete disjunctive normal form for F1:

Truth table
Inputs

WZL/Fraunhofer IPT

Outputs

F1

F2

F1 = ABC + ABC + ABC + ABC + ABC


Derived simplified disjunctive normal form:

Theorem:

F1 = ABC + ABC + ABC + ABC + ABC


F1 = ABC + A BC + BC + BC + BC

(10)

F1 = ABC + A B C + C + B C + C

(10)

F1
F1
F1
F1

(6)
(2')

= ABC + A B 1+ B 1
= ABC + A B + B
= ABC + A
= BC + A

(8')

F2 = A C + B

Slide 6

Karnaugh-Veitch-map for two and three input variables

Karnaugh-Veitch-map

1
4

0
3

Nr.

F=A+B

4
F1 =

Karnaugh-Veitch-map

Truth table

A + B

A
B

0
4

0
6

0
2

C
F2 =

WZL/Fraunhofer IPT

1
5

2 input variables A, B
with F1 = A OR B

Truth table

A + BC

Nr.

F1

3 input variables A, B and C


with F2 = A OR (B AND C)

Slide 7

Karnaugh-Veitch-map for 4 input variables


Karnaugh-Veitch-map

Truth table

entspricht
A

0
13

B
1

15

1
14

12

1
6

0
4

1
11

D
5

0
9

WZL/Fraunhofer IPT

1
7

16

10

1
3

F3 =

BD + AD

Nr.

10

11

12

13

14

15

16

Slide 8

Different approaches for logical circuits


F = ABC + ABC+ ABC + ABC + ABC

Complete
disjunctive normal form

Switching contacts
A

or:

Circuit diagram
B

Switching contacts

Semiconductor elements

A
F

F = BC + A

Simplified
disjunctive normal form

Truth table

&

B
B
+

WZL/Fraunhofer IPT

Slide 9

Picture and function of a relais


Picture of a relay
(fourfold change-over switch)

Contactconnectors

Contacts
(4 change-over
switches)
Insulated
switching bar
Switching lever

Moving
armature
Coil
connectors

A2
E
A1
( A 2 )

Link

Insulated body

Principle of a relay
(single change-over switch)

Magnetic
circuit
Coil care

Switching voltage

Symbolic
representation

WZL/Fraunhofer IPT

Slide 10

Different ways to realize a Flip-Flop memory

Logic symbol

Circuit diagram
R

1
S

Q
FF

Signal chart

Truth table

not def.

t
R

Semiconductor circuit

Relais circuit
+

+
R1

D3

D1

D4
R3

D2
S

t
Q

R2

R3

WZL/Fraunhofer IPT

Slide 11

D-Flip-Flop

&

Truth table

Logic symbol

&

&

&
D

Q
&

&

WZL/Fraunhofer IPT

X = Dont care

Circuit diagram

Slide 12

The 1:2 scaler

Logic symbol

Circuit diagram

1
T
D
T

1
Q
0

1
Q
0

WZL/Fraunhofer IPT

Slide 13

Agenda
1

Fundamentals of information processing

Programmable logic controllers (PLCs)

WZL/Fraunhofer IPT

Slide 14

Schematic structure of an electrical control and flow of signals


Process defintion (DIN 66201):
A technical process is a process, whose physical values can be captured and affected by
using technical resources.

Automation
system

Control
Signal modulation

Signal processing

Signal modulation
(ampification)

&
Human leads and coordinates the informationand communicationsystem of the technical
process

Technical
task

WZL/Fraunhofer IPT

Actuator layer

Input layer
signalflow
Push Button

Switch Photo-electric relay

M
Valve

Motor

Lamp

Display

Production system

Slide 15

Process computer to automatise technical processes


origin:

Classical process computer as mini-computer with a suitable extension:


Interfaces to adapt to the technical process
Real-time operating system

Process computer systems are digital, programmable devices


The development in the semiconductor technology enabled the

miniaturization and the specialization in a different ranges of applications


Microcomputer

Robot control

CNC-control
Process
computer

Industrial PC
PLC

PC-workstation
WZL/Fraunhofer IPT

Slide 16

Hardware components of a processor


Digital processor with hard-

and software extension:


Process interfacing
Operating system including
real time behaviour
The response time of a
processor must be smaller
than the process-related
machining time
Use of a real time clock to
synchronize the processor
task and the technical
process

analogue/
digital
signals

analogue/
digital
signals

Switches

Valve
Output
ports

Input
ports

Push buttons

Photo-electric
relay

Central
processing
unit

Lamp

ROM

RAM

CPU
(Word-, Bitprocessor

EPROM

Computer
interface

Motor

Display

Power
supply

e.g. RS 485
Bus system

WZL/Fraunhofer IPT

Slide 17

Processor historical evolution


Conventional control with a control element (mechanic, electric, electronic, pneumatic,

hydraulic)
Composition of the control elements:
The connection (e.g. wiring) of the control elements affects the behaviour of the control
( Program) hard wired controls (HWC)
1970 tradeshow for machine tools in Chicago: presentation of the first programmable logical

control
Range of
service

IPC: Industrial-PC
PCS: Process Computer System
PLC: Programmable Logic Controller
PR: Processor
HWC: Hard Wired Controls

t
WZL/Fraunhofer IPT

Slide 18

Comparison HWC- and PLC


Hard-wired controls (HWC)
electrical
engineering

Coding: hardware (wiring)


a1 S1

Technology: electro mechanic (Relay), cordless (semiconductor)


Suitable for simple applications

S2

Mode of operation: faster than PLC because of parallel


A1

programme processing
HWC in safety critical applications
Low-level applications reduce complexity for trouble shooting
Comply with current safety rules

software
engineering

Programmable logic controller (PLC)


Coding: software (single instruction)
Technology: contact less (semiconductor, microcontroller)
Mode of operation: serial program processing

More flexible and higher performance


Cheaper and clearer than HWC for high significant

applications
WZL/Fraunhofer IPT

Slide 19

PLC configuration and type

Hardware-PLC:
power supply, CPU, digital/analogue In- and Outputs
fieldbus or proprietary bus system

e.g. MPI (mulitple point interface, Siemens)


communication, programming interface

Slot-PLC:

independent of the operating system


hard real time conditions possible
low failure ratio
direct access to the host-PC
high arithmetical capacity

Soft-PLC:

WZL/Fraunhofer IPT

PLC based on Windows-NT


soft real time conditions
higher error risk
short live span
Slide 20

Programmable controller: Modular design


Device
truss

SIEMENS

S7-300

Memory module
(CF-Card)

Back plane bus

Module system
Control mode
(e.g. RUN/STOP)

Interface connection
for further devices

Device components:
Digital In-/Outputs
Analogue In-/Outputs
Positioning device
Counter device
Communication
device

Adapter for
power supply
Communication device
Industrial Ethernet

IndraControl

L40

Connection for
fieldbus (Profibus DP)
Signal state
display (LED)

Wago-System

Connection for a
programming device

Think I/O
Ethernet Profibus
digital and analogue
In-/Output component
Connection operator panel
Source: SIEMENS, BoschRexroth, Wago
WZL/Fraunhofer IPT

Slide 21

Programmable controller: Modular design


Baugruppentrger

SIEMENS

Siemens, Engineering Step7: Hardware configuration


Speichermodul

S7-300

(CF-Card)

Rckwandbus

Control mode
(e.g. RUN/STOP)

Anschaltbaugruppen:

Digitale Ein-/Ausgnge
Analoge Ein-/Ausgnge
Positionierbaugruppe
Modulsystem
Zhlerbaugruppen
peripheral I/O KommunikationsInterface connection
devices
baugruppen
for further devices
PLC-Master (third-party manufacturer)

IndraControl

L40

Anschluss fr
Netzspannung
Kommunikationsbaugruppe
Industrial Ethernet
Anschluss fr
Feldbus (Profibus DP)

Signalzustandsanzeige (LED)

Wago-System

Anschluss fr
Programmiergert

Think I/O
Ethernet Profibus

Features of the

Digitale und analoge


fieldbus connection
Ein-/Ausgangsbaugruppen
Connection operator panel
Source: SIEMENS, BoschRexroth, Wago
WZL/Fraunhofer IPT

Slide 22

Modular design of PLCs


Phoenix Contact ILC 370

Inlinemodule (Profinet, DI)


Connections for
Fieldline-Modules
(Profinet)

Operating mode switch


(e.g. RUN/STOP)

Digital
Inputs & Outputs

CF-Card for
PLC program

Serial interface for


Initial programming
Fieldline connection points

Ethernet connection
Source: Phoenix Contact
WZL/Fraunhofer IPT

Slide 23

How a PLC works Program processing


Cyclic processing of the program
1.
2.
3.
...

In normal operation mode, there is a cyclic processing of the

instruction sequence which are stored in the program memory


The whole program is processed continuously

Event-controlled processing (interrupt)


The program cycle is interrupted by a process signal (e.g. emergency

stop) to run a special routine (e.g. emergency stop routine)


After processing this routine the regular program cycle is then

continued
(unless the main program has been generally interrupted)

Time-controlled processing
The program cycle is interrupted by an internal time signal

(e.g. alarm clock) to run a special routine


After processing this routine the regular program cycle is then

continued
WZL/Fraunhofer IPT

Slide 24

How a PLC works Cyclic operation mode


Program processing time:

I0. 0 1 2 3 4 5 6 7
Tin

PII

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

1. Instruction
2. Instruction

3. Instruction
Jump instruction

i: U E0.0
i+1: U E0.1
i+2: = A1.0
:
:
:
:

Ti
Ti+1
Ti+2

Tout

Program cycle is dependent on


Processing time of the PLC (device-specific)
Quantity of programmed instruction lines
Requests specified in the requirements document must
be fulfilled

Program
length
Memory
size

N
TPrg Tin Ti
i 0

Last instruction

Solutions to reduce the cyclic processing time:


Direct access to control the in- and outputs by
avoiding the process image (e.g. function: tool change)

PIO

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

Tout

Q1. 0 1 2 3 4 5 6 7
WZL/Fraunhofer IPT
PII: process image Input
PIO: process image Output

outsourcing of tasks to local devices, which need


a lot of computing
Increased usage of the event based mode
Slide 25

Conventional PLC programming methods


Graphical

Text based/Mnemonic programming

Ladder Diagram

Functional Block D.

I1 I2 I3 Q1

I1
I2

I4

I3
I4

Q1

&

& =
>
=1

Instruction List

A
A(
AN
A
ON
)
= Q1

I1
I2
I3
I4

Structured Text

IF Bed1 THEN
Z:=-1;
ELSE
Z:= 1;
END_IF;
:

Programming device
PLCprogrammer

WZL/Fraunhofer IPT

PLCprogram

Slide 26

Switching symbols for Ladder Diagram (LD)

Nomenclature

Circuit
diagram

Ladder
Diagram (LD)

Operation

Normally
open contact

Inputs
Normally
closed contact

( )

Outputs
(relay)

Relays or
signal output
elements
( )

WZL/Fraunhofer IPT

Slide 27

Instruction List (IL)


Mnemonic symbols

Operation

Symbol

OR

AND

NOT

Bracket

Bracket

Assign

Set

Reset

WZL/Fraunhofer IPT

Instruction List (IL) in comparison


to Ladder Diagram (LD)
Operation

Instruction List

AND
AND NOT
Assign

A I1
AN I2
= Q1

AND
OR
SET

A I1
O I2
S Q1

Ladder Diagram
I1

I2

Q1

/
I1

Q1
S

I2

Slide 28

Robot use case

WZL/Fraunhofer IPT

Slide 29

Robot use case

IPC (Windows +
Computer vision)

Valve module
(pneumatic)

Laser-control
(Windows PC) +
marking laser

Separator for USB


sticks
(pneumatic cylinder)
Vibration conveyor for
dice

Industrial robot

Source: PhoenixContact, Fest, KUKA, Trumpf


WZL/Fraunhofer IPT

Slide 30

Robot use case


S1: Light barrier
S2: Air pressure sensor
S3: Emergency stop
S4: Modus-Trigger
S5: Modus-Trigger
A1: Dice mode
A2: USB mode
M1: Security

WZL/Fraunhofer IPT

Slide 31

Robot use case: programming LD/FB


laser start (option 1)

laser start (option 2)

USB stick
delivery

lamp control

lamp control (blue)

WZL/Fraunhofer IPT

Slide 32

PLC solutions for machine tools


control of functional
units

monitoring and
diagnose

logical operations
interlocking
optional sequences
...

time measuring
validy checks
error handling (text or graphics)
...

Graphical user
interface shared
with NC

data exchange with


other controls
interchange with NC
interchange with the supervisory
computer or different PLCs
...

input elements (push bottuns,


switches,...)
actuators (lamps, text displays, ...)
...
...

additional tasks
tool management
production data acquisition
...

WZL/Fraunhofer IPT

Slide 33

PLC - software development phases


control task
specification

program
design
AN I 3.0
A
I 4.1
O
I 2.4
S
Q 3.5

Program structure
Re-usability
Design of program modules

programming

Instruction list
Ladder diagram
Function plan
Programming languages

program testing

Manual program analyses


Debugging
Simulation

service and support

WZL/Fraunhofer IPT

PLC function specification


Control hardware

Documentation
Upgrades
Corrections
Slide 34

Errors and costs during PLC software programming

Software errors

Frequency

erroroccurrence

Software costs

errorelimination

Documentation
10%

35%
t
A

A:
F:
P:
T:
B:

Planning,
Design

Task definition
Function specification
Programming
Test, start-up
Operation

WZL/Fraunhofer IPT

40%
Test,
correction

15%
Programming

Slide 35

Easy test procedure for PLC programs


User
Set Input

Correction of errors
in PLC software

Observe output

Control desk

PLC
Inputs

Switches and buttons


I1.0

I1.1

I1.2

I1.3

I1.

Lamps
A1.0

A1.1

WZL/Fraunhofer IPT

Q1.2

Q1.3

Q1.

Elaboration of the
PLC program

Programming unit
Generation and
modification of
the PLC-program

Outputs

Slide 36

Set-up of a test environment for PLC programs


User

Planning and
control of the
simulation
Process
monitoring
Influencing the
simulation
Error recognition
by comparing
sequences and
specification

WZL/Fraunhofer IPT

Simulation
computer

Signal
Influencing

Machine model

Actual
process
status

PLC

Input

Output

Simulation of
control process
behaviour

Read Input

Calculate
PLC program

Wirte Output
cyclical

Application-oriented
simulation elements

Slide 37

Complex test procedure Hardware-In-The-Loop (HIL) Simulation


Simulation computer

Control system

SimbaPCI-card

Usage of original

NC-/PLC-Hardware
Simulation task: modeling
the mechatronical
behaviour of sensors and
actuators
Real time communication
(max. speed: 10 ms)

I/O-signals
Actual
axis-value

HMI

BTSS

NC

Features of a
HIL-Simulation:

plant
actuators

OP
PLC

Control components
of a machine tool

HMI: Human machine interface


OP: Operator panel
WZL/Fraunhofer IPT

Profibus

I/O

Sensors
Slide 38

Complex test procedure Hardware-In-The-Loop (HIL) Simulation


Simulation computer

Control system

Engineering process:
Adjustment of the hardware

SimbaPCI-card

configuration
Engineering of the
mechatronical behaviour of
PLC controlled devices and
actuators
Engineering of the NC-kernel
variables to be assigned via
the HMI-interface

HMI

BTSS

NC
OP
PLC
Profibus

drag
& drop

Parameterization

Design
Model
Engineering process in the application
development system
WZL/Fraunhofer IPT

Slide 39

Complex test procedure Hardware-In-The-Loop (HIL) Simulation


Online-Simulation:

Simulation computer

Control system

Advantage: visual inspection


SimbaPCI-card

HMI

of axis/machine movement
(NC und PLC controlled)
Many configuration options
of the operator panel to
control the peripheral
components event based

BTSS

NC
OP
PLC
Profibus

OnlineOperator
panel
WZL/Fraunhofer IPT

VRMLModel
Slide 40

Fields of application of fieldbus systems at machine tools

Actuator and
snsor layer

Cell and
control layer

Planning layer
Shop floor control layer
Cell layer
Control layer
Actuator-Sensor layer

WZL/Fraunhofer IPT

Cross-link to other
machines

Cross-linking main
drive and feed drive

Ethernet

Fieldbus

Connection to cell
and shop floor control

Local I/O

Local PLC
(Local Intelligence)

Cross-linking binary
actuators and sensors
Slide 41

Advantages by the use of fieldbus system


PLC
headcontrol

Direct link
(conventional)

Control cabinet

Conventional wiring
Single head control

In-/Outputend device

Machine

process 1

Low space request


process n

Increased wiring effort


Actuator
Sensor

PLC

Local In-/Output devices

PLC
headcontrol
Bus

Reduced wiring

In-/Outputend device

Single and small modules


complete system breakdown

process 1

in case of an error

process n

local link
(Fieldbus system)

Control cabinet

e.g. local
I/O-module

Slower signal processing because

of the fieldbus architecture

Machine

Master
PLC
Bus

PLC
Fieldbus

In-/
Outputend device process 1

Slave
PLC
process n

Easy development
Easy trouble shooting

Intelligent In-/Output devices


Rapid program processing
Complete system breakdown

avoidance
WZL/Fraunhofer IPT

Slide 42

Introduction: Safety engineering in production engineering Standards


Standards require the manuFederal
Government

IEC Standard

DIN EN Standard
DIN EN IEC Standard
DIN EN ISO/IEC Standard
DIN ISO Standard

ISO Standard

IEC Standard

ISO Standard

EN Standard
EN IEC Standard
EN ISO Standard

facturer to make a hazard analysis


in order to determine all dangers
associated with the machine; The
machine is designed under
consideration of this analysis.

German Institute of
standardization

IEC 61508
machine tools

Intern./european validity

Area: medical industry

National laws
Safety umbrella
for the world ?

Standards for electronically programmable safety related

systems in the business area of mechanical engineering:


EN IEC 61508; EN IEC 62061

Area:

EN IEC 62061: focused on planner, manufacturer and

end-user of safety related systems


WZL/Fraunhofer IPT

Area: Process industry

Area: power plants

Slide 43

Error detecting control structure with two channels


Control panel

Error indication

a
b

Control 1

c
Channel 1

Comparator
a
b

Control 2

c
Channel 2

Input elements

Process

WZL/Fraunhofer IPT

Slide 44

Example: Architecture according to EN ISO 1349-1 Class 4


PILZ-safety PLC-control
Monitoring

I1

Input
Signal

L1

O1

Output
Signal

Cross
Monitoring
Monitoring

Sensor 1

I2

Input
Signal

L2

Safety gate

Output
Signal

O2

feedback

Sensor 2

Safety-classification according to class 4:


Usage of two sensors (minimum requirement: one of them
must have a forced normally closed contact)
Safety circuit has a multi-channel application with a bidirectional
test function
Error detection in every switch and in the discrete wiring
Two relays which are integrated in the safety circuit by using
normally closed contacts. In case of a failure the second
shut-down path is used.
WZL/Fraunhofer IPT

spindle

Machine tool

Source: PILZ
Slide 45

Emergency-stop in secure relay technology


Secure switching

Compact solution

Emergency-stop

Switch
off
Switch
on

Switch
on

k1

Secure
relay

Unlocking
k2

k3

Unlocking
K1

WZL/Fraunhofer IPT

K2

K3

Slide 46

Error tolerant control structure with three channels


Control panel

b
c

Error indicator
Control 1

Channel 1

a
b
c

2 of 3Control 2
Voter

Channel 2

a
b
c

Control 3

Channel 3

Input elements

Process

WZL/Fraunhofer IPT

Slide 47

Implementation of a button analysis


Button connection to the control

PLC-button analysis
A
A
SPB
AN
AN
SPB
A
AN
=

released
+

I1
I2
10
I1
I2
5
I2
I1
M1

Input 1
Input 2
Go to 10, if both buttons are pressed
Inverse input 1
Inverse input 2
Go to 5, if both buttons are released
Input 2
Inverse Input 1
Status pressed

Further processing
I1

I2

Repeat button analysis


10

pressed
GND

WZL/Fraunhofer IPT

M10

Both buttons are pressed:


Serious error!

Call the secure state

Slide 48

Principle of observable fail-safe-output


+

+
relay 1

Output 1

Control 1
Input 1

+
relay 2

Output 2

Control 2
Input 2

relay 3

Consumer
WZL/Fraunhofer IPT

Slide 49

Zusammenfassung

WZL/Fraunhofer IPT

Slide 50

You might also like