69
Basics of Programmable Logic Controllers (PLCs) Focused, To-The-Point and Practical!

Programmable Logic Controllers

Embed Size (px)

Citation preview

Page 1: Programmable Logic Controllers

Basics of Programmable Logic Controllers (PLCs)Focused, To-The-Point and Practical!

Page 2: Programmable Logic Controllers

Personal IntroductionEngr. Arslan Ahmed Amin is a professional Electrical and Instrumentation Engineer serving Pakistan’s pioneer Oil and Gas Organization, Pakistan Petroleum Limited. He obtained his Bachelor's degree in Electrical Engineering from the prestigious University of Engineering and Technology, Lahore in 2010 and started his professional career with Pakistan Petroleum Limited. He has served this organization for 06 years and achieved lots of accomplishments in the development of the systems of newly installed 210 MMSCFD gas compression facility. He actively contributed his services in commissioning, testing, maintenance and upgradation of the E&I systems. He completed his Master’s in Business Administration (M.B.A.) in 2014 from Virtual University of Pakistan, Lahore through distance learning and afterwards obtained Masters (M.Sc.) in Electrical Engineering from University of Engineering and Technology, Lahore in 2015.

Page 3: Programmable Logic Controllers

P.H.D. Electrical Engineering (University of Engineering and Technology, Lahore) In progress.

M.Sc. Electrical Engineering (University of Engineering and Technology, Lahore)

M.B.A. Online (Virtual University of Pakistan, Lahore)

B.Sc. Electrical Engineering with Honors (University of Engineering and Technology, Lahore)

Education

Page 4: Programmable Logic Controllers

06 years’ experience in industrial process controls and electrical power systems domain with Pakistan Petroleum Limited (PPL) in CMMS (SAP) environment.

Experience in commissioning, testing and maintenance roles of latest systems regarding Power Generation, Field Instrumentation, Distributed Control System, Safety Instrumented System, Gas Turbines, PLCs, Analyzers, SCADA, Well Head Control Panels and Utility packages.

Experience

Page 5: Programmable Logic Controllers

‘DCS Troubleshooting Practices’ by Haward Technology Middle East from 16th to 20th May 2016.

‘Protective Relays Applications in Power System’ by Haward Technology Middle East from 04th to 08th April 2016.

‘Circuits and Electronics’ from Massachusetts Institute of Technology (MIT) USA.

‘Project Management’ from Virtual University of Pakistan (VU).

‘Production and Operations Management’ from Virtual University of Pakistan (VU).

‘Conflict Management’ from Virtual University of Pakistan (VU).

‘Crisis Management’ from Virtual University of Pakistan (VU).

Professional Courses

Page 6: Programmable Logic Controllers

QMS 9001, ISO 14001 EMS and OHSAS 18001, ERP System, Cost of Quality, Productivity Improvement Techniques, Process Safety Management, Hazard Identification and Risk Assessment, HAZOP, SIL systems, Occupational health and Safety, Permit to work system, Safety Modules (Complete), Communication Skills, Team Work Skills, Decision Making Skills (Organized by PPL)

SAP System (R3P version) Maintenance Work Orders Processing, Contracts Management, Spares and Material.

‘Instrumentation and Controls Fundamentals’ from OMS Institute of Management and Technology, Lahore.

Installation, calibration and maintenance of Fire and Gas detectors by Det-tronics.

Generation, Transmission and Distribution at WAPDA Engineering Academy Faisalabad.

Professional Trainings

Page 7: Programmable Logic Controllers

Among Top 10 students in the session of 240 students in B.Sc. Electrical Engineering.

Received Dean’s Honor Role award in consecutive five semesters for excellent academic performance in B.Sc. Electrical Engineering.

Overall Topped in F.Sc. in Board of Intermediate and Secondary Education, Faisalabad 2006.

Winner of Quaid-e-Azam Scholarship. Gold medal winner in District Science Quiz Competition

Faisalabad. Represented as ‘Talent of Pakistan Youth’ in China in 2007 by

Ministry of Youth, Pakistan.

Academic Achievements

