0% found this document useful (0 votes)
4 views

Process Control Lab Manual 2021-2022

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Process Control Lab Manual 2021-2022

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 107

Hashemite University

Mechatronics Engineering Department


Process Control Laboratory
110405533

1
Experiment 1
Introduction to Electro - Pneumatic Systems
Objectives

 To introduce the students to pneumatic system.


 To study some pneumatic system components.
 To differentiate between different types pneumatic directional control valves
 To understand pneumatic cylinders.
 To introduce the students to electro-pneumatic system.
 To study some electro-pneumatic system components.
 To understand the necessity of using relays in electro-pneumatic system.
 To draw a process state diagram.
 To design a ladder diagram to control an electro-pneumatic system.
 To implement an electro-pneumatic system.

Apparatus

1. FESTO Pneumatic Basic Kit.

Figure 1.1: System Apparatus

2
Experiment 1: Introduction to Electro - Pneumatic Systems

Theoretical Background

An incredible range of process control systems depend on electro-pneumatic systems.


Electro-pneumatic systems use electrical signals to control the force and power of
pressurized air. Powered clamps open and close with the force of pressurized air or
oil, large presses shape and form metal with hydraulic pressure, and assembly torque
tools fasten components with pressurized air. In each example, fluid power provides
the energy necessary to exert significant mechanical forces. Systems that use air are
called pneumatic systems while systems that use liquids like oil or water are called
hydraulic system. The electro-pneumatic systems will be the subject of this session.

An electro- pneumatic system consists of a group of pneumatic components connected


together so that a signal (current or compressed air) is passed through the system to
produce an action at the output. This group of components can be divided into five
categories according to their function:

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

Pneumatic System Elements

Category Examples Sympols

Compressor
Supply elements Reservoir
Pressure regulating valve
Air service unit

Push button valves


Input elements
Limit switches
Proximity switches

Directional control valves


Non-return valves
Processing elements
Pressure control valves
Timers, counters
Relays

Final control elements


Directional control valves

Power elements (actuators) Pneumatic cylinders


Pneumatic motors

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.

Table 1.1: Supply Elements

Schematic
(used to
Element Description Sympols Real photo simplify
witing
diagrams)

Electrical
24V
power supply

0-8 bar,
Air compressor ---
32L/min

2. Cylinders

Pneumatic cylinders are mechanical devices which produce force, often in


combination with motion, and are powered by compressed gas. To perform their
function, pneumatic cylinders impart a force by conversion the potential of the
compressed gas into kinetic energy. There are two main types of pneumatic cylinders;
single acting and double acting cylinders. Single acting cylinders (SAC) use the
pressure imparted by compressed air to create a driving force in one direction (usually
out), and a spring to return to the "home" position. Double Acting Cylinders (DAC)
use the force of air to move in both extends and retract strokes. They have two ports
to allow air in, one for outstroke and one for in stroke. Table 1.2 illustrate the
description for both cylinder the symbols for them.

5
Experiment 1: Introduction to Electro - Pneumatic Systems

Table 1.2: Cylinders

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

Table 1.3: Input Elements

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.

- The node in the


middle (black
color) is the
output**.

7
Experiment 1: Introduction to Electro - Pneumatic Systems

Capacitive
Proximity
Switch*
- The power
supply must be
connected to 24V
(red) and 0V
(blue) nodes.

Inductive - The node Q1 or


Proximity is the
Switch* output**.

* 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.

4. Directional Control Valves

Valves are an example of processing elements and final control elements of


pneumatic systems; they are used to control the direction, pressure or flow in
pneumatic systems. Depending on their design, valves can be divided into the
following categories:

1. Directional control valves (DCV)


2. Flow control valves (FCV)
3. Pressure control valves (PCV)
4. Non-return valves

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:

 Number of ports, which is number of inlets and outlets in the valve.


 Number of positions, which is the number of possible ways the valve can
direct the air to flow.

8
Experiment 1: Introduction to Electro - Pneumatic Systems

Table 1.4: Directional Control Valves

Sympol in electro- Sympol in


Element Description Real photo
pnuematic circuit ladder diagram

- 3/2 solenoid
DCV*
DCV

DCV 5/2 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.

Understanding the functionality (method of actuation, number of positions and port


and the direction of air flow of each position) allow the user to select the best valve
for each process and also allow the user to design a ladder diagram to achieve certain
tasks. The principle of operation of a simple DCV is illustrated by Figure 1.2.

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

Figure 1.2: DCV Principle of Operation

The following examples illustrate the description method of the valve:

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

Figure 1.3: 5/2 Directional Valve

