You are on page 1of 50

PLC An Introduction

Basic Component of PLC


i. ii. iii. iv. v. The PLC Processor & controller I/O module Chases or backplane Power supply Programming Software

In addition to these 5 components, most PLCs also have Network Interface.

Processor, Controller or CPU


Stores the control program and data in its memory Reads the status of connected input devices Executes the control program Commands connected outputs to change state based on program execution For example: Turn a light on, start a fan, adjust a speed, or temperature Comes in various physical forms.

I/O Modules
Physically connect to field devices Input modules convert electrical signals coming in from input field devices such as pushbuttons, to electrical signals that the PLC can understand. Output modules take information coming from the PLC and convert it to electrical signals the output field devices can understand. For example: a motor starter, or a hydraulic solenoid valve. I/O comes in various forms

Input Modules
Input modules interface directly to devices such as switches and temperature sensors. Input modules convert many different types of electrical signals such as 120VAC, 24VDC, or 4-20mA, to signals which the controller can understand.

Input Modules
Input modules convert real world voltage and currents to signals the PLC can understand. Since there are different types of input devices, there is a wide variety of input modules available, including both digital and analog modules.

Discrete vs. Analog Modules


Discrete modules use only a single bit to represent the state of the device. For example, a switch is either open or closed. Therefore, the bit is either a 0 (switch is open) or a 1 (switch is closed). Discrete modules are also known as Digital modules. Analog modules use words to represent the state of a device. An analog signal represents a value.. For example, the temperature could be 5, 9, 20, 100, etc degrees. Analog modules use a value, such as 52, rather than a 0 or 1 to represent the state of the device.

Output Module
Output modules interface directly to devices such as motor starters and lights Output modules take digital signals from the PLC and convert them to electrical signals such as 24VDC and 4 mA that field devices can understand

Output Module
Output modules take a signal from a PLC and convert it to a signal that a field device needs to operate. Since there are different types of output devices, there is a wide variety of output cards available, including both digital and analog cards.

Chassis/Backplane
All PLCs need some method of communicating between the controller, I/O and communications modules. Here are three ways used to accomplish this communications between the various components that make up the PLC system. I. Modules are installed in the same chassis as the PLC and communicate over the chassis backplane. II. Modules are designed to plug into each other. The interconnecting plugs form a backplane. There is no chassis III. Modules are built into the PLC. The modules come together in one physical block. The backplane in this case is transparent to the user.

Chassis/Backplane
Below is an example of a backplane in a chassis based system. You can see the backplane in the area where the modules are not inserted. The modules have connectors that plug into the black connectors on the backplane. All of the connectors on the backplane are connected together electrically.

Chassis/Backplane (example)

Backplane & Chassis

Great flexibility in choice of modules. Modules can be easily installed or removed without affecting other modules

Great flexibility in choice of modules. In some cases modules cannot be removed without breaking the chain and affecting all modules downstream. No chassis cost. Low cost solution but limited flexibility. Generally used in smaller, simpler systems.

Power Supply
A power supply is needed to provide power to the PLC and any other modules. Power supplies come in various forms: Power supply modules that fit into one of the slots in a chassis External power supplies that mount to the outside of a chassis Stand alone power supplies that connect to the PLC or I/O through a power cable

Programming Software
Software that runs on a PC is required to configure and program PLCs. Different products may require different programming software. Software allows programs to be written in several different languages

Network Interface
Most PLCs have the ability to communicate with other devices. These devices include computers running programming software, or collecting data about the manufacturing process, a terminal that lets an operator enter commands into the PLC, or I/O that is located in a remote location from the PLC. The PLC will communicate to the other devices through a network interface.

PLC Programming
Every PLC has associated programming software that allows the user to enter a program into the PLC. Software used today is Windows based, and can be run on any PC. Different products may require different software: PLC5, SLC, and Control-Logix each require their own programming software.

Example

Example

Linking PETRA to ML1500


Petra Output
Hole detection sensor 3 of 6.

Symbol
H3

PLC Input
I0

Wire Color
Black

Comment
Aligned to detect a hole. ON if material is in b/w the sensors.

Hole detection sensor 6 of 6.

H6

I1

Brown

Aligned to detect a hole. ON if material is in b/w the sensors. Aligned to detect cut out. ON if material is in b/w the sensors. ON if Material Below the sensor.

Cut out length Detector 1

L1

I2

Red

Cut out length Detector 2

L2

I3

Orange

Part Thickness Sensor

I4

Yellow

ON if Component thickness.

is

of

correct

Slot sensor Carriage Position Status

S CS

I5 I6

Green Blue

Aligned to detect slot. ON if material below the sensor. ON if the carriage is not at the pick and pace position. Determined by CPL & CPH OFF arm reaches belt 2. stays ON until arm return to belt 1. ON when there is no component in the dispenser.

Arm Position Dispenser Empty

AP DE

I7 I8

Purple Gray

Connection b/w PETRA control I/P and PLC O/P


Petra Input Hole detection sensor 3 of 6. Symbol PV PLC Output O4 Wire Color Brown Comment When energized, It applies vacuum to the plunger pad.

Hole detection sensor 6 of 6.

PA

O5

Red

Move the Plunger down when energized.

Carriage Position Low

CPL

O6

Orange

CPL & CPH determined Position of carriage.

Carriage Position high

CPH

O7

Yellow

00 = Dispenser 10= Reject Bin

