Vous êtes sur la page 1sur 42

PROGRAMABLE LOGIC CONTROLLER (PLC)

A digitally operating electronic system, designed for use in an industrial environment, whishes uses a programmable memory for the internal storage of user oriented instructions for implementing specific functions such as logic, sequencing, timing, counting and arithmetic, to control, through digital or analog inputs and outputs and various types of machines or processes. Both the PC and its associated peripherals are designed so that they can be easily integrated into an industrial control system and easily used in all their integrated functions.

HARD WIRED CONTROL SYSTEM


A hard wire control system is constructed only after its program has been defined. Hard wire controls are difficult to modify.
+24 v dc Input section PB-1 PB-2

Processing section
K1 K2

Lamp

output section

RELAY CONTROL

The relay control can be divided in to three parts : Input section switches & sensors ( A/D ). Processing section Relay coils and contacts. Output section solenoids, lamps or motors (A/D).

1. 2. 3.

PLC CONTROL SYSTEM



PLC replaces the function of the relay portion of the hard wired control .
+ 24 v dc PB-1 PB-2 TO PG UNIT

Program IF I 1 AND I 2 THEN SET Q 1 OTHER WISE RESET Q 1


Q1 + _ Lamp

TYPES OF PLC
1. FIXED I/P AND O/P TYPE 2. MODULAR DESIGN (PLC/CPU SPECIFIC) ANALOG MODULE DIGITAL MODULE

MAKES : Allen Bradley, Siemens, Mitsubishi, Genera Electric , Omron , ABB, Fanuc etc.

COMPARISION
CHARACTERISTIC CONSTRUCTION CAPABLE OF COMPLICATED OPERATION EASE OF CHANGING THE COMTROL PROGRAM PHYSICAL SIZE MAINTENANCE PLC EASY TO PROGRAM YES RELAY TIME CONSUMING NO

VERY SIMPLE

VERY DIFFICULT

VERY COMPACT EXCELLENT, PLCs RARELY FAIL

BULKY POOR, IF LARGE NUMBER OF CONTACT AND COILS HAVE TO BE MAINTAINED

Hardware : Actual devices-PCBs , ICs , Battery , Housing etc. Firmware : software supplied and installed by manufacturer-OS (ROM/EPROM) Software : User program written by PLC user (RAM )
Data bus

STRUCTURE OF PLC A PLC is essentially a micro computer with hardware, firmware and software. Bus system : Address Bus, Data Bus, Control Bus.

ROM

RAM Input Module Output Module

Microprocessor CPU

Operating system Address Bus

Program and Data

Control Bus

SYSTEM COMPONENTS
BLOCK DIAGRAM :
Programming Devices

PLC
Power supply

Program Memory
Final Control Elements Relay, Solenoids, Valve, Lamps, etc,.

Acknowledge Ments (Limits Switches,& sensor) Control Element (Push Buttons & switches )

Input modules

Central Processing Unit

Output Modules

POWER SUPPLY

120/230 V AC

POWER SUPPLY

24 V DC FOR PROCESSOR & I/P MODULE

The power supply can be a separate unit or an integral part the processor depending on the manufacturer. PS307---2A/5A/10A---24 VDC---120VAC/230VAC

INPUT & OUTPUT SECTION

(0-24 V DC) OR (120-240 V AC )

Input Module

Low level DC voltage (5 V )

Low level DC signal

Output Module

(120-240 V AC) or 24 V DC

INPUT MODULE

INPUT SIGNAL

Error voltage detection

SIGNAL DELAY

Opto -coupler

DIDIGITAL INPUT (321) AIANALOG INPUT (331)

OUTPUT MODULE

SIGNAL FROM THE CPU

Opto- coupler

Amplifier

Short-circuit monitoring

Output signal

DODIGITAL OUTPUT (322) AO---ANALOG OUTPUT (332)

CENTRAL PROCESSING UNIT

DATA BUS

ALU

CONTROL BUS

Command Register

COTROL BUS

Accumulator Arithmetic unit


