CHAPTER 3 INTRODUCTION TO PROGRAMMABLE LOGIC CONTROLLER BY: Salsabila Ahmad.

download CHAPTER 3 INTRODUCTION TO PROGRAMMABLE LOGIC CONTROLLER BY: Salsabila Ahmad.

If you can't read please download the document

Transcript of CHAPTER 3 INTRODUCTION TO PROGRAMMABLE LOGIC CONTROLLER BY: Salsabila Ahmad.

  • Slide 1

CHAPTER 3 INTRODUCTION TO PROGRAMMABLE LOGIC CONTROLLER BY: Salsabila Ahmad Slide 2 INTRODUCTION TO PLC History of PLC Advantages of PLC PLC Operations Serial and Parallel Circuit Serial CircuitSerial Circuit Parallel CircuitParallel Circuit Numbering System Boolean Algebra Ladder Logic Diagram Q&A Slide 3 HISTORY OF PLC In the early days; all stages in a process were done by hand As depicted in figure the filling capped labeling packing processes are done totally manually Slide 4 After the industrial revolution entire processes were automated filling, labeling and packing are all being done by machines controlled electro-mechanically Slide 5 Then invention of computers brought a new method of automation control, the Programmable Controller. That time, a more efficient PC is managing the bottling process Substituting the old relay control system. Slide 6 As technology expands further, today the same bottling processes use a central control system linking many PCs together Slide 7 ADVANTAGES OF PLC Flexibility Large quantities of contact Lower cost Ease of pilot running Visual observation Speed of operation Reliability Security Ease of documentation Ease of changes by reprogramming Slide 8 PLC OPERATIONS CHECK INPUT STATUS EXECUTE PROGRAM UPDATE OUTPUT STATUS Slide 9 PLC can continuously perform the cyclical task of scanning, a process which involves reading the inputs, executing the user program updating the outputs without requiring a user program to direct it to do so. Slide 10 A PLC is designed to perform logic functions previously done by electromechanical relays, mechanical timers/counters to control the manufacturing process. Slide 11 The operator enters a sequence of instructions program into the PLC memory. The controller then monitors the inputs and outputs according to the program The controller carries out the control rules Slide 12 Step 1 CHECK INPUT STATUS First the PLC takes a look at each input to determine if it is on or off. In other words, is the sensor connected to the first input on? How about the second input? How about the third... It records this data into its memory to be used during the next step. Slide 13 Step 2 EXECUTE PROGRAM Next the PLC executes your program one instruction at a time. Maybe your program said that if the first input was on then it should turn on the first output. Since it already knows which inputs are on/off from the previous step it will be able to decide whether the first output should be turned on based on the state of the first input. It will store the execution results for use later during the next step. Slide 14 Step 3 UPDATE OUTPUT STATUS-Finally the PLC updates the status of the outputs. It updates the outputs based on which inputs were on during the first step and the results of executing your program during the second step. Based on the example in step 2 it would now turn on the first output because the first input was on and your program said to turn on the first output when this condition is true. After the third step the PLC goes back to step one and repeats the steps continuously. One scan time is defined as the time it takes to execute the 3 steps listed above. Slide 15 HOW TO APPLY HERE? Slide 16 SERIAL CIRCUIT Can also be referred as AND logic function where all switch must be closed (ON) for output to energized (ON) Conventional series circuit LMP1 SW1SW2 Battery Slide 17 Or it can be represented In schematic ladder diagram As: Series circuit represented in conventional ladder rung LMP1 SW1SW2 L1L2 Slide 18 To energized LMP1 SW1 and SW2 need to be closed SW1SW2LMP1 I1I205 PLC representation of previous rung using Allen- Bradley MicroLogix1000 LADDER DIAGRAM Slide 19 Program listing / Mnemonic Code LOAD I1 AND I2 OUT 05 for Allen-Bradley MicroLogix1000 Note: The instructions tell the processor to load input (I1) into memory, AND it with input2 (I2), then output the result to output5 (O5) Notice the operands for input differ OMRON use 00001 Allen Bradley use I1 (for input 1) While operands for output OMRON use 01000 Allen Bradley use O1 (for output 1) Slide 20 AND TRUTH TABLE ? ABC 000 010 100 111 Slide 21 Can we have more than 2 inputs for AND logic? Yes We can have more than 2 inputs for AND logic but the outcome will still be the same when all inputs ON. output will only be energized ON SW1SW2LMP1 I1I201 Three- input PLC ladder rung SW3 I3 Slide 22 PARALLEL CIRCUIT Can also be referred as OR logic function where at least one switch must be closed (ON) for output to energized (ON) Conventional parallel circuit LMP1 SW1 SW2 Battery Slide 23 Or Parallel circuit represented in conventional ladder rung LMP1 SW1 SW2 L1L2 Or it can be represented In schematic ladder diagram As: Slide 24 To energized LMP1 SW1 OR SW2 need to be closed LADDER DIAGRAM SW1 SW2 LMP1 I1 I2 02 PLC representation previous rung using Allen- Bradley MicroLogix1000 ? Slide 25 OR TRUTH TABLE ? ABC 000 011 101 111 Slide 26 CONSIDER. What is the Mnemonics Code for OMRON CPM1A? LD 00001 OR 00002 OR 00003 OUT 01002 SW1 SW2 LMP1 I1 I2 02 Three- input OR logic SW3 I3 Slide 27 NUMBERING SYSTEMS In our daily, we use the decimal numbering systemdecimal numbering But, besides decimal, knowledge of BinaryBinary 16 bit group binary number Binary Coded Decimal octaloctal hexadecimalhexadecimal numbering system is essential when using the PLCs EXAMPLE 1 EXAMPLE 2 Comparison of the Number Systems Slide 28 DECIMAL SYSTEMS Uses in daily life Uses only ten digits ; 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 The first column can hold up to 9 the second column can hold up to 90(nine 10s), the third column represents the number of hundreds and so forth and so on. Decimal System 100,000s10,000s1000s100s10s1s Slide 29 For example, 328 represents three 100s two 10s and eight 1s 3 2 8 10 8 x 10 0 = 8 2 x 10 1 = 20 3 x 10 2 = 300 328 10 Decimal number Slide 30 BINARY SYSTEMS Used by computers and PLCs Use only two digits; 0 and 1 Base 2 Works similarly to decimal systems Binary System 32s 16s 8s 4s 2s 1s 1 1 0 0 1 1 0 1 2 1 x 2 0 = 1 0 x 2 1 = 0 1 x 2 2 = 4 1 x 2 3 = 8 0 x 2 4 = 0 0 x 2 5 = 0 1 x 2 6 = 64 1 x 2 7 = 128 205 10 Decimal number Binary number Slide 31 16-BIT GROUP BINARY NUMBER 1 0 1 1 0 0 1 1 1 0 0 1 1 1 1 0 Least Significant ByteMost Significant Byte Nibble Word 1 nibble= 4 bits 1 byte= 8 bits Size of word depends on the processor; 16-bit processor has 16-bit word while a 32-bit processor has a 32-bit word Slide 32 BINARY CODED DECIMAL In BCD, 4 binary bits are used to represent a decimal digit. These 4 bits are used to represent the number 0 through 9. Note: BCD is not the same as binary! The decimal number of 205 is In BCD 0010 0000 0101 but in Binary 1100 1101 (refer binary note)binary Slide 33 OCTAL SYSTEM Octal System 32,768s 4,096s 512s 64s 8s 1s 3 2 0 7 8 7 x 8 0 = 7 0 x 8 1 = 0 2 x 8 2 = 128 3 x 8 3 = 1536 1671 10 Decimal number Octal number Use only 8 digits; 0,1,2,3,4,5,6 and 7 Base 8 Slide 34 HEXADECIMAL SYSTEM Used 16 digits but with an unusual twist Hexadecimal Decimal 00 11 22 33 44 55 66 77 88 99 A10 B11 C12 D13 E14 F15 Slide 35 2 0 D 16 D x 1 0 = 13 0 x 16 1 = 0 2 x 16 2 = 512 525 10 Decimal number Hex number HEXA DECIMAL Slide 36 Each hex digit is simply converted to its four-digit binary (BCD) equivalent and vice versa 7 D 3 F 0111 1101 0011 1111 binary 0111 1101 0011 1111 7 D 3 F hexadecimal HEXA BCD HEXA Slide 37 EXAMPLE 1 16 Bit Binary 1001 0010 1011 0101 Grouped Binary Hexadecimal Equivalent 16 9x16 3 2x16 2 11x16 1 5x16 0 36, 864 512 + 176 5 37,557 10 1 0 0 1 0 0 1 0 1 0 1 1 0 1 0 1 9 2 B 5 DECIMAL? Slide 38 EXAMPLE 2 BCD number 2 3 2 2 2 1 2 0 2 3 2 2 2 1 2 0 2 3 2 2 2 1 2 0 0+0+2+0 0+0+2+1 8+0+0+1 2 3 9 10 =239 10 0 0 1 00 0 1 11 0 0 1 Most Significant Number (MSD) Middle Digit, MD Least Significant Number (LSD) DECIMAL? Slide 39 COMPARISON BETWEEN THESE NUMBER SYSTEMS Slide 40 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8s4s2s1s 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 8s1s 00 01 02 03 04 05 06 07 10 11 12 13 14 15 16 17 HexadecimalDecimalOctalBinary Slide 41 BOOLEAN ALGEBRA Mathematical system of logic Used only two digits (0,1) 2 states (true, false) are used in logic problem Types of functions OROR ANDAND NOTNOT NORNOR NANDNAND XORXOR Slide 42 OR relationship A and B wired in parallel Boolean equation; A + B = C OR Truth table ABC 000 011 101 111 A B C OR gate OR Truth table Slide 43 AND relationship A and B are wired in series. Boolean equation; A. B = C AND Truth table AB C ABC 000 010 100 111 AND gate AND Truth table Slide 44 NOT relationship Boolean equation; = B NOT Truth table A B 01 10 NOT gate NOT Truth table B Slide 45 NAND function Boolean equation; + B = C NAND Truth table A B C ABC 001 011 101 110 NAND gate NAND Truth table AND of NOT Slide 46 NOR function Boolean equation; . B = C NOR Truth table ABC 001 010 100 110 NOR gate NOR truth table AB C OR of NOT Slide 47 XOR function Boolean equation; A.B + .B = C XOR Truth table AB AB ABC 000 011 101 110 XOR gate XOR truth table C Slide 48 LADDER LOGIC DIAGRAM Introduction Objectives Ladder Logic Fundamentals Electrical Ladder DiagramElectrical Ladder Diagram Basic Symbols in Ladder LogicBasic Symbols in Ladder Logic Ladder Logic Programming TransformTransform ProgrammingProgramming Basic STOP/START circuit Slide 49 INTRODUCTION Is an electrical machine diagrams drawn using a standard format Used to show the electrical relationship of the components to speed understanding of how the circuit works Slide 50 OBJECTIVES To describe the basic process of ladder logic To define terms such as contact, coil, rung, scan, normally open and normally closed in symbols Simplified ladder logic for simple applications Slide 51 FUNDAMENTALS OF ELECTRICAL LADDER DIAGRAM Beginning with the control transformer, we add a protective fuse on the left side, which is often part of the transformer itself From the transformer/fuse combination, horizontal lines are extended to both sides and then drawn vertically down Control Transformer Slide 52 These vertical lines are called power rails or simply rails or uprights All wires in a control system are numbered the left rail is often wired as 1 and the right rail is wire number 2 (hot side) Structure of a Ladder Diagram Basic Power Circuit Power Rail Rung Branch Line Slide 53 The voltage difference between the two rails is equal to the transformer secondary voltage Therefore, any component connected between the two rails will be powered. Ladder logic program for PLCs is similar to electrical ladder diagrams. Electrical Ladder Diagram is different from power diagram. Refer to the following Figure There are some basic rules to follow to make the diagram. Refer Ladder Diagram RulesLadder Diagram Rules Slide 54 Ladder Diagram and Power Diagram Slide 55 BASIC OF LADDER LOGIC Basic symbols found Contact Coil Slide 56 CONTACT Used to represent input conditions to be evaluated by processor to solves program Two common symbols for contacts Normally Open ] [ Will not pass current until it is pressed Normally Closed ]/[ Will allow current flow until it is pressed When to decide using NO or NC? Slide 57 CASE 1 Think of a doorbell switch. Would you choose the NC switch? if NC is chosen Doorbell will continuously ringing until someone pushes the button So, when is NC used?when is NC used 24V0VCurrent flow allow bell to ring Slide 58 CASE 2 Previously, we learn that NC is often used when safety is concerned. Take for example Production line Hazardous machine Always on unless sense object Slide 59 Please Recall ? Represent output Only appear only on the right side of the rung COIL Slide 60 WIRING TO LADDER DIAGRAM M Wiring diagram Switch d.c inputMotor L2 L1 M Ladder diagram Switch Motor L2 L1 But this wiring is not suitable/relevant Why? No safety. How to include safety? ? BASIC STOP/START CIRCUIT Slide 61 PROGRAMMING To represent the circuit in in form of ladder logic diagram we would utilize the power from the rails and simply add the two switches and lamp in series between the rails Added along are few details such as wire numbers reference designators PB1, PB2 L1 for components Slide 62 Also note that the switches are on the left, and the lamp is on the right This wiring scheme is done for safety reasons. If we put the lamp on the left side and the switches on the right. If there is a short to ground in the wire from the lamp to the switches the lamp would light without either of the switches being pressed Slide 63 For a lamp to inadvertently light is not a serious problem but assume that instead of a lamp we had the coil of a relay that started the machine This would mean that a short circuit would start the machine without any warning. Slide 64 By properly wiring the controlled device (called the load) on the right side, a short in the circuit will cause the fuse to blow when the rung is activated thus de-energizing the machine controls and shutting down the machine Slide 65 Rung 2 has two branches on the input side of the rung It is also possible to have branches on the load side. For example, we could place another lamp in parallel with LAMP2, thereby creating a branch on the load side Slide 66 It is important to note it is possible to exchange rungs 1 and 2 without changing the way the lamps operate This is one advantage of using ladder diagramming. The rungs can be arranged in any order without changing the way the machine operates It allows the designer to compartmentalize and organize the control circuitry so that it is easier to understand and troubleshoot Slide 67 However, keep in mind that, when beginning PLC ladder programming, the rearranging of rungs is not recommended since in a PLC, the ordering of the rungs is critical and it could change the way the PLC program executes. Slide 68 BASIC STOP/START CIRCUIT When power is applied, motor coil not energized When START button is pressed, motor starts When START released, it remain energized, by the holding contacts. M HOLDING SWITCH M STOP START M Slide 69 NOTE: Should power fail while the machine is ON the latch rung will de-energize When power is restored, the machine will not automatically restart this is a safety feature that is required on all heavy machines Slide 70 Q & A Slide 71 Ladder Diagram Rules There are some basic rules to follow when drawing ladder diagrams to make the diagram easy to read to provide a properly drawn circuit. Slide 72 Show Only Control Devices Not Power Device Control device- Switches, Solenoids, Coil and Relays. Power device- Valves, Motors and Cylinders (these shown separately in power diagram) Output Devices Located On Right Output device- Solenoids, lamps and control relays. Input Devices Located On Left Input device- Pushbuttons, Limit Switches etc. All rungs numbered All conductor numbered Slide 73 At Least one Switch per Line If no switches- output always be on. Then does not serve its purpose to control output All Components Labeled Functions- i.e. START Abbreviation i.e. 1PB Only 1 load per rung If necessary 2 load; Never wired loads in series -Voltage deficient Loads in parallel Only Contacts Actually used are Shown