PLC Programming With RSLogix 500_shared
Full text
(2) PLC Programming with RSLogix 500. How to Program an Allen-Bradley PLC with Rockwell Automation’s RSLogix 500 By Jack Rindell. Industrial Automation Series engineer-and-technician.com. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com.
(3) Table of Contents Introduction!......................................................................................1 PLCs!...............................................................................................2 Hardware!.........................................................................................3 SLC Rack!........................................................................................3 SLC Power Supply !..........................................................................3 SLC Processors!..............................................................................3 SLC I/O Modules!.............................................................................4 MicroLogix 1000!..............................................................................4 MicroLogix 1200!..............................................................................4 MicroLogix 1500!..............................................................................4 Ladder Logic!....................................................................................5 The Dialect of PLCs!........................................................................5 Equivalent Logic!..............................................................................9 Scan Time!.......................................................................................10 Project Scope!..................................................................................11 Summarizing the Scope!..................................................................17 Which PLC?!....................................................................................18 Lay Out The I/O!..............................................................................18 Laying Out The Modules In The Rack!.............................................20 Assigning I/O Addresses!.................................................................21 Analog Inputs!..................................................................................21 Digital Inputs!...................................................................................22 Digital Outputs!................................................................................23 Installing RSLogix!...........................................................................24 Installing RSLogix 500!....................................................................24 Running RSLogix!............................................................................25 Configuring Colors, Fonts and Address Display !.............................31 Adding Descriptors To Your I/O!.......................................................31 Writing the Program!........................................................................34 Setting Up An Overall Control Rung!...............................................34 Starting a Batch Cycle!....................................................................37 Batching Steps!................................................................................42 Step 1 – Adding City Water!.............................................................42 Analog Inputs!..................................................................................45 Setting up an SCP to calculate Tank Weight!...................................48 Setting Up An SCP To Calculate Tank Level!...................................50 Back to Batching – Step 1!...............................................................51 Step 2 – Adding Chemical KM!........................................................54 Step 3 – Adding Chemical KM!........................................................58 Step 4 – Blending!............................................................................59 Step 5 – Pump to Filling Lines!........................................................64 Faults!..............................................................................................66 PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com.
(4) Valve Position Faults!.......................................................................66 Console Status Indicators – Pilot Lights!.........................................75 Adding Rung Comments!.................................................................79 Expanding the Data tables!..............................................................83 Connecting To The SLC And Going Online!.....................................87 Run Mode!.......................................................................................100 Editing in Run Mode!........................................................................108 A Final Note About Our Program!.....................................................116 How Do I . . . ?!................................................................................117 Tips, Shortcuts and Warnings!.........................................................119 Conclusion!......................................................................................124 Index!...............................................................................................126. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com.
(5) Introduction The purpose of this book is to teach you how to set up, program and use an Allen-Bradley SLC 500 PLC. It will tell you what parts you need to buy for a common application. It will tell you how to install RSLogix, how to write a ladder logic program, how to configure your computer and your SLC so that you can download your ladder logic program. There is a sample project included that contains a Project Scope. The Project Scope (or Functional Specification, or whatever your company might call it) defines in detail how the system is to operate when the project is finished. You will learn how to take a Project Scope and turn it into a working PLC program. It will show you, step by step, how to go online with your SLC to monitor your program to verify your ladder logic and make sure it is functioning properly. It will show you how to make changes to your program while you are online. It will show you the keystrokes and mouse movements that you need to know to use RSLogix. Finally, it provides a number of tips and a Frequently Ask Questions section that will save you hours of frustration. This book assumes you have a little background with PLCs – perhaps you have worked with other PLCs from other manufacturers or you have helped to install and wire PLCs. Perhaps you are a Mechanical or Process Engineer and you need to learn how to use RSLogix. If you need a more thorough understanding of basic PLC concepts, you might want to try the Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller). This ebook, along with the online tutorial, provides an example of how to automate a drill press, while explaining all the basic concepts of PLC programming that are necessary to write a solid PLC program. The Beginner’s Guide to PLC Programming works well in conjunction with this book, in that it concentrates on basic PLC programming methods that are common to all types of PLCs. In addition, it provides an example of machine operation, whereas PLC Programming with RSLogix 500 uses the example of a chemical batching process. Go to engineer-and-technician.com if you would like to learn more about this book.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 1.
(6) PLCs Nearly all the industrial equipment that you find in a modern manufacturing facility shares one thing in common - computer control. The most commonly used controller is the PLC, or the Programmable Logic Controller, using a programming language called Ladder Logic. The language was developed to make programming easy for people who already understood how switches, relay contacts and coils work. Its format is similar to the electrical style of drawing known as the “ladder diagram”. The most popular and most widely used manufacturer of PLCs is Rockwell Automation, who produces the Allen-Bradley MicroLogix and SLC series of PLCs. The MicroLogix and SLC families of processors and I/O modules are all programmed using Rockwell’s proprietary software known as RSLogix. In the book, we will concentrate specifically on the SLCs, MicroLogix PLCs and RSLogix. We won’t talk about other manufacturers or other Rockwell software, as RSLogix will (and currently does) perform nearly all the programming requirements of a plant’s automation system. When you are finished with this book, you will be able to sit down in front of any computer running RSLogix and create a new program. You will be able to edit existing programs. You will be able to professionally document any changes you have made. Rockwell Automation Technical Support Unfortunately, we can’t anticipate all the problems you might face as you are troubleshooting a program on the factory floor. There are just too many variables. This is why you must establish a relationship with your local Rockwell Automation technical support team. Get to know them before you are in the final stages of a start-up and you run into a problem. They are very helpful and they can save you hours of frustration. The Rockwell reps are not just technical support personnel; they are skilled engineers that are responsible for running their own projects and writing and troubleshooting their own programs. If you run into a problem, more than likely they have already seen it and have come up with a solution.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 2.
(7) Hardware One of the nice things about Allen-Bradley’s smaller PLCs is the relative simplicity of assembling the hardware to create a system. First, let’s see what it takes to assemble an SLC 500 system. You only need to have a few components: a rack, a power supply, a processor and some I/O modules.. SLC Rack These come in four configurations, with varying capacity for installing the I/O modules. 1746-A4 1746-A7 1746-A10 1746-A13. 4-Slot chassis 7-Slot chassis 10-Slot chassis 13-Slot chassis. A rack is a frame that holds the modules of an SLC 500 system. It is similar to the motherboard and case in your personal computer. It provides a physical structure to hold the modules that create a system, like your computer’s case. It also provides an electronic back plane that allows modules to communicate and interact. In an SLC system, the SLC 500 processor always resides in Slot 0, which is the first slot.. SLC Power Supply Power supplies come in varying capacities. 1746-P1 1746-P2 1746-P3 1746-P4 1746-P5 1746-P7. SLC Processors There are five SLC 500 processors available: SLC 5/01 SLC 5/02 SLC 5/03 SLC 5/04 SLC 5/05 PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 3.
(8) The 5/01 is the most basic processor, with each succeeding model having more capabilities. The most important difference is found in the SLC 5/05, which has the capability of Ethernet communications.. SLC I/O Modules There are an incredible amount of I/O (input/output) modules available for the Allen-Bradley SLC family. There are 4-20mA and 0-10VDC analog modules. There are digital (also known as discrete) modules that work in a variety of voltage configurations and capacities. Use the link below to download Allen-Bradley’s literature on the SLC 500 systems: http://literature.rockwellautomation.com/idc/groups/literature/documents/sg/1747-sg001_-enp.pdf Use this link to find manuals regarding Allen-Bradley PLCs: http://literature.rockwellautomation.com/idc/groups/public/documents/webassets/ browse_category.hcst Let’s see what it takes to assemble a MicroLogix System.. MicroLogix 1000 The MicroLogix 1000 is a self-contained unit that offers up to 20 digital I/O points and 5 analog I/ O points. It differs from the SLC family in that it is just one physical unit.. MicroLogix 1200 The MicroLogix 1200 is a modular unit, allowing you to customize and expand your I/O. The highest capacity racks provide space for four additional I/O modules.. MicroLogix 1500 The 1500 continues in that theme with six expansion slots, providing over 256 I/O points and a couple of counters and outputs. A full description of the MicroLogix family can be found on Rockwell’s site at the link below. http://literature.rockwellautomation.com/idc/groups/literature/documents/br/1761-br006_-enp.pdf. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 4.
(9) Ladder Logic Before we open RSLogix and start programming, there are a few things you need to know about PLCs in general. I have summarized the basic terms and techniques required to work with ladder logic. It isn’t a comprehensive summary, but if you are just starting out, the information presented here will be very helpful. Every PLC programmer, no matter what skill level, must know the principles described in this section and the Equivalent Logic section. There is simply no way around it. To effectively write a program, or even edit one, the programmer must know how to visualize the effects of the changes he will make. In other words, you have to be able to look at the logic “on paper” and imagine how the logic will work when it is entered into the PLC.. The Dialect of PLCs Lets' define some terms and symbols: INSTRUCTION – RSLogix’s command language is comprised of “instructions”. An XIC (it looks like a normally open contact --] [-- ) is an instruction. A timer is an instruction. A few of the most common instructions are described below. BIT - an address within the PLC. It can be an input, output or internal coil, among others. In RSLogix, there are a couple of ways to show the address of a bit. The default is: [type]:[word]/[bit] For example, an address that references an output of an SLC 500 is O:5/0. That is:. O:5/0 means that it is a physical output. O:5/0 means that it uses Slot 5 (the 6th physical slot) in the rack. O:5/0 means that it is the first output on the card. Remember that the first slot in an SLC 500 rack is Slot 0. That means a card that is installed in the 6th physical slot is addressed as Slot 5. Allen-Bradley PLC slots, like many computer numbering systems, always start with 0.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 5.
(10) By the way, don’t get the capital “O’s” confused with zeroes. RUNG - A section of the PLC ladder program that terminates in an output function of some type. Just like in an electrical ladder diagram, a rung has some type of output that is turned on or turned off by the preceding entities in the rung. The first rung in a ladder program is always 0000. HARDWIRED INPUT - a physical connection to the PLC from an input device (switch or sensor, etc.). Allen-Bradley uses the capital letter “I” to designate a hardwired input. An address that describes an input on an SLC 500 is I:4/0. Similar to the output structure,. I:4/0 means that it is a physical input. I:4/0 means that it uses Slot 4 (the 5th slot in the rack). I:4/0 means that it is the first input on the card. Don’t get the capital “I’s” confused with ones. HARDWIRED OUTPUT - a physical connection from the PLC to an output device (relay or pilot light, etc.) As was said above, an address that references an output of an SLC 500 is O:5/0. INTERNAL COIL This is a programmable bit used to simulate a relay within the PLC. The internal coil has no connection to the outside world. It does not connect to an output card. Internal coils are used to store information. The “contacts” of this “relay” can then be used multiple times in other parts of the program. In RSLogix, the “B3” (binary) file is commonly used for all the internal coils. There are many other words in other files that have bits you can use as internal coils, but we are going to stick with the B3 file for our application.. B3:0/0 means that it references an internal Binary file B3:0/0 means that it uses the first word in the table B3:0/0 means that it is the first bit in the word. Note that, unlike the Output and Input files, you have to use the file number in the address. In this case, the default file number is 3. TIMER A timer is a programmable instruction that lets you turn on or turn off bits after a preset time.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 6.
(11) The two primary types of timers are TON for “timer on delay” and TOF for “timer off delay”. Timers in A-B SLC and MicroLogix processors use file 4 for their timers.. T4:0 means that it references an internal Timer file T4:0 means that it uses the first timer in the table The address T4:0 simply refers to the timer. Each timer has bits that turn on after the timing function is complete. You can address this bit by simply putting a “/DN” after the timer address. DN stands for “done”. For example, if timer T4:0 is a TON (timer on delay), then the bit T4:0/DN will turn on after the timer has reached its preset value. COUNTER A counter is a programmable instruction that lets you turn on or turn off bits after a preset count has been reached. There are different types of counters available in the RSLogix, but the CTU (counter up) instruction covers everything we will talk about here. Counters in A-B SLC and MicroLogix processors use file 5.. C5:0 means that it references an internal Counter file C5:0 means that it uses the first counter in the table The address C5:0 simply refers to the counter. Each counter has bits that turn on after the counting function is complete. You can address this bit by simply putting a “/DN” after the counter address. DN stands for “done”. For example, if counter C5:0 is a CTU (counter up), then the bit C5:0/DN will turn on after the counter has reached its preset value. --] [-- Normally Open Contact When used with a hardwired input, this instruction is off until there is a voltage applied to the input. The bit address then goes high, or on, and the instruction becomes “true.” It works the same way when it has the same address as an internal coil, except that the coil must be turned on by logic in the program. Allen-Bradley calls these normally open contacts “XIC”, or “eXamine If Closed” instruction. An XIC instruction can reference a hardwired input, a hardwired output, an internal coil or a timer done bit, among others.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 7.
(12) --]/[-- Normally Closed Contact This is an inverted normally open contact. When used with a hardwired input, this instruction is "true" until there is a voltage applied to the input. It then goes low, or off, and becomes “false.” It also can be used with an internal coil, becoming true when the coil is off and becoming false when the coil is on. Allen-Bradley calls these normally closed contacts “XIO”, or “eXamine If Open” instructions. -( )- Output Coil When used with a hardwired output, this function is off until the logic in the program allows it to turn on. It then becomes “true”, and will energize the device that is wired to the respective output. If it is used as an internal coil, it will toggle the instructions associated with it. That is, it will close a normally open instruction and open a normally closed instruction. Allen-Bradley calls these outputs “OTE”, or “OutpuT Energize”. An OTE may be used with a hardwired output or an internal coil. TRUE - A state that indicates an instruction is allowing logic to “flow” through it. Also, if the logic in a rung turns on the output of the rung, then the rung is said to be true. FALSE - Without stating the obvious, this is the opposite of true. OK, that was a lot to cover and for you to understand – don’t worry, this will start getting easier.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 8.
(13) Equivalent Logic Suppose we want to use a PLC to operate a pilot light. In its elementary form, PLC logic is very similar to the hard-wired logic you would find in an electrical ladder diagram. For example, if you wanted to turn on a light with a momentary pushbutton, you would wire it like the circuit below. When you press PB1, the pilot light PL1 lights up. H N | PILOT | | LIGHT | | PB1 PL1 | |---] [---------------------------------------(L)----| | | | Now let's do the same thing in an SLC. To duplicate the hardwired circuit on a PLC, you would wire the switch PB1 to input I:4/0 and wire the light PL1 to output O:5/0. The I/O (hardwired inputs and outputs) is set up like this: - There is a “PB1” pushbutton switch wired to I:4/0 of the PLC. - There is a “PL1” pilot light wired to O:5/0 of the PLC. In RSLogix 500, the screen would look like this.. Now let’s examine the sequence of events. When you first turn on the PLC, the PB1 pushbutton is off, or false. Therefore, the PL1 output is off. Pressing PB1 will make I:4/0 true, O:5/0 will come on and the light will be energized. It will stay on only as long as you hold the button in. Just like electrical current has to flow through the switch to turn on the light in the hardwired circuit, the logic has to "flow" through the normally open instruction (which is “closed” when you press the switch) of I:4/0 to energize the output that turns on PL1.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 9.
(14) The green highlight indicates the instruction is “on” or “true”.. One nice feature of Allen-Bradley PLCs is that you can document each bit in the program. In the example above, “INPUT1” is somewhat meaningless on its own. After you add the descriptive text “Start Motor PB1”, things make more sense.. Scan Time One critical difference between a PLC program and the equivalent electrical circuit is the issue of scanning. It works like this: The PLC looks at the state of the inputs, and stores that information in a temporary buffer. Then, it ignores what is happening electrically at the inputs. The PLC will use the information in the temporary buffer to execute the logic in the program. It will solve the logic from top to bottom, determining the truth of each rung, and turn on or turn off the appropriate addresses in the temporary buffer. When it reaches the last rung in the program, the PLC will use the data in the temporary buffer to turn on or turn off the corresponding outputs. The scan cycle is complete, and the PLC will once again look at the inputs. The amount of time this takes is called scan time, and is measured in milliseconds. Stated more simply, the PLC reads the inputs, performs the logic and adjusts the outputs as needed. Here’s the difference: An electrical circuit has events occurring simultaneously – a PLC performs its logic in steps. The very best way to learn a programming language is to see a real world application of a working program. You can see how things are done and refer to the program in the future as you write or edit your own programs.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 10.
(15) Project Scope We will use a batching operation as an example. Batching, as you may know, is the term that describes the mixing of assorted ingredients to make a finished product. There are techniques that are common to batching, whether you are making soap or cake mix. We are going to write a program that mixes a hypothetical window cleaner. Someone has to define the batching procedure. Usually, this is done by a process engineer or a chemical engineer. If the job of defining the project is done well, a document called a Project Scope (or something similar) is generated. It is extremely important that you clearly understand the entire process that is defined in the scope. If you have any questions or concerns, you need to resolve those before you begin programming. If you don’t, then the responsibility of errors and omissions, and perhaps the blame, may be placed on you. If you bring up questions that result in changes to the defined sequence of operations, ask the originator to revise the Project Scope. In fact, it is not uncommon for a Project Scope to undergo a number of revisions. If there is a change that is not documented in the scope, you should document it by getting an email from the originator that explains the change. If nothing else, you want to make sure you understand what the change involves. For our project, the project scope is as follows.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 11.
(16) Hyper-Glass Cleaner Batching Project Scope Goal The goal of this project is to install a new automated batching system for mixing Hyper-Glass Cleaner. Overview. Three ingredients (city water, ingredient QR and ingredient KM) are added in specified amounts by weight to the Mixing Tank. After all the ingredients have been added to the Mixing Tank, the mixture is blended by running the agitator for a given time. When the blending time is complete, the finished product is pumped to the Filling Lines for bottling and final packaging.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 12.
(17) Component. Function. Valve AV-CW. Supplies city water to the Mixing Tank. Limit Switch LS-CW1. Indicates when valve AV-CW is closed. Limit Switch LS-CW2. Indicates when valve AV-CW is open. Pump PUMP-QR. Pumps ingredient QR to the Mixing Tank. Valve AV-QR. Supplies QR to the Mixing Tank. Limit Switch LS-QR1. Indicates when valve AV-QR is closed. Limit Switch LS-QR2. Indicates when valve AV-QR is open. Pump PUMP-KM. Pumps ingredient KM to the Mixing Tank. Valve AV-KM. Supplies KM to the Mixing Tank. Limit Switch LS-KM1. Indicates when valve AV-KM is closed. Limit Switch LS-KM2. Indicates when valve AV-KM is open. Scales. Provides the current weight of the ingredients in the tank to the PLC. Agitator MTR-MTA. Blends the ingredients in the Mixing Tank. Pump PUMP-MT. Pumps ingredient MT from the Mixing Tank. Valve AV-MT. Supplies the finished product to the Filling Lines. Limit Switch LS-MT1. Indicates when valve AV-MT is closed. Limit Switch LS-MT2. Indicates when valve AV-MT is open. Ultrasonic Level Sensor ULS-1. Indicates the level in the Mixing tank. System Components. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 13.
(18) Operator Panel Layout. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 14.
(19) Operator Panel Components Component. Function. SYSTEM READY pilot light PL1. Indicates the system is ready for batching. SYSTEM FAULT pilot light PL2. Indicates the system has a fault and is stopped. START BATCH pushbutton switch PB1. Starts a new batch. STOP BATCH pushbutton switch PB2. Stops the batching process. ADDING WATER pilot light PL3. Indicates the system adding water to the Mixing Tank. ADDING QR pilot light PL4. Indicates the system adding ingredient QR to the Mixing Tank. ADDING KM pilot light PL5. Indicates the system adding ingredient KM to the Mixing Tank. BLENDING pilot light PL6. Indicates the system is blending the ingredients. PUMPING TO LINES pilot light PL7. Indicates the system is pumping the batch to the Filling Lines. E-STOP PB3. Immediately stops the entire system. Electrical Specifications The Ultrasonic Level Sensor ULS-1 provides a 0-10VDC signal to the PLC. The Scales provide a 0-10VDC signal to the PLC. All other input signals are 120VAC. All output signals are 120VAC. A “dry contact” type of output module is required. Detailed Sequence of Operations There are 5 steps in the Batching process: 1. 2. 3. 4. 5.. Add City Water Add Ingredient QR Add Ingredient KM Mix the batch Pump the batch to the filling lines. To begin a new batch, the operator will verify that the “SYSTEM READY” pilot light is on and that the Mixing Tank is ready to receive ingredients.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 15.
(20) The operator will then press the “START BATCH” pushbutton to begin the batching process. The “SYSTEM READY” pilot light will turn off. No further operator input is required. Step 1 – City Water Automatic valve AV-CW will open. The “ADDING WATER” pilot light will illuminate. Valve AV-CW will remain open until 1275 lbs. of City Water is in the Mixing Tank. Valve AV-CV will close. The state of AV-CW will be verified by limit switch LS-CW2. If LS-CW2 is not made within 2 seconds after the valve was told to open, a fault will be generated and the system will shut down. The pilot light “SYSTEM FAULT” PL2 will illuminate indicating that a fault has occurred. LS-CW1 will verify that the valve is closed within 2 seconds after the valve was told to close. If the valve closure is not verified within 2 seconds, a fault will be generated, the system will shut down and PL2 will illuminate. All valves and their respective limit switches will work in the manner described above. After the City Water has been added, valve AV-CW will close and the “ADDING WATER” pilot light will turn off. Step 2 – Ingredient QR Valve AV-QR will be opened. After the valve position has been verified by LS-QR2, PUMP-QR will pump 390 lbs. of ingredient QR into the Mixing Tank. The “ADDING QR” pilot light will be illuminated while the pump is running. After the ingredient QR has been added to the Mixing Tank, PUMP-QR stops and the “ADDING QR” pilot light will turn off. Valve AV-QR will close. Step 3 – Ingredient KM Valve AV-KM will be opened. After the valve position has been verified by LS-KM2, PUMP-KM will pump 173 lbs. of ingredient KM into the mixing tank. The “ADDING KM” pilot light will be illuminated while the pump is running. After the ingredient KM has been added to the Mixing Tank, valve AV-KM will close. PUMP-KM will stop. The “ADDING KM” pilot light will turn off. After LS-KM1 indicates the valve has been closed, the agitator motor MTR-MTA will start. The “BLENDING” pilot light will illuminate. Step 4 – Mixing The agitator will run for 3 minutes. The “BLENDING” pilot light will illuminate. After the agitator is finished, the “BLENDING” pilot light will turn off.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 16.
(21) Step 5 – Pump to filling lines Valve AV-MT will open. After LS-MT1 indicates the valve is open, the “PUMPING TO LINES” pilot light will illuminate. PUMP-MT will pump the entire batch to the filling lines. When the Ultrasonic Level Sensor ULS-1 indicates that the tank is empty, PUMP-MT will turn off, valve AV-MT will close and the batching cycle is complete. The “PUMPING TO LINES” pilot light will turn off and the “SYSTEM READY” pilot light will illuminate. During every phase of the batching process, the liquid level must be monitored by the PLC. If the level rises to greater than 95% of that Mixing tank’s capacity, the system will generate a fault and the batching process must be halted. The operator may press the “E-STOP” pushbutton PB3 to stop the process at any time. END OF HYPER-GLASS CLEANER BATCHING PROJECT SCOPE. Summarizing the Scope So, what did we get from the scope? Let’s summarize: First, 1275 lbs. of water will be added to the Mixing Tank. Then, 390 lbs. of QR will be added. The last ingredient is KM, of which we will add 173 lbs. After all the ingredients are in the Mixing Tank, we have to blend it for 3 minutes. After the batch is blended, we will pump the finished product in the tank to the filling lines. We have to make sure all the valves open or close in less than 2 seconds. If they do not, then we need to shut down the process. We need to turn on the appropriate pilot lights to indicate what stage the batching process is in. We need to make sure the level in the Mixing Tank doesn’t get too high. If it does, we must shut down everything. We need to make sure that the respective valves for the pumps are open before we turn on the pumps. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 17.
(22) Which PLC? There are certainly a number of factors that will determine which PLC you need. Without getting into all of those, let’s just say that an SLC 5/03 has plenty of processing power for this project and the cost is reasonable, so we will use one. Before you can determine what modules, rack or power supply you need to buy, you will have to know what your I/O requirements are. This involves the very critical step of laying out your I/O. A bit of advice here: Don’t skimp on this step. Make sure the I/O is right before you begin programming. A mistake or omission here will cost you ten-fold further down the road.. Lay Out The I/O Now we need to layout the I/O. This will tell us the addresses for the I/O points, what PLC modules we need and how the PLC modules need to be wired. There are three types of signals in the batching system: 120VAC digital inputs (limit switches and pushbutton switches) 120VAC digital outputs 1 (valves, motors and pilot lights) and analog 0-10VDC inputs. List all of the components in the system that are connected to the PLC. Categorize each component according its type (digital input, digital output or analog 0-10VDC). It is best to do this in an Excel spreadsheet. I have provided one for this project – it is called IO_List.xls and is included in the files you downloaded. Try to keep associated devices together. For example, the “ADDING WATER” pilot light should be near Valve AV-CW. This will make the electrical prints easier to read and also help to keep the PLC program organized.. This is a good time to call your local Allen-Bradley representative and have him assist you in selecting the parts you need. He can work directly from your I/O listing and probably save you a bunch of time.. 1. Technically, the valves themselves are not 120VAC devices, but in this case, the solenoids that subsequently drive the valves are. Likewise, the motors that run the pumps and the agitators may not be 120VAC, but the control circuitry that operates the motors is 120VAC. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 18.
(23) Notice the “Descriptor” column. This is a statement providing a shorthand description of the device when the associated input is on, or true. We will use these descriptors in the actual PLC program. Descriptors look like this in RSLogix 500.. I can’t stress how important it is to get the verbiage right in a descriptor. For example, let’s look at LS-CW1. This particular limit switch is normally open, but held closed when the valve is closed. When the limit switch is closed, the input to the PLC will be on, or true. If we used the descriptor Limit Switch LS-CW1 that wouldn’t tell us too much without referring to the prints. Plus, it is a little redundant, as we know it is a limit switch based on the “LS” prefix in the device name. If, however, we use the descriptor City Water Valve AV-CW Closed LS-CW1 then that tells us immediately, without referring to the prints, that the City Water valve is closed as indicated by the limit switch LS-CW1. After you go online with a PLC, if an input is on, the symbol for the bit is highlighted. You can quickly realize the descriptor statement is currently true, as shown below.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 19.
(24) Now we must determine what input and output modules we need. The Project Scope said that the Scales and the Ultrasonic Level Sensor provide 0-10VDC signals. We can use an Allen-Bradley 1746-NI4 Analog 4 channel Input Module. Make sure that the DIP switch on the module is set for 0-10VDC (the same module can be configured to read 4-20mA signals). For the inputs, we can use the 1746-IA16 120VAC Input module. Since 11 inputs are needed for the system, this card will provide 5 spares. You might recall from the Project Scope that contact output modules are required. We will use the 1746-OW16 16-output relay module here. However, since 15 outputs are required by the system, that only leaves us one spare. It is best to buy and install two modules. Now we can see that four modules will provide the I/O we need to operate the system. The next part we need to determine is the rack. SLC racks come with 4, 7, 10 or 13 slots. Since the processor consumes one slot, the best choice is the 1746-A7 7-slot rack. That will give us two spare slots. The final choice is the rack power supply. RSLogix will help you determine what power supply is needed, but it would be best to consult with your A-B rep on this – again, save time and hassles.. Laying Out The Modules In The Rack The processor must go in Slot 0. It seems logical to put the analog card in the next slot. Most engineers like to put the output cards to the far right, so we will put the OW16s in Slot 6 and Slot 7. That leaves a gap of three slots in the middle of the rack. Since there is a good chance that additional analog card might be needed in the future, we will put the remaining IA-16 in Slot 5, next to the outputs. The bottom line here is that, with the exception of the processor, it really does not matter where you place the modules. It is more a matter of personal taste, and what layout you think will be easiest to troubleshoot while allowing for future expansion.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 20.
(25) Assigning I/O Addresses Here is the final layout for the cards in the rack: Slot 0 – SLC 5/03 Slot 1 – 1746-NI4 Analog 4 Channel Input Module Slot 2 – empty Slot 3 – empty Slot 4 – 1746-IA16 120VAC Input Module Slot 5 – 1746-OW16 Relay Output Module Slot 6 – 1746-OW16 Relay Output Module Look at the I/O List spreadsheet. The first address we need to assign is the input for the Scales.. Analog Inputs Addressing some analog modules is a little different from addressing digital modules. The NI4 has four inputs and uses one word for each input. The first input starts with 0 and the module is in Slot 1, so the address for the first input is I:1.0.. I:1.0 means that it is a physical input I:1.0 means that it uses Slot 1 (the 2nd slot) in the rack I:1.0 means that it is the first input on the card. The Ultrasonic Level Sensor uses the second input. Its address is I:1.1. The address for the third input is I:1.2. The fourth input is I:1.3. Since we don’t need those for this project, they are labeled as spares. The analog inputs for this project are as follows: Component. Signal/Module Type. Slot. Address. Scales. 0-10VDC Input. 1. I:1.0. Ultrasonic Level Sensor ULS-1. 0-10VDC Input. 1. I:1.1. spare. 1. I:1.2. spare. 1. I:1.3. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 21.
(26) Digital Inputs Our first digital input starts in Slot 4. Therefore, our first input will be I:4/0.. I:4/0 means that it is a physical input I:4/0 means that it uses Slot 4 in the rack I:4/0 means that it is the first input on the card. Don’t confuse capital “I” with “1”. As a side note, RSLogix 500 lets you display the same address in a couple of different ways. You can display the first bit in Slot 4 as: I:4/0 (known as slot/bit) or I:4.0/0 (known as slot word/bit) This is configurable in RSLogix. We will see how to do that in a few moments. Most people prefer the slot/bit method of displaying I/O addresses, so that is what we will use. The digital inputs for this project are as follows: Component START BATCH pushbutton switch PB1 STOP BATCH pushbutton switch PB2 Limit Switch LS-CW1 Limit Switch LS-CW2 Limit Switch LS-QR1 Limit Switch LS-QR2 Limit Switch LS-KM1 Limit Switch LS-KM2 Limit Switch LS-MT1 Limit Switch LS-MT2 spare spare spare spare spare. Signal/Module Type 120VAC Input 120VAC Input 120VAC Input 120VAC Input 120VAC Input 120VAC Input 120VAC Input 120VAC Input 120VAC Input 120VAC Input 120VAC Input 120VAC Input 120VAC Input 120VAC Input 120VAC Input. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. Slot 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4. Address I:4/0 I:4/1 I:4/2 I:4/3 I:4/4 I:4/5 I:4/6 I:4/7 I:4/8 I:4/9 I:4/10 I:4/11 I:4/12 I:4/13 I:4/14 22.
(27) E-STOP PB3. 120VAC Input. 4. I:4/15. Digital Outputs Our first digital output is in Slot 5. That makes the first output O:5/0.. O:5/0 means that it is a physical output O:5/0 means that it uses Slot 5 in the rack O:5/0 means that it is the first output on the card. Don’t confuse capital “O” with “0”. In our project, the first output is for the SYSTEM READY pilot light PL1. Its address is O:5/0. The digital outputs for this project are as follows: Component. Signal/Module Type. Slot. Address. SYSTEM READY pilot light PL1. 120VAC Output. 5. O:5/0. Valve AV-CW. 120VAC Output. 5. O:5/1. ADDING WATER pilot light PL3. 120VAC Output. 5. O:5/2. Valve AV-QR. 120VAC Output. 5. O:5/3. Pump PUMP-QR. 120VAC Output. 5. O:5/4. ADDING QR pilot light PL4. 120VAC Output. 5. O:5/5. Valve AV- KM. 120VAC Output. 5. O:5/6. Pump PUMP-KM. 120VAC Output. 5. O:5/7. ADDING KM pilot light PL4. 120VAC Output. 5. O:5/8. Agitator MTR-MTA. 120VAC Output. 5. O:5/9. BLENDING pilot light PL6. 120VAC Output. 5. O:5/10. Pump PUMP-MT. 120VAC Output. 5. O:5/11. PUMPING TO LINES pilot light PL6. 120VAC Output. 5. O:5/12. Valve AV-MT. 120VAC Output. 5. O:5/13. spare. 120VAC Output. 5. O:5/14. SYSTEM FAULT pilot light PL2. 120VAC Output. 5. O:5/15. A final note about the I/O list – take the time to do it right and keep it updated as the project progresses. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 23.
(28) Installing RSLogix There are a number of versions of RSLogix that are used with the many PLCs Rockwell offers. We are going to reference RSLogix 500 in this book, as that is the software used to program the SLC 500 PLCs. Most Rockwell software uses a copy protection scheme that involves the use of an “activation file”. RSLogix 500 uses this. You can install the software, but functions will be limited without the activation file. Activation files are first installed from the master disk supplied by Rockwell. They can be moved from computer to computer, or back to the original master disk. The idea is that Rockwell knows that hardware changes, so that if you want to replace an old computer that you use for programming, you can move the activation file from the old computer to your new one without buying a new activation file. An alternative is to download the RSLogix Starter Kit. This software applies only to the MicroLogix series, but it is very similar to the software used to program the SLCs.. Installing RSLogix 500 The installation of the software is straightforward. Put the disk in the drive and follow the prompts. The only catch is that it will ask you for a serial number. Though any 10-digit number will work, you should use the number assigned to your company by Rockwell. This is the number that Rockwell Technical Support will reference if you call them with a question.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 24.
(29) Running RSLogix To run RSLogix, click: Start > All Programs > Rockwell Software > RSLogix 500 English > RSLogix 500 English. A quick side note about conventions used in this book: We are going to use the format shown above to indicate what menu items you should click on as you navigate the menus and sub-menus. For example, the line above means: Click on “Start”. Click on “All Programs”. Click on “Rockwell Software”. Click on “RSLogix 500 English”. Click on “RSLogix 500 English”.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 25.
(30) You will see this on your monitor.. Now choose File > New. In the Processor Name field, type in “BATCHING”.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 26.
(31) Scroll down in the window and select “1747-L532C/D 5/03 CPU – 16K Mem. OS302”.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 27.
(32) Click “OK” and this screen will appear.. On the left, you see an explorer-type menu. This is called the Project tree. All of these folders and files allow you to configure or view properties of the PLC or data files within the PLC.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 28.
(33) The first thing we need to do is configure the I/O. Double-click on “IO Configuration”. In the first “Racks” drop-down menu, choose “1746-A7 7-Slot Rack”. Now, we need to define what I/O modules we are using. The box on the left shows the 7 slots that are available in our rack. Slot 0 (the first slot) is used by the processor. In referring to our I/O spreadsheet, Slot 1 is reserved for the analog input module. In the Current Cards Available window to the right, scroll down until you find “1746-Ni4 Analog 4 Channel Input Module”. Double-click on it and you will see that it has been moved to the window on the left and now occupies Slot 1. Again, looking at our I/O spreadsheet, we see that Slots 2 and 3 are not used. Click on Slot 4 so that it is highlighted. In the Current Cards Available window, scroll until you find “1746-I*16 Any 16pt Discrete Input Module”. Double-click on it and it is shown in Slot 4. Make sure Slot 5 is highlighted and find “1746-O*16 Any16pt Output Module”. Double-click on it so that it shows up in Slot 5. Double-click on it again and it will appear in Slot 6. If you want to remove a card, highlight the card and press the “Delete” key,. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 29.
(34) When you are finished, your configuration should look like this:. The “Power Supply” button will help you select the right power supply for the rack based on the modules you have specified, but it is best to contact your Rockwell representative to help you with this. If you are online for the first time with a PLC, the “Read IO Config” button will tell you how the PLC’s I/O is configured. The “Adv Config” button allows you to perform advanced configuration functions for each card. In this case with our modules, there is no need to change any of the default values. When you are done with the I/O configuration, close the window. Your settings will be saved and you will see the main programming screen.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 30.
(35) Configuring Colors, Fonts and Address Display This is something that you can certainly configure to your own liking. However, I prefer to change the defaults as follows to make the display easier to read when I am online. Select View > Properties > Colors. In the “Set Colors for:” window, click on “Descriptions”. Choose white as a background color. Select the “Fonts” tab. Depending on your monitor, you may prefer something else, but I like Arial. Select the font size of your choice and click “OK”. Select the “Address Display” tab. Choose “Single Line” for “Bit Address Format”. Choose “Word/Bit” for “Binary Bit Display Mode”. Choose “Slot/Bit” for “I/O Bit Display Mode”.. Adding Descriptors To Your I/O A descriptor is the text that is associated with any instruction, such as an XIO, XIC, timer or counter. These are essential when you are writing or trouble-shooting a program. In RSLogix, find the output file O0 – OUTPUT in the Data Files folder and double-click on it. The screen below will appear.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 31.
(36) Scrolling to the right or stretching out the window will reveal what type of card is configured for each slot. Output O:5/0 is highlighted, so you can double click on the “Desc:” box to type in the description.. However, since you did your work in advance, there is an easier and more accurate method. Open your I/O List spreadsheet. Copy the descriptor for the spreadsheet for O:5/0. You may need to put a return in to get the device name to appear by itself on the bottom line. Click “OK”. Now click on the next position to the left in the Data File. This is output O:5/1, and is indicated in the field just below the scroll bar. Double-click on the “Desc:” field and copy and paste the descriptor for O:5/1 from your spreadsheet into the box. Again, you may have to insert a hard return here or there to get it to appear the way you would like. Continue in this manner until you have entered all the descriptions for the outputs. Close the window.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. If the windows on the main screen are rearranged accidentally, choose: Window > Arrange > Default Project > OK. and the normal view will be restored.. 32.
(37) Now find the input file I1 – INPUT in the Data Files folder and double-click on it.. This looks a little different from the output file. It is because we have an analog input card. Again, scrolling to the right or stretching out the window will reveal what type of card is configured for each slot. The first line showing address I:1.0 is for the first channel of the Analog NI4 card. In our case, this is where the Scales for the Mixing Tank will be wired. Since it is a word we will be seeing, and not just one bit, we want to add the descriptor to the entire word. In the “Offset” column, click on “I:1.0”. The whole line will be highlighted. Now double-click on the “Desc:” field and paste the description from the spreadsheet for the Scales. Click “OK”. Click on “I:1.1” to add the description for the Ultrasonic Level Sensor. We are not using channels 3 and 4, so we can go to the discrete inputs. Click on the “0” in the lower right of the table so that I:4/0 shows up in the box. Add the descriptor just like you did for the outputs. Continue until you have all the inputs labeled. Close the window. You can enter descriptors for Binary (B3) files, Timer (T4) files, Counters (C5) and so in the same way. If you know how these files are going to be laid out then it is a good idea to add descriptors now. In our case, we will add descriptors to these bits and files as we program.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 33.
(38) Writing the Program Setting Up An Overall Control Rung Typically, a program will start with some kind of overall or master control rung. This rung will define a bit that must be on for the entire system to operate, and we include bits that we know must be true for the whole system to run. In this project, we certainly want the E-Stop to be part of this logic. Our E-Stop (or, emergency stop) pushbutton switch is wired in such a way that the input must be on for the system to operate. Make sure you have the default view displayed in RSLogix. It will show one rung with the (END) instruction all the way to the right. This rung cannot be deleted or edited. We need to insert a new rung. Right-click in the LAD 2 window on the rung number 0000. A menu will appear. Choose “Insert Rung”. Your screen should look like this:. We want to use the E-Stop input in this rung. Find the XIC (examine if closed) the User menu.. tool button in. Click and drag it toward the new rung you just created. You will see that as you get near the rung, two red squares will appear. These are possible landing points for your instruction. Move. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 34.
(39) your pointer toward the one on the left. As you get near it, the square will change color from red to green. Release the mouse button and your screen should look like this.. Press the enter key on your keyboard. Type in the address of the E-Stop pushbutton input, which is I:4/15. Your screen now looks like this.. Notice how the instruction descriptor appeared automatically. Remember that we want to create the logic for a bit that must be on if the system is to run. We will use an internal bit from the B3 file. Click and drag the OTE (output energize) tool button rung. Place it on the marker at the far right.. from the User menu down to the new. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 35.
(40) Press enter. Type the address B3:0/0 and press enter. This is the first bit in the B3 file, and since this bit has a lot of importance in our program, that is appropriate. The address description box appears automatically. Type “System Enable” into the box. We know from the Project Scope that the system must stop if there is a fault. We are not sure of the details of all those faults yet, but we do know that we will summarize those faults somewhere in the program. It will result in a bit. We will use the address B3:0/1 for that bit. We also know that we want the “System Enable” to be on if we do not have a fault. Bear with me here and it will make sense. Click and drag the XIO (examine if open) tool button from the User menu down to the new rung. Place it just to the right of the E-stop input. Press enter and type B3:0/1. Press enter and type “System Fault” in the descriptor box. It should look like this:. Let’s see what we have. The logic of the rung works just like an electrical circuit. If the E-Stop is cleared and there is not a System Fault, the System Enable bit will be on. That is exactly what we want. We will work out the fault logic later. Notice that the System Fault bit is highlighted. That means the XIO instruction is true; that is, there is currently no system fault.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 36.
(41) The last thing we need to do is verify the rung. Right-click on the rung number and choose “Verify Rung”. Notice that the lower case “e” will disappear.. Starting a Batch Cycle The Project Scope said that the operator may start a batch by pressing the “Start Batch” pushbutton on his console. Let’s start with that input.. It is a good idea to save your work frequently. This is done in RSLogix like it is in any other Windows program, CTRL-S or File > Save. Right-click on the last rung and choose “Insert Rung”. Click and drag the XIC (examine if closed) tool button new rung. Enter the address I:4/0.. from the User menu to the left side of the. Click and drag the OTE (output energize) tool button from the User menu down to the new rung. Place it on the marker at the far right. We are creating a new bit that indicates the system is currently batching. Enter the address B3:0/2. Label this bit “System Batching”. If the operator chooses, he may stop the batch. We will make use of the “Stop Batch” pushbutton. Click and drag the XIO (examine if open) tool button from the User menu down to the new rung. Enter the address I:4/1. We don’t want the operator to be able to start a batch if the System Enable bit is not on. We will add that by dragging the XIC (examine if closed) tool button to the left side of the new rung. Enter the address B3:0/0. This rung will work much like a traditional motor starter circuit that uses a contact from the motor starter wired in parallel with the start button to hold in the coil. In the PLC, the “contact” is an XIO with the same address as the “coil”, which is B3:0/2.. You can also insert a rung by clicking on the rung number and pressing the “insert” key. You can select a rung and choose Edit > Insert Rung. There are a number of ways to perform many functions in RSLogix. Throughout the remainder of this book, I will use what I believe is the easiest method for you to understand and remember.. We need to “wire the contact” in parallel with the start button. We do this with a branch instruction. Drag the Branch tool button Enable bit and the Start Batch bit.. and place it on the marker between the System. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 37.
(42) It will look like this.. We want the branch to go around the Start Batch bit. Now click and drag the right side of the branch to marker just to the right of the Start Batch bit. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 38.
(43) Release the mouse button and the branch will appear around the Start Batch bit.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 39.
(44) Click and drag the XIC (examine if closed) tool button the new branch. Type in the address B3:0/2.. from the User menu to the left side of. This is called a latching rung. If the System Enable bit is on, the System Batching bit can be latched by momentarily pressing the Start Batch pushbutton. The System Batching bit will stay on and the rung will remain latched until the Stop Batch pushbutton is pressed or the System Enable bit goes off. Thinking ahead, though, we know that the system will stop the batch automatically after it has pumped all the finished product to the filling lines. We are not sure how we will know that yet, but we know we need a bit to unlatch the rung. Click and drag the XIO (examine if open) tool button from the User menu down to the marker just in front of the System Batching OTE instruction. Address it as B3:0/3 and type in the descriptor “Batch Complete”.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 40.
(45) Right-click on the rung number and verify the rung. It should appear like this.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 41.
(46) Batching Steps As you recall from the project scope, there are a number of steps needed to create the finished product. They are: 1. Adding City water 2. Adding chemical QR 3. Adding chemical KM 4. Blending the mixture with the agitator 5. Pumping the finished product to the filling lines.. Step 1 – Adding City Water We need to initiate Step 1. Before we do that, thought, we need to add another permissive bit. We will call that bit “System Ready”. We know that if the system is enabled but not currently batching, it is ready to begin a batch. We need insert a new rung and create a “System Batching” and “System Ready” bit. Insert a new rung and program it as shown in Rung 0002. You can see how Rung 0002 should look in the picture below. The “System Ready” bit will be on when the system is enabled, but not batching.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 42.
(47) To actually initiate the batch and hold the batch in Step 1, we are going to use the Output Latch (OTL) instruction. This instruction works in conjunction with the Output Unlatch (OTU) instruction. The instructions will work on the same bit address, but are typically found on different rungs. The batch will be started when the operator pushes the Start Batch button. We will latch that bit and label it Step 1. As a side note, I am going to skip a few addresses in the B3 file. It is always a good idea to leave a gap here and there in the event that you need to add a bit later. It doesn’t affect the operation of the program, but it makes the data files more organized and easier to troubleshoot. Insert a new rung at the bottom of the ladder. We need an XIC for the System Ready bit and an XIC for the Start Batch pushbutton at the beginning of the new rung. Click and drag the XIC (examine if closed) tool button from the User menu to the left side of the new branch. Type in the address B3:0/2 and press enter. To save some typing, you can copy and paste instructions. Highlight the Start Batch instruction in Rung 0001. Press CTRL-C. Click on the rung number for Rung 0003. Press CTRL-V. The instruction is duplicated on Rung 0003. Copy and paste bit in the same way Click and drag the OTL (output latch) tool button from the User menu to the right side of the new branch. Type in the address B3:0/10 and add the descriptor “Batch Step 1”.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 43.
(48) However, what if the button is pressed if the system is already batching and in another step? To prevent that from happening, we will make sure that the only way the system can enter Step 1 is if it is not in another step already. Add a series of XIO instructions. Address them from B3:0/11 to B3:0/14. Type in the appropriate descriptors. Verify the rung.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 44.
(49) You can see how RSLogix handles rungs that are too long to be displayed on one side. You can compensate for this by maximizing the LAD 2 window, or stretching it to the left. Remember that if you want to return to the default view, choose Window > Arrange > Default Project.. You may wonder why we chose not to use the OTL output latch instruction in Rung 0001. Many times, it is a matter of personal choice; sometimes a “traditional” latch rung is better than using an OTL. In Rung 0001, we were able to keep all the logic affecting the System Batching bit on one rung. This makes it easier to read and a little more condensed. Some people view a traditional latch as a bit safer. It’s your call, though.. Analog Inputs Before we continue with Step 1, we need to program the Mixing Tank Scales and the Ultrasonic Level Sensor. Since the logic associated with these devices is not necessary tied to Step 1, but common to the entire program, let’s put them in a sub-routine.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 45.
(50) We do this by right-clicking on “Program Files” in the Project menu on the left and choosing “New”. The Name is limited to 11 characters, so we will call it ANALOG. The description will be “Mixing Tank Scales and Level Sensor”. Click OK.. That reminds us that we did not name LAD 2. Let’s do that right now. Right-click on LAD 2 and choose Rename. We will call it MAIN. LAD 2 is, by default, the program that will run when the SLC is first powered up. Like subroutines in other programs like Visual Basic or C, we need to tell the main program to execute the sub-routine. We need to put a JSR (jump to subroutine) instruction in LAD 2. In this case, it really doesn’t matter where it is placed, but putting it at the top makes sense. Insert a rung at the top of the ladder. In the Instruction menu, click on the right arrow until the “Program Control” tab is shown. Click on the tab. Drag the Jump to Subroutine (JSR) tool button to your new rung. Type in a “3” to tell the instruction to go to LAD 3. Add the descriptor “Mixing Tank Scales and Level Sensor”. Verify the rung. In the Project menu, double-click on LAD 3 – ANALOG. This opens the new ladder file you just created. Insert a new rung.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 46.
(51) We are going to enter an instruction in a new way. Double-click on 0000 for Rung 0000. This opens up the ASCII editor.. Type SCP in the box and press enter. SCP stands for “Scale with Parameters”. It allows you to take an analog input from a sensor and scale it to the output units you want. Before we start scaling, let’s take a moment to see how the Allen-Bradley NI4 converts a 0-10VDC signal to a number. The NI4 is an analog-to-digital processor that takes the 0-10VDC signal and converts it to a number between 0 and 16384. The NI4 will yield a number from 0 to 16384 that is directly proportional to the 0 to 10VDC signal that is applied at the input. In other words, zero volts on the input of the NI4 means that the NI4 will provide 0 as a value to the PLC. Ten volts on the input will yield 16384. Five volts on the input will yield half of 16384, or 8192, and so on.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 47.
(52) The SCP instruction starts out looking like this.. Each of the six parameters (Input, Input Min., Input Max., Scaled Min., Scaled Max. and Output) has two fields associated with them. Each field is currently filled with a question mark. The first field is a value that you assign. The second field is the actual value returned by the processor.. Setting up an SCP to calculate Tank Weight The Input parameter is the value that will be scaled. Let’s use this SCP instruction for the Scales. The input we will use is the address we assigned to the analog input card; that is, I:1.0. The Input Min parameter is the value that is read by the analog card when there is no liquid in the tank. With our scales, this value is 0. The Input Max is the value that is read by the card when the tank is full. Our Mixing tank weighs 2000 lbs. when it is full of liquid. We measured the voltage that the Scale put out when the tank was full and found it to be 10 volts. So, in this case, 2000 lbs. in the tank equals 10 volts, which means the NI4 will read out 16384 when the tank has 2000 lbs. of liquid in it. The Scaled Min parameter is the lowest value you want the SCP to calculate in the units you want. In this case, it is 0, and we are using pounds as our units.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 48.
(53) The Scaled Max parameter is the highest value you want the SCP to calculate. For the Scales in our project, it is 2000. The Output parameter is typically an address where you want to store the result of the SCP. We are going to put it in the N7 file (integer). We will store it specifically in N7:0. Here is how the SCP instruction for our Scales looks.. Admittedly, the numbers rarely work out like this, but for simplicity’s sake, I made them easy to work with. The real beauty of the SCP is apparent after you go online. Let’s say that you couldn’t really calibrate the scales previously by using voltmeter. After you go online, and you are getting live data from the SCP instruction, you can visually verify that the tank is empty. Hoverer, you are reading 133 from the NI4. You simply enter 133 as the Input Min parameter. When the tank is full, you see that the reading is 14733. Enter 14733 as the Input Max parameter and the SCP will calculate the rest for you. The important thing to remember is that the value in N7:0 is the actual weight of the tank in pounds. We will use that when we program the setpoint logic. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 49.
(54) Setting Up An SCP To Calculate Tank Level First, let’s insert a new rung and create an SCP the same way we did the first time. This time, the Input will be I:1.1 The Input Min will be 0. The Input Max will be 16384. The Scaled Min is 0. The Scaled Max is 100. We want to read the level of the tank as a percent of full. The Output is stored in N7:1, with the descriptor “Liquid Level of Mixing Tank (%)”. It looks like this.. There is one more rung we need to add to this ladder file. Do you remember the JSR instruction we used to get the program here? We have to tell it to go back.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 50.
(55) Insert a new rung and the RET (return) instruction.. Back to Batching – Step 1 Click on the “Main” tab at the bottom on the Ladder window to return to the LAD 2 – MAIN file. Now that we have our Scales working, we can add some water. Insert a new rung at the bottom of the ladder. We will open the city water valve in this rung, so we want to make sure that it is still safe and desirable to open the valve. That is, make sure that there are no faults, the E-Stop button has not been pressed and the Stop Batch pushbutton has not been pressed. Using an XIC with the System Batching bit will confirm all of that. Insert an XIC with the address B3:0/2. Since we only want to open this valve and add city water in Step 1, insert an XIC with the address B3:0/10. Insert an OTE for the city water valve (O:5/1). Remember that we want to put 1275 lbs. of water in the Mixing Tank. We will use the LEQ (Less than or Equal To) instruction to accomplish that.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 51.
(56) Select the “Compare” tab on the instruction tool menu. Click and drag the LEQ tool button the marker just to the left of the OTE.. to. Source A in the instruction is the Tank Weight, which is N7:0. Enter that address. Source B is our setpoint, which as you recall from the Project Scope is 1275 lbs. Enter 1275 for Source B. The LEQ instruction will remain true as long as the tank weight does not exceed 1275 lbs.. After the correct amount of city water has been added, we need to proceed to Step 2.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 52.
(57) We will make use of the fact that we know the system is currently in Step 1, but the Mixing Tank has enough water (1275 lbs) to go to the next step.. We will use the OTU (Output Unlatch) instruction to turn off the bit we latched in Rung 0004. Rung 0006 works like this: The XIC instruction B3:0/10 Batch Step 1 is on. The Mixing Tank weight has reached the setpoint of 1275, so the GEQ (Greater Than or Equal To) instruction is also true. As a result, the bit B3:0/10 Batch Step 1 is unlatched (turned off) and B3:0/11 Batch Step 2 is latched (turned on). Take a moment to make sure you understand how as the weight in the tank rises past 1275, the City Water valve is turned off and the system transitions to Step 2.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 53.
(58) Step 2 – Adding Chemical KM Step 2 will be similar to Step 1, so rather than creating new rungs from scratch, we are going to copy and paste the rungs from Step 1. Click on the rung number for Rung 0005. Hold the SHIFT key and click on the rung number for Rung 0006. Both rungs will be highlighted in red.. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 54.
(59) Press CTRL-C. Click on Rung 0007. Press CTRL-V. You now have new rungs, 0007 and 0008.. We will start with rung 0007. Change B3:0/10 to B3:0/11. We will be looking for a setpoint of 1275 + 390, since there is already 1275 lbs. of water in the Mixing Tank and we need to add 390 lbs. of QR. Change Source B in the LEQ instruction to 1665. Refer to your I/O list spreadsheet and note that the QR automatic valve is addressed as O:5/3. Change the OTE from O:5/1 to O:5/3. In Rung 0008, change B3:0/10 to B3:0/11. Change Source B in the GEQ instruction to 1665. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 55.
(60) Change the OTU (Output Unlatch) instruction from B3:0/10 to B3:0/11. Change the OTL (Output Latch) instruction from B3:0/11 to B3:0/12. It should look like this.. There is a major process difference between adding City Water and adding QR – the QR chemical needs to be pumped. This means that not only do we have to open a valve, but also we have to turn on a pump. First, we want to make sure the valve is being instructed to open, so we will use an XIC from pump AV-QR in the logic. Next, we will wait to turn on the pump until the valve is verified to be open by limit switch LS-QR2. As a failsafe, we will look at limit switch LS-QR1 to make sure it is not indicating the valve is closed. Right-click on Rung 0008 and choose “Insert Rung”. So that you can learn a bit more about ASCII editing, we will construct the entire rung from the ASCII command line. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 56.
(61) Double-click on Rung 0008. The ASCII string input box appears. Type in the following string: XIC O:5.0/3 XIO I:4.0/4 XIC I:4.0/5 OTE O:5.0/4. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 57.
(62) Press enter and the instructions appear.. Verify the rungs.. Step 3 – Adding Chemical KM Step 3 will have the same logic as Step 2, so will cut and paste to create new rungs. Click on Rung 0007, hold down the SHIFT key and click on Rung 0009 to select the new rungs. Press CTRL-C. Click on the last rung and press CTRL-V. Change all the addresses for the XIO and XIC instructions to match the new step. We will be looking for a setpoint of 1665 + 173, since there is already 1665 lbs. of water in the Mixing Tank and we need to add 173 lbs. of KM. Change Source B in the LEQ instruction to 1838. Change Source B in the GEQ instruction to 1838. PLC Programming with RSLogix 500 Copyright © 2013 Modern Media & Automation, LLC engineer-and-technician.com. 58.
Related documents
Each of these learning steps consists of learning one knowledge object (KO) of 3 - 10 minutes, and the concrete sequence of these objects is called a learning pathway2. The
Agreeing to use a particular forum means waiving certain legal rights. In a permissive agreement, the parties waive their objections to litigating in a particular court.
○ If BP elevated, think primary aldosteronism, Cushing’s, renal artery stenosis, ○ If BP normal, think hypomagnesemia, severe hypoK, Bartter’s, NaHCO3,
• 6 gain handles 250, 500, 1000, 2000, 3000, 5000 Hz Flexibility for frequency response adjustments • 3 fitting curves 50, 70, 90 dB input levels Optimal mapping of the
outsourcing success is likely based on both client and service provider sharing focus across key areas of the engagement, but approaching each area of focus from their own
This security problem results from the violation of one of the principal security goals of the content creator (The site structure (or physical media) should not use any
The trigger then computes the number of vendors for each affected product before the update by using the corresponding values after the update and the transition tables (lines
By signing and submitting this booking form and non-refundable deposit you confirm that you and all of the travelers named on the booking form understand and are bound by