ADDRESS BUS

Program counter

Control unit

MEMORY
RAM ( Ram Access Memory ): Read/write, Volatile ( back up by battery/accumulator ) EPROM (Erasable Programmable Read Only Memory ): Readable only. non-volatile ,ultra-violet eraser, reprogrammable EEPROM (Electrically Erasable Programmable Read Only Memory ) :Erased electrically by the proper signal at erase pin, it is used primarily as a non-volatile back up for user program RAM, used as application memory in PLCs. Flash RAM : Its can be erased more quickly. WORD : 8/16/32 BitsPLC specific, stored binary data in form of BITS (Binary digiTS )0/1.

MODULAR PLCs Requirement of inputs/outputs/program memory compact modules or as plug in electronic card (8/16-Inputs/Outputs)
Power supply To PG Unit Processor SM SM SM SM

Programming device cable

Power supply

Processor

SM

SM

SM

SM

PROFIBUS (Process Field BUS )

SOFTWARE
The user program can be written with the programming software suitable for the specific PLC. For example STEP 5 & STEP 7--------Siemens PLCs RS LOGIX 500 -------Allen Bradley PLCs STEP 7 Three method of representation can be used to translate a program in to user program. Ladder Diagram (LAD)Graphical representation of control task using relay Symbology. Function Block Diagram (FBD) : Graphical representation of control task using logic boxes familiar from Boolean algebra. Statement List (STL): Textual representation of control task using mnemonic abbreviations

PLC STANDARD
Since 1992, an international standard IEC 1131 exists for programming logic controllers and associated peripheral devices. The purpose of the new standard was to define and standardize the design and functionality of a PLC and the languages required for programming to the extent where users were able to operate using different PLC system without any difficulties. IEC 1131 standard consists of 5 parts: Part 1: General Information Part 2: Equipment requirement & test Part 3: Programming Languages Part 4: User guidelines Part 5: Messaging service specification

SIMATICHARDWARE+SOGTWARE SIEMENS PROGRAMMING CONTROLLER OF S5 FAMILY.

SIEMENS PLCs

SIMATIC S7:--THREE TYPES OF PROGRAMMING LOGIC CONTROLLER SIMATIC S7 200 : Compact micro plc for lowest performance range. SIMATIC S7 300 : Modular mini controller for intermediate performance range. SIMATIC S7 400 : For high performance range.

SIMATIC S 7 300 CONFIGURATION IM 365-Up to o1 meter between racks IM 360 and IM 361-Up to 10 meter between racks
Allotted 08 nos.

Rack 0
(IT MAY BE IN NCU )

PS CPU IM SM SM
Slot 1 Slot 2 SLOT 3

SM

SM

SM

SM

SM

SM

IM(S) If not used ,then it is free

Rack 1

PS

IM SM SM SM SM SM SM SM SM

Slot 1

Slot 2

IM(R)

DATA TYPES
Type & size Description (bits)
BOOL BYTE 1 8

format options

Range & numeric representation

BOOLIAN TEXT TRUE/FALSE HEXADECIMAL B16#0 to b16#FF NUMBER WORD 16 HEXADECIMAL W#16#0 to W#16#FFFF NUMBER DWORD 32 HEXADECIMAL DW#16#0000-0000 to NUMBER DW#16#FFFF-FFFF CHAR 8 ASCII CHARACTER A, B etc TIME-OF-DAY 32 TIME IN STEP OF 1ms TOD#0:0:0:0 to TOD#23:59:59:999 S5TIME 16 S7 TIME IN STEP OF 10 ms S5T#0H-0M-OS-10MS to S5T#2H-46M-30S-OMS ABBREVIATION: INPUTS---I, OUTPUTS---Q, BIT MEMORY---M, TIMERS---T, COUNTER---C, TEMPORARY LOCAL DATA---L

STEP 7 PROGRAMMING SOFTWARE

