Download as pdf or txt
Download as pdf or txt
You are on page 1of 59

Introduction to

Siemens’ PLC
environment
A brief walkthrough for beginners
Siemens’ Programmable logic
controller
Siemens makes several PLC product lines in the SIMATIC S7 family. They are:
▪ S7-200.
▪ S7-300.
▪ S7-400.
Siemens Step 7 is a powerful integrated software solution for automation, and
includes the programming environment for Siemens programmable logic controllers
(PLCs).
How to start?
▪ Unlike DELTA WPLSoft, Siemens Step 7 requires a set of steps to be taken in order
to begin with a program. Without these you will never be able to run a program
on your desired PLC version to carry out automated tasks. These steps can be:
▪ IP addressing.
▪ Software configuration.
▪ Device selection.
▪ Allowing access to HMI (Optional).
▪ Programming.
These steps are discussed ahead briefly.
IP addressing
▪ In order to allow TIA Portal or SIMATIC Step 7 to link with your connected PLC we
have provide address to the networking protocol (TCP/IPv4) which basically
establishes a set of rules through which our PC communicates with any device.
▪ Since our computer is a also machine, without these set of rules it can never
itself figure out how and what to do.
▪ TCP/IP is a protocol (set of rules) that is applied to devices connected through
ethernet cable.
▪ Obviously, if we miss this step there will be nothing to connect to for our PC and
the PLC cannot function according to our desired criteria.
▪ If there is no PLC to connect to, we can also go for offline simulation through
Totally Integrated Automation Portal software also included in Siemens’ library.
IP addressing
▪ To start addressing, select “Network and Internet” through the Control Panel
and select “Network and Sharing center”.
▪ Select change adapter settings on the left hand side.
▪ In the new network connection window, double click ethernet and select
properties.
▪ A window related to ethernet properties will open. Double click Internet
Protocol version TCP/IPv4.
▪ Under general check the “use the following IP address” option and enter the
valid IP address for your device.
Steps for network setting
Before network setting first remove the
ethernet cable with your router to
disconnect the internet then start your Step 1
network setting

Step 2
Steps for network setting
Steps for network setting
Steps for network setting

Double Click on it
Steps for network setting
Steps for network setting

Double Click on it
(TCP/IPv4)
Steps for network setting

This option already is selected


Steps for network setting

(1) Now select this option


(2) Just write here any random IP
address which should not be matched
with your PLC and HMI IP address
Example>(192.168.0.22)

(3) After writing your IP address just click on it and


then your IP setting would be complete
Configuration
▪ For starting with
configuration of your
device to develop a
program open TIA
portal.
▪ Select “create new
project”.
Configuration
▪ Name the project
adjacent to project
name and click on
create.
Configuration
▪ After this TIA Portal will
open another window
which displays
multiple option to
start off with your
project.
▪ Since, we want to
configure a device
select “configure a
device” under start
on the new window.
Configuration
▪ Select add new
device on the new
window.
Device Selection
▪ Now the software will
offer you a range of
devices to begin with.
▪ Choose the relevant
device. In our case we
have Siemens S7-1200,
so we will select that
version, then CPU and
then the correct
device name.
▪ It is extremely
important that we
select the correct
version and matching
name otherwise all the
next steps related to
operating an external
PLC will be useless.
Device Selection
▪ Double click on the
desired device or
single click and then
press add.
▪ The device will
appear on the new
screen automatically.
Allowing access to HMI (Optional)
▪ After the previous
step there can be two
options.
▪ Whether you want to
design an HMI too or
not.
▪ In case there is an
HMI double click on
the device on the
display
Allowing access to HMI (Optional)
▪ In the window below
the main window, go to
protection and security
and mark the “Permit
access with PUT/GET
communication from
remote partner” as
check.
We will further discuss HMI
designing for the desired program
as an integral part of this lecture.
For now we will move on with
programming.
Allowing access to HMI (Optional)
▪ After doing so You can utilize any HMI designing software to provide a Graphical User
Interface for the user. These apps can be EasyBuilder PRO or any other application
software that is designed to do so.
▪ However, whether or not an HMI is present or not we have to program the main block
which is the set of instruction that basically performs the required automation task and is
the brain for the whole procedure.
Programming
▪ For accessing the main
program window go
and select the program
blocks on the left hand
side under project tree.
▪ Double click main OB1
to kick start your main
window.
Programming
▪ You can begin with your
desired programs here
on this screen. Here we
have multiple options to
choose from. For starters
some basic operators
are defined ahead.
Programming
Some of the useful operators are below:
Normally Open contact
Normally Open contacts are switches that are initially
disconnected, they connect when intentionally toggled to
change.

Normally Closed Contact

Normally Closed contacts are switches that are initially


connected, they disconnect when intentionally toggled to
change.
Programming
Some of the useful operators are below:
Output
The output visualizes the state of the output device effectively by
turning green in case ON otherwise normal in case of being OFF

Empty box

Used for Inserting LAD elements.


Programming
Some of the useful operators are below:
Open branch
Allows parallel connection inside the same network.

Closed Branch

Allows closing of the parallel branch in the same network.


Some Basic
Circuits
Latching programming

❑ The latching is used where the output


must be activated even after the entry
ceases

This program is simply motor start stop

▪ %i0.0 is start button of motor which is


push button.
▪ %I0.1 is stop button of motor which is
also a push button.
▪ %Q0.0 is output motor.
▪ Parallel input %Q0.0 of %I0.0 is latching

Motor latching
Interlocking (forward reverse motor)
Reverse interlock

❑ Interlocking program is simply when


the forward conditional is activated,
at that moment reverse condition will
not be activate until the forward
condition don’t turn off, now the same
situation will also be follow for reverse
motor and working with vise versa.

