A Special Note To Our Customers
Here’s a valuable PLC reference that you can use right now. This particular reference is taken from our award-winning textbook—Programmable Controllers: Theory and Implementation, 2nd Edition. In it, you’ll get an overview of how relay logic can be converted into PLC logic. There’s also lots of examples, tables, and ladder diagrams to help explain the topics. Best yet, we’ve included the corresponding chapter from the companion workbook. Here you can look over the key points as well as see how much you learned by answering the review questions. And, yes, the answers are also included. This PLC reference is just a sample of what the textbook and workbook have to offer. If you like it, we’ve included the product literature page with the order number.

Industrial Text & Video Company 1-800-752-8398 www.industrialtext.com

PLC Reference Book
You covered a huge amount of detail very well. It was very easy to understand.
—Jeff Camp, United Control Corp.

The biggest book on PLCs. Written by industry experts, this book covers important, up-to-date, real-world programmable controller topics and applications. This new edition is completely revised and updated to give you the latest developments and insights from the field. At 5 pounds and 1,035 pages, it puts all the PLC information you need at your fingertips. And, since this is a generic PLC reference, it will help you with all of the different makes and models of PLCs in your facility.
But, this book is about more than just PLCs—it also thoroughly explains process control, instrumentation, and plant networks. Whether you’re already an expert on PLCs or just starting out, our problem-solving approach is guaranteed to help you succeed.
Catalog# ABT-ITV206BOOK $88

21 Chapters of PLC Know-How TABLE OF CONTENTS
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: Introduction to Programmable Controllers Number Systems and Codes Logic Concepts Processors, the Power Supply, and Programming Devices The Memory System and I/O Interaction The Discrete Input/Output System The Analog Input/Output System Special Function I/O and Serial Communication Interfacing Programming Languages The IEC-1131 Standard and Programming Language System Programming and Implementation PLC System Documentation Data Measurements and Transducers Process Responses and Transfer Functions Process Controllers and Loop Tuning Artificial Intelligence and PLC Systems Fuzzy Logic Local Area Networks I/O Bus Networks PLC Start-Up and Maintenance System Selection Guidelines

• Valuable Maintenance Tips •
SELECTION, INSTALLATION & SAFETY
Follow our 11 major steps in selecting a PLC for an application and avoid using the wrong controller Install sinking and sourcing inputs and outputs properly—one wrong wire and it won’t work Implement safety circuits correctly in PLC applications to protect people and equipment Prevent noise, heat, and voltage variations from ruining your PLC system Implement a step-by-step static and dynamic start-up checkout to guarantee smooth PLC system operation Design preventive safety and maintenance into your total control system

TROUBLESHOOTING & MAINTENANCE
Learn no-nonsense troubleshooting procedures to reduce downtime Troubleshoot analog I/O and avoid undesirable count jumps Learn 6 preventive maintenance procedures to keep your PLC system running fault free Learn a step-by-step procedure for finding hidden ground loops Learn how to deal with leaky inputs Identify vibration problems and use them for preventive engineering control Control excessive line voltage and avoid intermittent shutdowns

PROGRAMMING
Learn the number systems and codes used in PLC addressing Eliminate the confusion of ladder logic programming Master all types of timers and counters used in real-life applications Avoid ladder scan evaluation problems Implement a safe circuit with hardware and software interlocking

Industrial Text & Video

800.752.8398

www.industrialtext.com

Inc. Perfect textbook companion: • 800 answers to common PLC problems at your fingertips • Makes a great review tool TR1 2 TR1 3 M1 4 S1 5 S2 TR1 S1 M1 TR1 S1 6 S2 • Practice PLC addressing and programming • Great on-the-job quick-reference guide L1 Start Stop 1 TR1 TR1 L2 OL • Separate answer section makes quizzing easy • Valuable chapter summaries A. Electrical Engineer. you’ll find plenty to put your skills to the test. I often times had to refer back to the theory book. That’s what you get with Programmable Controllers: Workbook and Study Guide. This workbook provides not only valuable summaries of each of the textbook’s twenty-one chapters. Imagine having the answers to over 800 PLC problems at your fingertips. Use it on the job to brush up on the essentials and to solve any PLC problem. You Will Learn: • Proper address assignment and interfacing • Basic PLC ladder program implementation • Data measurement • Internal coil assignments • Proper digital and analog interfacing procedures • Advanced function block programming • Network protocols • Analog input and output data handling • Correct PLC installation Catalog #ABT-ITV206WKBK $28 Sample Problem A sample problem from Chapter 11 of the workbook: System Programming and Implementation Circle the locations where timer traps will be used in the PLC implementation of this reducedvoltage start motor circuit. Polyclad Laminates.752. it’s the perfect companion to Programmable Controllers: Theory and Implementation.com .Programmable Controllers: Workbook/Study Guide Sometimes you think you know it all. 2 TR1 3 M1 4 S1 S2 TR1 S1 M1 TR1 S1 Sample pages from the workbook 5 S2 6 Industrial Text & Video • 800. Whether you’re an expert or just learning about PLCs. but after reading the questions.industrialtext. And each of the review questions includes a detailed answer and explanation. L1 Stop 1 Start TR1 L2 OL Q. —Ernest Presto. At 334 pages.8398 • www. 2nd Edition. but also over 800 review questions.

com 1-800-752-8398 . Program coding—the process of translating a logic or relay diagram into PLC ladder program form. Flowcharting—a method of pictorially representing the operation of a process in a sequential manner. —Henry Ward Beecher Industrial Text & Video Company www.Introduction to PLC Programming and Implementation— from relay logic to PLC logic Key Terms Control strategy—the sequence of steps that must occur during a process or PLC program to produce the desired output control. Control task—the desired results of a control program.industrialtext. He that invents a machine augments the power of man and the well-being of mankind.

equipment. accompanying workbooks. In no event shall the publisher and others involved in this publication be liable for direct. Georgia 30067 (770) 240-2200 (800) PLC-TEXT Due to the nature of this publication and because of the different applications of programmable controllers. illustrations.Introduction to PLC Programming and Implementation—from relay logic to PLC logic © 1999 by Industrial Text and Video Company Published by Industrial Text and Video Company All rights reserved. circuits. or consequential damages resulting from the use of any technique or equipment herein mentioned. Industrial Text & Video Company www. or software described in this text. or further information should be addressed to: Industrial Text and Video Company 1950 Spectrum Circle Tower A-First Floor Marietta.com 1-800-752-8398 2 .industrialtext. indirect. charts. and examples in this book are intended solely to illustrate the methods used in each application example. Requests for permission. No patent liability is assumed with respect to use of information. The publisher and others involved in this publication cannot assume responsibility or liability for actual use based on the illustrative uses and applications. The illustrations. Reproduction or translation of any part of this work beyond that permitted by Sections 107 and 108 of the 1976 United States Copyright act are unlawful. the readers or users and those responsible for applying the information herein contained must satisfy themselves to the acceptability of each application and the use of equipment therein mentioned.

..................................industrialtext..............................................................................................29 FORWARD/REVERSE MOTOR INTERLOCKING .....................................................................10 REGISTER ADDRESS ASSIGNMENT ....26 SIMPLE RELAY REPLACEMENT ...................17 PROGRAM CODING/TRANSLATION ...........40 CONTINUOUS BOTTLE-FILLING CONTROL ..............................................................................................................33 REDUCED-VOLTAGE-START MOTOR CONTROL ....................................................................................15 SPECIAL INPUT DEVICE PROGRAMMING .......54 REVIEW QUESTIONS ..47 STUDY GUIDE ........................................................com 1-800-752-8398 3 ..................6 CREATING FLOWCHARTS AND OUTPUT SEQUENCES ...........5 PROGRAM ORGANIZATION AND IMPLEMENTATION ...........................................................25 CONTROL PROGRAMMING AND PLC DESCRIPTIONS ...................................44 LARGE RELAY SYSTEM MODERNIZATION ......27 SIMPLE START/STOP MOTOR CIRCUIT ......................................................................15 ELEMENTS TO LEAVE HARDWIRED ......................................................4 CONTROL STRATEGY ...............................................................................................................................................................7 CONFIGURING THE PLC SYSTEM ......................4 IMPLEMENTATION GUIDELINES ..............................................64 1 2 3 4 Industrial Text & Video Company www....................55 ANSWERS ..24 5 DISCRETE I/O CONTROL PROGRAMMING ......................................................................................................10 REAL AND INTERNAL I/O ASSIGNMENT .................................................................................Introduction to PLC Programming and Implementation—from relay logic to PLC logic Contents CONTROL TASK DEFINITION ..............37 AC MOTOR DRIVE INTERFACE .................

This procedure commonly involves determining a control strategy. Although relay logic can be directly implemented in a PLC.industrialtext. Nevertheless. In this handbook. we can provide you with techniques and guidelines for completing this problem-solving process. can be made. This information provides the foundation for the control program. All of the departments involved must work together to determine what inputs are required.com 1-800-752-8398 4 . system configuration. To help minimize errors. which change depending on the application. These strategies also apply to PLCs with the IEC 1131-3 programming standard. Management should also be involved if the project requires data reporting. if any. After you finish. the control task should be defined by those who are familiar with the operation of the machine or process. personnel from both the warehouse and packaging areas must collaborate with the engineering group during the system definition. to meet current project needs and to capitalize on the capabilities of programmable controllers. the user should review the steps of the manual procedure to determine what improvements. you will be ready to learn how to document the PLC system—the last step in implementing the control program. Because they are so varied. This part of the program development is known as the development of an algorithm. For example. which includes program organization. but it need not be. the sequence of steps that must occur within the program to produce the desired output control. If the control task is currently done manually or through relay logic. if a project involves the automation of a manufacturing plant in which materials will be retrieved from the warehouse and sent to the automatic packaging area. when possible. we cannot explain how to solve every specific control task. Control task definition occurs at many levels. 2 C ONTROL S TRATEGY After the control task has been defined. that is. so that everyone understands the purpose and scope of the project. Proper definition of the task is directly related to the success of the control program. Additionally. The term algorithm may be new or strange to some readers. determining what needs to be done. we will present both simple and complex PLC programming examples. the procedure should be redesigned. 1 C ONTROL T ASK D EFINITION A user should begin the problem-solving process by defining the control task.Introduction to PLC Programming and Implementation—from relay logic to PLC logic The implementation of a control program requires complex organizational H IGHLIGHTS and analytical skills. and I/O programming. the planning of its solution can begin. we will introduce a strategy for implementing a control program. Each of us follows algorithms to accomplish Industrial Text & Video Company www.

program later. through electromechanical control or individual. The fundamental rule for defining the program strategy is think first. the designer must review the sequence of events and optimize control through the addition or deletion of steps. In the last of a finite number of steps. but it can only do what it is told to do. The user must implement the control from a given set of basic instructions and produce the solution in a finite number of steps. regardless of whether it is a new application or the modernization of an existing process. while modernizations are upgraded existing control systems that have functioned previously without a PLC (i. starts the engine. Adopting this philosophy will shorten programming time. New applications are new systems. and so on. Nevada unless we know both where we are and where Bullfrog County is. the programmer should follow certain guidelines. Industrial Text & Video Company www. It receives all of its directions from the control program. Consider alternative approaches to solving the problem and allow time to polish the solution algorithm before trying to program the control function. he or she may need to return to the control task definition to redefine the problem.. the probability of mistakes is less. Therefore. In either case. analog. We cannot develop a control strategy until we have all of this problem definition information. we cannot explain how to get from where we are to Bullfrog County. Strategy formulation challenges the system designer.e. As part of the problem definition. accelerate start-up. The PLC strategy implementation for a control task closely follows the development of an algorithm. as well as input and output considerations. we need to know that too. we need to know if a particular method of transportation is required. This requires a knowledge of the PLC-controlled field devices. and focus attention where it is needed—on design when designing and on programming when programming. The techniques used to implement the control program vary according to the programmer. the success of a PLC control program depends on how organized the user is. 3 I MPLEMENTATION G UIDELINES A programmable controller is a powerful machine. If developing an algorithm to solve the problem becomes difficult.Introduction to PLC Programming and Implementation—from relay logic to PLC logic certain tasks in our daily lives. If there is a time constraint. the set of instructions or solution algorithms created by the programmer. For example. he or she reaches the destination. loop controllers). Table1 lists programming guidelines for new applications and modernizations.industrialtext. gets into the car. but if the application is approached in a systematic manner. The procedure that a person follows to go from home to either school or work is an algorithm—the person exits the house.com 1-800-752-8398 5 . There are many ways to approach a problem. Nevertheless. reduce debugging time.