STEP 7 IS THE PROGRAMMING SOFTWARE FOR THE SIMATIC S7 STEP 7 PROVIDE THE ENTIRE FUNCTIONALITY REQUIRED FOR CONFIGURING,PROGRAMMING,AND ASSIGNING PARAMETERS TO S7-300 STEP 7 RUNS UNDER MICROSOFT WINDOWS 95 OR HIGHER STEP 7 WORKS WITH OBJECT-ORIENTED CONCEPT. THE STEP 7 OBJECTS INCLUDE STATIONS,MODULES,AND PROGRAMS.ALL OBJECT ARE REPRESENTED BY SYMBOLE ON THE GRAPHICAL USER INTERFACE. STEP 7 HAS A USER FRIENDLY,CONTEXT-SENSITIVE ONLINE HELP FUNCTION THAT GIVES VALUABLE INFORMATION AND TIPS. THE SIMATIC MANAGER IS THE CENTRAL WINDOW WHICH IS ACTIVE WHEN STEP 7 IS STARTED.

CREATING A PROGRAM IN OB1 Opening the LAD/STL/FBD Program Window Choosing Ladder logic, Statement List or Function Block Diagram
LADDER LOGIC :
+ 24 V DC I 2.0 I 2.1 RUNG Q 4.0 0V

STATEMENT LIST : A A = I 2.0 I 2.1 Q 4.0

FUNCTION BLOCK DIAGRAM : Q 4.0

&
I 2.0 I 2.1

PB 1---I 2.0, PB 2---I 2.1,

LAMP----- Q 4.0

BASIC FUNCTION Binary logic operation, Memory function, Move function , Timers , Counters.
1. 2. 3. 4. 5. 6. 7.

NO CONTACT NC CONTACT SINGLE COIL SERIAL AND PARALLEL CIRCUIT NEGATING THE RLO SET AND RESET COIL MEMORY BOX ( SR BOX )

NOT
S SR

,
Q

S R

1.

EDGE EVALUATION

--- POSITIVE EDGE IN POWER FLOW _____(P)______ NEGATIVE EDGE IN POWER FLOW _____(N)______

TIMERS
WITH
SP S_PULSE

START TIMER AS
PULSE TIMER

SE S_PEXT

EXTENDED PULSE TIMER

SD ON DELAY TIMER S_OD SF OFF DELAY TIMER S_OFFDT SS RETENTIVE ON DELAY S_ODTS TIMER

REPRESENTATION OF A TIMER
T1
S S_ODT Q

BI TV BCD

S-- BOOLSTART INPUT TVS5TIMEPRESET TIME VALU E R BOOL---RESET INPUT BIWORD---REMAINING TTIME VALUE, INTEGER FORMAT BCDWORDREMAINING TIME VALUE IN BCD FORMAT Q--- BOOL---TIMER STATUS

COUNTER
ITS LOCATED IN SYSTEM MEMORY,PLC SPECIFIC,

1. UP-DOWN COUNTER (S_CUD) 2. UP COUNTER (S_CU) 3. DOWN COUNTER (S_CD) 4. SET COUNTER COIL 5. UP COUNTER 6. DOWN COUNTER COIL

REPRESENTATION OF A COUNTER
COUNTER OPERAND
CU S_C U D Q

CD

CV

CUBOOLUP COUNT INPUT CDBOOLDN COUNT INPUT S-- BOOLSET INPUT PVWORDPRESET VALU E R BOOL---RESET INPU CVWORD---CURRENT VALUE IN BINARY CV_BCDWORD---CURRENT VALUE IN BCD Q--- BOOL---COUNTER STATUS

CV BCD

PV R

MOVE (Assign a value)


I 0.0
EN MOVE ENO

Q4.0

MW10 IN

OUT

DBW12

The instruction is executed if I 0.0 is 1.The content of MW10 is copied to the word 12 of the currently open DB. Q4.0 is 1 if the instruction is executed.

IN1 AND IN2 ARE COMPARED ACCORDING TO THE TYPE OF COMPARISON WE CHOOSE.

COMPARISON INSTRUCTIONS

