Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Automation Industrielle
IndustrielleAutomation
K_TIT
POST_START_TIMER_MOD
N_GT
TIT_RATE_LIM_UP
TIT_REF_MAX_START
TIT_ERROR
lim
TIT_REF_TAB
100
0
FAULT_STATE[tit1_oor]
MAX_INT
I P
PID
D
WFD_TIT
TD_TIT
TIT_RATE_LIM_DN
OR
FAULT_STATE[tit2_oor]
17.3
TIT
2.3
Industrial Automation
Formerly:
Today:
Function:
Distinguish
Instrumentation
flow meter, temperature, position,. but also actors (pump, )
Control
programmable logic controllers with digital peripherals & field bus
Visualization
Industrial Automation
Simple PLC
network
binary inputs
Industrial Automation
PLC in a cabinet
CPU1
redundant field
bus connection
Industrial Automation
CPU2
serial connections
inputs/outputs
Industrial Automation
PLC: functions
(Messen, Schtzen, Regeln = MSR)
PLC = PMC: Protection, Measurement and Control
Measure
Control (Command and Regulation)
Protection
Event Logging
Communication
Human interface
Industrial Automation
PLC: Characteristics
large number of peripherals: 20..100 I/O per CPU, high density of wiring, easy assembly.
binary and analog Input/Output with standard levels
located near the plant (field level), require robust construction, protection against dirt,
water and mechanical threats, electro-magnetic noise, vibration, extreme temperature
range (-30C..85C)
programming: either very primitive with hand-help terminals on the target machine
itself, or with a lap-top able to down-load programs.
network connection allowing programming on workstations and connection to SCADA
field bus connection for remote I/Os
primitive Man-Machine interface, either through LCD-display or connection of a laptop
over serial lines (RS232).
economical - 1000.- .. 15'000.- for a full crate.
the value is in the application software (licenses 20'000 ..50'000)
Industrial Automation
Enterprise Network
Engineer
station
Operator
station
Supervisor
Station
gateway
direct I/O
Industrial Automation
Field Stations
COM 2
CPU
I/O
gateway
COM
COM
CPU
I/O
I/O
COM
I/O
COM
CPU
I/O
I/O
I/O
I/O
CPU
PLC
Field Bus
FB
gateway
small PLC
data concentrators,
not programmable,
but configurable
COM1
I/O
I/O
Control Station
with Field Bus
Field Bus
COM
directly connected
I/O
I/O
I/O
PLC
COM 2
CPU
COM1
I/O
I/O
I/O
I/O
I/O
COM1
large
PLCs
CPU
Control Bus
(e.g. Ethernet)
Field Devices
Industrial Automation
Kinds of PLC
(1)
Compact
Monolithic construction
Monoprocessor
Fieldbus connection
Fixed casing
(2)
Modular PLC
Modular construction (backplane)
One- or multiprocessor system
Fieldbus and LAN connection
(3)
Soft-PLC
Windows NT or CE-based automation products
Direct use of CPU or co-processors
Industrial Automation
Global players
Modular PLC
tailored to the needs of an application
development
environment
RS232
LAN
backplane
parallel bus
courtesy ABB
fieldbus
Power Supply
CPU CPU
Analog I/O
Binary I/O
fieldbus
Industrial Automation
courtesy ABB
courtesy Backmann
Industrial Automation
data bus
Compact or modular ?
field bus
extension
compact PLC
(fixed number of I/Os)
modular PLC (variable number of I/Os
# I/O modules
Industrial Automation
Industry- PC
courtesy INOVA
courtesy MPI
Wintel architecture
(but also: Motorola, PowerPC),
MMI offered (LCD..)
Limited modularity through mezzanine boards
(PC104, PC-Cards, IndustryPack)
Backplane-mounted versions with PCI or Compact-PCI
Industrial Automation
23
4
3
3
12
2
PC as engineering workstation
PC as human interface (Visual Basic, Intellution, Wonderware)
PC as real-time processor (Soft-PLC)
PC assisted by a Co-Processor (ISA- or PC104 board)
PC as field bus gateway to a distributed I/O system
I/O modules
Industrial Automation
Compact PLC
courtesy ABB
courtesy ABB
courtesy ABB
Thermocouple
inputs
binary I/Os,
CAN field bus
RS232 to HMI
courtesy Turbec
cost: 1000.-
Industrial Automation
Protection devices
substation
measurement
transformers
communication to operator
Ir
Is
It
Ur
Us
UT
Human interface
for status
and
settings
Programming
interface
trip relay
Protection devices are highly specialized PLCs that measure the current and voltages in an electrical
substation, along with other statuses (position of the switches,) to detect situations that could
endanger the equipment (over-current, short circuit, overheat) and triggers the circuit breaker (trip) to
protect the substation.
In addition, it records disturbances and sends the reports to the substations SCADA.
Sampling: 4.8 kHz, reaction time: < 5 ms.
costs: 5000
Industrial Automation
Siemens
Hitachi
Number of Points
Memory
1024
10 KB
640
16 KB
Programming Language
Ladder logic
Instructions
Logic symbols
Hand-terminal
Ladder Logic
Instructions
Logic symbols
Basic
Hand-terminal
Programming Tools
Download
Graphic on PC
no
Graphic on PC
yes
2678 cm2
1000 cm2
Label surface
per line/point
5.3 mm2
7 characters
6 mm2
6 characters
Network
10 Mbit/s
19.2 kbit/s
Mounting
DIN rail
cabinet
Industrial Automation
Industrial Automation
CPU
Real-Time
Clock
ROM
flash
EPROM
serial port
controller
Ethernet
ethernet
controller
extension
bus
parallel bus
fieldbus
controller
buffers
analogdigital
converters
digitalanalog
converters
Digital Output
Digital
Input
signal
conditioning
power
amplifiers
relays
signal
conditioning
external
I/Os
field bus
Industrial Automation
time
analog
variable
(e.g. 4..20mA)
time
filtering
&
scaling
sampling
analogdigital
converter
1
binary
variable
y(i)
filtering
time
011011001111
processing
sampling
(e.g. 0..24V)
0001111
counter
digitalanalog
converter
amplifier
analog
variable
e.g. -10V..10V
transistor
or
relay
binary
variable
non-volatile
memory
time
Industrial Automation
Input
Anti aliasing Sample and hold
transformer
filter
A/D conversion
U/I
A/D
Trip
CPU
reaction < 10 ms
f = 300 -1200 Hz
f = 200 kHz
f = 100 kHz
f = 1 MHz
Industrial Automation
Industrial Automation
discrete control
Industrial Automation
analog regulation
Programmable Logic Controllers 2.3 - 28
PLC evolution
Binary World
relay controls,
Relay control
pneumatic sequencer
Analog World
Pneumatic and electromechanical
controllers
I1
A
B
C
P1
P2
combinatorial
sequential
discrete processes
Regulation, controllers
continuous processes
(1+Ts)
F(s) =
(1+T1s + T2 s2)
time
init
Examples: Elevators,
traffic signaling,
warehouses, etc.
a
1
c+d
3
c + d
4
e
Discrete plants are described e.g. by finite state machines or Petri nets.
the main task of a control system with discrete plants is its sequential control.
Industrial Automation
"combinatorial"1)
e.g. ladder logic, CMOS logic
A
Out = A B
A
NOT C
ladder
logic
B
Out = (A + B) C
I1
analog
building
blocs
P1
P2
Industrial Automation
Industrial Automation
"Real-Time" languages
Extend procedural languages to
express time
ladder logic
Real-Time Java
instruction lists
Forth
GRAFCET
SDL
etc
could not impose themselves
Industrial Automation
etc...
wide-spread in the control industry.
Now standardized as IEC 61131
Programmable Logic Controllers 2.3 - 34
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
CALC1
DI
CALC
PUMP
>=1
IN1 OUT
DO
START STEP
T1
MAN_ON
STEP A
IN2
ACT
T2
STEP B
ACT
CALC
IN1
ACTION D1
D1_READY
ACTION D2
D2_READY
ACTION D3
D3_READY
ACTION D4
D4_READY
T3
CALC1
AUTO
http://www.isagraf.com
PUMP
OUT
IN2
MAN_ON
Industrial Automation
textual languages
Industrial Automation
Industrial Automation
Industrial Automation
&
external outputs
external inputs
Trigger
Running
Reset
Tempo
&
S Q
Spin
input signals
set point
measurement
parameters
PID
output signals
command
overflow
"continuously"
executing block,
independent,
no side effects
Example
Industrial Automation
(set point)
(set point)
Industrial Automation
Retroactions are exception to this rule. In this case, the signal direction is
identified by an arrow. (Some editors forbid retroactions - use variables instead).
a
b
x
z
Industrial Automation
1) Functions
- are part of the base library.
- have no memory.
Example are: and gate, adder, multiplier, selector,....
2) Elementary Function Blocks (EFB)
- are part of the base library
- have a memory ("static" data).
- may access global variables (side-effects !)
Examples: counter, filter, integrator,.....
3) Programs (Compound blocks)
- user-defined or application-specific blocks
- may have a memory
- may be configurable (control flow not visible in the FBD
Examples: PID controller, Overcurrent protection, Motor sequence
(a library of compound blocks may be found in IEC 61804-1)
Industrial Automation
Industrial Automation
analog elements
GT
and
OR
or
XOR
TON
IN
Q
PT ET
exclusive-or
SR
S1
R
Q0
flip-flop
R_TRIG
S1 Q0
positive
edge
CTU
CU
RESET Q
ET
PV
bool
int
SEL
MUX
GE
GT
LT
LE
greater equal
greater than
less than
less equal
timer on
delay
up counter
(CTD counter down)
selector
(1:2)
multiplexer
(1:N)
ADD
adder
SUB
subtractor
MUL
multiplier
DIV
divider
INT
Reset
PresetVal
In
integrator
5s
12s
75%
0%
-25%
Industrial Automation
Industrial Automation
MoveAbsolute
AXIS_REF
BOOL
REAL
REAL
REAL
REAL
REAL
MC_Direction
Axis
Execute
Position
Velocity
Acceleration
Deceleration
Jerk
Direction
Axis
Done
CommandAborted
Error
ErrorID
AXIS_REF
BOOL
BOOL
BOOL
WORD
Industrial Automation
y
T
Truth Table:
x2
Mathematical Formula:
Textual Description:
x1
x1
x2
previous state
dx
Kpx Kd
Ki xd
dt
0
Calculates the root mean square of the input with a filtering constant
defined in parameter FilterDelay
Industrial Automation
Industrial Automation
=
Compound block
=
Industrial Automation
M1
Y1
Segment B
X2
Y2
M1
X3
Industrial Automation
M2
Industrial Automation
A
B
C
F1
F3
Machine Code:
The function blocks are
translated to machine language
(intermediate code, IL),
that is either interpreted or
compiled to assembly language
Blocks are executed in sequence,
normally from upper left to lower right
The sequence is repeated every x ms.
Industrial Automation
X01
F2
X02
function
input1
input2
output
F4
Y
F1
A
B
X01
F2
X01
X
F3
B
C
X02
F4
X
X02
Y
write
outputs
X
execute
individual period
O
time
Industrial Automation
Parallel execution
Function blocks are particularly well suited for true multiprocessing (parallel processors).
The performance limit is given by the needed exchange of signals by means of a shared
memories.
Semaphores are not used since they could block an execution and make the concerned
processes non-deterministic.
processor
1
processor
2
processor
3
input/
output
shared
memory
shared
memory
shared
memory
shared
memory
Industrial Automation
Program configuration
The programmer divides the program into tasks (sometimes called pages or segments),
which may be executed each with a different period.
The programmer assigns each task (each page) an execution period.
Since the execution time of each block in a task is fixed, the execution time is fixed.
Event-driven operations are encapsulated into blocks, e.g. for transmitting messages.
If the execution time of these operations take more than one period,
they are executed in background.
The periodic execution always has the highest priority.
Industrial Automation
resource
task
program
FB
task
task
program
program
FB
FB
FB
represented variables
access paths
communication function
legend:
or
FB
Industrial Automation
Industrial Automation
IN_1
OUT_1
The I/O blocks are configured to be attached to the corresponding I/O groups.
Industrial Automation
predefined addresses
Industrial Automation
Industrial Automation
Structured Text
(StrukturierteTextsprache,langagelittralstructur)
Industrial Automation
Data Types
Since Function Blocks are typed, the types of connection, input and output must match.
Elementary Types are defined either in Structured Text or in the FB configuration.
analog types:
binary types:
BOOL
BYTE
WORD
DWORD
1
8
16
32
REAL
LREAL
(Real32)
(Real64)
Industrial Automation
Keyword
BOOL
SINT
INT
DINT
LINT
USINT
UINT
UDINT
ULINT
REAL
LREAL
TIME
DATE
TIME_OF_DAY or TOD
DATE_AND_TIME or DT
STRING
BYTE
WORD
DWORD
LWORD
Industrial Automation
Data Type
Bits
Boolean
Short integer
Integer
Double integer
Long integer
Unsigned short integer
Unsigned integer
Unsigned double integer
Unsigned long integer
Real numbers
Long reals
Duration
Date (only)
Time of day (only)
Date and time of day
Character string
Bit string of length 8
Bit string of length 16
Bit string of length 32
Bit string of length 64
variable length double-byte string
1
8
16
32
64
8
16
32
64
32
64
variable
variable
variable
variable
variable
8
16
32
64
TYPE
ANALOG_CHANNEL_CONFIGURATION
STRUCT
RANGE: ANALOG_SIGNAL_RANGE;
MIN_SCALE : ANALOG_DATA ;
MAX_SCALE : ANALOG_DATA ;
END_STRUCT;
ANALOG_16_INPUT_CONFIGURATION :
STRUCT
SIGNAL_TYPE : ANALOG_SIGNAL_TYPE;
FILTER_CHARACTERISTIC : SINT (0.99)
CHANNEL: ARRAY [1..16] OF ANALOG_CHANNEL_CONFIGURATION;
END_STRUCT ;
END_TYPE
Industrial Automation
Industrial Automation
START STEP
T1
STEP A
STEP B
ACTION D1
D1_READY
ACTION D2
D2_READY
T2
Industrial Automation
SFC: Elements
S0
event condition
("1" = always true)
"1"
transitions
Sa
states
token
Ea
Sb
Eb
Sc
Industrial Automation
State which come into existence with a token are called initial states.
All initial states receive exactly one token, the other states receive none.
Industrial Automation
"1"
token switch : the token crosses the first active
Sa
Ea
Eb
Sc
Ec
Sb
Sd
Ed
Se
Ee
Industrial Automation
Ef
Sg
Sf
Eg
State1
P1 State1_P1: do at enter
N
State1_N: do while
P0 State1_P0: do at leaving
Industrial Automation
rather than define a P0 action reset timer., there is an implicit variable defined as
<state name>.t that express the time spent in that state.
S
S.t > t#5s
Sf
Industrial Automation
intentional displacement to
avoid optical preference of a
path.
Priority:
Industrial Automation
SFC: Exercise
Variables:
Input: In0, In1, In2, In3;
Output:
Trap = {0: closed; 1: open}
Speed = {+20: +1 m/s; +1: +5 cm/s}
Register = {0: closed; 1: open}
negative values: opposite direction
In0
In1
In2
In3
Generates 1 as long as the tag of the vehicle (1cm) is over the sensor.
initially: let vehicle until it touches I0 at reduced speed and open the trap for 5s (empty the vehicle).
Speed = 5 cm/s between I0 and I1 or between I2 and I3, speed = 1 m/s between I1 and I2.
1 - Let the vehicle move from I0 to I3
2 - Stop the vehicle when it reaches I3.
3 - Open the tank during 5s.
4- Go back to I0
5 - Open the trap and wait 5s.
repeat above steps indefinitely
Industrial Automation
::=
OR:
transition
OR:
S-element
OR:
::=
state S-sequence
OR:
OR:
parallel paths
loop
SFC: Structuring
Every flow chart without a token generator may be redrawn as a
structured flow chart (by possibly duplicating program parts)
Not structured
structured
A
a
b
d
B'
A'
Industrial Automation
Solution:
assistance through the flow chart editor.
Function Blocks:
Continuous (time) control
Industrial Automation
procedure
xy(...);
begin
...
endxy;
extern (ST)
function blocks
flow chart
Industrial Automation
Function Block
a
"1"
S
R
c
NOT
b
d
Industrial Automation
Flow Chart
init
"1"
a
b
Function Blocks
S
R
&
B
C
S
R
B
&
b
S
R
C
&
Industrial Automation
Industrial Automation
Industrial Automation
origin:
electrical
circuit
make contact
(contact travail)
01
02
relay coil
(bobine)
03
50
break contact
(contact repos)
02
01
corresponding
ladder diagram
50
03
50
05
44
Industrial Automation
rung
make contact
break contact
relay coil
Industrial Automation
bobine
Spule
01
logic" equivalent
01
02
50
02
50
01
40
02
01
02
40
Industrial Automation
0
2
10
11
Industrial Automation
textual expression
!N 1 & 2 STR 3 & N 4 STR N 5
& 6 / STR & STR = 50
50
12
50
00
01
FUN 02
200
literal expression:
!00 & 01 FUN 02 = 200
Industrial Automation
Industrial Automation
Industrial Automation
Industrial Automation
End:
ST
temp3
(* result *)
Instructions Lists is the most efficient way to write code, but only for specialists.
Otherwise, IL should not be used, because this language:
provides no code structuring
has weak semantics
is machine dependent
Industrial Automation
Industrial Automation
Industrial Automation
symbols
laptop
code
firmware
download
variable
monitoring
and
forcing
for debugging
network
PLC
Industrial Automation
Program maintenance
The source of the PLC program is generally on the laptop of the technician.
This copy is frequently modified, it is difficult to track the original in a process database,
especially if several persons work on the same machine.
Therefore, it would be convenient to be able to reconstruct the source programs
out of the PLC's memory (called back-tracking, Rckdokumentation, reconstitution).
This supposes that the instruction lists in the PLC can be mapped directly to graphic
representations -> set of rules how to display the information.
Names of variables, blocks and comments must be kept in clear text, otherwise the code,
although correct, would not be readable.
For cost reasons, this is seldom implemented.
Industrial Automation
Industrial Automation
Industrial Automation
Data flow
Industrial Automation
Assessment
Which are programming languages defined in IEC 61131 and for what are they used ?
In a function block language, which are the two elements of programming ?
How is a PLC program executed and why is it that way ?
Draw a ladder diagram and the corresponding function chart.
Draw a sequential chart implementing a 2-bit counter
Program a saw tooth waveform generator with function blocks
How are inputs and outputs to the process treated in a function chart language ?
Program a sequencer for a simple chewing-gum coin machine
Program a ramp generator for a ventilator speed control (soft start and stop in 5s)
Industrial Automation
Exercise
V1
L1
V3
V2
upper
lower
MS
H1
temperature
MD
Industrial Automation