Reviewing strategies for new applications. • Review possible control methods • Review machine logic of operation and optimize the process operation. The programming stage reveals the difference between new and modernization projects.industrialtext. • Translate the logic implementation into PLC coding. especially when a group of people is involved. the strategy should follow the problem definition. This ladder diagram can be almost directly translated into PLC ladder diagrams. Programming guidelines. In a modernization project. The designer then uses this explanation to develop the control program. as well as revising the actual method of control for a modernization project. like the one shown in Figure1. • Flowchart the process operation. Modernizations • Understand the actual process or machine function. Table 1. For new applications. The larger the project. the user already understands the operation of the machine or process. • Assign real I/O addresses and internal addresses to inputs and outputs. and optimize when possible. New applications usually begin with specifications given to the person who will design and install the control system.Introduction to PLC Programming and Implementation—from relay logic to PLC logic New Applications • Understand the desired function of the system. The programmer must understand the PLC control task and controlled devices. along with the control task. will help detect errors that were introduced during the planning stages.com 1-800-752-8398 6 . the more organization is needed. understanding the process or machine operation is the first step in a systematic approach to solving the control problem. As mentioned previously. a successful control solution also depends on the ability to implement it. • Translate relay ladder diagram into PLC coding. 4 PROGRAM ORGANIZATION AND IMPLEMENTATION Organization is a key word when programming and implementing a control solution. The written explanation should be simple to avoid confusion. The designer translates these specifications into a written description that explains the possible control strategies. An existing relay ladder diagram. • Assign real I/O and internal addresses to inputs and outputs. • Implement the flowchart by using logic diagrams or relay logic symbology. choose the correct equipment for the job Industrial Text & Video Company www. usually defines the sequence of events in the control program. In addition to organization.

industrialtext. as well as describes the operational process in a sequential manner. broad concepts and minor details.com 1-800-752-8398 7 . (hardware and software). A flowchart is a pictorial representation that records. especially if you do not remember how you got it to work in the first place. In a flowchart. decision.Introduction to PLC Programming and Implementation—from relay logic to PLC logic L1 PB14 LS7 CR1 PL3 L2 CR1 SOL PS7 CR1 SOL3 UP CR2 SOL4 FWD LS8 PS7 Start LS9 CR2 Reset CR2 SOL5 DWN LS8 CR3 CR3 PL4 Figure 1. analyzes. CREATING FLOWCHARTS AND OUTPUT SEQUENCES Flowcharting is a technique often used when planning a program after a written description has been developed. Electromechanical relay circuit diagram. Figure 2 illustrates a simple flowchart. Each step in the chart performs an operation. the programmer can begin sketching the control program solution. are readily apparent. or data process. and communicates information. documenting the system throughout its development will pay off in the end. Once these preliminary details are understood. Therefore. Documenting a system once it is installed and working is difficult. Sequences and relationships that are hard to extract from general descriptions also become obvious when expressed Industrial Text & Video Company www. and understand the PLC system. The work performed during this time forms an important part of the system or project documentation. whether it is an input/output. along with their relationship to each other.

The main flowchart itself should not be long and complex.com 1-800-752-8398 8 . Figure 3 illustrates the most common flowchart symbols and their meanings. Figure 3. which aid in the interpretation of the solution algorithm. Logic gates implement a logical output sequence given specific real and/or internal input conditions. Even the flowchart symbols themselves have specific meanings. or exit to. START Process A group of one or more instructions that perform a processing function Input/Output Any function involving an input /output device Decision A point in the program where a branch to alternate paths is possible Preparation A group of one or more instructions that sets the stage for subsequent processing Predefined Process A group of operations not detailed in the flowchart (often a library subroutine) Terminal Beginning.. it should point out the major functions to be performed (e. the user can employ either logic gates or contact symbology to implement the logic sequences. instead. another part of the flowchart Flowline Direction of processing or data flow Annotation Descriptive comments or explanatory notes provided for clarification Set Preset Values Is PB Pressed? NO Read Analog Input Store In Temp. compute engineering units from analog input counts). > 100˚C No Turn Heater Coil ON Yes Go To Subroutine END Figure 2. Industrial Text & Video Company www. end. Several smaller flowcharts can be used to further describe the functions specified in the main flowchart. or point of interruption in a program Connector Entry from. Once the flowchart is completed. Simple flowchart. Flowchart symbols.Introduction to PLC Programming and Implementation—from relay logic to PLC logic through a flowchart.industrialtext. Reg. Is Temp.g.