This valve is named as follows:

5/2 directional control 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 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.

Figure 1.4: 4/3 Directional Valve

This valve is named as follows:

4/3 directional control 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

Table 1.5: Activation Methods for Directional Valves

Manual Actuation

General Lever Operated

Push Buttons Foot Pedal

Pneumatic Actuation

Direct Pneumatic Actuation

Electrical Actuation

solenoid operation

Mechanical Actuation

Plunger Roller Operated

Spring Return

The following example illustrates the description of DCV according to its ports,
positions, and method of actuation.

Example 1.3:

The solenoid valves in Figure 1.5 are:

A: 3/2 solenoid actuated spring return directional control valve.

B: 5/2 double solenoid directional control valve.

12
Experiment 1: Introduction to Electro - Pneumatic Systems

Figure 1.5: Directional Control Valves

5. Relays

A relay is a processing element widely used in electro-pneumatic system before and


even after the existence of Programmatic Logic Controller (PLC) systems. Figure 1.6
shows the interior of a relay.

Figure 1.6: Relay

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

Table 1.5: Relay

Schematic (used to simplify


Element Sympol in ladder diagram Real photo
witing diagrams)

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.

Figure 1.7: Self-Latch

6. Ladder Diagram

An important concept in electro-pneumatic (also in electro-hydraulic and PLC)


systems is the ladder diagram. This diagram is a graphical representation of the
electrical circuits that control the electro-pneumatic system. Different ladder diagrams
cause the same electro-pneumatic system to exert different functions.

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.

Figure 1.8: Ladder Diagram Main Components

The following technical rules must be considered when designing a ladder diagram:

1. Each rung consists of inputs combination (pushbuttons, relay contacts, limit


switches… etc.), and only one output (solenoid valve, relay coil… etc.)

2. Inputs (especially proximity switches) must be connected to a relay coil


separately (each input to a separate relay coil), then the contacts of the relay
are used in the ladder rung instead of the input itself, this is necessary for
multiple reasons such as:
a. Avoiding shutting the power supply to the switch each time the switch
is activated or deactivated, which is harmful on the long run.
b. Being able to use the switch in different rung without compromising
the isolation of the rungs.
c. Being able to use the switch in a state opposite to its normal state. For
example a proxy switch is either NO or NC by nature but not both.
Connecting it to a relay coil allows you to use NO and NC contacts in
the ladder diagram.

3. If an input is used as a condition to activate an output, then,


a. It must be used in a state same as its normal state. This means that if
the input is NO, use a NO contact to activate the output, and if the
input is NC, use a NC contact to activate the output.
b. Inputs must be connected in series to achieve ADN logic.
c. Inputs must be connected in parallel to achieve OR logic.

15
Experiment 1: Introduction to Electro - Pneumatic Systems

4. If an input is used as a condition to deactivate an output, then,


a. It must be used in a state opposite to its normal state. This means that
if the input is NO, use a NC contact to deactivate the output, and if the
input is NC, use a NO contact to deactivate the output.
b. inputs must be connected in parallel to achieve ADN logic(De
Morgan's Theorem)
c. inputs must be connected in series to achieve OR logic(De Morgan's
Theorem)

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.

Example 1.4: Simple Example

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.

Figure 1.10: Implementation of ladder diagram for Example 1.4

Figure 1.11: Time diagram for Example 1.4

17
Experiment 1: Introduction to Electro - Pneumatic Systems

Example 1.5: OR Operation

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.

Figure 1.13: Implementation of ladder diagram for Example 1.5

18
Experiment 1: Introduction to Electro - Pneumatic Systems

Figure 1.14 shows the circuit's time diagram of the process.

Figure 1.14: Time Diagram for Example 1.5

Example 1.6: Double Solenoid Operation

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.

Figure 1.16: Implementation of ladder diagram for Example 1.6

20
Experiment 1: Introduction to Electro - Pneumatic Systems

Figure 1.17: Time Diagram for Example 1.6

Example 1.7: Using Proximity Switches

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

proximity switch. The implementation of this process ladder diagram is presented by


Figure 1.19.

Figure 1.19: Implementation of ladder diagram for Example 1.7

Example 1.8: Self-Latching concept

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.

Figure 1.21: Implementation of ladder diagram for Example 1.8

23
Experiment 1: Introduction to Electro - Pneumatic Systems

Figure 1.22: State Diagram for Example 1.8

Example 1.9: Self-Latching concept

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.

Figure 1.24: Implementation of ladder diagram for Example 1.8

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.

Discussion and Analysis:

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:

 To understand the main components of the PLC.


 To familiarize the students with common industrial inputs devices.
 To familiarize the students with common industrial output devices.
 To investigate a process station and conclude the address of the input/output
devices address.
 To control a process using PLC.
 To monitor a process using PLC.

Apparatus:

1. Input/ Output simulator


2. Production Line Stations

Figure 2.1: System Apparatus

27
Experiment 2: Introduction to PLC

Theoretical Background:

Programmable Logic Controller (PLC) is commonly used in industrial automated


lines in many applications such as: packing, extruding, sorting, handling … etc.

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. Siemens SIMATIC S7-300 PLC

Every PLC has four main components:

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).

