IE 337 Industrial Automation Laboratory Manual: Prof. DR Ali M AL Samhan Dr. Saber Darmoul Eng. Ibraheem Ahmmed Alsharawy
IE 337 Industrial Automation Laboratory Manual: Prof. DR Ali M AL Samhan Dr. Saber Darmoul Eng. Ibraheem Ahmmed Alsharawy
Manual
Prepared by
And
Unit 1 covers theory and background on PLC, RLL programing basics, electric
sensor/actuators and pneumatic logic networks. The total integrated automation
software is introduced in Unit 2 and covers two experiments. Pneumatic network
design given in experiment 3. Connecting electric sensor to PLC input ports and also
electric switching elements are demonstrated in experiment 4. Design RLL and
programming using CASCADE method demonstrated in experiment 5. Special
functions like timer, counter analog input/output are given and illustrated using
experiment 6. Details of these problems are given and demonstrated in text book1.
Writers;
Industrial Engineering Department, KSU
2. Unit 2: Total Integrated Automation TIA portal V12 software basics ................................... 36
2.1 The S7-300 PLC training Unit at Industrial Engineering Automation laboratory .......... 36
2.2 Task 1: Open existing project on TIA V12 portal (Experiment 1). ................................. 42
2.2.1 Objectives .............................................................................................................. 42
2.3 Task 2: Open new project on TIA V12 portal (Experiment 2). ....................................... 48
2.3.1 Objectives .............................................................................................................. 48
2.5 Electric logic sensor and actuators and wiring them to PLC (Experiment 4) ................ 58
2.5.1 Experimental objectives ........................................................................................ 58
2.7 PLC timer, counter, registers and analog input/output functions (Experiment 6). ...... 64
2.7.1 Experimental objectives ........................................................................................ 64
There are many type of PLC manufactures for different industries. Some of them
general purpose type and some of them applied for specific automation application.
In this lab. Mainly Siemens S7-300 type introduced and mounted on the training
station with TIA Ver 12.0 software as programming media. In the same PLC training
station, there are also different pneumatic actuators and solenoid valve switching
elements as well as different electromechanical relay as switching elements and user
push-button switches to be used with the experiments.
Analog Networking
module
Input
Analog Modem
Output
TIMERS: These also do not physically exist. They come in many varieties and
increments. The most common type is an on-delay type. Others include off-delay and
both retentive and non-retentive types. Increments vary from 1ms through 1s.
DATA STORAGE: Typically there are registers assigned to simply store the data.
They are usually used as temporary storage for math or data manipulation. They can also
typically be used to store data when power is removed from the PLC. Upon power-on
they will still have the same contents as before when power has been removed.
ANALOG MODELS: This covers analog inputs and outputs. The analog models
cover reading analog signals from sensor, provides analog signal such as thermocouples,
strain gauges, thermistor, pressure sensor….etc. The analog output signals can be used to
command external controller e.g. servomotors amplifier, solenoid amplifier …etc.
NETWORKING MODULES: Larger PLCs could have serial port that can be used
for networking a multiple of PLCs that are to be programmed from one main computer or
sending/receiving data between PLC networks. Furthermore, some of the PLCs are
equipped with remote control module (modem) to program the PLC from long distance
computer.
The CPU of the PLC contains a microprocessor, which means that a PLC is basically a
specialized computer that has been designed to control the operation of machines and
processes within the harsh environment of the plant.
The language used to program the PLC to perform the logic required to connect the
fielded input to its outputs is called Relay Ladder Logic (RLL). The RLL language is
programmed by means of special software using personal computer (connected to the
PLC using serial port) or hand-held programmer which has led or liquid-crystal display,
see Fig. 1.2.
Input Output M
CPU & Memory module
Module
(logic
S
(logic or
or
continuo
Power Supply continu
us)
ous
Figure 1.2 PLC structure,
+24V DC
user communication and interfaces modules N
interconnections. module
User
s)
RAM and EPROM memory are used to store the program instructions in the PLC. The
interface
computer or hand-held programmer can be used to load and save the RLL programs into
the PLC.
Serial
The physical input and output modules can be discrete or analog I/O modules and can be
selected and specified when purchasing the PLC, and depend on the number of the
port
required I/O lines.
The discrete I/O modules connects field inputs devices of the ON/OFF nature like limit
switches, push button switches, solenoids, solenoid valve or electro-mechanical relay
..etc. Each discrete I/O module supply voltage source. Since these voltages can be of
different magnitude or types, I/O modules are available at various AC & DC voltages
ratings as shown in Table 1.1. Furthermore, the inputs and outputs are connected to
LED’s to indicate the operation of the I/O module
Table 1.1: common ratings for discrete I/O interface modules.
Interface input module Interface output modules
24 V AC/DC 12-48 V AC
48 V AC/DC 120 V AC
5 V (TTL) V DC (TTL)
Figure 1.3
Layout of PLC
scanning technique
Power circuit
Next, think like the relay control system is replaced with PLC control system using relay
ladder logic. After seeing a few of these it will become obvious why it’s called a ladder
diagram. However, be noted unfortunately, a PLC doesn't understand a schematic
diagram. It only recognizes code. Fortunately most PLCs have software, which convert
ladder diagrams into code. This shields us from actually learning the PLC's code.
Next the outputs a symbol. In this example, there is one output (i.e. the bell). The output
that the bell will be physically connected to the symbol shown in Fig. 1.7 as output relay.
The AC supply is an external supply so it is not included in relay ladder. The PLC only
cares about which output it turns on and not what's physically connected to it.
Second, it is required to tell the PLC where everything is located. In other words, assign
actual devices an address. Where is the switch going to be physically connected to the
PLC ? How about the bell? Starting with a blank road map in the PLCs town and give
each item an address. For example, it is impossible to find the friends if the address is not
known. For example, the friends may live in same town but which street or house number
? The PLC town has a lot of houses (inputs and outputs) but need to figure out who lives
where (what device is connected where). The PLC manufacturers each do it a different
way! For now let's say that input address called "0000" and output address called "500",
see Fig. 1.8.
Finally, it was noted that the schematic diagram converted into a logical sequence of
events, see Fig 1.8. This is much easier than it sounds. The program we're going to write
tells the PLC what to do when certain events take place. In this example it decided to tell
the PLC what to do when the operator turns on the switch. Obviously the bell will sound
but the PLC doesn't know that.
Figure 1.10
Control and RLL for AND Boolean
operation.
The Boolean AND logic equation for this control circuit: Coil = SW1 . SW2
Example 2:
Redraw the relay ladder logic of Example 1, using normally closed switch for SW2 ?
The amended RLL is shown in Fig. 1.10, to Fig 1.11:
Figure 1.11 Amended RLL using normally closed switch for switch SW2.
The
The Boolean
main logicused
language equation will bethe
to program : Coil
PLC = SW1 . SW2 the logic required and to connect
to perform
the field input to its outputs is called Relay Ladder Logic (RLL or LAD). Other
languages like FBD and STL also available for PLC programming (not considered in
17 Department of Industrial Engineering
College of Engineering
King Saud University
current project). All languages can be used in same program. For example, it is possible
to program PLC with STL method through two lines, same program need three pages in
LAD language. Fig. 1.12, shows three types of programming languages for AND/OR
gates. As illustrated in there are four discrete inputs switches (S1, S2, S3 and S4) and
three discrete outputs (L1, L2 and L3). Each input and output has discrete input address
shown of I0.0, I0.1, …I0.3 and four discrete output of Q8.0 … Q8.2 .
The RLL (LAD) language is programmed by means of special software using personal
computer (connected to the PLC using serial port) or hand-held programmer which has
led or liquid-crystal display and keyboard, see Fig 1.13.
Figure 1.13 PLC Programming technique using PC computer through serial port.
Production processes are no longer seen as individual processes, but rather as integral
components of an entire production process. The total integrated automation environment
is today achieved with the help of:
One common software environment that integrates all components and tasks into
one uniform easy to use system.
A common data management (central database).
A common communication between all participating automation components.
Siemens one of the leaders in the field of total integrated automation system for their
automation system, see Fig 1.14. Simatic S7 is developed by Siemens for solving the
totally integrated automation system. This platform software coves barriers between
computer, PLC, and process control plus operator interface and monitoring system for
controller process.
Figure 1.14
Simatic and totally
integrated automation system in
Siemens.
Simatic S7 is a family of PLC and cover, micro-plc (S7-200) performance range, (S7-
300) lower/middle range and (S7-400) middle-upper performance range.
Simatic C7 is a complete system combine of the PLC (S7-300) with an operator panel
interface (HMI) and process monitoring system.
Figure 1.15
Simatic S7-300 general
layout.
The general layout of S7-300 PLC with its modules is shown in Fig 1.16. As illustrated in Fig.,
the first slot of the system is the power supply (PS) mounted to top-left side of the figure. Next
slot from the left side is the CPU. Next, IM model (multi-tier) which is option. Next, discrete
input and outputs (SM-DI, SM-DO). Next, the analog input/output models (SM-AI, SM-AO),
followed by the FM model (counter, positioning, closed loop control modules), and finally, CP
module (point-to-point, profibus and industrial Ethernet) communication module.
Figure 1.16 General layout and modules of the Simatic S7-300 system.
a) In the operation mode of the through-beam photoelectric sensor, the emitter and
detector are mounted in separate housings which is aligned carefully so as to face
each other exactly. As the target to be detected approaches, it breaks the beam. In this
type of operation the sensor can work for larger length up to 100 m, provided the
beam is concentrated and the air is clean also the emitter and detector are accurately
aligned. An interesting variation of the through-beam principle can be used as smoke
detector (such as in domestic fire alarm).
b) In the reflection operation mode of photoelectric sensor, the emitter and detector are
built into a single housing, which reduces wiring and mounting cost. The target,
when it reaches the proper location, reflects the beam back into the detector. Since
only part of the emitter light returns to the detector, this mode is only suitable for
fairly small distances, where the air must be reasonably clean of contamination. The
method can be used for detecting the liquid level.
b) Reed Relay
Reed relays are close to the reed switches. However, while reed switches are actuated by
a moving permanent magnet, reed relays contain several reed capsules actuated by one
stationary electromagnet. Thus the armature and mechanical like is eliminated in EMR
and seal reed tubes or capsules replace the contacts. Life is more that EMR, nearly 108
operations, contact rating up to 1 Amp and operating time up to 0.5 msec.
c) Solid state relay
Solid-state relays (SSRs) are invariably compared with EMR and reed relays. Most SSR
switches one circuit, equivalent to SPST relay, see Fig. 1.24. It is not suitable switching
logic operations; used as output elements which interfaces the logic gates to the outside
load.
Figure 1.25
Types of wire sensors, two-wired load-powered sensor, and
three-wired line-powered sensors.
Load-power devices are similar to limit switches. They are connected in series with the
controlled load. These devices have two connection points to the circuit and are often
referred to as 2-wire switches, see Fig 3.8a. In another hand, Line-powered switches
derive their power from the line and not through load, see Fig.3.8b. They have three
connection points to the circuit, and are often referred to as 3-wire switches. The
operating current pulls from the line and is called the Burden Current. This is typically
20mA (e.g. transistor sensor output)
There are mainly three output types: Relay, Traic and Transistor outputs.
Relay output: A relay is a mechanical device that can handle load current at higher
voltage. This allows the sensor to directly interface with motor, solenoids and other
inductive load. They can be used to switch either AC or DC voltage.
A Triac Output: A triac is a solid-state device designed to control AC current. A triac
switch turn on in less than microsecond when its gate (control gate) is energized. As long
as triac is used within its rated maximum current and voltage, triac has infinite life.
A Transistor Output: It is also solid state device designed to control DC current. There
are mainly two types of circuits depending on the switching function:
PNP (Current Source); the sensor is connected to the positive DC and current flows
from the positive terminal through the sensor, to the load, to the negative terminal. The
sensor “sources” the current to the load, see Fig 1.27.
Like electric system, pneumatic actuators can provide either linear or angular
displacements. Pneumatic linear displacement achieved using pneumatic single and/or
double acting cylinders. While, angler displacement commonly achieved using single
and/or double acting air motors. Fig 1.28 – Fig 1.30 show double acting pneumatic
motor, pneumatic double acting cylinders and single acting cylinder respectively. Double
acting actuators, means the actuator can be activated for two directions e.g.
forward/backward or clockwise/counterclockwise rotation.
Figure 1.28
A double acting
pneumatic motor
Figure 1.30
Single acting
pneumatic cylinder (linear
displacement actuator, with
single actuation port)
It is worth noting, increase in pressure will produce high force in case of pneumatic
cylinders, while increase the torque in case of pneumatic motor. In another hand, increase
pneumatic flow will increase cylinder linear speed, while increase the motor RPM in case
of pneumatic motor.
High pressurizes air usually obtained using main air compressor that produce pressure
between 4 to10 bars. This pressure quite high in some applications, hence, pressure
regulator is required to reduce the pressure to the required level.
Figure 1.31
Normally closed limit valve structure (ISI-ANSI symbol)
and corresponding electro-mechanical switch symbol.
Fig 1.31 shows also ISO/ANSI symbol for 3/2 valve. The symbol consist of two squares,
which represent the two position valve, have internal and external notation. External
notation shown on the top of the square for the three ports. In top rectangular, the circle
with center dot notation represent the pressure air supply, while small triangle represent
the exhaust. The output is represented by simple small horizontal line in right direction as
shown in section view. The internal notations cover the arrow directions and T-notation.
Arrow show the flow direction (pressure flow from high to low level), while T-notation
represent that the valve is blocked at that port. Since, the external notation is shown on
the top rectangular, this represent the state of the valve without actuation, while the
second rectangular represent the state of the valve after actuation. Furthermore, the
control signal that actuate the 3x2 valve shown in Fig 4.2 are roller plunger with spring
return. This type of limit valve called 3x2 limit valve with spring return (no mechanical
memory)
Most directional-control valves are of the spool and sleeve type. Fig. 1.33, shows a 5/2
spool valve (schematically). When the spool position or pilot line has been pressurized by
p1 line. Flow line between A & D ports, and B & E posts are passed, while C is blocked.
If pilot line p2 is pressurized, the spool shifted to the lift with corresponding change in
flow paths as illustrated in Fig 4.4. Also, Fig. 4.4 shows also the ISO or ANSI standard
symbol of 5/2 way directional valve. This type of directional valve can be used as SET-
REST mechanical memory in pneumatic circuit.
The main difference between the solenoid actuation directional control valve and pilot
control valve, is the way of displacement of the valve spool. Spool valve displacement is
carried out using two pressurized air p1 and p2 in case of the pilot control valve. While
solenoid and spring mechanisms are used to displace the spool valve in case of the
solenoid actuation directional valve (or simply solenoid directional valve) as shown in
Fig. 1.34. Similarly, solenoid actuation can also be used with 3/2 ways directional valve.
Different control singles can be used to actuate the directional valves, Fig 1.35 show
some of the methods used for different applications. Different pneumatic notations are
shown in Fig 1.36.
Experiment 1
Total Integrated Automation TIA portal V12 software basics
The general layout of S7-300 PLC training laboratory is shown in Fig 2.1.Where three
training stations are shown on lift side and another two stations shown in right side.
Figure 2.1
S7-300 PLC training stations at Industrial Engineering depart
automation laboratory.
Pneumatic simple
network
Pneumatic and
electric switching PC serial
elements/actuators programming media
Figure 2.2
S7-300 training units with pneumatic and electric switching
elements/actuators.
Fig 2.2, shows the detail layout of each training station. As illustrated in Fig, the training
unit consists of five parts given as follows:
i. The S7-300 PLC units, with its input and output modules (discrete and analog
types), CPU, Power supply and communication module, see Fig 2.3.
ii. The pneumatic and electric switching elements/actuators. Which cover six
Pneumatic cylinders with solenoid valve switching element and three
electromechanical relays as electric switch elements (controlled and monitored
using PLC), see Fig 2.4
iv. Pneumatic simple network simulate R/S memory units, which work independent
to PLC as hardwiring control network (manual hardwired pneumatic network),
see Fig 2.5.
v. PC computer unit work as programming media through its serial port through
serial to USB converter (MPI port), see Fig 2.6.
CPU Units
plus MPI Analog
and output
profibus module
communic
ation
Simulation
ports.
module
MPI serial
communication
to PC Terminal
connection for
output modules
Relay Switch
Elements with
auxiliary contacts for
feed-back status
Solenoid switching
elements.
Figure 2.4
The pneumatic and electric switching
elements/actuators.
User push-button
and toggle switches
Pneumatic hardwire
control network
Figure 2.5
Human-Machine Interface HMI) unit, Pneumatic simple network simulate R/S
memory units
2.2.1 Objectives
1. To identify programmable logic controller (PLC), Siemens S7-300 family, and its
modules of the PLC trainer station available in the industrial engineering
department automation laboratories.
2. To identify Siemens S7-300 PLC programming media (TIA Ver 12.0) and carry out
the procedure of opening the 1st step project on the TIA Ver 12.0.
3. To identify, power supply, PLC CPU, discrete and continues hardware mounted on
the training station.
4. Identify how the actual and symbolic address are assigned and mapped to both
discrete and continues PLC modules.
5. Identify different pneumatic and electric switching elements outputs/inputs and
their mapped actual and symbolic address.
6. Open exiting project and identify the software elements and hardware network
available in the training unit.
Switch on both desk-computer connected to the training unit and also the
main switch for the training unit. Follow the steps shown in the following
Figures from 2.7 to 2.14. For each step, try to identify the main fetchers of
the TIA software during opening the existing project.
Figure 2.8
Experiment 1.1.
Choose TIA
Portal V12 Icon
to start the
Software.
Figure 2.8
Experiment 1.2.
Open existing
project Flow
steps as shown
1- Start menu
2- Open exit project
menu.
3- Select existing
project.
4- To view the project
details
5- Current opened
project.
1 3 hardware.
1 2- Properties of the PLC
hardware and address
mapping.
3- Hardware library.
Experiment 2
Open new project on TIA V12 portal
2.3.1 Objectives
1. Open new TIA project and assign station devices.
2. Assign the communication between PLC and HMI as two devices in the network.
3. Assign PLC basic address and tags for input and output modules.
4. Write the 1st program network, download the program, run the program and monitor
the program network during execution through TIA portal monitor view.
2.3.3 Requirement
In current experiment, it is required to repeat the experimental
procedure shown in task 1with opening new project.
Start develops the basic automation network and gets the signature
from laboratory supervisor for each sub-task.
At this stage, you must able to complete all the given sub-task
required and shown in the tabled form at the end of the experiment.
Figure 2.16
Configuring new Device (1),
Figure 2.17
Configuring new Device (2),
2
1- Select Add new device
1 2- Select Controllers and choose
the controller under
SIMATIC S7-300
- CPU
3 - CPU 315-2-DP
3- Select the order no.
4 6ES7 315-2AH14-0AB0
4- Press Add
Add the Remaining devices for the training station, as in Fig 1.34
Figure 2.19
Configuring new Device (4),
Figure 2.20
Configuring new Device (5),
2 3 4 5
1- For DO , DI , AO and AI Start
address could be configured
through the Device overview.
2- Configure as follow:
DO Basic address 4
DI Basic address 0
AO Basic address 320
AI Basic address 300
1
1
PS: Power Supply.
2
DO: Digital Output (Discrete Output).
3
DI: Digital Input (Discrete Input).
4
AO: Analog Output.
5
AI: Analog Input.
1- Select PLC_1.
1 2- Select Download button.
3- Select MPI for Type of the
PG/PC interface.
3
Figure 2.22
Loading project (2),
1
2
3
Figure 2.23
Loading project (3),
2 1- Select Consistent
download.
2- Select Load.
1
1- Select PLC_1
2 3 Program Blocks
Main [OB1]
2- Report Network 1 created
automatically.
3- Report the Basic Instructions
menu.
Figure 2.25
Develop First LAD Network in
Main Block OB1 (2),
1 Equality: SW1=Output1
3 OR gate: SW1+SW2
UNIT 2
Experiment 3
Pneumatic Network
2.4.1 Objectives
1. Identify main components of pneumatic power networks.
2. Identify pneumatic actuators with liner and angular displacements, types and ISO-
ANSI symbols.
3. Identify the pneumatic switching valves, types and ISO-ANSI symbols.
4. Identify pneumatic logic gates and development of pneumatic memory elements.
2.4.3 Requirements
Complete the following tasks shown in the tabled form and get the supervisor
signature for each sub-task.
Experiment 4
Electric logic sensor and actuators
2.5.3 Requirements
Identify the main electric logic sensors available in the laboratory (contact switch,
proximity “two types’ inductive and capacitive types”, photo-detectors “three
types through beam, reflection from target and retro-reflection”).
Identify the main electric logic actuators available in laboratory
(electromechanical relay and solenoid valve “many types)
Connect some of the proximity detectors to PLC input terminal and write small
program showing how the sensor can be used in the control network.
Complete the sub-task required and get the supervisor signature for each task.
Experiment 5
PLC, RLL programming using CASCADE Method
2.6.3 Requirements
Develop the RLL program and check program execution for five common
machine sequences discussed in theory given in lectures.
Complete the sub-task required and get the supervisor signature for each task.
Figure 2.26
Experiment 6
PLC timer, counter,registers and analog input/output functions
2.7.3 Requirements
Develop the RLL program and check program execution for five common
machine sequences discussed in theory given in lectures.
Complete the sub-task required and get the supervisor signature for each task.
Develop RLL program using 10 seconds Duration for Controlling output Q0.6
Through input contact switch I3.1. in the follow cases:
Example 8.5 ; Develop RLL for the given machine sequence using non-sustain
and sustain output signals ? Draw the sequencing chart of the machine
sequence for both cases?
START, A+, 10s delay, A-, B+, 10s delay, C+, B-, C-.
7 Example 8.8