You are on page 1of 57

Shell Operations Training Group

Robert Training Center

PLC Maintenance and


Troubleshooting - Module 1

- Intro to PLC’s -
by Kent L. Gerhardt
Gerhardt & Associates
www.GerhardtandAssociates.com
KLGerhardt@Gmail.com
225-294-4210
fax: 225-294-6480
8/11/2018 PLC-1 Introduction to PLC's 1
PLC’s in the Oil and
Gas Production
Industry

Automating the Process


PLC & Controls Training in Shell
• Training for CAO/ET Level 2 SPBP
– PLC Module 1 (4 days)
- Ladder logic and pump control
- PLC Module 2 (4 days)
- Analog inputs, outputs, process control
- PID Loop Tuning (2 days)

- Training for CAO/ET Level 3 SPBP


- PLC Module 3 (4 days)
- Safety Shutdown Systems (PLC based)
- PLC Module 4 (4 days) – SLC500 Hardware
- Offered upon demand (not much demand)
- PLC Module 5 (4 days)
- ControlLogix and CompactLogix hardware and tag-based
point naming systems

8/11/2018 PLC-1 Introduction to PLC's 3


Agenda – PLC Module 1
• Day 1 – Intro to PLC’s and Ladder Logic
• Day 2 – Timers, Counters, and
introduction to pump control
• Day 3 – PLC Hardware (I/O modules
and field connections)
• Day 4 – System troubleshooting

8/11/2018 PLC-1 Introduction to PLC's 4


What Are PLC’s?
• PLC stands for
Programmable Logic
Controller
• It is a computer … just like a
PC, but more rugged
• PLC’s were developed in the
late 60’s for General Motors
• The idea was to replace
relays that controlled the
assembly line and tools

8/11/2018 PLC-1 Introduction to PLC's 5


Relay Control Panels

• Multiple relays can be wired together to perform control


functions. This panel control alarms and starting
sequences for a 750 KVA generator set
8/11/2018 PLC-1 Introduction to PLC's 6
What do PLC’s look like?
Allen-Bradley
PLC5/40
Processor

1771 Remote
Chassis and
Remote I/O
Adapter

8/11/2018 PLC-1 Introduction to PLC's 7


More PLC’s
Allen-Bradley SLC500
“Small Logic Controller”

Moore controllers used


on Ursa, Ram Powell,
Mars, and others as
process controllers.
These “PLC’s” along
with an Intellution iFIX
operator interface
performs the function
of DCS system.
8/11/2018 PLC-1 Introduction to PLC's 8
So What Is a Relay? 2. Electrical
signal goes in
3. Comes out here
• Relays were
(are) used to here or here
control
industrial
processes
• A relay is an
electromagnet
that can
change the
position of a
switch
1. Electromagnet pulls
down switch arm when
energized
8/11/2018 PLC-1 Introduction to PLC's 9
This is a
Relay Parts Electricity
“Normally goes into
Closed” contact switch here

And comes
out on one
of these
contacts
“Normally Spring holds
Open” contact contacts in
“normal” or
Electromagnet “shelf” state
is called the
“Coil”

8/11/2018 PLC-1 Introduction to PLC's 10


Standard Relay Symbols
Normally Closed
Contacts

Normally Open
Contacts

Relay Coil

8/11/2018 PLC-1 Introduction to PLC's 11


Relay Operation (N.O. Contacts)
120 VAC
Power
Supply

+ -
Battery

12 VDC R
R
120 VAC L

8/11/2018 PLC-1 Introduction to PLC's 12


Relay Operation (N.O. Contacts)
120 VAC
Power
Supply

+ -
Battery

12 VDC R
R
120 VAC L

8/11/2018 PLC-1 Introduction to PLC's 13


Let’s change the wiring
120 VAC
Power
Supply

Move the wire

+ -
Battery

12 VDC R
R The symbol now changes too
120 VAC L

8/11/2018 PLC-1 Introduction to PLC's 14


Relay Operation (N.C. Contacts)

120 VAC
Power
Supply

+ -
Battery

12 VDC R
R
120 VAC L

8/11/2018 PLC-1 Introduction to PLC's 15


Relay Operation (N.C. Contacts)

120 VAC
Power
Supply

+ -
Battery

12 VDC R
R
120 VAC L