Figure 2.2: Siemens SIMATIC S7-300 PLC

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.

Figure 2.3: I/O terminal.

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.

Figure 2.4: Programming cable.

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.

4. SIMATIC S7-300 PLC Programming

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.

Getting started with SIMATIC S7 Software

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.

1. Double click the icon.

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

Figure 2.5: Step 2

Figure 2.6: Step 3

Figure 2.7: Step 4


32
Experiment 2: Introduction to PLC

5. After the device "PLC" is added, double click on its icon "PLC_1" as in
Figure 2.6.

Figure 2.8: Step 5

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.

Figure 2.9: Step 6

33
Experiment 2: Introduction to PLC

Figure 2.10: Step 7

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

online" icon in the taskbar of Figure 2.10.


2. From the window in Figure 2.11 select the option "MPI" and "PC Adapter"
then click "refresh", after that click on "Go online".

34
Experiment 2: Introduction to PLC

Figure 2.11: Step 2

3. After establishing the PLC interface click on "Download" icon on the


taskbar of Figure 2.10.
From the "Load preview" window shown in Figure 2.12, select "Accept all" then
click "Load". This step will override any program on the PLC and download the
recent Ladder diagram.

As long as the "Go online" icon is pressed and PLC is connected to


the computer you will be able to monitor you process by observing the contacts
and coils of your ladder diagram as they turn on/off according to the actual
process hardware.

35
Experiment 2: Introduction to PLC

Figure 2.12: Step 4

1. Terminology

The important thing now is to familiarize you with the terminology for the inputs and
outputs used in SIMATIC S7 software.

Normally open contacts in SIMATIC S7 are represented as follows:

On the other hand, normally closed contacts are represented as follows:

While the output coils are represented as follows:

Each input or output must be defined with an address corresponding to an input or


output on the station or the control console board. A list of the hardware address is
provided in Appendix A.

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.

NO Inputs Principle of Operation

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.

Figure 2.13: "Start" push button principle of operation 1

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

Figure 2.14: "Start" push button principle of operation 2

NC Inputs Principle of Operation

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.

Figure 2.15: "Stop" push button principle of operation 1

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

Figure 2.16: "Stop" push button principle of operation 2

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:

1. Turn off the power and pressure supplies


2. Connect the Input/output simulator to the Input/output terminal (disconnect the
PLC).
3. Turn on the power and pressure supplies
4. Turn on each output from the simulator and write down its address.
5. While running the output notice the status of the sensors, and write down their
addresses.
6. Write a simple ladder diagram and download it to the PLC.
7. Operate the Station and Monitor the process using the computer.

Discussion and Analysis:

1. What is the process done by your station?


2. What type of sensors in your station? What is their normal state?
3. How many outputs available in your station? What are their types?

39
Experiment 3
Siemens PLC Programming Basics 1

Objectives:

 To understand the basic component of a PLC program.


 To Program a PLC using ladder diagram.
 To be familiar with the Self-Latch principle.
 To understand the analogy between latch and set/reset coils.
 To control a process using PLC.
 To monitor a process using PLC.

Apparatus:

1. SIMATIC S7-300Production Line Stations.


2. Festo Didactic Stations.
3. Programming device (personal computer).

Figure 3.1: System 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.

Figure 3.2: Buffering Station

Table 3.1: Buffering Station Addresses

Address Description Identity

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

I0.3 Separator is fully retracted Magnetic proximity sensor

I0.4 Separator is fully extended Magnetic proximity sensor

Q0.0 Separator (Buffer) extends to hold the work piece Permanent magnet DC motor

Q0.1 Conveyor belt Linear short stroke cylinder

I1.0 START Push button

I1.1 STOP (normally closed) Push button

I1.3 RESET Push button

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.

Figure 3.3: Self-Latch Ladder Diagram Elements

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.

Figure 3.4: Ladder diagram for Example 3.1

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

Figure 3.5: Ladder diagram for Example 3.2

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.

