Programmable Logic Controller (PLC)

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

Hadhramout University

College of Engineering and petroleum


Dep. Of Electronic & Communication Engineering

Programmable Logic Controller (PLC)

Abdullah Ashoor Subih


.
Advanced Functions

Memo Set Rest Counter


Timers
(marker) flip flop

Comparison Jump
Negative &
Instructions Instructions
Positive Edge

Arithmetic Instructions
Example
(Figure A ) shows a system with two conveyor belts and a temporary
storage area in between them. Conveyor belt 1 delivers packages to the
storage area. A photoelectric barrier at the end of conveyor belt 1 near the
storage area determines how many packages are delivered to the storage
area. Conveyor belt 2 transports packages from the temporary storage area
to a loading dock where trucks take the packages away for delivery to
customers. A photoelectric barrier at the end of conveyor belt 2 near the
storage area determines how many packages leave the storage area to go to
the loading dock. A display panel with five lamps indicates the fill level of
the temporary storage area. Figure A show the ladder logic program that
activates the indicator lamps on the display panel
(Figure A )
AUTOMATIC PACKING MACHINE
Positive RLO Edge Detection

Edge memory bit M 0.0 saves the old state of the


RLO from the complete bit logic combination. If
there is a signal change at the RLO from 0 to 1,
the Output will activate.
Negative RLO Edge Detection

Edge memory bit M 0.0 saves the old state of the


RLO from the complete bit logic combination. If
there is a signal change at the RLO from 1 to 0,
the Output will activate.
Example
- Stamp.
- Run motor by one (Push Bottom)
Example
- Run to motor by one (Push Bottom)
Integer Math Instructions
Add Integer
A signal state of 1 at the Enable (EN) input activates the Add
Integer instruction. This instruction adds inputs IN1 and IN2. The
result can be scanned at OUT. If the result is outside the
permissible range for an integer, the OV and OS bit of the status
word are 1 and the ENO is 0

A signal state of 1 at input I 0.0


activates the ADD_I box. The result of
the addition MW0 + MW2 is put into
memory word MW10. If the result is
outside the permissible range for an
integer or the signal state of input I 0.0
is 0, output Q 4.0 is set.
Subtract Double Integer
A signal state of 1 at the Enable (EN) input activates the Subtract
Double Integer instruction. This instruction subtracts input IN2 from
IN1. The result can be scanned at OUT. If the result is outside the
permissible range for a double integer, the OV and the OS bit of the
status word are 1 and the ENO is 0.

A signal state of 1 at input I 0.0


activates the SUB_DI box. The result
of the subtraction MD0 – MD4 is put
into memory double word MD10. If
the result is outside the permissible
range for a double integer or the signal
state of input I 0.0 is 0, output Q 4.0 is
set.
Divide Integer
A signal state of 1 at the Enable (EN) input activates the Divide
Integer instruction. This instruction divides input IN1 by IN2. The
integer quotient (truncated result) can be scanned at OUT. The
remainder cannot be scanned. If the quotient is outside the
permissible range for an integer, the OV and the OS bit of the
status word are 1 and the ENO is 0

A signal state of 1 at input I 0.0


activates the DIV_I box. The quotient
of dividing MW0 by MW2 is put into
memory word MW10. If the quotient
is outside the permissible range for
an integer or the signal state of input
I 0.0 is 0, output Q 4.0 is set
This example shows you how to use three integer math
instructions to produce the same result as the following equation:

Network 2: Input word IW0 is added to shared data word DBW3 (data block
must be defined and opened) and the sum is loaded into memory word MW100.
MW100 is then multiplied by 15 and the answer stored in memory word MW102.
MW102 is divided by MW0 with the result stored in MD4. As long as all results
are in the permissible range of each instruction, the ENO passes a signal state of
1 to the next box.
Establishing the Exponential Value of a Floating-Point Number

With the Establishing the Exponential Value of a Floating-Point


Number instruction you can establish the exponential value of a
floating-point number to base e (= 2.71828...).

The box EXP is activated when I 0.0 =


1. The result of EXP (MD0) is stored
in the memory double word MD10. If
MD0 < 0 or if the result is outside of
the permissible area for floating-point
numbers or if the signal state of
I 0.0 = 0, output Q 4.0 is set.
Establishing the Square and/or the Square Root of a Floating-Point
Number
With the Establishing the Square of a Floating-Point Number
instruction, you can square a floating-point number. With the
instruction Establishing the Square Root of a Floating-Point Number,
you can extract the square root of a floating-point number. This
instruction produces a positive result when the address is greater than
“0”. Sole exception: the square root of -0 is -0

The box SQRT is activated when I 0.0


