beginner guide to plc

77
Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) By Neal Babcock modernmediaonline.com Copyright 2008 Modern Media

Upload: dennis-javier-bujan

Post on 28-Dec-2015

252 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Beginner Guide to PLC

Beginner’s Guide to

PLC Programming

How to Program a PLC (Programmable Logic Controller)

By Neal Babcock

modernmediaonline.com

Copyright 2008 Modern Media

Page 2: Beginner Guide to PLC

Table of Contents Introduction to PLCs.....................................................................................................................3 Ladder Logic.................................................................................................................................3 The Dialect of PLCs .....................................................................................................................5 Equivalent Logic ...........................................................................................................................7 Scan Time ....................................................................................................................................9 The Automated Drill Press..........................................................................................................10 Sequence of Operation...............................................................................................................11 Operator Station .........................................................................................................................13 I/O Listing ...................................................................................................................................14

Inputs ......................................................................................................................................14 Outputs ...................................................................................................................................15 Internal Coils...........................................................................................................................15

The Program ..............................................................................................................................16 Machine Safeties ....................................................................................................................16 Pilot Light Test ........................................................................................................................18 Indicate The System Is Operational ........................................................................................19 Machine Operation Mode........................................................................................................19 Run The Spindle Drive Motor..................................................................................................20 Indicate The Spindle Drive Is Running....................................................................................20 Run The Infeed Conveyor.......................................................................................................21 Ensure There Are No Parts In The Machine ...........................................................................21 Ensure All Components Are At Home.....................................................................................22 Begin The Cycle .....................................................................................................................22 Lower The Stop Gate..............................................................................................................23 Run The Main Conveyor .........................................................................................................23 Indicate The Part Is In Place...................................................................................................24 Clamp The Part In Place.........................................................................................................24 Lower The Spindle..................................................................................................................25 Drilling Operation Is Complete ................................................................................................26 Return The Spindle To Its Home Position...............................................................................27 Machine Cycle Is Complete ....................................................................................................28 Fault Detection And System Diagnostics ................................................................................29 Personnel Safety Guard Door.................................................................................................29 Low Compressed Air Pressure ...............................................................................................30 Motor Starter Overload ...........................................................................................................31 Latch The Motor Overload Detection ......................................................................................32 Indicate A Motor Overload Condition ......................................................................................32 Jammed Part Detection ..........................................................................................................33 Latch The Part Jammed Detection .........................................................................................34 Indicate A Part Jammed Condition .........................................................................................34 Monitor The Drill Time.............................................................................................................35 Summarize The Fault Conditions............................................................................................36

13 Marks Of A Well Written Program .........................................................................................37 General PLC Tips.......................................................................................................................38 The Automated Drill Press in Rockwell Automation’s RSLogix 500 ...........................................39

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

2

Page 3: Beginner Guide to PLC

Introduction to 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”. Originally, there were only a few functions available in this language, but as times have progressed, many more higher-level functions have been introduced. We are going to stick to the basic, commonly used functions here. Also, this text will not replace the user's manual that comes with a PLC, but it will give you a big head start if you have never programmed a PLC. This course is intended to provide an introduction to the programming methods used in PLCs and give the reader a solid, basic understanding of the language of Ladder Logic. After you complete this course, you may be interested in learning about hardware-specific software and programming techniques. Modern Media offers a book entitled PLC Programming Techniques How to Program an Allen-Bradley SLC 500 with Rockwell Automation’s RSLogix. This ebook shows, step-by-step, how to create a program from scratch in Allen-Bradley’s RSLogix 500. To learn more, please visit http://www.modernmediaonline.com.

Ladder Logic I have summarized the terms and techniques you need to know if you are going to work with ladder logic. It is not a comprehensive summary, as that would take volumes of text, but if you are just starting out, the information in this book will be very helpful. Every PLC programmer, no matter what skill level, must have learned the principles described in this book at one point in time. There is simply no way around it. I have included a program for a simple machine that lets you really understand how Ladder Logic works. 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 it will work when it is entered into the PLC. This course will teach you how to do that.

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

3

Page 4: Beginner Guide to PLC

There are many types of PLCs, and differences among PLCs, but what is discussed here should be common to all types. After you read and understand this, you will have a clear understanding of the structure of this type of programming. In the real world of industrial automation, the methods presented in this document may be all that many people will ever need to know.

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

4

Page 5: Beginner Guide to PLC

The Dialect of PLCs Lets' define some terms and symbols: BIT - an address within the PLC. It can be an input, output or internal coil, among others. RUNG - A section of the PLC ladder program that terminates in an output function of some type. HARDWIRED INPUT - a physical connection to the PLC from an input device (switch or sensor, etc.) A hardwired input is labeled INPUT in our example. HARDWIRED OUTPUT - a physical connection from the PLC to an output device (relay or pilot light, etc.) A hardwired output is labeled OUTPUT in our example. 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. An internal coil is labeled COIL in our example. --] [-- 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. --]/[-- 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. -( )- 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.

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

5

Page 6: Beginner Guide to PLC

+---------+ TIMER | +-- SEC---+ Timer This function is used to supply a programmable delay. It requires the use of its "timer finished" bit, like a time delay relay uses its contact. +---------+ COUNTER | +-- 000---+ Counter The counter function is used to count events. It could be used to keep track of machine cycles, count parts, etc. It can be programmed with a preset value that triggers another event when the count is reached. TRUE - An indication the a bit is “on”. If you press a pushbutton switch that is wired to an input, then the bit is said to be true. 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.

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

6

Page 7: Beginner Guide to PLC

Equivalent Logic 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.

Now let's do the same thing in a PLC. To duplicate the hardwired circuit on a PLC, you would wire the switch PB1 to an input and wire the light PL1 to an output. Each PLC manufacturer gives you the details of wiring their particular modules. The I/O (hardwired inputs and outputs) is set up like this: - There is a “PB1” pushbutton switch wired to INPUT1 of the PLC. - There is a “PL1” pilot light wired to OUTPUT1 of the PLC. | PB1 PL1 | INPUT1 OUTPUT1 [---] [------------------------------------------------------( OUT ) | 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 INPUT1 true,

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

7

Page 8: Beginner Guide to PLC