"Stop" "I1.1" is a NC push button, so if we want it to conduct current until it is


activated, we will use a normally open 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.

Figure 3.6: Ladder diagram for Example 3.3

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.

Figure 3.8: Set/Reset Ladder Diagram Elements

Example 3.4:

Solve example 3.1 using Set/Reset coils.

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.

Figure 3.9: Ladder Diagram for Example 3.3

Example 3.5:

Solve example 3.2 using Set/Reset coils.

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.

Figure 3.10: Ladder Diagram for Example 3.4

46
Experiment 3: Siemens PLC Programming Basics 1

Example 3.6:

Solve example 3.3 using Set/Reset coils.

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.

Figure 3.10: Ladder Diagram for Example 3.5

Procedure:

1. Turn off the power and pressure supplies.


2. Write a ladder diagram based on the process you are required to control (use
the address you acquired in the last experiment).
3. Turn on the power supply
4. Download the ladder diagram to the PLC.
5. Turn on the pressure supply
6. Start your process according to your station.
7. Turn on the online monitoring.
8. If the process is not running as required, turn off the pressure supply.
9. Repeat from 1 to 8 until, you are satisfied with your process.
10. Save your ladder diagram.
11. Turn off the power and pressure supplies and your computer.

47
Experiment 3: Siemens PLC Programming Basics 1

Discussion and Analysis:

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:

 To control a process using PLC.


 To monitor a process using PLC.
 To understand the benefits of the internal relay and use it in ladder diagrams.

Apparatus:

1. SIMATIC S7-300Production Line Stations.


2. Festo Didactic Stations.
3. Programming device (personal computer).

Figure 4.1: System 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.

Table 4.1: I/O addresses of the processing station.

Address Description Identity

I0.0 Work piece available Inductive sensor

I0.1 Work piece at rubbing machine Inductive sensor

I0.2 Work piece at testing position Inductive sensor

I0.3 Rubbing machine is up Limit switch

I0.4 Rubbing machine is down Limit switch

I0.5 Rotary table is in position Mechanical operated switch

I0.6 Work piece hole is correct

Q0.0 Rubbing Machine

Q0.1 Rotary table Motor, to rotate the table 60°

Q0.2 Rubbing machine move down

Q0.3 Rubbing machine move up

Q0.4 Work piece clamping for rubbing Clamper

Q0.5 Testing the hole

Q0.6 Reject the work piece to the following station Flipper

I1.0 START Push button

I1.1 STOP (normally closed) Push button

I1.3 RESET Push button

50
Experiment 4: Siemens PLC Programming Basics 2

1. Internal Relays (Flags)

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.

Internal relays have many uses such as

1. The ability to repeat a certain process until a condition is satisfied (While


loop). This is illustrated by Example 4.1
2. If a certain set of conditions are used repeatedly in different parts of a ladder
diagram. Example 4.1 also satisfies this case.
3. To save (latch) the state of certain input and use it after this state is not valid.
This is illustrated by Example 4.1

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

Figure 4.4: Ladder diagram for Example 4.2

Procedure:

1. Turn off the power and pressure supplies.


2. Write a ladder diagram based on the process you are required to control (use
the address you acquired in the last experiment).
3. Turn on the power supply
4. Download the ladder diagram to the PLC by clicking this icon .
5. Turn on the pressure supply
6. Start your process according to your station.

7. Turn on the online monitoring by clicking this icon .


8. If the process is not running as required, turn off the pressure supply.
9. Repeat from 1 to 8 until, you are satisfied with your process.
10. Save your ladder diagram.
11. Turn off the power and pressure supplies and your computer.

Discussion and Analysis:

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:

 To control a process using PLC.


 To monitor a process using PLC.
 To understand the benefits of counters in a process.
 To investigate the three different counters provided by SIMATIC S7.
 To use SIMATIC S7 comparators.
 To control a process using SIMATIC S7 counters.

Apparatus:

1. SIMATIC S7-300Production Line Stations.


2. Festo Didactic Stations.
3. Programming device (personal computer).

Figure 5.1: System 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:

1. Up counters (S_CU): which only increments staring from a preset value.


2. Down counters (S_CD): which only decrements staring from a preset
value.
3. Up/Down counters (S_CUD). Which decrements or increments,
depending on the input that is triggered,

Figure 5.2: a. Down Counter b. Up Counter c. Up/Down Counter

These counters differ in function but all of them have the block shown in Figure 5.3 in
common.

Figure 5.3: Counter Block

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).

The inputs and outputs terminals of a counter block are as follow:

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:

