Sei sulla pagina 1di 79

MT 612

PLC Introduction

Objectives of the lecture


Describe the structure of a PLC Program. Describe the execution of a PLC Program. Describe the typical elements of ladder diagram. Design ladder diagrams for simple industrial logic control problems.

The programmable logic controller microprocessor-based system that

(PLC)

is

accepts input data from switches and sensors, processes the data by making decisions in accordance with the logic of the stored program, and generates output signal to devices that perform a particular function.

The purpose of a PLC was to directly electromechanical relays as logic elements, by state digital computer with a stored program, emulate the interconnection of many relays to certain logical tasks.

replace a solidable to perform

Industrial Control Computer

Monitoring subsystems
These system display the process state to the operator and draw attention to abnormal or fault conditions that need attention. The plant condition is measured by suitable sensors. Digital sensors measure conditions with distinct states. Analog sensors measure conditions which have a continuous range such as temperature, pressure, flow or liquid level. The results of these measurements are displayed to the operator via indicators (for digital signals) or by meters and bargraphs for analog signals.

Monitoring subsystems
The signals can also be checked for alarm conditions. An over-travel limit switch or an automatic trip of an overloaded motor are typical digital alarm conditions. A high temperature or a low liquid level could be typical analog alarm conditions. The operator could be informed of these via warning lamps and an audible alarm.

Schematic

PLC Architecture
Mainly consists of I/Os
Digital Analog Remote Function modules Communication processor Network communication Serial port (RS232 kind) Parallel port (printer, etc)

A typical PLC

Input Cards
Converts process level signals to Processor levels (operating at 5 V DC) It can take 24 V DC signal, RTD signal such as Pt 100, 4-20 mA current or contact. Status of the inputs is stored in the memory in process- image input table (PII).

Processor
It processes the program stored in the program memory. It consists of a list of logic functions and instructions that are successively processed. The results are written into a process-image output table (PIQ). Also other storage areas for counters, timers and memory bits will be accessed during program processing by the processor if necessary.

Output Cards
Converts back the signal so that power may be enhanced at the output. The status from the PIQ will be transferred to the outputs and then be switched on and/or off.
Motor actuation Solenoid Control Valves Lamp For switching purposes.

Points of Distinction
PLCs are specifically designed to survive the harsh conditions of the industrial environment. A well-designed PLC can be placed in an area with substantial amounts of electrical noise, electromagnetic interference, mechanical vibration, and noncondensing humidity. Hardware and software are designed for easy use by plant electricians and technicians. The hardware interfaces for connecting field devices are actually part of the PLC itself and are easily connected.

Points of Distinction
The modular and self-diagnosing interface circuits are able to pinpoint malfunctions and, moreover, are easily removed and replaced. The software programming uses conventional relay ladder symbols, or other easily learned languages, which are familiar to plant personnel. It provides reliability, repeatability and programmability to control solutions.

The program Scan


The time required by MuP to complete one cycle is called Scan Time. Scan time depends on size of the program, its complexity and processor speed. A PLC program can be considered to behave as a permanent running loop. The users instructions are obeyed sequentially, and when the last instruction has been obeyed the operation starts again at the first instruction. A PLC therefore does not communicate continuously with the outside world, but acts intermittently.

The program scan


The PLC does not read inputs as needed. At the start of the scan it reads the state of all the connected inputs and stores their state in its memory. When the PLC program accesses an input, it reads the input state as it was at the start of the current program scan (from PII). Similarly, it does not change outputs instantly (goes to PIQ). All the outputs are updated simultaneously at the end of the scan. This method enables faster program execution because access to the process image is executed much faster than access to the I/O modules.

The program scan


Read inputs

Scan program

Update outputs

The program scan

There will be an area of memory reserved for internal signals which are used by the program but are not connected directly to the outside world. Timers, counters, storage bits.

Program Execution

Interrupt Driven or Clock Driven Execution


A cyclically executing program can be interrupted by a suitably defined signal resulting in an interrupt driven mode of program execution. In time synchronous execution, the interrupting signal occurs at fixed intervals (and not condition based). The cyclic execution, synchronized by a real time clock is the most common program structure for a PLC.

Interrupt Driven or Clock Driven Execution


Interrupt driven: Emergency shut-down, alarm. Clock driven: Each actuation is synchronized.
Automatic sequence of operation in an assembly line.