8/11/2018 PLC-1 Introduction to PLC's 16


Multiple Relay Contacts
Each
Each set of “common” can
contacts is be a different
electrically signal … 120
isolated from VAC, 24 DC,
the other and 12 VDC
contacts and for example
from the coil
One coil can
switch
multiple sets
of contacts

8/11/2018 PLC-1 Introduction to PLC's 17


Relay Design Problem
• A “start-stop” station is needed for a small electric
motor
• Pushbuttons for start and stop are preferred over a
selector switch because the motor should not restart
itself after a power outage
• The PB’s should operate on 24 VDC
• The electric motor is 120 VAC, 1 phase
• The relay coil is 24 VDC

8/11/2018 PLC-1 Introduction to PLC's 18


Design Symbols

• A start
pushbutton is
START usually
“normally open”
• A stop PB is
STOP usually
“normally
closed”

8/11/2018 PLC-1 Introduction to PLC's 19


Fail-Safe Switch Wiring
• Why is the “start” PB typically wired
normally open?
– Is it safer for the personnel and equipment for
this motor to “fail” in the off position? Usually.
– Then we must wire the start PB so that a
broken wire will not allow it to start “by itself”
– An input to the circuit will be created only if
• The wiring is intact, and
• The PB is pressed

8/11/2018 PLC-1 Introduction to PLC's 20


So Why a N.C. Stop PB?
• Again, let’s assume it is safer for the motor
to be off than on …
• If a wire were to break or fall off the stop
PB, we must somehow keep the system
safe
• Only way is to turn the motor off
• Use a normally closed PB thus creating an
input signal during normal operation
• Removing the signal causes the motor to
stop
8/11/2018 PLC-1 Introduction to PLC's 21
Circuit Diagram
Start
Stop
R1
• The PB’s are wired
in series to the coil
24 VDC
• A set of “latching
contacts”, R1-A, R1-A
are wired around
the start Motor
pushbutton R1-B Starter

• A second contact,
120 VAC
“R1-B” is used to
switch the 120
VAC to the motor
8/11/2018 PLC-1 Introduction to PLC's 22
Wiring the Circuit 120 VAC
Power
Supply

Start
Stop

+ -
Battery

8/11/2018 PLC-1 Introduction to PLC's 23


Circuit Operation 1 120 VAC
Power
Supply

Start
Stop

+ -
Battery

8/11/2018 PLC-1 Introduction to PLC's 24


Circuit Operation 2 120 VAC
Power
Supply

Start
Stop

+ -
Battery

8/11/2018 PLC-1 Introduction to PLC's 25


Circuit Operation 3 120 VAC
Power
Supply

Start
Stop

Start PB is released …
coil is latched

+ -
Battery

8/11/2018 PLC-1 Introduction to PLC's 26


Circuit Operation 4 120 VAC
Power
Supply

Start
Stop

Stop PB is pressed …
coil is released

+ -
Battery

8/11/2018 PLC-1 Introduction to PLC's 27


Circuit Operation 5 120 VAC
Power
Supply

Start
Stop

Stop PB is released …
coil stays shelf

+ -
Battery

8/11/2018 PLC-1 Introduction to PLC's 28


Lab Exercise #1
• Use the switches, wires, and relay
provided to build a motor starter circuit.
• Operate the circuit to verify proper
wiring.
• While the motor is running, disconnect
one of the wires on the power supply.
Reconnect the wire. Does the motor
restart on its own?
8/11/2018 PLC-1 Introduction to PLC's 29
Observation and Discussion
• Should the “start” or “stop” pushbutton come first in
the circuit?

• Would it make a difference if the control circuit was at


24 VDC or 120 VAC?

• Could the “control” part and the “power” part of the


circuit be at different voltages and/or types (AC vs DC)

• Could the “start” and “stop” be process switches, like


level switches? Could this automate a fill pump?

8/11/2018 PLC-1 Introduction to PLC's 30


Doing Process Control the Easy Way ….
With a PLC
8/11/2018 PLC-1 Introduction to PLC's 31
The Allen-Bradley
PLC5
• The mainstay of serious
industrial controls for the
last 20 years has been
Allen-Bradley, Modicon,
General Electric (Fanuc),
and Seimens
• The oil and gas industry
has tended to use Allen-
Bradley