Page 8: Programmable Logic Controllers

P L C C O U R S E

Introduction PLC history PLC functions PLC selection Logic Gates in PLC Combination of Gates Simple Logic Examples Exercise

Page 9: Programmable Logic Controllers

What is a PLC?

A PLC is a device that was invented to replace the necessary sequential relay circuits for machine control.

The PLC works by looking at its inputs and depending upon their state, turning on/off its outputs.

The user enters a program, usually via software, that gives the desired results.

Page 10: Programmable Logic Controllers

What is a PLC?

For example, let's assume that when a switch turns on we want to turn a solenoid on for 5 seconds and then turn it off regardless of how long the switch is on for. We can do this with a simple external timer. But what if the process included 10 switches and solenoids? We would need 10 external timers. What if the process also needed to count how many times the switches individually turned on? We need a lot of external counters.

Page 11: Programmable Logic Controllers

PLC History

In the late 1960's PLCs were first introduced. The primary reason for designing such a device

was eliminating the large cost involved in replacing the complicated relay based machine control systems.

Page 12: Programmable Logic Controllers
Page 13: Programmable Logic Controllers
Page 14: Programmable Logic Controllers
Page 15: Programmable Logic Controllers
Page 16: Programmable Logic Controllers
Page 17: Programmable Logic Controllers
Page 18: Programmable Logic Controllers

PLC History

Bedford Associates (Bedford, MA) proposed something called a Modular Digital Controller (MODICON) to a major US car manufacturer.

The MODICON 084 brought the world's first PLC into commercial production.

Page 19: Programmable Logic Controllers

Programmable Logic Controller ( P L C ) – T Y P E S

Modular:Capacity and functionality can be

added as required and then removed to be used elsewhere.

Industrial:Suitability for the temperature,

humidity, vibration and voltage variation and design for 24 hour operation.

Page 20: Programmable Logic Controllers

Benefits of PLC

Safe operation of plant In emergency, automatically shutdown the plant

in fail safe condition In startup check the prerequisite & then permit to

start Logging the event.

Page 21: Programmable Logic Controllers

Benefits of PLC

High reliability Flexible control Easily modified Easy troubleshooting Reduced space requirement Revisable Lower cost Modularity

Page 22: Programmable Logic Controllers

PLC Selection

Safety Reliability and maintainability Availability Flexibility Cost Speed of operation Security Space Events logging

Page 23: Programmable Logic Controllers

Safety

For the term of safety, there are numerous definitions that have been worked out the different boards. All definitions have in common that safety means a sufficient protection form danger. In the DIN 31 000 standard document, part 2 safety is defined as a situation in which the risk is not higher than the risk limit. This also means that absolute safety cannot be achieved in technology.

Page 24: Programmable Logic Controllers

Safety

Safety related controls are needed for trains, lifts, escalators, burners etc. the safe controls must be designed in a way that any component fault and other imaginable influences do not cause dangerous states in the plant.

Page 25: Programmable Logic Controllers

Safety

The safe state is the state to which a system can be put out of its current operational state and which has a system specific lower hazard potential than the operational state. The absolutely safe state is always the state with the lowest amount of energy involved.

Page 26: Programmable Logic Controllers

Reliability

Reliability is the ability of a technical device to fulfill its function during its operation time. This is often no longer possible if one component has a failure. So the MTBF (Mean time Between Failure) is often taken as a measurement of reliability. It can either be calculated statistically via systems in operation or via the failure rates of the components applied.

Page 27: Programmable Logic Controllers

Note

The reliability does not say anything about the safety of a system! Unreliable systems are safe if an individual failure put the plant to the safe state each time.

Page 28: Programmable Logic Controllers
Page 29: Programmable Logic Controllers
Page 30: Programmable Logic Controllers
Page 31: Programmable Logic Controllers
Page 32: Programmable Logic Controllers
Page 33: Programmable Logic Controllers
Page 34: Programmable Logic Controllers
Page 35: Programmable Logic Controllers
Page 36: Programmable Logic Controllers
Page 37: Programmable Logic Controllers