01 = Belt 1 11 = Belt 2

Conveyor Belt 1 Conveyor Belt 2

C1 C2

O8 O9

Green Blue

Belt 1 moves when energized. Belt 2 moves when energized. Arm moves from belt 1 to belt 2 when energized. Gripper hold energized. the component when

Arm Activate Gripper Activate

AA GA

O10 O2

Purple White

Basic Instruction
Ladder logic Inputs
XIC- Examine if closed XIO- Examine if open

Ladder logic Outputs


OTE - Output Energized OTL Output Latch OUT Output Unlatch

LADDER LOGIC I/P


XIC / Normally Open:
Symbol:
Definition:
Examine a bit for ON condition. Use XIC bit in your ladder logic to determine if a bit is ON 0 = False 1 = ON Start / Stop Push Buttons Limit Switches Selectors Proximity Switches Sensors

Devices:

LADDER LOGIC I/P


XIO/ Normally Closed:
Symbol:
Definition:
Examine a bit for an OFF condition. Use an XIO instruction in your ladder logic to determine if a bit is OFF. 1 = True 0 = False

Device:
Start/ Stop push button. Selectors Limit Switches etc.

LADDER LOGIC O/P


Output Energize (OTE):
Symbol:
Definition:
Turns a bit ONN or OFF Use OTE instructions in Ladder logic when rung condition is evaluated as True.

Devices:
Light Motor Internal bits Actuators

LADDER LOGIC O/P


OUTPUT Latch (OTL)
Symbol: Definition:
Turns a bit on when a rung is executed, & a bit is retain its state When the rung is not executed. Once an OTL bit has been set "on" (1 in the memory) it will remain "on" even if the rung condition goes false. The bit must be reset with an OTU instruction.

LADDER LOGIC O/P


OUTPUT Unlatch (OTU)
Symbol:
Definition:
Turns a bit OFF when the rung is executed. Use this output instruction to unlatch (reset) a latched (set) bit which was set by an OTL instruction. The OTU address must be identical to the OTL address which originally set the bit.

Example

Example

The Slot Sensor


Detects whether there is a slot in a component or not. Principle:
Optical-reflection wherein it gives a 1 whenever light reflects back from a smooth surface into the sensor (i.e. when the solid part of the component is beneath the sensor) and gives a 0 when light does not reflect back to the sensor (i.e. when the belt or any non-reflective material is beneath the sensor).

LAB TASK
1- Create a program that does the following: When Dispenser is empty, Belt 2 in PETRA should run. When Dispenser is not empty, Belt 1 in PETRA should run. Save your program. We need a mechanism to stop both belts if required. We will employ the Slot sensor for this. When there is a part beneath the Slot sensor it comes ON Use Table 3.1 and 3.2 for the addresses of inputs and outputs.

2- Amend the program with the following condition: Neither belt should be driven when the slot sensor is detecting material beneath the sensor.

TIMERS
Three basic types of Timers are.
Timer ON Delay Timer OFF Delay Retentive Timer ON Retentive Timer OFF

Timer ON Delay
This types of timers simply delay turning on.
i.e. After our sensor (I/P) turns on we wait X-sec before activating a solenoid valve (O/P)

Symbol:

Timer ON Delay
It will count the time base interval when the instruction is true. The Timer on delay instruction begins to count time base interval when the rung condition remains true. The Timer adjust its accumulator value until it reaches its preset value. Time = Preset * Time base The accumulator value goes reset when rung condition got false. Timer on delay is consist of 3 words element.
Control word Bit 0-12: Internal use Bit 13: DN (true when ACCUMULATOR >= Preset Value ) Bit 14: TT (This bit is on when the timer is timing) Bit 15: EN (On when TT is energized) Store the Preset value Usually this bit is from 0-32767 It cant be negative Accumulator This is the time elapsed since the timer was last reset. TIME base is the timing update interval vary from 0-1 sec

Timer ON Delay

TIMER ON DELAY (Example-1)

Timer ON Delay (Example-2)

Timer OFF Delay


Counts time base intervals when the instruction is false. TOF instruction begins to count time base intervals when a rung makes true to false instruction. As long as the condition will remain false , the timer increments its accumulator value . The accumulator value reset when the rung condition goes true regardless of weather the timer has timed out.

Timer OFF Delay


Symbol:

Timer address: Control Address Bit: 0-12 (internal use) Bit: 13 DN (Done) Bit: 14 TT (Timer Timing) Bit: 15 EN Store the Preset Value When accumulated value become =/> the preset value the done bit is set. Preset value is from 0-32767 If the Timer preset value is ev an error will occur. Accumulated value

Timer OFF Delay

Timer OFF Delay

Recursive Timer

Counters
Types of counters:
1. Count up (CTU) 2. Count Down (CTD)

Count up: (CTU)


It increments the accumulated value at each false to true transition and retain the accumulator value when the instruction goes false.

Count up: (CTU)


CTU is an instruction that counts false to true transition. The transition causes the accumulated value to increment by one. It is reset by the RES instruction. If the accumulation value is equal to Preset value then DN = 1

Count up (CTU)

Count Down
Decrements the accumulator value at each false to true transition and retain the accumulated value when instruction goes false. CTD is an instruction that counts false to true transition. Transition causes the accumulated value by one count. CTD is reset by the RES instruction. If accumulator value is below the Preset value the DN bit gets low.

Count Down (CTD)

You might also like