8/11/2018 PLC-1 Introduction to PLC's 32


Allen-Bradley
PLC5/80 Processor
• Can handle up to 3072 field
devices -- 100K RAM
• 4 user-configurable ports for
remote I/O, DH+, Ethernet
• Battery backed-up RAM
• Serial port for programming or
operator interface
• This model and predecessors
(5/25, 5/40, & 5/60) used
extensively by Shell, ExxonMobil,
SPLC, and many others
8/11/2018 PLC-1 Introduction to PLC's 33
What Does a PLC Do?
• The PLC accepts inputs coming in from switches
and transmitters in the field
• The PLC determines what should be on and off by
the logic provided to it by the program
• The programmer puts instructions in the PLC
telling what to do if switches in the process (like
hand, level, pressure, and temperature switches)
are open or closed
• The PLC then starts or stops pumps, motors,
lights, horns, valves, etc.

8/11/2018 PLC-1 Introduction to PLC's 34


The PLC “Cycle”
• Step 1
– Scan inputs: The PLC checks every switch
and transmitter in the process and records
their status in “input image table”
• Step 2
– Run logic: The PLC runs all logic in ladder
program … if pressure is less than 1000 psi
and level is above 45”, run transfer pump #2.
Record status of every output in “output image
table”
• Step 3
– Control outputs: The PLC goes to every
pump, valve, and light and turns it on or off
according to the bits in output image table
8/11/2018 PLC-1 Introduction to PLC's 35
How Is a PLC Programmed?
• Most common language is “ladder logic”
(used by Shell, ExxonMobil, and others)
• Can be programmed in any language
for which a compiler is available
• Other languages like structured text,
sequential function charts, Basic,
Grafcet used by some companies and
vendors
8/11/2018 PLC-1 Introduction to PLC's 36
How Does Ladder Logic Work?
• Ladder logic is a
“virtual” circuit diagram
• PLC simulates
operation of circuit
drawn in memory
• Contacts are controlled
by switches in field
• Coils control pumps,
valves, lights, and
motors in the field
• A “green” contact is
conductive
• A “green” coil shows
running field device

8/11/2018 PLC-1 Introduction to PLC's 37


Our Simple Air Compressor
• We would like to build
controls for our simple air
compressor
• We use two pressure
switches
– One switch is closed at
pressures less than 100
psi but opens when
pressures rises above 100
psi (open on rising 100 psi (Low PS)
pressure)
– Second switch is closed at 120 psi (High PS)
pressures below 120 psi
but opens as pressure
rises above 120 psi (open
on rising pressure)

8/11/2018 PLC-1 Introduction to PLC's 38


Our Simple Air Compressor
Hand
• In addition, we would like to
give the operator the option Off
of running the air compressor Auto
in “Hand”, “Off”, or in “Auto”
• In Hand:
– The air compressor runs
without regard to the
pressure switches
– Operator must turn it off
when pressure rises
• In Auto: 100 psi
– Compressor starts
automatically when pressure 120 psi
drops below 100 psi and
stops when pressure reaches
120 psi
8/11/2018 PLC-1 Introduction to PLC's 39
Electrical Controls
• This is a simple system, and
so could be wired using
480 VAC straight “electrical” controls
• Here’s what we would do ...
120 VAC
H N

Hand 100 psi


Off
120 psi
Auto

8/11/2018 PLC-1 Introduction to PLC's 40


Electrical Controls
• This is a simple system, and
so could be wired using
480 VAC straight “electrical” controls
• Here’s what we would do ...
120 VAC
H N

Hand 100 psi


Off
120 psi
Auto

8/11/2018 PLC-1 Introduction to PLC's 41


Electronic Controls
• If we were to use an
electronic controller, it 480 VAC
makes it much more
simple …
• First, wire all inputs to
an input module

120 VAC
H N

Hand

Off

Auto 120 psi

100 psi

8/11/2018 PLC-1 Introduction to PLC's 42


Electronic Controls
• Second, wire the
motor starter 480 VAC
contactor to an output
module
Motor
Starter
120 VAC
Neutral
120 VAC
H N

Hand

Off

Auto 120 psi

100 psi

8/11/2018 PLC-1 Introduction to PLC's 43