1. Count terminal(s): it is one of the following:


 CU: Count up. Each time a positive edge is given to this terminal, CV
is incremented by one (CV=CV+1).This terminal is presented in both S_CU
and S_CUD. To activate this input, use a contact in the same normal state
of the physical switch. If CV=999, CU will have no effect on it.
 CD: Count down. Each time a positive edge is given to this terminal,
CV is decremented by one (CV=CV-1).This terminal is presented in both
S_CD and S_CUD. To activate this input, use a contact in the same normal
state of the physical switch. If CV=0, CD will have no effect on it.
2. R: is the Reset input of the counter. As long as a high level is at this
terminal, CV will become zero (CV= 0, and Q =Low). This input is
dominant over any other inputs. To activate this input, use the contact in
the same normal state of the physical switch. This input is optional; the
counter will work just fine even if the (R) is not connected to any contact.
But it is highly recommended to use it with up and up/down counters.
3. PV: is the preset value of the counter. You may provide a counter with a
preset value by entering a number from 0 to 999, for example 127, in the
following format: C#127. This input and the input S are used to initialize
the counter.
4. S: is the Set input of the counter. Each time a positive edge triggers this
input, the value of the output CV will become equal to the value of the
input PV (CV=PV). To activate this input, use a contact in the same
normal state of the physical switch.

57
Experiment 5: Siemens PLC Programming with Counters

Some applications on using counters are:

1. To maintain an output active until a condition is repeated fixed number of


times. This is illustrated by Example 5.1
2. To achieve 'For Loop" functionality for a process, without the need to keep all
output energized at all times. Example 4.2 illustrates this point.
3. To keep track of number of element in a process. This is achieved using both
up/down counter simultaneously, as illustrated by Example 4.3

The Buffering station Figure 5.4. The addresses for the Buffering station are provided
in Table 5.1.

Figure 5.4: Buffering Station

Table 5.1 Buffering Station Addresses

Address Description Identity

Work piece is available at the start of the conveyor


I0.0 Diffuse sensor
belt

Work piece is at the buffering (separation) position


I0.1 Through beam sensor
(NC)

I0.2 Work piece is at the end of the conveyor belt (NC) Through beam sensor

I0.3 Separator is fully retracted Magnetic proximity sensor

58
Experiment 5: Siemens PLC Programming with Counters

I0.4 Separator is fully extended Magnetic proximity sensor

Permanent magnet DC
Q0.0 Separator (Buffer) extends to hold the work piece
motor

Q0.1 Conveyor belt Linear short stroke cylinder

I1.0 START Push button

I1.1 STOP (normally closed) Push button

I1.3 RESET Push button

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.

Sol#1: using down counter:

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.

Figure 5.5: Example 5.1 Ladder Diagram Using Down Counter

59
Experiment 5: Siemens PLC Programming with Counters

Sol#2: using up counter:

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.

Figure 5.6: Example 5.1 Ladder Diagram Using Up Counter

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.

If "Reset" all output will be de-energized.

Sol#1: using down counter:

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.

Figure 5.7: Example 5.2 Ladder Diagram.

61
Experiment 5: Siemens PLC Programming with Counters

Sol#2: using up counter:

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.

Figure 5.8: Example 5.2 Ladder Diagram Using S_CD Counter.

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.

This example is similar to applications where number elements needs to be monitor,


such as number of cars in a garage, or number of boxes in storage, etc.

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.

Figure 5.9: Example 5.3 Ladder Diagram

Procedure:

1. Turn off the power and pressure supplies.


2. Write a ladder diagram based on the process you are required to control (use
the address you acquired in the last experiment).
3. Turn on the power supply
4. Download the ladder diagram to the PLC by clicking this icon .
5. Turn on the pressure supply
6. Start your process according to your station.

7. Turn on the online monitoring by clicking this icon .


8. If the process is not running as required, turn off the pressure supply.
9. Repeat from 1 to 8 until, you are satisfied with your process.
10. Save your ladder diagram.
11. Turn off the power and pressure supplies and your computer.

Discussion and Analysis:

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:

 To control a process using PLC.


 To monitor a process using PLC.
 To understand the benefits of timing a process.
 To investigate the five different timers provided by SIMATIC S7.
 To differentiate between the SIMATIC S7 timers and their uses.
 To control a process using SIMATIC S7 timers.

Apparatus:

1. SIMATIC S7-300Production Line Stations.


2. Festo Didactic Stations.
3. Programming device (personal computer).

Figure 6.1: System 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.

Siemens S7-300 PLC can be programmed with five types of timers:

1. S_PULSE 3. S_ODT 5. S_OFFDT


