Process Control Lab Manual 2021-2022
Process Control Lab Manual 2021-2022
1
Experiment 1
Introduction to Electro - Pneumatic Systems
Objectives
Apparatus
2
Experiment 1: Introduction to Electro - Pneumatic Systems
Theoretical Background
1. Supply elements: these elements are the sources of power that drives the system.
It is expected to find two sources of power in electro-pneumatic systems:
compressors that drive the pneumatic components, and electrical power supplies
to drive the electrical circuits in the system.
2. Input elements: these elements are used to sense physical changes in the process
and transform these changes to electrical signal (current or voltage). These
elements can either be manually operated, such as bush buttons and switches, or
automatically (mechanically or otherwise) operated elements, such as limit
switches and proximity sensors.
3. Processing elements: these elements manipulate the signals from the input
element to perform to achieve certain function of the final control elements such
as relays, non-return valves, directional control valves and presser control valves.
4. Final control elements: these elements are used to control the motion of the
actuators. They are usually some type of directional control valves.
5. Power elements (actuators): these elements are the outputs of the pneumatic
system which use the stored potential energy to perform a certain task. Power
elements are either pneumatic cylinders or pneumatic motors.
3
Experiment 1: Introduction to Electro - Pneumatic Systems
Compressor
Supply elements Reservoir
Pressure regulating valve
Air service unit
The following are the most common electro-pneumatic elements used in this
experiment.
4
Experiment 1: Introduction to Electro - Pneumatic Systems
1. Supply Elements
The electro-pneumatic system in the lab has a 24V electrical power supply, and 0-8
bar air compressor.
Schematic
(used to
Element Description Sympols Real photo simplify
witing
diagrams)
Electrical
24V
power supply
0-8 bar,
Air compressor ---
32L/min
2. Cylinders
5
Experiment 1: Introduction to Electro - Pneumatic Systems
Schematic (used to
Element Description Sympols Real photo simplify witing
diagrams)
- One port
Single used to
acting extend
cylinder - Spring used
to retract
Two ports
Double one used to
acting extend, the
cylinder other to
retract
3. Inputs
6 different type of input are used in this experiment: push buttons, manual switches,
limit switches, and proximity switches; which can be inductive, capacitive or
magnetic. Each input may be normally open (NO) or normally closed (NC). Some
inputs have both NO and NC contacts. Table 1.3 presents further information for the
types of input elements used in the lab experiment with
The principle of operation of the input elements is the same; the difference is in their
method of actuation. If a NO input is actuated; it changes its state to closed allowing
current to flow from its positive terminal to its negative one. On the other hand for a
normally closed input, when it is actuated it will change its state to open stopping the
current flow through it.
6
Experiment 1: Introduction to Electro - Pneumatic Systems
Sympol
Schematic (used
(used in
Element Description Real photo to simplify witing
ladder
diagrams)
diagram)
- The push
buttons are
Push manually
Button & actuated.
Manual
Switch - Each push
button has nodes
to use it as NO
and as NC.
- The limit
switch is actuated
by when the
cylinder touches
it.
- The limit
Limit
switch between
Switch
nodes 1 and 2 is
NC.
- The limit
switch between
nodes 1 and 4 is
NO.
- The switch is
mounted on the
cylinder and it is
activated by the
piston.
- The power
Magnetic
supply must be
Proximity
connected to 24V
Switch*
(red) and 0V
(blue) nodes.
7
Experiment 1: Introduction to Electro - Pneumatic Systems
Capacitive
Proximity
Switch*
- The power
supply must be
connected to 24V
(red) and 0V
(blue) nodes.
* All proximity switches used in the lab has only one NO contact.
** All proximity switches outputs must be connected to a relay, as will be explained later.
For simplicity, only directional control valves (DCV) will be discussed in this
experiment. DCVs control the passage of air signals by generating, cancelling or
redirecting signals. Table 1.4 illustrates two of many types of DCV used in the
experiment.
Each valve is described by two parameters, as well as the control method of the valve.
These parameters are:
8
Experiment 1: Introduction to Electro - Pneumatic Systems
- 3/2 solenoid
DCV*
DCV
* The difference between the two valves is the direction of the air flow (notice the arrow at each position)
** The difference between the two valves is the method of actuation.
Normally port 1 is connected to the air supply, and ports with odd numbers (3, 5 …)
are exhausts, and ports with even numbers (2,4,…) are connected to the next stage of
the process (other valves of cylinders).
The actuation method of the valves varies between manual, pneumatic, mechanical,
and electric. Table 1.5 shows some of the activation methods. The actuation methods
used in this experiment are solenoid, push button and spring return.
9
Experiment 1: Introduction to Electro - Pneumatic Systems
Example 1.1:
The valve In Figure 1.3 has 5 ports (inlets and outlets). It also has 2 positions, each
square present a possible position of the valve.
10
Experiment 1: Introduction to Electro - Pneumatic Systems
Number of positions
Number of ports
The position presented by the square on the right allows the air to flow from port 1 to
port 2, and from port 4 to 5, while port 3 is shut. Meanwhile, the position presented by
the square on the left allows the air to flow from port 1 to port 4, and from port 2 to 3,
while port 5 is shut. Each position can be actuated using one or more of the methods
listed in Table 1.5.
Example 1.2:
The valve In Figure 1.4 has 4 ports (inlets and outlets). It also has 3 positions, each
square present a possible position of the valve.
Number of positions
Number of ports
The position presented by the square on the right allows the air to flow from port 1 to
port 2, and from port 4 to 3. The position presented by the square on the left allows
the air to flow from port 1 to port 4, and from port 2 to 3. The position presented by
the middle square shuts the air flow in ports 2 and 4, and allow the air to flow from
port 1 to 3. Each position can be actuated using one or more of the methods listed in
Table 1.5.
11
Experiment 1: Introduction to Electro - Pneumatic Systems
Manual Actuation
Pneumatic Actuation
Electrical Actuation
solenoid operation
Mechanical Actuation
Spring Return
The following example illustrates the description of DCV according to its ports,
positions, and method of actuation.
Example 1.3:
12
Experiment 1: Introduction to Electro - Pneumatic Systems
5. Relays
Each relay consists of one coil and multiple contacts. The coil has a core (1) and
winding (3) with inputs terminals (A1, A2); the contacts consist of a flipper (4), a
return spring (2) and a contact assembly with a changeover contact (5) and output
terminals (COM, NO, NC). In normal state, the contact between COM and NO is
open, and the contact between COM and NC is closed, hence the names (normally
open, normally closed, and common).When power is applied to the coil connections
through A1 and A2, current flows through the winding, creating a magnetic field. The
flipper is pulled toward the coil core and the changeover contact is actuated changing
its position, this cases the contact between COM and NO to close and at the same time
the contact between COM and NC to open. When the electrical current is removed,
the magnetic field collapses and the flipper and changeover contact are returned to
their normal state by a return spring. In other words, when power is applied at the
coil of a relay, the contacts invert their normal states. Table 1.5 illustrate the relay
used in this experiment.
13
Experiment 1: Introduction to Electro - Pneumatic Systems
Relay
Relays have many application in electro-pneumatic, to name the least; they can be
used to self-latch certain outputs, protecting input devices, inverting the normal state
of input devices, as well as expanding the number of contacts for certain devices.
Trace the circuit in Figure 1.7, and conclude what happen if PB1 is pressed then
released and after that conclude the importance of PB2 in the circuit. This circuit is a
simple example of self-latching a device.
6. Ladder Diagram
Each ladder diagram is constructed from two vertical lines and different number of
horizontal lines. The vertical lines represent the electrical power supply terminals. As
14
Experiment 1: Introduction to Electro - Pneumatic Systems
shown by the Figure 1.8, the positive power line of the supply is on the left of the
ladder, while the negative line (ground or 0V) of the supply is on the right
Each horizontal line in the ladder diagram is called rung. The rung can have as many
inputs as the process requires, but only on output device (solenoid, relay coil…) that
is connected at the left hand side of the rung (connected to the ground of the power
supply). Rungs in one ladder diagram only share the power supply, apart for that they
must stay electrically isolated.
The following technical rules must be considered when designing a ladder diagram:
15
Experiment 1: Introduction to Electro - Pneumatic Systems
5. For safety reasons, the output is placed at the end of the rung (at the 0V of the
supply) to insure a path to ground. Multiple outputs cannot be in series nor in
parallel in one rung.
6. The same output coil must not be repeated in multiple rungs, to avoid short
circuits between rungs.
7. Self-latch in most output cannot be achieved without using relay coil and
contacts. This is because most outputs do not have contacts. In this case the
output coil in a rung is replaced with a relay coil, and then the relay is self-
latched using its NO contacts. Then another NO contact is connected to the
output in a separate rung. Refer to Example 1.7.
The following examples illustrate the constructing and use of ladder diagram to drive
an electro-pneumatic circuit.
Design an electro-pneumatic circuit such that a single acting cylinder will advance
upon pressing an electrical push button "START" and will retract upon releasing it.
(Use a 3/2 solenoid actuated spring returned control valve)
The pneumatic circuit, ladder diagram and parts' list needed to perform this operation
are shown by Figure 1.9.
Figure 1.9: Pneumatic Circuit and Ladder Diagram for Example 1.4
16
Experiment 1: Introduction to Electro - Pneumatic Systems
The circuit shown by Figure 1.9 is a simple single input single output circuit. As long
as the electrical "START" push button is pressed, the rung will be closed and current
will flow through the solenoid "FW" activating it. This solenoid is attached to "FW"
on the valve. So as long as "FW" is energized the cylinder will advance. Once
"START" is released, the current flow through the rung will stop and the spring will
return the valve to its initial position causing the cylinder to retract. The
implementation of this process ladder diagram is presented by Figure 1.10. Figure
1.11 shows the circuit's time diagram.
17
Experiment 1: Introduction to Electro - Pneumatic Systems
Design an electro-pneumatic circuit such that a single acting cylinder will advance
upon pressing an electrical push buttons "PB1" or "PB2" and will retract upon
releasing both of them. (Use a 3/2 solenoid actuated spring returned control valve)
The pneumatic circuit, ladder diagram and parts' list needed to perform this operation
are shown by Figure 1.12.
Figure 1.12: Pneumatic Circuit and Ladder Diagram for Example 1.5
As shown by Figure 1.12, connecting the push buttons in a parallel combination has
achieved the purpose of "OR" gate. Because at this configuration, as long as one of
the push buttons or both of them are pressed current will flow through the solenoid
valve activating it and causing the cylinder to advance. Once both of the push buttons
are released the current flow will stop and the cylinder will retract. The
implementation of this process ladder diagram is presented by Figure 1.13.
18
Experiment 1: Introduction to Electro - Pneumatic Systems
Design an electro-pneumatic circuit such that a double acting cylinder will advance
upon pressing an electrical push button "PB1" and will retract upon reaching its full
extent. (Use a 5/2 double solenoid control valve and use limit switch to determine
the position of the cylinder)
The pneumatic circuit, ladder diagram and parts' list needed to perform this operation
are shown by Figure 1.15.
Figure 1.15: Pneumatic Circuit and Ladder Diagram for Example 1.6
Using a double solenoid actuated control valve as the one shown at Figure 1.15 is
very useful. Using this type of valve means that it is actuated on both sides via
19
Experiment 1: Introduction to Electro - Pneumatic Systems
electrical signals, which means that if a signal occurred at the left solenoid "F" by
pressing "START" (even if it is a momentarily signal, the button is released) the valve
will change state by switching positions allowing the compressed air to flow from port
1to 4 causing the cylinder to advance. As long as there is no signal at the right
solenoid "R", the valve will stay on its position and the cylinder will continue to
advance. Once the cylinder reaches its full extent the limit switch will be activated
causing current to flow through solenoid "R" momentarily (as long as the cylinder is
at its full extent), and reversing the position of the valve causing the cylinder to
retract. The implementation of this process ladder diagram is presented by Figure
1.16. Figure 1.17 shows the circuit's time diagram of the process.
20
Experiment 1: Introduction to Electro - Pneumatic Systems
Design the same process in Example 1.6 but using magnetic proximity switch to
detect the position of the cylinder.
Remember that any type of Proximity switches must be used via relays, because of the
reasons stated before. Therefore, the pneumatic circuit, and ladder diagram needed to
perform this operation are shown by Figure 1.18.
Figure 1.18: Pneumatic Circuit and Ladder Diagram for Example 1.7
Nothing is changed on the first rung. But the retract solenoid "R" in the third rung is
activated by a NO contact "R1". This contact is activated if the relay coil "R1" in the
second rung is activated, which is achieved if the cylinder activated the magnetic
21
Experiment 1: Introduction to Electro - Pneumatic Systems
Design an electro-pneumatic circuit such that a double acting cylinder will advance
upon pressing an electrical push button "PB1" and will retract upon reaching its full
extent.
(Use a 5/2 solenoid actuated spring returned control valve and inductive
proximity switch to determine the position of the cylinder)
The pneumatic circuit, ladder diagram and parts' list needed to perform this operation
are shown by Figure 1.20.
If you go carefully through the question, you will note that it is the same as Example
1.6 expect that the valve used is not a double solenoid valve, it is a solenoid actuated
spring returned valve. In this process there is no solenoid to retract the cylinder, but
whenever the advance solenoid is deactivated, the cylinder will retract, even if it is not
fully advanced. To solve this issue, the advance solenoid must be latched, and this is
done by implementing a relay. When the relay is deactivated the cylinder will retract
because of the spring return valve.
22
Experiment 1: Introduction to Electro - Pneumatic Systems
Figure 1.20: Pneumatic Circuit, Ladder Diagram and Parts' List for Example 1.8
In the first rung the push button "PB1" activate the relay coil "R2", then two things
occur simultaneously; the NO contact R2 in the first rung will become close and thus
latch the relay coil, and the NO contact "R2" in the second rung will become close
and thus activate the solenoid. The relay coil will be deactivated only when the NC
contact "LS2" in the first rung become open, this is achieved when the cylinder is
fully advanced and hits the limit switch LS2. The implementation of this process is
presented by Figure 1.21. Figure 1.22 shows the circuit's time diagram of the process.
23
Experiment 1: Introduction to Electro - Pneumatic Systems
Design an electro-pneumatic circuit such that a double acting cylinder will advance
upon pressing an electrical push button "PB1" and will retract upon reaching its full
extent. Use capacitive proximity switch to detect the position of the cylinder.
The pneumatic circuit, ladder diagram and parts' list needed to perform this operation
are shown by Figure 1.23.
Figure 1.23: Pneumatic Circuit, Ladder Diagram and Parts' List for Example 1.8
24
Experiment 1: Introduction to Electro - Pneumatic Systems
If you go carefully through the question, you will note that it is the same as Example
1.8 Expect that the difference is that a proximity switch is used instead of the limit
switch. In this case the proximity sensor is connected to another relay coil "R3" (the
third rung), and a NC contact is used to unlatch the first rung. The implementation of
this process is presented by Figure 1.24.
Procedure:
Note: In case of emergency turn off the pressure supply and consult your
laboratory supervisor.
1. Turn off the power and pressure supplies.
2. Draw a schematic circuit based on the pneumatic process and the task
provided by your supervisor.
3. Implement the system.
4. Make sure to adjust the position of the limit switches and sensors you use.
5. Turn on the power and pressure supplies.
6. Observe your process to check its functionality.
7. Repeat the steps if necessary.
8. Turn off the power and pressure supplies.
1. Design the pneumatic circuit and ladder diagram such that a single acting
cylinder is to advance slowly upon pressing "PB1" or "PB2" instantaneously,
and it will retract upon reaching its full extent.(Use a 3/2 solenoid actuated
spring returned control valve and use limit switches to detect the position of
the cylinder)
2. Design the pneumatic circuit and ladder diagram such that a double acting
cylinder is to advance upon pressing "PB1" push button if the cylinder is fully
25
Experiment 1: Introduction to Electro - Pneumatic Systems
retracted. And will retract upon pressing "PB2" push button or upon reaching
its rear position.(Use a 5/2 solenoid actuated control valve and use limit
switches to detect the position of the cylinder)
26
Experiment 2
Introduction to PLC Programming
Objectives:
Apparatus:
27
Experiment 2: Introduction to PLC
Theoretical Background:
PLCs are available from many manufacturers such as: Siemens, Allen Bradley,
Mitsubishi, Schneider and Omron. And each of these companies has many modules
for the PLC.
During the rest of the semester, you will be studying industrial station models
assembled by Festo Company. These station can work together to perform a complete
industrial process. All the stations are provided by Siemens SIMATIC S7-300 PLC
which is programmed using SIMATIC Step 7 software.
1. Power supply.
2. Processor.
3. Input cards.
4. Output cards.
Figure 2.2, shows the Siemens SIMATIC S7-300 PLC. This PLC has the main four
components as any other PLC. It needs a dc power supply of 24 V. It has a processor
(CPU 313C-2DP). And it can handle 16 inputs and 16 outputs distributed between 2
I/O cards (card 0 and card 1).
Table 2.1 shows some technical data concerning Siemens SIMATIC S7-300 PLC with
CPU 313C-2DP processor.
As mentioned above, the inputs and outputs of the PLC are divided between two I/O
cards: card 0 and card 1. Card 0 is connected to the inputs and outputs of the station,
while card 1 is connected to the control console (the panel with Start, Stop and Reset
28
Experiment 2: Introduction to PLC
push buttons). The connection between the cards and the PLC is done using the I/O
terminal.
Table 2.1: Technical data for Siemens SIMATIC S7-300 PLC with CPU 313C-
2DP processor
The input and the output signals are transmitted through wires to the I/O socket as in
Figure 2.3 (the wires are fixed with screws to the I/O socket). The socket is connected
29
Experiment 2: Introduction to PLC
to a 24 pins I/O cable. These pins are distributed between 8 input pins, 8 output pins
and pins provided for 0 V and 24 V for the supply of sensors and actuators. The other
side of the I/O cable is connected to the I/O cards of the PLC.
The PLC is programmed on a computer using SIMATIC Step 7 software. The PLC is
linked to the computer using a cable that is provided by an adapter and a USP port.
Figure 2.4 shows a programming cable.
The stations are provided with many types of inputs and outputs. The next two
sections of this session contain a brief description of the inputs and the outputs of the
stations.
30
Experiment 2: Introduction to PLC
2. Inputs
Since the human operator role is very limited in automated systems, sensors play a
major role in them. Most common inputs in PLC systems are Push Buttons, Limit
Switches and Proximity Sensors or Proximity Switches.
3. Outputs
Three main types of output devices are widely used in process control; motors, linear
cylinders and rotary cylinders.
All the stations are driven with SIMATIC S7-300 PLC. Then all the stations share the
same principle of programming, but differ in the I/O addresses. At the previous
session, you have learned how to connect the hardware to and from the PLC. Now
assuming all the correct hardware wiring has been done correctly, it is time to open
SIMATIC S7 software and start programming the PLC.
This software is developed by Siemens Company. The first step through programming
is to open a project where the user can build the necessary ladder diagram for a
certain operation of the station.
2. From the window in Figure 2.5 choose "Create new project", and specify the
name of your project, then click on "Create".
3. From the next window in Figure 2.6 click on "Configure a device" to select
the correct PLC module.
4. From the window in Figure 2.7 click on "Add new device", and then choose
the suitable CPU module of your PLC, in this case select the first option in
the category "CPU 314-2 DP", after that click "Add".
31
Experiment 2: Introduction to PLC
5. After the device "PLC" is added, double click on its icon "PLC_1" as in
Figure 2.6.
6. The next window in Figure 2.9 is the project tree, it consist of all hardware
and software related to the project, including the ladder diagram of your
process.
7. To open the ladder diagram and start programming your process click on
"Programming blocks", and then double click on "Main", this shall open the
window presented in Figure 2.10.
33
Experiment 2: Introduction to PLC
Figure 2.10 contains all instructions needed to create an automated process, it will be
explained later on this manual how to use most common basic instructions such as
logic operations, timers, counters … etc. There is no ladder diagram in Figure 2.8 yet,
but assuming your ladder diagram is ready, the next procedure explains how to
configure the interface to the PLC, in this case "MPI adapter", and download the
process ladder diagram. From now on the PLC must be powered up and connected to
the computer until the download is finished, otherwise your ladder diagram cannot be
downloaded to the PLC.
1. Before downloading the ladder diagram fort the first time the communication
interface to the PLC must be configured, this is done by clicking the "Go
34
Experiment 2: Introduction to PLC
35
Experiment 2: Introduction to PLC
1. Terminology
The important thing now is to familiarize you with the terminology for the inputs and
outputs used in SIMATIC S7 software.
The program allows you to use as many NO or NC contacts of the same input as you
want. But you can use the output ONLY once, because if you use it more than once,
there will be conflict in the results.
36
Experiment 2: Introduction to PLC
Each input to the PLC will have a unique address, this address is related to a one-bit
in the CPU registers, and this bit is activated or deactivated depending on the
hardware connected to the address. Anytime a contact in the ladder diagramed is
labeled with a certain address, it will be activated or deactivated depending on this
address state.
As you have surely noticed, the stations in the lab are provided with two types of
sensors and buttons: the NO and the NC ones.
Let's take the "Start" push button as an example. If you go to the I/O addresses' tables,
you will find that "Start" push button is a NO push button as in the ladder diagram
below, and this push button corresponds to the input address "I1.0". Then Figure 2.13
will explain the NO Start push button operation.
The ladder diagram shows the operation of "Start" push button. It is clear from the
figure that without activating "Start" the address "I1.0"will not be activated, and the
contacts will not change their normal state. When start push button is pressed
(activated) as shown in Figure 2.14, the address "I1.0" will also be activated. If this is
the case; the address is activated, all contacts will invert their normal state; any NO
contact with the address "I1.0" used on your ladder diagram will change state to
CLOSED and conducts the signal through it. On the other hand, any NC contact
with the address "I1.0" used on your ladder diagram will change state to OPENED
and stop conducting the signal through it.
37
Experiment 2: Introduction to PLC
Let's take the "Stop" push button as an example. If you go to the I/O addresses' tables,
you will find that "Stop" is a NC push buttons, and it corresponds to the input address
"I1.1". Then Figure 2.15 will explain the NC Stop push button operation.
The ladder diagram in Figure 2.15 shows the operation of "Stop" push button. If we
run the circuit we will obtain the configuration shown by Figure 2.15. It is clear from
the figure that when "Stop" is not activated, the address"I1.1" is activated. This
implies that any NO contact with the address "I1.1" used on your ladder diagram will
change state to CLOSED and conducts the signal through it. On the other hand,
any NC contact with the address "I1.1" used on your ladder diagram will change state
to OPENED and stop conducting the signal through it. This is the opposite of the
NO push button operation.
Now, activating "Stop" push button as shown in Figure 2.16 will deactivate the
address "I1.1". This will cause the contacts with the same address to go back to their
original state shown by Figure 2.16.
38
Experiment 2: Introduction to PLC
From the above discussion it is concluded that the state of a contact in a PLC
ladder diagram depends only on the state of the address, and not the state of
the hardware. In other word, a contact will be is in its normal state if its
address is not activated, and vice versa, regardless of the state of the input
hardware.
Procedure:
39
Experiment 3
Siemens PLC Programming Basics 1
Objectives:
Apparatus:
40
Experiment 3: Siemens PLC Programming Basics 1
Theoretical Background:
The automation lab is supplied with 11 PLC stations: Sorting, Separating, Processing,
Handling, Buffering, Pick and Place, Fluidic Muscle Press, Testing, Distributing,
Punching and the Assembly station. A Robotic Arm station works with these eleven
stations to form a complete mini-production line.
As mentioned at the previous session, all of these stations are assembled by the Festo
Company and are provided with SIMATIC S7-300 PLCs from Siemens Company.
However, the Robotic arm is a Mitsubishi product.
This semester you will deal with only seven of the eleven stations which are: Sorting,
Separating, Handling, Pick and Place, Fluidic Muscle Press, Testing and Distributing
stations. The correct addresses and a brief description for the stations are provided in
Appendix B.
To learn how to program the PLC, let's take practical examples on the Buffering
station Figure 3.2. The addresses for the Buffering station are provided in Table 3.1.
I0.0 Work piece is available at the start of the conveyor belt Diffuse sensor
I0.1 Work piece is at the buffering (separation) position (NC) Through beam sensor
41
Experiment 3: Siemens PLC Programming Basics 1
I0.2 Work piece is at the end of the conveyor belt (NC) Through beam sensor
Q0.0 Separator (Buffer) extends to hold the work piece Permanent magnet DC motor
1. Self-latch
Self-latch is the process where an output coil stays energized after the inputs (that
caused it to be energized) are no longer satisfied. Self-latch illustrated in Figure 3.3 is
achieved by adding a NO contact with the same address as the output in parallel with
the input that will energize the output. This NO contact will provide an alternative
route when the inputs are no longer satisfied. At least one contact must be outside the
latch to ensure that the output can be de-energized without the need to shut down the
system power, otherwise; after one operation, the output will stay active indefinitely.
Example 3.1:
If "Start" push button is pressed and a work piece is available at the beginning of the
conveyor belt, then the conveyor belt will be actuated until "Reset" push button is
pressed.
Solution:
42
Experiment 3: Siemens PLC Programming Basics 1
The conveyor belt will be operated as long as current is flowing through the output
"Q0.1". Since "Start" should be pressed in order for the current to flow through it to
the output and since "Start" is a normally open push button, a normally open contact
of it was used in the ladder diagram. The same applies for the work piece available
sensor "I0.0".
Both the signals from "Start" push button and "I0.0" are momentary signals (i.e. once
"Start" push button is released or the piece leaves the beginning position, the signals
from them will stop). For this reason, a latch will be needed to maintain "Q0.1"
operated until "Reset" is pressed.
According to the question in hand, "Reset" or "I1.3" should conduct current until it is
pressed and since "Reset" is a normally open push button, a normally closed contact
should be used.
The ladder diagram needed to perform the operation described above is shown in
Figure 3.4.
Example 3.2:
If "Start" push button is pressed and a work piece is available at the beginning of the
conveyor belt, then the conveyor belt will be actuated until the piece reaches the end
of the belt.
Solution:
The conditions for operating the conveyor belt (activating it) are the same as the
pervious example. On the other hand, the normally open push button "Reset" was
replaced with the normally closed sensor "I0.2". And as explained above, since the
sensor is normally closed we will use a normally open contact from it that will
maintain the current flowing through it until it is activated.
The ladder diagram needed to perform the operation described above is shown in
Figure 3.5.
43
Experiment 3: Siemens PLC Programming Basics 1
Example 3.3:
If "Start" push button is pressed and a work piece is available at the separating
(buffering) position, then the separator will extend until it reaches its full extent then
will retract again it will also retract if "Stop" is pressed.
Solution:
Here, the conveyor belt will be operated once "Start" or "I1.0" is pressed and a work
piece is at the buffering position. The buffering sensor "I0.1" is a normally closed
sensor, and then if we want the sensor to conduct current once it is activated, we will
use a normally closed contact from it.
The sensor that informs the system that the separator is fully extended is "I0.4" which
is a normally open sensor, so if we want it to conduct current until it is activated, we
will use a normally closed contact from it.
Notice that "I1.1" and "I0.4" are in series even though the process requires an OR
logic for both input. Since both inputs are conditions to deactivate the output the OR
Logic is implemented in series, and as discussed in experiment 1, this is a practical
application of De Morgan's Theorem.
The ladder diagram needed to perform the operation described above is shown in
Figure 3.6.
44
Experiment 3: Siemens PLC Programming Basics 1
2. Set/Reset Coils
Another method for latching outputs is the use of Set/Reset coils. Set/Reset coils are
used to activate, latch and deactivate an output. Set/Reset coils ladder symbol is
shown in Figure 3.7
Figure 3.7: a. Ladder Symbol for Set Coil b. Ladder Symbol for Reset Coil
When using Set/Reset coils as illustrated by Figure 3.8, each output will need two
rungs to operate it. The first rung is the Set rung; this rung contains the Set coil and
the input contacts needed to activate the output. The Set coil is triggered with a
positive edge (when an input changes state from Low to High). This positive edge
trigger will activate the output and latch it, which means that the Set coil will maintain
the output activated, even after the input signal is back to Low.
The second rung is the Reset rung; this rung contains the Reset coil and the input
contacts needed to deactivate the output. The Reset coil is triggered with High level,
and when it is triggered, it will deactivate the output in both rungs. After the High
level is removed from the Reset coil, the output will stay deactivate until a new
positive edge occurs on the Set coil.
Notice that the Reset coil has dominance over the Set coil; this means that as long as
there is a High level on the Reset coil, any positive edge on the Set coil will not
trigger the coil.
Example 3.4:
Solution:
45
Experiment 3: Siemens PLC Programming Basics 1
The inputs that activate the conveyor belt are "Start" "I1.0" and work piece available
sensor "I0.0", both of them are NO switches, based on that both NO contacts will be
added in series to the Set rung of the conveyor belt "Q0.1".
The input that will deactivate the belt is "Reset" push button "I1.3", this is a NO
switch, based on that, a NO contact will be added to the Reset rung of the conveyor
belt "Q0.1".
The ladder diagram needed to perform the operation described above is shown in
Figure 3.9.
Example 3.5:
Solution:
The inputs that activate the conveyor belt are "Start" "I1.0" and work piece available
sensor "I0.0", both of them are NO switches, based on that both NO contacts will be
added in series to the Set rung of the conveyor belt "Q0.1".
the input that will deactivate the belt is "Stop" push button "I1.1", this is a NC switch,
based on that, a NC contact will be added to the Reset rung of the conveyor belt
"Q0.1".
The ladder diagram needed to perform the operation described above is shown in
Figure 3.10.
46
Experiment 3: Siemens PLC Programming Basics 1
Example 3.6:
Solution:
The inputs that activate the conveyor belt are "Start" "I1.0" and the buffering sensor
"I0.1", "I1.0" is a NO switch so a NO contact will be used in the Set rung, but the
buffering sensor "I0.1" is NC switch, based on that a NC contact will be added in
series to the Set rung of the conveyor belt "Q0.1".
The input that will deactivate the belt is "Stop" "I1.1" a NC push button, or the
separator is fully extended is switch "I0.4" a NO switch. A contact in the same normal
state as the switches will be added to the Reset rung of the conveyor belt "Q0.1".
Since these two contacts are used to trigger the Reset coil with HIGH level, the OR
logic is achieved by connecting them in parallel.
The ladder diagram needed to perform the operation described above is shown in
Figure 3.10.
Procedure:
47
Experiment 3: Siemens PLC Programming Basics 1
1. Use the monitor option to discuss the difference between N.O and N.C input
devices?
2. Assume you have a N.O push button in your station, and you want to use it as
a condition to start an output device, what is the state of its contact you will
use in the ladder diagram?
3. Assume you have a N.C push button in your station, and you want to use it as
a condition to stop an output device, what is the state of its contact you will
use in the ladder diagram?
4. How the process is affected if you update the ladder diagram without
downloading the new edition to the PLC?
5. Can you add to outputs in series in the rungs of your ladder diagram? Explain?
6. What happens if to the output device if –by accident- you programmed it in
two different rungs and the status of one of them was active and the other is
inactive?
7. Use the buffering station in Figure 3.2 to write a ladder diagram for the
following process:
If "Stop" push button is pressed and a work piece is available at the beginning
of the conveyor belt, then the conveyor belt will be actuated until "Start" push
button is pressed or the piece reaches the end of the belt.
8. Write a ladder diagram using set/reset coils for the following process:
If "Stop" push button is pressed and a work piece is available at the beginning
of the conveyor belt, then the conveyor belt will be actuated until "Start" push
button is pressed or the piece reaches the end of the belt.
48
Experiment 4
Siemens PLC Programming Basics 2
Objectives:
Apparatus:
49
Experiment 4: Siemens PLC Programming Basics 2
Theoretical Background:
During the previous session, you have learned how to deal with SIMATIC S7
software. Then you used it to program your PLC using basic latch and set/reset coils
concepts. During this session, you will learn about internal relays and some of their
uses.
Examples on Processing station -whose I/O addresses are given by Table 4.1- are
illustrated through examples 4.1 to 4.5 for both internal relays and set/reset coils.
50
Experiment 4: Siemens PLC Programming Basics 2
Internal relays are virtual programmed relays that are not connected to any real
output, but have coils and contacts. Since they are not addresses for real outputs,
internal relays cannot have addresses that start with "Q". Instead they have addresses
of the user selection that starts with "M" like "M0.0" or "M1.3". Of course there are a
certain number of coils allowed to be programmed in SIMATIC S7 software which is
2048 internal relay.
Example 4.1:
The rubbing machine is to work in a reciprocating motion (i.e. it has to keep moving
down each time it is up and has to move down each time it is down). This motion
begins with pressing "Start" push button and ends with pressing "Stop" push
button.
Solution:
If we are to solve the example without the condition in "Bold" it will be as follows:
Figure 4.2: Ladder Diagram For Example 4.1 Without Internal Relay
51
Experiment 4: Siemens PLC Programming Basics 2
But this way we cannot control the beginning and end of the motion. This is why the
condition in "Bold" was added. This condition is needed to be in both rungs to control
their motion, hence the need for the internal relay.
Figure 4.3: Ladder Diagram For Example 4.1 With Internal Relay
Another example that proves the necessity of internal relays is given by Example 4.2.
Example 4.2:
The conveyor belt of the Buffering station- address in Table 4.1 in the previous
experiment- will starts only if "Start" push button is pressed twice and will stop when
"Stop" push button is pressed. (You are not to use any counters).
The ladder diagram to perform this operation is shown in Figure 4.4. Note that when
"Start" or "I1.0" is pressed for the first time and since "Stop" or "I1.1" is a normally
closed push button, current will flow through the internal relay "M0.0" activating it.
On the other hand, as long as "Start" is pressed "M0.1" cannot be activated. Once
"Start" is released for the first time, and since "M0.0" is activated now, the internal
relay "M0.1" will be activated. Now, if "Start" is pressed again, the conveyor belt or
"Q0.1" will get activated and will stays on this state until "Stop" is pressed which will
deactivate "M0.0" deactivating "M0.1" deactivating the output "Q0.1".
52
Experiment 4: Siemens PLC Programming Basics 2
Procedure:
Use the buffering station in Figure 2.15 in the previous experiment to answer the
following:
1. The conveyor will starts only if a work piece is available, and stops when the
work piece reaches the end of the belt. After two work pieces the separator
53
Experiment 4: Siemens PLC Programming Basics 2
will be actuated until "Stop" push button is pressed. (You are not to use any
counters).
2. Use the set/reset coils to solve example 4.1 and 4.2?
54
Experiment 5
Siemens PLC Programming with Counters
Objectives:
Apparatus:
55
Experiment 5: Siemens PLC Programming with Counters
Theoretical Background:
Counters are instructions used to count for an event. They provide For Loop
functionality in ladder diagrams. They are incremented or decremented by a certain
factor each time that event happens. In Siemens S7-300 PLC, counters have an area
reserved for them in the memory of the CPU. This memory area reserves one 16-bit
word for each counter address. The ladder logic instruction set supports 256 counters.
Siemens S7-300 PLC can be programmed with three types of counters shown in
Figure 5.2:
These counters differ in function but all of them have the block shown in Figure 5.3 in
common.
56
Experiment 5: Siemens PLC Programming with Counters
Counter type is one of the 3 counter types mentioned above."C no" is the counter
address; this number can be any number in the range of 0 to 255 as mentioned above,
C5 for example. This address is used for NO and NC contacts to relate them to the
counter (this will be discussed next).
Outputs:
1. CV: is an output that holds the current count value in binary code. It can
be any value from 0 to 999.The value of CV depends on the signal at the
counter inputs.
2. CV_BCD: is the current count value in binary coded decimal code.
3. Q: is the digital output of the counter.
if CV=0 , then Q is logic 0 (Low, inactive)
if CV>0 , then Q is logic 1 (High, active)
The status of this output Q determine if any contact with the same address as the
counter is activated or in its normal state.
Inputs:
57
Experiment 5: Siemens PLC Programming with Counters
The Buffering station Figure 5.4. The addresses for the Buffering station are provided
in Table 5.1.
I0.2 Work piece is at the end of the conveyor belt (NC) Through beam sensor
58
Experiment 5: Siemens PLC Programming with Counters
Permanent magnet DC
Q0.0 Separator (Buffer) extends to hold the work piece
motor
Example 5.1:
If "Start" push button is pressed, the conveyor belt will be activated until four work
pieces have passed the end of the belt sensor or till "Stop" push button is pressed.
Using this type of counters means that "Start" NO must set (S) the counter value to 4
(PV= 4), and then each time a piece reaches the end of the belt, the counter must
decrement (I0.2 NC at CD). "Stop" NC must be connected to (R) to deactivate the
counter, regardless of the number of piece reached the end.
Finally, the counter output (Q) must activate the belt coil (Q0.0). This can be achieved
in two methods
a. By connecting Q0.0 coil to the counter output in the same rung. See the
ladder diagram in Figure 5.4. a.
b. By leaving the counter output without connecting it to anything, and in
another rung, connecting the output coil to a NO contact with the same
address as the counter.. See the ladder diagram in Figure 5.4. b.
59
Experiment 5: Siemens PLC Programming with Counters
This counter only increments, so to count 4 piece, no matter what is the value of PV
and Set, Q will be High after incrementing 4 times and so is the output coil connected
to it! Luckily most PLCs provide memory locations and arithmetical functions such as
comparators.
The input CD, S. R is connected in the same manner as before (same as sol#1), but
PV is set to 0 (C#0) to insure that the counter start from zero each time "Start" is
pressed. And the output CV is connected to a memory word (MW0). In this case the
binary value of CV is saved in MW0.
In a separate rung, the equality comparator is used to check if MW0 is equal to 2#100
(which is the binary equivalent to 4).The relay M0.0 - connected to the comparator
output - is only activated if the counter is equal to 4.
Finally, in a separate rung, "Start" is used to activate the output coil Q0.1,and M0.0 is
used to deactivate it. As seen in Figure 5.6.
It is clear that using down counters is more straightforward than using up counters.
60
Experiment 5: Siemens PLC Programming with Counters
Example 5.2:
If "Start" push button is pressed, the following process will be repeated 5 times.
Each time a work piece is at the start of the belt conveyor belt will be activated until
the piece reaches the end of the belt.
In this example, "Start" is used only to repeat the process 5 times, so it will be
connected to the counter at (S) in its normal state (NO), "Reset" in its normal state
(NO) will be connected to (R) to de-energized the counter output when it is pressed.
Each work piece reaches the end of the belt will cause the counter to decrement,
i.e.I0.2 NO connected to (CD) until 5 piece reach the end of the belt, i.e. PV=C#5.
See the first rung in Figure 5.7
"Start" doesn't activate the belt, the work piece sensor does but only if the counter is
activated. Based on that I0.0 and C1 activate the belt -keep in mind the I0.0 needs to
be latched, otherwise, the belt will be de-energized when the work piece starts to
move_ and I0.2 will de-activate the belt, so don’t forget to use it opposite to its
normal state. The belt rung is also presented in Figure 5.7, and notice that the belt is
not activated all the time, it is activated only when a work piece is available even if
the counter C1 is active.
Notice that the presence of C1 in Q0.1 insures that the belt is ready to be active as
long as the counter is (for 5 times), this means that any rung with a NO contact of the
counter will be included in the for loop.
61
Experiment 5: Siemens PLC Programming with Counters
The solution is illustrated by Figure 5.8. Try tracing the ladder diagram yourself.
From examples 4.1 and 5.2 it can be deduced that using internal relays will give a
while loop functionality to the ladder diagram, while using counters will give the
for loop functionality.
Example 5.3:
Design a ladder diagram such that the conveyor belt will be activated as long as there
are work pieces on it. And save the number of pieces available on the belt in memory
word MW5 to be used later in the process. The process will begin when "Start" is
pressed and must force end if "Reset" is pressed.
Sol:
In this example "Start" will set the counter to begin from zero, so I1.0 NO is
connected to (S), and PV= C#0. "Reset" will force the process to end, so I1.3 NO is
connected to (R).
62
Experiment 5: Siemens PLC Programming with Counters
In this example more than one piece can be at the belt at the same time, and the belt
must stay active until all pieces has passed through it. To achieve this, the number of
pieces entering the belt must be known. This is accomplished by counting up each
time a work piece is at the start of the belt, by connecting I0.0 NO at (CU). Now each
time a work piece reaches the end of the belt the counter value must be decremented
by connecting I0.2 NC (normal state) to (CD). Since both increment and decrement
functions are needed in this process, it makes sense to use up/down counter instead of
using two separate counters.
Simply connecting Q0.1 at the counter output will ensure that if (CV) is zero this
means no pieces are on the belt so it must be deactivated, and if (CV) is greater than
zero this means there are pieces on the belt, and the belt must stay activated. The
number of pieces on the belt at any given moment will be saved on MW5. See the
ladder diagram in Figure 5.9.
Procedure:
Use the buffering station in Figure 2.15 in experiment 2 to answer the following:
63
Experiment 5: Siemens PLC Programming with Counters
1. When "Start" is pressed and a work piece is available the conveyor belt will be
activated until 2 work pieces reach the buffering position.
2. The separator will be activated whenever "Reset" is pressed 3 times more than
"Stop" is pressed.
3. The conveyor belt will be activated as long as there are 2 or more pieces on it.
64
Experiment 6
Siemens PLC Programming with Timers
Objectives:
Apparatus:
65
Experiment 6: Siemens PLC Programming with Timers
Theoretical Background:
Timers are used to delay or extend the time before or after operating an output. In Siemens S7-
300 PLC has a memory area reserved for timer which supports 256 timers per ladder diagram.
in. This memory area reserves one 16-bit word for each timer address.
Timer type is one of the 5 timer types mentioned above."Timer number" is the timer address;
this number can be any number in the range of 0 to 255 as mentioned above, for example T219.
This address is used to relate NO and NC contacts to the timer (same as in the counter).
Outputs:
1. BI: is the current time in binary code. The current time value depends on the input
TV and the elapsed time after triggering the timer.
3. Q: is the digital output of the timer. It is either High or Low depending on the timer
type and input signals.
The status of this output Q determine if any contact with the same address as the timer is
activated or in its normal state.
Inputs:
1. TV: is the time value (initial value) stored in the timer which must be in the form
(S5T#tv). For example a TV of S5T#5m_2s means that TV is equivalent to 5 minutes
and 2 seconds. The maximum time value for TV is 9,990 seconds, or 2H_46M_30S.
66
Experiment 6: Siemens PLC Programming with Timers
2. S: is the set (trigger) signal of the timer. When S is triggered the timer start
decrementing from the value of TV toward zero. S can be triggered by positive (+ve)
edge , negative (-ve) edge, or both, depending on the timer type.
3. R: is the reset signal of the timer. It forces all outputs to zero or Low. R is an active
High input, this means that as long as High level is at R, Q will be Low. This
condition holds true for all timer.
From now on, the signal at R will be consider Low unless otherwise is given. This is mainly to
simplify the understanding of the next explanation of the each timer type.
The output Q of the S_PULSE (Pulse) timer is High as long as a High Signal is at the S input
and as long as TV has not elapsed. S is triggered by both (+ve) and (-ve) edge.
To better understand the function of the S_PULSE timer, Figure 6.3 illustrate the timer output Q
for different scenarios of S and R signals.
If Q is need to stay High for a time of TV even after the S signal is gone, the S input must be
self-latch (refer to example 6.1 sol#1), or a different timer -such as S_PEXT- may be used (refer
to example 6.1 sol#2).
The output Q of the S_PEXT (Extended Pulse) timer is High for a period of TV after a +ve edge
triggers the S input. S is triggered by only (+ve) edge, a (-ve) edge at S does not affect Q of this
timer type.
67
Experiment 6: Siemens PLC Programming with Timers
1. Q is set to High.
2. BI starts decrementing from the value of TV toward zero.
Q will only become Low when the time TV has elapsed. In this Type of timer S does not need to
be latched (refer to example 6.1 sol#2).
To better understand the function of the S_PEXT timer, Figure 6.4 illustrate the timer output Q
for different scenarios of S and R signals.
The output Q of the S_ODT (ON Delay) timer is High if a High Signal is at the S input and
time TV has elapsed. S is triggered by both (+ve) and (-ve) edge.
After the time TV has elapsed, the output Q is set to High only if a High signal remains as S.
To better understand the function of the S_ODT timer, Figure 6.5 illustrate the timer output Q
for different scenarios of S and R signals.
Notice that if the High level at S is removed before TV has elapsed, Q will not be set to High at
all. If Q needs to become High after TV has elapsed even if the High signal at S is gone, the S
input must be latch via internal relay (refer to example 6.2 sol#1), or a different timer -such as
S_ODTS- can be used (refer to example 6.2 sol#2).
68
Experiment 6: Siemens PLC Programming with Timers
The output Q of the S_ODTS (ON Delay Retentive) timer is set High after a +ve edge triggers S
and after TV has elapsed. S is triggered by only (+ve) edge, a (-ve) edge at S does not affect Q of
this timer type.
After the time TV has elapsed, the output Q is set to High regardless of the signal at S.
To better understand the function of the S_ODTS timer, Figure 6.6 illustrate the timer output Q
for different scenarios of S and R signals.
Notice that Q will not go back to Low unless R is triggered by High level, in this case S does not
need to be latched. In other words; once Q is High it remains High until R is triggered(refer to
example 6.1 solution 2). This is the only timer type that require a contact at R.
The output Q of the S_OFFDT (OFF Delay) timer is High as long as a High Signal is at the S
input. After S becomes Low Q remains High for an extra period of TV
69
Experiment 6: Siemens PLC Programming with Timers
1. Q is set to High.
To better understand the function of the S_OFFDT timer, Figure 6.7 illustrate the timer output Q
for different scenarios of S and R signals.
70
Experiment 6: Siemens PLC Programming with Timers
Now before proceeding to solve problems using timers, it worth knowing the following:
1. It is possible to use any timer type to solve any problem, but always select the easiest
approach (refer to Example 6.2 sol#1, 2 ,3 and 4).
2. A timer rung does not require to have an output coil.
3. A single rung can have many timers in parallel or in series or both (refer to Example 6.4).
The Buffering station is used to illustrate the next examples. The addresses for the Buffering
station are provided in Table 6.1.
I0.0 Work piece is available at the start of the conveyor belt Diffuse sensor
I0.1 Work piece is at the buffering (separation) position (NC) Through beam sensor
I0.2 Work piece is at the end of the conveyor belt (NC) Through beam sensor
Q0.0 Separator (Buffer) extends to hold the work piece Permanent magnet DC motor
Example 6.1:
If "Start" push button is pressed, the conveyor belt will be activated for 4 sec or till "Stop" push
button is pressed.
It is obvious from the question that the conveyor belt will start immediately once "Start" is
pressed , then a timer whose output is High with +ve edge at S must be used, both is S_PULSE
(with self-latch) or S_PEXT timers can be used, but using the S-PEXT (sol#2) is less
complicated.
71
Experiment 6: Siemens PLC Programming with Timers
"Start" will trigger S, this will cause timer Q (and the belt coil) to become High. The latch can be
from Q0.1 or T1 (because both are activated at the same time). Now "Stop" can be connected to
R, or within the rung before the timer (or after the timer only if the Q0.1 -not T1- is used to self-
latch) in this way when "Stop" is pressed, the timer will reset to Low or the latch will be
disconnected, either way the belt will be de-energized. Both solutions are presented by Figure
6.8.
"Start" will trigger S, this will cause timer Q (and the belt coil) to become High for a complete 4
seconds without the need of a latch.. Now "Stop" must be connected to R, in this way when
"Stop" is pressed, the timer will reset to Low (so will the belt). "Stop" cannot be within the rung
(before nor after the timer); if so, once "Stop" is released and since the S-PEXT is still active, the
belt will be activated again. the correct and the wrong solutions are presented by Figure 6.9.
72
Experiment 6: Siemens PLC Programming with Timers
Example 6.2:
If "Start" push button is pressed, the conveyor belt will wait 4sec then it will be activated until
"Stop" push button is pressed.
In this process the belt will not be activated right away but it will be delayed, hence the use
S_ODT (latched via internal relay) or S_ODTS timers. Using the S-ODTS (sol#2) is less
complicated. This process can also be controlled using S_PULSE and S_PEXT as illustrated be
Sol#3 and Sol#4 respectively.
"Start" will trigger S, this will keep Q (and the belt coil) Low, but will trigger the delay time.
During the delay the signal at S -"Start" - must be latch because in the case if a -ve edge ("Start"
is released) the timer will not be High at all. The problem is that neither Q nor Q0.1 are High
yet! so they cannot be used to latch the signal at S. To latch the S signal, "Start" must be latched
using an internal relay in a separate rung. Now "Stop" is used to unlatch the internal relay which
will cause the S-ODT timer to lose the S signal and go Low (so will the belt). The correct and the
wrong solutions are presented by Figure 6.10.
73
Experiment 6: Siemens PLC Programming with Timers
"Start" will trigger S, this will keep Q (and the belt coil) Low, but will trigger the delay time.
After the delay time the Q and the belt will be set top High regardless of the signal at S -"Start"
does not need to be latched -. To deactivate Q (and the belt) the S-ODTS must be reset, so "Stop"
is simply connected to R. Connecting "Stop" within the rung (before or after the timer) is not
valid, this will cause the belt to be disconnected momentarily (but the timer is still High), and
once "Stop" is released the timer will activate the belt again. The correct and the wrong
solutions are presented by Figure 6.11.
74
Experiment 6: Siemens PLC Programming with Timers
Try and trace the solution in Figure 6.12 to see its effectiveness.
Try and trace the solution in Figure 6.13 to see its effectiveness.
75
Experiment 6: Siemens PLC Programming with Timers
Example 6.3:
If "Start" push button is pressed, the conveyor belt will be activated. If "Stop" push button is
pressed, the conveyor belt will wait 4 seconds then stop.
In this question the conveyor belt will start immediately when "Start" push button is pressed but
will begin timing once "Stop" is pressed. Connecting "Stop" within the rung (before or after the
timer) is not valid. If "Stop" is after the timer, this will cause the belt to be disconnected
momentarily (but the timer is still High), and once "Stop" is released the timer will activate the
belt again. If "Stop" is before the timer, when it is pressed, it will indeed cause a -ve edge at S,
but if released before TV has elapsed, it will trigger the timer again. This means that "Stop" must
be latched using internal relay. The correct and the wrong solutions are presented by Figure 6.14.
76
Experiment 6: Siemens PLC Programming with Timers
Example 6.4:
If "Start" push button is pressed, the conveyor belt will wait 3 seconds, then it will be activated,
and when "Stop" is pressed the belt will stay active for extra 2 seconds. Also if a work piece is
available the belt will be activates for 5 seconds.
77
Experiment 6: Siemens PLC Programming with Timers
Procedure:
Use the buffering station in Figure 2.15 in experiment 2 to answer the following:
78
Appendix A
Stations' Address
A.1 Distributing Station
Station's Function
The distribution station separates work pieces from the stack magazine module. The magazine barrel of the
stack magazine holds up to eight work pieces. The filling level of the stack magazine is monitored by
means of a through beam sensor. A double acting cylinder pushes out the work pieces individually.
The changer module grips the separated out work pieces using a suction cup. A vacuum switch checks
whether a work piece has been picked up. The arm of the transfer unit, which is driven by a rotary drive,
conveys the work piece to the transfer point of the downstream station.
79
Appendix A: Stations' address
Distributing Station
Input and Output Addresses
80
Appendix A: Stations' address
Station's Function
The fluidic muscle press station presses work piece covers into housings (body), the rotary-linear changer
module positions the covered work pieces beneath the press. The fluidic muscle press carries out the
pressing process. The rotary-linear changer then transports the finished work piece to the transfer position.
A diffuse sensor mounted on the changer arm for work piece interrogation.
The pressing force is monitored and displayed by an analog sensor. The pressing speed and depth can be
set both manually via a flow control valve and pressure regulator and electronically with the proportional
pressure regulator.
81
Appendix A: Stations' address
82
Appendix A: Stations' address
Station's Function
The handling station is equipped with a flexible two axis handling device. Inserted work pieces are
detected in the retaining device by an optical reflex light sensor.
The handling device fetches the work pieces from the retaining device with the help of a pneumatic
gripper, which is fitted with an optical sensor. The sensor differentiates between black and non-black
pieces. The work pieces can be deposited on different slides on the bases of these criteria.
83
Appendix A: Stations' address
Handling Station
Input and Output Addresses
84
Appendix A: Stations' address
Station's Function
The Pick and Place station is equipped with two-axis Pick and Place module. Work piece housings placed
on the conveyor belt are detected by the diffuse sensor. The work piece is transported to the pneumatic
separator on the conveyor belt and detected by a second diffuse sensor.
The Pick and Place module picks up a work piece cover from the slide and places it on the work piece
housing (body). The complete work piece (housing and cover) is released by the separator and transported
to the end of the conveyor belt. A light barrier detects the work piece at the end of the conveyor belt.
85
Appendix A: Stations' address
86
Appendix A: Stations' address
Station's Function
The separating station detects if the coming pieces are covered or not and allocate them.
A diffuse sensor at the start of the conveyor detects work pieces. A diffuse sensor above the stopper detects
the height of the work piece (covered or not) and determines the coming material flow. Depending on the
program, a sorting branch is switched. If the pick-up point and the conveyor section are not occupied, the
stopper is retracted and the work piece is transported to one of the two conveyor belts.
87
Appendix A: Stations' address
Separating Station
Input and Output Addresses
88
Appendix A: Stations' address
Station's Function
The sorting station detects the color of the incoming work pieces and deposits them on one of three sliders
depending on the color (black, red or silver). Each slider can store up to 6 work pieces. To select which
slider the work pieces should be on, two pneumatic cylinders in the form of flippers are used.
89
Appendix A: Stations' address
Sorting Station
Input and Output Addresses
90
Appendix A: Stations' address
Station's Function
The testing station determines the characteristics of inserted work pieces. The sensing module identifies
the color of a work piece and a capacitive sensor detects each work piece irrespective of the color. A
diffuse sensor identifies metallic and red work pieces. Black work pieces are not detected by the diffuse
sensor. A retro reflective sensor monitors wither the working area above the work piece retainer is free
before the work piece is lifted by the lifting module. The analogue sensor of the measuring module
determines the height of the work piece. A linear cylinder guides the accepted work piece to the
downstream station via the upper air cushioned slide. Rejected work pieces are sorted on the lower slide.
A linear cylinder guides the correct work pieces to the downstream station via the upper air cushioned
slide. Other work pieces are sorted on the lower slide.
91
Appendix A: Stations' address
Testing Station
Input and Output Addresses
92
Appendix A: Stations' address
Station's Function
The Buffering station is a first-input-first output station (FIFO). Though the work pieces order does not
change, the work pieces are separated out at the output of the buffer zone prior to being passed on to the
next (subsequent) station.
93
Appendix A: Stations' address
Buffering station
Input and Output Addresses
94
Appendix A: Stations' address
Station's Function
The Elevator station simulates a real life elevator. This elevator has a cabin which has up and down
mobility between 3 floors, and a door that open and closes at each floor.
Push buttons to summon the elevator are available at each floor as well as inside the cabin, and many limit
switches are installed to monitor the motion of the elevator.
95
Appendix A: Stations' address
Elevator Station
Input and Output Addresses
Address Description
I124.0 Stop PB (NC)
I124.1 PB Floor 1
I124.2 PB Floor 2
I124.3 PB Floor 3
I124.4 Alarm PB
I124.5 L.S. Door Open (NC)
I124.6 L.S. Door Closed (NC)
CABIN
Q124.0 Lamp Cabin at Floor 1
Q124.1 Lamp Cabin at Floor 2
Q124.2 Lamp Cabin at Floor 3
Q124.5 Door Open
Q124.6 Door Close
Q125.6 Cabin Motion Up
Q125.7 Cabin Motion Down
I125.0 L.S. Cabin at Floor 1 (NC)
I125.1 L.S. Door at Floor 1 (NC)
FLOOR 1
I125.2 Call PB Floor 1
Q125.1 Floor 1 Lamp
I125.3 L.S. Cabin at Floor 2 (NC)
I125.4 L.S. Door at Floor 2 (NC)
FLOOR 2 I125.5 Up Call PB Floor 2
I125.6 Down Call PB Floor 2
Q125.3 Floor 2 Lamp
I126.1 L.S. Cabin at Floor 3 (NC)
I126.2 L.S. Door at Floor 3 (NC)
FLOOR 3
I126.3 Call PB Floor 3
Q125.5 Floor 3 Lamp
*The door must be closed (I124.6 NC) before the elevator go up/down (Q125.6
Q125.7)
96
Appendix B
Pneumatic Circuits
Introduction
In session 1 you have learned about pneumatic systems and their main components. In addition to that
your lab instructor has introduced to you how to use FluidSIM software. During this appendix you will
use the basis you have learned at the session 1 to simulate pneumatic circuits.
As you have learned at the session 1, cylinders are the output elements of a pneumatic system. There are
two ways of controlling the cylinder motion (system output):
Direct Control
The simplest level of control for the single or double-acting cylinder involves direct control signals.
Using this type of control, the cylinder is actuated directly via a manually or mechanically actuated valve,
without any intermediate switching of additional directional control valves. If the port sizes of the valve
are too large, the operating forces required may be too great for direct manual operation. Example B.1
illustrates the idea of direct actuation.
Example B.1:
Design a pneumatic circuit such that a single acting cylinder will advance upon pressing "START" push
button and will retract upon releasing it.
(Use a 3/2 manually actuated spring returned control valve)
The pneumatic circuit and parts' list needed to perform this operation are shown by Figure B.1.
Figure B.1: Pneumatic circuit and parts' list for Example B.1.
As you see in Figure B.1 a 3/2 manually actuated control valve is used to directly drive the cylinder. As
long as the valve is actuated ("START" push button is pressed), the single acting cylinder will advance.
Once the valve is de-activated ("START" push button is released), the cylinder will retract.
86
Appendix B: Pneumatic Circuits
Cylinders with large piston diameter have a high air requirement. A control element with high nominal
flow rate must be used to actuate them. If the force proves to be too large for a manual actuation of the
valve, then an indirect actuation should be constructed where a signal is generated via a second smaller
valve, which will provide the force necessary to switch the final control element.
For indirect control of a cylinder, you have to learn what type of valves is used to deliver the signals that
actuate the final control element.
- Input elements: these are the directional control valves. You have learned about their naming method
and methods of actuation during session1.
- Processing elements: these elements form a wide category which includes flow control valves,
pressure control valves, non-return valves in addition to pneumatic timers and counters. The principle
of operation of each valve in these categories is illustrated at FluidSIM components library in
Appendix A.
Example B.2 shows a method for controlling the forward speed of a single acting cylinder.
Example B.2:
87
Appendix B: Pneumatic Circuits
Design a pneumatic circuit such that a single acting cylinder will advance slowly upon pressing "START"
push button and will retract upon releasing it.
(Use a 3/2 manually actuated spring returned control valve)
The pneumatic circuit and parts' list needed to perform this operation are shown by Figure B.3.
Figure B.3: Pneumatic circuit and parts' list for Example B.2.
Single acting cylinders are not the only type of cylinders. Example B.3 is an example for indirect control
of a double acting cylinder.
88
Appendix B: Pneumatic Circuits
Example B.3:
Design a pneumatic circuit such that a double acting cylinder advances upon pressing "START" push
button if it is fully retracted and will retract upon reaching its full extent.
(Use a 5/2 pneumatically actuated control valve and use limit switches to detect the position of the
cylinder)
The pneumatic circuit and parts' list needed to perform this operation are shown by Figure B.5.
Figure B.5: Pneumatic circuit and parts' list for Example B.3.
Note that because two conditions is needed in order for the forward motion to happen (the cylinder is
fully retracted and "START" push button is pressed), AND gate is used.
Figure B.6 shows the circuit's state diagram:
89
Appendix B: Pneumatic Circuits
As we have said above, pneumatic timers and counters are essential parts of indirectly controlled
pneumatic systems. Examples C.4 and C.5 illustrates the use of pneumatic timers and counter
consequently.
Example B.4:
Continuing on Example B.3, the cylinder waits 2 sec upon reaching it full extent before retracting.
The pneumatic circuit and parts' list needed to perform this operation are shown by Figure B.7.
90
Appendix B: Pneumatic Circuits
Figure B.7: Pneumatic circuit and parts' list for Example B.4.
Note that when the cylinder is fully extended a signal will arrive at port 12 of the timer. Starting from that
moment the timer waits 2 seconds then allows air to flow from port 1 to port 2 causing the cylinder to
retract. You should know here that the timer is timing as long as there is signal at port 12 and this is
achieved in this circuit because as long as the cylinder have not retracted yet, there is still a signal at port
12. You should also note the use of the normally closed timer. Figure B.8 shows the circuit's state
diagram.
91
Appendix B: Pneumatic Circuits
Design a circuit such that a single acting cylinder will advance only if "START" push button is pressed
four times and will retract upon reaching its full extent.
(Use a 3/2 manually actuated spring returned valve and a proximity sensor to detect the rear
position of the cylinder)
The pneumatic circuit and parts' list needed to perform this operation are shown by Figure 2.9.
Figure B.9: Pneumatic circuit and parts' list for Example B.5.
Note that after "START" push button have been pressed four times (i.e. four control signals have reached
port 12) the counter allows the air to flow from port 1 to port 2 causing the cylinder to extend. When the
cylinder reaches its full extent, a control signal will reach port 10 stopping the flow of air from port 1 to
port 2 causing the cylinder to retract. Figure B.10 shows the circuit's state diagram.
92
Appendix B: Pneumatic Circuits
Example B.6:
Continuing on Example B.3 design a circuit such that the cylinder will advance only if the system's
pressure at least 4 bars.
The pneumatic circuit and parts' list needed to perform this operation are shown by Figure B.11.
Figure B.11: Pneumatic circuit and parts' list for Example B.6.
At this example, the pressure sequence valve pre-determined pressure was set to 4 bars using the
adjustable spring. Consequently, if the system's pressure provided by the compressor is equal or more
than 4 bars (this is tested at port 12), then the pressure sequence valve will switch positions allowing
pressure to flow from port 1 to 2. Figure B.12 shows the circuit's state diagram.
93
Appendix B: Pneumatic Circuits
Design a circuit such that a single acting cylinder will advance slowly upon pressing a "Start" push button
and retract upon releasing it.
(Use a 3/2 manually actuated spring returned valve and a throttle valve for the speed control)
The pneumatic circuit and parts' list needed to perform this operation are shown by Figure B.13.
94
Appendix B: Pneumatic Circuits
Figure B.13: Pneumatic circuit and parts' list for Example B.7.
Figure B.14 shows the circuit's state diagram.
Exercises
For the following two exercises, design the pneumatic circuit, add the parts' list and the state diagram and
label all your components.
95
Appendix B: Pneumatic Circuits
Exercise 1:
A double acting cylinder is to advance slowly upon pressing "PB1" push button if the cylinder is fully
retracted. And will retract after waiting 2 sec upon pressing "PB2" push button or upon reaching its full
extent.
(Use a 5/2 pneumatically actuated control valve and use proximity switches to detect the position of
the cylinder)
Exercise 2:
A double acting cylinder is to advance upon pressing "PB1" push button 5 times if the cylinder is fully
retracted. And will retract upon pressing "PB2" push button after it has reached its rear position.
(Use a 5/2 pneumatically actuated control valve and use limit switches to detect the position of the
cylinder)
96