Cycle driven: Most common. No interruption.


Inventory system.

Effect of Scan Time


Response of PLC
The program scan obviously limits the speed of signals to which a PLC can respond. If a PLC is being used to count a series of fast pulses, with the pulse rate slower than the scan rate, the PLC counts correctly. If the pulse rate is faster than the scan rate, then the PLC starts to miscount and miss pulses.

A typical Signal Scan

A typical Signal Scan

A typical Signal Scan

Effect of Scan Time


Response of PLC
In the extreme case, whole blocks of pulses are totally ignored. In general, any input signal that a PLC reads must be present for longer than the scan time. Shorter pulses may be read if they happen to be present at the right time but this cannot be guaranteed.

So, if input has arrived just after the input scan is over, it will not be read. If it goes off before the next scan, it will not be read at all. If it remains till the next scan, it will be read. But the whole one scan time is elapsed to read that input. Output will be observed after 2 scan time.

I/O Skew
There is always a skew between input and corresponding output by minimum of one scan time.

I/O Skew

PLC
Present set up uses ABB make PLC model LM043 (software version AC010), 24 VDC. It is an electronic control relay with built-in logic, timer, and counter functions. The algorithm is designed based on control logic required to carry out event actuation and signal generation for a given system. The circuit diagram is made on AC010 software using ladder logic.

PLC
Contacts are used to modify the flow of current in the circuit diagram. Every contact in the circuit diagram can be defined as either a make or break contact. Make contact carry signal 1 and break contact carry signal 0. There are different types of relays for wiring a circuit diagram.

Elements of Ladder Logic


Contacts: Input devices
Can be an external switch, internally set logic flags (M) or time function (T).

Coils: Output devices


To operate motor, solenoid or other actuator. Also used to operate internal timer, counter or flags.

I/O Contacts / Coils and their symbols used in PLC:


I: Input Q: Output coil M: Marker flag T: Timer C: Counter