2. S_PEXT 4. S_ODTS
These timers differ in functions but all of them have the same block shown in Figure 6.2.

Figure 6.2: Timer Block

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.

2. BCD: is the current time in binary coded decimal code.

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.

1. The Pulse Timer (S_PULSE)

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.

When +ve edge is at S, two actions are triggered;


1. Q is set to High.
2. BI starts decrementing from the value of TV toward zero..

When -ve edge is at S, two actions are triggered;


1. Q is reset to Low.
2. BI freezes.

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).

Figure 6.3: S_PULSE Timing Diagram

2. The Pulse Extended Timer (S_PEXT)

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

When +ve edge is at S two actions are triggered;

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.

Figure 6.4: S_PEXT Timing Diagram

3. The On Delay Timer (S_ODT)

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.

When +ve edge is at S only one action is triggered;


1. BI starts decrementing from the value of TV toward zero. During this time Q is kept at
Low level

After the time TV has elapsed, the output Q is set to High only if a High signal remains as S.

When -ve edge is at S, two actions are triggered;


1. Q is reset to Low.
2. BI freezes.

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

Figure 6.5: S_ODT Timing Diagram

4. The ON Delay Retentive Timer (S_ODTS)

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.

When +ve edge is at S only one action is triggered;


1. BI starts decrementing from the value of TV toward zero. During this time Q is kept at
Low level

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.

Figure 6.6: S_ODTS Timing Diagram

5. The Off Delay Timer (S_OFFDT)

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

When +ve edge is at S, only one action is triggered;

69
Experiment 6: Siemens PLC Programming with Timers

1. Q is set to High.

When -ve edge is at S, only one action is triggered;


1. BI starts decrementing from the value of TV toward zero.. During this time Q remains
High.

Q is reset to Low after TV has elapsed and the signal at S is Low.

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.

Figure 6.7: S_OFFDT Timing Diagram

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.

Table 6.1 Buffering Station Addresses

Address Description Identity

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

I0.3 Separator is fully retracted Magnetic proximity sensor

I0.4 Separator is fully extended Magnetic proximity sensor

Q0.0 Separator (Buffer) extends to hold the work piece Permanent magnet DC motor

Q0.1 Conveyor belt Linear short stroke cylinder

I1.0 START Push button

I1.1 STOP (normally closed) Push button

I1.3 RESET Push button

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.

sol#1: Using S_PULSE timer.

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.

Figure 6.8 Example 6.1 Ladder Diagram Using S_PULSE Timer.

Sol#2: Using S_PEXT timer.

"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

Figure 6.9: Example 6.1 Ladder Diagram Using S_PEXT Timer

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.

sol#1: Using S_ODT timer.

"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

Figure 6.10: Example 6.2 Ladder Diagram Using S_ODT Timer

sol#2: Using S_ODTS timer.

"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

Figure 6.11: Example 6.2 Ladder Diagram Using S_ODTS Timer

sol#3: Using S_PULSE timer.

Try and trace the solution in Figure 6.12 to see its effectiveness.

Figure 6.12: Example 6.2 Ladder Diagram Using S_PULSE Timer

sol#3: Using S_PEXT timer.

Try and trace the solution in Figure 6.13 to see its effectiveness.

75
Experiment 6: Siemens PLC Programming with Timers

Figure 6.13: Example 6.2 Ladder Diagram Using S_PEXT Timer

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

Figure 6.14: Example 6.3 Ladder Diagram Using S_OFFDT Timer

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.

Trace the solution in the ladder diagram in Figure 6.15.

77
Experiment 6: Siemens PLC Programming with Timers

Figure 6.1: Example 6.4 Ladder Diagram

Procedure:

1. Turn off the power and pressure supplies.


2. Write a ladder diagram based on the process you are required to control (use the address
you acquired in the last experiment).
3. Turn on the power supply
4. Download the ladder diagram to the PLC by clicking this icon .
5. Turn on the pressure supply
6. Start your process according to your station.

7. Turn on the online monitoring by clicking this icon .


8. If the process is not running as required, turn off the pressure supply.
9. Repeat from 1 to 8 until, you are satisfied with your process.
10. Save your ladder diagram.
11. Turn off the power and pressure supplies and your computer.

Discussion and Analysis:

Use the buffering station in Figure 2.15 in experiment 2 to answer the following:

1. When "Start" is pressed the separator will be activated for 2 seconds.


2. If a work piece is available the conveyor belt will be activated for 1 second or until the
piece reaches the buffering position.
3. The conveyor will starts 2 seconds after a work piece is available and "Reset" is pressed,
and stops 5 seconds after the work piece reaches the end of the belt.