= 1. The result of SQRT (MD0) is
stored in the memory double word
MD10. If MD0 < 0 or if the result is
outside of the permissible area for
floating-point numbers or if the signal
state of I 0.0 = 0, output Q 4.0 is set.
Establishing the Trigonometrical Functions of Angles as Floating-
Point Numbers
With the following instructions, you can establish the trigonometrical functions
of angles represented as 32-bit IEEE floating-point numbers
Establishing the Trigonometrical Functions of Angles as Floating-
Point Numbers

The box SIN is activated when I 0.0 = 1. The result of SIN (MD0)
is stored in the memory double word MD10. If the result is outside
of the permissible area for floating-point numbers or if the signal
state of I 0.0 = 0, output Q 4.0 is set.
Establishing the Trigonometrical Functions of Angles as Floating-
Point Numbers
Establishing the Natural Logarithm of a Floating-Point Number

The box LN is activated when I 0.0 = 1. The result of LN (MD0) is


stored in the memory double word MD10. If MD0 < 0 or if the result
is outside of the permissible area for floating-point numbers or if the
signal state of I 0.0 = 0, output Q 4.0 is set.
Jump Instructions

There are three types of Jump Instructions

SELF
STUDY
Unconditional Jump
The jump is executed every time. None of the instructions between
the jump operation and the label is executed.

The address of a Jump instruction is


a label. A label consists of a
maximum of four characters. The
first character must be a letter of the
alphabet; the other characters can be
letters or numbers (for example,
SEG3). The jump label indicates the
destination to which you want the
program to jump.
The Conditional Jump instruction
The Conditional Jump instruction corresponds to a “go to label”
instruction if RLO = 1

f the signal state of input I 0.0 is 1,


the jump to label CAS1 is executed.
The instruction to reset output Q 4.0
is not executed, even if the signal
state of input I 0.3 is 1.
Jump-If-Not
The Jump-If-Not instruction corresponds to a “go to label”
instruction that is executed if the RLO is 0.

If the signal state of input I 0.0 is 0,


the jump to label CAS1 is executed.
The instruction to reset output Q 4.0
is not executed, even if the signal
state of input I 0.3 is 1.

None of the instructions between the


Jump operation and the label is
executed.
Examples
Figure below shows a conveyor belt that can be activated electrically. There are
two push button switches at the beginning of the belt: S1 for START and S2 for
STOP. There are also two push button switches at the end of the belt: S3 for
START and S4 for STOP. It possible to start or stop the belt from either end. Also,
sensor S5 stops the belt when an item on the belt reaches the end
Examples
Examples

The figure below shows a conveyor belt that is equipped with two
photoelectric barriers (PEB1 and PEB2) that are designed to detect
the direction in which a package is moving on the belt. Each
photoelectric light barrier functions like a normally open contact
Examples
Here we are going to stop this course

Remember:
you must move forward…

Continuous Improvement

Advanced SCADA
PLC HMI System
Advanced PLC
Function Modules (FM) - for all technologies

The right choice when

... tasks have to be taken care


of at top speed
... The very highest accuracy
and reproducibility are
required
... Special sensors or actuators
are required
... technological tasks require
practical solutions

Counting, measuring, cam control,positioning, closed-loop control


Advanced PLC
With S7-300 to all communication networks

Data communication; Distrib. Intelligence Field communication

Data and field communication


Advanced PLC
With S7-300 to all communication networks
Advanced PLC
Profi-bus(PA-DP)
S7-300

PLC

PG (Master)

ET 200U (Slave)
ET 200M
(Slave)

ET 200X (Slave)
ET 200B/L
(Slave)

Profibus-DP
SENSORS S7-300
Advanced PLC
Profi-bus
Advanced PLC
SIMATIC Human-Machine Interface - The window to your plant/process/machine

SIMATIC Panels: Panel PC or OS


 Push Button Panels, Text
Displays, Operator Panels, WinCC
Touch Panels or Multi Panels
via MPI or PROFIBUS-DP
MPI
 Multi Panels for an S7-300
 One panel for several
automation systems

WinCC flexible - for simple Multi Panels


Push
PC-based visualization tasks Button
Panels

WinCC V6- the powerful process Text Displays,


visualization system Operator Panels,
Touch Panels

Easy parameterizing
Advanced PLC
Automation system as E-mail sender
SCADA system Hardware
SCADA system
TIP 1 CONTIUOUS IMPROVEMENT
CONTIUOUS IMPROVEMENT

TIP 2 CONTIUOUS
CONTIUOUSIMPROVEMENT
IMPROVEMENT

TIP 3 CONTIUOUS IMPROVEMENT


CONTIUOUS IMPROVEMENT

Lorem ipsum dolor sit amet, consectetuer


adipiscing elit. Maecenas porttitor congue
massa.

THANK YOU
Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Maecenas porttitor congue
massa.

GOOD LUCK
Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Maecenas porttitor congue
massa.

ABEDULLAH ASHOOR

You might also like