== IN1 is equal to IN2 <> IN1 is not equal to IN2 > IN1 is greater than IN2 < IN1 is less than IN2 >= IN1 is greater than or equal to IN2 <= IN1 is less than or equal to IN2 If the comparison is true, the RLO of the function is 1.It behave like a normally open contact. The following comparison instructions are available: CMP ? I Compare integer CMP ? D Compare Double integer CMP ? R Compare Real

COMPARE INTEGER/DOUBLE INTEGER/REAL


IN1 IN2 C MP ==I IN1 IN2 CMP ==D IN1 IN2 CMP ==R

EXAMPLE: IO.O I0.1 MW0 MW2 IN1 IN2

CMP >= I

Q4.0

Output Q 4.0 is set if the following condition exist: There is a signal state of 1 at inputs I0.0 and at I0.1 AND MWO>=MW2

CONVERTER
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15.

BCD_I

BCD_I I _BCD BCD _DI DI_BCD I_DINT DI_REAL INV_I INV_DI NEG_I NEG_DI NEG_R ROUND TRUNC CEIL FLOOR

EN BCD to Integer Integer to BCD MW10 IN BCD to Double Integer Double Integer to BCD Integer to Double Integer Double Integer to Floating Point 1,s compliment Integer 1,s compliment Double Integer 2,s compliment Integer 2,s compliment Double Integer Negate Floating Point Number Round the Double Integer Turncate Double Integer number Floating point number to double integer Round to +infinity Floating point number to double integer Round to - infinity

ENO OUT

MW12

INTEGER MATH INSTRUCTIONS


ADD_I SUB_I MUL_I DIV_I ADD_DI SUB_DI MUL_DI DIV_DI MOD_DI

Add integer Subtract integer Multiply Integer MW0 Divide integer MW2 Add double integer Subtract double integer Multiply Double Integer Divide double integer Return fraction Double Integer

ADD_I EN IN1 IN2 ENO OUT

MW10

CPUs

CPUs are capable of handling 85 K statements and 256 K data the main memory up to 512 KB. Various CPUs provide up to 8192 bit memories,512 timers, and 512 counter. Smaller CPUs can be expanded up to 256 DI/DO or 64AI/AO. Larger CPUs can be expanded up to 1024 DI/DO or 256 AI/AO. Up-down counters acquire pulses up to 10 kHz. With a frequency measurement up to 10 kHz motor speed can be accurately measured. For application involving controller of pressure, temperature or flow rates the integrated PID controllers can e parameterized. The most powerful S7-300 CPU is also available with an integrated PROFIBUS-DP interface.

CPUs--- control & display elements


STATUS AND FAULT DISPLEYS:
SF.RED BATFRED DC5V.....GREEN FRCE..YELLOW RUN...GREEN STOP..YELLOW HARDWARE OR SOFTWARE FAULTS BATTERY FAULT 5 VDC SUPPLY FOR CPU AND S7-300 BUS IS OK. FORCE REQUEST IS ACTIVE. CPU IN RUN; LED FLASHES AT START-UP WITH 1 HZ. CPU IN STOP OR HOLD OR START-UP.

MODE SELECTOR SWITCH:


RUN-P RUN mode STOP mode MRES mode The CPU scans the user program. The key can not be removed. The CPU scans the user key can be removed. The CPU does not scan user program. The key can be removed to prevent anyone from changing the operating mode. Resetting the memory using the mode selector requires a special sequence of operations.

PLC SELECTION CRITERIA


NUMBER OF INPUTSDIGITAL / ANALOG NUMBER OF OUTPUTSDIGITAL/ANALOG MEMORY PROCESSING SPEED OF CPU. CPU CAPABILITIES/SYSTEM FUNCTIONS/SYSTEM FUNCTION BLOCKS. NO. OF TIMERS,COUNTERS & SIZE OF BIT MEMORY,FLAGS(MARKERS). NEED OF SPECIAL FUNCTION MODULES SUCH AS HIGH SPEED COUNTERS,CLOSED LOOP CONTROL ETC. NEED OF INTERFACE MODULE. NETWORKING AND COMMUNICATION CAPABILITIES.