Coil Functions:
[

S R TT

Contacter function, Output signal follows input signal immediately Impulse relay, switches (0 to 1 or 1 to 0) whenever the input signal changes from 0 to 1 Set / latching: To set output on Reset (unlatching): to set output off Triggering the timer

I : Input contact Q: Output, coil functions provided M: Marker, coil functions provided T: Timer, coil function and time base is provided C: Counter, coil function and parameter values provided

Ladder Diagram

The logic in a ladder diagram typically flows from left to right. The diagram can be divided into sections called rungs, analogous to the rungs on a ladder. Each rung typically consists of a combination of input instructions. These instructions lead to a single output instruction (right-most on a rung). Ladder diagram programming allows PLCs to perform several different types of tasks, including Boolean logic, timing, counting, arithmetic, and special functions.

Inputs
Actual physical devices. Inputs are represented as Contacts. Two types of contacts are used, namely, normally open (NO) and normally closed (NC) contacts.

Contact Open

Contact Closed

Inputs
Normally Open Type (NO): It is closed when active.

Contact Open Inactive Contact Closed Active

NO Inputs

Inputs
Normally Closed Type (NC): It is open when active.

Contact Open Active

Contact Closed Inactive

NC Inputs

Set and Reset conditions

Set and Reset conditions

Permanent contact: To energize a relay coil continuously, make a


connection of all contact fields. Output Q1 will remain on all the time.

Series Connection: Output relay Qx is controlled by a series circuit


consisting of a maximum of three make or break contacts. Marker relays can be used to raise the flag if more than three contacts are required to be connected in series. AND circuit: Three make contacts in series NOR circuit: Three break contacts in series The AND circuit consists of three inputs connected in series. When all the three inputs I1, I2 and I3 are set-on, then only the output Q1 will be switched-on. The NOR circuit consists of three negated inputs connected in series. When all the three inputs I1, I2 and I3 are set-off, only then the output Q2 will be set-on.

AND & NOR ckt

AND & NOR ckt

Parallel Connection: Output relay Qx is controlled by a parallel circuit


consisting of either make or break inputs connected in parallel.

OR circuit: Three make contacts in parallel NAND circuit: Three break contacts in parallel

The OR circuit consists of three inputs connected in parallel. When any of the three inputs I1, I2 or I3 are set-on, then the output Q1 will be switchedon. If input I2 is only on and the other two inputs are off, then the circuit will be complete from I2 to Q1.
The NAND circuit consists of three negated inputs connected in parallel. When any of the three inputs I1, I2 or I3 are set-off, then the output Q2 will be switched-on. If input I1 is off and the other two inputs are on, then the circuit will be completed from I1 to Q2.

NAND & OR Ckt

Changover Circuit: It is made using two series connections


combined to form a parallel connection. It is called EXclusive OR (XOR) circuit. Coil can be energized only when one contact switches.

The XOR circuit consists of two inputs connected in series, one make and the other break contact and their combinations are connected in parallel. When any of the two inputs I1 or I2 is set-on, then the output Q1 will be set-on. If I1 is on, then the circuit will be completed from I1 through negated I2 to Q1.

XOR Ckt

Latching Circuit:
It is used to switch machine/system on or off. Relay output Q1 is latched (set-on) when I1 is switched-on. Negation of I2 can only unlatch (reset) output Q1.
Logic Conditions: If I1 is on and I2 is off, RQ1 is given hierarchical priority, and output Q1 will remain switched-off. If I1 as well as I2 is set-on, output Q1 will remain switched-on till I2 is negated. After setting-on I1 once, as long as I2 is on, Q1 remains latched, whatever is the state of I1; because Q1 is not relatched by I1. Signal Processing: Setting-on output Q1 through input I1. Function Control: Input I2 may be used to switch on and off output Q1. (The only condition is signal of input I1 should remain on.)

Timer
Time is always a part of a control system. Typical examples are:
Lift parking brake, drive to forward limit and stop drive, wait 50 second and apply parking brake, After n rotation, stop motor.

A PLC system must therefore include timers as part of its programming language.

Timer Relay
AC010 provides eight timer relays, T1 to T8. It is used
to set the switching duration and make and break times of a relay contact.

It is integrated into circuit diagram in the form of a contact. The function is defined in terms of parameter display. The relay starts with coil function TTx (triggering timer relay x) and can be reset via the reset coil function RTx. Reset coil has priority over the trigger coil.

Timer
On delay Off delay Single pulse Multiple pulses

On Delay Timer
A 0 to 1 transition is delayed for a preset time T. A 1 to 0 transition is instant with input signal. An input signal shorter than T is ignored.

Off Delay Timer


The off delay passes a 0 to 1 transition instantly but delays the 1 to 0 transition by preset time. Eg.: In Xylo, the head lights remain on even after ignition switch is put-off. It will remain on for preset time. It is providing the driver to walk-off with ease in the dark.

Off Delay Timer

Counters
The PLC may be required to count the number of items in a batch. Record the number of times some event occurs. Number of starts of a motor needs to be logged. The value of the count can be read, displayed and used by other parts of the program.

Example Circuits

Permanent contact: To energize a relay coil continuously, make a


connection of all contact fields. Output Q1 will remain on all the time.

Series Connection: Output relay Qx is controlled by a series circuit


consisting of a maximum of three make or break contacts. Marker relays can be used to raise the flag if more than three contacts are required to be connected in series. AND circuit: Three make contacts in series NOR circuit: Three break contacts in series The AND circuit consists of three inputs connected in series. When all the three inputs I1, I2 and I3 are set-on, then only the output Q1 will be switched-on. The NOR circuit consists of three negated inputs connected in series. When all the three inputs I1, I2 and I3 are set-off, only then the output Q2 will be set-on.

Parallel Connection: Output relay Qx is controlled by a parallel circuit


consisting of either make or break inputs connected in parallel.

OR circuit: Three make contacts in parallel NAND circuit: Three break contacts in parallel

The OR circuit consists of three inputs connected in parallel. When any of the three inputs I1, I2 or I3 are set-on, then the output Q1 will be switchedon. If input I2 is only on and the other two inputs are off, then the circuit will be complete from I2 to Q1.
The NAND circuit consists of three negated inputs connected in parallel. When any of the three inputs I1, I2 or I3 are set-off, then the output Q2 will be switched-on. If input I1 is off and the other two inputs are on, then the circuit will be completed from I1 to Q2.

Changover Circuit: It is made using two series connections


combined to form a parallel connection. It is called EXclusive OR (XOR) circuit. Coil can be energized only when one contact switches.

The XOR circuit consists of two inputs connected in series, one make and the other break contact and their combinations are connected in parallel. When any of the two inputs I1 or I2 is set-on, then the output Q1 will be set-on. If I1 is on, then the circuit will be completed from I1 through negated I2 to Q1.

Latching Circuit:
It is used to switch machine/system on or off. Relay output Q1 is latched (set-on) when I1 is switched-on. Negation of I2 can only unlatch (reset) output Q1.
Logic Conditions: If I1 is on and I2 is off, RQ1 is given hierarchical priority, and output Q1 will remain switched-off. If I1 as well as I2 is set-on, output Q1 will remain switched-on till I2 is negated. After setting-on I1 once, as long as I2 is on, Q1 remains latched, whatever is the state of I1; because Q1 is not relatched by I1. Signal Processing: Setting-on output Q1 through input I1. Function Control: Input I2 may be used to switch on and off output Q1. (The only condition is signal of input I1 should remain on.)

Marker Relay
AC010 provides sixteen marker relays, M1 to M16.

It is used
to raise the flag if more number of inputs/outputs is required to be connected, or when input is to be used as signal processor.

Latching with Marker relay


Output Q1 is set through Marker flag M1. Input signal will set marker relay which then will raise the flag to provide output signals. WHY? On negation of input I2, output Q1 is reset. When both I1 and I2 are set-on, output Q1 is switched-on.
Logic Conditions: As long as I2 is off, Q1 will be reset. As long as I2 is on, Q1 remains on, once marker flag M1 is set; whatever is the state of I1. If I1 is turned-off after setting marker relay, output Q1 will remain switched-on, till I2 is negated. It is the same logic as discussed in the previous circuit. Next latching of Q1 requires only I2 to be turned-on, whatever be the state of I1. This is because flag M1 remains on which will switch-on output Q1, irrespective of the condition of I1.

Timer Relay
AC010 provides eight timer relays, T1 to T8. It is used
to set the switching duration and make and break times of a relay contact.

It is integrated into circuit diagram in the form of a contact. The function is defined in terms of parameter display. The relay starts with coil function TTx (triggering timer relay x) and can be reset via the reset coil function RTx. Reset coil has priority over the trigger coil.

Latching with Timer relay


Input I1 is used to generate signal, which in turn will trigger timers T1 and T2 to latch and unlatch output Q1. Consider a production process to be controlled by a job operation delay time. With the start of the operation, sensor feed in the form of input I1 is fed to the PLC (job in place). This in turn will trigger the timer relay allowing time to fix the cutting tool in place (T1). After time period T1, machine will automatically get switchedon (output Q1 is latched). (Tool has to be ready for operation.) The operation time then starts for time period T2 (machining). After the time period T2, machine automatically gets switched-off (output Q1 is reset).

Counter Relay
It increments or decrements signals and switches when the actual value is greater than the setpoint value. A counter relay can be controlled via the counting pulse CCx and reset RCx coil functions. The count-up instruction simply increases the value of a counter by 1 each time an upward (OFF to ON) transition is detected in the input. The reset instruction resets the value of the count to 0 or to a predetermined reset value.

Example
Items passing along a conveyor are to be detected by a photocell and counted. When a batch is complete, the conveyor is stopped and a batch complete light is lit for the operator to remove the batch. When he does this, a restart button sets the sequence running again.

Ladder Diagram

Designing a Control System using PLC

Planning
Detailed design of system generated.

Wiring of program is done. (Ladder diag) Installation


Sensors, actuators, limit switches, operator controls are wired.

Commissioning
Nothing ever works first time. Most changes can be made quickly and relatively cheaply, provided the designer of the control system has built in spare memory capacity and spare I/Os.

Maintenance
A plant is also subjected to many changes during its life to speed production, to ease breakdowns or because of changes in its requirements. A PLC system can be changed so easily that modifications are simple and the PLC program will automatically document the changes that have been made.

Exercise 1
In a plant three fans are to be monitored. If at least two fans are running, the indicator light of the monitor is permanently switched on. The indicating lamp blinks slowly if only one fan is running (with 0.5 Hz). Rapidly (with 2 Hz) if no fan is on. The monitor is only active when the signal plant in operation signal status 1 is activated. Otherwise the indicating light is switched off.

Potrebbero piacerti anche