1 / 38

WEL-COME TO PLC PROGRAMING

WEL-COME TO PLC PROGRAMING. PROGRAMMABLE LOGIC CONTROLLER. POWER SUPPLY. PLC. CPU. INPUT MODULE. OUTPUT MODULE. PROGRAM MEMORY. FIELD INPUTS. CONTROL. PROCESS/MACHINE. PLC. 8. 9. 10. 11. 12. 13. 14. 15. .0. .0. .0. .0. .0. .0. .0. .0. . 1. . 1. . 1. . 1. . 1.

Download Presentation

WEL-COME TO PLC PROGRAMING

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. WEL-COME TO PLC PROGRAMING

  2. PROGRAMMABLE LOGIC CONTROLLER POWER SUPPLY PLC CPU INPUT MODULE OUTPUT MODULE PROGRAM MEMORY FIELD INPUTS CONTROL PROCESS/MACHINE

  3. PLC 8 9 10 11 12 13 14 15 .0 .0 .0 .0 .0 .0 .0 .0 .1 .1 .1 .1 .1 .1 .1 .1 .2 .2 .2 .2 .2 .2 .2 .2 .3 .3 .3 .3 .3 .3 .3 .3 .4 .4 .4 .4 .4 .4 .4 .4 .5 .5 .5 .5 .5 .5 .5 .5 .6 .6 .6 .6 .6 .6 .6 .6 .7 .7 .7 .7 .7 .7 .7 .7 0 1 2 3 4 5 6 7 CPU .0 .0 .0 .0 .0 .0 .0 .0 .1 .1 .1 .1 .1 .1 .1 .1 .2 .2 .2 .2 .2 .2 .2 .2 .3 .3 .3 .3 .3 .3 .3 .3 .4 .4 .4 .4 .4 .4 .4 .4 .5 .5 .5 .5 .5 .5 .5 .5 .6 .6 .6 .6 .6 .6 .6 .6 .7 .7 .7 .7 .7 .7 .7 .7 OPRATION OPRAND AI 0.0 PARAMETER OPRAND IDENTIFIER

  4. System program User program Start scan monitor time PII PB1 Digital inputs : : :AI0.0 : : :=Q4.0 :BE OB1 Load process input image :JUPB1 :BE Call OB1 (scan user program) Digital outputs PIQ Transfer process output image

  5. Software Blocks used in program Program blocks: for plants specific functions PB 0………255 Function blocks for standardized function,independent of particular plant FB 0……….255 Organization Blocks for organization and supervision of program execution called by the system program. OB 1………255 Sequence blocks: for programming sequences (sequential control system SB 0……..255 Data blocks for the storage of fixed and variable data DB 2……..255

  6. LAD CIRCUIT DIAG. I0.0 I0.1 Q4.0 ( ) 24v CSF I0.0 S1 S2 I0.0 & = Q4.0 INPUT MODUL I0.1 I0.1 PLC OUTPUT MODUL STL :AI0.0 :AI0.1 :=Q4.0 K1 Q4.0 K1 0v

  7. (1) Check for 0&Check for 1 NO Contact NC Contact Representation Check for 1 Check for 0 LAD FBD/CSF When Not Actuated When Actuated When Actuated When Not Actuated A… O... AN.. ON.. STL 1 0 1 0

  8. LADDER I 0.0 I0.1 I0.2 Q4.0 AND-BEFORE OR-OPERATION I0.3 I0.4 I0.5 I0.0 I0.3 I0.5 I0.0 CSF & I0.1 I0.1 = =>1 I0.2 Q4.0 10.4 & I0.3 I0.2 I0.4 O( AI0.0 AI0.1 AI0.2 ) O( AI0.3 AI0.4 ) 0I0.5 =Q4.0 I0.5 K1 STL Q4.0

  9. LADDER OR-BEFORE AND-OPERATION I0.0 I0.3 I0.5 Q4.0 ( ) I0.2 I0.4 STL :A( :OI0.0 :OI0.1 :OI0.2 ) :A( :OI0.3 :OI0.4 ) :AI0.5 =Q4.0 I0.0 I0.1 I0.2 I0.2 I0.3 I0.4 CSF >=1 I0.0 & I0.1 I0.5 I0.2 Q4.0 K1 >=1 I0.3 I0.4 = Q4.0 I0.5

  10. I0.0 Q4.0 LAD 24v ( ) I0.1 S1 S2 CSF I0.0 I0.1 Programmable Controller Q4.0 I0.0 & = Q4.0 I0.1 K1 STL 0v :AI0.0 :ANI0.1 :=Q4.0 Contacter K1 on when S1 is operated and S2 is not operated

  11. LAD 24v I0.0 I0.1 Q4.0 S1 S2 ( ) CSF I0.0 I0.1 Programmable Controller Q4.0 I0.0 & = Q4.0 I0.1 K1 STL 0v :ANI0.0 :AI0.1 :=Q4.0 Contacter K1on when S1 is operated and S2 is not operated

  12. LAD I0.0 I0.1 Q4.0 ( ) 24v S1 S2 CSF I0.0 & = Q4.0 I0.0 I0.1 Programmable Controller Q4.0 I0.1 STL K1 :AI0.0 :AI0.1 :=Q4.0 0v Contacter K1on when S1 is operated and S2 is not operated

  13. Two out of three Input=I0.0,I0.1,I0.2 Output=Q4.0 LAD I0.0 I0.1 Q4.0 ( ) I0.1 I0.2 I0.2 I0.0 CSF I0.0 & >=1 I0.1 I0.1 & I0.2 = Q4.0 I0.2 & I0.0 STL :O :( :AI0.0 :AI0.1 :) :O :( :AI0.1 :AI0.2 :) :O :AI0.2 :AI0.0 :) :=Q4.0

  14. Three inputs are there I 0.0 , I 0.1, I 0.2 . After tripping compressor all inputs have state change . Give the 1st out for above inputs . I0.0 Q4.1 Q4.2 S I0.3 Q4.0 R Q ( ) I0.1 Q4.0 Q4.2 S I0.3 Q4.1 R Q ( ) I0.2 Q4.0 Q4.1 S I0.3 Q4.2 R Q ( )

  15. Write a program in STL/LAD/CSF for the given below TASK: In the process there are three temperature sensors(e.g. T1,T2,T3) two pressure sensors(e.g.P1,P2)and enable input. 1 All three temperature sensors i.e.T!,T2,T3 should on. 2 OR both the pressure transducers should on. 3 OR enable input should be activated. Note:normal condition=NC Abnormal condition=NO Data 1 Temp. input T1=I0.0 2 Temp input T2=I0.1 3 Temp input T3=I0.2 4 Pressure input P1=I0.3 5 Pressure input P2=I0.4 6 Enable input=I0.5 7 Output Q=Q4.0 T1 P1 T2 P2 T3 And before Or

  16. LADDER I 0.0 I0.1 I0.2 Q4.0 I0.3 I0.4 I0.5 I0.0 CSF & I0.1 = I0.2 =>1 Q4.0 I0.3 & I0.4 I0.5 Data 1 Temp. input T1=I0.0 2 Temp input T2=I0.1 3 Temp input T3=I0.2 4 Pressure input P1=I0.3 5 Pressure input P2=I0.4 6 Enable input=I0.5 7 Output Q=Q4.0 STL O( AI0.0 AI0.1 AI0.2 ) O( AI0.3 AI0.4 ) 0I0.5 =Q4.0

  17. Write a program in STL/LAD/CSF for the given below TASK: In the process there are three temperature sensors(e.g. T1,T2,T3) two pressure sensors(e.g.P1,P2)and enable input. 1 Any one of three temperature sensors on i.e.T,T2,T3 . 2 AND any one of two pressure transducers should on.i.e.P1,P2 3 AND enable input should be activated. Note:normal condition=NC Abnormal condition=NO Data 1 Temp. input T1=I0.0 2 Temp input T2=I0.1 3 Temp input T3=I0.2 4 Pressure input P1=I0.3 5 Pressure input P2=I0.4 6 Enable input=I0.5 7 Output Q=Q4.0 T1 P1 T2 P2 T3 OR before AND

  18. LADDER I0.0 I0.3 I0.5 Q4.0 ( ) I0.2 I0.4 STL :A( :OI0.0 :OI0.1 :OI0.2 :) :A( :OI0.3 :OI0.4 :) :AI0.5 =Q4.0 I0.2 I0.0 >=1 & I0.1 I0.2 I0.3 >=1 I0.4 = Q4.0 I0.5 Data 1 Temp. input T1=I0.0 2 Temp input T2=I0.1 3 Temp input T3=I0.2 4 Pressure input P1=I0.3 5 Pressure input P2=I0.4 6 Enable input=I0.5 7 Output Q=Q4.0 CSF

  19. 24v S1 S2 I0.0 I0.1 Programmable Controller Q4.0 K1 0v SET RESET BLOCK R S S Q R Q ON ON SET PRIORITY HOLD HOLD RESET PRIORITY OFF OFF ON OFF K1 K1 ON PRIORITY OFF PRIORITY

  20. SET RESET BLOCK S R Q R 24v S S Q 1 0 1 R Q S1 S2 SET PRIORITY RESET PRIORITY 0 1 0 LAST STATE I0.0 I0.1 Programmable Controller Q4.0 0 0 PRIORITY ON OFF 1 1 K1 RESET PRIORITY AI0.0 SQ4.0 ANI0.1 RQ4.0 SET PRIORITY AI0.0 RQ4.0 AI0.1 SQ4.0 0v

  21. CPU AI AQ DI DI DQ DQ AI AI 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 0 NON-UTILIZABLE UNUSED AREAS PIQ PII 64 68 72 76 127 127

  22. LOAD FUNCTION 7 6 5 4 3 2 1 0 Byte 2 AI2.2 Byte 12 LIB12 LIW102 Byte 102 Byte 103

  23. PIQ TRANSFER FUNCTION 7 6 5 4 3 2 1 0 Byte 4 Q4.2 Byte 66 TQB 66 High byte Accum1 Low byte Byte 92 Byte 93 TQW 92 High byte Accum1 Low byte

  24. TASK OUTPUT SHOULD EXACTALY FOLLOER OF INPUT L IW 0 T QW 3

  25. PULSE TIMER(SP) PULSE TIMER(SP) STL A I0.0 L KT050.1 SP T1 A I0.1 R T1 A T1 NOP0 NOP0 =Q4.7 STL A I0.0 L KT050.1 SP T1 A I0.1 R T1 A T1 NOP0 NOP0 =Q4.7 LAD/CSF LAD/CSF T1 T1 1 1 I0.0 I0.0 BI BI FW6 FW6 TV TV KT050.1 KT050.1 DE DE QW5 QW5 I0.1 I0.1 R R Q Q Q4.7 Q4.7 START INPUT START INPUT t t RESET INPUT RESET INPUT t t t t t t t t PULSE OUTPUT PULSE OUTPUT t t

  26. TIME BASE 0=0.01S 1=0.1 S 2=1 S 3=10 S KT=CONSTANT=KT400.0 IW=INPUT WORD=IW1 QW=OUTPUT WORD=QW6 FW=FLAG WORD=FW100 DW=DATA WORD=DW255

  27. EXENDED-PULSE TIMER STL A I0.0 L KT050.1 SE T1 A I0.1 R T1 A T1 NOP0 NOP0 =Q4.7 LAD/CSF T1 1 E I0.0 BI FW6 TV KT050.1 DE QW5 I0.1 R Q Q4.7 START INPUT t RESET INPUT t t t t t PULSE OUTPUT t

  28. I0.0 Q4.8 1 E AI0.0 ANQ4.7 LKT030.1 SET2 NOP0 NOP0 NOP0 AT2 =Q4.8 AI0.0 ANQ4.8 LKT030.1 SET1 NOP0 NOP0 NOP0 AT1 =Q4.7 BI NOP0 KT050.1 TV DE NOP0 NOP0 R Q Q4.7 T2 I0.0 Q4.7 1 E BI NOP0 KT050.1 TV DE NOP0 NOP0 R Q Q4.8 TASK TWO FLASHING LIGHTS USING TIMER (1) L1& L2 SHOULD BE FLASHING WHEN SWITCH S1 IS ON. (2)STATUS OF LAMPS L1&L2 MUST BE OPPOSITE OF EACH OTHER (3)THE TIME FOR FLASHING FOR BOTH LAMPS SHOULD BE SAME (4)WHEN SWITCH S1 IS MADE OFF FLASHER SHOULD STOP. T1

  29. ON- DELAY TIMER STL A I0.0 L KT050.1 SD/SR T1 A I0.1 R T1 A T1 NOP0 NOP0 =Q4.7 LAD/CSF T1 I0.0 T O BI FW6 TV KT050.1 DE QW5 I0.1 R Q Q4.7 START INPUT t RESET INPUT t t OUTPUT t t t

  30. LATCHING ON- DELAY TIMER LAD/CSF STL A I0.0 L KT050.1 SS T1 A I0.1 R T1 A T1 NOP0 NOP0 =Q4.7 T1 I0.0 T E BI FW6 TV KT050.1 DE QW5 I0.1 R Q Q4.7 START INPUT t RESET INPUT t t OUTPUT t

  31. OFF- DELAY TIMER LAD/CSF STL A I0.0 L KT050.1 SF T1 A I0.1 R T1 A T1 NOP0 NOP0 =Q4.7 T1 I0.0 O T BI FW6 TV KT050.1 DE QW5 I0.1 R Q Q4.7 START INPUT t RESET INPUT t OUTPUT t t t t

  32. T1 I0.0 O T BI FW6 KT100.1 TV DE QW5 I0.1 R Q Q4.7 MERQURY LEVEL SWITCH ACTIVATED IN BETWEEN BECAUSE OF VIBRATION SO WE HAVE TO PROVIDE TIMER.USE PROPER TIMER AND WRITE THE PROGRAME IN LADDER & IN STL ALSO STL A I0.0 L KT100.1 SF T1 A I0.1 R T1 A T1 NOP0 NOP0 =Q4.7 OFF DELAY TIMER

  33. ON CONVEYOR 1 OFF M + CONVEYOR2 M + TASK (1)WHEN ON PUSH BUTTON IS PRESSED BELT 2 SHOULD BE STARTED IMMEDIATELY AND BELT 1 SHOULD BE STARTED WITH A DELAY OF 5 SECONDS. (2)WHEN OFF PUSH BUTTON IS PRESSED BELT 1 SHOULD STOP IMMEDIATELY BUT BELT 2 SHOULD CONTINUE FOR ANOTHER 10 SECOND (3)THE LED INDICATING THE BELT STATUS ALSO TURN ON COORRESPONDINGLY

  34. I0.0=S1=START PUSH BUTTON. I0.1=S2=STOP PUSH BUTTON. Q2.0=BELT 1 START/STOP Q2.1=BELT 2 START/STOP BELT 1 I0.0 BELT 2 S F0.0 START STOP R Q ( ) AI0.0 SF0.0 AI0.1 RF0.0 R-S FLIP FLOP BLOCK USED FOR ON-OFF BY PUSH BUTTONS I0.1 T1 F0.0 T O AF0.0 LKT050.1 SD T1 A T1 =Q2.0 BI NOP0 ON DELAY TIMER USED TO DELAY START BUT STOPS IMMEDIATELY KT050.1 TV DE NOP0 R Q Q2.0 NOP0 T2 F0.0 O AF0.0 LKT100.1 SF T2 A T2 =Q2.1 OFF DELAY TIMER USED TO DELAY STOP OF BELT2 BI NOP0 KT100.1 TV DE NOP0 NOP0 Q2.1 DATA T R Q

  35. COUNTER BLOCK [1]SET INPUT=SETTING COUNTER TO CV VALUE [2]OUTPUT Q=0 WHEN COUNTER IS AT ZERO C1 COUNTING UP [3]OUTPUT Q=1 WHENCOUNT IS GREATER THAN ZERO I0.0 CU COUNTING DOWN AI0.0 CU C0 AI1.2 L KC009 AI1.3 L C1 T QW3 L C1 T FW10 A C1 =Q4.7 I1.1 CD S T L S SET BI [FW2] I1.2 CV KC3 DI [QW6] R RESET I1.3 Q4.7

  36. COMPARISON BLOCKS L IB 2 L IB 3 !=F =Q4.7 IB2 Z1 F EQUAL TO != Q IB3 Z2 Q4.7 L IB2 L B3 ><F =Q4.7 IB2 Z1 F NOT EQUAL TO >< Q IB3 Z2 Q4.7 L IB2 L IB3 >=F =Q4.7 GREATER THAN OR EQUAL TO IB2 Z1 F >= Q IB3 Z2 Q4.7 L IB2 L IB3 >F = Q4.7 IB2 Z1 F GREATER THAN > Q IB3 Z2 Q4.7 L IB2 L IB3 <=F = Q4.7 LESS THAN OR EQUAL TO IB2 Z1 F <= Q IB3 Z2 Q4.7 L IB2 L IB3 <F =Q 4.7 IB2 Z1 F LESS THAN < Q IB3 Z2 Q4.7

  37. [1]P1,P2&P3 ARE PUMPS [2]START P1 AS START PUSH BUTTON PUSHED [3]P2 SHOULD START AFTER 10 SEC OF START P1 [4]P3 SHOULD START AFTER 10 SEC OF START P2 [5]P1,P2&P3 SHOULD RUN FOR 10 SEC THEN STOPS ALL THREE. [6]IF IN BETWEEN STOP PUSH BUTTON PRESS STOPS ALL THE THREE PUMPS. AI 0.0 - START PUSH BUTTON SF 0.0 - SET FLAG F0.0 AI0.1 - STOP PUSH BUTON AF0.0- FLAG IS SET AT 1 LKT300.1- LOAD VALUE 30 SEC TO TIMER T 0 SPT0 - TIMER IS PULSE TIMER AI0.1 - STOP PUSH BUTTON RT 0 - RESET TIMER T 0 LCT0- LOAD VALUE IN ACCUMULATOR1 TFW4 - TRANFER VALUE FROM ACC. 1 TO FLG W 4 AT 0 = Q4.3 - STARRT OUTPUT FOR P1 LFW4 LKT 200.1 < F = Q 4.2 START OUTPUT FOR P2 LFW4 LKT 100.1 < F = Q4.1 START OUTPUT FOR P3 AT 0 = RF 0.0

  38. [1] READ FOR ZERO & READ FOR ONE [2] AND -OR FUNCTION [3] AND BEFORE OR & OR BEFORE AND [4] R-S BLOCK &LOAD AND TRANSFER [5] FIVE TIMER BLOCKS [6] COUNTER BLOCK [7] SIX COMPARISON BLOCKS

More Related