SlideShare a Scribd company logo
Programmable Logic
Controller 101
A tool for Automation
By: Engr. Wendell Agasen
Overview
What is a control System?
Fundamentals of PLC?
PLC hardware and basic operation
Sensor and output devices
Control program
Types of PLC programming language
Summary
Introduction to ladder diagram
PLC programming Exercises
Bonus programming (ST &SFC)
WGA_PLC_02092016
WGA_PLC_02092016
Control System
WGA_PLC_02092016
Human Control System
INSTRUMENTATION AND CONTROL
WGA_PLC_02092016
WGA_PLC_02092016
Fundamentals of PLC
What is PLC?
WGA_PLC_02092016
Hard
wiring
Soft
wiring
Hard wire circuit
using a NO switch
WGA_PLC_02092016
Hard wired circuit using a relay
Soft wiring using a PLC
WGA_PLC_02092016
PLC
DC
So any idea what is a PLC?
WGA_PLC_02092016
network
digital inputs
digital outputs
analog inputs / outputs
WGA_PLC_02092016
It is a device that is used to control an
output equipment base on the input
signal.
The PLC works by looking at its inputs,
executes a user defined program, check
for error during program execution and
then update outputs if no error
encountered.
What exactly is a PLC?
WGA_PLC_02092016
Why use a PLC?
Consider the following design requirements
Design and build a circuit to operate
a 10 submersible pumps with its
corresponding interlocks of tank
level, discharge pressure and motor
protection sensor.
WGA_PLC_02092016
Assuming your design required
65 relays to be installed in a
350 x 300 x 150 mm panel?
1 PLC
Over 200 possible
relay, timer,
counter, real time
clock,
combination
25 Timers
25 Switches
65
Relays
How about if you
have timers
switches?
How many PLC do you need for the
given number of relays, switches,
and timers?
1 PLC
Over 200
possible relay,
timer, counter,
real time clock,
combination
WGA_PLC_02092016
Installation mounting, wiring, and commissioning
Troubleshooting
Configuration and reconfiguration
Remote monitoring
Networking
Major issues of conventional relay circuit
WGA_PLC_02092016
Which is better?
RELAY CIRCUITS PLC
WGA_PLC_02092016
VS
Comparison with other control system
WGA_PLC_02092016
WGA_PLC_02092016
PLC Hardware
19
Major Components of a Common PLC
CPU
POWER
SUPPLY
I M
N O
P D
U U
T L
E
O M
U O
T D
P U
U L
T E
PROGRAMMING
DEVICE
From
SENSORS
Pushbuttons,
contacts,
limit switches,
Sensing devices
Proximity sensors
Light detector
To
OUTPUT
Solenoids
Contactors
motors
any electrical
devices
YOU
Memory
WGA_PLC_02092016
20
POWER SUPPLY
Provides the voltage needed to run the primary PLC components
I/O MODULES
Receive signal from external input devices, performs signal conversion and
provide appropriate signal to external devices.
CPU
Provides intelligence to command and govern the activities of the entire PLC
systems.
PROGRAMMING DEVICE
Used to enter the desired program that will determine the sequence of operation
and control of process equipment or driven machine.
Major Components of a Common PLC
WGA_PLC_02092016
PROGRAMMABLE LOGIC CONTROLLERS (PLC)
WGA_PLC_02092016
Programming Terminal PC Connection
memory expansion port
communications port
TSX37-22
I/O Modules
Common PLC Hardware
Modicon
WGA_PLC_02092016
WGA_PLC_02092016
Power Supply
I/O Modules
Siemens
Common PLC Hardware
CPU
Memory
WGA_PLC_02092016
CPU
Allen Bradley
Common PLC Hardware
I/O Modules
Power Supply
WGA_PLC_02092016
PLC Basic operations
WGA_PLC_02092016
PHASE 2
Program
Execution
PHASE 3
Diagnostics/
Comm
PHASE 4
Output
Scan
PHASE 1
Read Inputs
Scan
PLC Operations
Step 1-CHECK INPUT STATUS - PLC takes a
look at each input module to determine if it is on or
off, or reads analog measurement value
Step 2-EXECUTE PROGRAM - PLC executes your
program one instruction at a time.
Step 4-UPDATE OUTPUT STATUS -PLC updates
the status of the outputs. It updates the outputs based
on which inputs were on during the first step and the
results of executing your program during the second
step. is true.
Step 3-DIAGNOSTIC AND COM – PLC preforms
diagnostic and communication task
Repeat Cycle
WGA_PLC_02092016
Read all field input devices via the input interfaces, execute
the user program stored in application memory, then, based
on whatever control scheme has been programmed by the
user, turn the field output devices on or off, or perform
whatever control is necessary for the process application.
Scanning is the process of sequentially reading the inputs,
executing the program in memory, and updating the outputs.
Scan time (cycle time) – the time to complete one PLC
operation (step 1 to 4).
Basic Function of a Typical PLC
WGA_PLC_02092016
Types of PLC
Types of PLC
Medium PLC
Large PLC
Small
WGA_PLC_02092016
Monolithic (one-piece) construction
Fixed casing
Fixed number of I/O (most of them binary), up to 128 I/O’s and memories
up to 2 Kbytes.
No process computer capabilities (no MMC)
Can be extended and networked by an extension (field) bus
Sometimes LAN connection
Mono-processor
Small or compact
Medium PLC
Modular design
It has up to 2048 I/O’s and memories up to 32 Kbytes
Large PLC
Modular with network of Remote IOs (RIO)
It is the most sophisticated units of the PLC family. They have up to
8192 I/O’s and memories up to 75 Kbytes.
It can control individual production processes or entire plant.
Individual PLC Section
Let us consider a medium type PLC
PLC Rack
PLC
sections
WGA_PLC_02092016
Power Supply Section
The PS output provides power to every module
in the PLC; however, it does not provide the DC
voltages to the PLC's peripheral I/O devices.
WGA_PLC_02092016
Central Processing Unit (CPU)
The processor section makes the
decisions needed by the PLC so that it
can operate and communicate with other
modules.
Executes the programs.
It has memory section. This size tells us
how many locations are available in the
memory for storage. Additional memory
modules can be added to your PLC
system as the need arises.
Flash Memory
sometimes EEPROM
WGA_PLC_02092016
Input Module
The input module has two functions:
– reception of an external signal
– and status display of that input
point.
The input to an input module is either a
discrete or analog signal.
WGA_PLC_02092016
Input Module
Typical types of input modules
Analog input (4-20 mA or 0 -10 Vdc).
DC voltage (110, 220, 14, 24, 48, 15-30V)
AC voltage (110, 240, 24, 48V)
TTL (transistor-transistor logic) input (3-15VDC).
Word input (16-bit/parallel).
Thermocouple input.
Resistance temperature detector.
High current relay.
Low current relay.
Latching input (24VDC/110VAC).
Isolated input (24VDC/85-132VAC).
WGA_PLC_02092016
Output Module
The output module transmits discrete or analog
signals to activate various devices such as hydraulic
actuators, solenoids, motor starters, and displays
the status (through the use of LEDs) of the
connected output points. Signal conditioning,
termination, and isolation are also part of the
output module's functions.
WGA_PLC_02092016
Output Module
Some typical output modules available today include the
following:
DC voltage (24, 48,110V) or current (4-20 mA).
AC voltage (110, 240v) or current (4-20 mA).
Isolated (24VDC).
Analog output (12-bit).
Word output (16-bit/parallel).
WGA_PLC_02092016
WGA_PLC_02092016
Sensors and Output device
Sensor
WGA_PLC_02092016
DI CPU DOSENSOR
ACTUATORS
MOTORS
ETC
PLC
- Translates physical events to electrical signal
Sensor
I. Digital/logical sensor – detect the state of an event (either True or
False)
Mechanical switch
1. Contact (float switch, position switch etc.)
2. REED switch (electromagnetic switch)
Proximity Switch
1. Capacitive ( detect non metal object)
2. Inductive ( detect metal object)
3. Photo sensor (uses light to detect almost all types of
object)
WGA_PLC_02092016
Sensor
II. Analog/continuous sensor
Detect variable physical events and convert it into a
corresponding proportional electrical signal. This sensors normally
requires a transmitter to amplify and condition the analog sensor
output to a level acceptable for transmission and detection of DI
module in either voltage (0 to 10Vdc) or currents (4-20 mA).
Level Sensor (ultrasonic, pressure, capacitive, mechanical)
Flow Sensor (ultrasonic, pressure , electromagnetic, etc)
Pressure Sensor ( Bourdon tube)
Temperature Sensor (RTD, Thermocouple)
Speed transmitter Sensor ( tachometer)
Force, torque, position sensor, etc.
WGA_PLC_02092016
Output devices
WGA_PLC_02092016
DI CPU DOSENSOR
ACTUATORS
MOTORS
ETC
PLC
Output devices
I. Digital/Logical controlled output devices
Digital controlled actuators
Convert command signal from DO module into mechanical
motion, which will either directly or indirectly control a
process.
Solenoid – electrical current to a limited linear motion
Solenoid valve – redirect flow of gas or fluids
Hydraulic controlled actuators – to control large and rigid
load at lower speed.
Pneumatic controlled actuators – to control small and not
stiff load at higher speed. Use combination of solenoid valve
and cylinders
Electrical (motor) controlled actuators
WGA_PLC_02092016
Output devices
Digital controlled Motors
Receive command signal from PLC to start and stop. Low
current motors can be directly connected to PLC DO
module. However large and high current rated motor
requires a relay, contactor or motor control devices.
Below are some motor control devices typically use in
industry
DOL (Direct on line)
Soft starter
WGA_PLC_02092016
Output devices
II. Continuous control output devices
Continuous controlled actuators
Allows the system output to be adjusted to pre determine
range of values.
Hydraulic controlled actuators with a positioner – to control
large and rigid load at lower speed.
Pneumatic controlled actuators with a positioner – to
control small and not stiff load at higher speed. Use
combination of solenoid valve and cylinders
Electrical (motor) controlled actuators with a positioner
Cylinder with a position feedback.
WGA_PLC_02092016
Output devices
Continuous controlled motor
The motor can be controlled using additional motor
control devices such as VFD
VFD – Variable Frequency Drives, rotor speed will
vary in proportion to input signal from AO module.
Normally, AO output signal is 4 – 20 mA.
Configuration and parameterization are done in
VFD and SCADA. Settings in VFD and SCADA should
match to avoid any have a proper control.
WGA_PLC_02092016
WGA_PLC_02092016
Interfacing of external device to
IO modules
Selection of Sensor
Voltage
Direct current (12-24, 10
-60 Vdc)
AC (24 Vac, 100-240Vac)
Direct current (5 Vdc)
Sensor
Relay type (Dc rating)
Relay type (Ac rating)
or mechanical switch
Transistor (TTL)
WGA_PLC_02092016
Basic circuit of Digital Input
WGA_PLC_02092016
Sinking and Sourcing
Sinking – if Active, the output will allow the current
to flow to a common reference voltage (-). This is
best selected when different voltage are supplied
Sourcing – if Active, the output will allow the
current from common source (+) through the
input/output devices and to the ground. This
method is best used when all devices uses single
supply voltage.
WGA_PLC_02092016
Sourcing sensor and Sinking DI
WGA_PLC_02092016
Sinking DI module
Sensor
Output
Circuit
Source (+)
PNP or Sourcing sensor
Provide a pathway to a Source (+)
To PLC Input
Sinking sensor and Sourcing DI
WGA_PLC_02092016
Sourcing DI module
Sensor
Output
Circuit
From PLC Input
Common (-)
NPN or Sinking input sensor
Provide pathway to a common (-)
Interface b/n Sensor & DI module
WGA_PLC_02092016
Conclusion (sensor/DI interconnection)
Sensor (transistor)
Sinking (NPN)
Sourcing(PNP)
Digital Input module
Sourcing (Common +)
Sinking (Common -)
WGA_PLC_02092016
Sink/Source input
WGA_PLC_02092016
Same concept is applicable to DO module
WGA_PLC_02092016
Discrete Analog Inputs
Rectifier circuit is added to opto-
coupler circuit
AC input module requires longer
recognition time than DC input
module.
However AC signal are more
immune to noise than DC.
Suitable for long distances and
noisy environments.
Common
Input 0
Input 1
AC
Switch
Switch
P
L
C
WGA_PLC_02092016
Analog Modulating Inputs
• For transmitter it can be,
– Analog Current (0/4 to
20 ma)
– Analog Voltage (0-
10VDC)
• You need power source to
power up the transmitters.
Common
Input 0
Input 1
24
VDC
P
L
C
Transmitter(+) (-)
WGA_PLC_02092016
Discrete - Relay Outputs
A relay is non-polarized and typically it can
switch either AC or DC.
Here the common is connected to one
end of our power supply and the other
end of the supply is connected to the
load. The other half of our load gets
connected to the actual plc output you
have designated within your ladder
program.
When the program like ladder tells the
output to turn on, the plc will internally
apply a voltage to the relay coil. This
voltage will allow the proper contact to
close. When the contact closes, an
external current is allowed to flow
through our external circuit. When the
ladder tells the plc to turn off the output,
it will simply remove the voltage from the
internal circuit thereby enabling the
output contact to release.
Internal Circuit
Coil Coil Coil
Contact Contact Contact
COM COM0100 0101 0102
Etc,
Note:
0100, 0101, 0102 are output relay
designated in the program.
WGA_PLC_02092016
Discrete -Transistor Outputs
• Transistor can only switch a dc
current. For this reason it cannot
be used with an AC voltage.
• Transistor are solid-state switch. A
small current applied to the
transistors "base" lets us switch a
much larger current through its
output.
• Transistor is fast, switches a small
current, has a long lifetime and
works with dc only.
Internal Circuit
Photo coupler
COM 0100
Etc.
WGA_PLC_02092016
Analog Modulating Outputs
• For transmitter it can be,
– Analog Current (0/4 to
20 ma)
– Analog Voltage (0-
10VDC)
Common
Input 0
Input 1
P
L
C
Field
Devices
(+)
( - )
WGA_PLC_02092016
How to set up your PLC
Choose a chassis.
Count the number of input (digital
or analog)
Count the number of output (digital
or analog)
From the number of I/O compute
for the power consumption and
select the correct power supply.
InputInputInput Output OutputChoose your processor
WGA_PLC_02092016
WGA_PLC_02092016
Control Program
PLC program
The PLC hardware requires a PLC
program.
There are many types available in
building a program. Typical are as
follows,
– Ladder Logic
– Structured text
– Function block diagram
– SFC (Sequential Function Charts).
– Instruction list
Regardless of which method is chosen,
it will be executed by the PLC's CPU
module. The software can be written
and executed with the processor in an
online state or in the off-line state
WGA_PLC_02092016
Sample Application
Here, we want the fill motor to pump
the fluid into the tank until the high
level sensor turns on. At that point we
want to turn off the motor until the
level falls below the low level sensor.
Then we should turn on the fill motor
and repeat the process.
Input (High Level)
Input
(Low Level)
Output (Motor)
Level
Controller
WGA_PLC_02092016
Ladder program
Low
Level
High
Level Internal PLC Coil
Motor Contact
Internal PLC Relay
Internal PLC Relay
END
WGA_PLC_02092016
WGA_PLC_02092016
Types of programming language
IEC 61131
IEC 61131 -1 Overview
IEC 61131 -2 Requirements and Test
procedures
IEC 61131 -3 Data Types and Programming
IEC 61131 -4 User Guidelines
IEC 61131 -5 Communications
IEC 61131 -7 Fuzzy Control
WGA_PLC_02092016
IEC 61131 – 3 Programming Languages
Five standard programming languages
Ladder Logic (LD)
Structured text (ST)
Function block diagram (FBD)
Sequential Function Charts (SFC )
Instruction list (IL)
WGA_PLC_02092016
Ladder Logic (LD)
Most widely used
Initially invented to replace hardwired relay
circuit
Graphical representation of control circuit
with a series of control inputs needing to
made true to activate one or more output.
Ideal for simple control circuit, but difficult to
implement for advance and complex control
system such as PID, mathematical calculation
and data analysis.
WGA_PLC_02092016
Ladder Logic (LD)
WGA_PLC_02092016
Functional Block Diagram
Second widely used programming language
Interconnection of functional block to
represent a graphical representation of the
control circuit.
Easier to follow process flow. Just follow the
path!
WGA_PLC_02092016
Functional Block Diagram
WGA_PLC_02092016
Structured Text (ST)
Similar to a high level computer programming
such as “C”.
Mobility from non-PLC programs
Highest rate of adoption
Ideal for more complex control circuit
requirements such as mathematical
calculations, data analysis, decision loops,
Faster execution time than LD,FBD and SFC.
Not maintenance friendly
WGA_PLC_02092016
Structured Text (ST)
WGA_PLC_02092016
Sequential Function charts (SFC)
Similar to computer flow charts
Consist of Step and transition
Starting point is the initial action box
Step or Action Box (equipment status
represented by a variable or a
code of any language)
Transition (input variables or conditions)
Easiest to implement
Maintenance friendly/Easy to trouble shoot
Slowest execution time
Not applicable to all applications
WGA_PLC_02092016
WGA_PLC_02092016
Sequential Function charts (SFC)
WGA_PLC_02092016
Instruction List (IL)
Text based non graphical
A low level language similar to assembler
language use microprocessor programming
Very step by step in layout and format
Can be move easily between hardware
platforms
Fastest execution time
Not maintenance friendly.
WGA_PLC_02092016
Instruction List (IL)
WGA_PLC_02092016
Instruction List (IL)
WGA_PLC_02092016
Data Type
WGA_PLC_02092016
Sensor
PLC
Hardware – I/Os(DI, AI, DO, AO), CPU, Memory, PS
Operation – Scan input, execute program,self diagnostic and Scan
output
Control programs – As per IEC 611313 – 3 ( LD, FBD, ST, SFC and
IL)
Output devices
Interfacing of external devices
Source and sinking.
Sensor (sink) – DI (source), Sensor (Source) – DI (Sink)
Sensor (Either sink or source) – DI (sink and source)
Configuration in DO is the same if the output devices is transistorized
Internal switching component of IO module
Relay – for AC/DC
Transistor – for low rating DC and AC (with rectifier circuit0
TRIAC– higher rating AC DC
WGA_PLC_02092016
Summary
Programming Language
IL – Mnemonic programming
ST – C or BASIC like programming
LD – Relay logic diagram based
FBD – Graphical data flow
programming method
SFC – Graphical method of
structuring programs
WGA_PLC_02092016
Summary
WGA_PLC_02092016
II - Introduction to
Ladder programming
Ladder Diagrams
Ladder Diagrams is the oldest programming language for PLC
based on relay intuition of electricians.
widely in use outside Europe.
not recommended for large new projects.
Consist of rung and rail
Rung 0
Rung 1
Rung 2
Input (contact) Output (Coils)
WGA_PLC_02092016
Ladder Diagrams
The main Ladder Diagrams symbols represent the elements:
NO contact (input), %I
NC contact (input), %I
Coil (output), %Q
WGA_PLC_02092016
Contact
WGA_PLC_02092016
Coils
WGA_PLC_02092016
Control Elements
WGA_PLC_02092016
Operate block & Compare block
WGA_PLC_02092016
Operate block & Compare block
WGA_PLC_02092016
WGA_PLC_02092016
Ladder Diagrams
Network by network based on the object links
from above and below.
Execution between networks shall be from top
to bottom except if it is influence by control
element.
Processing of network is ended before
processing begins on another network
WGA_PLC_02092016
Execution sequence of Networks
Signal flow for Boolean link is:
Left to right for horizontal link
Top to Bottom for vertical link
Rung is one line from left rail (power) to right
rail (neutral).
WGA_PLC_02092016
Signal flow within a Network
Link – Highest priority
Network by network
Rung by rung – Lowest priority
WGA_PLC_02092016
Signal flow within a Network
Ladder Diagrams
01 02
50
01
02
03 50
03
relay coil
(bobine)
break contact
(contact repos)
make contact
(contact travail)
corresponding
ladder diagram
origin:
electrical
circuit
50 05
44
rung
"coil" 50 is used to move
other contact(s)
WGA_PLC_02092016
Ladder Diagrams
Binary combinations are expressed by series and parallel relay contact:
+ 01 02
50
Coil 50 is active (current flows) when 01 is active and 02 is not.
01
02 50
Series
+ 01
40
02
Coil 40 is active (current flows) when 01 is active or 02 is not.
Parallel
Ladder Diagrams representation “logic" equivalent
01
02 40
WGA_PLC_02092016
Ladder Diagrams
Ladder Diagrams diagram for a batch process: filling a container with a liquid,
mixing the liquid, and draining the container. The sequence of events is as follows:
1. fill valve opens and lets the liquid into the container until it is full.
2. liquid in the container is mixed for 3 minutes.
3. a drain valve opens and drains the tank.
O = output
I = input
Address of variable
(module number,
port number)
WGA_PLC_02092016
Ladder Diagrams (PLC termination)
Consider a PLC with one input module and one output module. Two external switches
(SW-0 & SW-1) are connected via terminal IN-0 and In-1 of input module. Two
terminals of the output module (OUT-0 & OUT-1) drive two indicator lamps (Lamp-0 &
Lamp-1).
WGA_PLC_02092016
WGA_PLC_02092016
III - PLC programming
exercises using LD
Application # 1 – Detection of fallen bottle
Control philosophy Illustration
WGA_01312016 105
Condition: Fallen bottle will be
push to outside the conveyor
Input sensor: Capacitive sensor
“X0” & “X1”
Output device: Pneumatic
pushing pole “Y0”
Application # 2 – two location control
Control philosophy Illustration
t 106
Input: S1 & S2
Output: L1
Condition_1: Lamp L1 will switch on
and off if either of switch S1 is
activated
Condition_2: Switch S1 and S2 are
replace with Push button switch.
L1
S2
S1
Application # 3 – Car entry/exit control
Control philosophy Illustration
WGA_PLC_02092016
Input: Sensor I1 and I2
Output: “GO signal light” Q1 ,
“STOP signal light” Q2 and stopper
Q3
Condition_1: Initially stop is active.
Stop light is off, Go light is on and
Stopper will go up if I1 is active
Condition_2: Stop light is on, Go
light will off and stopper will move
down if I1 and I2 is not active.
Application # 4 – Latching circuit
Control philosophy Illustration
WGA_PLC_02092016
Input: Push button I1(start), I2(stop)
and I3(test)
Output: Ceiling fan Q1
Condition: Push Start button to
activate ceiling fan, and push stop
button to stop. Push test button to
test temporary activate fan.
Application # 5 – Latching circuit (set/reset function)
Control philosophy Illustration
WGA_PLC_02092016
Input: Push button I1(start), I2(stop)
and I3(test)
Output: Ceiling fan Q1
Condition: Use set reset function
Application # 6 - Forward/reverse motor control
WGA_PLC_02092016
Application # 6 - Forward/reverse motor control
WGA_PLC_02092016
Control philosophy Illustration
Input: Push buttons FWD,REV,STOP
Output: Forward contactor M1,
Reverse contactor M2. Safety
interlock “overload protection” OL
Condition: Press PB_Fwd to operate
motor Forward,PB_Rev for Reverse.
PB_Stop to stop. Motor stop if OL
circuit is activated.
Application # 7 – Sequential start
Control philosophy Illustration
WGA_PLC_02092016
Providing lube for the gear box
the lathe spindle starts to run. Oil
pump starts first before main
pump can be starts
Application # 8 – Level and pressure control
Control philosophy
Inputs: 1 pressure switch
3 level sensor
Output: Pump “M1” and
Solenoid valve “K”
Condition 1: Pump will run according
discharge pressure set point in the
pressure tank. Incorporate a delay 20
sec prior to stopping
Condition 2: Refilling through
solenoid valve “K” will be controlled
by float switch “S2” and “ S3”
Condition 2: Pump “M1” will stop
when a level is near the pipe suction
elevation. (Dry run protection).
Illustration
WGA_01312016 113
Application # 9 – Entry/exit control for underground
car park (for attendees)
Control philosophy Illustration
WGA_PLC_02092016
Application # 11 – Participant request
WGA_PLC_02092016
WGA_PLC_02092016
Basics of Structured
Programming
IF function (Logical branching)
Syntax
If ….. End_if
If ….. Else….. End_if
If ….. Elseif ….. End_if
Flow chart
WGA_PLC_02092016
WGA_PLC_02092016
TIMER:=%S6; (* System bit, time base, 1 sec*)
COUNTER := 0;
IF TIMER THEN
IF COUNTER = 0 THEN
COUNTER_SEC:=COUNTER_SEC+1;
END_IF;
COUNTER:= COUNTER + 1;
ELSE
COUNTER:=0;
END_IF;
IF COUNTER_SEC >= 61 THEN
COUNTER_MIN:= COUNTER_MIN+1;
COUNTER_SEC:=1;
END_IF;
IF COUNTER_MIN >= 60 THEN
COUNTER_HOUR:= COUNTER_HOUR+1;
COUNTER_MIN:=0;
END_IF;
IF COUNTER_HOUR >23 THEN
COUNTER_HOUR:=0;
END_IF;
Syntax
Case ….. Of
Else …… End_Case
CASE SELECT OF
1: C := B + A;
2,3: C := B - A;
5..10: C := C;
ELSE
• C:= B*A;
END_CASE;
Flow chart
WGA_PLC_02092016
Case function (multiple Branching)
While Function (Looping)
Syntax
WHILE ….. DO
END_WHILE;
PEOPLE:= 0
WHILE PEOPLE<1 DO
COUNTER:=COUNTER+1;
END_WHILE;
Note: test condition then
execute
Flow chart
WGA_PLC_02092016
Syntax
REPEAT
UNTIL ……
END_REPEAT;
G:=1;
REPEAT
G:=G+1;
UNTIL G>100
END_REPEAT ;
Note: execute then test
condition
Flow chart
WGA_PLC_02092016
Repeat function (Looping)
For function (Looping)
Syntax
FOR A TO B BY C DO
END_FOR;
FOR I:= 2 TO 3 BY 1 DO
D:=D+1;
END_FOR;
Flow chart
WGA_PLC_02092016
WGA_PLC_02092016
Basic of Sequential
function Chart
Simple Sequence
WGA_PLC_02092016
Divergence of a Selective Sequence
WGA_PLC_02092016
ONLY ONE PATH
IS ALLOWED
Convergence of a Selective Sequence
WGA_PLC_02092016
ONLY ONE PATH
IS ALLOWED
Divergence of a Simultaneous Sequence
WGA_PLC_02092016
BOTH STEP WILL BE
ACTIVATED
Convergence of a Simultaneous Sequence
WGA_PLC_02092016
BOTH STEP SHOULD
BE ACTIVE
Application # 12 – SFC
WGA_PLC_02092016
Control Parameters
Control Inputs
Sample detection
sensor
Automatic PB
Stop PB
Reset PB
Lower limit switch
Upper limit switch
Output
Solenoid valve for Piston up
Solenoid valve for
Piston down
Auto mode indicator LED
Sample part holder
WGA_PLC_02092016
WGA_PLC_02092016
Salamat sa Pagdalo!
WGA_PLC_02092016

More Related Content

What's hot

Use of plc in industrial automation
Use of plc in industrial automationUse of plc in industrial automation
Use of plc in industrial automation
Aloka Patro
 
Plc (PROGRAMMABLE LOGIC CONTROLLER)
Plc (PROGRAMMABLE LOGIC CONTROLLER)Plc (PROGRAMMABLE LOGIC CONTROLLER)
Plc (PROGRAMMABLE LOGIC CONTROLLER)
Urval Chotalia
 
automatic mixing & filling bottle using PLC
automatic mixing & filling bottle using PLCautomatic mixing & filling bottle using PLC
automatic mixing & filling bottle using PLC
Leelu Veerendra Pulagam
 
PLC basic concepts
PLC  basic conceptsPLC  basic concepts
PLC basic concepts
Yasir Hashmi
 
SIEMENS S7-300c.ppt
SIEMENS S7-300c.pptSIEMENS S7-300c.ppt
SIEMENS S7-300c.ppt
Sidharth Mohapatra
 
Plc
PlcPlc
ppt on PLC automation
ppt on PLC automationppt on PLC automation
ppt on PLC automation
Md Talib
 
PLC Brief
PLC BriefPLC Brief
PLC Brief
Tamer salem
 
Plc example presentation
Plc example presentationPlc example presentation
Plc example presentationRoshit Kadiru
 
Programming logic controllers (plc)
Programming  logic controllers (plc)Programming  logic controllers (plc)
Programming logic controllers (plc)Sudhir Reddy
 
Plc notes
Plc notesPlc notes
Plc notes
Nishant Bhamare
 
Summer training plc & scada
Summer training  plc & scada Summer training  plc & scada
Summer training plc & scada
Arshit Rai
 
Introduction to plc (s7)­
Introduction to  plc (s7)­ Introduction to  plc (s7)­
Introduction to plc (s7)­
majitra
 
INDUSTRIAL AUTOMATION USING PLC
INDUSTRIAL AUTOMATION USING PLCINDUSTRIAL AUTOMATION USING PLC
INDUSTRIAL AUTOMATION USING PLC
Mehvish Mushtaq
 
Dcs course
Dcs courseDcs course
Dcs course
Mohamed A Hakim
 
plc-basics.pptx
plc-basics.pptxplc-basics.pptx
plc-basics.pptx
AyyarKandasamy1
 

What's hot (20)

Use of plc in industrial automation
Use of plc in industrial automationUse of plc in industrial automation
Use of plc in industrial automation
 
Plc (PROGRAMMABLE LOGIC CONTROLLER)
Plc (PROGRAMMABLE LOGIC CONTROLLER)Plc (PROGRAMMABLE LOGIC CONTROLLER)
Plc (PROGRAMMABLE LOGIC CONTROLLER)
 
Plc ppt
Plc pptPlc ppt
Plc ppt
 
Industrial Automation
Industrial AutomationIndustrial Automation
Industrial Automation
 
automatic mixing & filling bottle using PLC
automatic mixing & filling bottle using PLCautomatic mixing & filling bottle using PLC
automatic mixing & filling bottle using PLC
 
PLC basic concepts
PLC  basic conceptsPLC  basic concepts
PLC basic concepts
 
SIEMENS S7-300c.ppt
SIEMENS S7-300c.pptSIEMENS S7-300c.ppt
SIEMENS S7-300c.ppt
 
Plc
PlcPlc
Plc
 
ppt on PLC automation
ppt on PLC automationppt on PLC automation
ppt on PLC automation
 
Plc presentation
Plc presentation Plc presentation
Plc presentation
 
PLC Brief
PLC BriefPLC Brief
PLC Brief
 
Plc example presentation
Plc example presentationPlc example presentation
Plc example presentation
 
Programming logic controllers (plc)
Programming  logic controllers (plc)Programming  logic controllers (plc)
Programming logic controllers (plc)
 
Plc basics
Plc basicsPlc basics
Plc basics
 
Plc notes
Plc notesPlc notes
Plc notes
 
Summer training plc & scada
Summer training  plc & scada Summer training  plc & scada
Summer training plc & scada
 
Introduction to plc (s7)­
Introduction to  plc (s7)­ Introduction to  plc (s7)­
Introduction to plc (s7)­
 
INDUSTRIAL AUTOMATION USING PLC
INDUSTRIAL AUTOMATION USING PLCINDUSTRIAL AUTOMATION USING PLC
INDUSTRIAL AUTOMATION USING PLC
 
Dcs course
Dcs courseDcs course
Dcs course
 
plc-basics.pptx
plc-basics.pptxplc-basics.pptx
plc-basics.pptx
 

Viewers also liked

Plc
PlcPlc
Plc Siemens Training Notes
Plc Siemens Training NotesPlc Siemens Training Notes
Plc Siemens Training Notes
plc_course
 
Plc presentation
Plc presentationPlc presentation
Plc presentation
Nits Sharma
 
PLC Handbook
PLC HandbookPLC Handbook
2015. product catalog.KAIDE
2015. product catalog.KAIDE2015. product catalog.KAIDE
2015. product catalog.KAIDESunshine Zheng
 
Proyecto final mantenimiento 1
Proyecto final mantenimiento 1Proyecto final mantenimiento 1
Proyecto final mantenimiento 1
Alejandro Jesús González
 
Pe 5421 plc aftermid week 10 onwards
Pe 5421 plc aftermid week 10 onwardsPe 5421 plc aftermid week 10 onwards
Pe 5421 plc aftermid week 10 onwards
Charlton Inao
 
Programmable Logic Controllers
Programmable Logic ControllersProgrammable Logic Controllers
Programmable Logic Controllers
Anchit Walia
 
Expert Advice on Resume Making & Interview Preparation
Expert Advice on Resume Making & Interview PreparationExpert Advice on Resume Making & Interview Preparation
Expert Advice on Resume Making & Interview Preparation
NFI - Industrial Automation Training Academy
 
PLC lecture by raj nayak
PLC lecture by raj nayakPLC lecture by raj nayak
PLC lecture by raj nayak
Raj Nayak
 
AC Drive VFD - Allen Bradley Powerflex 4M
AC Drive VFD - Allen Bradley Powerflex 4MAC Drive VFD - Allen Bradley Powerflex 4M
AC Drive VFD - Allen Bradley Powerflex 4M
NFI - Industrial Automation Training Academy
 
Eee3420 lecture04 rev2011
Eee3420 lecture04 rev2011Eee3420 lecture04 rev2011
Eee3420 lecture04 rev2011
benson215
 
Programmable Logic Controller and ladder logic programming
Programmable Logic Controller and ladder logic programmingProgrammable Logic Controller and ladder logic programming
Programmable Logic Controller and ladder logic programming
seema Vishwakarma
 
Allen Bradley- Micrologix PLC Instructions
Allen Bradley- Micrologix PLC InstructionsAllen Bradley- Micrologix PLC Instructions
Allen Bradley- Micrologix PLC Instructions
NFI - Industrial Automation Training Academy
 
HMI- Human Machine Interface
HMI-  Human Machine InterfaceHMI-  Human Machine Interface
HMI- Human Machine Interface
NFI - Industrial Automation Training Academy
 
Ladder logic tutorial
Ladder logic tutorialLadder logic tutorial
Ladder logic tutorialdas1964
 

Viewers also liked (20)

Plc
PlcPlc
Plc
 
Plc Siemens Training Notes
Plc Siemens Training NotesPlc Siemens Training Notes
Plc Siemens Training Notes
 
Plc presentation
Plc presentationPlc presentation
Plc presentation
 
Basic plc
Basic plcBasic plc
Basic plc
 
Selecting a PLC
Selecting a PLCSelecting a PLC
Selecting a PLC
 
PLC Handbook
PLC HandbookPLC Handbook
PLC Handbook
 
2015. product catalog.KAIDE
2015. product catalog.KAIDE2015. product catalog.KAIDE
2015. product catalog.KAIDE
 
Proyecto final mantenimiento 1
Proyecto final mantenimiento 1Proyecto final mantenimiento 1
Proyecto final mantenimiento 1
 
Pe 5421 plc aftermid week 10 onwards
Pe 5421 plc aftermid week 10 onwardsPe 5421 plc aftermid week 10 onwards
Pe 5421 plc aftermid week 10 onwards
 
Programmable Logic Controllers
Programmable Logic ControllersProgrammable Logic Controllers
Programmable Logic Controllers
 
Expert Advice on Resume Making & Interview Preparation
Expert Advice on Resume Making & Interview PreparationExpert Advice on Resume Making & Interview Preparation
Expert Advice on Resume Making & Interview Preparation
 
PLC lecture by raj nayak
PLC lecture by raj nayakPLC lecture by raj nayak
PLC lecture by raj nayak
 
AC Drive VFD - Allen Bradley Powerflex 4M
AC Drive VFD - Allen Bradley Powerflex 4MAC Drive VFD - Allen Bradley Powerflex 4M
AC Drive VFD - Allen Bradley Powerflex 4M
 
Eee3420 lecture04 rev2011
Eee3420 lecture04 rev2011Eee3420 lecture04 rev2011
Eee3420 lecture04 rev2011
 
PID - Temperature Controller
PID - Temperature ControllerPID - Temperature Controller
PID - Temperature Controller
 
Basics of plc_programming1
Basics of plc_programming1Basics of plc_programming1
Basics of plc_programming1
 
Programmable Logic Controller and ladder logic programming
Programmable Logic Controller and ladder logic programmingProgrammable Logic Controller and ladder logic programming
Programmable Logic Controller and ladder logic programming
 
Allen Bradley- Micrologix PLC Instructions
Allen Bradley- Micrologix PLC InstructionsAllen Bradley- Micrologix PLC Instructions
Allen Bradley- Micrologix PLC Instructions
 
HMI- Human Machine Interface
HMI-  Human Machine InterfaceHMI-  Human Machine Interface
HMI- Human Machine Interface
 
Ladder logic tutorial
Ladder logic tutorialLadder logic tutorial
Ladder logic tutorial
 

Similar to Plc 101

Basic PLC
Basic PLCBasic PLC
Basic PLC
Hammzah Niazi
 
Basic PLC.ppt
Basic PLC.pptBasic PLC.ppt
Basic PLC.ppt
Ashish Deotale
 
Programmable Logic Controller Training Day 1 to 3.pptx
Programmable Logic Controller  Training Day 1 to 3.pptxProgrammable Logic Controller  Training Day 1 to 3.pptx
Programmable Logic Controller Training Day 1 to 3.pptx
dmckinseyrecruitment
 
Basic plc
Basic plcBasic plc
Basic plc
gmvd201091
 
Basic plc
Basic plcBasic plc
Basic plc
kaishik gundu
 
Basic PLC.ppt
Basic PLC.pptBasic PLC.ppt
Basic PLC.ppt
RaghadAlnajim1
 
Basic plc
Basic plcBasic plc
PLCandSCADA.pdf
PLCandSCADA.pdfPLCandSCADA.pdf
PLCandSCADA.pdf
ssuser6cedd3
 
Programmable Logic Controller by Pranoti R. Doke
Programmable Logic Controller by Pranoti R. DokeProgrammable Logic Controller by Pranoti R. Doke
Programmable Logic Controller by Pranoti R. Doke
Pranoti Doke
 
R22EM807_PAVAN.D_PLC.pptx
R22EM807_PAVAN.D_PLC.pptxR22EM807_PAVAN.D_PLC.pptx
R22EM807_PAVAN.D_PLC.pptx
BCGowtham1
 
Basic plc 1
Basic plc 1Basic plc 1
Basic plc 1
Gaurav Kumar
 
plc introduction
plc introductionplc introduction
plc introduction
KumaresanV10
 

Similar to Plc 101 (20)

Basic plc
Basic plcBasic plc
Basic plc
 
Basic PLC
Basic PLCBasic PLC
Basic PLC
 
Basic PLC.ppt
Basic PLC.pptBasic PLC.ppt
Basic PLC.ppt
 
Basic PLC
Basic PLCBasic PLC
Basic PLC
 
Programmable Logic Controller Training Day 1 to 3.pptx
Programmable Logic Controller  Training Day 1 to 3.pptxProgrammable Logic Controller  Training Day 1 to 3.pptx
Programmable Logic Controller Training Day 1 to 3.pptx
 
Basic plc
Basic plcBasic plc
Basic plc
 
Basic plc
Basic plcBasic plc
Basic plc
 
Basic plc
Basic plcBasic plc
Basic plc
 
Basic plc
Basic plcBasic plc
Basic plc
 
Basic plc
Basic plcBasic plc
Basic plc
 
Presentaton on Plc & Scada
Presentaton on Plc & ScadaPresentaton on Plc & Scada
Presentaton on Plc & Scada
 
Basic PLC.ppt
Basic PLC.pptBasic PLC.ppt
Basic PLC.ppt
 
Basic plc
Basic plcBasic plc
Basic plc
 
documentation (1)
documentation (1)documentation (1)
documentation (1)
 
PLCandSCADA.pdf
PLCandSCADA.pdfPLCandSCADA.pdf
PLCandSCADA.pdf
 
Programmable Logic Controller by Pranoti R. Doke
Programmable Logic Controller by Pranoti R. DokeProgrammable Logic Controller by Pranoti R. Doke
Programmable Logic Controller by Pranoti R. Doke
 
Basic PLC.ppt
Basic PLC.pptBasic PLC.ppt
Basic PLC.ppt
 
R22EM807_PAVAN.D_PLC.pptx
R22EM807_PAVAN.D_PLC.pptxR22EM807_PAVAN.D_PLC.pptx
R22EM807_PAVAN.D_PLC.pptx
 
Basic plc 1
Basic plc 1Basic plc 1
Basic plc 1
 
plc introduction
plc introductionplc introduction
plc introduction
 

Recently uploaded

Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
Kamal Acharya
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
zwunae
 

Recently uploaded (20)

Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
 

Plc 101

  • 1. Programmable Logic Controller 101 A tool for Automation By: Engr. Wendell Agasen
  • 2. Overview What is a control System? Fundamentals of PLC? PLC hardware and basic operation Sensor and output devices Control program Types of PLC programming language Summary Introduction to ladder diagram PLC programming Exercises Bonus programming (ST &SFC) WGA_PLC_02092016
  • 8. Hard wire circuit using a NO switch WGA_PLC_02092016 Hard wired circuit using a relay
  • 9. Soft wiring using a PLC WGA_PLC_02092016 PLC DC
  • 10. So any idea what is a PLC? WGA_PLC_02092016 network digital inputs digital outputs analog inputs / outputs
  • 11. WGA_PLC_02092016 It is a device that is used to control an output equipment base on the input signal. The PLC works by looking at its inputs, executes a user defined program, check for error during program execution and then update outputs if no error encountered. What exactly is a PLC?
  • 13. Consider the following design requirements Design and build a circuit to operate a 10 submersible pumps with its corresponding interlocks of tank level, discharge pressure and motor protection sensor. WGA_PLC_02092016
  • 14. Assuming your design required 65 relays to be installed in a 350 x 300 x 150 mm panel? 1 PLC Over 200 possible relay, timer, counter, real time clock, combination 25 Timers 25 Switches 65 Relays How about if you have timers switches? How many PLC do you need for the given number of relays, switches, and timers? 1 PLC Over 200 possible relay, timer, counter, real time clock, combination WGA_PLC_02092016
  • 15. Installation mounting, wiring, and commissioning Troubleshooting Configuration and reconfiguration Remote monitoring Networking Major issues of conventional relay circuit WGA_PLC_02092016
  • 16. Which is better? RELAY CIRCUITS PLC WGA_PLC_02092016 VS
  • 17. Comparison with other control system WGA_PLC_02092016
  • 19. 19 Major Components of a Common PLC CPU POWER SUPPLY I M N O P D U U T L E O M U O T D P U U L T E PROGRAMMING DEVICE From SENSORS Pushbuttons, contacts, limit switches, Sensing devices Proximity sensors Light detector To OUTPUT Solenoids Contactors motors any electrical devices YOU Memory WGA_PLC_02092016
  • 20. 20 POWER SUPPLY Provides the voltage needed to run the primary PLC components I/O MODULES Receive signal from external input devices, performs signal conversion and provide appropriate signal to external devices. CPU Provides intelligence to command and govern the activities of the entire PLC systems. PROGRAMMING DEVICE Used to enter the desired program that will determine the sequence of operation and control of process equipment or driven machine. Major Components of a Common PLC WGA_PLC_02092016
  • 21. PROGRAMMABLE LOGIC CONTROLLERS (PLC) WGA_PLC_02092016
  • 22. Programming Terminal PC Connection memory expansion port communications port TSX37-22 I/O Modules Common PLC Hardware Modicon WGA_PLC_02092016
  • 24. WGA_PLC_02092016 CPU Allen Bradley Common PLC Hardware I/O Modules Power Supply
  • 26. WGA_PLC_02092016 PHASE 2 Program Execution PHASE 3 Diagnostics/ Comm PHASE 4 Output Scan PHASE 1 Read Inputs Scan PLC Operations Step 1-CHECK INPUT STATUS - PLC takes a look at each input module to determine if it is on or off, or reads analog measurement value Step 2-EXECUTE PROGRAM - PLC executes your program one instruction at a time. Step 4-UPDATE OUTPUT STATUS -PLC updates the status of the outputs. It updates the outputs based on which inputs were on during the first step and the results of executing your program during the second step. is true. Step 3-DIAGNOSTIC AND COM – PLC preforms diagnostic and communication task Repeat Cycle
  • 27. WGA_PLC_02092016 Read all field input devices via the input interfaces, execute the user program stored in application memory, then, based on whatever control scheme has been programmed by the user, turn the field output devices on or off, or perform whatever control is necessary for the process application. Scanning is the process of sequentially reading the inputs, executing the program in memory, and updating the outputs. Scan time (cycle time) – the time to complete one PLC operation (step 1 to 4). Basic Function of a Typical PLC
  • 29. Types of PLC Medium PLC Large PLC Small WGA_PLC_02092016
  • 30. Monolithic (one-piece) construction Fixed casing Fixed number of I/O (most of them binary), up to 128 I/O’s and memories up to 2 Kbytes. No process computer capabilities (no MMC) Can be extended and networked by an extension (field) bus Sometimes LAN connection Mono-processor Small or compact
  • 31. Medium PLC Modular design It has up to 2048 I/O’s and memories up to 32 Kbytes
  • 32. Large PLC Modular with network of Remote IOs (RIO) It is the most sophisticated units of the PLC family. They have up to 8192 I/O’s and memories up to 75 Kbytes. It can control individual production processes or entire plant.
  • 34. Let us consider a medium type PLC PLC Rack PLC sections WGA_PLC_02092016
  • 35. Power Supply Section The PS output provides power to every module in the PLC; however, it does not provide the DC voltages to the PLC's peripheral I/O devices. WGA_PLC_02092016
  • 36. Central Processing Unit (CPU) The processor section makes the decisions needed by the PLC so that it can operate and communicate with other modules. Executes the programs. It has memory section. This size tells us how many locations are available in the memory for storage. Additional memory modules can be added to your PLC system as the need arises. Flash Memory sometimes EEPROM WGA_PLC_02092016
  • 37. Input Module The input module has two functions: – reception of an external signal – and status display of that input point. The input to an input module is either a discrete or analog signal. WGA_PLC_02092016
  • 38. Input Module Typical types of input modules Analog input (4-20 mA or 0 -10 Vdc). DC voltage (110, 220, 14, 24, 48, 15-30V) AC voltage (110, 240, 24, 48V) TTL (transistor-transistor logic) input (3-15VDC). Word input (16-bit/parallel). Thermocouple input. Resistance temperature detector. High current relay. Low current relay. Latching input (24VDC/110VAC). Isolated input (24VDC/85-132VAC). WGA_PLC_02092016
  • 39. Output Module The output module transmits discrete or analog signals to activate various devices such as hydraulic actuators, solenoids, motor starters, and displays the status (through the use of LEDs) of the connected output points. Signal conditioning, termination, and isolation are also part of the output module's functions. WGA_PLC_02092016
  • 40. Output Module Some typical output modules available today include the following: DC voltage (24, 48,110V) or current (4-20 mA). AC voltage (110, 240v) or current (4-20 mA). Isolated (24VDC). Analog output (12-bit). Word output (16-bit/parallel). WGA_PLC_02092016
  • 42. Sensor WGA_PLC_02092016 DI CPU DOSENSOR ACTUATORS MOTORS ETC PLC - Translates physical events to electrical signal
  • 43. Sensor I. Digital/logical sensor – detect the state of an event (either True or False) Mechanical switch 1. Contact (float switch, position switch etc.) 2. REED switch (electromagnetic switch) Proximity Switch 1. Capacitive ( detect non metal object) 2. Inductive ( detect metal object) 3. Photo sensor (uses light to detect almost all types of object) WGA_PLC_02092016
  • 44. Sensor II. Analog/continuous sensor Detect variable physical events and convert it into a corresponding proportional electrical signal. This sensors normally requires a transmitter to amplify and condition the analog sensor output to a level acceptable for transmission and detection of DI module in either voltage (0 to 10Vdc) or currents (4-20 mA). Level Sensor (ultrasonic, pressure, capacitive, mechanical) Flow Sensor (ultrasonic, pressure , electromagnetic, etc) Pressure Sensor ( Bourdon tube) Temperature Sensor (RTD, Thermocouple) Speed transmitter Sensor ( tachometer) Force, torque, position sensor, etc. WGA_PLC_02092016
  • 45. Output devices WGA_PLC_02092016 DI CPU DOSENSOR ACTUATORS MOTORS ETC PLC
  • 46. Output devices I. Digital/Logical controlled output devices Digital controlled actuators Convert command signal from DO module into mechanical motion, which will either directly or indirectly control a process. Solenoid – electrical current to a limited linear motion Solenoid valve – redirect flow of gas or fluids Hydraulic controlled actuators – to control large and rigid load at lower speed. Pneumatic controlled actuators – to control small and not stiff load at higher speed. Use combination of solenoid valve and cylinders Electrical (motor) controlled actuators WGA_PLC_02092016
  • 47. Output devices Digital controlled Motors Receive command signal from PLC to start and stop. Low current motors can be directly connected to PLC DO module. However large and high current rated motor requires a relay, contactor or motor control devices. Below are some motor control devices typically use in industry DOL (Direct on line) Soft starter WGA_PLC_02092016
  • 48. Output devices II. Continuous control output devices Continuous controlled actuators Allows the system output to be adjusted to pre determine range of values. Hydraulic controlled actuators with a positioner – to control large and rigid load at lower speed. Pneumatic controlled actuators with a positioner – to control small and not stiff load at higher speed. Use combination of solenoid valve and cylinders Electrical (motor) controlled actuators with a positioner Cylinder with a position feedback. WGA_PLC_02092016
  • 49. Output devices Continuous controlled motor The motor can be controlled using additional motor control devices such as VFD VFD – Variable Frequency Drives, rotor speed will vary in proportion to input signal from AO module. Normally, AO output signal is 4 – 20 mA. Configuration and parameterization are done in VFD and SCADA. Settings in VFD and SCADA should match to avoid any have a proper control. WGA_PLC_02092016
  • 51. Selection of Sensor Voltage Direct current (12-24, 10 -60 Vdc) AC (24 Vac, 100-240Vac) Direct current (5 Vdc) Sensor Relay type (Dc rating) Relay type (Ac rating) or mechanical switch Transistor (TTL) WGA_PLC_02092016
  • 52. Basic circuit of Digital Input WGA_PLC_02092016
  • 53. Sinking and Sourcing Sinking – if Active, the output will allow the current to flow to a common reference voltage (-). This is best selected when different voltage are supplied Sourcing – if Active, the output will allow the current from common source (+) through the input/output devices and to the ground. This method is best used when all devices uses single supply voltage. WGA_PLC_02092016
  • 54. Sourcing sensor and Sinking DI WGA_PLC_02092016 Sinking DI module Sensor Output Circuit Source (+) PNP or Sourcing sensor Provide a pathway to a Source (+) To PLC Input
  • 55. Sinking sensor and Sourcing DI WGA_PLC_02092016 Sourcing DI module Sensor Output Circuit From PLC Input Common (-) NPN or Sinking input sensor Provide pathway to a common (-)
  • 56. Interface b/n Sensor & DI module WGA_PLC_02092016
  • 57. Conclusion (sensor/DI interconnection) Sensor (transistor) Sinking (NPN) Sourcing(PNP) Digital Input module Sourcing (Common +) Sinking (Common -) WGA_PLC_02092016
  • 59. Same concept is applicable to DO module WGA_PLC_02092016
  • 60. Discrete Analog Inputs Rectifier circuit is added to opto- coupler circuit AC input module requires longer recognition time than DC input module. However AC signal are more immune to noise than DC. Suitable for long distances and noisy environments. Common Input 0 Input 1 AC Switch Switch P L C WGA_PLC_02092016
  • 61. Analog Modulating Inputs • For transmitter it can be, – Analog Current (0/4 to 20 ma) – Analog Voltage (0- 10VDC) • You need power source to power up the transmitters. Common Input 0 Input 1 24 VDC P L C Transmitter(+) (-) WGA_PLC_02092016
  • 62. Discrete - Relay Outputs A relay is non-polarized and typically it can switch either AC or DC. Here the common is connected to one end of our power supply and the other end of the supply is connected to the load. The other half of our load gets connected to the actual plc output you have designated within your ladder program. When the program like ladder tells the output to turn on, the plc will internally apply a voltage to the relay coil. This voltage will allow the proper contact to close. When the contact closes, an external current is allowed to flow through our external circuit. When the ladder tells the plc to turn off the output, it will simply remove the voltage from the internal circuit thereby enabling the output contact to release. Internal Circuit Coil Coil Coil Contact Contact Contact COM COM0100 0101 0102 Etc, Note: 0100, 0101, 0102 are output relay designated in the program. WGA_PLC_02092016
  • 63. Discrete -Transistor Outputs • Transistor can only switch a dc current. For this reason it cannot be used with an AC voltage. • Transistor are solid-state switch. A small current applied to the transistors "base" lets us switch a much larger current through its output. • Transistor is fast, switches a small current, has a long lifetime and works with dc only. Internal Circuit Photo coupler COM 0100 Etc. WGA_PLC_02092016
  • 64. Analog Modulating Outputs • For transmitter it can be, – Analog Current (0/4 to 20 ma) – Analog Voltage (0- 10VDC) Common Input 0 Input 1 P L C Field Devices (+) ( - ) WGA_PLC_02092016
  • 65. How to set up your PLC Choose a chassis. Count the number of input (digital or analog) Count the number of output (digital or analog) From the number of I/O compute for the power consumption and select the correct power supply. InputInputInput Output OutputChoose your processor WGA_PLC_02092016
  • 67. PLC program The PLC hardware requires a PLC program. There are many types available in building a program. Typical are as follows, – Ladder Logic – Structured text – Function block diagram – SFC (Sequential Function Charts). – Instruction list Regardless of which method is chosen, it will be executed by the PLC's CPU module. The software can be written and executed with the processor in an online state or in the off-line state WGA_PLC_02092016
  • 68. Sample Application Here, we want the fill motor to pump the fluid into the tank until the high level sensor turns on. At that point we want to turn off the motor until the level falls below the low level sensor. Then we should turn on the fill motor and repeat the process. Input (High Level) Input (Low Level) Output (Motor) Level Controller WGA_PLC_02092016
  • 69. Ladder program Low Level High Level Internal PLC Coil Motor Contact Internal PLC Relay Internal PLC Relay END WGA_PLC_02092016
  • 71. IEC 61131 IEC 61131 -1 Overview IEC 61131 -2 Requirements and Test procedures IEC 61131 -3 Data Types and Programming IEC 61131 -4 User Guidelines IEC 61131 -5 Communications IEC 61131 -7 Fuzzy Control WGA_PLC_02092016
  • 72. IEC 61131 – 3 Programming Languages Five standard programming languages Ladder Logic (LD) Structured text (ST) Function block diagram (FBD) Sequential Function Charts (SFC ) Instruction list (IL) WGA_PLC_02092016
  • 73. Ladder Logic (LD) Most widely used Initially invented to replace hardwired relay circuit Graphical representation of control circuit with a series of control inputs needing to made true to activate one or more output. Ideal for simple control circuit, but difficult to implement for advance and complex control system such as PID, mathematical calculation and data analysis. WGA_PLC_02092016
  • 75. Functional Block Diagram Second widely used programming language Interconnection of functional block to represent a graphical representation of the control circuit. Easier to follow process flow. Just follow the path! WGA_PLC_02092016
  • 77. Structured Text (ST) Similar to a high level computer programming such as “C”. Mobility from non-PLC programs Highest rate of adoption Ideal for more complex control circuit requirements such as mathematical calculations, data analysis, decision loops, Faster execution time than LD,FBD and SFC. Not maintenance friendly WGA_PLC_02092016
  • 79. Sequential Function charts (SFC) Similar to computer flow charts Consist of Step and transition Starting point is the initial action box Step or Action Box (equipment status represented by a variable or a code of any language) Transition (input variables or conditions) Easiest to implement Maintenance friendly/Easy to trouble shoot Slowest execution time Not applicable to all applications WGA_PLC_02092016
  • 81. Sequential Function charts (SFC) WGA_PLC_02092016
  • 82. Instruction List (IL) Text based non graphical A low level language similar to assembler language use microprocessor programming Very step by step in layout and format Can be move easily between hardware platforms Fastest execution time Not maintenance friendly. WGA_PLC_02092016
  • 86. Sensor PLC Hardware – I/Os(DI, AI, DO, AO), CPU, Memory, PS Operation – Scan input, execute program,self diagnostic and Scan output Control programs – As per IEC 611313 – 3 ( LD, FBD, ST, SFC and IL) Output devices Interfacing of external devices Source and sinking. Sensor (sink) – DI (source), Sensor (Source) – DI (Sink) Sensor (Either sink or source) – DI (sink and source) Configuration in DO is the same if the output devices is transistorized Internal switching component of IO module Relay – for AC/DC Transistor – for low rating DC and AC (with rectifier circuit0 TRIAC– higher rating AC DC WGA_PLC_02092016 Summary
  • 87. Programming Language IL – Mnemonic programming ST – C or BASIC like programming LD – Relay logic diagram based FBD – Graphical data flow programming method SFC – Graphical method of structuring programs WGA_PLC_02092016 Summary
  • 88. WGA_PLC_02092016 II - Introduction to Ladder programming
  • 89. Ladder Diagrams Ladder Diagrams is the oldest programming language for PLC based on relay intuition of electricians. widely in use outside Europe. not recommended for large new projects. Consist of rung and rail Rung 0 Rung 1 Rung 2 Input (contact) Output (Coils) WGA_PLC_02092016
  • 90. Ladder Diagrams The main Ladder Diagrams symbols represent the elements: NO contact (input), %I NC contact (input), %I Coil (output), %Q WGA_PLC_02092016
  • 94. Operate block & Compare block WGA_PLC_02092016
  • 95. Operate block & Compare block WGA_PLC_02092016
  • 97. Network by network based on the object links from above and below. Execution between networks shall be from top to bottom except if it is influence by control element. Processing of network is ended before processing begins on another network WGA_PLC_02092016 Execution sequence of Networks
  • 98. Signal flow for Boolean link is: Left to right for horizontal link Top to Bottom for vertical link Rung is one line from left rail (power) to right rail (neutral). WGA_PLC_02092016 Signal flow within a Network
  • 99. Link – Highest priority Network by network Rung by rung – Lowest priority WGA_PLC_02092016 Signal flow within a Network
  • 100. Ladder Diagrams 01 02 50 01 02 03 50 03 relay coil (bobine) break contact (contact repos) make contact (contact travail) corresponding ladder diagram origin: electrical circuit 50 05 44 rung "coil" 50 is used to move other contact(s) WGA_PLC_02092016
  • 101. Ladder Diagrams Binary combinations are expressed by series and parallel relay contact: + 01 02 50 Coil 50 is active (current flows) when 01 is active and 02 is not. 01 02 50 Series + 01 40 02 Coil 40 is active (current flows) when 01 is active or 02 is not. Parallel Ladder Diagrams representation “logic" equivalent 01 02 40 WGA_PLC_02092016
  • 102. Ladder Diagrams Ladder Diagrams diagram for a batch process: filling a container with a liquid, mixing the liquid, and draining the container. The sequence of events is as follows: 1. fill valve opens and lets the liquid into the container until it is full. 2. liquid in the container is mixed for 3 minutes. 3. a drain valve opens and drains the tank. O = output I = input Address of variable (module number, port number) WGA_PLC_02092016
  • 103. Ladder Diagrams (PLC termination) Consider a PLC with one input module and one output module. Two external switches (SW-0 & SW-1) are connected via terminal IN-0 and In-1 of input module. Two terminals of the output module (OUT-0 & OUT-1) drive two indicator lamps (Lamp-0 & Lamp-1). WGA_PLC_02092016
  • 104. WGA_PLC_02092016 III - PLC programming exercises using LD
  • 105. Application # 1 – Detection of fallen bottle Control philosophy Illustration WGA_01312016 105 Condition: Fallen bottle will be push to outside the conveyor Input sensor: Capacitive sensor “X0” & “X1” Output device: Pneumatic pushing pole “Y0”
  • 106. Application # 2 – two location control Control philosophy Illustration t 106 Input: S1 & S2 Output: L1 Condition_1: Lamp L1 will switch on and off if either of switch S1 is activated Condition_2: Switch S1 and S2 are replace with Push button switch. L1 S2 S1
  • 107. Application # 3 – Car entry/exit control Control philosophy Illustration WGA_PLC_02092016 Input: Sensor I1 and I2 Output: “GO signal light” Q1 , “STOP signal light” Q2 and stopper Q3 Condition_1: Initially stop is active. Stop light is off, Go light is on and Stopper will go up if I1 is active Condition_2: Stop light is on, Go light will off and stopper will move down if I1 and I2 is not active.
  • 108. Application # 4 – Latching circuit Control philosophy Illustration WGA_PLC_02092016 Input: Push button I1(start), I2(stop) and I3(test) Output: Ceiling fan Q1 Condition: Push Start button to activate ceiling fan, and push stop button to stop. Push test button to test temporary activate fan.
  • 109. Application # 5 – Latching circuit (set/reset function) Control philosophy Illustration WGA_PLC_02092016 Input: Push button I1(start), I2(stop) and I3(test) Output: Ceiling fan Q1 Condition: Use set reset function
  • 110. Application # 6 - Forward/reverse motor control WGA_PLC_02092016
  • 111. Application # 6 - Forward/reverse motor control WGA_PLC_02092016 Control philosophy Illustration Input: Push buttons FWD,REV,STOP Output: Forward contactor M1, Reverse contactor M2. Safety interlock “overload protection” OL Condition: Press PB_Fwd to operate motor Forward,PB_Rev for Reverse. PB_Stop to stop. Motor stop if OL circuit is activated.
  • 112. Application # 7 – Sequential start Control philosophy Illustration WGA_PLC_02092016 Providing lube for the gear box the lathe spindle starts to run. Oil pump starts first before main pump can be starts
  • 113. Application # 8 – Level and pressure control Control philosophy Inputs: 1 pressure switch 3 level sensor Output: Pump “M1” and Solenoid valve “K” Condition 1: Pump will run according discharge pressure set point in the pressure tank. Incorporate a delay 20 sec prior to stopping Condition 2: Refilling through solenoid valve “K” will be controlled by float switch “S2” and “ S3” Condition 2: Pump “M1” will stop when a level is near the pipe suction elevation. (Dry run protection). Illustration WGA_01312016 113
  • 114. Application # 9 – Entry/exit control for underground car park (for attendees) Control philosophy Illustration WGA_PLC_02092016
  • 115. Application # 11 – Participant request WGA_PLC_02092016
  • 117. IF function (Logical branching) Syntax If ….. End_if If ….. Else….. End_if If ….. Elseif ….. End_if Flow chart WGA_PLC_02092016
  • 118. WGA_PLC_02092016 TIMER:=%S6; (* System bit, time base, 1 sec*) COUNTER := 0; IF TIMER THEN IF COUNTER = 0 THEN COUNTER_SEC:=COUNTER_SEC+1; END_IF; COUNTER:= COUNTER + 1; ELSE COUNTER:=0; END_IF; IF COUNTER_SEC >= 61 THEN COUNTER_MIN:= COUNTER_MIN+1; COUNTER_SEC:=1; END_IF; IF COUNTER_MIN >= 60 THEN COUNTER_HOUR:= COUNTER_HOUR+1; COUNTER_MIN:=0; END_IF; IF COUNTER_HOUR >23 THEN COUNTER_HOUR:=0; END_IF;
  • 119. Syntax Case ….. Of Else …… End_Case CASE SELECT OF 1: C := B + A; 2,3: C := B - A; 5..10: C := C; ELSE • C:= B*A; END_CASE; Flow chart WGA_PLC_02092016 Case function (multiple Branching)
  • 120. While Function (Looping) Syntax WHILE ….. DO END_WHILE; PEOPLE:= 0 WHILE PEOPLE<1 DO COUNTER:=COUNTER+1; END_WHILE; Note: test condition then execute Flow chart WGA_PLC_02092016
  • 121. Syntax REPEAT UNTIL …… END_REPEAT; G:=1; REPEAT G:=G+1; UNTIL G>100 END_REPEAT ; Note: execute then test condition Flow chart WGA_PLC_02092016 Repeat function (Looping)
  • 122. For function (Looping) Syntax FOR A TO B BY C DO END_FOR; FOR I:= 2 TO 3 BY 1 DO D:=D+1; END_FOR; Flow chart WGA_PLC_02092016
  • 125. Divergence of a Selective Sequence WGA_PLC_02092016 ONLY ONE PATH IS ALLOWED
  • 126. Convergence of a Selective Sequence WGA_PLC_02092016 ONLY ONE PATH IS ALLOWED
  • 127. Divergence of a Simultaneous Sequence WGA_PLC_02092016 BOTH STEP WILL BE ACTIVATED
  • 128. Convergence of a Simultaneous Sequence WGA_PLC_02092016 BOTH STEP SHOULD BE ACTIVE
  • 129. Application # 12 – SFC WGA_PLC_02092016
  • 130. Control Parameters Control Inputs Sample detection sensor Automatic PB Stop PB Reset PB Lower limit switch Upper limit switch Output Solenoid valve for Piston up Solenoid valve for Piston down Auto mode indicator LED Sample part holder WGA_PLC_02092016