AUTO. Meter SOL1 Count A Gallon Up C1 500 Gal. perhaps. a combination of both (see Figure 5). PB10.com 1-800-752-8398 9 . an I/O point is an internal. Inputs and outputs marked with an X on a logic gate diagram. as in Figure 4b. Industrial Text & Video Company www.g.. Counter 2 330 gallons of B (a) Reset B (Reset SOL2) B Finished (Start of pump back B) M B Finished Counter 2 330 gallons of B (b) Reset B (Reset SOL2) B Finished (Start of pump back B) Figure 4. LS1. Figure 4 illustrates both of these programming methods.industrialtext. of A PV = 500 Gal. represent real I/O in the system. Clear C1 Reset A Finished Figure 5. Users should employ whichever method they feel most comfortable with or. etc.Introduction to PLC Programming and Implementation—from relay logic to PLC logic while PLC contact symbology directly implements the logic necessary to program an output rung. Logic gate diagrams. (a) PLC contact symbology and (b) logic gate representation of a logic sequence. During this stage.) or symbolic letters and numbers that are associated with each of the field elements. however. may be more appropriate in controllers that use Boolean instruction sets. the user should prepare a short description of the logic sequence. The labels used for actual input signals can be either the actual device names (e. A combination of logic gates and contact symbology. If no mark is present.

including timers. It indicates which PLC inputs are connected to which input devices and which PLC outputs drive which output devices. Table 2 shows an I/O address assignment table for real inputs and outputs. while Table 3 shows an I/O address assignment table for internals. etc.). and MCRs. These assignments are the actual contact and coil representations that are used in the ladder diagram program. and the placement of interfaces within a rack (all AC I/O together. along with system configuration documentation. In applications where electromechanical relay diagrams are available (e. The assignment of internals. counters. I/O address assignment table for real inputs and outputs. Industrial Text & Video Company www. as well as where the modules will be located in the local or remote rack enclosures. all DC and low-level analog I/O together. Consideration of these details. special I/O modules. R EAL AND I NTERNAL I/O A SSIGNMENT The assignment of inputs and outputs is one of the most important procedures that occurs during the programming organization and implementation stages. identification of real I/O can be done by circling the devices and then assigning them I/O addresses (see Example 1).g. such as fast-response or wire fault inputs. also takes place here. During system configuration. will result in a better system design. the user should consider the following: possible future expansions.Introduction to PLC Programming and Implementation—from relay logic to PLC logic C ONFIGURING THE PLC S YSTEM PLC configuration should be considered during flowcharting and logic sequencing. The I/O assignment table documents and organizes what has been done thus far. modernization of a machine or process).industrialtext. The PLC’s configuration defines which I/O modules will be used with which types of I/O signals.. These assignments can be extracted from the logic gate diagrams or ladder symbols I/O Address Module Type Input Rack 0 0 0 0 0 0 0 0 0 0 Group 0 0 0 0 0 0 0 0 1 1 Terminal 0 1 2 3 4 5 6 7 0 1 Description LS1—Position LS2—Detect Sel Switch—Select 1 PB1—Start SOL1 PL1 PL2 Motor M1 SOL2 PL3 Output Output Table 2.com 1-800-752-8398 10 . The modules’ locations determine the I/O addresses that will be used in the control program.

that were used to describe the logic sequences. decimal. or hexadecimal. respectively. This grouping will allow the monitoring and manipulation of a group of I/O simultaneously. (c) assign the internal addresses (if required). (b) assign the I/O addresses. During the I/O assignment. These addresses can be represented in octal. For instance. I/O address assignment table for internal outputs. The description section of the table specifies the field devices that correspond to each address. Due to the modularity of an I/O system. inputs and outputs are typically represented by squares and diamonds. This practice will prevent the assignment of an input address to an output module and vice versa. EXAMPLE 1 For the circuit shown in Figure 7. if 16 motors will be started sequentially. The table of address assignments should closely follow the input/output connection diagram (see Figure 6).com 1-800-752-8398 11 . they should be grouped together. and (d) draw the I/O connection diagram. The I/O connection diagram forms part of the documentation package. all the inputs and all the outputs should be assigned at the same time. They can also come from the circled elements on an electromechanical diagram.Introduction to PLC Programming and Implementation—from relay logic to PLC logic Device CR7 TDR10 CR10 CR14 — Internal 1010 T200 1011 1012 1013 Description CR7 replacement ON-delay timer 12 sec CR10 replacement CR14 replacement Setup interlock Table 3. The numbers used for the I/O addresses depend on the PLC model used. Inputs L1 LS1 000 LS2 001 005 L2 Program Coding L1 Outputs L2 SOL1 004 PL1 R Figure 6. the user should group associated inputs and outputs.industrialtext. Industrial Text & Video Company www. so that monitoring the I/O registers associated with the 16 grouped I/O points will reveal the motors’ starting sequence. Although industry standards for I/O representations vary among users. (a) identify the real inputs and outputs by circling each. Partial connection diagram for the I/O address assignment in Table 2.

leaving spare I/O locations for future use. Note that temperature switch TS3 is circled twice even though it is only one device. Electromechanical relay circuit.Introduction to PLC Programming and Implementation—from relay logic to PLC logic L1 Start PB1 L2 Stop PB2 CR1 CR1 CR1 Temp TS3 CR2 PL1 Ready Level FS4 CR2 CR3 PL2 Level FS5 SOL1 Open CR2 CR3 PL3 Temp TS3 or H SOL2 Open CR1 H3 Heating Figure 7. Inputs and outputs can have any address as long as the correct module is used. only one of them is referenced. SOLUTION (a) Figure 8 shows the circled real input and output connections. and internals start at address 10008.industrialtext. In the address assignment. The number system is octal. Assume that the PLC used has a modularity of 8 points per module. It assigns all inputs and all outputs. The PLC determines whether an input or output module is connected in a slot. and the master rack is number 0.com 1-800-752-8398 12 . Each rack has 8 module slots. (b) Table 4 illustrates the assignment of inputs and outputs. Industrial Text & Video Company www. and only one of them is wired to an input module.

Industrial Text & Video Company www.com 1-800-752-8398 13 . I/O Address Module Type Input Rack 0 0 0 0 0 0 0 0 0 • • • Group 0 0 0 0 0 0 0 0 1 • • • Terminal 0 1 2 3 4 5 6 7 0 • • • Description Start PB1 Stop PB2 Temp TS3 Level FS4 Level FS5 — — — Not used Spare 0 Output 0 0 0 0 0 0 0 0 1 2 2 2 2 2 2 2 2 7 0 1 2 3 4 5 6 7 PL1 Ready SOL1 Open PL2 SOL2 Open PL3 H3 Heating — — Table 4. Identification of real I/O (circled).industrialtext.Introduction to PLC Programming and Implementation—from relay logic to PLC logic L1 Start PB1 L2 Stop PB2 CR1 CR1 CR1 Temp TS3 CR2 PL1 Ready Level FS4 CR2 CR3 PL2 Level FS5 SOL1 Open CR2 CR2 PL3 Temp TS3 or H SOL2 Open CR1 H3 Heating Figure 8. I/O address assignment.

including a description of each internal. Device CR1 CR2 CR3 Internal 1000 — — Description Control relay CR1 Same as PL1 Ready Same as SOL2 Open Table 5. Note that only one of the temperature switches. When the control program is implemented. I/O connection diagram. the normally open TS3 switch. every contact associated with CR2 will be replaced by contacts with address 020 (the address of PL1).com 1-800-752-8398 14 .industrialtext. Internal output assignment. Industrial Text & Video Company www. This diagram is based on the I/O assignment from part (b). Note that control relay CR2 is not assigned as an internal since it is the same as the output rung corresponding to PL1. Inputs L1 Start PB1 Input 000 Stop PB2 001 Temp TS3 L2 L1 Outputs L2 Output 020 SOL1 Open 021 PL2 002 Program Coding 022 SOL2 Open 023 PL3 004 024 H3 Heating 005 025 PL1 Ready Level FS4 003 Level FS5 006 026 007 027 Figure 9. is a connected input. (d) Figure 9 illustrates the I/O connection diagram for the circuit in Figure 7.Introduction to PLC Programming and Implementation—from relay logic to PLC logic (c) Table 5 presents the output assignments. The logic programming of each switch should be based on a normally open condition.

Note that the normally open PLC Fault Contact 1 (or watchdog timer contact) is wired in series with other emergency conditions. The system designer can also use this contact if an emergency occurs to disable the PLC system’s operation.01 sec TB) Accumulated value for counter R2010 – – Beginning of look-up table (value #1) Look-up value #2 Look-up value #3 Look-up value #4 Look-up value #5 Table 6. When a PLC is operating correctly. Figure 10 provides an example of system components that are typically left hardwired. the user can shut down the system without PLC intervention. E LEMENTS TO L EAVE H ARDWIRED During the assignment of inputs and outputs. and function in a register assignment table. Components like emergency stops and master start push buttons should also remain hardwired. The easiest way to assign registers is to list all of the available PLC registers.Introduction to PLC Programming and Implementation—from relay logic to PLC logic R EGISTER A DDRESS A SSIGNMENT The assignment of addresses to the registers used in the control program is another important aspect of PLC organization. Register 2000 2001 2002 2003 2004 2005 2006 2007 2010 2011 2012 2013 2014 2015 2016 Contents Analog input Analog input Spare Spare TWS input TWS input Constant 2350 Accumulated Spare Spare Constant 1000 Constant 1010 Constant 1023 Constant 1089 Constant 1100 Description Temperature input temp 3 (inside) Temperature input temp 4 (outside) – – Set point (SP1) input from TWS panel 1 Set point volume (V1) from TWS panel 2 Timer constant of 23. Register assignment table. This contact stays closed when the controller is operating correctly. if the controller is faulty and an emergency occurs. describe each register’s contents. PLC fault contacts are safety contacts that are available to the user when implementing or enhancing a safety circuit. but opens when a fault occurs. the user should decide which devices will not be wired to the controller.5 sec (0. Then. description.industrialtext. These elements will remain part of the electromechanical control logic. principally for safety purposes. Table 6 shows a register assignment table for the first 15 registers in a PLC system. This way. These elements usually include devices that are not frequently switched off after start. as they are used. the normally open fault contact closes and the normally closed one Industrial Text & Video Company www.com 1-800-752-8398 15 . such as compressors and hydraulic pumps. ranging from address 20008 to address 20168.

In the diagram shown in Figure 10. The turning OFF of the safety control relay (SCR) will open the SCR contact. The normally closed fault contacts are used to indicate an alarm condition. these contacts are connected in series with the hardwired circuit. The designer should implement this type of alarm in the main PLC rack. This circuit also uses a safety control relay (SCR) to control power to the rest of the control components. Coolant Pump Motor M3 OLs Disconnect Fuses Swich 1M Hydraulic Pump Motor M2 OLs 2M Spindle Motor M1 OLs 3M L1 F1 Stop M2 M3 Start PLC Fault Contact 1 L2 M2 M3 SCR PL1 OLs OLs PLC Fault Contact 2 PLC Fail Alarm PLC SCR To I/O System Figure 10.Introduction to PLC Programming and Implementation—from relay logic to PLC logic opens when the PLC is first turned on. stopping the flow of power to the system. As shown in Figure 10. since Industrial Text & Video Company www. Hardwired components in a PLC system.industrialtext. as well as in each remote I/O rack location.com 1-800-752-8398 16 . an emergency situation (including a PLC malfunction) will remove power (L1) to the I/O modules. so that if the PLC fails during standard operation. This will shut down the hardwired circuit at the point where the PLC becomes the controlling element. the normally open contacts will open. the normally closed PLC fault contact (PLC Fault Contact 2) in the hardwired section will alert personnel of a system failure due to a PLC malfunction. Furthermore.

Normally Closed Devices. draw the PLC ladder program and create an I/O address assignment table. Generally. Remember that the programming of a device is closely related to how that device should behave in the control program. An input device that is wired as a normally open input can be programmed to act as either a normally open or a normally closed device. its reference address is programmed as normally open. Since it is not referenced as an input. This allows subsystem failures to be signaled promptly. For inputs. L1 LS14 PS1 CR10 L2 CR10 SOL7 CR10 LS15 Figure 11. if a device is wired as a normally closed input and it must act as a normally closed input. The same rule applies for normally closed inputs. Start outputs at address 508 and internals at address 1008. EXAMPLE 2 For the circuit in Figure 11. so that the problem can be fixed without endangering personnel. the program does not evaluate the device as a real input. a normally closed device in a hardwired circuit is programmed as normally closed when it is replaced in the PLC control program.com 1-800-752-8398 17 . Electromechanical relay circuit. The normally closed contact (CR10) is programmed as normally closed because internal coil 100 references it and requires it to operate as a normally closed contact. S PECIAL I NPUT D EVICE P ROGRAMMING Some PLC circuits and input connections require special programming.Introduction to PLC Programming and Implementation—from relay logic to PLC logic remote systems also have fault contacts incorporated into the remote controllers. use addresses 108 through 478. As the following example illustrates. SOLUTION Figure 12 shows the equivalent PLC ladder diagram for the circuit in Figure 11. One example is the programming of normally closed input devices.industrialtext. Industrial Text & Video Company www. however. Table 7 shows the I/O address assignment table for this example.

In a hardwired circuit. Electromechanical relay circuit with a master control relay. the MCR output in line 1 controls the power to the hardwired L1 PS1 1 CR1 2 3 Power to other circuits 4 not controlled by MCR 50 LS100 51 MCR Hardwired Circuits PL1 LS1 MCR MCR controls power to circuits below until the end of the hardwired circuit L2 Hardwired Circuits TS20 CR100 Last hardwired circuit Figure 13. In electromechanical circuit diagrams. For example.Introduction to PLC Programming and Implementation—from relay logic to PLC logic L1 LS14 10 PS1* 11 LS15 12 L2 LS14 10 CR10 100 CR10 100 LS15 12 PS1 11 CR10 100 L1 L2 SOL7 50 50 SOL7 *Wired NC Programmed NO Figure 12. PLC ladder diagram of the circuit in Figure 11. Industrial Text & Video Company www.com 1-800-752-8398 18 .industrialtext. Another circuit the programmer should be aware of is a master control relay (MCR). Type Input Input Input Output Internal Master Control Relays. I/O Address 10 11 12 50 100 Device LS14 PS1 LS15 SOL7 CR10 Table 7. in Figure13. I/O address assignment table. there is no definite end to an MCR except when the circuit is followed all the way through. an MCR coil controls several rungs in a circuit by switching ON or OFF the power to those rungs.

where the MCR contact is located. This is the way the hardwired circuit operates. internal output coil 1000. If the master control relay is ON.Introduction to PLC Programming and Implementation—from relay logic to PLC logic elements from line 3. power branches to other circuits that are not affected by the MCR’s action. Industrial Text & Video Company www. At line 2 in the circuit. This configuration is equivalent to a hardwired subprogram or subroutine—if the MCR is ON. PLC ladder diagram with MCR fence. power will not flow and these devices will not implement the control action. power will flow to these rungs (lines 4 through 51). to the last element in line 51. Figure14 illustrates the placement of the MCR instruction for the circuit in Figure 13.industrialtext. To provide proper fencing for the program’s MCR control section. The END1 instruction L1 PS1 010 L2 PS1 10 LS1 11 CR1 Int 1000 PL1 040 L1 L2 LS1 011 040 2000 CR1 1000 PL1 MCR1 Translated Logic Fenced by MCR1 Translated Logic 102 LS100 102 TS20 103 Int 2000 LS100 TS20 103 END1 Rest of program from line 2 in hardwired circuit Figure 14. If the master control relay is OFF. the rungs are executed. labeled CR1 (line 1 of PLC program). if it is OFF. the programmer must place an END MCR instruction after the last rung the MCR should control. was inserted so that PL1 would not be inside the fenced MCR area.com 1-800-752-8398 19 . During the translation from a hardwired ladder circuit to PLC symbology. These circuits are the regular hardwired program. the rungs are not executed.

Set Up/Run Run M1 1 CR1 2 CR2 3 4 5 PL2 6 Up CR1 7 CR4 8 9 CR3 10 LS3 CR4 12 PL4 13 Feed LS4 14 SOL3 15 CR3 16 CR4 17 CR1 18 5 seconds CR2 19 LS5 TDR1 CR5 SOL4 Fast Sol Feed Sol CR4 CR4 Set Up ON Set Up PL3 Dn ON TDR1 CR3 SOL2 Sol Dn MCR LS2 CR3 TDR1 SOL1 Sol Up CR3 Up Master ON Enable MCR Master Control Relay Up LS1 CR1 CR2 CR1 OLs 11 Figure 15.com 1-800-752-8398 20 . The corresponding PLC program should have an END MCR after the rung containing the PL3 output. Industrial Text & Video Company www. Figure15 illustrates a partial ladder rung of a more elaborate circuit with this type of MCR condition. The instructions corresponding to the hardwired circuits that branch from line 2 in the electromechanical diagram of Figure 13 are located after the END1 instruction.industrialtext.Introduction to PLC Programming and Implementation—from relay logic to PLC logic ends the MCR fence. Electromechanical relay circuit with an MCR.

Introduction to PLC Programming and Implementation—from relay logic to PLC logic EXAMPLE 3 Highlight the sections of the circuit in Figure 15 that will be under the control of a PLC MCR. MCR-controlled program elements.com 1-800-752-8398 21 . For the MCR fence to be properly programmed. What additional measures must be taken to include or bypass other hardwired circuits within the MCR fence? SOLUTION Figure 16 highlights the circuits that must be fenced under the MCR instruction. the PLC program must Set Up/Run Run M1 OLs 1 CR1 2 CR2 3 4 5 PL2 6 Up CR1 7 CR4 8 9 CR3 10 LS3 11 CR4 12 PL4 13 14 15 CR3 16 CR4 17 CR1 18 CR2 19 5 seconds LS5 TDR1 CR5 SOL4 Fast Sol Set Up ON Feed LS4 CR4 CR4 SOL3 Feed Sol Set Up PL3 Dn ON TDR1 CR3 SOL2 Sol Dn MCR LS2 CR3 TDR1 SOL1 Sol Up CR3 Up Master ON Enable MCR Master Control Relay Up LS1 CR1 CR2 CR1 Figure 16. and TDR1 can also be turned ON by logic prior to the MCR fence (see Figure 17). Industrial Text & Video Company www. Note that solenoid SOL1 and part of its driving logic are not included in the MCR fencing because SOL1.industrialtext. CR3.

Set Up/Run Up CR4 CR1000 Logic Driving MCR Up LS2 LS1 MCR1 CR1001 Up CR3 TDR1 CR3 SOL2 Fenced by MCR LS3 SOL2 PL3 END1 CR1000 CR3 TDR1 SOL1 CR1001 Figure 18. Industrial Text & Video Company www. Note that the instructions in this diagram have the same names as in the hardwired circuit.Introduction to PLC Programming and Implementation—from relay logic to PLC logic include two internal control relays that take SOL1 out of the fence. Figure 18 illustrates the fenced circuit with the additional internals (CR1000 and CR1001). SOL1 activated by logic outside of the MCR fence. MCR fence.com 1-800-752-8398 22 . Set Up/Run 7 Up CR1 CR4 CR3 Up 8 9 MCR LS2 add CR1000 SOL1 CR3 TDR1 Sol Up SOL2 Sol Dn CR3 10 TDR1 CR3 add CR1001 LS3 11 PL3 Dn ON Figure 17. The solenoid SOL1 will be outside of the MCR fence because it can be turned ON by either the outside logic (highlighted section in Figure 17) or the logic inside the MCR fence (highlighted section in Figure 18).industrialtext.

is usually unavailable in PLCs. This type of contact.industrialtext. (a) Forward and (b) reverse power flow in a hardwired circuit. the programmer must know whether or not CR4 influences the two output rungs to which it is connected. Instantaneous Timer Contacts. The electromechanical circuit shown in Figure 15 specifies an instantaneous timer contact (the normally open TDR1 contact in line 10). PLCs only allow forward paths.Introduction to PLC Programming and Implementation—from relay logic to PLC logic Bidirectional Power Flow. To implement an instantaneous timer contact (i. To solve the bidirectional flow problem. Figure 19 illustrates the two paths that can occur in the hardwired circuit.e. a contact Industrial Text & Video Company www.. These rungs are the CR3 control relay output and the solenoid SOL1 output (rungs 7 and 9. however. therefore. if a reverse path is necessary for this circuit’s logic. the CR4 contact must be included in the logic driving the CR3 output (see Figure 9b). CR1 CR3 Up 7 CR4 8 9 MCR LS2 CR3 TDR1 SOL1 Sol Up CR3 TDR1 CR3 SOL2 Sol Dn LS3 PL3 Dn ON 10 11 (a) Forward path CR1 CR3 Up 7 CR4 8 9 MCR LS2 CR3 TDR1 SOL1 Sol Up CR3 TDR1 CR3 SOL2 Sol Dn LS3 PL3 Dn ON 10 11 (b) Reverse path Figure 19. respectively).com 1-800-752-8398 23 . The circuit in Figure 19 illustrates another condition that can cause programming problems: the possibility of bidirectional power flow through the normally closed CR4 contact in line 8.

the timer will start timing and the instantaneous contact (TMR1-1) will close. reconstruct all of the possible logic paths from right to left. like the one discussed in Example 3. Figure 20b illustrates the technique for trapping a timer. the timer will start timing when PB1 and LS1 both close. This ladder program. the contacts from this internal drive the timer. Ease of program coding is directly related to how orderly Industrial Text & Video Company www. the programmer must use an internal output to trap the timer. thus sealing PB1.industrialtext. Complicated Logic Rungs. an internal output traps the instantaneous contact from the circuit’s electromechanical timer. If a trap does not exist. this cross point is in line 9 at the normally closed contact CR4 between normally open LS1 and normally closed CR3. In this PLC program. In the electromechanical circuit in Figure 20a.com 1-800-752-8398 24 . the best programming procedure is to isolate it from the other rungs. Then.Introduction to PLC Programming and Implementation—from relay logic to PLC logic that closes or opens once the timer is enabled). use the internal output to drive the rest of the logic. For the circuit shown in Figure 15. Thus. If a section of a rung. then use the internal’s contact as an instantaneous contact to drive the timer’s logic. it may be easier to create an internal output at the point where the two rungs cross. If PB1 is released (OFF). When a logic rung is very confusing. the timer will continue to time because the circuit is sealed. (a) An instantaneous timer contact in a hardwired circuit and (b) a trapped timer in a PLC circuit. directly connects or interacts with another rung. starting at the output and ending at the beginning of the rung. if PB1 and LS1 both close. P ROGRAM C ODING /T RANSLATION Program coding is the process of translating a logic or relay diagram into PLC ladder program form. L1 PB1 L2 LS1 TMR1 PB1 LS1 Internal TMR1-1 TMR1-2 Instantaneous Timer Contact SOL7 Internal Trap Circuit TMR1 Internal TMR1 SOL1 (a) (b) Figure 20. is the actual logic that will implement the control of the machine or process. which is stored in the application memory. but will stop timing as soon as PB1 is released. Then.

we will present several programming examples that illustrate the modernization of relay systems.Introduction to PLC Programming and Implementation—from relay logic to PLC logic the previous stages (control task definition. Figure 21 shows a sample program code generated from logic gates and electromechanical relay diagrams (internal coil 1000 replaces the control relay). These examples will deal primarily with discrete controls. Note that the coding is a PLC representation of the logic. etc. Start PB Start PB Internal SEL CR1 SEL CR1 CR1 Internal PS Motor LS (a) LS Motor M PS (b) I/O Assignment L1 L2 Start PB 100 SEL 101 LS 102 PS 103 Program Coding PB 100 CR1 1000 CR1 1000 PS 103 LS 102 M 110 SEL 101 CR1 1000 L1 I/O Assignment L2 110 M (c) Figure 21. Industrial Text & Video Company www. The next sections examine this coding process closer and present several programming examples.industrialtext.) have been done.com 1-800-752-8398 25 . We will also present examples relating to new PLC control implementations. I/O assignment. 5 D ISCRETE I/O C ONTROL P ROGRAMMING In this section. whether it is a new application or a modernization. Translation from (a) logic gates and (b) an electromechanical relay diagram into (c) PLC program coding. The next section will explain more about analog I/O interaction and programming.

The machine’s “new” programmable controller program is actually based on the instructions and control requirements of the original hardwired system. The PLC can also accept multiplexed register I/O. I/O Module 0 1 2 3 4 5 6 Group or Slot 7 CPU I/O Point Rack 0 Figure 22. Addresses 000 through 777 octal represent input and output device connections mapped to the I/O table.industrialtext. Figure 22 illustrates this configuration. contact welding. These multiplexed modules require two slot positions and provide the enable (select) lines for the I/O devices. or groups. usually present maintenance problems. which can be placed in any slot location. each one with eight slots. The first digit of the address represents the rack number. where modules can be inserted. Switching to a PLC can improve the performance of the machine. Industrial Text & Video Company www. such as contact chatter. The PLC has eight racks (0 through 7). The PLC can accept four-channel analog input modules. discrete I/O cannot be used in the same slot. When analog I/O modules are used. and the third digit specifies the terminal connection in the slot. the second digit represents the slot. Conventional hardwired relay panels. Example PLC configuration. we will use the example of a midsized PLC capable of handling up to 512 I/O points (000 to 777 octal) to explain how to implement and configure a PLC program. Throughout this section. which house the control logic. as well as optimize its control. The I/O structure of the controller has 4 I/O points per module.Introduction to PLC Programming and Implementation—from relay logic to PLC logic CONTROL P ROGRAMMING AND PLC DESCRIPTIONS Modernization applications involve the transfer of a machine or process’s control from conventional relay logic to a programmable controller. and other electromechanical problems.com 1-800-752-8398 26 . The PLC detects whether the slot holds an input or an output.

we will use addresses 0008 through 0278 for discrete inputs and addresses 0308 through 0478 for discrete outputs.Introduction to PLC Programming and Implementation—from relay logic to PLC logic Point addresses 10008 to 27778 may be used for internal outputs. Electromechanical relay circuit. and register storage starts at register 30008 and ends at register 47778. Ladder format timers place a “T” in front of the internal output address. S IMPLE R ELAY R EPLACEMENT This relay replacement example involves the PLC implementation of the electromechanical circuit shown in Figure 23. Two types of timer and counter formats can be used—ladder format and block format—but all timers require an internal output to specify the ON-delay output. Industrial Text & Video Company www. Throughout the examples presented in this section and the next.industrialtext.com 1-800-752-8398 27 . The hardware timer TMR1 requires instantaneous contacts in the first rung. you will discover that sometimes the assignment of internals and registers is performed parallel to the programming stages. During the development of these examples. while block format timers specify the internal output address in the block’s output coil. Analog I/O will be placed in the last slot of the master rack (0) whenever possible. which are used to latch the L1 PB1 PS1 TMR1 3 sec CR1 FS1 TS1 SOL1 L2 CR1 TMR1 CR1 LS1 SOL2 CR2 TMR2 2 sec CR3 CR1 TMR2 PS2 CR3 SOL3 Figure 23.

programmed with an examine-OFF instruction. Register 4000 4001 4002 4003 Description Preset timer count for 3 sec Accumulated count timer 1001 Preset timer count for 2 sec Accumulated count timer 1002 Table 10. everywhere they occur in the program. Internal address assignment. The normally open contact LS1 connects limit switch LS1 to the PLC input interface. and the normally open LS1 reference. Therefore. Register assignment. Figure 24 illustrates the PLC program coding solution.Introduction to PLC Programming and Implementation—from relay logic to PLC logic rung.industrialtext. I/O address assignment. Table 10 presents the register assignment table.com 1-800-752-8398 28 . addresses 030 and 031 can replace the CR1 and CR2 contacts. then PB1 must be pushed for the timer’s required time preset to latch the rung. Industrial Text & Video Company www. respectively. Note that internals do not replace control relays CR1 and CR2 since the output addresses 030 and 031 corresponding to solenoids SOL1 and SOL2 are available. I/O Address Module Type Input Rack 0 0 0 0 0 0 0 0 0 0 0 0 Group 0 0 0 0 0 0 0 0 3 3 3 3 Terminal 0 1 2 3 4 5 6 7 0 1 2 3 Description PB1 PS1 FS1 TS1 LS1 PS2 — — SOL1 SOL2 SOL3 — Input Output Table 8. If the instantaneous TMR1 contacts are implemented using a PLC timedelay contact. implements the normally closed LS1 in the program. This instantaneous contact will be implemented by trapping the timer with an internal output. Tables 8 and 9 show the I/O address and internal output assignments for the electromechanical circuit’s real I/O. Device TMR1 CR1 CR2 TMR1 TMR2 CR3 Internal 1000 — — 1001 1002 1003 Description Used to trap TMR1 Same as SOL1 (030) Same as SOL2 (031) Timer TMR1 Timer TMR2 Replace CR3 Table 9.

Industrial Text & Video Company www.1 TS1 003 FS1 002 TS1 003 SOL1 030 030 SOL1 LS1 004 TMR1 SOL1 1001 030 LS1 004 SOL2 031 031 SOL2 TMR1 SOL1 1001 030 LS1 004 TMR PR 4002 20 AR 4003 TB = 0. where the auxiliary contacts of the starter seal the start push button. resulting in less wiring and fewer connections. the start and stop push buttons (inputs) and the starter coil (output) will be part of the PLC system.1 CR3 1003 TMR2 1002 PS2 005 TMR1 SOL1 1001 030 TMR2 PS2 1002 005 CR3 1003 SOL3 032 032 SOL3 Figure 24. In this circuit. these are the circled items in Figure 26. S IMPLE S TART /S TOP M OTOR C IRCUIT Figure 25 shows the wiring diagram for a three-phase motor and its corresponding three-wire control circuit.Introduction to PLC Programming and Implementation—from relay logic to PLC logic L1 PB1 000 PS1 001 FS1 002 L2 PB1 000 PS1 001 TMR Trap 1000 L1 L2 TMR Trap 1000 TMR Trap 1000 TMR1 1001 TMR PR 4000 30 AR 4001 TB = 0.com 1-800-752-8398 29 . To convert this circuit into a PLC program. PLC implementation of the circuit in Figure 23. The starter coil’s auxiliary contacts will not be part of the system because an internal will be used to seal the coil.industrialtext. first determine which control devices will be part of the PLC I/O system.

com 1-800-752-8398 30 . the devices must be programmed in the same logic sequence as they are in the hardwired circuit (see Figure 27).. output: address 030). inputs: addresses 000 and 001. To program the PLC. Therefore.industrialtext. Table 11 shows the I/O address assignment.Introduction to PLC Programming and Implementation—from relay logic to PLC logic Power L1 Start L2 L3 3 (a) M Stop Push Button Station (three-wire control) OL T1 T2 2 M T3 Motor (a) L1 Start Stop (b) L2 OL M M 2 3 Figure 25. Real inputs and outputs to the PLC. the stop push button will be programmed as an examine-ON instruction Industrial Text & Video Company www. which uses the same addressing scheme as the circuit diagram (i.e. L1 Start Stop M M 2 3 OL L2 Figure 26. (a) Wiring diagram and (b) relay control circuit for a three-phase motor.

connection from the input module goes to L2. the motor will turn OFF. I/O address assignment. The output module receives its power for switching the load from L1. which is also programmed as an examine-ON instruction. The common. Also. (a normally open PLC contact) in series with the start push button.Introduction to PLC Programming and Implementation—from relay logic to PLC logic I/O Address Module Type Input Rack 0 0 0 0 0 0 0 0 Group 0 0 0 0 3 3 3 3 Terminal 0 1 2 3 0 1 2 3 Description Stop PB (NC) Start PB — — Motor M1 — — — Output Table 11. in the motor control circuit’s wiring diagram (see Figure 29). Although the three-phase motor has a three-wire control circuit. sealing the start push button and turning the motor ON through the starter. the starter coil’s overloads are wired in series with the coil. In a PLC wiring diagram. Output terminal 030 is connected in series with the starter coil and its overloads.industrialtext. or return. which go to L2. the PLC is connected to power lines L1 and L2 (see Figure 28). L1 Stop 000 Start 001 L2 Stop Start 000 001 M 030 M 030 L1 M 030 L2 OL Figure 27. This two-wire configuration is similar to a three-wire configuration because it provides low-voltage release. which controls the starter. the PLC output module is wired directly to the starter coil. however. If the start push button is pressed. output 030 will turn ON.com 1-800-752-8398 31 . PLC implementation of the circuit in Figure 25. it does not provide low-voltage protection. Note that. its corresponding PLC control circuit has only two wires. Note that the stop push button is wired as normally closed to the input module. Referring to Industrial Text & Video Company www. This circuit will drive output 030. The field inputs are connected to L1 on one side and to the module on the other. The output module also directly connects to L2 for proper operation. If the stop push button is pressed.

Motor control circuit’s wiring diagram. PLC wiring diagram of a three-phase motor.com 1-800-752-8398 32 .industrialtext.Introduction to PLC Programming and Implementation—from relay logic to PLC logic L1 L2 L3 M F L1 Stop 000 Inputs 001 Common Power OL Outputs 030 M Common PLC L2 Start Figure 28. Industrial Text & Video Company www. L1 PLC Output 030 From L1 3 2 M L2 L3 OL To L2 T1 T2 Motor T3 Figure 29.

Introduction to PLC Programming and Implementation—from relay logic to PLC logic

Figure 29, the starter’s seal-in contacts (labeled as 3—| |—2) are not used and are shown as unconnected. If the motor is running and the overloads open, the motor will stop, but the circuit will still be ON. Once the overloads cool off and the overload contacts close, the motor will start again immediately. Depending on the application, this situation may not be desirable. For example, someone may be troubleshooting the motor stoppage and the motor may suddenly restart. Making the auxiliary contact an input and using its address to seal the start push button can avoid this situation by making the two-wire circuit act as a three-wire circuit (see Figure 30). In this configuration, if the overloads open while the motor is running, the coil will turn off and their auxiliary contacts will break the circuit in the PLC.
L1 Stop 000 Start 001 M 002 M 002 L2 Stop Start 000 001 M 030 030 L1 M L2 OL

Figure 30. Two-wire circuit configured as a three-wire circuit.

F ORWARD /R EVERSE M OTOR I NTERLOCKING
Figure 31 illustrates a hardwired forward/reverse motor circuit with electrical and push button interlockings. Figure 32 shows the simplified wiring diagram for this motor. The PLC implementation of this circuit should
L1 Stop Rev For R M1 F M1 For PL1 All OLs L2

F

M2 R

M2

Rev PL2

Figure 31. Hardwired forward/reverse motor circuit.

Industrial Text & Video Company

www.industrialtext.com

1-800-752-8398

33

Introduction to PLC Programming and Implementation—from relay logic to PLC logic

include the use of the overload contacts to monitor the occurrence of an overload condition. The auxiliary starter contacts (M1 and M2) are not required in the PLC program because the sealing circuits can be programmed using the internal contacts from the motor outputs. Low-voltage protection can be implemented using the overload contact input so that, if an overload occurs, the motor circuit will turn off. However, after the overload condition passes, the operator must push the forward or reverse push button again to restart the motor.
L1 L2 L3

1 F 3 2

2

3

1

2

3 R

F 3 2

R

OL

T2 T1 M T3

Figure 32. Forward/reverse motor wiring diagram.

For simplicity, the PLC implementation of the circuit in Figure 31 includes all of the elements in the hardwired diagram, even though the additional starter contacts (normally closed R and F in the hardwired circuit) are not required, since the push button interlocking accomplishes the same task. In the hardwired circuit, this redundant interlock is performed as a backup interlocking procedure. Figure 33 shows the field devices that will be connected to the PLC. The stop push button has address 000, while the normally open sides of the forward and reverse push buttons have addresses 001 and 002, respectively. The overload contacts are connected to the input module at address 003. The output
Industrial Text & Video Company www.industrialtext.com 1-800-752-8398 34

Introduction to PLC Programming and Implementation—from relay logic to PLC logic

L1 Stop Rev For R M1 F M1 For PL1 All OLs

L2

F

M2 R

M2

Rev PL2

Figure 33. Real inputs and outputs to the PLC.

devices—the forward and reverse starters and their respective interlocking auxiliary contacts—have addresses 030 and 032. The forward and reverse pilot light indicators have address 031 and 033, respectively. Additionally, the overload light indicators have addresses 034 and 035, indicating that the overload condition occurred during either forward or reverse motor operation. The addresses for the auxiliary contact interlocking using the R and F contacts are the output addresses of the forward and reverse starters (030 and 032). The ladder circuit that latches the overload condition (forward or reverse) must be programmed before the circuits that drive the forward and reverse starters as we will explain shortly. Otherwise, the PLC program will never recognize the overload signal because the starter will be turned off in the circuit during the same scan when the overload occurs. If the latching circuit is after the motor starter circuit, the latch will never occur because the starter contacts will be open and continuity will not exist. Table 12 shows the real I/O address assignment for this circuit. Figure 34 shows the PLC implementation, which follows the same logic as the hardwired circuit and adds additional overload contact interlockings. Note that the motor circuit also uses the overload input, which will shut down the motor. The normally closed overload contacts are programmed as normally open in the logic driving the motor starter outputs. The forward and reverse motor commands will operate normally if no overload condition exists because the overload contacts will provide continuity. However, if an overload occurs, the contacts in the PLC program will open and the motor circuit will turn OFF. The overload indicator pilot lights (OL Fault Fwd and OL Fault Rev) use latch/unlatch instructions to latch whether the overload occurred in the forward or reverse operation. Again, the latching occurs before the forward and reverse motor starter circuits, which will turn off due
Industrial Text & Video Company www.industrialtext.com 1-800-752-8398 35

Industrial Text & Video Company www.industrialtext.com 1-800-752-8398 36 .Introduction to PLC Programming and Implementation—from relay logic to PLC logic I/O Address Module Type Input Rack 0 0 0 0 0 • • • 0 0 0 0 0 0 0 0 Group 0 0 0 0 0 • • • 3 3 3 3 3 3 3 3 Terminal 0 1 2 3 4 • • • 0 1 2 3 4 5 6 7 Description Stop PB (wired NC) Forward PB (wired NO) Reverse PB (wired NO) Overload contacts Acknowledge OL/Reset PB Input Output Motor starter M1 (FWD) Forward PL1 Motor starter M2 (REV) Reverse PL2 Overload condition FWD Overload condition REV — — Output Table 12. I/O address assignment. L1 L2 OL 003 ACK OL 004 OL 003 ACK OL 004 Stop 000 000 Forward 001 Stop 000 Rev 002 Fwd 001 M1 030 Stop 000 002 OL 003 ACK OL Reset 004 M2 032 Stop 000 Fwd 001 M2 032 Rev 002 PL 033 Rev PL2 033 OL Fault Fwd 034 OL Fault Rev 035 Fwd 001 Rev 002 M1 030 OL 003 M2 032 032 M2 R PL1 031 Fwd PL1 031 Reverse M1 030 Rev 002 Fwd 001 M2 032 M2 032 M1 030 OL Fwd 034 L OL Fwd 034 U OL Rev 035 L OL Rev 035 U OL M1 003 030 030 L1 L2 Stop M Figure 34. PLC implementation of the circuit in Figure 31.

R EDUCED -V OLTAGE -S TART M OTOR C ONTROL Figure 36 illustrates the control circuit and wiring diagram of a 65% tapped. Figure 35 illustrates the motor wiring diagram of the forward/reverse motor circuit and the output connections from the PLC. Industrial Text & Video Company www. the overload indicators will remain latched. Note that the auxiliary contacts M1 and M2 are not connected. both motor starter output coils will be dropped from the circuit because the PLC’s output to both starters will be OFF.industrialtext. until the operator acknowledges the condition and resets it. An additional normally open acknowledge overload reset push button. In this wiring diagram. In this example. reduced-voltage-start motor control circuit. Forward/reverse motor wiring diagram.3 seconds.Introduction to PLC Programming and Implementation—from relay logic to PLC logic to the overload. Thus. the timer must be set to 5. which is connected to the input module. autotransformer. allows the operator to reset the overload indicators. even if the physical overloads cool off and return to their normally closed states. the instantaneous contacts from the timer in lines 2 and 3 must be trapped. both the forward and reverse coils have their returns connected to L2 and not to the overload contacts. This reducedvoltage start minimizes the inrush current at the start of the motor (lockedrotor current) to 42% of that at full speed. The overload contacts are connected to L1 on one side and to the PLC’s input module on the other (input 003). Also. In the event of an overload. L1 L2 L3 FWD L1 M1 L1 M2 L2 L1 OL To PLC Input 003 M 2 2 3 3 F REV R Figure 35.com 1-800-752-8398 37 .

Contacts from this internal replace the instantaneous timer contacts specified in the hardwired control circuit. 14. internal assignment. and 15 show the I/O assignment. If low-voltage protection is required. The devices that are not circled are implemented inside the PLC through the programming of internal instructions. Figure 37 illustrates the hardwired circuit with the real inputs and outputs circled. since the interlocking does not use the physical inputs of M1. (a) Hardwired relay circuit and (b) wiring diagram of a reduced-voltage-start motor. and S2. they must be programmed as Industrial Text & Video Company www. respectively. If the auxiliary contacts or the overloads are used as inputs. then the starter’s auxiliary contacts or the overload contacts can be programmed as described in the previous examples.com 1-800-752-8398 38 .industrialtext. This PLC circuit implementation does not provide low-voltage protection. and register assignment. Tables 13.Introduction to PLC Programming and Implementation—from relay logic to PLC logic L1 Stop 1 Start TR1 TR1 L2 OL 2 3 TR1 TR1 S1 M1 M1 4 TR1 S1 S1 S2 5 S2 6 (a) L1 S2 M1 S2 M1 S2 M1 65% S1 T1 S1 L2 T2 S1 M L3 T3 (b) Figure 36. S1. The first line of the PLC program traps the timer with internal output 1000. Figure 38 illustrates the PLC implementation of the reduced-voltagestart circuit.

Real inputs and outputs to the PLC.Introduction to PLC Programming and Implementation—from relay logic to PLC logic L1 Stop 1 Start TR1 L2 OL TR1 2 TR1 3 M1 4 S1 5 S2 6 S2 TR1 S1 M1 TR1 S1 Figure 37.3 sec (timer output is 1001) Accumulated register for timer output 1001 Table 15. time base 0.1 sec for 5. Register 4000 4001 Description Preset register value 53. Device — Timer Internal 1000 1001 Description Trap timer circuit Timer Table 14.com 1-800-752-8398 39 .industrialtext. I/O address assignment. Industrial Text & Video Company www. Register assignment. Internal address assignment. I/O Address Module Type Input Output Rack 0 0 0 0 0 Group 0 0 3 3 3 Terminal 0 1 0 1 2 Description Stop PB (NC) Start PB (NO) Motor Starter M1 S1 S2 Table 13.

If the overloads open. The diagram in Figure 39 shows an operator station used to manually control a VS drive. and forward/ reverse) will be added to the application and connected to input modules. jog/run.Introduction to PLC Programming and Implementation—from relay logic to PLC logic L1 Stop 000 L2 Stop 000 Start 001 Trap 1000 L1 L2 Trap 1000 Start 001 Trap 1000 TMR 1001 TMR PR: 4000 = 53 AR: 4001 TB = 0. stop.1 Trap 1000 TMR 1001 S1 031 M1 030 030 M1 OL Trap 1000 M1 030 TMR 1001 S1 031 031 S1 Trap 1000 M1 030 S1 031 S2 032 S2 032 032 S2 Figure 38.e.com 1-800-752-8398 40 .industrialtext. a forward/reverse direction selector. stop push button. a run/jog switch. PLC implementation of the circuit in Figure 36. start push button. The programmable controller implementation of this station will provide automatic motor speed control through an analog interface by varying the analog output voltage (0 to 10 VDC) to the drive. The PLC program will contain all of these inputs except the potentiometer. the circuit will lose continuity and M1 will turn OFF. and start and stop push buttons. The required input field devices (i. AC M OTOR D RIVE I NTERFACE A common PLC application is the speed control of AC motors with variable speed (VS) drives. Industrial Text & Video Company www. The operator station consists of a speed potentiometer (speed regulator). rather than using the operator station’s components. normally open (closed when the overloads are closed and the motor is running) and placed in series with contact 1000 in line 3 of the PLC program. and interlock the forward/reverse commands.. which will be replaced by an analog output. The PLC program will contain the logic to start.

Introduction to PLC Programming and Implementation—from relay logic to PLC logic TB-1 Speed Potentiometer Adjust 1 +12 V 2 To Speed Regulator 3 Common (Controller) Forward 4 Reverse 5 Reverse CR1 6 Start Forward Chassis Ground CR1 Run Stop 7 115 VAC Jog 8 OL OL OL 10 Field Drive 9 Spare Spare Figure 39. which are the drive’s power (L1) connection and the output interface’s L1 connection. avoiding the possibility of having different commons (L2) in the drive (the start/stop common is not the same as the controller’s common). The drive’s 115 VAC signal is used to control the motor speed so that the signal is in the same circuit as the drive. If an overload occurs. The output of the module (CR1) is connected to terminal TB-1-6. Operator station for a variable speed drive. the motor’s overload contacts are wired to terminals TB-1-9 and TB-1-10. since the common must be switched.industrialtext. The drive terminal block TB-1-8 supplies power to the PLC’s L1 connection to turn the drive ON. To activate the drive. Table 16 shows the I/O address assignment table for this example. In this configuration.com 1-800-752-8398 41 . The connection uses a contact output interface to switch the forward/reverse signal. terminal TB-1-6 must receive 115 VAC to turn ON the internal relay CR1. while Figure 40 illustrates the connection diagram from the PLC to the VS drive’s terminal block (TB-1). the drive will turn OFF Industrial Text & Video Company www.

I/O address assignment. Industrial Text & Video Company www. Adjust TB-1 1 +12 V Analog Output + 2 To Speed Regulator Analog Output – Contact Output 3 Common (Controller) 4 Forward Chassis Ground 5 Reverse CR1 6 CR1 7 115 VAC 8 115 VAC Output OLs L1 Out Output 30 10 Spare 9 Spare Drive Figure 40.com 1-800-752-8398 42 . Connection diagram from the PLC to the VS drive’s terminal block.industrialtext.Introduction to PLC Programming and Implementation—from relay logic to PLC logic I/O Address Module Type Input Rack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Group 0 0 0 0 3 3 3 3 3 3 3 3 7 7 7 7 Terminal 0 1 2 3 0 1 2 3 4 5 6 7 0 1 2 3 Description Start Stop Forward/reverse selector Run/jog selector Drive enable (L1 from drive) Output 115 VAC Output Contact Forward Reverse Analog Output Analog speed reference 0–10 VDC Table 16.

This configuration. which is used in the block transfer. The forward and reverse inputs are interlocked. the auxiliary contact from the drive. singlebreak selector switch). Industrial Text & Video Company www. Figure 42 illustrates this connection. PLC implementation of the VS drive.com 1-800-752-8398 43 . however. Note that L1 Start PB1 L2 000 Start PB1 000 Run/Jog Drive En 003 030 Fwd SEL1 002 Rev SEL1 002 Drive En 030 TB-1-8 Fwd 034 034 TB-1-4 Run* Jog SEL2 003 Rev 035 035 TB-1-5 Done XFER OUT 1000 PR 4000 Slot 7 Rack 0 Length 1 Stop PB2 001 Drive L1 En 030 030 Stop PB2 001 TB-1-6 L2 Fwd* Rev SEL1 002 TB-1-3 070 A + – TB1-2 TB1-3 *Selector switch is logic 1 (closed) in Fwd/Run position and logic 0 (open) in Rev/Jog position Figure 41. Several additional hardwired connections must be made to implement this dual control. With this switch.industrialtext. since the drive and motor will start immediately after the overloads cool off and reclose. The analog output connection simply allows the output to be enabled when the drive starts. the user can select either the automatic or manual option. does not provide low-voltage protection.e. Sometimes. the motor will run at the speed set by the analog output when the start push button is depressed. indicates the completion of the instruction. To have low-voltage protection.Introduction to PLC Programming and Implementation—from relay logic to PLC logic because the drive’s CR1 contact will not receive power from the output module. Internal 1000. The simplest and least expensive way to do this is with a selector switch (e. If the jog setting is selected. a VS drive requires the ability to run under automatic or manual control (AUTO/MAN). single-throw. must be used as an input in the PLC.g. Register 4000 holds the value in counts for the analog output to the drive. CR1 in terminal TB-1-7.. a four-pole. they are mutually exclusive). Figure 41 shows the PLC ladder program that will replace the manual operator station. so only one of them can be ON at any given time (i.. so that it seals the start/stop circuit.

stop. If the AUTO/MAN switch is set to automatic. the manual station will control the drive. the start. potentiometer.industrialtext.5 seconds.7 seconds before moving to the next bottle. VS drive with AUTO/MAN capability. we will implement a control program that detects the position of a bottle via a limit switch. C ONTINUOUS B OTTLE -F ILLING C ONTROL In this example (see Figure 43). The program will include start and stop circuits for the outfeed motor and the start of the process.Introduction to PLC Programming and Implementation—from relay logic to PLC logic –Analog Output +Analog Output TB-1 1 Adjust +12 V Manual Speed Manual Auto 2 To Speed Regulator Reverse Contact Output Forward Manual Auto Manual Auto Auto 3 Common (Controller) 4 Forward Chassis Ground 5 Reverse CR1 115 VAC Output Manual Start Run Stop Jog 6 CR1 7 115 VAC L1 Out 8 OL OL OL 10 Field 9 Spare Spare Drive Figure 42. Table 17 shows the I/O address assignment. waits 0.com 1-800-752-8398 44 . the control program will wait 0. and then fills the bottle until a photosensor detects a filled condition. if the switch is set to manual. the PLC will control the drive. respectively. run/jog. Industrial Text & Video Company www. After the bottle is filled. and forward/reverse field devices shown are from the operator station. These devices are connected to the PLC interface under the same names that are used in the control program (refer to Figure 41). while Tables 18 and 19 present the internal and register assignments. These assignments include the start and stop process signals.

7 sec delay after level detect Bottle filled. Device Timer Timer — Internal 1001 1002 1003 Description Timer for 0.com 1-800-752-8398 45 . time base 0. feed motor M1 Table 18.industrialtext. time base 0.1 sec (1002) Accumulated value for 1002 Table 19. Internal output assignment.5 sec delay after position detect Timer for 0. Register assignment. Industrial Text & Video Company www. I/O Address Module Type Input Rack 0 0 0 0 0 0 0 0 Group 0 0 0 0 3 3 3 3 Terminal 0 1 2 3 0 1 2 3 Description Start process PB1 Stop process PB2 (NC) Limit switch (position detect) Photoeye (level detect) Feed motor M1 Outfeed motor M2 (system ON) Solenoid control — Output Table 17.Introduction to PLC Programming and Implementation—from relay logic to PLC logic Fluid Solenoid Operated Control Photoeye Detector Perpendicular To Bottle Filled Bottles Fixed Rollers LS Limit Switch Feed Motor Drive M1 Outfeed Motor Drive (Always ON During Process) M2 Figure 43. timed out. Register 4000 4001 4002 4003 Description Preset value 5. I/O address assignment. Bottle-filling system.1 sec (1001) Accumulated value for 1001 Preset value 7.

L1 Start PB1 000 Stop PB2 001 LS 002 PE 003 L2 PB1 000 PB2 001 M2 031 L1 L2 030 M2 031 031 LS 002 Int3 1003 LS 002 M2 031 TMR PR 4000 50 AR 4001 TB = 0. When the bottle is in position and 0.5 seconds have elapsed. it will stop when the limit switch detects a correct bottle position. the solenoid (032) will open the filling valve and remain ON until the photoeye (PE) detects a proper level. Industrial Text & Video Company www. Once the start push button is pushed. PLC implementation of the bottle-filling application.industrialtext. then the energized internal 1003 will start the feed motor.1 TMR 1002 TMR 1002 Bottle Filled 1003 LS 002 M2 031 Bottle Filled 1003 Figure 44. The feed motor will remain ON until the limit switch detects another bottle.1 M2 031 Bottle Filled 1003 TMR 1001 M2 031 M1 030 032 M1 M2 SOL1 TMR 1001 PE 003 SOL 032 PE 003 M2 031 TMR PR 4000 70 AR 4001 TB = 0.com 1-800-752-8398 46 .7 seconds.Introduction to PLC Programming and Implementation—from relay logic to PLC logic Figure 44 illustrates the PLC ladder implementation of the bottle-filling application. The feed motor M1 will be energized once the system starts (M2 ON). the outfeed motor (output 031) will turn ON until the stop push button is pushed. The bottle will remain in position for 0.

In the PLC software. and 3. Furthermore. which is energized only when the master start push button is pushed (PB1). The field devices to be used will remain the same.. as well as the internals. etc. This will keep all emergency stop conditions independent of the controller. OFF-delay timers. performs a function similar to a hardwired MCR. as well as timers and interlocks from control relays. Figure 46 illustrates these hardwired elements.industrialtext. if the MCR is energized. such as LS4 and SS3. should also be left hardwired. An initial review of the relay ladder diagram indicates that certain portions of the logic should be left hardwired—lines 1. timers. its contacts will close. The hydraulic pump motor (M1). Tables 20 and 21 present the assignment and description of the inputs and outputs. instantaneous contacts from timers.com 1-800-752-8398 47 . the PLC will energize the fault coil. interlocks. the diagram shows only part of the total relay ladder logic. have only one connection to the controller. This ladder program illustrates several special coding techniques that must be used to implement the PLC logic. The benefits of modernizing the control of this machine are: • • • • a more reliable control system less energy consumption less space required for the control panel a flexible system that can accommodate future expansion Figure 45 illustrates the relay ladder diagram that presently controls the logic sequence for this particular machine. and the separation of rungs with multiple outputs.).g. Continuing the example. Referring to the relay logic diagram in Figure 45. We will assign internal output addresses to all control relays. thus closing PLC Fault Contact 1 and opening PLC Fault Contact 2. we can now start assigning the real inputs and outputs to the I/O assignment document. specified through the program software. Figure 47 shows the PLC program coding (hardwired relay translation) for this example. Note that the safety control relay (SCR) will provide power to the rest of the system if M1 is operating properly and no emergency push button is depressed. allowing power to flow to the rest of the system. the internal MCR Industrial Text & Video Company www. Note that inputs with multiple contacts. An MCR internal output. the PLC fault contact can be placed in series with the emergency push buttons and also connected to a PLC failure alarm. During proper operation. For the sake of simplicity.Introduction to PLC Programming and Implementation—from relay logic to PLC logic L ARGE R ELAY S YSTEM M ODERNIZATION This example presents the modernization of a machine control system that will be changed from hardwired relay logic to PLC programmed logic. control relays. Among these techniques are the software MCR function. with the exception of those that the controller can implement (e. 2.

industrialtext.Introduction to PLC Programming and Implementation—from relay logic to PLC logic M1 OL1 1M 1M 1M L1 L2 L3 1FU 2FU 3FU H1 L1 4FU 1 X1 PB1 Master Start PB2 Master Stop X2 PB3 Emergency Stop 1 X3 PB4 Emergency Stop 2 H2 H3 H4 OL1 OL2 M2 OL2 2M 2M 2M L2 SCR1 OL1 OL1 M1 M1 SCR1-1 PL1 G SCR1-2 PB5 Setup PB6 Reset CR1 2 3 4 CR1-1 5 CR1-2 6 TDR1 7 PL2 8 9 10 MCR SS1 Enable Off On SS2 SEL1 SEL2 11 12 CR2-1 13 14 CR4-1 15 TDR2-1 16 TDR2-2 17 PL5 18 LS4 19 20 21 22 23 24 LS7 25 26 G TDR3-3 Main SS3 Back-Up LS6 PB7 Unload TDR3-1 TDR3-2 SOL3 PL7 SOL4 PL8 M2 PL6 G TDR3 G LS4 LS5 CR3-1 SOL2 PB6 Start Cycle CR4 TDR2 LS1 LS2 LS3 R SOL1 R CR2 PL3 R CR3 PL4 MCR PS1 Hyd Pres TDR1 G Figure 45.com 1-800-752-8398 48 . Industrial Text & Video Company www. Electromechanical relay diagram.

Introduction to PLC Programming and Implementation—from relay logic to PLC logic H1 H2 H3 H4 L1 4FU PB1 Master Start X1 X2 X3 SCR1 L2 PB2 PB3 PB4 Master Emergency Emergency PLC Fault Stop Stop 1 Stop 2 Contact 1 OL1 OL1 M1 M1 SCR1-2 PLC Fault Contact 2 PLC Fail Alarm PL1 G PLC SCR1-1 Figure 46. I/O address assignment.com 1-800-752-8398 49 . I/O Address Module Type Input Rack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Group 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 3 3 3 3 3 3 3 3 4 4 4 4 Terminal 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 Description PB5—Setup PB PB6—Reset (wired NC) PS1—Hydraulic pressure switch SS1—Enable selector switch (NC contact left unconnected) SEL1—Select 1 position SEL2—Select 2 position LS1—Limit switch up (position 1) LS2—Limit switch up (position 2) LS3—Location set PB6—Start load cycle LS4—Trap (wired NC) LS5—Position switch PB7—Unload PB SS3—Main/backup (wired NO) LS6—Maximum length detect LS7—Minimum length backup PL2—Setup OK PL3—Select 1 PL4—Select 2 SOL1—Advance forward SOL2—Engage PL5—Engage ON M2—Run motor PL6—Motor run ON SOL3—Fast stop PL7—Fast stop ON SOL4—Unload with backup PL8—Backup ON Input Input Input Output Output Output Table 20. Industrial Text & Video Company www.industrialtext. Elements of the moderization example system to be left hardwired.

an internal coil is used as a substitute for an instantaneous contact. The limit switch LS4 has two contacts—a normally open one and a normally closed one in lines 17 and 19. as explained in the previous sections. This technique can be used whenever a control relay is in parallel with a real output device. The normally closed inputs that are connected to the input modules are programmed as normally open. of Figure 45. Although the normally open contact is not connected to the controller. we do not need to separate the coils in lines 17 and 18 of the hardwired logic. Moreover. MCR1700 is the first available address for MCRs). This arrangement requires special PLC implementation.Introduction to PLC Programming and Implementation—from relay logic to PLC logic Device CR1 TDR1 MCR CR2 CR3 CR4 — TDR2 — TDR3 Internal 1000 2000 MCR1700 — — — 1001 2001 1002 2002 Description CR1 (Setup Rdy) Timer preset 10 sec register 3000 (accumulated register 3001) First MCR address Same as PL3 address Same as PL4 address Same as SOL1 To set up internal for instantaneous contact of TDR2 Timer preset 5 sec register 4002 (accumulated register 4003) To set up internal for instantaneous contact of TDR3 Timer preset 12 sec register 4004 (accumulated register 4005) Table 21. In most PLCs. In this example. An instantaneous contact is one that opens or closes when the timer is enabled. Line 15 in the hardwired logic shows that. the PLC will not execute the ladder logic that is fenced between the MCR coil and the END MCR instruction. the 50 Industrial Text & Video Company www. If we use software timer contacts. If the MCR coil is not energized. we have selected the normally closed contact LS4.industrialtext. This has already been done. if PB6 is pressed and CR4 is closed. Applications such as this one also require timers with instantaneous contacts. only one set of contacts needs to be connected to the controller. Internal address assignment.com 1-800-752-8398 . since the PLC used here does not allow rungs with multiple outputs. which are not available in most PLCs. Using separate rungs for each output is always a good practice. the timer TDR2 will start timing and contact TDR2-1 will seal PB6. An internal will not replace the control relay CR2 in line 9 since the PL3 contacts in line 10 can be used instead. respectively. 1700 accomplishes this same function (for this example. However. its hardwired function can still be achieved by programming LS4 as a normally closed ladder contact.

industrialtext. Industrial Text & Video Company www.com 1-800-752-8398 51 . PLC implementation of the circuit in Figure 45.Introduction to PLC Programming and Implementation—from relay logic to PLC logic Inputs L1 PB5 000 PB6* 001 PS1 002 3 TDR1 2000 SS1 OFF ON 003 SEL1 004 SS2 SEL2 005 LS1 006 LS2 007 LS3 PB6 010 011 LS4 012 LS5 013 13 12 SOL2 034 10 11 9 8 SOL1 033 7 PL3 031 6 5 4 TDR1 2000 2 1 CR1 1000 L2 PB5 000 Program Coding L1 PB6 001 CR1-Setup Ready 1000 Outputs L2 CR1 PS1 1000 002 TDR1 2000 MCR 1700 PL2 030 030 PL3 031 031 PL4 032 032 LS1 006 LS2 007 PB6 011 Trap TDR2 1001 LS3 010 SOL1 033 033 Trap TDR2 1001 FU SOL1 PL2 SS1 SEL1 003 004 SS1 SEL2 003 005 PL3 PL4 Trap TDR2 1001 TDR2 LS4 2001 012 LS5 013 PL4 032 TDR2 2001 SOL2 034 034 PL5 035 035 M2 036 036 PL6 037 037 PB7 014 Trap TDR3 1002 Trap TDR3 1002 PL5 FU SOL2 TDR2 LS4 2001 012 14 M2 036 15 PB7 014 SS3 015 LS6 016 LS7* 017 20 SS3 015 21 SOL4 042 22 *Wired NC Programmed NO END MCR 1700 LS7 TDR3 017 2002 19 SOL3 040 16 Trap TDR3 17 1002 18 SS3 015 TDR2 LS4 2001 012 FU M2 PL6 TDR3 2002 SOL3 040 040 PL7 041 041 SOL4 042 042 PL8 043 043 PL8 FU SOL4 PL7 LS6 TDR3 016 2002 FU SOL3 Figure 47.

industrialtext. Lines 9. To solve this problem.com 1-800-752-8398 52 . the timer will reset because PB6 is not sealed. 10. Industrial Text & Video Company www. we can use internal coil 1001 to seal PB6 and start timing timer 2001 (TDR2).Introduction to PLC Programming and Implementation—from relay logic to PLC logic timer will not seal until it has timed out. and 11 of the PLC program coding show this technique. The time delay contacts (2001) are used for ON delays. If PB6 is released.

industrialtext.Introduction to PLC Programming and Implementation— from relay logic to PLC logic PLC Skills • Review • Reinforce • Test • Sharpen Study Guide and Review Questions Industrial Text & Video Company www.com 1-800-752-8398 .

• Three important documents that provide information about the arrangement of the PLC system are the I/O assignment table. . and descriptions of the real inputs and outputs. the internal address assignment table. if a normally closed input device is required to act as a normally closed input. fenced MCR circuits. • Logic gates or contact symbology are used to implement the logic sequences in a control program. .The programming of contacts as normally open or normally closed depends on how they are required to operate in the logic program. timers. • The second step in control program development is to determine a control strategy.The I/O assignment table documents the names. In most cases. Inputs and outputs marked with an “X” on a logic gate diagram represent real I/O. and complicated logic rungs. as well as defines the sequence of the process. instantaneous timer contacts.The register address assignment table lists all of the available PLC registers. analyzes. A flowchart is a pictorial representation of the process that records. and the register address assignment table. • Certain parts of the system should be left hardwired for safety reasons. and MCRs. its reference address is programmed as normally open. counters.Introduction to PLC Programming and Implementation—from relay logic to PLC logic STUDY GUIDE • The first step in developing a control program is the definition of the control task. circuits that allow bidirectional power flow. registers.industrialtext. • Special cases of input device programming include the program translation of normally closed input devices. and communicates information. Industrial Text & Video Company www. Approach guidelines apply to two major types of projects: new applications and modernizations of existing equipment. . • Flowcharting can be used to plan a program after a written description has been developed. the sequence of processing steps that must occur within a program to produce the desired output control.The internal address assignment table records the locations and descriptions of internal outputs. This is also known as the development of an algorithm.com 1-800-752-8398 54 . Elements such as emergency stops and master start push buttons should be left hardwired so that the system can be disabled without PLC intervention. • A set of guidelines should be followed during program organization and implementation in order to develop an organized system. The control task specifies what needs to be done and is defined by those who are involved in the operation of the machine or process. locations. .

therefore. System operation for new applications usually begins with: a–sample diagrams b–specifications c–the control strategy d–logic diagrams 6 7 A(n) __________________ is a graphical representation of a solution’s algorithm. In a PLC program. an END MCR instruction must be placed after the last rung an MCR will control. an internal output must be used to trap a timer that requires these contacts. less space utilization. . .industrialtext.PLCs do not allow bidirectional power flow. . REVIEW QUESTIONS 1 What is the first step in designing an effective PLC control system? a–approach the system in a systematic manner b–flowchart the process c–define the control task d–define the control strategy 2 A(n) __________________ is a procedure that uses a finite number of steps to achieve a desired outcome. List four guidelines that are recommended as an approach to modernizing a control system. • The benefits of modernizing a relay control system include greater reliability. an existing __________________ often defines the sequence of events in the control program. and greater flexibility.Complicated logic rungs should be isolated from the other rungs during programming.Introduction to PLC Programming and Implementation—from relay logic to PLC logic .PLCs do not provide instantaneous contacts.com 1-800-752-8398 55 . less energy consumption.Master control relays turn ON and OFF power to certain logic rungs. In a modernization project. • Program coding is the process of translating a logic or relay diagram into PLC ladder program form. so all PLC rungs must be programmed to operate only in a forward path. Logic sequences for a control program can be created using: a–logic gates b–relay ladder symbology c–PLC contact symbology d–all of the above 3 4 5 Industrial Text & Video Company www.

PL1 Switch Start PB SOL1 LS1 Figure 2. Circuit for problem 8.com 1-800-752-8398 56 . Only real inputs and outputs are documented during address assignment. The I/O address assignment table should closely follow the __________________. or __________________. Start Stop LS1 M1 M1 LS2 PS1 Figure 1. I/O address assignments are typically represented in one of three number systems: __________________. there are eight modules per rack. the master rack is numbered 0. 10 True/False. __________________.industrialtext. Logic gates for problem 9. 9 Draw the equivalent contact symbology diagram for the logic gates shown in Figure 2.Introduction to PLC Programming and Implementation—from relay logic to PLC logic 8 Draw the equivalent logic gate diagram for the circuit shown in Figure 1. and the number system is octal: 11 12 13 (a) circle all real inputs and outputs (b) assign the I/O addresses (c) draw the I/O connection diagram Industrial Text & Video Company www. Using the circuit shown in Figure 3 and assuming that the PLC has a modularity of 8 points per module.

Industrial Text & Video Company www.Introduction to PLC Programming and Implementation—from relay logic to PLC logic L1 PB14 LS7 CR1 PL3 L2 CR1 SEL PS7 CR1 SOL3 UP CR2 SOL4 FWD LS8 Start LS9 CR2 Reset CR2 SOL5 DWN LS8 CR3 CR3 PL4 Figure 3.industrialtext. Normally closed input devices are always programmed normally open. 15 16 17 18 True/False.com 1-800-752-8398 57 . 14 The principle reason for leaving certain portions of the control circuit hardwired is to: a–minimize wiring b–avoid failure of main magnetic elements c–ensure safety d–keep some devices running at all times The PLC fault contacts are wired to other hardwired emergency circuit elements: a–in parallel b–in series c–normally open d–normally closed The main reason the PLC fault contacts are included in the hardwired circuit is: a–to prevent system shut down b–to detect I/O failures c–to include the PLC as an emergency stop condition d–to shut down the system if there is a PLC failure Describe the purpose and operation of a safety control relay (SCR). Circuit for problem 13.

and internals at address 1008: (a) assign the I/O addresses (b) draw the equivalent PLC ladder diagram 21 22 True/False. an END MCR instruction must be used to fence the area controlled by a master control relay. Circuit for problem 19.industrialtext. 20 Using the circuit shown in Figure 5 and starting inputs at address 108.com 1-800-752-8398 58 Industrial Text & Video Company . In a PLC ladder program.Introduction to PLC Programming and Implementation—from relay logic to PLC logic 19 What is the purpose of the normally closed PLC fault contacts in the circuit in Figure 4 and describe what will happen if the PLC fails? Coolant Pump Motor M3 OLs Disconnect Fuses Swich 1M Hydraulic Pump Motor M2 OLs 2M Spindle Motor M1 OLs 3M L1 F1 Stop M2 M3 Start PLC Fault Contact 1 L2 M2 M3 SCR PL1 OLs OLs PLC Fault Contact 2 PLC Fail Alarm PLC SCR Figure 4. outputs at address 508. What element can be used to trap timers in a PLC control program? a–a reset instruction b–a start push button c–a pilot light d–an internal output www.

Assuming that inputs use addresses 000–027. timers start at address 2008. outputs use addresses 030–047. and an internal output is used to trap the instantaneous timer contacts.Introduction to PLC Programming and Implementation—from relay logic to PLC logic SS3 LS14 PS1 CR10 CR10 SS4 CR10 SOL7 S4 LS15 Figure 5. 23 Explain why the hardwired circuit in Figure 6 must be reconfigured when it is translated into a PLC ladder diagram. Circuit for problem 23.industrialtext. L1 LS1 1 SOL1 SEL1 2 PB1 3 PB2 4 PB3 M1 CR1 CR1 L2 SOL2 Figure 6. 24 Program _____________________ is the process of translating logic or relay contact diagrams into PLC ladder form. Circuit for problem 20.com 1-800-752-8398 59 . internals start at address 1008. use the circuit shown in Figure 7 to: 25 (a) assign the internal addresses (b) assign the I/O addresses (c) draw the I/O connection diagram Industrial Text & Video Company www.

Circuit for problem 25.com 1-800-752-8398 60 . 26 Given that the stop push button will be wired as normally open.Introduction to PLC Programming and Implementation—from relay logic to PLC logic L1 PB1 PS1 TMR1 3 sec TMR1 FS1 TS1 SOL1 L2 CR1 TMR1 CR1 LS1 SOL2 CR2 TMR2 2 sec CR3 CR1 TMR2 PS2 CR3 SOL3 Figure 7. Industrial Text & Video Company www. use the circuit in Figure 8 to: (a) assign the I/O addresses (b) draw the I/O connection diagram L1 Stop Rev For R M1 F M1 For PL1 All OLs L2 F M2 R M2 Rev PL2 Figure 8. Circuit for problem 26.industrialtext.

L1 Stop 1 TR1 2 3 M1 4 S1 5 S2 6 S2 TR1 TR1 S1 M1 Start TR1 L2 OL TR1 S1 Figure 9. What input field devices are required for the PLC implementation of this station? TB-1 Adjust Speed Potentiometer 1 +12 V 2 To Speed Regulator 3 Common (Controller) Forward 4 Reverse 5 Reverse CR1 6 Forward Chassis Ground Start CR1 Run 7 115 VAC Stop Jog 8 OL OL OL 10 Field Drive 9 Spare Spare Figure 10.Introduction to PLC Programming and Implementation—from relay logic to PLC logic 27 Circle the locations where timer traps will be used in the PLC implementation of the circuit in Figure 9. Variable speed drive. Circuit for problem 27. Industrial Text & Video Company www. 28 Figure 10 shows a variable speed drive that is manually controlled by an operator station.industrialtext.com 1-800-752-8398 61 .

Industrial Text & Video Company www. MCRs should have addresses 2000–2037. Using this large relay circuit: (a) indicate the portions to be left hardwired (b) assign the I/O addresses (c) assign the internal addresses (d) draw the I/O connection diagram Coolant Pump Motor M3 OLs Disconnect Fuses Swich M3 Hydraulic Pump Motor M2 OLs M2 Spindle Motor M1 OLs M1 L1 F1 Stop M2 M3 Start PLC Fault Contact 1 M2 M3 SCR SCR Setup/Run L2 OLs OLs PL1 Run M1 OLs 1 CR1 2 CR2 3 4 5 PL2 6 Master ON Enable MCR Master Control Relay Up LS1 CR1 CR2 CR1 (continued on next page) Figure 11. and timers should have addresses 2040–2137.industrialtext. Large relay circuit. Inputs should start at address 0008 and outputs should start at address 0308. Internals should have addresses 1000–1777. The PLC system has capacity for 512 I/O (000 to 777 octal).com 1-800-752-8398 62 .Introduction to PLC Programming and Implementation—from relay logic to PLC logic 29 The PLC implementation of the large relay circuit in Figure 11 should include a normally open PLC fault contact and use internals to trap the timers.

industrialtext. Industrial Text & Video Company www.Introduction to PLC Programming and Implementation—from relay logic to PLC logic Up CR1 7 CR4 8 9 CR3 10 LS3 CR4 12 PL4 13 Feed LS4 14 SOL3 15 CR3 16 CR4 17 CR1 18 5 seconds CR2 19 LS5 TDR1 CR5 SOL4 Fast SOL Feed SOL CR4 CR5 Setup ON Setup PL3 Dn ON TDR1 CR3 SOL2 SOL Dn MCR LS2 CR3 TDR1 SOL1 SOL Up CR3 Up 11 Figure 11 continued.com 1-800-752-8398 63 .

ntroduction to PLC Programming and Implementation—from relay logic to PLC logic ANSWERS 1 2 3 c–define the control task algorithm Guidelines for modernizing a control system include: 4 5 6 7 8 understanding the actual process or machine function reviewing the machine logic and optimizing it when possible assigning real I/O addresses and internal addresses to inputs and outputs translating relay ladder diagrams into PLC coding relay ladder diagram b–specifications flowchart d–all of the above Start Stop LS2 LS1 PS1 M1 9 Switch SOL1 PL1 Start PL1 LS1 SOL1 10 11 12 false. hexadecimal I/O connection diagram Industrial Text & Video Company www.com 1-800-752-8398 64 .industrialtext. decimal. internal outputs are also documented during address assignment octal.

(b) I/O Address Module Type Input Rack 0 0 0 0 0 0 0 0 0 • • • Group 0 0 0 0 0 0 0 0 1 • • • Terminal 0 1 2 3 4 5 6 7 0 • • • Description PB14 LS7 PS7 SEL LS8 LS9 Start PB Reset PB Not used Spare 0 Output 0 0 0 0 0 0 0 0 1 2 2 2 2 2 2 2 2 7 0 1 2 3 4 5 6 7 PL3 SOL3 Up SOL4 Forward SOL5 Down PL4 — — — Industrial Text & Video Company www.Introduction to PLC Programming and Implementation—from relay logic to PLC logic 13 (a) L1 PB14 LS7 CR1 PL3 L2 CR1 SEL PS7 CR1 SOL3 UP CR2 SOL4 FWD LS8 * Start LS9 CR2 Reset CR2 SOL5 DWN LS8 CR3 CR3 PL4 *LS8–only N. it is programmed as N. is connected to PLC.com 1-800-752-8398 65 .industrialtext.O.C.

false. the normally open PLC fault contacts will not close to provide power to the connected devices. opening its SCR contact to stop the flow of power to the connected devices. 18 19 Industrial Text & Video Company www. however. sounding the PLC failure alarm. the PLC fault coil will not energize. Instead. If the PLC fails. the normally closed PLC fault contacts will remain closed.ntroduction to PLC Programming and Implementation—from relay logic to PLC logic (c) L1 PB14 Inputs L2 L1 Outputs L2 Input 000 Output 020 PL3 LS7 001 PS7 002 Program Coding 022 021 SOL3 SOL4 SEL 003 LS8 004 LS9 005 Start 006 Reset 007 SOL5 023 PL4 024 025 026 027 14 15 16 17 c–ensure safety b–in series d–to shut down the system if there is a PLC failure A safety control relay is used to remove power from the I/O modules during a system error. most of the time a normally closed input device is programmed as normally open.industrialtext.com 1-800-752-8398 66 . Therefore. the safety control relay will turn off. When a malfunction occurs. the programming of the input will depend on its function in the program The normally closed PLC fault contacts are used to energize the PLC failure alarm.

A PLC will only allow power to flow in a forward path. the circuit would have to be reconfigured so that the CR1 contacts are included in both lines 2 and 4.industrialtext.com 1-800-752-8398 67 . if the reverse path from line 4 to line 2 is meant to be followed.Introduction to PLC Programming and Implementation—from relay logic to PLC logic 20 (a) Module Type Input Rack 0 0 0 0 0 0 0 0 0 • • • I/O Address Group 1 1 1 1 1 1 1 1 5 • • • Terminal 0 1 2 3 4 5 6 7 0 • • • Description LS14 SS3 PS1 S4 LS15 SS4 — — SOL7 CR10 Output Internal 1 0 0 (b) 010 011 012 100 100 100 015 050 013 014 21 22 23 true d–an internal output There is a possibility of bidirectional power flow through the normally closed contact CR1 in line 3. Therefore. coding 24 25 (a) Device TMR1 CR1 CR2 CR3 TMR1 TMR2 Internal 100 — — 101 200 201 Description Used to trap TMR1 Same as SOL1 Same as SOL2 Replace CR3 Timer 1 Timer 2 Industrial Text & Video Company www.

com 1-800-752-8398 68 .ntroduction to PLC Programming and Implementation—from relay logic to PLC logic (b) I/O Address Module Type Input Rack 0 0 0 0 0 0 0 0 0 0 0 • • • Group 0 0 0 0 0 0 0 0 3 3 3 • • • Terminal 0 1 2 3 4 5 6 7 0 1 2 • • • Description PB1 PS1 FS1 TS1 LS1 PS2 — — SOL1 SOL2 SOL3 Output (c) L1 PB1 000 PS1 001 FS1 002 PV3 TB 1 sec TS1 003 200 004 200 030 004 T201 PV2 TB1 PS2 005 201 005 101 032 032 SOL3 200 030 101 030 004 031 031 002 003 030 030 SOL2 SOL1 100 T200 100 L2 000 001 100 L1 L2 LS1 Industrial Text & Video Company www.industrialtext.

com 1-800-752-8398 69 .industrialtext.Introduction to PLC Programming and Implementation—from relay logic to PLC logic 26 (a) I/O Address Module Type Input Rack 0 0 0 0 0 • • • 0 0 0 0 Group 0 0 0 0 0 • • • 3 3 3 3 Terminal 0 1 2 3 4 • • • 0 1 2 3 Description Stop PB (wired NC) Forward PB (wired NO) Reverse PB (wired NO) Overload contacts Acknowledge OL/Reset PB Input Output Motor starter M1 (FWD) Forward PL1 Motor starter M2 (REV) Reverse PL2 (b) L1 Stop 000 Reverse 000 001 Forward 002 000 002 001 032 000 002 001 032 033 Rev PL2 033 030 032 032 M2 OL2 R 030 001 030 002 031 Fwd PL1 031 L2 000 001 002 032 030 030 L1 M L2 OL1 Industrial Text & Video Company www.

and forward/reverse selector switch. The speed potentiometer will be replaced by an analog output in the PLC implementation.ntroduction to PLC Programming and Implementation—from relay logic to PLC logic 27 L1 Stop 1 TR1 2 TR1 3 M1 4 S1 5 S2 6 S2 TR1 S1 M1 Start TR1 L2 OL TR1 S1 28 The field input devices are the start push button.com 1-800-752-8398 70 .industrialtext. jog/run selector switch. stop push button. 29 (a) Coolant Pump Motor M3 OLs Disconnect Fuses Swich 1M Hydraulic Pump Motor M2 OLs 2M Spindle Motor M1 OLs 3M L1 F1 Stop M2 M3 Start PLC Fault Contact 1 L2 M2 M3 SCR PL1 OLs OLs PLC Fault Contact 2 PLC Fail Alarm PLC SCR Industrial Text & Video Company www.

industrialtext.com 1-800-752-8398 71 .Introduction to PLC Programming and Implementation—from relay logic to PLC logic (b) I/O Address Module Type Input Rack 0 0 0 0 0 0 0 0 0 0 • • • Group 0 0 0 0 0 0 0 0 1 1 • • • Terminal 0 1 2 3 4 5 6 7 0 1 • • • Description Setup/Run Run PB Up LS1 Enable SS Up PB LS2 LS3 Feed LS4 LS5 Not used • • • Input Input 0 Output 0 0 0 0 0 0 0 0 1 3 3 3 3 3 3 3 3 7 0 1 2 3 4 5 6 7 M1 Starter PL2 Master On SOL1 Up SOL2 Down PL3 Down On PL4 Setup On SOL3 Feed SOL Fast Feed Output (c) Device CR1 CR2 MCR CR3 CR4 CR5 — TDR1 MCR — Internal — 1000 MCR 2000 1001 — — 1002 T 2040 END 2000 1003 Description Same as M1 Replace CR2 First MCR address—replace MCR Replace CR3 Same as PL4 Same as SOL3 Trap timer First timer address—replace TDR1 END MCR logic section Same as SOL1 in MCR fence Industrial Text & Video Company www.

ntroduction to PLC Programming and Implementation—from relay logic to PLC logic (d) L1 Setup/Run Run 000 030 001 1000 LS1 Up* 002 Enable 003 003 Up 004 LS5 005 LS6 006 006 033 034 End 2000 000 1003 000 1003 000 007 007 1001 035 LS5 030 010 1000 1002 *Wired NC Programmed NO T2040 010 1002 036 037 037 035 035 036 036 PL4 Setup ON 035 LS4 SOL3 Feed SOL4 Fast Feed 004 035 004 035 1001 2040 032 032 SOL1 Up 030 1001 PL3 Down ON 034 004 1001 1002 1001 033 033 004 005 002 031 1003 SOL2 Down 000 003 002 030 1000 MCR 2000 PL2 Master ON 031 L2 000 001 030 030 L1 M1 OLs L2 Industrial Text & Video Company www.com 1-800-752-8398 72 .industrialtext.

Sign up to vote on this title
UsefulNot useful