Вы находитесь на странице: 1из 40

PLCPROGRAMMABLE LOGIC CONTROLLERS

INTRODUCTION TO PLC

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

Relays..
A relay is an electrically operated switch. Electric current through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contacts..

PLC

What does each part do?


INPUT RELAYS INTERNAL UTILITY RELAYS COUNTERS TIMERS OUTPUT RELAYS DATA STORAGE

PLC OPERATION

One scan time is defined as the time it takes to execute the 3 steps listed above

Response Time

Programming Language for Programmable Logic Controllers(PLCs)Ladder Logic

Ladder logic is a programming language that represents a program by a graphical diagram based on the circuit diagrams of relaybased logic hardware.

Ladder Diagram- a program in ladder logic

..resemble ladders with two vertical rails and a series of horizontal rungs between them.....

Eg:X

T S X

Working with relays


Eg:-

Replacing Relays
Battery-bus bars.

Inputs- contact symbol

outputs- coil symbol

give all the devices an address convert the schematic into a logical sequence of events

A Level Application

The Program Scan


Initially the tank is empty. Therefore, input 0000 is TRUE and input 0001 is also TRUE. Gradually the tank fills because 500(fill motor) is on.

Scan 1

Scan 2-100

Scan 101-1000

Scan 1001

Scan 1002
Scan 1050

Basic Instructions
Load The load (LD) instruction is a normally open contact. It is sometimes also called examine if on.(XIO) (as in examine the input to see if its physically on)

A LoaD (contact) symbol

LoadBar The LoaDBar instruction is a normally closed contact. It is sometimes also called LoaDNot or examine if closed. (XIC) (as in examine the input to see if its physically closed).

A LoaDNot (normally closed contact) symbol

Logic State
0

Load
False

LoadBar
True

True

False

Out The Out instruction is sometimes also called an OutputEnergize instruction. The output instruction is like a relay coil.

An OUT (coil) symbol

Inputs

Outputs

Register Logic Bits

SW1(LD) SW2(LDB) COIL(OUT) SW1(LD) SW2(LDB) COIL(OUT) False False True True False True False False True 0 0 1 0 1 0 0 0 1

True

False

False

Latch Instructions

Counters

Timers

One-shots
A one-shot is used to make something happen for ONLY 1 SCAN

One-shot Instruction

Math Instructions

Addition- It is commonly called ADD. Subtraction- SUB. Multiplication- MUL. Division- DIV.

Вам также может понравиться