Professional Documents
Culture Documents
PLC Pres PDF
PLC Pres PDF
2
History and basic idea
General structure of a PLC based system
P
Programming
i a PLC - Basic
B i structure
t t
Programming languages
Real-life
Real life examples
Control-Chain
Closed-Loop Control
Si l
Input-Signal l l
Control-Signal
Control Actor Process
Sensor
Situation:
Hundred or thousands of relays, closed-loop controllers in cars
Complete rewiring for new model creation needed
6
General Motors Hydramatic requests proposal for an alternative
Winner Bedford Associates with 084
F
Foundation
d ti off Modicon,
M di MOd l DIgital
MOdular DI it l CONtroller
CONt ll
Richard (Dick) Morley inventor of PLC
1969 invention of solid-state
solid state sequential logic solver
10
Severall SPS types available
Hardware SPS
S ft SPS
Soft
Slot SPS
11
Ethernet
PSU CPU RAM ROM RS
Internal Bus
BI BO AI AO FB
External Bus
12
Two ways of working
Cyclic
E
Event
tbbased
d
14
PLC Programming process:
Creating an ST program.
15
IEC 61131-3 international standard defines PLC programming
languages and concepts
Text-based Graphical
16
PLC configuration structure
Task Task
Program Program
Program Program
Program Program
FBs FCs FBs FCs
FBs
FBs FCs FBs
FBs FCs
FBs
FBs FCs FBs
FBs FCs
FBs FCs FBs FCs
FBs FCs FBs FCs
17 Input Output
Function
18 Input Output
Function-Block
19
PLC resource addresssing
g
Addresssing example:
AT %IX1.2
AT %IW6
20
Variable declaration:
NAME ADDRESS: DATATYPE :=INIT; (**)
VAR
Sensor AT%IX0.1 :Bool :=false; (*Beispiel*)
END_VAR;
VAR INPUT
X: REAL;
Y: REAl;
END VAR;
;
VAR_OUTPUT
ERGEBNIS: INT;
END VAR;
21
Several variable types:
yp
22
Programming Languages
24
Instruction list,, assembler like programming
p g g language
g g
Very lightweight language
Every line consists of command and operand
Several commands defined,, extract:
Command Description
LD Load variable
ST Store variable
JMP Jump
JMPC Conditional jump
CAL Call of a function/program/block
25
Instruction list,, example:
p
a (b (c -d)) = e
LD A
AND (B
OR (C
ANDN (D
)
)
)
ST E
26
Structured text,, close to high
g languages
g g like c,, pascal
p
Every command ends with a semicolon
Allows conditions like if/case and loops
Assignments
g with :=
27
Structured text support
pp several loop
p types
yp
28
Our example:
p
a (b (c -d)) = e
29
Ladder diagram,
g graphical
,g p programming
p g g language
g g
Close to circuit diagram
Power flow from left to right
Symbol Description
--|| ||-- Opener,if
p , on state is transfered
--|/|-- Closer,if off state is transfered
--| NOT |-- Negation
--() Output relais
--P-- Detection of positive change 01
--N--
N Detection of nefative change 10
30
Our example:
p
a (b (c -d)) = e
a = I/0
b = I/1
31
Function block diagram,
g graphical
,g p programming
p g g language
g g
Based on function and function block composition
32
Our example:
p
a (b (c -d)) = e
c
d ANDN
b OR
a AND e
33
Sequencial
q Function Chart,, g graphical
p programming
p g g language
g g
Only used for sequencial data flows
Consists of actions and transitions
Real-Life examples
35
36
37
38