78
Appendix A
Stations' Address
A.1 Distributing Station

Figure 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

Address Description Identity


I0.1 Magazine is at back position Magnetic Proximity Sensor
I0.2 Magazine is at front position Magnetic Proximity Sensor
I0.3 A work piece is securely sucked Pressure switch
I0.4 Swivel drive is at magazine position Limit switch
I0.5 Swivel drive is in position to the next station Limit switch
I0.6 Work piece is available (NC) Through beam sensor
Q0.0 The magazine cylinder extends Linear cylinder
Q0.1 The vacuum switches ON -
Q0.2 The vacuum switches OFF -
Q0.3 The swivel drive moves to the magazine Rotary cylinder
Q0.4 The swivel drive moves to the next station Rotary cylinder
I1.0 START Push button
I1.1 STOP (normally closed) Push button
I1.3 RESET Push button

80
Appendix A: Stations' address

A.2 Fluidic Muscle Press Station

Figure A.2: Fluidic Muscle Press station.

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

Fluidic Muscle Press Station


Input and Output Addresses

Address Description Identity


I0.0 Work piece is available Diffuse Sensor
I0.1 Linear drive is at pick position (fully retracted) Magnetic Proximity Sensor
I0.2 Linear drive is at deliver position (fully extended) Magnetic Proximity Sensor
I0.3 Rotary drive is at 0 Magnetic Proximity Sensor
I0.4 Rotary drive is at 90 Magnetic Proximity Sensor
I0.5 Rotary drive is at 180 Magnetic Proximity Sensor
I0.6 Pressure has exceeded the set point=HIGH Pressure switch
Q0.0 Gripper (active=hold the work piece) Rotary cylinder
Q0.1 Linear drive retracts to pick position Linear cylinder
Q0.2 Linear drive extends to deliver position Linear cylinder
Q0.3 Rotary drive rotates to 0 Rotary cylinder
Q0.4 Rotary drive rotates to 90 Rotary cylinder
Q0.5 Rotary drive rotates to 180 Rotary cylinder
Q0.6 Muscle press Linear cylinder
I1.0 START Push button
I1.1 STOP (normally closed) Push button
I1.3 RESET Push button

82
Appendix A: Stations' address

A.3 Handling Station

Figure A.3: Handling station.

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

Address Description Identity


I0.0 Work piece is available Diffuse sensor
I0.1 Handling device is at previous station Magnetic sensor
I0.2 Handling device is at next station Magnetic sensor
I0.3 Handling device is at sorting position Magnetic sensor
I0.4 Lifting cylinder with gripper is down Magnetic sensor
I0.5 Lifting cylinder with gripper is up Magnetic sensor
I0.6 Black work pieces does not activate the sensor (Black=0) Diffuse color sensor
Q0.0 Handling device goes to the previous station Linear cylinder
Q0.1 Handling device goes to the next station Linear cylinder
Q0.2 Lifting cylinder goes down Linear cylinder
Q0.3 Gripper opens Pneumatic cylinder
I1.0 START Push button
I1.1 STOP (normally closed) Push button
I1.3 RESET Push button

84
Appendix A: Stations' address

A.4 Pick and Place Station

Figure A.4: Pick and Place station.

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

Pick and Place Station


Input and Output Addresses

Address Description Identity


I0.0 Work piece at the start of conveyor belt Diffuse Sensor
I0.1 Horizontal cylinder is fully retracted (above the slide) Magnetic Proximity Sensor
I0.2 Horizontal cylinder is fully extended (above the conveyor) Magnetic Proximity Sensor
I0.3 Vertical cylinder is fully advanced (is down) Magnetic Proximity Sensor
I0.4 Vertical cylinder is fully retracted (is up) Magnetic Proximity Sensor
I0.5 Work piece is at separating position Diffuse sensor
I0.6 Work piece is at the end of the conveyor belt (NC) Through beam sensor
I0.7 Cover is securely sucked Pressure switch
Q0.0 Conveyor belt Permanent magnetic DC M
Q0.1 Horizontal cylinder retracts (go back) Linear cylinder
Q0.2 Horizontal cylinder extends (go forward) Linear cylinder
Q0.3 Vertical cylinder extends (go down) Linear cylinder
Q0.4 Bellow suction cup -
Q0.5 Separator (active= holding the work piece) Rotary cylinder
I1.0 START Push button
I1.1 STOP (normally closed) Push button
I1.3 RESET Push button

86
Appendix A: Stations' address

A.5 Separating Station

Figure A.5: Separating station.

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