PLC Components

The PLC mainly consists of a CPU (Processor) Memory areas Input/output data devices Separate relays Counters Timers

Data Storage locations Power Supply Programming unit

Page 38: Programmable Logic Controllers

Processors

Processor is the brain of PLC 5 basic parts CPU control the operation of PLC. Memory instruction & data that tell the cpu

what to do. Communications processor: handles

communication from outside world. Battery :- keeps time & maintain the

programme. Power supply: supply to run the processor.

Page 39: Programmable Logic Controllers

Power supply

Two sources of power are used in PLC. Battery power Local power from plant

Battery power used to maintain the user programme / keep the time of day, clock running, maintain the status of certain bits and register.

Page 40: Programmable Logic Controllers

PLC Components

Do these counters, timers, etc. really exist? No, they don't "physically" exist but rather they are simulated and can be considered software counters, timers, etc.

These internal relays are also simulated.

Page 41: Programmable Logic Controllers

PLC Components

INPUT RELAYS-(contacts) Connected to the outside world. They physically exist and receive signals from

switches, sensors, etc. Typically they are not relays but rather they are

transistors.INTERNAL UTILITY RELAYS-(contacts)

Do Not Receive Signals From the Outside World nor Do They Physically Exist.

They Are Simulated Relays and Are What Enables a PLC to Eliminate External Relays.

Page 42: Programmable Logic Controllers

PLC Components

COUNTERS Do not physically exist. They are simulated counters

and they can be programmed to count pulses. Counters can count up, down or both up and down. Since they are simulated they are limited in their

counting speed. Increments vary from 1ms through 1s.

Page 43: Programmable Logic Controllers

PLC Components

TIMERS Do not physically exist. They come in many varieties and increments. The

most common type is an on-delay type. Others include off-delay and both retentive and non-

retentive types. Increments vary from 1ms through 1hr.

Page 44: Programmable Logic Controllers

PLC Components

OUTPUT RELAYS Connected to the outside world. They physically exist and send on/off signals to solenoids, lights, etc.

Page 45: Programmable Logic Controllers

PLC Components

DATA STORAGE Typically there are registers assigned to simply store data. They are usually used as temporary storage for math or data manipulation. They can also typically be used to store data when power is removed from the PLC. Upon power-up they will still have the same contents as before power was removed. Very convenient and necessary

Page 46: Programmable Logic Controllers

Logic gates in PLC

Logic gates in a PLC are implemented in software as compared to conventional hard-wired logic.

Any size of the logic can be implemented using same PLC. It will not increase the size of PLC as it was the case with conventional systems.

Page 47: Programmable Logic Controllers

Logic gates in PLC

AB

AB

O

O

OA

AB

O

(OR Gate)

(AND Gate)

(NOT Gate)

(XOR Gate)

= A . B

= A + B

= A_

= A.B + A.B_ _

Page 48: Programmable Logic Controllers

Combination of Logic gates

A

A

B

B

C

C

O

Two out of three logic with digital Gates

Page 49: Programmable Logic Controllers

Timer

On-Delay timer:-This type of timer simply "delays turning on".

Off-Delay timer:- This timer simply "delays turning off".

t

t

0

0

Page 50: Programmable Logic Controllers

Timer

Timed:-Pulse with defined length after signal change from L to H at the input.Output carries H-signal for preset time.

Pulse:- Generate a pulse of 1 second at the output when input signal change from L to H.

t

Page 51: Programmable Logic Controllers

Flip Flop

To understand this SR flip flop we need its truth table which is below,

Q

QSET

CLR

S

RS R Q Q

1 0 1 0

0 0 1 0

0 1 0 1

0 0 0 1

1 1 X X

Page 52: Programmable Logic Controllers

Relays

PLC processes inputs, outputs, and the actual program we are almost ready to start writing a program.

But first lets see how a relay actually works. After all, the main purpose of a plc is to replace "real-world" relays.

We can think of a relay as an electromagnetic switch. Apply a voltage to the coil and a magnetic field is generated.

Page 53: Programmable Logic Controllers

Relays

