Professional Documents
Culture Documents
Excercise 3
Topic:
Assistant
responsible:
Content
1.
Symbols
2.
Introduction
3.
4.
5.
6.
3.1.
3.2.
Karnaugh maps
4.1.
Task 1
4.2.
Task 2
4.3.
Task 3
5.2.
Electrical controls
12
5.3.
Tasks of a PLC
13
5.4.
5.5.
Functionality of a PLC
10
10
14
16
18
PLC and Motion Control, Mechatronics and control for production plants
7.
6.1.
Task 4
18
6.2.
Task 5
18
6.3.
Task 6
19
6.4.
Task 7
19
6.5.
Task 8
20
References
22
PLC and Motion Control, Mechatronics and control for production plants
1. Symbols
Symbol
Dimensions
Terms
Voltage
A
B
C
D
X
Y
Z
S
R
Clk
setting input
re-setting input
clock input
b
c
d
e
f
g
F
Q
Q
X
PLC and Motion Control, Mechatronics and control for production plants
2. Introduction
Information processing devices are based on the processing of variables which can
assume two values or states. These variables, which are internally represented by
two physical or electrical states, are called binary variables.
Binary information can be processed internally in logic networks. These contain
switching elements which realize logical functions like, for example, AND or OR functions. Logic networks link the states of input variables (signals at the inputs) with output variables (signals at the outputs). Output variables may be used as input variables.
This exercise deals with fundamental methods for describing such networks and for
realizing them technically with simple function modules.
In addition, an introduction to PLC programming will be given based on the principles
of boolean algebra.
PLC and Motion Control, Mechatronics and control for production plants
Function:
OR-Function
AND-Function
NOT(X)
PLC and Motion Control, Mechatronics and control for production plants
3.2.
Karnaugh maps
Karnaugh-Veitch-map
Truth table
corresponding
A
0
13
B
1
15
1
14
12
1
6
0
4
1
11
D
5
0
9
1
7
16
10
1
3
F3 =
BD + AD
Nr.
10
11
12
13
14
15
16
PLC and Motion Control, Mechatronics and control for production plants
PLC and Motion Control, Mechatronics and control for production plants
Dont care states must be converted into a 1, if serving the rule of forming as big
groups as possible.
Groups may cross the edges of a karnaugh map (spatially fold the karnaugh map
in mind, such as the fields end up as direct neighbours).
PLC and Motion Control, Mechatronics and control for production plants
Task 1
X Y X Z X Y Z .
4.2.
Task 2
1
1
4.3.
Task 3
Input 2 (B)
Input 3 (C)
Input 4 (D)
Output (Q)
PLC and Motion Control, Mechatronics and control for production plants
Using a Karnaugh map, please derive the disjunctive normal form of the function Q.
PLC and Motion Control, Mechatronics and control for production plants
5.1.
The task of a control system is to read in a variety of signals from a process, e.g.
from a controlled machine, to determine the necessary control signals by means of
logical operations and to output them to the final control elements (actuators). The
controlled process may be a simple machine component, e.g. a feed drive for a machine table, but it may also be a complete manufacturing system, e.g. a machining
centre or a transfer line.
Figure 5-1 depicts the structure and signal flow of an electrical control system.
10
PLC and Motion Control, Mechatronics and control for production plants
Control
Signal conditioning
Signal processing
Signal conditioning
(amplification)
&
Output level
Input level
Signal
flow
Switch
Push-Button
Light Barrier
M
Valve
Lamp
Motor
Display
Production system
Figure 5-1: Structure and signal flows of an electrical control system [1]
The process signals are first read in at the input level. Signals may emanate either
directly from the process, e.g. as sensor signals, or externally from the operator. The
signalling devices are, for example, sensors detecting machine states or process
feedbacks (temperature and pressure sensors, angle encoders etc.) or the operating
elements of a machine tool like push-button controls and switches (e.g. for tailstock
quill forward/backward, cooling lubricant on/off etc.).
Before signals can be processed in the logic section of the control system, it is usually necessary to decouple them electrically and to match them to the control system
voltage level. Opto-couplers or relays are used to decouple and adjust the signals.
The core of the control system is the actual signal processing unit. The output signals
are generated from the input signals by means of logical operations, the logic being
specified by the controlled process. Technical realization of the logical operations is
either electromagnetic, by means of relays, electronic through the use of semiconductor elements, or implemented by means of a program / computer.
In order to address the elements at the output level (e.g. motors, valves, display elements etc), signals frequently need to be amplified. This is done with the aid of suitable electronic amplifying circuits. In the case of relay control systems, however, the
switching power of the relay is frequently adequate. If high powers are required, contactors are used.
11
PLC and Motion Control, Mechatronics and control for production plants
5.2.
Electrical controls
As mentioned before, boolean combinations can be realized in different ways, distuinguishing two types of electrical controls: programmable logic controllers (PLC)
and hard wired programmed logic controllers.
Unlike PLCs, hard wired programmed logic controllers realize the actual control functionaliy by means of their component structure (such as relais and semiconductor
elements). As for physical connections (clamping, soldering or screws) the control
functionality can only be changed by physical alterations, describing a hard wired
controller. Until now, hard wired programmed logic controllers have almost been
completely replaced by PLCs.
As for PLCs, all control functions are executed by a (software) program which is in
the internal memory of the PLC, thus uncoupling hardware design and application.
Depending on the type of control, the content of memory may be changed any time
(RAM, battery-based CMOS-RAM, EEPROM) without any physical effort. Once,
read-only hardware components are mounted (ROM, PROM, EPROM), software alterations may only be applied by changing the memory hardware.
However, hard wired programmed logic controllers are still used for simple control
applications as well as high-security plants (e.g. molding). Depending on the amount
of relais or contactors used (roughly about 5-10), PLCs can be employed economically. Still, if the current exceeds certain limits, e.g. for the main spindle motors, contactors remain an essential element as PLCs can not directly operate very high voltages.
Figure 5-2 shows a use case for hard wired programmed logic controllers which is a
circuit for changing the rotational direction of an AC motor. You can easily identify the
self-holding circuit as well as the interlocking contacts. Relais A1 triggers (closes) the
contact a1. Even after releasing the button S2, relais A1 remains active and the motor keeps running in left-hand motion (self holding circuit). Concurrently, right-hand
motion is blocked via the interlocking contact a1 until the motor is switched off by using button S1.
12
PLC and Motion Control, Mechatronics and control for production plants
Steuerstromkreis
Control
circuit
L1
S1
Aus
Off
S2
a1
Links
Left
S3
a2
rechts
Rechts
Interlocking
"Verriegelungscontacts
kontakte"
a2
Laststromkreis
Load circuit
L1
L2
L3
N
A1
A2
a1
UVW
A1
N
Linkslauf
Left-hand
movement
A2
Rechtslauf
Right-hand
movement
M
3~
Figure 5-2: Circuit for changing rotational direction of an AC motor using relais
technology [1]
A further categorization leads to operation and sequence controls. Operation controls
are strictly restricted to boolean combinations of input signals covering AND-, OR-,
NOT-, NOR- oder NAND-functions whereas no particular order of execution will be
followed. A typical use case for an operation control is the operation mode of an AC
motor according to Figure 5-2.
On the other hand, sequence controls are also used for many applications. Sequence
controls define a strict sequential order of execution. The temporal matching of functional elements represents an essential characteristic of those controls. While operation controls allow an arbitrary oder of execution, sequence controls only proceed
with the next step upon completion of the relevant transition.
5.3.
Tasks of a PLC
Figure 5-3 reviews the tasks which PLCs can perform on machine tools.
13
PLC and Motion Control, Mechatronics and control for production plants
Control of the
functional units
Monitoring and
diagnosis
time monitoring
plausibility monitoring
error display (texts or graphics)
...
logical operations
interlocking functions
function sequences
...
User interface to
machine operator
coupling with NC
communication with host
computer or other PLC systems
...
Special tasks
tool management
factory data capture
...
5.4.
Figure 5-4 gives an overview of the basic PLC structure, incorporating input/output
components and processing elements.
14
PLC and Motion Control, Mechatronics and control for production plants
Valve
Switch
Input
components
Key
button
Output
components
Lamp
Bus system
M
Light barrier
ROM
RAM
CPU
(Word-, Bitprocessor)
EPROM
Motor
Display
Communication
interface
Power
supply
15
PLC and Motion Control, Mechatronics and control for production plants
and set as the default boot project. Results and data which are geenrated at runtime
are temporarily stored into the RAM.
5.5.
Functionality of a PLC
1st instruction
2nd instruction
3rd instruction
Programme
length
jump instruction
jump
Memory
length
last instruction
Source: Weck 95
16
PLC and Motion Control, Mechatronics and control for production plants
of this kind may be repeated at intervals of a few milliseconds, a sufficiently fast response to all process changes is ensured. In order to obtain a comparative value for
the processing speed of different PLCs, the speed is referred to the processing of 1 K
(= 1024) instructions. (Customary values are between 0.1 and 5 ms).
Apart from normal cyclic programme processing, larger modern PLCs also allow
event- or interrupt-controlled as well as time-controlled processing. In eventcontrolled processing, a signal emanating from the process, e.g. actuation of the
emergency power-off switch, aborts cyclic processing of the programme to carry out
a special programme, e.g. an emergency power-off routine which shuts down the
machine reliably. If the main programme has not been interrupted completely, the
processor can continue performing the cyclic programme from the point where it was
interrupted, once the special routine has been completed.
In time-controlled processing, cyclic programme processing can be interrupted by an
internal time signal (wake up alarm) in order to perform a special routine. As with
event-controlled processing, the cyclic programme then resumes at the point where it
was interrupted.
17
PLC and Motion Control, Mechatronics and control for production plants
Task 4
The relay circuit used to control a feed drive and depicted in Figure 6-1 is given. The
feed drive permits three movements: rapid feed forward, rapid feed backward and
feed forward, each switched by a push-button control.
p S1 Lubrication
pressure
m1
p S2 Hydraulic
a2.1
a3.1
a1.1
M1 Help relais
a1.2
S5 End position - front
reached
a3.2
S7 Feed forward
ON
a2.2
A3 Feed forward
6.2.
Task 5
The circuit in Fig. 1 includes self-holding and interlocking functions for the individual
movements (rapid feed forward, rapid feed backward, feed forward). Which contacts
perform interlocking and which perform self-holding?
18
PLC and Motion Control, Mechatronics and control for production plants
6.3.
Task 6
Infer from the circuit diagram in Figure 6-1 the logical equations for the three movements (rapid feed forward, rapid feed backward, feed forward). Use the switch (S1 to
S7) and relay (M1 and A1 to A3) designations given in the figure.
6.4.
Task 7
In the following the relay control in Figure 6-1 is to be replaced by a PLC. Therefore,
a PLC programme has to written according to the equations of task 6.
The push buttons (S) and relays (A) are allocated to the inputs (E), outputs (A),
and labels (M) as follows:
S1 up to S7 =
A1 up to A3 =
M1
=
I1 up to I7
Q1 up to Q3
M1
Write the PLC program as an Instruction List (IL) for the rapid feed backward
movement (Q1).
Write the PLC program as a Function Block Diagram (FBD) for the rap-id feed
forward movement (Q2).
19
PLC and Motion Control, Mechatronics and control for production plants
Write the PLC program as a Ladder Diagram (LD) for the feed forward movement (Q3).
6.5.
Task 8
20
PLC and Motion Control, Mechatronics and control for production plants
pressure
on
cylinder
valve
pressure
source
21
PLC and Motion Control, Mechatronics and control for production plants
7. References
[1]
[2]
[3]
[4]
[5]
Eckl, Ptgens u. Walter: A/D- und D/A-Wandler; Grundlagen, Prinzipschaltungen und Applikationen.
Franzis-Verlag, Mnchen, 1990
[6]
[7]
22