Address Description Identity


I0.0 Work piece at start position Diffuse sensor
I0.1 Work piece at test position Through beam sensor
I0.2 Testing sensor (uncovered pieces activate the sensor) Diffuse sensor
I0.3 Flipper is fully advanced Inductive proximity sensor
I0.4 Work piece at the second belt (NC) Diffuse sensor
I0.5 Work piece at the end of the first belt (NC) Diffuse sensor
Q0.0 First belt Permanent magnet DC motor
Q0.1 Second belt Permanent magnet DC motor
Q0.2 Clamper retracts Linear cylinder
Q0.3 Flipper Rotary cylinder
I1.0 START Push button
I1.1 STOP (normally closed) Push button
I1.3 RESET Push button

88
Appendix A: Stations' address

A.6 Sorting Station

Figure A.6: Sorting station.

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

Address Description Identity


I0.0 Work piece is available at the start of the conveyor belt Diffuse sensor
I0.1 Work piece is metal (silver) Inductive proximity sensor
I0.2 Work piece is black=0 , Work piece is red or metal=1 Diffuse color sensor
I0.3 Work piece is falling at one of any of the 3 sliders Retro reflective sensor
I0.4 First flipper is retracted Inductive proximity sensor
I0.5 First flipper is advanced Inductive proximity sensor
I0.6 Second flipper is retracted Inductive proximity sensor
I0.7 Second flipper is advanced Inductive proximity sensor
Q0.0 Conveyor belt Permanent magnetic DC motor
Q0.1 First flipper advances Rotary cylinder
Q0.2 Second flipper advances Rotary cylinder
Q0.3 Clamper retracts Linear cylinder
I1.0 START Push button
I1.1 STOP (normally closed) Push button
I1.3 RESET Push button

90
Appendix A: Stations' address

A.7 Testing Station

Figure A.7: Testing station.

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

Address Description Identity


I0.0 Work piece is available Capacitive proximity sensor
I0.1 Black work pieces does not activate the sensor (Black=0) Diffuse color sensor
I0.2 Safety light barrier Retro reflective sensor
I0.3 Check the height of the work piece if it Ok = 1 Comparator Height sensor
I0.4 Lifting cylinder is up Magnetic proximity sensor
I0.5 Lifting cylinder is down Magnetic proximity sensor
I0.6 Pushing cylinder is at front position Magnetic proximity sensor
Q0.0 Lifting cylinder goes down Linear cylinder
Q0.1 Lifting cylinder goes up Linear cylinder
Q0.2 Pushing cylinder extends Linear cylinder
Q0.3 Air slide -
I1.0 START Push button
I1.1 STOP (normally closed) Push button
I1.3 RESET Push button

92
Appendix A: Stations' address

A.8 Buffering station

Figure A.8: Buffering station.

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

Address Description Identity


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
I0.3 Separator is fully retracted Magnetic proximity sensor
I0.4 Separator is fully extended Magnetic proximity sensor
Q0.0 Separator (Buffer) extends to hold the work piece Permanent magnet DC motor
Q0.1 Conveyor belt Linear short stroke cylinder
I1.0 START Push button
I1.1 STOP (normally closed) Push button
I1.3 RESET Push button

94
Appendix A: Stations' address

A.9 Elevator Station

Figure A.9: 3-Floor Lift Station

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

Figure B.2 shows the circuit's state diagram:

Figure B.2: State diagram for Example B.1.


Indirect Control

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.

Figure B.4 shows the circuit's state diagram:

Figure B.4: State diagram for Example B.2.


Note that adding the throttle check valve slowed the speed of the advance motion. This can be noted by
studying the slope of the advancing section and the retracting section and it clear that the retracting slope
is steeper. Also note the configuration of the throttle check valve.

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

Figure B.6: State diagram for Example B.3.

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.

Figure B.8: State diagram for Example B.4.


Example 2.5:

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.

Figure B.10: State diagram for Example B.5.

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

Figure B.12: State diagram for Example B.6.


Example B.7:

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.

Figure B.14: State diagram for Example B.7.


Using the throttle valve as shown by Figure B.13 should have reduced the speed of the cylinder in both
directions. But it is obvious from Figure B.14 that the speed of the cylinder has been slowed down only
on the forward stroke. The reason for that is the use of the quick exhaust valve. As long as the pressure is
supplied at port 1 of the quick exhaust valve, the flow will be from port 1 to 2. However, once "Start" is
released the pressure will be at port 2, in this case the pressure will flow from port 2 to 3 (directly to the
surroundings) without passing the throttle or the control valve.

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

You might also like