This magnetic field attracts the contacts of the relay in, causing them to make a connection.

These contacts can be considered to be a switch. They allow current to flow between 2 points

thereby closing the circuit.

Page 54: Programmable Logic Controllers

Relays Consider example. Here we simply turn on a bell Whenever a switch is closed. We have 3 real-world parts.

A switch A relay A bell

Whenever the switch closes we apply a current to a bell causing it to sound.

Notice in the picture that we have 2 separate circuits. The bottom indicates the DC part. The top indicates

the AC part.

Page 55: Programmable Logic Controllers

PLC Operation

PLC works by continually scanning a program. We can think of this scan cycle as consisting of 3 most important steps.

Page 56: Programmable Logic Controllers

PLC Operation

PLC operate very much just like a computer. PLC read input devices, execute its program using the

status of input devices, writes the appropriate values to the output devices.

Page 57: Programmable Logic Controllers

Principle of Operation Computer execute keyboard instruction while PLC follow the

program. PLC scan time varies from mS to Seconds. Step 1- CHECK INPUT STATUS

PLC takes a look at each input to determine if it is on or off. Rerecords this data into its memory to be used during the next

step.

Page 58: Programmable Logic Controllers

Principle of Operation

Step 2-EXECUTE PROGRAM PLC executes your program one instruction at a

time. It already knows which inputs are on/off from the

previous step it will be able to decide whether the program output should be turned on based on the state of the input.

It will store the execution results for use later during the next step.

Page 59: Programmable Logic Controllers

Principle of Operation

Step 3-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.

Page 60: Programmable Logic Controllers

PLC and other type of controller No. of input / output handling

Micro PLC ( Relay Replacer ) Small Medium Large

Page 61: Programmable Logic Controllers

Response Time

The total response time of the PLC is a fact we have to consider when purchasing for a PLC. Just like our brains, the PLC takes a certain amount of time to react to changes.

INPUT It takes certain amount of time for the

processor to notice the input signal. EXECUTION

Certain amount of time to process the information received from the input.

OUTPUT Output receives a signal from the processor

Page 62: Programmable Logic Controllers

Processor Scan

Scan time PLC execute only one programme and it keeps on

doing it over and over again. The time out PLC takes to execute this programme once is called the scan time.

Scan time can be reduced by stopping the solution of a line of logic once it has determined it is False, regard less of the rest of the line.

House keeping Checking battery stakes. Verify memory integrity. Checking power supply. Vesting the watchdog timer.

Page 63: Programmable Logic Controllers

Start up Procedure Operation Test Place processor in “Program mode” and

turn on main power switch. Load the pre-tested control program

into the programmable controller. Disable all outputs, select the run mode

on the processor, and verify that the run light on the processor is activated.

Page 64: Programmable Logic Controllers

Start up Procedure

Check each rung of logic for proper operation by simulating the inputs, proper time and sequence in the program.

Make any required changes to the control program.

Enable output modules & place processor in “Run” mode.

Test control system as per process operating procedure.

Page 65: Programmable Logic Controllers

Problem sources in PLC Applications. Field devices Wiring I/O modules Program Processor, racks, etc. Heat protection, loose connections Accumulation dirt, dust, failed ventilation.

Maintenance

Page 66: Programmable Logic Controllers

PLC Preventive Maintenance

Routine Maintenance Perform Weekly Change Filters. Check error log and scan time. Check diagnostic lights.

Maintenance

Page 67: Programmable Logic Controllers

Visual Inspection Perform Quarterly Check for proper operation of ventilation system.

Check for buildup of dust or dirt. Is any extraneous material in the cabinets. Look for loose connections. Are there signs of temporary modifications, jumps

etc.? Look for signs of heating, burning, or water

infiltration. Is all the documentation present and up to date?

Maintenance

Page 68: Programmable Logic Controllers

Maintenance Perform Yearly Replace batteries. Backup Program

Maintenance

Page 69: Programmable Logic Controllers

Programming device

Copy the program to same secure media. Monitor the programme which it is running. Reload a programme from the storage media. Make changes to the programme.