CYCLIC PROGRAM EXECUTION


Start-up block (OB100)execute once. Start the cycle monitoring time. Reading the signal states from the modules and saving the data in the PII (Process Image Inputs). Execution of the program in OB1(cyclic execution).events, time of the day, hardware interrupts etc., call others OBs , FBs , FCs / PBs etc. Writing the process image output (PIQ) to the output modules. PII OB1 PIQ

SOETWARE & VERSION

S5STEP 5 PLCS5 90U S5 100U S5 115 S5 135 S5 155 S7 SERIES S-7 200 ----- 214,215,224,226 etc. S-7 300 ----- 314,315,317 etc. S-7 400 . SOFTWARE : S7 200---Microwin 32,Programming Tool 802. S7 300---Simatic Managerversion 5.0,5.1,5.2,5.3,5.4 S7 400--- ----do----

ABBREVIATION

IFM--- INTEGRATED FUNCTION MODULES MPI--- MULTIPOINT INTERFACE (9-PINS)-SERIES COMMUNICATION ,BAUD RATE-187.5 KBPS OPI---BAUD RATE---1.5 MBPS IM(S)--- INTERFACE MODULES (SENDER) IN(R)--- INTERFACE MODULES (RECIEVER) PROFIBUS--- PROCESS FIELD BUS BAUD RATE12 MBPS NCU--- NUMERICAL CONTROL UNIT (NC+PLC CPU+IM) IN 840D/810D STL--- STATEMENT LIST---HIGH LEVEL LANGUAGE LAD--- LADDER LANGUAGE--- LOW LEVEL LANGUAGE INDUSTRIAL ETHERNET---BAUD RATE---100 MBPS NMI---NON-MASKABLE INTERRUPT. PCU---PROCESS CONTROL UNIT--PCU 20--NO HARD DISK-FLASH DRIVE PCU 50WITH HARD DISK PCU 70WITH HARD DISK OP---OPARATION PANELOP10,OP10C,10S,OP12,OP15 TWISTED PAIR-TO PREVENT EXTERNAL INTERFERENCE

STEP 7 BLOCKS
1.

USER PROGRAMMABLE BLOCK-----1.ORGANISATION BLOCK (OB)


2.FUNCTIONS (FCs) 3.FUNCTION BLOCK (FBs)

2.

DATA BLOCK(DB) ----1. SHARED BLOCK


2. INSTANT BLOCK

3.

PROGRAMMED READY TO USE BLOCK-----IN S7 LIBRARY IN CPUSYSTEM FUNCTION


1. SFC 2. SFB

NOTE:

USER CAN CALL FC & FB THROUGH PROGRAM OB1 ONLY CALLED BY CPU

STRUCTURED PROGRAMMING/LINEAR PROGRAMMING


OB1 ------Call FB1,DB1 ------Call FC1 ---Call FC2 ------------BE
NESTING DEPTH: MAX. DEPTH FOR S7-300 = 8 MAX. DEPTH FOR S7-400 = 16
DB1 FB1

BE

FC1

BE FC3

FC2 =Q4.0 CCFC3 BE

BE

OB 1 Network 1 ----------------------Network 2 ---------------------------------Network 3 --------------------------------------------BE

INSTRUCTION OF BLOCK END


BE------ BLOCK END BEU-----BLOCK END UNCONDITIONAL (WITH IN A BLOCK) BEC-----BLOCK END CONDITIONAL (DEPEND ON THE RLO) RET-----BLOCK END IN THE LADDER PROGRAMMING

ANALOG SIGNAL PROCESSING


TEMP. PRESSURE FLOW LEVEL -------------

SENSOR

ELECTRICAL SIGNAL

STANDARD PROCESSABLE SIGNAL

MEASURING RANGE MODULE (MR)

D/A

PROCESS IMAGE WEIGHT (PIW)

CPU