OUTPUT1 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 INPUT1 to energize the output that turns on PL1. The programming terminal display will look something like this as you hold in PB1. The yellow highlight indicates the bit, or address, is “on” or “true”. | PB1 PL1 | INPUT1 OUTPUT1 [---] [------------------------------------------------------( OUT ) | Let's look at how a timer works. Suppose you want to delay running a motor for 2 seconds after you turn on a switch. You can use the input from the switch to run a timer. Program the timer for the duration you want and then use the "timer finished" bit to turn on your motor. In this instance, we have configured an "on delay" timing sequence. Two seconds after INPUT1 is on, the TIMER1 will turn on its "finished" bit and the motor will run. Note that there is no "off delay" here. As soon as the start switch is released, the "timer finished" bit will drop out and the motor will stop. With a little creativity, you can combine timers to provide any timing function you need. |Start +--Motor -+ |Motor | Start | |PB1 | Delay | |INPUT1 TIMER1 | [---] [---------------------------------------------------+--2SEC------+ | | |Motor |Start Run |Delay Motor |TIMER1 OUTPUT1 [---] [-------------------------------------------------------( OUT ) One nice feature of 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. Most PLCs are programmed via a Windows based terminal. Editing, deleting or adding to the ladder logic is usually pretty straightforward. You use the arrow keys or the mouse to add instructions, change addresses or comments, etc. We won’t cover the specifics of keystrokes here, but will concentrate on understanding the ladder logic. These terminals will usually have the capability of programming online or offline. If you are making changes in online mode, be aware that any changes you make and save (or upload) will

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

8

Page 9: Beginner Guide to PLC

alter the program that is being used to run the machine. This requires great care and a full understanding of what will happen when you make the change.

Scan Time One critical difference between a PLC program and the equivalent electrical circuit is the issue of scanning. It works like this in most PLCs: 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. In some newer PLCs, such as Rockwell’s ControlLogix platform, it doesn’t work that way. The inputs are updated during the program scan. In high-speed applications, such as bottling or pharmaceutical lines, this can cause problems.

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

9

Page 10: Beginner Guide to PLC

The Automated Drill Press Now let’s jump right into a project. The best way to learn a programming language is to look at a real world example. However, before you can do any programming, you must have a clear understanding of how the machine works. Let’s say a furniture manufacturer needs to drill a 3/8” hole in a certain spot on a piece of wood. The entire process needs to be automatic. The mechanical and electrical engineers bring you an isometric drawing like the one shown here. Mechanical details have been omitted for clarity, as is often the case in a “concept” drawing.

The main conveyor will transport the part into the machine where the part will meet a pneumatically actuated stop gate. At that time, another pneumatic cylinder will actuate a clamp that will push the part back against the conveyor wall. This will hold the part in place during the drilling process. Photocells will verify that the part is in position; the spindle will lower and proceed to drill a hole in the part. After the hole has been drilled and the spindle has retracted to

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

10

Page 11: Beginner Guide to PLC

its home position, the clamp will release, the stop gate will raise and the part will exit. The cycle then repeats itself for each part that comes down the line.

Sequence of Operation Here is a more detailed explanation of the drilling process:

When the machine starts, the stop gate lowers and the part is moved into position by the main conveyor.

Optical sensors (photoeyes) determine when the part is in place. When the part is positioned correctly, a clamp extends to hold the part in place.

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

11

Page 12: Beginner Guide to PLC

The spindle of the drill press is lowered, and the hole is drilled in the part. A sensor in the drill press spindle tells the PLC when the spindle has reached the end of its travel.

After the hole is drilled, the spindle retracts, the clamp retracts, the stop gate is lifted and the part is carried out of the machine by the main conveyor.

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

12

Page 13: Beginner Guide to PLC

Operator Station An operator station for the machine might look like this. Though the device name, such as PB1, would not show up on the actual station, it is a good idea to show them on your drawing.

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

13

Page 14: Beginner Guide to PLC

I/O Listing It is important to define the I/O (inputs/outputs) before you begin to program. Do not skip this crucial step. Listed below is the I/O arrangement for the Automated Drill Press program. Inputs Address Device Name Device Type Description INPUT1 PB1 pushbutton switch Reset System INPUT2 PB2 pushbutton switch Start System INPUT3 PB3 pushbutton switch Stop System INPUT4 SS4 selector switch System in Auto Mode INPUT5 CR1 relay Emergency Stop Cleared INPUT6 PB6 pushbutton switch Start Press INPUT7 PB7 pushbutton switch Stop Press INPUT10 PB10 pushbutton switch Raise Spindle INPUT11 PB11 pushbutton switch Lower Spindle INPUT12 PB12 pushbutton switch Hold Part In Place INPUT20 MS1AUX aux contacts on motor starter Infeed Conveyor Running INPUT23 MS2AUX aux contacts on motor starter Main Conveyor Running INPUT24 MS5AUX aux contacts on motor starter Drill Press Running INPUT26 LS26 limit switch Guard in Place INPUT27 PS27 air pressure switch Air Pressure Normal INPUT31 PSC31 photo-electric switch Placed in X-Axis INPUT32 PSC32 photo-electric switch Placed in Y-Axis INPUT33 PSC33 photo-electric switch Part at Home INPUT34 PSC34 photo-electric switch Part Cleared INPUT35 PRS35 proximity switch Spindle Raised INPUT36 PRS36 proximity switch Spindle Lowered

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

14

Page 15: Beginner Guide to PLC

Outputs Address Device Name Device Type Description OUTPUT1 MS1 motor starter Run Infeed Conveyor OUTPUT2 MS2 motor starter Run Main Conveyor OUTPUT5 MS5 motor starter Run Drill Press OUTPUT6 DRV1 variable speed drive Raise Spindle OUTPUT7 DRV1 variable speed drive Lower Spindle OUTPUT11 SOL11 solenoid Hold Part in Place OUTPUT12 SOL12 solenoid Lower Drilling Stop Gate OUTPUT20 PL20 pilot light System Running OUTPUT21 PL21 pilot light Drill Press Running OUTPUT22 PL22 pilot light Part in Place OUTPUT23 PL23 pilot light Part Jammed OUTPUT24 PL24 pilot light Motor Overload Detected OUTPUT25 PL25 pilot light Guard Open OUTPUT26 PL26 pilot light Low Air Pressure Internal Coils Address Description COIL1 System Running COIL2 Pilot Light Test COIL4 System in Auto Mode COIL5 System in Manual Mode COIL20 No Part In Machine COIL21 Machine at Home COIL22 Machine in Cycle COIL23 Drilling Operation Complete COIL24 End of Machine Cycle COIL34 Part Jam Detected COIL35 Excessive Drill Time Detected COIL40 Motor Overload Detected COIL50 System Fault

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

15

Page 16: Beginner Guide to PLC

The Program Now that you understand what has to be done and how it is to be accomplished by the mechanical equipment, you can begin writing the program. The text in the fixed font is basically the information that you would see if you were looking at the monitor of the computer or a printout. In actual practice, the fonts used in PLC software vary widely. For the purposes of this book, we want to easily differentiate the program logic from our explanations of the logic. A series of asterisks (*****) indicates a "rung comment." This is descriptive text added to the program, and is seen on the programming monitor, but has no affect on the logic. For purposes of this manual, I have placed additional explanations between rungs. Use a title to name the program and include any general information. | ____________________________________________________________ | | | | | AUTOMATIC DRILL PRESS MACHINE CONTROL | | | PRODUCTION LINE #3 | | | REVISION 2 | | |__________________________________________________________| Machine Safeties It is best to start a program by evaluating any safety switches and setting a master bit. This type of bit is what we call an internal coil. It has no hardwired connection to the outside world. In this case, a latch is used to set an internal “System Running” bit. The “latch” is accomplished by putting a normally open contact around the Start System pushbutton input. If the emergency stop is clear, and the machine guard is in place, and there is no system fault the operator may press the start button to set the latch. If the stop button is pushed or a previous conditions ceases to exist, the “System Running” latch will drop out. Most of the time, the order of the bits in a rung doesn't matter. We could have rearranged any of the bits in this rung, though we would still have to put the latch around the Start pushbutton. The PLC wouldn't care and the output coil would still respond the same. However, to make the rung easier to read, I try to place bits from left to right in order of importance. If the E-Stop is not cleared, then nothing else should matter anyway. Having the safety guard in place is more important than a system fault. Now, if those requirements have been met, we can press the start button. And we don't care about the stop button until we have pushed the start button. Note the instruction used for the input of PB3, the Stop System bit. It may seem backwards at first, since a hard-wired circuit would use the normally closed contacts of the switch. In fact, the

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

16

Page 17: Beginner Guide to PLC

switch is wired in the failsafe position, using the normally closed contacts as the input to the PLC. The E-Stop and the guard limit switch are called "safety interlocks." NEVER rely on a PLC to stop a machine if a contact of a safety interlock is open. ALWAYS use an interlock in a hardwired, fail-safe circuit. Use additional contacts from the switches and wire them to inputs of the PLC so that it knows the machine is to be stopped, or has stopped. It is very important to label the bits properly. Arrange the verbs and nouns correctly. If you do, the rung will read like a sentence. You can look at this rung and say “If the Emergency Stop is Cleared and the Guard is in Place and there is no System Fault and the Start System button is pressed and the Stop System button is not pressed the System Running coil will turn on and latch itself”. There are some simple rules that I always follow when I am writing a description for a bit:

- Descriptions for bits portray an action. - Descriptions are written to describe the “normally open” condition of the bit.

- The description is true when the normally open instruction of the bit is on.

- The description is false when the normally open instruction of the bit is off.

| ***** Ensure all machine safeties have been made to allow | the system to be enabled. | |EmergStop Guard in Start Stop |Cleared Place System System System System |CR1 LS26 Fault PB2 PB3 Running | INPUT5 INPUT26 COIL50 INPUT2 INPUT3 COIL1 1 [---] [--------] [--------]/[----+----] [----+----] [----------( OUT ) | | | | | | | | System | | | Running | | | COIL1 | | +----] [----+

The main reason for setting a master “System Running” bit is to simplify the program. For example, we don’t want the spindle motor to run if the e-stop has been pressed, or if the guard is not in place, or if there is a system fault. Rather than putting all of these bits in the rung that controls the spindle motor, we can summarize all of these bits and make the “System Running” bit. We can then place just that bit in the rung that controls the spindle motor and know that we have met all the criteria to allow the spindle motor to run.

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

17

Page 18: Beginner Guide to PLC

Pilot Light Test The next two rungs provide a pilot light test. The idea is to turn on all the pilot lights for a couple of seconds so you can verify that all the lights work. This feature is very handy when you are troubleshooting a machine. When the Emergency stop is first cleared, Timer 0 is started. | ***** Perform a pilot light test upon clearing the | emergency stop. | | | +--Pilot-+ |EmergStop | Light | |Cleared | Test | |CR1 | Time | |INPUT5 TIMER0 | 2 [---] [----------------------------------------------------+--2SEC--+ | | | During the period when the Emergency Stop is clear but the timer is not finished, the Pilot Light Test bit is on. The result is that all the pilot lights will turn on for two seconds after the E-Stop is cleared. This bit is then used throughout the program. | ***** Test the pilot lights. | |EmergStop Pilot Pilot |Cleared Light Light |CR1 Test Time Test |INPUT5 TIMER0 COIL2 3 [---] [-------]/[----------------------------------------------( OUT ) |

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

18

Page 19: Beginner Guide to PLC

Indicate The System Is Operational Let the operator know that the safeties have been made and the machine is ready to run. | | ***** Indicate the system is operational. | | | System |System Running |Running PL20 | COIL1 OUTPUT20 4 [---] [---+----------------------------------------------------( OUT ) | | |Pilot | |Light | |Test | |COIL2 | [---] [---+ | | Machine Operation Mode Here we look at the Manual/Auto Mode selector switch to set the machine mode. You want to enable certain machine functions in Auto Mode, and disable some in Manual Mode, and vice versa. Notice how the System Running bit is used. If we lose that bit, such as when the emergency stop is pressed or the machine guard is opened, neither mode is valid. The state of the bits below indicates that the System Mode Selector switch is in “Auto”. | | ***** Determine the mode of machine operation. | | | System In System in |System Auto Mode Manual |Running SS4 Mode | COIL1 INPUT4 COIL5 5 [---] [-------]/[--------------------------------------------( OUT ) | | | | System In |System Auto Mode System in |Running SS4 Auto Mode | COIL1 INPUT4 COIL4 6 [---] [-------] [--------------------------------------------( OUT ) |

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

19

Page 20: Beginner Guide to PLC

Run The Spindle Drive Motor This rung turns on the drill press spindle motor. It will come on immediately in automatic mode, but it can also be controlled by the “Start Press” and “Stop Press” switches in manual mode. | ***** Run the spindle drive motor of the drill press. A | manual mode is provided to allow ease of set-up. | | | Run Drill |System in Press |Auto Mode MS5 | COIL4 OUTPUT5 7 [---] [-----------------------+----------------------------( OUT ) | | |SystemIn Start Stop | |Manual Press Press | |Mode PB6 PB7 | | COIL5 INPUT6 INPUT7 | [---] [---+---] [---+---] [---+ | | | | |Run Drill| | |Press | | |MS5 | | | OUTPUT5 | | +---] [---+ | Indicate The Spindle Drive Is Running Turn on the pilot light to let the operator know the motor is running. | | ***** Indicate the drill press is running. | | |Run Drill DrillPres |Press Running |MS5 PL21 | OUTPUT5 OUTPUT21 8 [---] [---+------------------------------------------------( OUT ) | | |Pilot | |Light | |Test | | COIL2 | [---] [---+

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

20

Page 21: Beginner Guide to PLC

Run The Infeed Conveyor Run the conveyor all the time when the machine is in auto mode. Note the use of the “System In Auto Mode” bit to ensure all machine safety conditions have been met. | | ***** Run the infeed conveyor if the machine is | in automatic mode. | | | RunInfeed |System in Conveyor |Auto Mode MS1 | COIL4 OUTPUT1 9 [---] [---------------------------------------------------( OUT ) | | Ensure There Are No Parts In The Machine You want to make sure there are no parts in the machine before you start a cycle. These photoeyes are positioned so that if they "see" a part, they will turn on the input. A part will break the beam, the input will turn on and you know you have a part present. In this rung, we want to make sure there is no part in the machine. The rung will only be true if all the photoeyes indicate there is not a part present. | | ***** Ensure there are no parts in the machine to start the | drilling cycle. | | |Placed in Placed in Part at Part No Part |X-Axis Y-Axis Home Cleared In |PSC31 PSC32 PSC33 PSC34 Machine | INPUT31 INPUT32 INPUT33 INPUT34 COIL20 10 [---]/[---------]/[---------]/[---------]/[-------------------( OUT ) | |

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

21

Page 22: Beginner Guide to PLC

Ensure All Components Are At Home Make sure all the moving parts of the machine are at their initial or "home" position before you allow any automatic motion to begin. This is standard on most machines. | ***** Ensure all components are at home. | | |Hold Part Drilling Spindle |In Place Stop Gate Raised Machine |SOL11 SOL12 PRS35 At Home |OUTPUT11 OUTPUT12 INPUT35 COIL21 11 [---]/[---------]/[---------] [--------------------------( OUT ) | Begin The Cycle Here is the rung that starts the machine's automatic cycle. When the operator goes to Auto Mode, and there are no parts in the machine, and the machine components are at home, the cycle will begin. You might ask, "If there is a part in the press, wouldn't the machine start running as soon as the operator took the part out?" The answer has to be no. You don't want this machine to start running when someone clears a part. In our case, to remove a part the operator would have to open the machine guard door in order to physically remove the part, and that would kick the machine out of automatic mode. He would have to close the guard and start the machine again. | | ***** Begin the cycle when the part has cleared the machine | and all components are at home. Bit coil22 will stay on | during the entire drilling cycle and drop out when an end of cycle | signal is generated. | | | No Part End of |System in In Machine Machine Machine |Auto Mode Machine At Home Cycle In Cycle | COIL4 COIL20 COIL21 COIL24 COIL22 12 [---] [---+---] [-------] [---+---]/[--------------------------( OUT ) | | | | | | | |Machine | | |In Cycle | | | COIL22 | | +---] [-------------+ |

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

22

Page 23: Beginner Guide to PLC

Lower The Stop Gate Lower the stop gate when the machine is in cycle. | ***** Lower the stop gate to stop the part under the | spindle. | | | Drilling |Machine Stop Gate |In Cycle SOL12 | COIL22 OUTPUT12 13 [---] [-----------------------------------------------( OUT ) | Run The Main Conveyor Bring the part into position by running the conveyor in the press. Note that the PLC will stop the conveyor after the part has been clamped in place (Rung 16), but until that happens, the conveyor will run. | | ***** Run the main conveyor unless a part is being clamped. | | | Hold Part Run Main |System in In Place Conveyor |Auto Mode SOL11 MS2 | COIL4 OUTPUT11 OUTPUT2 14 [---] [---------]/[-----------------------------------------( OUT ) |

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

23

Page 24: Beginner Guide to PLC

Indicate The Part Is In Place The photoeye PSC33 is physically placed so that the part will block the beam of the photoeye when the part is in place. This rung will let the operator know that. | ***** Indicate the part is in place and ready to be drilled. | | |Part at Part In |Home Place |PSC33 PL22 |INPUT33 OUTPUT22 15 [---] [---------------------------+-------------------------( OUT ) | | |Pilot | |Light | |Test | | COIL2 | [---] [---------------------------+ Clamp The Part In Place When the part is in position, the PLC will clamp it in place. Since the “Hold Part In Place” bit is used in Rung 14, the main conveyor will stop running. Also, a manual method of holding the part has been provided for machine set-up. | | ***** Clamp the part in place after it has reached the | proper position. | | | Part at Hold Part |Machine Home In Place |In Cycle PSC33 SOL11 | COIL22 INPUT33 OUTPUT11 16 [---] [---------] [-----------------------------+-------( OUT ) | | |System in Hold Part | |Manual In Place | |Mode PB12 | | COIL4 INPUT12 | [---] [---------] [-----------------------------+ | |

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

24

Page 25: Beginner Guide to PLC

Lower The Spindle The spindle of the press is a variable speed motor. This particular drive has two inputs; one to make the motor go forward (move the spindle down) and one to make the motor go in reverse (move the spindle up). So, when the part is held in place, the PLC will command the drive to lower the spindle until it reaches the lower limit (Spindle Lowered) proximity switch. The Raise Spindle bit (OUTPUT6) from Rung 19 is used to keep the drive from trying to lower the spindle until after the drilling has been completed. We don’t want to tell the spindle to lower and raise at the same time. | | ***** After the part has been clamped in place, lower the | spindle. The feed rate is determined by a variable speed | drive. | | | Hold Part Spindle Raise Lower |Machine In Place Lowered Spindle Spindle |In Cycle SOL11 PRS36 DRV1RAISE DRV1LOWER | COIL22 OUTPUT11 INPUT36 OUTPUT6 OUTPUT7 17 [---] [---+---] [---+---]/[-------]/[---+----------------( OUT ) | | |System in Lower | |Manual Spindle | |Mode PB11 | | COIL5 INPUT11 | [---] [-------] [-----------------------+ |

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

25

Page 26: Beginner Guide to PLC

Drilling Operation Is Complete When the spindle has reached the end of travel and activates the Spindle Lowered prox switch, an internal bit is set to indicate that the drilling operation is complete. | | ***** The drilling operation is complete if the spindle | reaches the lower limit in automatic mode. | | | Spindle Drilling |Machine Lowered Operation |In Cycle PRS36 Complete | COIL22 INPUT36 COIL23 18 [---] [---+---] [---+--------------------------------------( OUT ) | | | | |Drilling | | |Operation| | |Complete | | | COIL23 | | +---] [---+ |

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

26

Page 27: Beginner Guide to PLC

Return The Spindle To Its Home Position After the drilling operation is complete, a latch is set to raise the spindle. Since the spindle is below the SPINDLE RAISED proximity switch, the PLC will tell the spindle to raise. As soon as the spindle reaches the upper end of travel and trips the SPINDLE RAISED proximity switch, the latch drops out. A manual method of raising the spindle is also provided. | | ***** After the spindle has reached the lower limit of its | travel, return the spindle to its home position. | | | Drilling Spindle Raise |Machine Operation Raised Spindle |In Cycle Complete PRS35 DRV1RAISE | COIL22 COIL23 INPUT35 OUTPUT6 19 [---] [---+---] [---+-----]/[---+----------------------------( OUT ) | | | | | |Raise | | | |Spindle | | | |DRV1RAISE| | | | OUTPUT6 | | | +---] [---+ | | | |System in Raise | |Manual Spindle | |Mode PB10 | | COIL5 INPUT10 | [---] [----------] [------------+ | |

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

27

Page 28: Beginner Guide to PLC

Machine Cycle Is Complete This rung terminates the machine cycle. The drilling is done and the spindle is back in its home position, so the End of Machine Cycle bit is latched. When this bit goes high, it causes the Machine In Cycle latch to drop out (Rung 12). This in turns raises the stop gate (Rung 13), releases the part (Rung 15) and turns on the main conveyor (Rung 14). The End of Machine Cycle latch drops out when the Machine In Cycle bit goes low. When the part clears all the photoeyes, the stop gate lowers and the machine waits for another part. | ***** The machine cycle is complete if the drilling | operation is complete and the spindle is raised. | | | Drilling Spindle End of |Machine Operation Raised Machine |In Cycle Complete PRS35 Cycle | COIL22 COIL23 INPUT35 COIL24 20 [---] [---+---] [---------] [---+---------------------------( OUT ) | | | | |End of | | |Machine | | |Cycle | | | COIL24 | | +---] [---------------+

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

28

Page 29: Beginner Guide to PLC

Fault Detection And System Diagnostics This section of the program evaluates problems and monitors the machine. The machine would still run without these rungs, but they make life a lot easier for the operators and could prevent the machine from damaging itself. | ____________________________________________________________ | | | | | FAULT DETECTION AND SYSTEM DIAGNOSTICS | | |__________________________________________________________| Personnel Safety Guard Door Let the operator know if the guard door is open. You might think this should be obvious, but it is nice to have a red light come on when a safety gate is open. It makes people take a little more care when working around the machine. | **** Indicate if the personnel safety guard door is open. | |Guard in Guard |Place Open |LS26 PL25 | INPUT26 OUTPUT25 21 [---]/[---+------------------------------------------------( OUT ) | | |Pilot | |Light | |Test | | COIL2 | [---] [---+

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

29

Page 30: Beginner Guide to PLC

Low Compressed Air Pressure It is a good idea to keep track of the compressed air pressure. The machine will not operate properly if there is insufficient air pressure. You can put it on a fairly long time delay, because you don't care about momentary drops in pressure, like a second or two. But when it does drop beyond the lower limit for enough time, you want the machine to stop. You also want it to latch so you know why the machine stopped running. The air pressure could come back up before the operator sees the pilot light, and he would be left scratching his head. The latch is reset by the Reset System pushbutton. | ***** Detect abnormally low compressed air pressure. | | |AirPressr +--Air -+ |Normal | Pressure | |PS27 | Abnormal | | INPUT27 TIMER27 | 22 [---]/[-------------+---------------------------------+---4SEC-----+ | | |Air Reset | |Pressure System | |Abnormal PB1 | | TIMER27 INPUT1 | [---] [-------]/[---+ | | | ***** Indicate abnormally low air pressure. | |Air Low Air |Pressure Pressure |Abnormal PL26 | TIMER27 OUTPUT26 23 [---] [---+-------------------------------------------------( OUT ) | | |Pilot | |Light | |Test | | COIL2 | [---] [---+

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

30

Page 31: Beginner Guide to PLC

Motor Starter Overload If the auxiliary contacts in the motor starters don't pull in after one second, there is some kind of problem. You have to look at each one individually. | ***** The starter is assumed to be overloaded if the aux | contact does not pull in after 1 second. | |RunInfeed InfedConv +--Infeed -+ |Conveyor Running | Conveyor | |MS1 MS1AUX | Overload | | OUTPUT1 INPUT20 TIMER1 | 24 [---] [-------]/[-------------------------------------+--1SEC------+ | | | |Run Main Main Conv +--Main -+ |Conveyor Running | Conveyor | |MS2 MS2AUX | Overload | | OUTPUT2 INPUT23 TIMER3 | 25 [---] [-------]/[-------------------------------------+---1SEC-----+ | | |Run Drill DrillPres +--Drill -+ |Press Running | Press | |MS5 MS5AUX | Overload | |OUTPUT5 INPUT24 TIMER5 | 26 [---] [-------]/[-------------------------------------+---1SEC-----+ | |

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

31

Page 32: Beginner Guide to PLC

Latch The Motor Overload Detection If any of the overload timers finish, latch the alarm bit. When the operator presses the “Reset System” pushbutton, the alarm will be cleared. | ***** Latch the motor overload detection. | |Infeed Reset Motor |Conveyor System Overload |Overload PB1 Detected | TIMER1 INPUT1 COIL40 27 [---] [---+---]/[-------------------------------------------( OUT ) | | |Main | |Conveyor | |Overload | | TIMER3 | [---] [---] | | |Drill | |Press | |Overload | | TIMER5 | [---] [---] | | |Motor | |Overload | |Detected | | COIL40 | [---] [---+

Indicate A Motor Overload Condition Display the alarm. | ***** Indicate a motor overload condition. | | |Motor Motor |Overload Overload |Detected PL24 | COIL40 OUTPUT24 28 [---] [---+-------------------------------------------------( OUT ) | | |Pilot | |Light | |Test | | COIL2 | [---] [---+

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

32

Page 33: Beginner Guide to PLC

Jammed Part Detection Rung 30 contains what is known as a "watchdog timer." A watchdog timer keeps track of the amount of time it takes for a machine to complete a given process. If a part is sitting in the machine for more than 30 seconds while the machine is in cycle, then the part is probably jammed. This is also a good indication of a photoeye that has become dirty and blocked. It will also tell you if a conveyor belt stopped turning. | ***** A part is jammed if a photocell detects a part for | more than 30 seconds during the machine cycle. | | Placed in +--Part -+ |Machine X-Axis | Jam | |In Cycle PSC31 | Time | | COIL22 INPUT31 TIMER34 | 29 [---] [---+---] [---+---------------------------------+--30SEC-----+ | | | | |Placed in| | |Y-Axis | | |PSC32 | | | INPUT32 | | [---] [---] | | | | |Part at | | |Home | | |PSC33 | | | INPUT33 | | [---] [---] | | | | |Part | | |Cleared | | |PSC34 | | | INPUT34 | | +---] [---+

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

33

Page 34: Beginner Guide to PLC

Latch The Part Jammed Detection | ***** Latch the part jammed detection. | |Part |Jam Part Jam |Time Detected | TIMER34 COIL34 30 [---] [-------------+---------------------------------------( OUT ) | | | Reset | |Part Jam System | |Detected PB1 | | COIL34 INPUT1 | [---] [-------]/[---+ | | Indicate A Part Jammed Condition | ***** Indicate a part jammed condition. | | Part |Part Jam Jammed |Detected PL23 | COIL34 OUTPUT23 31 [---] [---+------------------------------------------------( OUT ) | | |Pilot | |Light | |Test | | COIL2 | [---] [---+

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

34

Page 35: Beginner Guide to PLC

Monitor The Drill Time Keep an eye on the drill time. If this timer finishes, there could be a bad prox switch, a broken drill bit or a spindle drive malfunction. | ***** Monitor the drill time. | | Spindle +--Drill -+ |Machine Raised | Watchdog | |In Cycle PRS35 | Timer | | COIL22 INPUT35 TIMER35 | 32 [---] [-------]/[-------------------------------------+---8SEC-----+ | | ***** Latch the excessive drill time detection. | |Drill Excessive |Watchdog DrillTime |Timer Detected | TIMER35 COIL35 33 [---] [-------------+--------------------------------------( OUT ) | | |Excessive Reset | |DrillTime System | |Detected PB1 | | COIL35 INPUT1 | [---] [-------]/[---+

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

35

Page 36: Beginner Guide to PLC

Summarize The Fault Conditions This rung puts all the faults together to supply one bit to shut off the machine if any of these problems are detected. The “System Fault” (COIL50) is used, as you recall, in Rung 1 to stop the machine if there is any problem. | | ***** Summarize the fault conditions and stop all machine | motion if any one of these faults occur. | | |Guard in |Place System |LS26 Fault | INPUT26 COIL50 34 [---]/[---+-----------------------------------------------( OUT ) | | |Air | |Pressure | |Abnormal | | TIMER27 | [---] [---] | | |Motor | |Overload | |Detected | | COIL40 | [---] [---] | | | | |Part Jam | |Detected | | COIL34 | [---] [---] | | |Excessive| |DrillTime| |Detected | | COIL35 | +---] [---+

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

36

Page 37: Beginner Guide to PLC

13 Marks Of A Well Written Program A well written program will: - meet the specified production requirements of time a quality control. - always tells the operator why the PLC stopped the machine. - be as simple as possible. - use a minimum of ladder logic. - not violate any specs (NEC, JIC, client, etc.) - make the machine easy to start and operate. - recover well from a fault. - tolerate physical variations and mechanical adjustment (changing belt speed, deviations in air pressure, cylinder speeds, etc.) - detect bad machine components, if at all possible. - be easy to understand and troubleshoot. - stand the test of time. - not let the machine break itself. - make the machine sound good and run smoothly.

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

37

Page 38: Beginner Guide to PLC

General PLC Tips Here are a few general PLC tips: The only true test of program integrity and reliability is time. If someone tells you about problem with a program that has been running for few days, consider the program. If the program has been running for a few months, consider other potential problems, such as a hardware failure of a peripheral device. Get as many different PLC programming manuals as you can find and hold onto them. Many companies use PLCs that are older models, and you never know when you might run across one. Avoid putting two devices in series on a PLC input, or paralleling two devices on an output. Most always, you will end up regretting it. Assign wire numbers and device numbers going from your I/O to match the respective input or output. Don't use timers in the process loop of a program. Write event-triggered programs, based on actual changes in temperature, position, speed and so on. Backup your program files frequently, but don't erase your old files until you are sure you don't need them. Always know how to retrace your footsteps.

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

38

Page 39: Beginner Guide to PLC

The Automated Drill Press in Rockwell Automation’s RSLogix 500

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. I used a generic style of ladder logic in the first part of the book to explain the fundamentals of ladder logic. This style was chosen because it applies to all types of PLCs. To give you a better understanding of how the program would look in a real world situation, I have included the same Automated Drill Press program as it would appear if it were written in Allen-Bradley’s RSLogix. Here is an example:

I will give you a brief outline of the differences between the generic format of ladder logic that I used and RSLogix’s format: First, though, the address descriptions and the rung comments are the same in the RSLogix program as they are in the generic program. Despite what the numbers say under the

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

39

Page 40: Beginner Guide to PLC

instruction, “System in Auto Mode” is the same bit here as the “System in Auto Mode” is in the generic program. Outputs Allen-Bradley labels their outputs starting with a capital “O”, whereas we used “output” in the generic program. In the rung above, “O:3/2” is the same bit as “OUTPUT5” in our generic program. “1746-O*16” indicates the type of output module. Inputs Allen-Bradley labels their inputs starting with a capital “I”, whereas we used “input”. In the rung above, “I:1/5” is the same bit as “INPUT5” in our generic program. “1746-I*16” indicates the type of input module. Coils (internal bits) Allen-Bradley labels most their internal “coils” starting with a capital “B3”, whereas we used “out”. In the rung above, “B3:0/2” is the same bit as “COIL4” in our generic program. Cross Reference The RSLogix program shows cross-referencing. The number “2:5” under the first instruction means that the output (or, “coil”) for that address is found in file 2, rung 5. “2” is the first, and default, data file of a ladder in RSLogix. The output O:3/2 shows that its “contacts” are found on rungs 6, 7 and 25 of data file 2. Rung Numbers RSLogix starts with rung 0000 – the generic program starts with rung 1, so the rung numbers shown in the RSLogix program will be one less than the rung numbers in the generic program. Logic Flow Bits that are true in our RSLogix program are shown with a green highlight. This RSLogix ladder printout above is a snapshot showing the system in automatic mode, the part is in place and the drill bit is being lowered. There are no faults. Other Information RSLogix will provide a variety of information regarding the program and hardware. I have included those pages here. If you want to gain a firm understanding of RSLogix, you may be interested in PLC Programming with RSLogix 500 How to Program an Allen-Bradley SLC 500 with Rockwell Automation’s RSLogix 500. This ebook provides a step-by-step tutorial on how to create an automatic batching program in Allen-Bradley’s RSLogix 500. It is published exclusively by Modern Media and is available at http://www.modernmediaonline.com.

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

40

Page 41: Beginner Guide to PLC

RSLogix500 Project Report

Page 42: Beginner Guide to PLC

DRILPRES.RSS

Processor Information

Processor Type: 1747-L553B 5/05 CPU - 64K Mem. OS501 Series C

Processor Name: DRILPRES

Total Memory Used: 173 Instruction Words Used - 127 Data Table Words Used

Total Memory Left: 61267 Instruction Words Left

Program Files: 3

Data Files: 9

Program ID: d065

Page 43: Beginner Guide to PLC

DRILPRES.RSS

I/O Configuration

0 1747-L553B 5/05 CPU - 64K Mem. OS501 Series C 1 1746-I*16 Any 16pt Discrete Input Module 2 1746-I*16 Any 16pt Discrete Input Module 3 1746-O*16 Any 16pt Discrete Output Module

Page 44: Beginner Guide to PLC

DRILPRES.RSS

Channel Configuration

GENERAL Channel 1 Write Protected: No Channel 1 Edit Resource/Owner Timeout: 60 Channel 1 Passthru Link ID: 2 Channel 1 Diagnostic File: 0

Channel 0 Write Protected: No Channel 0 Edit Resource/Owner Timeout: 60 Channel 0 Passthru Link ID: 1 Channel 0 Current Mode: System Channel 0 Mode Change Enabled: No Channel 0 Mode Change Attention Character: \1b Channel 0 Mode Change System Character: S Channel 0 Mode Change User Character: U Channel 0 Diagnostic File: 0

CHANNEL 1 (SYSTEM) - Driver: Ethernet Broadcast Address: 0.0.0.0 Hardware Address: 00:00:00:00:00:00 IP Address: 0.0.0.0 Subnet Mask: 0.0.0.0 Gateway Address: 0.0.0.0 Msg Connection Timeout (x 1mS): 15000 Msg Reply Timeout (x mS): 3000 Inactivity Timeout (x Min): 30 Bootp Enable: Yes Bootp Valid: No Contact: Location:

CHANNEL 0 (SYSTEM) - Driver: DF1 Full Duplex Source ID: 0 (decimal) Baud: 19200 Parity: NONE Stop Bits: 1 Control Line : No Handshaking Error Detection: CRC Embedded Responses: Enabled Duplicate Packet Detect: Yes ACK Timeout: 50 NAK Retries: 3 ENQ Retries: 3

CHANNEL 0 (USER) - Driver: ASCII Baud: 19200 Parity: NONE Stop Bits: 1 Data Bits: 8 Control Line : No Handshaking Delete mode: Ignore Echo: No XON/XOFF: No Termination Character 1: \d Termination Character 2: \ff Append Character 1: \d Append Character 2: \a

Page 45: Beginner Guide to PLC

DRILPRES.RSS

Program File List

Name Number Type Rungs Debug Bytes

[SYSTEM] 0 SYS 0 No 0 1 SYS 0 No 0MAIN 2 LADDER 35 No 1182

Page 46: Beginner Guide to PLC

DRILPRES.RSS

Data File List

Name Number Type Scope Debug Words Elements Last

OUTPUT 0 O Global No 3 1 O:0INPUT 1 I Global No 6 2 I:1STATUS 2 S Global No 0 83 S:82BINARY 3 B Global No 1 1 B3:0TIMER 4 T Global No 108 36 T4:35COUNTER 5 C Global No 3 1 C5:0CONTROL 6 R Global No 3 1 R6:0INTEGER 7 N Global No 1 1 N7:0FLOAT 8 F Global No 2 1 F8:0

Page 47: Beginner Guide to PLC

DRILPRES.RSS

LAD 2 - MAIN --- Total Rungs in File = 35

Ensure all machine safeties have been made to allow the system to be enabled.

0000I:1/4

1746-I*16

EmergStopClearedCR1

I:2/4

1746-I*16

Guard inPlaceLS26

B3:0/12

SystemFault

2:33

I:1/1

1746-I*16

StartSystemPB2

B3:0/0

SystemRunning

2:0

I:1/2

1746-I*16

StopSystemPB3

B3:0/0

SystemRunning

B3:0/0 - XIC - 2:0, 2:3, 2:4 2:5

Perform a pilot light test upon clearing the emergency stop.

0001I:1/4

1746-I*16

EmergStopClearedCR1

EN

DN

TONTimer On DelayTimer T4:0Time Base 1.0Preset 2<Accum 2<

TON

PilotLightTest Time

T4:0/DN - XIO -2:2

Test the pilot lights.

0002I:1/4

1746-I*16

EmergStopClearedCR1

T4:0/DN

PilotLightTest Time

2:1

B3:0/1

PilotLightTest

B3:0/1 - XIC - 2:3, 2:7, 2:14 2:20, 2:22, 2:27 2:30

Indicate the system is operational.

0003B3:0/0

SystemRunning

2:0

B3:0/1

PilotLightTest

2:2

O:3/7

1746-O*16

SystemRunningPL20

Page 48: Beginner Guide to PLC

DRILPRES.RSS

LAD 2 - MAIN --- Total Rungs in File = 35

Determine the mode of machine operation.

0004B3:0/0

SystemRunning

2:0

I:1/3

1746-I*16

System inAuto ModeSS4

B3:0/3

System inManualMode

B3:0/3 - XIC - 2:6, 2:15, 2:16 2:18

0005B3:0/0

SystemRunning

2:0

I:1/3

1746-I*16

System inAuto ModeSS4

B3:0/2

System inAuto Mode

B3:0/2 - XIC - 2:6, 2:8, 2:11 2:13

Run the spindle drive motor of the drill press. A manual mode is provided to allow ease of set-up.

0006B3:0/2

System inAuto Mode

2:5

B3:0/3

System inManualMode

2:4

I:1/5

1746-I*16

StartPressPB6

O:3/2

1746-O*16

Run DrillPressMS5

2:6

I:1/6

1746-I*16

StopPressPB7

O:3/2

1746-O*16

Run DrillPressMS5

O:3/2 - XIC - 2:6, 2:7, 2:25

Indicate the drill press is running.

0007O:3/2

1746-O*16

Run DrillPressMS5

2:6

B3:0/1

PilotLightTest

2:2

O:3/8

1746-O*16

DrillPressRunningPL21

Page 49: Beginner Guide to PLC

DRILPRES.RSS

LAD 2 - MAIN --- Total Rungs in File = 35

Run the infeed conveyor if the machine is in automatic mode.

0008B3:0/2

System inAuto Mode

2:5

O:3/0

1746-O*16

Run InfeedConveyorMS1

O:3/0 - XIC -2:23

Ensure there are no parts in the machine to start the drilling cycle.

0009I:2/6

1746-I*16

Placed inX-AxisPSC31

I:2/7

1746-I*16

Placed inY-AxisPSC32

I:2/8

1746-I*16

Part atHomePSC33

I:2/9

1746-I*16

PartClearedPSC34

B3:0/4

No PartInMachine

B3:0/4 - XIC -2:11

Ensure all components are at home.

0010O:3/5

1746-O*16

Hold Partin PlaceSOL11

2:15

O:3/6

1746-O*16

DrillingStop GateSOL12

2:12

I:2/10

1746-I*16

SpindleRaisedPRS35

B3:0/5

Machineat Home

B3:0/5 - XIC -2:11

Begin the cycle when the part has cleared the machine and all components are at home. Bit B3:0/6 will stay onduring the entire drilling cycle and drop out when an end of cycle signal is generated.

0011B3:0/2

System inAuto Mode

2:5

B3:0/4

No PartInMachine

2:9

B3:0/5

Machineat Home

2:10

B3:0/6

Machinein Cycle

2:11

B3:0/8

End ofMachineCycle

2:19

B3:0/6

Machinein Cycle

B3:0/6 - XIC - 2:11, 2:12, 2:15 2:16, 2:17, 2:18 2:19, 2:28, 2:31

Lower the stop gate to stop the part under the spindle.

0012B3:0/6

Machinein Cycle

2:11

O:3/6

1746-O*16

DrillingStop GateSOL12

O:3/6 - XIO -2:10

Page 50: Beginner Guide to PLC

DRILPRES.RSS

LAD 2 - MAIN --- Total Rungs in File = 35

Run the main conveyor unless a part is being clamped.

0013B3:0/2

System inAuto Mode

2:5

O:3/5

1746-O*16

Hold Partin PlaceSOL11

2:15

O:3/1

1746-O*16

Run MainConveyorMS2

O:3/1 - XIC -2:24

Indicate the part is in place and ready to be drilled.

0014I:2/8

1746-I*16

Part atHomePSC33

B3:0/1

PilotLightTest

2:2

O:3/9

1746-O*16

Part inPlacePL22

Clamp the part in place after it has reached the proper position.

0015B3:0/6

Machinein Cycle

2:11

I:2/8

1746-I*16

Part atHomePSC33

B3:0/3

System inManualMode

2:4

I:1/9

1746-I*16

Hold PartIn PlacePB12

O:3/5

1746-O*16

Hold Partin PlaceSOL11

O:3/5 - XIC -2:16 XIO - 2:10, 2:13

After the part has been clamped in place, lower the spindle. The feed rate is determined by a variable speeddrive.

0016B3:0/6

Machinein Cycle

2:11

O:3/5

1746-O*16

Hold Partin PlaceSOL11

2:15

I:2/11

1746-I*16

SpindleLoweredPRS36

O:3/3

1746-O*16

RaiseSpindleDRV1RAISE

2:18

B3:0/3

System inManualMode

2:4

I:1/8

1746-I*16

LowerSpindlePB11

O:3/4

1746-O*16

LowerSpindleDRV1LOWER

Page 51: Beginner Guide to PLC

DRILPRES.RSS

LAD 2 - MAIN --- Total Rungs in File = 35

The drilling operation is complete if the spindle reaches the lower limit in automatic mode.

0017B3:0/6

Machinein Cycle

2:11

I:2/11

1746-I*16

SpindleLoweredPRS36

B3:0/7

DrillingOperationComplete

2:17

B3:0/7

DrillingOperationComplete

B3:0/7 - XIC - 2:17, 2:18, 2:19

After the spindle has reached the lower limit of its travel, return the spindle to its home position.

0018B3:0/6

Machinein Cycle

2:11

B3:0/7

DrillingOperationComplete

2:17

O:3/3

1746-O*16

RaiseSpindleDRV1RAISE

2:18

I:2/10

1746-I*16

SpindleRaisedPRS35

B3:0/3

System inManualMode

2:4

I:1/7

1746-I*16

RaiseSpindlePB10

O:3/3

1746-O*16

RaiseSpindleDRV1RAISE

O:3/3 - XIC -2:18 XIO -2:16

The machine cycle is complete if the drilling operation is complete and the spindle is raised.

0019B3:0/6

Machinein Cycle

2:11

B3:0/7

DrillingOperationComplete

2:17

I:2/10

1746-I*16

SpindleRaisedPRS35

B3:0/8

End ofMachineCycle

2:19

B3:0/8

End ofMachineCycle

B3:0/8 - XIC -2:19 XIO -2:11

Page 52: Beginner Guide to PLC

DRILPRES.RSS

LAD 2 - MAIN --- Total Rungs in File = 35

Indicate if the personnel safety guard door is open.

0020I:2/4

1746-I*16

Guard inPlaceLS26

B3:0/1

PilotLightTest

2:2

O:3/12

1746-O*16

GuardOpenPL25

Detect abnormally low compressed air pressure.

0021I:2/5

1746-I*16

AirPressureNormalPS27

T4:27/DN

AirPressureAbnormal

2:21

I:1/0

1746-I*16

ResetSystemPB1

EN

DN

TONTimer On DelayTimer T4:27Time Base 1.0Preset 4<Accum 0<

TON

AirPressureAbnormal

T4:27/DN - XIC - 2:21, 2:22, 2:33

Indicate abnormally low air pressure.

0022T4:27/DN

AirPressureAbnormal

2:21

B3:0/1

PilotLightTest

2:2

O:3/13

1746-O*16

Low AirPressurePL26

The starter is assumed to be overloaded if the aux contact does not pull in after 1 second.

0023O:3/0

1746-O*16

Run InfeedConveyorMS1

2:8

I:2/0

1746-I*16

InfedConvRunningMS1AUX

EN

DN

TONTimer On DelayTimer T4:1Time Base 1.0Preset 1<Accum 0<

TON

InfeedConveyorOverload

T4:1/DN - XIC -2:26

Page 53: Beginner Guide to PLC

DRILPRES.RSS

LAD 2 - MAIN --- Total Rungs in File = 35

0024O:3/1

1746-O*16

Run MainConveyorMS2

2:13

I:2/1

1746-I*16

Main ConvRunningMS2AUX

EN

DN

TONTimer On DelayTimer T4:3Time Base 1.0Preset 1<Accum 0<

TON

MainConveyorOverload

T4:3/DN - XIC -2:26

0025O:3/2

1746-O*16

Run DrillPressMS5

2:6

I:2/2

1746-I*16

DrillPresRunningMS5AUX

EN

DN

TONTimer On DelayTimer T4:5Time Base 1.0Preset 1<Accum 0<

TON

DrillPressOverload

T4:5/DN - XIC -2:26

Latch the motor overload detection.

0026T4:1/DN

InfeedConveyorOverload

2:23

T4:3/DN

MainConveyorOverload

2:24

T4:5/DN

DrillPressOverload

2:25

B3:0/11

MotorOverloadDetected

2:26

I:1/0

1746-I*16

ResetSystemPB1

B3:0/11

MotorOverloadDetected

B3:0/11 - XIC - 2:26, 2:27, 2:33

Page 54: Beginner Guide to PLC

DRILPRES.RSS

LAD 2 - MAIN --- Total Rungs in File = 35

Indicate a motor overload condition.

0027B3:0/11

MotorOverloadDetected

2:26

B3:0/1

PilotLightTest

2:2

O:3/11

1746-O*16

MotorOverloadPL24

A part is jammed if a photocell detects a part for more than 30 seconds during the machine cycle.

0028B3:0/6

Machinein Cycle

2:11

I:2/6

1746-I*16

Placed inX-AxisPSC31

I:2/7

1746-I*16

Placed inY-AxisPSC32

I:2/8

1746-I*16

Part atHomePSC33

I:2/9

1746-I*16

PartClearedPSC34

EN

DN

TONTimer On DelayTimer T4:34Time Base 1.0Preset 30<Accum 4<

TON

PartJamTime

T4:34/DN - XIC -2:29

Page 55: Beginner Guide to PLC

DRILPRES.RSS

LAD 2 - MAIN --- Total Rungs in File = 35

Latch the part jammed detection.

0029T4:34/DN

PartJamTime

2:28

B3:0/9

Part JamDetected

2:29

I:1/0

1746-I*16

ResetSystemPB1

B3:0/9

Part JamDetected

B3:0/9 - XIC - 2:29, 2:30, 2:33

Indicate a part jammed condition.

0030B3:0/9

Part JamDetected

2:29

B3:0/1

PilotLightTest

2:2

O:3/10

1746-O*16

PartJammedPL23

Monitor the drill time.

0031B3:0/6

Machinein Cycle

2:11

I:2/10

1746-I*16

SpindleRaisedPRS35

EN

DN

TONTimer On DelayTimer T4:35Time Base 1.0Preset 8<Accum 0<

TON

DrillWatchdogTimer

T4:35/DN - XIC -2:32

Latch the excessive drill time detection.

0032T4:35/DN

DrillWatchdogTimer

2:31

B3:0/10

ExcessiveDrill TimeDetected

2:32

I:1/0

1746-I*16

ResetSystemPB1

B3:0/10

ExcessiveDrill TimeDetected

B3:0/10 - XIC - 2:32, 2:33

Page 56: Beginner Guide to PLC

DRILPRES.RSS

LAD 2 - MAIN --- Total Rungs in File = 35

Summarize the fault conditions and stop all machine motion if any one of these faults occur.

0033I:2/4

1746-I*16

Guard inPlaceLS26

T4:27/DN

AirPressureAbnormal

2:21

B3:0/11

MotorOverloadDetected

2:26

B3:0/9

Part JamDetected

2:29

B3:0/10

ExcessiveDrill TimeDetected

2:32

B3:0/12

SystemFault

B3:0/12 - XIO -2:0

0034 END

Page 57: Beginner Guide to PLC

DRILPRES.RSS

Data File O0 (bin) -- OUTPUT

Offset 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

O:3.0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 0 1 1746-O*16 - Any 16pt Discrete Output Module

Page 58: Beginner Guide to PLC

DRILPRES.RSS

Data File I1 (bin) -- INPUT

Offset 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

I:1.0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 1746-I*16 - Any 16pt Discrete Input ModuleI:2.0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 0 1 1746-I*16 - Any 16pt Discrete Input Module

Page 59: Beginner Guide to PLC

DRILPRES.RSS

Data File S2 (hex) -- STATUS

Main

First Pass S:1/15 = NoIndex Register S:24 = 0Free Running Clock S:4 = 0000-0000-0000-0000Index Across Data Files S:2/3 = NoCIF Addressing Mode S:2/8 = 0Online Edits S:33/11 - S:33/12 = No online edits exist

Day of the Week S:53L = Sunday DD / MM / YYYYDate S:39-37 = 0 / 0 / 0

HH : MM : SSTime S:40-42 = 0 : 0 : 0

Proc

OS Catalog Number S:57 = 0OS Series S:58 = AOS FRS S:59 = 0Processor Catalog Number S:60 = 0Processor Series S:61 = AProcessor FRN S:62 = 0Ethernet Daughterboard Series S:9 = 0Ethernet Daughterboard FRN S:10 = 0

User Program Type S:63 = 2049User Program Functionality Index S:64 = 95User RAM Size S:66 = 0OS Memory Size S:66 = 0

Scan Times

Maximum (x10 ms) S:22 = 0Average (x10 ms) S:23 = 0Current (x10 ms) S:3 (low byte) = 0Watchdog (x10 ms) S:3 (high byte) = 10Last 1ms Scan Time S:35 = 0Scan Toggle Bit S:33/9 = 0Time Base Selection S:33/13 = 0

Math

Math Overflow Selected S:2/14 = 0Overflow Trap S:5/0 = 0Carry S:0/0 = 0Overflow S:0/1 = 0Zero Bit S:0/2 = 0Sign Bit S:0/3 = 0

Math Register (lo word) S:13 = 0Math Register (high word) S:14-S:13 = 0Math Register (32 Bit) S:14-S:13 = 0

IO

I/O Interrupt Executing S:32 = 0 Interrrupt Latency Control S:33/8 = 0Event Interrupt 10 uS Time Stamp S:44 = 0

I/O Slot Enables: S:11 S:120 10 20 3011111111 11111111 11111111 11111111

I/O Slot Interrupt Enables: S:27 S:280 10 20 3011111111 11111111 11111111 11111111

I/O Slot Interrupt Pending: S:25 S:260 10 20 3000000000 00000000 00000000 00000000

Chan 0

Processor Mode S:1/0- S:1/4 = Remote Program ModeChannel Mode S:33/3 = 0Comms Active S:33/4 = 0Incoming Cmd Pending S:33/0 = 0Msg Reply Pending S:33/1 = 0

DTR Control Bit S:33/14 = 0DTR Force Bit S:33/15 = 0Outgoing Msg Cmd Pending S:33/2 = 0Comms Servicing Sel S:33/5 = 0Msg Servicing Sel S:33/6 = 0Modem Lost S:5/14 = 0

Page 60: Beginner Guide to PLC

DRILPRES.RSS

Data File S2 (hex) -- STATUS

Ch 0 Nodes

DF1 Half-Duplex Master Channel 0 Active Node Table (S:67-S:82):

Node 0 16 0 0000-0000-0000-0000 0000-0000-0000-0000 32 0000-0000-0000-0000 0000-0000-0000-0000 64 0000-0000-0000-0000 0000-0000-0000-0000 96 0000-0000-0000-0000 0000-0000-0000-0000 128 0000-0000-0000-0000 0000-0000-0000-0000 160 0000-0000-0000-0000 0000-0000-0000-0000 192 0000-0000-0000-0000 0000-0000-0000-0000 224 0000-0000-0000-0000 0000-0000-0000-0000

Chan 1

Processor Mode S:1/0- S:1/4 = Remote Program ModeComms Active S:1/7 = 0Incoming Cmd Pending S:2/5 = 0Msg Reply Pending S:2/6 = 0DH485 Gateway Disable Bit S:34/0 = 0DF1 Gateway Enable Bit S:34/5 = 0

Outgoing Msg Cmd Pending S:2/7 = 0Comms Servicing Sel S:2/15 = 1Msg Servicing Sel S:33/7 = 0

Debug

Suspend Code S:7 = 0Suspend File S:8 = 0Compiled For Single Step S:2/4 = Yes

Fault/PowerdownFault/Powerdown (Rung #) S:20 = 0(File #) S:21 = 0

Test Single Step BreakpointRung # S:18 = 0File # S:19 = 0

Test Single StepRung # S:16 = 0File # S:17 = 0

Errors

Fault Override At Power Up S:1/8 = 0Startup Protection Fault S:1/9 = 0Major Error Halt S:1/13 = 0Overflow Trap S:5/0 = 0Control Register Error S:5/2 = 0Major Error Executing User Fault Rtn. S:5/3 = 0M0/M1 Referenced On Disabled Slot S:5/4 = 0Battery Low S:5/11 = 0Fault/Powerdown (Rung #) S:20 = 0(File #) S:21 = 0

ASCII String Manipulation error S:5/15 = 0Fault Routine S:29 = 0Major Error S:6 = 0h

Error Description:

STI

Setpoint (x10ms) S:30 = 0File Number S:31 = 010 uS Time Stamp S:43 = 0Pending Bit S:2/0 = 0Enable Bit S:2/1 = 1

Resolution Select Bit S:2/10 = 0Executing Bit S:2/2 = 0Overflow Bit S:5/10 = 0Lost S:36/9 = 0Interrrupt Latency Control S:33/8 = 0

DII

Preset S:50 = 0Accumulator S:52 = 0Pending Bit S:2/11 = 0Enable Bit S:2/12 = 1Executing Bit S:2/13 = 0Reconfiguration Bit S:33/10 = 0Overflow Bit S:5/12 = 0Lost S:36/8 = 010 uS Time Stamp S:45 = 0

File Number S:46 = 0Slot Number S:47 = 0Bit Mask S:48 = 0hCompare Value S:49 = 0hReturn Mask S:51 = 0hLast Scan Time (x1 ms) S:55 = 0Max Observed Scan Time (x1 ms) S:56 = 0Interrrupt Latency Control S:33/8 = 0

Protection

Deny Future Access S:1/14 = No

Page 61: Beginner Guide to PLC

DRILPRES.RSS

Data File S2 (hex) -- STATUS

Mem Module

Memory Module Loaded On Boot S:5/8 = 0Password Mismatch S:5/9 = 0Load Memory Module On Memory Error S:1/10 = 0Load Memory Module Always S:1/11 = 0Load Memory Module and RUN S:1/12 = 0Program Compare S:2/9 = 0Data File Overwrite Protection Lost S:36/10 = 0

Forces

Forces Enabled S:1/5 = NoForces Installed S:1/6 = No

Page 62: Beginner Guide to PLC

DRILPRES.RSS

Data File B3 (bin) -- BINARY

Offset 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 (Symbol) Description

B3:0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1

Page 63: Beginner Guide to PLC

DRILPRES.RSS

Data File T4 -- TIMER

Offset EN TT DN BASE PRE ACC (Symbol) Description

T4:0 0 0 1 1.0 sec 2 2 Pilot Light Test Time T4:1 0 0 0 1.0 sec 1 0 Infeed Conveyor Overload T4:2 0 0 0 .01 sec 0 0 T4:3 0 0 0 1.0 sec 1 0 Main Conveyor Overload T4:4 0 0 0 .01 sec 0 0 T4:5 0 0 0 1.0 sec 1 0 Drill Press Overload T4:6 0 0 0 .01 sec 0 0 T4:7 0 0 0 .01 sec 0 0 T4:8 0 0 0 .01 sec 0 0 T4:9 0 0 0 .01 sec 0 0 T4:10 0 0 0 .01 sec 0 0 T4:11 0 0 0 .01 sec 0 0 T4:12 0 0 0 .01 sec 0 0 T4:13 0 0 0 .01 sec 0 0 T4:14 0 0 0 .01 sec 0 0 T4:15 0 0 0 .01 sec 0 0 T4:16 0 0 0 .01 sec 0 0 T4:17 0 0 0 .01 sec 0 0 T4:18 0 0 0 .01 sec 0 0 T4:19 0 0 0 .01 sec 0 0 T4:20 0 0 0 .01 sec 0 0 T4:21 0 0 0 .01 sec 0 0 T4:22 0 0 0 .01 sec 0 0 T4:23 0 0 0 .01 sec 0 0 T4:24 0 0 0 .01 sec 0 0 T4:25 0 0 0 .01 sec 0 0 T4:26 0 0 0 .01 sec 0 0 T4:27 0 0 0 1.0 sec 4 0 Air Pressure Abnormal T4:28 0 0 0 .01 sec 0 0 T4:29 0 0 0 .01 sec 0 0 T4:30 0 0 0 .01 sec 0 0 T4:31 0 0 0 .01 sec 0 0 T4:32 0 0 0 .01 sec 0 0 T4:33 0 0 0 .01 sec 0 0 T4:34 0 0 0 1.0 sec 30 4 Part Jam Time T4:35 0 0 0 1.0 sec 8 0 Drill Watchdog Timer

Page 64: Beginner Guide to PLC

DRILPRES.RSS

Data File C5 -- COUNTER

Offset CU CD DN OV UN UA PRE ACC (Symbol) Description

C5:0 0 0 0 0 0 0 0 0

Page 65: Beginner Guide to PLC

DRILPRES.RSS

Data File R6 -- CONTROL

Offset EN EU DN EM ER UL IN FD LEN POS (Symbol) Description

R6:0 0 0 0 0 0 0 0 0 0 0

Page 66: Beginner Guide to PLC

DRILPRES.RSS

Data File N7 (dec) -- INTEGER

Offset 0 1 2 3 4 5 6 7 8 9

N7:0 0

Page 67: Beginner Guide to PLC

DRILPRES.RSS

Data File F8 -- FLOAT

Offset 0 1 2 3 4

F8:0 0

Page 68: Beginner Guide to PLC

DRILPRES.RSS

CDM 0 - Untitled

Address (Symbol) = Value [Description]

Page 69: Beginner Guide to PLC

DRILPRES.RSS

RSLogix 500 Cross Reference Report - Sorted by Address

O:3/0 - Run Infeed Conveyor MS1 OTE - File #2 MAIN - 8 XIC - File #2 MAIN - 23O:3/1 - Run Main Conveyor MS2 OTE - File #2 MAIN - 13 XIC - File #2 MAIN - 24O:3/2 - Run Drill Press MS5 OTE - File #2 MAIN - 6 XIC - File #2 MAIN - 6, 7, 25O:3/3 - Raise Spindle DRV1RAISE OTE - File #2 MAIN - 18 XIC - File #2 MAIN - 18 XIO - File #2 MAIN - 16O:3/4 - Lower Spindle DRV1LOWER OTE - File #2 MAIN - 16O:3/5 - Hold Part in Place SOL11 OTE - File #2 MAIN - 15 XIC - File #2 MAIN - 16 XIO - File #2 MAIN - 10, 13O:3/6 - Drilling Stop Gate SOL12 OTE - File #2 MAIN - 12 XIO - File #2 MAIN - 10O:3/7 - System Running PL20 OTE - File #2 MAIN - 3O:3/8 - Drill Press Running PL21 OTE - File #2 MAIN - 7O:3/9 - Part in Place PL22 OTE - File #2 MAIN - 14O:3/10 - Part Jammed PL23 OTE - File #2 MAIN - 30O:3/11 - Motor Overload PL24 OTE - File #2 MAIN - 27O:3/12 - Guard Open PL25 OTE - File #2 MAIN - 20O:3/13 - Low Air Pressure PL26 OTE - File #2 MAIN - 22I:1/0 - Reset System PB1 XIO - File #2 MAIN - 21, 26, 29, 32I:1/1 - Start System PB2 XIC - File #2 MAIN - 0I:1/2 - Stop System PB3 XIC - File #2 MAIN - 0I:1/3 - System in Auto Mode SS4 XIC - File #2 MAIN - 5 XIO - File #2 MAIN - 4I:1/4 - EmergStop Cleared CR1 XIC - File #2 MAIN - 0, 1, 2I:1/5 - Start Press PB6 XIC - File #2 MAIN - 6I:1/6 - Stop Press PB7 XIC - File #2 MAIN - 6I:1/7 - Raise Spindle PB10 XIC - File #2 MAIN - 18I:1/8 - Lower Spindle PB11 XIC - File #2 MAIN - 16I:1/9 - Hold Part In Place PB12 XIC - File #2 MAIN - 15I:2/0 - InfedConv Running MS1AUX XIO - File #2 MAIN - 23I:2/1 - Main Conv Running MS2AUX XIO - File #2 MAIN - 24I:2/2 - DrillPres Running MS5AUX XIO - File #2 MAIN - 25I:2/4 - Guard in Place LS26 XIC - File #2 MAIN - 0 XIO - File #2 MAIN - 20, 33I:2/5 - Air Pressure Normal PS27 XIO - File #2 MAIN - 21I:2/6 - Placed in X-Axis PSC31 XIC - File #2 MAIN - 28 XIO - File #2 MAIN - 9

Page 70: Beginner Guide to PLC

DRILPRES.RSS

RSLogix 500 Cross Reference Report - Sorted by Address

I:2/7 - Placed in Y-Axis PSC32 XIC - File #2 MAIN - 28 XIO - File #2 MAIN - 9I:2/8 - Part at Home PSC33 XIC - File #2 MAIN - 14, 15, 28 XIO - File #2 MAIN - 9I:2/9 - Part Cleared PSC34 XIC - File #2 MAIN - 28 XIO - File #2 MAIN - 9I:2/10 - Spindle Raised PRS35 XIC - File #2 MAIN - 19 XIO - File #2 MAIN - 18, 31 XIC - File #2 MAIN - 10I:2/11 - Spindle Lowered PRS36 XIC - File #2 MAIN - 17 XIO - File #2 MAIN - 16B3:0/0 - System Running OTE - File #2 MAIN - 0 XIC - File #2 MAIN - 0, 3, 4, 5B3:0/1 - Pilot Light Test OTE - File #2 MAIN - 2 XIC - File #2 MAIN - 3, 7, 14, 20, 22, 27, 30B3:0/2 - System in Auto Mode OTE - File #2 MAIN - 5 XIC - File #2 MAIN - 6, 8, 11, 13B3:0/3 - System in Manual Mode OTE - File #2 MAIN - 4 XIC - File #2 MAIN - 6, 15, 16, 18B3:0/4 - No Part In Machine OTE - File #2 MAIN - 9 XIC - File #2 MAIN - 11B3:0/5 - Machine at Home OTE - File #2 MAIN - 10 XIC - File #2 MAIN - 11B3:0/6 - Machine in Cycle OTE - File #2 MAIN - 11 XIC - File #2 MAIN - 11, 12, 15, 16, 17, 18, 19, 28, 31B3:0/7 - Drilling Operation Complete OTE - File #2 MAIN - 17 XIC - File #2 MAIN - 17, 18, 19B3:0/8 - End of Machine Cycle OTE - File #2 MAIN - 19 XIC - File #2 MAIN - 19 XIO - File #2 MAIN - 11B3:0/9 - Part Jam Detected OTE - File #2 MAIN - 29 XIC - File #2 MAIN - 29, 30, 33B3:0/10 - Excessive Drill Time Detected OTE - File #2 MAIN - 32 XIC - File #2 MAIN - 32, 33B3:0/11 - Motor Overload Detected OTE - File #2 MAIN - 26 XIC - File #2 MAIN - 26, 27, 33B3:0/12 - System Fault OTE - File #2 MAIN - 33 XIO - File #2 MAIN - 0T4:0 - Pilot Light Test Time TON - File #2 MAIN - 1T4:0/DN - XIO - File #2 MAIN - 2T4:1 - Infeed Conveyor Overload TON - File #2 MAIN - 23T4:1/DN - XIC - File #2 MAIN - 26T4:3 - Main Conveyor Overload TON - File #2 MAIN - 24T4:3/DN - XIC - File #2 MAIN - 26T4:5 - Drill Press Overload TON - File #2 MAIN - 25T4:5/DN - XIC - File #2 MAIN - 26T4:27 - Air Pressure Abnormal TON - File #2 MAIN - 21T4:27/DN - XIC - File #2 MAIN - 21, 22, 33

Page 71: Beginner Guide to PLC

DRILPRES.RSS

RSLogix 500 Cross Reference Report - Sorted by Address

T4:34 - Part Jam Time TON - File #2 MAIN - 28T4:34/DN - XIC - File #2 MAIN - 29T4:35 - Drill Watchdog Timer TON - File #2 MAIN - 31T4:35/DN - XIC - File #2 MAIN - 32

Page 72: Beginner Guide to PLC

DRILPRES.RSS

Address/Symbol Database

Address Symbol Scope Description Sym Group Dev. Code ABV BLW

B3:0/0 System Running B3:0/1 Pilot Light Test B3:0/2 System in Auto Mode B3:0/3 System in Manual Mode B3:0/4 No Part In Machine B3:0/5 Machine at Home B3:0/6 Machine in Cycle B3:0/7 Drilling Operation Complete B3:0/8 End of Machine Cycle B3:0/9 Part Jam Detected B3:0/10 Excessive Drill Time Detected B3:0/11 Motor Overload Detected B3:0/12 System Fault I:1/0 Reset System PB1 I:1/1 Start System PB2 I:1/2 Stop System PB3 I:1/3 System in Auto Mode SS4 I:1/4 EmergStop Cleared CR1 I:1/5 Start Press PB6 I:1/6 Stop Press PB7 I:1/7 Raise Spindle PB10 I:1/8 Lower Spindle PB11 I:1/9 Hold Part In Place PB12 I:1/10 spare I:1/11 spare I:1/12 spare I:1/13 spare I:1/14 spare I:1/15 spare I:2/0 InfedConv Running MS1AUX I:2/1 Main Conv Running MS2AUX I:2/2 DrillPres Running MS5AUX I:2/3 spare I:2/4 Guard in Place LS26 I:2/5 Air Pressure Normal PS27 I:2/6 Placed in X-Axis PSC31 I:2/7 Placed in Y-Axis PSC32 I:2/8 Part at Home PSC33 I:2/9 Part Cleared PSC34 I:2/10 Spindle Raised PRS35 I:2/11 Spindle Lowered PRS36 I:2/12 spare I:2/13 spare I:2/14 spare I:2/15 spare O:3/0 Run Infeed Conveyor MS1 O:3/1 Run Main Conveyor MS2 O:3/2 Run Drill Press MS5 O:3/3 Raise Spindle DRV1RAISE O:3/4 Lower Spindle DRV1LOWER O:3/5 Hold Part in Place SOL11 O:3/6 Drilling Stop Gate SOL12 O:3/7 System Running PL20 O:3/8 Drill Press Running PL21 O:3/9 Part in Place PL22 O:3/10 Part Jammed PL23 O:3/11 Motor Overload PL24 O:3/12 Guard Open PL25 O:3/13 Low Air Pressure PL26 S:0 Arithmetic Flags S:0/0 Processor Arithmetic Carry Flag S:0/1 Processor Arithmetic Underflow/ Overflow Flag S:0/2 Processor Arithmetic Zero Flag S:0/3 Processor Arithmetic Sign Flag S:1 Processor Mode Status/ Control S:1/0 Processor Mode Bit 0 S:1/1 Processor Mode Bit 1 S:1/2 Processor Mode Bit 2 S:1/3 Processor Mode Bit 3 S:1/4 Processor Mode Bit 4 S:1/5 Forces Enabled S:1/6 Forces Present S:1/7 Comms Active S:1/8 Fault Override at Powerup S:1/9 Startup Protection Fault S:1/10 Load Memory Module on Memory Error S:1/11 Load Memory Module Always S:1/12 Load Memory Module and RUN S:1/13 Major Error Halted S:1/14 Access Denied S:1/15 First Pass S:2/0 STI Pending S:2/1 STI Enabled S:2/2 STI Executing S:2/3 Index Addressing File Range S:2/4 Saved with Debug Single Step S:2/5 DH-485 Incoming Command Pending

Page 73: Beginner Guide to PLC

DRILPRES.RSS

Address/Symbol Database

Address Symbol Scope Description Sym Group Dev. Code ABV BLW

S:2/6 DH-485 Message Reply Pending S:2/7 DH-485 Outgoing Message Command Pending S:2/15 Comms Servicing Selection S:3 Current Scan Time/ Watchdog Scan Time S:4 Time Base S:5/0 Overflow Trap S:5/2 Control Register Error S:5/3 Major Err Detected Executing UserFault Routine S:5/4 M0-M1 Referenced on Disabled Slot S:5/8 Memory Module Boot S:5/9 Memory Module Password Mismatch S:5/10 STI Overflow S:5/11 Battery Low S:6 Major Error Fault Code S:7 Suspend Code S:8 Suspend File S:9 Active Nodes S:10 Active Nodes S:11 I/O Slot Enables S:12 I/O Slot Enables S:13 Math Register S:14 Math Register S:15 Node Address/ Baud Rate S:16 Debug Single Step Rung S:17 Debug Single Step File S:18 Debug Single Step Breakpoint Rung S:19 Debug Single Step Breakpoint File S:20 Debug Fault/ Powerdown Rung S:21 Debug Fault/ Powerdown File S:22 Maximum Observed Scan Time S:23 Average Scan Time S:24 Index Register S:25 I/O Interrupt Pending S:26 I/O Interrupt Pending S:27 I/O Interrupt Enabled S:28 I/O Interrupt Enabled S:29 User Fault Routine File Number S:30 STI Setpoint S:31 STI File Number S:32 I/O Interrupt Executing S:33 Extended Proc Status Control Word S:33/0 Incoming Command Pending S:33/1 Message Reply Pending S:33/2 Outgoing Message Command Pending S:33/3 Selection Status User/DF1 S:33/4 Communicat Active S:33/5 Communicat Servicing Selection S:33/6 Message Servicing Selection Channel 0 S:33/7 Message Servicing Selection Channel 1 S:33/8 Interrupt Latency Control Flag S:33/9 Scan Toggle Flag S:33/10 Discrete Input Interrupt Reconfigur Flag S:33/11 Online Edit Status S:33/12 Online Edit Status S:33/13 Scan Time Timebase Selection S:33/14 DTR Control Bit S:33/15 DTR Force Bit S:34 Pass-thru Disabled S:34/0 Pass-Thru Disabled Flag S:34/1 DH+ Active Node Table Enable Flag S:34/2 Floating Point Math Flag Disable,Fl S:35 Last 1 ms Scan Time S:36 Extended Minor Error Bits S:36/8 DII Lost S:36/9 STI Lost S:36/10 Memory Module Data File Overwrite Protection S:37 Clock Calendar Year S:38 Clock Calendar Month S:39 Clock Calendar Day S:40 Clock Calendar Hours S:41 Clock Calendar Minutes S:42 Clock Calendar Seconds S:43 STI Interrupt Time S:44 I/O Event Interrupt Time S:45 DII Interrupt Time S:46 Discrete Input Interrupt- File Number S:47 Discrete Input Interrupt- Slot Number S:48 Discrete Input Interrupt- Bit Mask S:49 Discrete Input Interrupt- Compare Value S:50 Processor Catalog Number S:51 Discrete Input Interrupt- Return Number S:52 Discrete Input Interrupt- Accumulat S:53 Reserved/ Clock Calendar Day of the Week S:55 Last DII Scan Time S:56 Maximum Observed DII Scan Time S:57 Operating System Catalog Number S:58 Operating System Series

Page 74: Beginner Guide to PLC

DRILPRES.RSS

Address/Symbol Database

Address Symbol Scope Description Sym Group Dev. Code ABV BLW

S:59 Operating System FRN S:61 Processor Series S:62 Processor Revision S:63 User Program Type S:64 User Program Functional Index S:65 User RAM Size S:66 Flash EEPROM Size S:67 Channel 0 Active Nodes S:68 Channel 0 Active Nodes S:69 Channel 0 Active Nodes S:70 Channel 0 Active Nodes S:71 Channel 0 Active Nodes S:72 Channel 0 Active Nodes S:73 Channel 0 Active Nodes S:74 Channel 0 Active Nodes S:75 Channel 0 Active Nodes S:76 Channel 0 Active Nodes S:77 Channel 0 Active Nodes S:78 Channel 0 Active Nodes S:79 Channel 0 Active Nodes S:80 Channel 0 Active Nodes S:81 Channel 0 Active Nodes S:82 Channel 0 Active Nodes S:83 DH+ Active Nodes S:84 DH+ Active Nodes S:85 DH+ Active Nodes S:86 DH+ Active Nodes T4:0 Pilot Light Test Time T4:0/DNT4:1 Infeed Conveyor Overload T4:1/DNT4:3 Main Conveyor Overload T4:5 Drill Press Overload T4:5/DNT4:27 Air Pressure Abnormal T4:27/DNT4:34 Part Jam Time T4:34/DNT4:35 Drill Watchdog Timer T4:35/DN

Page 75: Beginner Guide to PLC

DRILPRES.RSS

Instruction Comment Database

Address Instruction Description

Page 76: Beginner Guide to PLC

DRILPRES.RSS

Symbol Group Database

Group_Name Description

Page 77: Beginner Guide to PLC

PLC is a trademark of the Allen-Bradley Company. THE FOLLOWING ARE TRADEMARKS OF ROCKWELL AUTOMATION, INC. Allen-Bradley® MicroLogix™ PanelView™ RSLinx® RSLogix™ RSLogix™ 500 SLC™ 500 THE AUTHOR OR THE PUBLISHER OF THIS BOOK IS IN NO WAY AFFILIATED WITH ROCKWELL AUTOMATION, INC. Disclaimer THE AUTHOR INTENDS THIS DOCUMENT TO BE ADVISORY ONLY. ITS USE IN INDUSTRY OR TRADE IS ENTIRELY VOLUNTARY. THIS DOCUMENT IS PROVIDED BY THE VENDOR “AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE VENDOR OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Beginner’s Guide to PLC Programming How to Program a PLC (Programmable Logic Controller) Copyright 2008 Modern Media

modernmediaonline.com

41