❑ Motor either rotate forward or reverse,


for the safety purpose we use the
interlocking condition.

Forward interlock
Timers:
 ON delay timer block:
Timers:
 ON delay timer block:
Timers:
 Time pulse
Timers:

ON delay:
❑ ON delay timer is
used when the user
want to turn ON the
output after some
delay according
their acquires
condition, and
output could be
lamp, motor, fan or
any other else which
user want to.
Timers:

OFF delay:
 OFF delay timer is
used when the user
want to turn OFF
the output after
some delay
according their
acquires condition,
and output could
be lamp, motor, fan
or any other else
which user want to.
Timer program:
Flashing

➢ Flashing: The lamp on and off according the user giving time.

Start button Lamp

Memory bit for reset


Off delay

On delay timer
Timer program
Car washing task
Car washing PLC program:
Conveyor Conveyor Conveyor Conveyor Conveyor
stop interlock stop interlock stop interlock stop interlock stop interlock

Conveyor latching

Conveyor start again

Conveyor start again

Conveyor start again

Conveyor start again


Car washing PLC program:
Timer interlock to stop
the soapy water

Timer interlock to stop


the brusher
Timer used for the delay

Timer used for the delay

After some delay


the M0.2 is high
then stop brusher
and start conveyor
After some delay the
M0.1 is high then stop
brusher and start
conveyor
Car washing PLC program: Timer interlock to stop
the dryer

Timer interlock to stop


the clean water
Timer used for the delay

Timer used for the delay

After some delay


the M0.3 is high
then stop brusher
and start conveyor
After some delay the
M0.2 is high then stop
brusher and start
conveyor
Car washing PLC program:

➢ This program is used to stop conveyer after completing process

M0.5 is stop bit to stop


This start input to low the conveyor after some
M0.4 when ever the delay
process start resume for
the next car

Use latching to hold the


M0.4 when the M0.3 is
off due to completing
the process
Timer program
 Star Delta
Star Delta:
Counter:
UP count (CTU): Counter status Current counter value

Counter Up

Reset

Value at which the output Q is set


Counter:
UP down (CTD): Counter status Current counter value

Counter down

Load input

Value to which the CV output is set with LD = 1


Count:
Count up and down (CTUD): Counter up status
Counter up status

Counter Up
Current
counter value
Counter down

Reset

Load input

Value at which the QU


output is set / value to
which the CV output is
set when LD = 1.
Comparator:
Comparator will allow to pass when current the condition will be true

MD10 is the data register to


store the value

When the value will be


greater than 5 the indication
will be ON

When the value will be less


than 4 the indication will be
ON

When the value will be


equal to 7 the indication will
be ON
Move block:
When switch will pressed so the
2 move in MW20 data register

When switch will pressed so the


2 move in MW30 data register
Math operations: When switch will be pressed so
the result of addition stored in
MW10

ADD

MUL

When switch will be pressed so the


result of addition stored in MW20
Counter and comparator program;
Counter and timer program:
Clock:

This timer is used for the


seconds

After 1 second, so this


counter counts the
value of 1 which is 1
second

After 60 seconds, so this


counter counts the
value of 1 which is one
minute

After 60 , so this counter


counts the value of 1
which is one hour
Timer, Counter and Comparator:
Use your Knowledge
and understand the
behavior of output.
What is analog:

➢ An analog signal is one whose value continually varies over time. They are best represented as a
continuous signal like a sine wave. Each point on the wave has a precisely defined value. For
example, analog inputs for PLCs can include signals from pressure transducers and temperature
from thermocouples. Common examples of standard analog I/O are 4 to 20 mA for current and -
-10 to 10 volt for voltage etc.
➢ PLC’s required special card to convert analog the analog signal to digitals signals that the
processor can use.
➢ The card converts the analog signals to a sequence to discrete binary value. The binary value
can only be one of a finite number of values.
Resolution:
➢ A binary number is assigned to a range of analog signal. When the
signal is that range binary value is send to the processor.
➢ The resolution (size of each step) of an input card is determined by how
many bits are used to represent the analog value. The more bits
available the smaller each step is.
➢ The number of bits use is determined the hardware selected.
Analog scaling:

➢ Before analog scaling first we know about the resolution of PLC, resolution can
be different for PLC brands.
➢ Resolution is the number of data which PLC can read, we talk about the siemens
PLC so the resolution of siemens is 0 to 27648,
➢ After finding the resolution then start the scaling.
➢ Why we use analog scaling.
Scaling is just to make for human understandable data. Its depends on the nature
of work and requirement of user.
Steps of scaling:
Now we talk about the I.R sensor and scaled it, same scaling is also for the other
sensors.
Step 1:

IW64 is reserve data


register which reads
the sensor value

Sensor value moves


in another register
Step 2: for the scaling
▪ Define minimum and
maximum rang.
▪ The rang is 0 - 27648

When sensor data


below 0, then move
0 to same register

When sensor data


above 27648, then
move 27648 to
same register
Steps of scaling:

➢ Step 3:
▪ Convert integer to real to show the real
value that can be float values.

Data type int

Data type int

➢ Step 4:
▪ In this step set the rang of physical quantity such
as temperature, water level etc.

▪ If you set the rang in 0 t0 100 the calculation is:

(27648/100)=276.48

▪ If you set the rang in 0 t0 200 the calculation is:

(27648/200)=138.24
Steps of scaling:

➢ Step 3:
▪ The subtraction operation is just to
invert data for the water level tank.
▪ If your rang is 0 – 100 then subtract from
100
▪ If your rang is 0 – 200 then subtract from
200

In this data register


we can get the final
result of scaling.
END

You might also like