Electronic Controls
• Now use the
processor to 480 VAC
“connect” the inputs
to the outputs
Motor
Starter
120 VAC
Neutral
120 VAC
H N

Hand

Off

Auto 120 psi

100 psi

8/11/2018 PLC-1 Introduction to PLC's 44


Electronic Controls
• Now use the
processor to 480 VAC
“connect” the inputs
to the outputs
Motor
Starter
120 VAC
Neutral
120 VAC Hot
H N

Hand

Off

Auto 120 psi

100 psi

8/11/2018 PLC-1 Introduction to PLC's 45


Programming the PLC
• Now that the system is wired, we can add
“ladder Logic” to turn on the air compressor
at the right time

8/11/2018 PLC-1 Introduction to PLC's 46


The “Virtual Circuit”
If a complete path to the output
The left rail is
coil is established, then the coil
always “hot”
will be “energized” (green)

Green contacts are


conductive (made)

The right rail is always “neutral”


or “return”
8/11/2018 PLC-1 Introduction to PLC's 47
Interfacing With Field Devices
The “Auto” The “Hi Air
switch position Pressure” switch
controls these controls these
contacts contacts

The “Hand” When green,


switch position the air
controls these compressor
contacts starter is
engaged
8/11/2018 PLC-1 Introduction to PLC's 48
Field Switches and Logic Contacts
• Every set of contacts in the ladder logic is controlled
either by:
– A switch in the field
– A coil in the ladder logic
• If a switch controls a contact
– It is wired to an input module
– The module reads the presence or absence of voltage on
the incoming wire
– Voltage means field switch is closed (conducting)
– No voltage means switch is open (blocking)

8/11/2018 PLC-1 Introduction to PLC's 49


Field switches control contacts in the ladder logic.
Input Card The state of the contact determines if the output
coil will be energized.
I:000

0
1
2
3
4
5
6
7
Since the field switch is open,
A the contacts in the ladder
logic are left in their “as
B written” state (blocking)
The output coil does not
C receive power and so is “off”
or “de-energized”
D

8/11/2018 PLC-1 Introduction to PLC's 50


Closed Field Switch
Input Card
I:000

0
1
2
3
4
5
6
7

B
Since the field switch is closed, the
contacts in the ladder logic are
C changed to their “opposite of
written” state (conducting)
D
The output coil receives power and
so is “on” or “energized”

8/11/2018 PLC-1 Introduction to PLC's 51


Open Field Switch with N.C. Contacts
Input Card
I:000

0
1
2 Since the field switch is open, the contacts in
3 the ladder logic are left their “as written”
4
5
state (conducting!)
6
7 The output coil receives power and so is “on”
or “energized”
A

8/11/2018 PLC-1 Introduction to PLC's 52


Closed Field Switch with N.C. Contacts

Input Card
I:000

0
1
2
3
4
5
6
7
Since the field switch is closed, the contacts in
A the ladder logic are changed to their
“opposite of written” state (blocking!)
B The output coil does not receive power and so
is “off” or “de-energized”
C

8/11/2018 PLC-1 Introduction to PLC's 53


RSLogix5 Programming Software
• Rockwell Software
(Rockwell is the
parent company of
Allen-Bradley) makes
a package to run on
Win98, WinNT4,
Win2000, WinME, or
WinXP called RSLogix5
• RSLogix5 provides the
ability to view, modify,
and backup ladder
logic for the PLC5
family of processors

8/11/2018 PLC-1 Introduction to PLC's 54


User menus and
functions are
available at the
top

Access to ladder
files and data files

Ladder logic is
shown in the
main window

8/11/2018 PLC-1 Introduction to PLC's 55


Using RSLogix5 - Demo
• Watch while RSLogix5 is demonstrated
• Be sure to remember how to:
– Insert a new rung
– Add contacts to a rung
– Insert a coil on a rung
– Check your work
– Test your edits
– Assemble your edits

8/11/2018 PLC-1 Introduction to PLC's 56


Hands-On Exercises
• With this background, we are now
ready to apply this information
• Tab 2 in your manual contains a series
of hands-on lab exercises
• You will work with an Allen-Bradley PLC
that is connected some basic field
devices
• Enjoy!

8/11/2018 PLC-1 Introduction to PLC's 57

You might also like