N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
INTRODUCTION TO PROGRAMMABLE LOGIC CONTROLLERS
STUDENT GUIDE

Introduction to Programmable Logic Controllers

Table of Contents
INTRODUCTION ............................................................................................................. 1  OBJECTIVES .................................................................................................................. 1  NUMBER THEORY ......................................................................................................... 2  Identifying the Base of a Number ............................................................................... 2  Positional Notation and the Decimal Numbering System ........................................... 3  The Binary Number System ....................................................................................... 4  Binary System Positional Notation........................................................................ 5  How to Convert a Number from Binary to Decimal ............................................... 5  How to Convert a Number from Decimal to Binary ............................................... 6  The Octal Number System ......................................................................................... 7  Octal System Positional Notation ......................................................................... 7  How to Convert a Number from Octal to Decimal ................................................. 8  How to Convert a Number from Decimal to Octal ................................................. 8  Conversions between Octal and Binary ................................................................ 9  How to Convert a Number from Octal to Binary.................................................... 9  How to Convert a Number from Binary to Octal.................................................. 10  The Hexadecimal System ........................................................................................ 11  Conversions between Hexadecimal and Binary ................................................. 12  How to Convert a Number from Hexadecimal to Binary ..................................... 12  How to Convert a Number from Binary to Hexadecimal ..................................... 13  INTRODUCTION TO THE PLC-5.................................................................................. 14  PLC-5 Hardware ...................................................................................................... 14  Equipment Chassis............................................................................................. 15  Power Supply Module ......................................................................................... 16  Processor Module............................................................................................... 17  Key Switch .................................................................................................... 20  Front Panel LEDs .......................................................................................... 20  Battery ........................................................................................................... 22  Processor Module DIP Switches ................................................................... 22  Memory Modules ........................................................................................... 24  Input Modules, Output Modules, and Field Wiring .............................................. 24  Input Modules................................................................................................ 24  Output Modules ............................................................................................. 28  Field Wiring ................................................................................................... 30  Remote I/O Adapter Module ............................................................................... 31  PLC-5 System Operation ......................................................................................... 33  Signal Flow Paths ............................................................................................... 35  Ladder Logic and I/O Control.............................................................................. 36  Remote I/O ......................................................................................................... 38  Linking Multiple Processors ................................................................................ 39 

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n

i

Introduction to Programmable Logic Controllers
RSLOGIX 5 INTRODUCTION ....................................................................................... 40  Screen Layout and Organization ............................................................................. 41  Ladder Window................................................................................................... 42  Project Window................................................................................................... 44  Controller Folder ........................................................................................... 45  Program Files Folder ..................................................................................... 46  Data Files Folder ........................................................................................... 47  Results Window .................................................................................................. 53  Windows Toolbar ................................................................................................ 55  Standard Toolbar ................................................................................................ 56  Instruction Toolbar .............................................................................................. 57  On-Line Toolbar.................................................................................................. 58  Finding Help ............................................................................................................. 59  FILES, MEMORY AREAS, AND ADDRESSING ........................................................... 61  Memory Areas.......................................................................................................... 61  Program Memory Area ....................................................................................... 62  How to Create a New Program File ............................................................... 63  Data Memory Area ............................................................................................. 68  How to Create a New Data File ..................................................................... 70  Addressing ............................................................................................................... 75  Logical Addressing ............................................................................................. 75  Indexed Addressing ............................................................................................ 77  Indirect Addressing ............................................................................................. 78  Symbolic Addressing .......................................................................................... 81  How to Create or Edit a Symbolic Name for an Address ............................... 82  I/O Image Addressing ......................................................................................... 85  Chassis, Slots, I/O Racks, and Groups ......................................................... 86  Slot Addressing for I/O Transfer .................................................................... 88  Examples of I/O Image Addressing ............................................................... 92  USING RSLOGIX 5 ....................................................................................................... 93  Going On-Line with a Controller ............................................................................... 93  How to Go On-Line with a Controller .................................................................. 93  Uploading a Project from a PLC-5 ........................................................................... 98  How to Upload a Project ..................................................................................... 98  Saving a Project ..................................................................................................... 101  How to Save a Project ...................................................................................... 101  How to Change the Default Path where Projects are Saved ............................ 104  Downloading a Project to a PLC-5 ......................................................................... 106  How to Download a Project .............................................................................. 106  Editing Ladder Logic .............................................................................................. 112  Edit Zone Markers ............................................................................................ 112  Online Editing ................................................................................................... 113  Online Editing Restrictions .......................................................................... 114  How to Verify, Accept, Test, and Assemble Online Edits ............................ 114 

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n

ii

Introduction to Programmable Logic Controllers
Offline Editing ................................................................................................... 125  How to Verify a Single Rung ....................................................................... 125  How to Verify a File or Project ..................................................................... 127  UNDO and REDO............................................................................................. 127  Inserting and Appending Rungs of Ladder Logic ................................................... 128  How to Insert a Rung ........................................................................................ 128  How to Append a Rung .................................................................................... 130  Branching ............................................................................................................... 132  How to Insert a Branch ..................................................................................... 132  PROGRAMMING WITH BIT INSTRUCTIONS ............................................................ 135  Selected Bit Instructions ........................................................................................ 135  Examine IF CLOSED (XIC) .............................................................................. 136  Examine IF OPEN (XIO) ................................................................................... 139  Output Enable Instruction (OTE) ...................................................................... 140  Output Latch (OTL)........................................................................................... 141  Output Unlatch (OTU) ....................................................................................... 141  Using Bit Instructions ............................................................................................. 142  How to Insert Bit Instructions into a Program ................................................... 143  How to Assign a Logical Address Directly at the Instruction ............................. 148  How to Drag and Drop a Logical Address from a Data File .............................. 153  How to Search for Unused Logical Addresses ................................................. 156  PROGRAMMING WITH TIMERS ................................................................................ 159  Timer Operation ..................................................................................................... 159  Timer Type ....................................................................................................... 159  Timer On-Delay (TON) ................................................................................ 160  Timer Off-Delay (TOF) ................................................................................ 161  Retentive Timer On-Delay (RTO) ................................................................ 161  Timer Address .................................................................................................. 162  Timer Preset Value ........................................................................................... 162  Timer Accumulator Value ................................................................................. 162  Timer Status Bits .............................................................................................. 163  Time Base ........................................................................................................ 163  Reset Timer/Counter Instruction (RES) ................................................................. 164  Using Timer Instructions ........................................................................................ 164  How to Insert a New Timer into a Program ....................................................... 164  How to Assign or Modify a Timer Address ........................................................ 167  How to Assign or Modify a Time Base and Preset............................................ 172  Changing the Time Base ............................................................................. 172  Changing the Timer Preset ......................................................................... 174  How to Program the Timer Status Bits ............................................................. 175  How to Reset the RTO Accumulator using the RES Instruction ....................... 179  PROGRAMMING WITH COUNTERS ......................................................................... 184  Counter Operation ................................................................................................. 184  Counter Type .................................................................................................... 184 
iii

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n

Introduction to Programmable Logic Controllers
Count Up Counter (CTU)............................................................................. 185  Count Down Counter (CTD) ........................................................................ 185  Counter Address............................................................................................... 186  Counter Preset Value ....................................................................................... 186  Counter Accumulator Value .............................................................................. 186  Counter Status Bits........................................................................................... 186  Using Counter Instructions ..................................................................................... 187  How to Insert a New Counter into a Program ................................................... 187  How to Assign or Modify a Counter Address .................................................... 190  How to Assign or Modify a Preset Value at the Instruction ............................... 193  How to Assign or Modify a Preset Value using the C5 Data File ...................... 195  How to Create an Up/Down Counter ................................................................ 198  TROUBLESHOOTING ................................................................................................ 199  Systematic Troubleshooting ................................................................................... 199  Clearing Processor Memory .................................................................................. 200  How to Clear Processor Memory ...................................................................... 201  Forcing I/O Bits ...................................................................................................... 204  How to Determine the Status of Forces in a Project ......................................... 206  How to Install and Remove a Force Using Popup Menus ................................ 208  How to Install and Remove a Force Using the Force Tables ............................ 214  Cross Referencing Instructions .............................................................................. 221  How to Open the Cross Reference Report ....................................................... 222  From the Ladder Window ............................................................................ 222  From the Project Window ............................................................................ 224  Data Table Monitoring............................................................................................ 227  How to Open a Data Table ............................................................................... 228  From the Ladder Window ............................................................................ 228  From the Project Window ............................................................................ 230  How to Change Values Using a Data Table ..................................................... 232  Searching ............................................................................................................... 234  How to Search using Popup Menus at an Instruction ....................................... 234  How to Search using Drop Down Menus from the Windows Toolbar ............... 237  Find ............................................................................................................. 238  Replace ....................................................................................................... 240  Go To .......................................................................................................... 241  How to Search Using the Standard Toolbar ..................................................... 244  Histograms ............................................................................................................. 248  How to Create a Histogram .............................................................................. 249 

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n

iv

...................................................................... 16  Figure 3: PLC 5/15 Processor Module ...................................... 37  Figure 13: Hardwired System Changes..................................................... 60  Figure 39: Program Area File Assignments ......... 31  Figure 8: Hypothetical Circuit ................................................................................... 65  N Fo ot r Fo R ev rR i ew ep ro O du nly ct ............................................................................................................................................................................... 33  Figure 9: Hypothetical Circuit Controlled by PLC System ................................................................................ 54  Figure 30: Windows Toolbar .................. 41  Figure 16: Ladder Window .......... 49  Figure 25: Usage Popup Window ............................. 50  Figure 26: Input Image Data File Popup Window .............................. 43  Figure 18: Renaming a Program ......................................................... 44  Figure 20: Controller Properties Popup Window .................................................................... 34  Figure 10: Vat Control System ............................................................ 19  Figure 4: Processor Module Switches ........... 48  Figure 24: Output Image Data File Popup Window .. 42  Figure 17: Ladder Window with Multiple Open Programs .................................................... 55  Figure 31: Standard Toolbar ............ 51  Figure 27: Timer Data File Popup Window... 45  Figure 21: Expanded Program Files Folder..................................................................... 23  Figure 5: 1771-IAD AC Input Module ......... 46  Figure 22: Expanded Data Files Folder .......................................................................................... 57  Figure 34: Detached Instruction Toolbar ............................................................................................................................. 62  Figure 40: Program Files Popup Window ...................................................................................................... 36  Figure 12: PLC Vat Control System ....................................................................... 15  Figure 2: Power Supply Module ......................................... 43  Figure 19: Project Window ........................................................................................................................ 38  Figure 15: RSLogix 5 Main Window .......................................................................................Introduction to Programmable Logic Controllers List of Figures Figure 1: Equipment Chassis ... 47  Figure 23: Cross Reference Report Popup Window ... 29  Figure 7: Remote I/O Adapter Module......................................................................................................................................................................................................................... 64  Figure 42: Completed Create Data File Popup Window ....................................................... 57  Figure 35: On-Line Toolbar ............................................................ 56  Figure 33: Instruction Toolbar .......................................................................................................................................... 26  Figure 6: 1771-OAD AC Output Module ...................................................................................................................... 58  Figure 37: Help Window ........................................................................................................................................................................................ 37  Figure 14: PLC System Changes ................................................................................... 52  Figure 28: Search Results Window ............................................................................... 53  Figure 29: Results Window Moved in Display ......................... 63  Figure 41: Create Program File Popup Window ..................................................................................................................................... 36  Figure 11 Hardwired Vat Control System ................................................................................................................................................................ 59  Figure 38: Help Drop Down Menu .............................................................. 58  Figure 36: On-line/Off-line Drop Down Menu ........................................................................................................................................................................ 56  Figure 32: Tool Tip ....................... io n v ......

................................................................................................................................... 101  File Drop Down Menu/SAVE Selection .................. 67  Data Area File Assignments ......................................................... 82  Symbolic Name Entry ..................... 96  RSLogix On-Line with a Controller ........................................................................................................................................................................................ 75  Status Register S:24 ................................ 94  Comms Drop Down Menu/WHO ACTIVE GO ONLINE Selection .................................................................................................. 87  1-Slot Addressing .......................... 100  Floppy Disk Icon from Standard Toolbar ............................................................................................................................ 74  File N100 – TEST Popup Window ....................... 115  N Fo ot r Fo R ev rR i ew ep ro O du nly ct ......................................................................... 84  I/O Address in Ladder Logic ................................................................................. 111  Original Ladder Logic for Online Editing Example ............................................................................ 90  1/2-Slot Addressing ...................................... 95  Communications Popup Window ..... 107  Open/Import PLC5 Program Popup Window...........Introduction to Programmable Logic Controllers Figure 43: Figure 44: Figure 45: Figure 46: Figure 47: Figure 48: Figure 49: Figure 50: Figure 51: Figure 52: Figure 53: Figure 54: Figure 55: Figure 56: Figure 57: Figure 58: Figure 59: Figure 60: Figure 61: Figure 62: Figure 63: Figure 64: Figure 65: Figure 66: Figure 67: Figure 68: Figure 69: Figure 70: Figure 71: Figure 72: Figure 73: Figure 74: Figure 75: Figure 76: Figure 77: Figure 78: Figure 79: Figure 80: Figure 81: Figure 82: Figure 83: Figure 84: Figure 85: Figure 86: Figure 87: New File in Program Files Folder .................................................................................. 106  Starting RSLogix 5 ................................ 81  Popup Window for Symbolic Name Entry. 91  Sixteen Point I/O Modules .............................................. 107  Open Folder Icon .......................................................... 92  Starting RSLogix 5 ............................ 103  Tools Drop Down Menu............................................................................................................................................................. 89  2-Slot Addressing ....... 97  Starting RSLogix 5 . 102  Revision Note Popup Window ........................................................................................ 68  Popup Window for New Data File ....................................................................................................................... 70  Create Data File Popup Window ............. 99  Going to Online Programming State Popup Window ...................................................................................................................................... 114  Popup Menu for Online Editing ......................................................... 105  Set Directory Popup Window ......................................................................................................................................................................................................... 98  Comms Drop Down Menu/UPLOAD Selection.............................................................................................................................. io n vi ... 108  Open Project in RSLogix Display .................... 79  User-Defined N100 Data File ................................................................................................................................... 71  Data File Type Selection ........................................................................................................ 85  Data Files Folder ...................................................................................................... 66  LAD 50 – SUBR-1 File Open for Editing in Ladder Window ..................................................... 78  Integer Data Register N7 and Indirect Addressing ...... 80  N100 Data File ..................................................................... 72  Completed Create Data File Popup Window ........................................ 109  Comms Drop Down Menu ..... 110  RSLogix 5 Popup Window............................................................................ 104  System Options Popup Window ..................................................... 83  Symbolic Name Entry Completed ........................................................................ 73  New Integer Data File Created ........................... 83  Symbolic Name and Description in Ladder Logic ............ 77  Integer Register N7 ....................

.................................................... 132  Figure 108: Insertion Points for the New Branch ......................................... 146  Figure 126: OTE Instruction Inserted into Ladder Logic .............................................................. 120  Figure 93: Rung Edits Accepted ....................................... 130  Figure 105: New Rung Appended ........................................................................................................................................................................................................................................................................... 136  Figure 113: XIC Instruction and the Input Image Data Table ....... 139  Figure 116: Comparison of XIC and XIO ................... 149  Figure 129: Available Logical Addresses ......................... 141  Figure 119: OTU Instruction .......... 138  Figure 115: XIO Instructions ............................. 152  Figure 132: B3 Data Table File Open ...... 118  Figure 91: Rung Verified .....................Introduction to Programmable Logic Controllers Figure 88: New Rung for Editing (Offline)....... 125  Figure 99: Results Window ...... 119  Figure 92: Popup Menu for Accepting Rung Edits ........................................................................................................................................... 145  Figure 124: OTE Instruction on Instruction Toolbar .................................................... 143  Figure 122: Insertion Points for XIC Instruction ................................................ 128  Figure 103: New Rung Inserted ........... 116  Figure 89: OTE Logical Address Changed ....... 142  Figure 121: Bit Instruction Icons under BIT Tab of Instruction Toolbar ....................................... 137  Figure 114: XIC Instruction and the Bit Data Table ................................................................................................................................................................................................................................................................................. 124  Figure 98: Popup Window to Verify a Single Rung of Ladder Logic .................................................................................................................................................................... 144  Figure 123: XIC Instruction Inserted into Ladder Logic .... 141  Figure 120: Arrangement of Latch And Unlatch Instructions ....................................................................................................................................................... 147  Figure 127: XIC Instruction Selected for New Address ............. 122  Figure 96: Test Edits Online Indication..... 153  N Fo ot r Fo R ev rR i ew ep ro O du nly ct ....................................... 145  Figure 125: Insertion Point for OTE Instruction ................................................................. 126  Figure 100: Verify File and Verify Project Icons .................... 127  Figure 101: UNDO Button (Left Arrow) and REDO Button (Right Arrow) ................................................................................................................................................................. 151  Figure 131: Logical Address Assigned to XIC Instruction...................................................................................... 140  Figure 117: OTE Instruction ................. 134  Figure 111: New Branch Terminated............................................................................................................................................................................................................................................... 133  Figure 109: New Branch Inserted .............................. 121  Figure 94: TEST EDITS Button from Online Editing Toolbar................................................. 148  Figure 128: Starting the Logical Address . io n vii ......................................................... 123  Figure 97: Edits Assembled ....... 127  Figure 102: Popup Menu with Mouse Pointer over Rung Number ... 132  Figure 107: Rung Icon Under USER Tab of Instruction Toolbar ................. 122  Figure 95: Test Edits Confirmation Popup Window ............................. 150  Figure 130: Logical Address Selected ............................. 117  Figure 90: Popup Menu for Verifying Rung Edits ........................................................... 129  Figure 104: Popup Window with Mouse Pointer Over Rung Number ................................................................................................... 134  Figure 112: XIC Instructions ............................................................. 133  Figure 110: Dragging the Branch to the Termination Point .......... 140  Figure 118: OTL Instruction................................................................................ 131  Figure 106: Location for New Branch ..............................................

................... 167  Figure 146: Timer Usage............................................... 179  Figure 161: Insertion Point for RES Instruction .................. 166  Figure 145: T4 Data File Popup Window............ 189  Figure 173: C5 Data File Popup Window ........................................... 173  Figure 153: New Value Typed into “Preset” Field . 190  Figure 174: Counter Usage ....................................................... 180  Figure 162: RES Instruction Inserted into Ladder Logic ....................................... 169  Figure 148: “Timer” Field in RTO Instruction as the Logical Address Target.......... 181  Figure 164: Logical Address for the RES Instruction ................ 154  Figure 134: Logical Address Assigned to OTE Instruction ................................................... 156  Figure 136: Logical Address Usage ........................................................ 161  Figure 140: Retentive Timer On-Delay (RTO) Instruction ...................................... 182  Figure 165: Symbolic Name/Comment Popup Window.................................................................................................................................................................................................................................................................................................................. 178  Figure 159: Logical Address Assignment Complete ................ and Comment . 187  Figure 171: Insertion Point for CTU Instruction .......................................................................................................... 164  Figure 143: Insertion Point for RTO Instruction .............................................................. 164  Figure 142: Timer Instruction Icons under TIMER/COUNTER Tab of Instruction Toolbar ...................................... 176  Figure 157: Timer Address Located in Data File Popup Window ................................ 165  Figure 144: RTO Instruction Inserted into Ladder Logic ......... 173  Figure 152: New Time Base Entered .......................... 185  Figure 170: Counter Instruction Icons under TIMER/COUNTER Tab of Instruction Toolbar ............... 174  Figure 154: New Preset Entered .......................................................................................................................................................................................................... 158  Figure 138: Timer On-Delay (TON) Instruction ................................................................Introduction to Programmable Logic Controllers Figure 133: Logical Address Targets........ 179  Figure 160: Timer Instruction Icons under TIMER/COUNTER Tab of Instruction Toolbar ................................................................................................................................ 171  Figure 150: Time Base Drop Down Menu ..................................................................................................... 188  Figure 172: CTU Instruction Inserted into Ladder Logic ............................................................ 183  Figure 168: CTU Instruction .......................................................................................................................................... 182  Figure 166: Comment and Symbolic Name Information ................................................................................................................ 177  Figure 158: XIC Instruction as the Logical Address Target ............... 175  Figure 156: T4 Data File Popup Window.................................................. 160  Figure 139: Timer Off-Delay (TOF) Instruction ......... 170  Figure 149: Completed Logical Address Assignment .................................................................................................................................................................................. 185  Figure 169: CTD Instruction .................................................................................... Symbolic Address...... 161  Figure 141: Reset Timer/Counter (RES) Instruction ........................... 172  Figure 151: New Time Base Selected ................................. 183  Figure 167: Logical Address....................................................... 157  Figure 137: XIC Logical Address Changed from B3:0/0 to I:010/0 ................................................. 168  Figure 147: Unused Timer T4:61 .............................. 181  Figure 163: Dialog Box for Logical Address Entry ............................................... 191  N Fo ot r Fo R ev rR i ew ep ro O du nly ct ............................................................................................................. 155  Figure 135: I1 Input Image Data Table File ........ io n viii .... 174  Figure 155: XIC Instruction Inserted into Ladder Logic ............................................................................

................................................................................................................................................... 206  Forces Installed but Not Enabled ................................................................. 227  Data Table Popup Window....................................................................................... io n ix ....................Introduction to Programmable Logic Controllers Figure 175: Figure 176: Figure 177: Figure 178: Figure 179: Figure 180: Figure 181: Figure 182: Figure 183: Figure 184: Figure 185: Figure 186: Figure 187: Figure 188: Figure 189: Figure 190: Figure 191: Figure 192: Figure 193: Figure 194: Figure 195: Figure 196: Figure 197: Figure 198: Figure 199: Figure 200: Figure 201: Figure 202: Figure 203: Figure 204: Figure 205: Figure 206: Figure 207: Figure 208: Figure 209: Figure 210: Figure 211: Figure 212: Figure 213: Figure 214: Figure 215: Figure 216: Figure 217: Figure 218: Figure 219: Dialog Box for Logical Address Entry .............................................................................................................. 211  Popup Menu with Remove Force Selections......................... 225  Address in Ladder Window Selected from Cross-Reference Report .............. 198  On-Line Drop Down Menu............................................................................................................................................................ 216  Force Installed................................................ 214  O0 (Output Force File) Popup Window .......... 220  Cross Reference Report – Sorted by Address ............................................................................................................................................................ 229  N Fo ot r Fo R ev rR i ew ep ro O du nly ct ................ 212  Selected Force Removed .................................................. 209  Drop Down Menu with Enable Force Selection .................................................................................. 226  Data Table........................................................................... 210  Multiple Forces in Project .................. 217  Enable Forces Confirmation Popup Window .......................................................... 201  Processor in Program Mode................................................................ 208  Inputs Forced ON .......................... 210  Forces Enabled .................................... 195  Preset Field Open for Editing ....... 193  “Preset” Field Open for Editing ......... 191  Instruction Type Popup Menu ............... 193  New Value Typed into “Preset” Field . 219  Force Removed ......................... 194  New Preset Entered ...................................................... 207  Popup Menu with Install Force Selections................................ 196  New Preset Value Entered .................................................... 218  Popup Menu with Remove Force Selections........................................................................................................................ 197  Count Up/Count Down Ladder Logic ............................................................. 222  Cross-Reference Report for Address Selected in Ladder Window .................... 209  Enable Forces Confirmation Popup Window ............................................................... 205  Force Status Indications ...................................................................................................... 192  Completed Logical Address Assignment .............................................................. 194  C5 Data File Popup Window .................................... 228  Data Table for Address Selected in Ladder Window .............................................................................................................. 202  Comms Drop Down Menu .................................................................. 223  Data Files Folder Open in Project Window........................................................... 207  Forces Installed and Enabled ............................................................... 221  Cross Reference Popup Window ............................................................................................................... 215  Output Address to Force ............... 202  Clear Memory Confirmation Popup Window ....................... 201  Change Mode Confirmation Popup Window ........................................... 213  Force Files in Project Window ...................................................................................................... 203  Force Table Positioning Diagram ................................ 192  Logical Address Popup Menu .................................................. 224  Cross Reference Report Open ......... 217  Force Enabled .............................................................................................

240  Go To Popup Window ................................................... 247  Histogram .............................................................................................................................................................................................................. 245  Result of FIND NEXT for TON Instruction ...................... 237  Find Popup Window ........ 236  Search Drop Down Menu ... 230  Data Table Open ....... 249  Histogram Popup Window ..................................................... 252  Histogram Properties Popup Window ................................. 233  Value Changed through Data Table .............. 241  Address/Symbol Editor Popup Window ................... io n x ..................................................... 244  Searching for TON Instruction ..................................................................................... 234  Search Results Window for O:011/16 ......................................................... 231  N10 Data Table for Address N10:22 ... 250  Entering Target Address .............................................................................................................................................................................................. 246  Result of FIND ALL for TON Instruction ...........Introduction to Programmable Logic Controllers Figure 220: Figure 221: Figure 222: Figure 223: Figure 224: Figure 225: Figure 226: Figure 227: Figure 228: Figure 229: Figure 230: Figure 231: Figure 232: Figure 233: Figure 234: Figure 235: Figure 236: Figure 237: Figure 238: Figure 239: Figure 240: Figure 241: Figure 242: Figure 243: Figure 244: Figure 245: Figure 246: Figure 247: Data Files Folder Open in Project Window........................................................................ 243  Search Entry Box and FIND Buttons ................................................................................. 242  Search Results from Address/Symbol Editor ........................................................................................................... 232  New Value in Data Table.......... 241  Go To Example ............................................................................................................ 238  FIND ALL Search Results ....................................................................... 251  Histogram Popup Menu.......................... 242  Additional Options Available through Popup Menu ............................ 254  N Fo ot r Fo R ev rR i ew ep ro O du nly ct ........................................................................................................................................... 239  Replace Popup Window ...................... 235  Going to an Instruction in the Ladder Logic from a Search Result ........................................................ 253  Creating Histogram Trends .................................................................................................................. 248  Comms Drop Down Menu ......................................................................................................... 233  Find All Popup Menu .................

.................................................................................................................................................................................. 9 Table 8: Binary to Octal Example .................. 6 Table 4: Decimal..................................... and Octal Equivalents .................Introduction to Programmable Logic Controllers List of Tables Table 1: Number System Bases ................. 231 N Fo ot r Fo R ev rR i ew ep ro O du nly ct .............................................................................. 7 Table 5: Decimal to Binary Conversion ....................................... io n xi .................................................................................. 47 Table 17: PLC-5 Default Data Files .. and Octal Equivalents ..................................................................... 8 Table 6: Binary and Octal Equivalents ....................................................... 11 Table 10: Hexadecimal to Binary Example.................................... 13 Table 12: Power Supply Ratings ............................... 9 Table 7: Octal to Binary Example ................................................... 4 Table 3: Decimal to Binary Conversion ............................................................... 69 Table 19: Logical Address Format ............................................................................................. 76 Table 20: I/O Image Address Format ................................................................................ 18 Table 14: AC and DC Input Modules ............................................................... 2 Table 2: Decimal and Binary Equivalents ............................................................................................................................................................................................................................................ 85 Table 21: Data File Type Abbreviations .............. 69 Table 18: PLC-5 User Defined Data File Types . 25 Table 15: AC and DC Output Modules ................................................................................................................................... 12 Table 11: Binary to Hexadecimal Example.............. Binary.......................................................................................................... 28 Table 16: Data Files ................................ 17 Table 13: PLC-5 Processors .......... Binary............ 10 Table 9: Decimal..............

Monitor the data tables. Describe hardware and software addressing. 17. Use timer instructions in a program. Identify the major components of the RSLogix 5 main window. Describe the major components of the PLC-5. 13. 15. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Edit existing rungs of ladder logic. restore. Describe the operation of histograms. 10. Access the RSLogix 5 on-line help files. 4. Save. 19. Explain the operation of timer instructions. io n 1 . 14. 8. 9. 3. 6. 20. Convert a number from one base to another. 11. 21. 7. you will be able to perform the following: 1. Force bit instructions on and off. Describe the organization of processor memory. 18. Explain the operation of counter instructions. Use bit instructions in a program. OBJECTIVES Upon completion of this course. and create program files. timers. Explain the operation of bit instructions 12. software. counters). 5. hardware. 16. Use counter instructions in a program. Describe a basic systematic troubleshooting process. ladder logic functions (relay contacts.Introduction to Programmable Logic Controllers PLC Basics INTRODUCTION This course provides information on PLC concepts. Explain the basic operation of a PLC-5 system. Establish a communication link to the PLC. There are hands-on exercises for configuration and programming. Clear processor memory. 2.

8. which are easily derived from the binary system. A number system using three symbols (0. The octal and hexadecimal systems. PLCs. These two states are represented most effectively using the binary number system. 1. 1. do not understand the decimal system. The base of the decimal system is ten because we use ten unique symbols (0. and 2) would be base three. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . however. Table 1: Number System Bases Base If you do not see a subscript at the end of a number. The base of a number system is indicated by a subscript at the end of the number. Octal numbering is especially important with Allen-Bradley products as much of the technical PLC documentation is based on this system. are based on two stable states. IDENTIFYING THE BASE OF A NUMBER A number is a symbol that represents a quantity. are convenient for representing strings of binary numbers. Programmable logic controllers (PLCs). Remember to count zero as a symbol when determining the base of a number system. 4. io n Number 125710 23458 Ten (decimal) Two (binary) Eight (octal) 100100012 12FA416 Sixteen (hexadecimal) 2 . of a number system identifies the number of unique symbols in that particular system. 3. and hexadecimal. 7. This means that 34510 and 345 are equivalent base 10 numbers. Only numbers written in a base other than base ten must have a subscript. octal. The base. 2. Table 1 illustrates some examples of different number system bases. 9) to represent all of the numbers. You are probably most familiar with the decimal system. or radix.Introduction to Programmable Logic Controllers NUMBER THEORY The section introduces four commonly used systems for numbering: decimal. 5. 6. as this the system of numbers we use every day. along with every other computer in the world. then the number is assumed to be base ten. binary.

Using scientific notation. the letters A through F are used to make up the rest of the symbols. 10. POSITIONAL NOTATION AND THE DECIMAL NUMBERING SYSTEM Positional notation is a system that describes the value of a number by the position of the symbol within the number. The number 687 (in base 10) is made up of three digits . The least significant digit (LSD) is 7. it is 1. In base ten.6. 1000. and in base 2. Each position is assigned a weight.832? We interpret this as: Which is equivalent to: (6 x 10)+(7 x 1)+(8 x 1/10)+(3 x 1/100)+(2 x 1/1000) = 60 + 7 + 0. and so on. 8. the number 687 is written: (6 x 102) + (8 x 101) + (7 x 100) Which is equivalent to: (6 x 100) + (8 x 10) + (7 x 1) = 600 + 80 + 7 = 687 What about a number like 67. In the decimal system. and its value is 7.Introduction to Programmable Logic Controllers You should also note that the highest value symbol used in a number system is always one less than the base of the system. The 7 occupies the ones position. Weighted values increase as you move from right to left. The next significant digit is 8 and has a value of 80 (8 x 10). Numerical quantities are determined by multiplying the digit in a particular position by the weighted value of the position. then summing the results. the 8 occupies the 10’s position.03 + 0. the symbol with the largest value is 9. Positional notation is best described through an example. it is 4. io n 3 . Since we run out of unique number symbols after 9. the weighted values are 1. The number in the rightmost position has the lowest weighted value.832 N (6 x 101)+(7 x 100)+(8 x 10-1)+(3 x 10-2)+(2 x 10-3) Fo ot r Fo R ev rR i ew ep ro O du nly ct .8 + 0. and the 6 is in the 100’s position.002 = 67. Base 16 uses 16 unique symbols to represent all of the numbers. Base 16 (hexadecimal) is a little different. 100. and 7. The 6 is the most significant digit (MSD) and has a value of 600 (6 x 100). in base 5.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . which includes PLCs and computers. io n Table 2: Decimal and Binary Equivalents Decimal Binary 0 1 2 3 4 5 6 7 8 9 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 10 11 12 13 14 15 1010 1011 1100 1101 1110 1111 4 . The binary numbering system is ideal for use with all digital devices. 0 and 1. All digital devices operate using two different states: off and on. 0 represents the “off” state of the digital device.Introduction to Programmable Logic Controllers THE BINARY NUMBER SYSTEM The binary system of numbering is based on two digits. Table 2 compares the first 16 decimal numbers to their binary equivalents. The binary numbers 0 and 1 correspond nicely to these states. the binary number system has a base of 2. can be quite lengthy because there are so few symbols available to represent all of the numbers. Counting in binary is performed the same way as counting in decimal. Therefore. and 1 represents the “on” state. Binary numbers. however. Normally.

Example: Convert the binary number 1100112 to its decimal equivalent.Introduction to Programmable Logic Controllers Binary System Positional Notation The decimal system uses powers of 10 as weighted values of particular positions within a number. The following illustrates binary system positional notation: 24 23 22 20 2-1 2-2 2-3 2-4 Where: 24 = 2 x 2 x 2 x 2 = 1610 23 = 2 x 2 x 2 = 810 22 = 2 x 2 = 410 21 = 2 = 210 20 = 110 2-1 = 1/2 = 0.12510 2-4 = 1/(2 x 2 x 2 x 2)= 0. uses powers of 2.01012 to its decimal equivalent.2510 2-3 = 1/(2 x 2 x 2)= 0. however. Just sum the weighted values of all positions where a 1 is present in the binary number.062510 How to Convert a Number from Binary to Decimal Converting from base 2 (binary) to base 10 (decimal) is relatively easy.312510 N Fo ot r Fo R ev rR i ew ep ro O du nly ct .01012 = (0 x 20) + (0 x 2-1) + (1 x 2-2) + (0 x 2-3) + (1 x 2-4) = 0 + 1/4 + 0 + 1/16 = 0.510 2-2 = 1/(2 x 2)= 0. The binary system. 0. 1100112 = (1 x 25) + (1 x 24) + (0 x 23) + (0 x 22) + (1 x 21) + (1 x 20) = (1 x 32) + (1 x 16) + 0 + 0 + (1 x 2) + (1 x 1) = 5110 Example: Convert the binary number 0. io n 5 .

So: 15110 = 100101112 100101112 = (1 x 27) + (0 x 26) + (0 x 25) + (1 x 24) + (0 x 23) + (1 x 22) + (1 x 21) + (1 x 20) = 128 + 0 + 0 + 16 + 0 + 4 + 2 + 1 = 15110 N You can check your result by converting the binary number back to its decimal equivalent. 6 . become the converted number. when placed together. io n Table 3: Decimal to Binary Conversion Division 151 / 2 75 / 2 37 / 2 18 / 2 9/2 4/2 2/2 1/2 Result 75 37 18 9 4 2 1 0 Remainder 1 1 1 0 1 0 0 1 Begin by dividing 151 by 2. The remainder of this step becomes the least significant (right-most) digit in the converted number. are the converted number. Example: Convert 15110 to its binary equivalent. and then successively divide the result of each step by 2. The steps of each successive division are shown in Table 3. The remainders. All of the remainders from the successive divisions. You begin by dividing the decimal number by the base. when taken together. We are finished with the successive divisions when we get 0 as the result. The remainder from the first division is the least significant digit of the base 2 conversion. The remainders now become the converted decimal.Introduction to Programmable Logic Controllers How to Convert a Number from Decimal to Binary Decimals are converted to another base by successively dividing the decimal by the desired base. Fo ot r Fo R ev rR i ew ep ro O du nly ct .

00024410 N Fo ot r Fo R ev rR i ew ep ro O du nly ct . 5. Table 4: Decimal. io n 7 . Table 4 compares a decimal number to its binary and octal equivalents.00195310 8-4 = 1/(8 x 8 x 8 x 8)= 0. Binary. and 7. or base 8 system of numbering is based on eight digits: 0. 1. 2.12510 8-2 = 1/(8 x 8)= 0. and Octal Equivalents Decimal Binary Octal 0 0000 0 1 0001 1 2 0010 2 3 0011 3 4 0100 4 5 0101 5 6 0110 6 7 0111 7 8 1000 10 9 1001 11 10 1010 12 11 1011 13 12 1100 14 13 1101 15 14 1110 16 15 1111 17 Octal System Positional Notation The octal system uses powers of 8 as the positional notation weighted values. 6.Introduction to Programmable Logic Controllers THE OCTAL NUMBER SYSTEM The octal. 3. 4. The following illustrates the octal system positional notation: 84 83 82 80 8-1 8-2 8-3 8-4 Where: 84 = 8 x 8 x 8 x 8 = 409610 83 = 8 x 8 x 8 = 51210 82 = 8 x 8 = 6410 81 = 8 = 810 80 = 110 8-1 = 1/8 = 0.01562510 8-3 = 1/(8 x 8 x 8)= 0. Allen-Bradley uses the octal number system extensively with all models of PLC.

We are finished with the successive divisions when get 0 as the result. You must also multiply the weighted value of the position by the number occupying the position.Introduction to Programmable Logic Controllers How to Convert a Number from Octal to Decimal The same principles are used to convert octal to decimal as were used to convert binary to decimal. io n Table 5: Decimal to Binary Conversion Division 149 / 8 18 / 8 2/8 Result 18 2 0 Remainder 5 2 2 Decimals are converted to octal by successively dividing a decimal number by eight. 8 . The remainder from the first division is the least significant digit of the base 8 conversion. So: You can check your result by converting the octal number back to its decimal equivalent. The method is the same as was used to convert decimal to binary. The only difference is that octal uses 8 for the base instead of the 2 used in binary. The remainders now become the converted decimal. 2258 = (2 x 82) + (2 x 81) + (5 x 80) = 128 + 16 + 5 = 14910 N 14910 = 2258 Fo ot r Fo R ev rR i ew ep ro O du nly ct . 1428 =(1 x 82) + (4 x 81) + (2 x 80) = (1 x 64) + (4 x 8) + (2 x 1) = 9810 How to Convert a Number from Decimal to Octal Example: Convert 14910 to its octal equivalent. Example: Convert the binary number 1428 to its decimal equivalent.

Convert each octal digit using the table. Use Table 6 and write the binary equivalent below each octal digit. illustrated in Table 7. Table 6: Binary and Octal Equivalents Octal 0 1 2 3 4 5 6 7 Binary 000 001 010 011 100 101 110 111 How to Convert a Number from Octal to Binary Using the information in Table 6. Example: Convert 236538 to binary. N Octal Binary Fo ot r Fo R ev rR i ew ep ro O du nly ct . locate the octal number in the table then read across to the binary equivalent. Write down the binary equivalent below the octal digit being converted.Introduction to Programmable Logic Controllers Conversions between Octal and Binary Octal numbers can be represented using three binary digits. Table 6 illustrates octal numbers and their binary equivalents. io n 2 0 1 0 1 1 1 0 0 1 3 0 1 This is 1 9 . Table 7: Octal to Binary Example 3 0 6 1 5 1 The binary equivalent of 236528 is 0101001101010112. The binary equivalent then becomes the string of ones and zeros that were written down for each octal digit.

N 10 . Fo ot r Fo R ev rR i ew ep ro O du nly ct . Example: Convert 111001002 to octal. but you have to separate the binary number into groups of three digits starting on the right side of the number. This is illustrated in Table 8. as in this example. io n Table 8: Binary to Octal Example 1 1 1 4 0 0 0 3 1 4 0 Binary Octal 0 The octal equivalent of 111001002 is 3448. Use Table 6 and write the octal equivalent below each group of three binary digits. to complete a group having one or two digits.Introduction to Programmable Logic Controllers How to Convert a Number from Binary to Octal You can use Table 6 to convert from binary to octal. Add leading zeros to the last group. Separate the binary number into groups of three digits beginning from the right side. You then read the octal equivalent from the table for each group of three binary digits.

octal. io n 11 . or base 16 system of numbering is based on sixteen digits. Since we run out of unique numbers after 9. the letters A through F are used to represent the remaining numbers in the base. Binary.Introduction to Programmable Logic Controllers THE HEXADECIMAL SYSTEM The hexadecimal. and Octal Equivalents Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Octal 0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 0 1 2 3 4 5 6 7 8 9 A B C D E F Hex N Fo ot r Fo R ev rR i ew ep ro O du nly ct . and hexadecimal equivalents. Table 9 compares a decimal number to its binary. Table 9: Decimal.

How to Convert a Number from Hexadecimal to Binary Using the information in Table 9. Example: Convert A5F16 to binary. Write down the binary equivalent below the hexadecimal digit being converted. The binary equivalent then becomes the string of ones and zeros that were written down for each hexadecimal digit.Introduction to Programmable Logic Controllers Conversions between Hexadecimal and Binary Conversions between hexadecimal and binary are similar to octal/binary conversions in that you can use a table of equivalent values to perform the conversion. The most difficult part of hexadecimal conversions is remembering that a letter represents a number. io n A 1 0 1 0 1 0 1 F 1 1 1 1 The binary equivalent of A5F16 is 1010010111112. The only difference is that you need four binary digits to represent a hexadecimal digit instead of the three used with octal. Use Table 9 and write the binary equivalent below each hexadecimal digit. locate the hexadecimal number in the table then read across to the binary equivalent. N 12 . Table 10: Hexadecimal to Binary Example 5 0 Hexadecimal Binary Fo ot r Fo R ev rR i ew ep ro O du nly ct . This is illustrated in Table 10. Convert each hexadecimal digit using the table.

Example: Convert 111001002 to hexadecimal.Introduction to Programmable Logic Controllers How to Convert a Number from Binary to Hexadecimal You can use Table 9 to convert from binary to hexadecimal. Separate the binary number into groups of four digits beginning from the right side. Binary Hexadecimal The hexadecimal equivalent of 111001002 is E416 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Table 11: Binary to Hexadecimal Example 1 E 1 1 0 0 4 1 0 0 13 . You then read the hexadecimal equivalent from the table for each group of four binary digits. Add leading zeros to the last group. to complete a group of four digits. if necessary. This is illustrated in Table 11. Use Table 9 and write the hexadecimal equivalent below each group of four binary digits. but you have to separate the binary number into groups of four digits starting on the right side of the number.

Introduction to Programmable Logic Controllers INTRODUCTION TO THE PLC-5 This section introduces the basic operation and organization of the PLC-5 programmable logic controller. The PLC-5 is a modular system. Although this training specifically discusses the PLC-5. the concepts introduced in this text are applicable to most programmable logic controllers. However. io n 14 . multiple PLCs may be connected together via a common communication network in order to provide sophisticated control over complex operating environments. Simple applications may use only one PLC. PLC-5 HARDWARE A programmable logic controller (PLC) is a specialized type of computer designed for industrial automation and process control. A basic PLC system consists of the following components: • • • • • Equipment chassis Power supply Processor module I/O modules with field wiring Remote I/O adapter module N Fo ot r Fo R ev rR i ew ep ro O du nly ct . which provides flexibility in order to meet a wide range of possible applications. The PLC-5 is a family of PLCs manufactured by Allen-Bradley. The complexity of the operating environment defines the number of PLCs in the system.

The power supply jumper is used to set up the system for either an internal (in the same rack) power supply. and to the right side for an external power supply. and I/O or specialty modules that make up the system. Four different size chassis are available: 4-slot. Modules are inserted into the chassis on plastic slots and plug into the back plane connections. This design provides for easy system expansion and module replacement. and 16slot. An example of an equipment chassis is shown in Figure 1. 12-slot. power supply. The configuration plug is moved to the left side when an internal power supply is used.Introduction to Programmable Logic Controllers Equipment Chassis The equipment chassis is a single. The left-most slot of the chassis accepts the controller module (or the remote I/O adapter if the chassis is being used as a remote I/O rack). io n Figure 1: Equipment Chassis 15 . 8-slot. compact enclosure that holds the programmable controller module. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . or an external power supply.

The 1771 designates that the power supply is compatible with the 1771 chassis. A variety of power supply modules are available.Introduction to Programmable Logic Controllers The back plane switch assembly consists of eight rocker switches that determine the chassis output operation in the event of a fault. each with different ratings for input and output voltages. If the power supply is a single slot module. The P4 designator indicates the power supply rating. A typical power supply module is the model 1771-P4. and the operation of memory modules. it will be designated with an “S” such as 1771-P4S. N Power supply modules can be either a single or double slot design. The power supply module can be installed in any slot in the chassis (except the processor slot on the left side of the chassis). Power Supply Module The purpose of the power supply is to supply and regulate the power to the modules in the PLC-5 equipment chassis. Fo ot r Fo R ev rR i ew ep ro O du nly ct . An example of a power supply module is shown in Figure 2. the addressing mode of the chassis. io n Figure 2: Power Supply Module 16 .

then the machine or process being controlled by the PLC will not operate properly. Table 12 lists the ratings of the various slot power supplies commonly used with the PLC-5. It accepts 120 VAC. This prevents the processor from operating when voltage is too low.Introduction to Programmable Logic Controllers The 1771-P4 power supply is a two slot module. Power Supply Model 1771-P3S 1771-P4 1771 -P4S 1771-P4S1 1771-P5 1771-P6S 1771-P6S1 Processor Module The processor module is a small. so you must connect some type of programming interface in order to monitor or direct the operation of the device. Although there are different types of application software that you can write for the PLC-5. The programming interface is usually a laptop computer. the power supply will shutdown. You must turn the power supply off for 15 seconds to reset it. If the ladder logic does not operate correctly. The RSLogix 5 software allows you to create the programs (application software) that tell the controller module what to do. although it can be a desktop computer connected over some distance to the controller through a communication network. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . the most common type is known as ladder logic. under-voltage. 5VDC output to the chassis back plane. The application software resides in the processor’s memory. and any resulting errors. rack-mounted computer. The ladder logic ultimately controls the machines and processes associated with the PLC. The processor module does not have a keyboard. In either case. the programming interface runs the RSLogix 5 software. The power supply will also shutdown if the processor line voltage drops below 92 VAC and will restart the processor when line voltage increases to 97 VAC. and over-current protection to the I/O chassis and its modules. 60 Hz input and delivers 8A. The operation. io n Table 12: Power Supply Ratings Input Power 120VAC/60Hz 120VAC/60Hz 120VAC/60Hz 100VAC/60Hz 24VDC 220VAC/60HZ 200VAC/60Hz Output Power 3A/5VDC/38W 8A/5VDC/79W 8A/5VDC/60W 8A/5VDC/60W 8A/5VDC/72W 8A/5VDC/60W 8A/5VDC/60W 17 . protection features. and external wiring connectors of the power supplies are essentially the same. This power supply contains output over-voltage. If one of these faults occur.

Introduction to Programmable Logic Controllers There are many types of processor modules in the Allen-Bradley PLC-5 family of controllers.000 512 4 Scanner/Adapter remote 4 local/7 13. and scan time. remote rack capability.000 1024 8 Scanner/Adapter remote 4 local/15 48. Table 13 summarizes the capabilities of the several models of processors. memory.000 256 4 4 local None 6.000 256 4 4 local Adapter 4 local/3 6. io n 18 . Differences between the types of processors generally relate to I/O capacity.000 3072 24 Scanner/Adapter remote 5/25 5/40 5/60 N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Table 13: PLC-5 Processors Processor Model 5/10 5/12 5/15 Memory I/O I/O Racks Rack Communication (Words) Points (Maximum) Configuration Mode 6.000 2048 16 Scanner/Adapter remote 4 local/23 64.

Figure 3 illustrates the PLC 5/15 processor module as an example.Introduction to Programmable Logic Controllers The processor module always occupies the left-most slot in the chassis. io n 19 .5 Amperes of current for operation and draws this power from the chassis back plane. The processor requires 2. N Figure 3: PLC 5/15 Processor Module Fo ot r Fo R ev rR i ew ep ro O du nly ct . All processor modules have essentially the same physical appearance and operate the same internally.

In this mode. and save programs to a disk drive. In the RUN mode. the device can communicate with each processor on the network. Be aware that the outputs are disabled in Remote Test mode. outputs are disabled. Note that you cannot create or delete ladder logic or data files while in the Remote Test mode. and the processor does not scan the program. inputs are not updated. modify ladder files. Modify the size of a data file. remote test. Program on-line. force I/O.Introduction to Programmable Logic Controllers A 9-pin. In this mode you cannot: • • • • Create or delete ladder or data files. The lower terminal labeled REM I/O is the remote I/O connector. The front-panel key switch has three positions for controlling the mode of processor operation. D-shell connector labeled PEER COMM INTFC is the communication port between the processor and the programming device. In the PROGRAM mode. labeled PEER COMM INTFC. down load to an EEPROM module. In the REMOTE mode. and remote run modes through the programming device. There are two communication ports on the processor module located directly below the D-shell connection. Once you connect the programming device to one processor. Change mode of operation through the programming device. PROGRAM. and REMOTE. io n Key Switch 20 . you can enter a program. even though the ladder logic executes. is for the peer communications link (Data Highway Plus). They are RUN. The upper connector. you can run the loaded program. you can change between remote program. These are: Fo ot r Fo R ev rR i ew ep ro O du nly ct . This connection lets the programming device communicate with any device on the link. Front Panel LEDs • • • • • • COM (Communication Active) REM I/O (Remote I/O) ADPT (Adapter) BATT (Battery) PROC (Processor) FORCE N The processor module has six LED status indicators. and save or restore programs.

the processor communicates with I/O in up to three remote I/O chassis and with its local I/O. The ADPT LED status indications are as follows: • • • • • Steady Green: Active remote I/O link Steady Red: Duplicate station address selected Blinking Green: No communication with host processor Sporadic Green: Bad communication with host processor Off: Not in Adapter mode.Introduction to Programmable Logic Controllers COM (Communication Active) LED The COM LED indicates the operation of the PLC-5 processor within the Peer Communication Link. io n 21 . the PLC-5 processor communicates with a supervisory processor capable of remote I/O and it controls the I/O in its local chassis. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . The status indications of the REM I/O LED are as follows: • • • • Steady Green: Active remote I/O link Steady Red: Remote I/O link fault Blinking Green/Red: Partial remote I/O link fault Off: No remote I/O selected ADPT (Adapter) LED The ADPT (adapter) LED indicates the mode of operation of the PLC-5 processor. In the Scanner Mode. The Peer Communication Link allows the PLC-5 processor to communicate with other PLC-5 processors and with the industrial terminal. The status indications of the COM LED are as follows: • • • • Blinking Green: Processor transmitting/receiving on the communication link Steady Bright Red: Watchdog timer time out Steady Dull Red: Duplicate station address selected Off: No communication REM I/O (Remote I/O Active) LED The REM I/O LED light indicates the operation of the remote I/O rack and provides indication of a remote I/O fault. When in the Adapter Mode. The processor may operate in Adapter Mode or Scanner Mode. and provides indication of communication faults. The maximum number of stations you can connect to the Peer Communications Link is 64. The ADPT LED will be on when in adapter mode and off in scanner mode.

The program is not running. and SW3. PROC (Processor) LED The PROC LED indicates the condition and program mode of operation within the processor. SW2. If power is not applied to the processor module. Test Mode. Steady Red: Major Fault Off: Program Mode. io n 22 .Introduction to Programmable Logic Controllers BATT (Battery) LED The BATT LED indicates the status of the battery. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . The program is running. The PROC LED status indications are as follows: • • • Steady Green: Run Mode. blinks when forces are installed but not enabled. The battery is held beneath a cover on the front of the processor module. The date the battery was installed should be written on the front of the module. labeled SW1. FORCE LED The FORCE LED is amber. and off when no forces are installed. or the processor is not receiving power. the battery retains the processor memory for up to one year. are located inside the processor module as illustrated in Figure 4. The LED is off if the battery is good and on if the battery is low. Battery The processor houses one AA lithium battery. The FORCE LED is on steady when forces are installed and enabled. Processor Module DIP Switches The processor module is configured for operation through three groups of DIP switches. It indicates that a force exists within the processor. These switches.

It sets the number of words exchanged between the host processor and the PLC-5 processor when the PLC-5 processor is in adapter mode. This switch assembly also configures the processor for scanner or adapter operation. It is used to determine the station number of the processor module when it is configured in a peer communications link (data highway plus). The specific switch settings for this module are found in the processor technical bulletin. Switch assembly SW2 is also an eight-switch assembly. The PLC 5/15 can transfer eight words between the host PLC-5 and the adapter module per scan. Switch assembly SW3 is a four-switch assembly that connects a terminator across the line when the processor module is the last device in a peer communications link remote I/O link. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers Switch assembly SW1 is an eight-switch assembly. and the I/O rack number of the processor module when it is in adapter mode. io n Figure 4: Processor Module Switches 23 . This switch assembly also establishes the beginning I/O group number assigned to the PLC-5 processor.

sensors. and operator controls. Input Modules. CMOS RAM Module (1785-MR) .Provides 4K words of RAM memory in addition to the processor’s base memory. CMOS RAM Module (1785-MS) . additional memory may be required. The interface between all physical inputs and the controller is the input module. Fo ot r Fo R ev rR i ew ep ro O du nly ct . Common types of input devices are push buttons. due to system expansion and increased needs. io n 24 .Introduction to Programmable Logic Controllers Memory Modules Each processor module contains a base memory. Field wiring connects the modules to signaling or control devices in the facility. These memory modules are installed into the memorymodule slot on the bottom of the processor module. However. There are three memory modules that may be added to the processor: • • • EEPROM Module (1785-MJ) .Provides up to 6K words of nonvolatile memory backup. and then passes the information on to the controller through common connection in the equipment rack. Output modules accept the control signals from the processor and energize the designated output module point. Input Modules N An input is any signal that supplies information to the programmable controller. limit and proximity switches. The input module receives the signal from the input device. This is usually an adequate level for most applications. control relays. and Field Wiring Input modules accept input signals from field devices and condition them to meet the power requirements of the processor. Output Modules. The two CMOS RAMs are only available for use with the PLC 5/15 and 5/25 processors.Provides 8K words of RAM memory in addition to the processor’s base memory. transforms the signal to a format that is recognizable by the ladder logic. The EEPROM module may be used in any processor.

This prevents false data input to the processor. and push buttons. io n 1771-IA 1771-IAD 1771-IA2 1771-IB 1771-IBD 1771-IBN 1771-IC 1771-ICD 1771-IH 1771-IM 1771-IMD 1771-IN 1771-IND 1771-IQ 1771-IT 1771-IVN 92-138 VAC/VDC 77-138 VAC 92-138 VAC 10-27 VDC 10-30 VDC 10-30 VDC 42-56 VDC 20-60 VDC 24-50 VDC 184-276 VAC/VDC 184-250 VAC 12-28 VAC 10-30 VAC 5-30 VDC 10-27 VDC 10-30 VDC Model Number Input Voltage Rating Number of Input Points 8 16 8 8 16 32 8 16 8 8 16 8 16 8 8 32 25 . Table 14 summarizes the rating characteristics of the various AC and DC input modules commonly used with the PLC-5. The “1771” identifies the PLC-5 family and indicates that the module fits into a 1771-series universal chassis. The input signals are filtered within the module to limit the effects of voltage transients caused by contact bounce and electrical noise. and 32-point designs and accept AC or DC input signals. 16-point. the “A” indicates an AC module. The type of input module selected for a particular application depends on the type of input signal. This includes analog inputs. The input circuits within the input module are optically isolated from the back plane of the chassis. The “I” indicates an input module. This number provides descriptive information about the module. limit switches. and the “D” indicates high density. and specialty modules for inputs from thermocouples. resistance-temperature devices. Typical field device inputs to this module are proximity switches. digital inputs. A high-density module is a module with 16 or more points. N A typical input module is the 1771-IAD. Table 14: AC and DC Input Modules This module converts sixteen individual 120VAC inputs to a logic level compatible with the processor. Input modules are available in 8-point (8 input signal terminals). and encoders. Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers There are several types of input modules.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Figure 5 illustrates the 1771-IAD module. Each input module requires approximately 0.25 Amperes of current. io n Figure 5: 1771-IAD AC Input Module 26 .Introduction to Programmable Logic Controllers The power used to operate the logic circuitry within the input module is drawn from the chassis back plane.

A hinged plastic cover protects the terminals. pull outward on the tab located on the top of the module. The input status indicators are located on the front of the module above the terminal strip. The field devices are wired to the terminal block on the front of the module. The green ACTIVE LED when the module is powered and the opto-isolator data paths are functioning properly. which is reserved for the processor. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . B. io n 27 . To remove the module. the inputs are reset to the off position when a module failure occurs. The next sixteen terminals are numbered 00 through 17 (octal). The remaining sixteen LEDs (00 to 17) illuminate red when the associated input has power present on the terminal. To install the module. The input module fault mode selection configuration plug is located on the top of the module. the inputs to the processor from the module remain in the last known valid state when a failure is detected. This eases the removal and replacement of a module. The plug has two positions: “last-state” and “reset. C. In the reset position. The last terminal (E) is for the common ground connection. The status indicators show the condition of the module and its inputs. The purpose of this plug is to determine the status of the inputs to the processor during a module failure. D) are not used on input modules.Introduction to Programmable Logic Controllers The 1771-IAD module occupies one slot in the universal chassis and can be placed in any location within the universal chassis except for the very first slot to the left. Note that the first four terminals (A. This terminal block is hinged on the bottom and connected to the universal chassis.” In the laststate position. slide it into the slotted track located within the chassis.

Typical output devices include relays. solenoids. A high-density module is a module with 16 or more points. the type of output module depends on the application. A typical output module is the 1771-OAD. Types of output modules include those for analog and digital signals. There are several types of output modules. The “1771” identifies the PLC-5 family and indicates that the module fits into a 1771-series universal chassis. solenoids. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers Output Modules An output from the programmable controller causes an external event to occur. Table 15 summarizes the rating characteristics of the various AC and DC output modules commonly used with PLC-5. and linear position transducers. io n Table 15: AC and DC Output Modules 92-138 VAC 10-138 VAC 10-27 VDC 10-60 VDC 10-30 VDC 42-53 VDC 184-276 VAC 184-250 VAC 20-30 VAC 24 VDC 10-30 VDC 24-138 VAC 0-24 VAC/VDC Model Number Output Voltage Rating 1771-OA 1771-OAD 1771-OB 1771-OBD 1771-OBN 1771-OC 1771-OM 1771-OMD 1771-ON 1771-OQ 1771-OVN 1771-OW 1771-OYL Number of Output Points 8 16 8 16 32 8 8 16 8 8 32 8 8 28 . As with the input module. The output interface module interprets the control signals controller from the controller then outputs the signals that actually change the position of equipment or modify processes. This module converts the signals from the processor in order to energize the 16 individual outputs associated with the module. The outputs of the module are fused by one 10 Ampere. The fuse is located on the left side of the module. and system displays or monitors. and indicators. The module outputs can accommodate a range of 12 to 120 VAC. lamps. The “O” indicates an output module. 250V fuse to protect the module from damage in the event of a field device short circuit. The interface between the controller and a physical output is the output module. and the “D” indicates high density. This number provides descriptive information about the module. the “A” indicates AC module. Typical field device connections to the module are AC motor starters.

Figure 6 illustrates the 1771-OAD module. io n Figure 6: 1771-OAD AC Output Module 29 . Each output module requires approximately 0.7 Ampere of current. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers The power used to operate the logic circuitry within the output module is drawn from the chassis back plane.

In the reset position. which is reserved for the processor. The field devices are wired to the terminal block on the front of the module. The red output LEDs (00-17) indicate that the processor has commanded an output on. If it is not used. A hinged plastic cover protects the terminals. The module is installed and removed in the same manner as its corresponding input module. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Field wiring completes the PLC-5 connections to the field devices. It is the FUSE indicator. The output module fault mode selection configuration plug is located on the bottom of the module.” In the last-state position. The module configuration plug operates independently of the last-state switch on the I/O chassis back plane. This terminal block is hinged on the bottom to allow easy module removal without removing the field device wiring. Field wiring is all wiring. The module plug position takes precedence when a module fault occurs. AC power is supplied to this module through the four terminals labeled L1. One additional indicator is present on the status panel. The output status indicators operate in a manner similar to the input module. it indicates that the output fuse has blown. the outputs will reset to off following a module failure. and connectors used to connect the programmable controller to external devices. This plug determines the state of the outputs following a module failure. Field Wiring All inputs and outputs are connected to the programmable controller by field wiring. The last terminal (L2) may or may not be used as a common ground with the field device. The I/O chassis back plane plug takes precedent if a rack fault occurs. Power is supplied to all four points to protect from exceeding the total surge rating of the module. These four terminals should be jumpered together to prevent overstressing any single point. When illuminated. no connection to this point is necessary. io n 30 . junction boxes. The connection paths are from the module to the field device to ground. They do not indicate the presence of power on a given terminal. Field devices are connected to terminals 00 to 17 (octal).Introduction to Programmable Logic Controllers The 1771-OAD module occupies one slot and can be placed in any location within the chassis except for the very first slot to the left. the outputs will remain in the last known current state should a module failure occur. The possible plug positions are “last state” and “reset. The ACTIVE LED indicates power to the output module and opto-isolation data path operation.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 7: Remote I/O Adapter Module 31 . The adapter occupies one slot in the universal chassis and must be placed in the leftmost slot. The module requires 1. just as with the processor module.Introduction to Programmable Logic Controllers Remote I/O Adapter Module The 1771-ASB Remote I/O Adapter module is an interface between remote racks and the processor module. Essentially. The adapter communicates with the other I/O modules in the remote rack. Figure 7 illustrates the Remote I/O Adapter module. The power to operate the module is drawn from the chassis back plane. the remote I/O adapter takes the place of the processor module in the remote racks. and the processor module communicates with the adapter.2 Amperes of current.

there is a fault. and the remote I/O adapter module is not actively controlling the I/O modules. The module has three status indicators. Two switch assemblies are located inside the 1771-ASB Remote I/O adapter module. the outputs in an un-faulted local or remote rack will remain in the last state ordered prior to the fault. the inputs to the processor will remain in their last pre-fault state. When it is OFF it indicates there is no communication between the processor and the adapter module. the processor is in the program or test mode. When it is flashing. io n 32 . When on.Introduction to Programmable Logic Controllers The terminal block on the front of the module is used for connection of external I/O communication cables and an optional chassis restart button. The I/O RACK FAULT indicator is red. When on. it shows that the processor restart lockout switch on the I/O chassis back plane switch assembly is on. that DC power is on and supplying the entire I/O rack. The positioning procedures for these switches are contained in the equipment technical bulletin. These switches are labeled SW-1 and SW-2. As a result. The ADAPTER FAULT indicator is red. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . and that the I/O rack response is in the manner denoted by the last state switch (switch number one of the I/O chassis back plane switch assembly). when a fault occurs. The ACTIVE indicator is green. Depress the I/O rack restart push button (if installed) to clear the restart lockout. If a fault should occur in a remote I/O chassis containing inputs. and that the I/O adapter module is actively controlling the modules. When flashing it indicates that a communication link is established between the processor and the remote I/O adapter module. The module has built-in fault detection capabilities. They are used to set group numbers and rack numbers in both a complimentary and non-complimentary I/O configuration. it indicates: that there is active communication between the processor and the adapter module. it indicates that a fault has been detected at the remote I/O adapter module on the logic side of the I/O modules. When on it indicates that the module is not operating properly.

input module. output module. A programming terminal is used to program the processor. io n Figure 8: Hypothetical Circuit Figure 8 illustrates the hypothetical circuit for this example. and lamp 2 illuminates when switch 2 is closed. processor module. Switch 1 and Switch 2 are normally open push button switches. then implementing the same circuit using the major PLC components. the terminal may be disconnected. 33 . and power supply. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . but it is not considered a major component because once the processor is programmed. Lamp 1 illuminates when switch 1 is closed. The operation of these major components is best illustrated by developing a hypothetical hardwired circuit.Introduction to Programmable Logic Controllers PLC-5 SYSTEM OPERATION The major components of a PLC are the equipment chassis. This circuit controls two different lamps.

This software is also known as ladder logic since it appears similar to a standard electrical ladder diagram. The push button switches connect to an input module in the PLC system instead of directly to the lamps. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Lamp 1 lights. The lamps are connected to the output module. Lamp 2 lights. and Switch 2 to Lamp 2 through software. The major differences between the two models relate to the signal flow paths.Introduction to Programmable Logic Controllers Figure 9 shows the same switches and lamps under the control of a PLC system. io n Figure 9: Hypothetical Circuit Controlled by PLC System 34 . The operation of the hardwired lamp system and the PLC-controlled system appear identical. When Switch 1 is closed. The processor is programmed using a terminal (laptop) connected to a communication port on the processor. The processor is programmed to connect Switch 1 to Lamp 1. and when Switch 2 closes. Notice also that the input module is indirectly connected to the output module via the processor.

The ladder logic generates a low-voltage output signal from the processor to the output module. Switch 1 controls Lamp 1. With a PLC. and Switch 2 control Lamp 1. Electrical power simply follows the wire conductors to the lamp. power moves from the voltage source.Introduction to Programmable Logic Controllers Signal Flow Paths When a push button is pressed in the hardwired system. For example. An observer of both hardwired and PLC controlled systems would not notice any difference in the system operation. and then to ground. sends a small signal voltage into the processor through the back plane connections to the equipment chassis. power is interrupted and the light goes out. In the PLC controlled system. a simple editing operation can make these changes internal to the program. and Switch 2 controls Lamp 2. The input module senses the presence of this voltage and in turn. When the switch is opened. power moves from the voltage source through the switch to the lamp. The signal received by the processor is analyzed and interpreted by the ladder logic. if you needed to change the circuits of a hardwired system to have Switch 1 control Lamp 2. but also tells the output module to which terminal the lamp is connected to on the module. through the switch. This output signal not only contains the ON signal to the lamp. into the input module. In both systems. This isolation is necessary since the fragile processor chip operates at very low voltage and current levels. The voltage from the switch is isolated from the voltage signal that the module sends into the processor. and would involve exchanging the wires at the switches or the lamps. io n 35 . This allows the output module to discriminate between Lamp 1 and Lamp 2. it would take several minutes to rewire them. The greatest advantage of a programmable logic controller becomes evident when a change is needed in the circuits previously discussed. This eliminates the need for rewiring and this process takes only a fraction of the time required to change a hardwired system N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

N Figure 11 Hardwired Vat Control System Fo ot r Fo R ev rR i ew ep ro O du nly ct . In this example. io n Figure 10: Vat Control System 36 . A manual override push button is also installed in order to bypass the temperature and pressure switches and start the motor on demand. This means both switches must be energized at the same time before the motor will start. a pressure switch and a temperature switch are hardwired in series. a motor is energized to rotate the stirrer and mix the contents of the vat when certain conditions of temperature and pressure are met.Introduction to Programmable Logic Controllers Ladder Logic and I/O Control A practical application demonstrating the flexibility of a PLC ladder program is illustrated in the next example. In this system. Figure 11 illustrates the hardwired method for vat control. Figure 10 shows a vat containing a liquid.

001. which could involve extensive work depending on its location. It now becomes quite easy to change the operating logic in the PLC without physically moving a wire connection. the wiring of the switch must be physically changed. The motor. io n Figure 12: PLC Vat Control System 37 . The manual override push button would be hardwired to a third input terminal.Introduction to Programmable Logic Controllers Figure 12 illustrates the vat control circuit implemented in PLC ladder logic. and manual override) are represented by the contacts 000. Notice that the three different inputs (pressure switch. N Figure 13: Hardwired System Changes Fo ot r Fo R ev rR i ew ep ro O du nly ct . As you can see. Figure 13 shows how a traditional circuit would be reconnected in order to make temperature a critical path for the motor to work. represented by the coil labeled 110. The actual pressure switch and the temperature switch would be hardwired to two different terminals on an input module. and 002. respectively. temperature switch. would be hardwired to a terminal on an output module.

a power supply. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . additional racks of I/O modules may be connected to the processor. which is installed in the left-most slot of the chassis in place of the processor. The interface adapter. provides a serial communication link from the remote racks to the processor. These additional racks are known as remote I/O because they are located remotely from the equipment chassis that contains the processor module. Note that any I/O modules that reside in the same chassis as the processor are known as resident I/O. When this is the case. Remote I/O Complex operating environments may require more input and output terminals than a single. io n Figure 14: PLC System Changes 38 . fully populated equipment chassis can provide.Introduction to Programmable Logic Controllers Figure 14 shows how the PLC ladder logic is reprogrammed to implement the same changes without ever touching a wire. A remote I/O chassis consists of various input and output modules. There is no processor module in the remote I/O rack. and an interface adapter.

Remote I/O offers tremendous savings on wiring materials and labor costs for large systems in which the field devices are in clusters at various spread-out locations. but can be as much as two miles. which identifies the station on the network. only the communication link is brought back to the processor. with station number assignments ranging from 08-778. as well as allowing maintenance on individual subsystems while others continue to operate. io n Linking Multiple Processors 39 . The distance a remote rack can be placed away from the processor varies between manufacturers. Each processor on the highway is assigned a unique address. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . With the processor in a central area. Multiple processors may be connected in a daisy chain or. instead of hundreds of field wires. in a trunkline/dropline architecture.Introduction to Programmable Logic Controllers Individual racks are normally connected to the processor using a daisy chain or star configuration via one or two twisted-pair conductors or a single coaxial cable. Data Highway Plus (DH+) is a communications network used to transfer information between multiple processors in a network. Distributed I/O also offers the advantage of allowing subsystems to be installed and started up independently. Up to sixty-four (64) stations are allowed on a single data highway plus network.

Introduction to Programmable Logic Controllers RSLOGIX 5 INTRODUCTION This section introduces the RSLogix 5 software. RSLogix 5 operates using a Windowsbased environment. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . This section discusses the major components found in the main operating window of the software. io n 40 . and introduces several basic software functions.

Introduction to Programmable Logic Controllers SCREEN LAYOUT AND ORGANIZATION The RSLogix 5 main window is the interface between you and the PLC-5. The major components of the main window. are as follows: • • • • • • • Ladder window Project window Results window Windows toolbar Standard toolbar Instruction toolbar On-line toolbar ONLINE TOOLBAR PROJECT WINDOW N Fo ot r Fo R ev rR i ew ep ro O du nly ct . shown in Figure 15. io n WINDOWS TOOLBAR STANDARD TOOLBAR LADDER WINDOW RESULTS WINDOW Figure 15: RSLogix 5 Main Window INSTRUCTION TOOLBAR 41 .

Introduction to Programmable Logic Controllers Ladder Window The ladder window displays the ladder logic for the project that is open. io n Figure 16: Ladder Window 42 . This may be software that is actively running on a PLC-5 processor. or ladder logic that is under development off-line. The ladder window is shown in Figure 16. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

Programs can be renamed by double-clicking the tab.Introduction to Programmable Logic Controllers You can have more than one ladder program open at a time. Each open program is identified by a tab at the bottom of the window as shown in Figure 17. N Figure 18: Renaming a Program Fo ot r Fo R ev rR i ew ep ro O du nly ct . Type the new name in the “Name” field then click the OK button to change the name. Just click on a tab to bring that program to the front on the display. io n Figure 17: Ladder Window with Multiple Open Programs 43 . This opens the Rename popup window shown in Figure 18.

Introduction to Programmable Logic Controllers
Project Window The project window, shown in Figure 19, contains a variety of files associated with the open project. The actual project files are stored in the various folders in the window. You can expand each folder to see the project files inside by clicking the small “+” (plus sign) located in the box to the left of the folder. A “-” (minus sign) to the left of the folder means that the folder is expanded to show the project files within.

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 19: Project Window
44

Introduction to Programmable Logic Controllers
Controller Folder The Controller folder contains the files for configuring communication between the controller and various system devices. The controller folder also allows you to define each equipment chassis in the system, along with the number and types of cards in each chassis. Double click a particular file to open a popup window containing the configuration options for that file. The Controller Properties popup window is shown in Figure 20 as an example.

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 20: Controller Properties Popup Window
45

Introduction to Programmable Logic Controllers
Program Files Folder The Program Files folder contains all of the ladder logic that makes up the project. An example of an expanded Program Files folder is shown in Figure 21. Since each controller can run a different project, the actual files in the Program Files folder may change depending on which controller is being examined.

The SYS 0 file is a system file that is automatically created by RSLogix for a new project. Other than adding a name and description, you cannot change SYS 0 file. Although it is not shown, there is also a SYS 1 file that is automatically created by RSLogix. The SYS 1 file is a system file for programs written using Sequential Function Chart (SFC). You will not see the SYS 1 file until you create an SFC program. The other files in the Program Files folder are user-defined and contain the actual ladder logic that makes up the project. The number of files in the folder can vary depending on the application. RSLogix 5 allows you to create up to 997 individual program files for ladder logic. These program files are numbered LAD 2 through LAD 999. (Remember that 0 and 1 are system files). The fact that you can add program files helps to segment a large program into smaller pieces, such as subroutines, that are easier to isolate and troubleshoot. Ideally, the name that you give each file should describe the function performed by the ladder logic in that section of the program.

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 21: Expanded Program Files Folder

46

Introduction to Programmable Logic Controllers
Data Files Folder The Data Files folder contains information about instructions, I/O, and data used by the program files. An expanded Data Files folder is shown in Figure 22. A list of data file types is found in Table 16 following the figure.

File No. O0 I1 S2 B3 T4 C5 R6 N7 F8 9 - 999

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 22: Expanded Data Files Folder Table 16: Data Files File Type Notes Output image table Input image table Status Bit or binary Timers Counters Control Integer Floating-point User assigned

Bits in this memory area control the status of all outputs. Bits in this memory area indicate the status of all inputs.

A processor configuration and status report. Binary (0 or 1) information. Timer information. Counter information. Used for advanced file instructions. Integer values in the range -32,768 to +32,767. Numbers containing a decimal point such as 5.6 or 6.2. User assigned file types as needed. Timers and counters may also use these file numbers.

47

Introduction to Programmable Logic Controllers
Cross Reference Data File The Cross Reference data file is a list of every instruction used in the main program and its associated subroutines. Double click on the Cross Reference icon in the Data Files folder to open the Cross Reference Report popup window, which is shown in Figure 23. The popup lists the address and type of each instruction in the project. The crossreference report is also useful because it shows you where the open addresses are in the event you need to insert an instruction. Double clicking a specific entry in the crossreference report closes the popup and places the cursor over that instruction in the program.

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 23: Cross Reference Report Popup Window
48

Introduction to Programmable Logic Controllers Output Image Data File (O0) The Output Image data file displays the status of all of the active and inactive outputs. Double click the O0 icon in the Data Files folder to open the Output Image Data File O0 popup window. These are physical outputs attached to the terminals of the output modules in the rack. and a “0” represents an inactive output. A “1” in the display represents an active output at the address. which is shown in Figure 24. io n Figure 24: Output Image Data File Popup Window 49 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct . The display is arranged to show the 16 bits associated with each output word.

Unused bits are identified with a period (. The USAGE button on the popup window shows the user data memory locations that are actually used by the program. The Usage popup window. Left click the DATA FILE button to return to the previous display. or ASCII. one word in a binary file has sixteen bits. shown in Figure 25. octal. io n Figure 25: Usage Popup Window 50 . identifies the used bits with an X. Hex/BCD. Not all of these bits are necessarily used by the program. A description can be added to each bit to further identify the usage.Introduction to Programmable Logic Controllers The Radix drop down menu changes the format of the displayed data between binary. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . decimal. For instance. Input and Output image tables are best displayed in the binary format as shown in Figure 24.).

which is shown in Figure 26. These are physical inputs attached to the terminals of the input modules in the rack. and a “0” represents an inactive input. Double click the I1 icon in the Data Files folder to open the Input Image Data File I1 popup window. The display is arranged to show the 16 bits associated with each input word.Introduction to Programmable Logic Controllers Input Image Data File (I1) The Input Image data file displays the status of all of the active and inactive inputs. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . A “1” in the display represents an active input at the address. io n Figure 26: Input Image Data File Popup Window 51 .

The popup window makes it easy to view the operation of multiple timers without actually having the ladder logic containing the timer in the active display.Introduction to Programmable Logic Controllers Timer Data File (T4) The Timer data file is a summary of all of the timers used in the program. Notice how the entries for timer T4:0 in the popup window correspond to the entries for the timer in the ladder logic. which is shown in Figure 27. Double click the T4 icon in the Data Files folder to open the Timer Data File T4 popup window. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 27: Timer Data File Popup Window 52 .

io n Figure 28: Search Results Window 53 . contains two tabs: Build and Search Results. The Search Results tab displays the results of searches for particular instructions. Searches are performed to find all of the instances of a specific instruction within a program. The instances are listed at the bottom of the screen in the results window under the Search Results tab. Clicking an entry in the Results window moves the cursor over that instruction in the ladder logic as shown in Figure 28. which is usually located at the bottom of the screen. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers Results Window The Results window.

You can detach the Results window from the bottom of the screen and move it anywhere in the display. You can move the window back to its original position by dragging it below the ladder window before releasing the left mouse button. RSLogix will remember the position of the Results window if you close it without moving it back to the bottom of the screen. hold the left mouse button down then drag the mouse to where you would like to move the window.Introduction to Programmable Logic Controllers The Build tab of the results window displays errors that occurred after the file or project is verified. and user-defined label usage. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 29: Results Window Moved in Display 54 . Move the mouse pointer to the outside border of the Results window. addressing errors. This is illustrated in Figure 29. Types of errors include unknown instruction types.

located at the top of the screen. The FILE drop down menu is shown in Figure 30 as an example of the options available through the Windows toolbar. io n Figure 30: Windows Toolbar 55 .Introduction to Programmable Logic Controllers Windows Toolbar The Windows toolbar provides easy access to the global functions performed by RSLogix. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Left clicking one of the menu items opens the respective drop down menu. is a series of drop down menus that operate in a manner identical to that of all Windows-based programs. The Windows toolbar.

copy and paste sections of ladder logic Undo and redo Search for instructions Verify a file or project Zoom in and out of the ladder logic display Open an instruction palette Holding the cursor over an icon on the standard toolbar opens a small tool tip window that identifies the function of the icon. shown in Figure 31. io n Figure 32: Tool Tip Figure 31: Standard Toolbar 56 . Functions found on the standard toolbar allow you to do the following: • • • • • • • • • Create a new project Open an existing project Save your work to disk Cut. An example of a tool tip is shown in Figure 32. represents the functions of RSLogix used most frequently during programming or software manipulation. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . The standard toolbar.Introduction to Programmable Logic Controllers Standard Toolbar The standard toolbar is the row of icons located directly below the Windows toolbar.

Hold the left mouse button down then drag the toolbar to the new location. First.Introduction to Programmable Logic Controllers Instruction Toolbar The instruction toolbar contains all of the instructions supported by RSLogix 5. shown in Figure 33. The tabs below the actual instructions identify these functional groups. You may also detach the instruction toolbar and move it to another area of the screen. The left and right arrow buttons allow you to scroll through the tabs and instructions that are not visible in the display. An example of a detached instruction toolbar is shown in Figure 34. The instruction toolbar. locate the instruction under the appropriate tab then move the mouse pointer over the desired instruction. drag the instruction to the point in the ladder logic where you want to use it. and then release the mouse button. You use an instruction in your program by dragging it from the instruction toolbar with the mouse. The instruction will then be inserted into the ladder logic. N Figure 34: Detached Instruction Toolbar Fo ot r Fo R ev rR i ew ep ro O du nly ct . Hold the left mouse button down. is located above the ladder window. Clicking the tab displays the instructions within the group. Just move the mouse pointer within the toolbar to a point above the row of instructions or below the row of tabs. Double click the mouse over the PLC5 Instructions title bar in the toolbar window to move it back to its original position over the ladder window. Figure 33: Instruction Toolbar The instructions on the toolbar are grouped by function. io n 57 .

The PLC is brought on-line with RSLogix or off-line using the drop down menu in the upper.Introduction to Programmable Logic Controllers On-Line Toolbar The on-line toolbar allows you to change operational status of the processor. Note that you must have the key switch on the processor in the REM position before you can change to PROGRAM mode using RSLogix. An octal format is identified by the lower case “o” at the end of the node number. The on-line toolbar. right-hand corner of the toolbar. determine the PLC node in communication with RSLogix. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . The node number can be either an octal or a decimal number. shown in Figure 35. and identify the communications driver being used with the node. io n Figure 35: On-Line Toolbar Figure 36: On-line/Off-line Drop Down Menu 58 . identify forces. is located above project window in the RSLogix display. The node number of the PLC is identified in the lower. left-hand corner of the toolbar as shown in Figure 36.

menu functions. N Figure 37: Help Window Fo ot r Fo R ev rR i ew ep ro O du nly ct . pressing the F1 key opens a help window containing information for that specific instruction. and toolbar selections. The easiest way to access the on-line help is by pressing the F1 key on the keyboard. For example.Introduction to Programmable Logic Controllers FINDING HELP A variety of on-line help features is available through RSLogix. The topic discussed in the help window covers the XIC instruction. This opens a popup window with help information for whatever is active at the time. These help features cover all aspects of instruction usage. This is illustrated in Figure 37. The cursor is over the XIC instruction in the ladder window. if the cursor is over an instruction in the ladder window. io n 59 .

Introduction to Programmable Logic Controllers All help functions are available through the drop down menu under the Help selection of the Windows toolbar. The Help drop down menu is shown in Figure 38. io n Figure 38: Help Drop Down Menu 60 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

all PLC-5 processors have two basic memory areas: program and data. MEMORY AREAS Memory is an information storage area for the processor. The data area is generally used for temporary storage of information required by the project files. However. io n 61 .Introduction to Programmable Logic Controllers FILES. The project files use various methods of addressing to move information into and out of the data areas. The program area of memory holds the instructions that make up the ladder logic of the application. AND ADDRESSING Memory is the place in the PLC-5 processor where information is stored. There are two basic types of PLC-5 processor memory: program and data. MEMORY AREAS. The important point here is that not all processors use memory in the same way. Exactly what is stored and where it is stored depends on how the processor module was engineered. These are the program files of the project. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

subroutines. The PLC5/20 processor supports up to 16 main control programs. User-defined ladder logic files may be numbered from 2 to 999. These files appear in the Project Files folder of the Project window as shown in Figure 39. The program area is also where the system files for the processor are stored. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Ladder logic includes the main control program.Introduction to Programmable Logic Controllers Program Memory Area The program area of processor memory is where the ladder logic is stored. Subroutines. fault routines. and interrupts are numbered from 3 to 999. fault handling routines. and any processor input interrupts. io n Figure 39: Program Area File Assignments 62 .

Introduction to Programmable Logic Controllers How to Create a New Program File 1. or place the processor in the program mode. 2. This opens the popup window shown in Figure 40. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Move the mouse pointer over the Program Files folder in the Project window and right-click the mouse. Go off-line with the processor. You will not be able to create a program data file if you are on-line with a processor. io n Figure 40: Program Files Popup Window 63 .

4.Introduction to Programmable Logic Controllers 3. Left-click NEW from the popup window. This opens the Create Program File popup window shown in Figure 41. The number 50 is used as an example in this illustration. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Type a number for the file in the “Number:” field. io n Figure 41: Create Program File Popup Window 64 .

” An example of the completed popup window is shown in Figure 42. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 5. A name can be up to 10 characters in length. and a description up to 50 characters. this ladder file is given the name “SUBR-1” with a description of “sample ladder file. As an example. io n Figure 42: Completed Create Data File Popup Window 65 . Enter a name for the new file and a description in the respective fields. Keep in mind that any documentation you associate with the file may be useful for troubleshooting problems at some future date. Remember that the file name and description should relate to the function of the software.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Select the OK button after you enter the name and description. This enters the new file with the assigned name in the Program Files folder as shown in Figure 43. io n Figure 43: New File in Program Files Folder 66 .Introduction to Programmable Logic Controllers 6.

Double click the “LAD 50 – SUBR-1” program file to open the file for programming. appear in the title bar the top of the ladder window. as well as the name of the file.Introduction to Programmable Logic Controllers 7. Notice the new file opens over anything you may already have open in the ladder window as shown in Figure 44. Figure 44: LAD 50 – SUBR-1 File Open for Editing in Ladder Window N Fo ot r Fo R ev rR i ew ep ro O du nly ct . The name you entered for the file appears on the tab at the bottom of the ladder window. and the description you entered. io n 67 .

and other files in the Data Files folder of the Project window. This memory space is set aside for the requirements of the data table. Eight bits are grouped together to form a byte. N Figure 45: Data Area File Assignments Fo ot r Fo R ev rR i ew ep ro O du nly ct . Sixteen bits (2 bytes) are grouped together to form a word. An example of the files in the Data Files folder is shown in Figure 45. The Allen-Bradley PLC-5/40 processor has 48 K-words of data area memory space. bit. output image. counter. io n 68 .Introduction to Programmable Logic Controllers Data Memory Area The smallest storage location in processor memory is a bit. The data table includes the input image. timer.

Used for advanced file instructions. Counter information. Table 17: PLC-5 Default Data Files File No.768 to +32. Integer values in the range -32. Table 18: PLC-5 User Defined Data File Types Identifier File Type Bit or binary Timers Counters Control Integer Floating-point ASCII BCD/Hexadecimal Block Transfer Control PID Control SFC Status Message Control ASCII String N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n B T C R N F A D BT PD SC MG ST 69 . The letter and number designations for each data file relate to the type (format) of information that can be stored in the file as described in Table 17.6 or 6.2. Data files numbered 9 through 999 are user defined to contain a specific data type.Introduction to Programmable Logic Controllers Files with numbers zero through 8 are default files for the PLC-5. A processor configuration and status report. Numbers containing a decimal point such as 5. Timer information.767. Bits in this memory area indicate the status of all inputs. The user defined data file types are listed in Table 18. Binary (0 or 1) information. O0 I1 S2 B3 T4 C5 R6 N7 F8 File Type Output Image Table Input Image Table Status Bit or binary Timers Counters Control Integer Floating-point Notes Bits in this memory area control the status of all outputs.

Introduction to Programmable Logic Controllers How to Create a New Data File You must first determine the format of the data that is going to be stored in the file. Note that this number assignment is arbitrary. io n 1. we are going to create a data file having an “N” identifier. N Figure 46: Popup Window for New Data File Fo ot r Fo R ev rR i ew ep ro O du nly ct . but it must be in the range of 9 to 999. You will not be able to create a new data file if you are on-line with a processor. Based on the information in Table 18. which. or place the processor in program mode. This opens the popup window shown in Figure 46. Go off-line with the processor. You then pick a new file type that is consistent with the format of this data. This example creates an integer data file with a file number of 100. 70 . 2. in this case. Follow these steps to create a new data file. Move the mouse pointer over the Data Files folder in the Project window and right-click the mouse. is identified as N100. which are reserved for the user-defined files. Assume for this example that additional space is required in memory to store integer data.

io n Figure 47: Create Data File Popup Window 71 . Left-click NEW from the popup window. N 4. Valid file numbers are from 9 to 999. This opens the Create Data File popup window shown in Figure 47.Introduction to Programmable Logic Controllers 3. This is the user defined reference number of the new file for this example. Type “100” in the “File:” field. Fo ot r Fo R ev rR i ew ep ro O du nly ct .

6. Enter a name for the new file and a description in the respective fields. A name can be up to 10 characters in length. The name and description should reflect what information is being held in the file. Keep in mind that any documentation you associate with the file may be useful for troubleshooting problems at some future date. and a description up to 50 characters. io n Figure 48: Data File Type Selection 72 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Open the “Type:” drop down menu and select INTEGER from the list as shown in Figure 48.Introduction to Programmable Logic Controllers 5.

This example uses 10 elements of memory. This sets aside sufficient data memory to hold your information. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Enter the number of elements the file contains in the “Elements:” field. io n Figure 49: Completed Create Data File Popup Window 73 .Introduction to Programmable Logic Controllers 7. The number of elements is the number of individual pieces of information being stored in the file. The completed popup window is shown in Figure 49.

Click the OK button from the bottom of the popup window. io n Figure 50: New Integer Data File Created 74 . This creates the new integer file N100 – TEST in the Data Files folder of the Project window as shown in Figure 50. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 8.

Double clicking the mouse over the new N100 – TEST file opens the popup window shown in Figure 51. This opens a popup window for that data file with the memory contents displayed. There are several basic types of addressing schemes as follows: • • • • • Logical Indexed Indirect Symbolic I/O image Logical Addressing Logical addresses are codes that specify the location of information in the data table. You must understand these schemes to ensure that the information you need goes where you want at the time you want it there. Notice the description in the title bar. and that the file contains ten elements labeled 0 through 9. io n Figure 51: File N100 – TEST Popup Window 75 . RSLogix uses a variety of addressing schemes in order to manipulate data. ADDRESSING An address is a location in memory where information is stored. The general format of a logical address is as follows: #TN:0. Addressing is the method by which this information is moved to that location.s/b N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Variations of a logical addressing allow indexed and indirect addressing schemes.Introduction to Programmable Logic Controllers You can examine the contents of any data file by double-clicking the mouse over it. All ten elements contain 0 for data as shown in Figure 51.

# Omit the # symbol if you are not using an indexed address. This number must be in octal for input or output files. This indicates the file number.Introduction to Programmable Logic Controllers Table 19 explains the details of the logical address format.ASCII • C – counter • D – BCD • F – floating-point • BT – block transfer • I – input • MG – message • O – output • PD – PID • N . or control file. This number must be in octal (008 through 078 and 108 through 178) for input or output files. The ‘s’ represents the structure member mnemonic of a counter. Any of the following letters are valid file types: • B – binary • A . The 0 is the word number within the file.’ Symbol is a delimiter that indicates a structure member mnemonic follows. The b represents a bit number reference.integer • SC – SFC status • S . 76 . The ‘:’ symbol is a delimiter separating the file reference from the word reference (which is the location within the file where the data is found). Table 19: Logical Address Format Symbol Description The # symbol indicates an indexed address. The file number is that which is associated with the file type for the files in the Data File folder. / b N s Fo ot r Fo R ev rR i ew ep ro O du nly ct . and decimal (00 through 15) for other file types. timer. io n The ‘/’ is a delimiter indicating a bit number reference follows. Allowable numbers are from 0 to 999. The structure member mnemonic is an abbreviation that is two or three characters long.status • ST – ASCII string • R – control • CT – ControlNet Transfer • T – timer N : 0 . The ‘. and decimal for other file types. T This indicates the file type.

It is up to the programmer to make sure the index register S:24 is loaded with the correct offset before using an indexed address. which is equivalent to 3 in decimal. known as the index register. providing access to a sequential range of data registers.Introduction to Programmable Logic Controllers Indexed Addressing Indexed addressing adds the contents of a special register. The easiest way to understand the operation of an indexed address is by an example. Start by examining the contents of status register S:24. to a base address in order to form a new (indexed) address. The contents of S:24 are added to the base address to form the indexed address. Recall that you can open the status register by double clicking the S2 file from the Data Files folder. io n Figure 52: Status Register S:24 77 . The program then goes to the indexed address to retrieve or store data. Indexed addresses in a program begin with the pound sign (#). The offset from the status register is then combined with the base address. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . shown in Figure 52. From the figure. Indexed addresses are especially useful with loop structures. you can see that the binary number 00000000000000112 is stored in the register. The index register can be forced to increment or decrement with each iteration of a loop. The PLC-5 uses status register S:24 as the index register.

This value is added to the base address of N7:0 to yield an indexed address of N7:3. the offset is 3 as shown in Figure 52. The data stored at address N7:0 is 1. The data at this memory location is 50. Indirect Addressing Like indexed addressing. the software goes to status register S:24 to get the offset. the indexed address points to the actual data. The significant difference is that an indirect address points to another address. In this case. An example of an indirect addressing format is N[N7:2]:1. Now modify the logical address N7:0 to form the indexed address #N7:0. which then points to the data. When the program encounters the # at the base address. After calculating the offset. Indirect addresses are identified by brackets somewhere in the instruction. The contents of this register are displayed in Figure 53.Introduction to Programmable Logic Controllers Now consider the logical address N7:0. indirect addressing is a modification of a basic logical address. which is the address of the first integer in the N7 data file. io n Figure 53: Integer Register N7 78 . which is the value that would be used in any calculation by the program. The value within the brackets becomes part of the address. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . The data at location N7:2 is 100.Introduction to Programmable Logic Controllers Consider the contents of integer data register N7 shown in Figure 54 as an example. io n Figure 54: Integer Data Register N7 and Indirect Addressing 79 .

N[N7:2]:1 becomes N100:1. N100 is a user-defined data file that will be found in the Data Files folder of the Project window. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . as shown in Figure 55. io n Figure 55: User-Defined N100 Data File 80 .Introduction to Programmable Logic Controllers The indirect instruction retrieves this data (100) and substitutes it for what is in the brackets. In this case.

Introduction to Programmable Logic Controllers
N100:1 is a logical address that points to word number 1 in the file. The N100 data file is shown in Figure 56. The data at location N100:1 is 33. This value, 33, would then be used in any calculation referenced using the indirect address. This example used an integer register for the indirect address. Valid registers for indirect addressing include the following types: N, T, C, R, B, I, O, and S.

Symbolic Addressing

Symbolic addressing allows you to substitute a name for a logical address. This symbolic name can then describe the information contained at the address, which should make the program flow easier to understand. There are several restrictions on symbolic names: 1. The symbolic name is limited to 20 characters in length. Allowable characters are: • • • The letters A through Z (uppercase) The numbers 0 through 9 The underscore ( _ ) character

2. A symbolic name cannot be only numbers. 3. The following characters are not allowed in a symbolic name: ~ ` ! @ # $ % ^ & * ()+=[]{}\|:;“<>?/,. 4. A symbolic name cannot be a number followed by a D, O, H, E, or B. These are considered representations of decimal, octal, hexadecimal, exponential, and binary numbers, respectively.

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 56: N100 Data File

81

Introduction to Programmable Logic Controllers
5. You cannot start a symbolic name with the letters O, I, or S, and then follow that letter with a number. These are considered representations of logical addresses for output, input, or status files, respectively. 6. No blank spaces are allowed. How to Create or Edit a Symbolic Name for an Address There are several ways to create or edit a symbolic name for an address. These steps illustrate one of the easier methods.

2. Right click the mouse over the symbol for which you are assigning a symbolic name. This opens the popup window shown in Figure 57.

N
Figure 57: Popup Window for Symbolic Name Entry

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n

1. Determine the name you are going to assign. The name should describe some attribute of the function occurring at the address, and help you to understand the flow of the ladder logic. A little thought at this step could provide a great deal of help during fault diagnosis and troubleshooting.

82

Introduction to Programmable Logic Controllers
3. Select EDIT DESCRIPTION from the popup window. window for the symbol shown in Figure 58. This opens a popup

4. Enter or change the description of function in the “Edit Description Type” field, and the actual symbolic name in the “Symbol” field. Be as descriptive as possible with your entries. An example of a completed description and symbolic name is shown in Figure 59.

N
Figure 59: Symbolic Name Entry Completed

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 58: Symbolic Name Entry

83

Introduction to Programmable Logic Controllers
5. Select the OK button when you are satisfied with the information in the popup window. This enters the symbolic name and description into the ladder logic as shown in Figure 60.

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 60: Symbolic Name and Description in Ladder Logic
84

Introduction to Programmable Logic Controllers
I/O Image Addressing I/O image addressing is used to move data between the processor module and the I/O modules in the equipment chassis. The general format of a logical address is as follows:

M:rng/tb
Table 20 explains the details of this format.

Symbol Description This indicates the file type. The following letters are valid file types: M • I – input • O – output rn

g

/

tb

Figure 61 illustrates how an I/O address appears in the ladder logic.

N
Figure 61: I/O Address in Ladder Logic

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n

Table 20: I/O Image Address Format

This indicates the I/O rack number. The rack number, which must be in octal format, has a maximum allowable range of 008 to 278. The actual allowable range depends on the model of the PLC-5 processor.

This indicates the I/O group number. The I/O group number is in octal format and ranges from 08 to 78. The / is a delimiter separating the I/O group number from the terminal number.

This indicates the terminal (bit) on an I/O module to which the I/O point is connected.

85

and Groups This section of the text describes how the software talks to the I/O modules of the hardware. Chassis and Slots The chassis is the piece of equipment that holds the modules. io n 86 . These concepts include the following: • • • • Chassis Slot Rack Group Chassis and slots are concepts that refer to the hardware.Introduction to Programmable Logic Controllers Chassis. Other common chassis sizes are 8-slot and 12-slot. Each module is connected to a slot in the chassis. A single chassis can have up to 16 slots to hold the various modules. There are several basic concepts that are easily confused. I/O Racks. while racks and groups relate to the software. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Slots.

Introduction to Programmable Logic Controllers I/O Rack An I/O rack is not the same as an I/O chassis. and the input image table is labeled I1. One I/O rack is 8 words of the output image table and 8 words of the input image table. This means a rack is a logical device. The contents of the Data Files folder are shown in Figure 62. The output image table is labeled O0. io n 87 . N Figure 62: Data Files Folder Fo ot r Fo R ev rR i ew ep ro O du nly ct . The chassis is the hardware. not a physical one. Racks are files in software. Remember that these image tables are the first two files in the Data Files folder in the RSLogix 5 Project window.

Allen-Bradley accounts for this by providing three different slot addressing schemes through RSLogix. These inputs somehow have to relate to the input image table. This means that one I/O rack consists of 8 I/O groups (because 1 rack is 8 words in each of the output and input image tables). In this case. for example. If. however. the transfer of data between the input module and the processor is relatively straightforward. which has a defined size of 16 bits per group and 8 groups per rack. you purchase a digital input module with provisions for 16 inputs. or 32 inputs. one input word (16 bits) and one output word (16 bits) in the data table. Slot Addressing for I/O Transfer Allen-Bradley offers a good deal of flexibility in the types and sizes of I/O modules that you may install in a rack. have 8. then the inputs from the module correspond nicely to the 16 bits available in an I/O group of the input image table. 16. Digital input modules. depending on the model selected for the application. These slot addressing schemes are as follows: • • • 1-slot 2-slot ½-slot N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n 88 .Introduction to Programmable Logic Controllers I/O Group An I/O group is comprised of two words.

and you need only eight slots of a chassis to achieve up to 128 I/O points. 16 input bits and 16 output bits are available in the processor’s image table for each I/O group. With 1-slot addressing. are used. only eight bits of the I/O image table word. The type of module you install determines the number of bits and the type of word that are used. you can use any mix of 8-point or 16-point modules in any order. N Figure 63: 1-Slot Addressing Fo ot r Fo R ev rR i ew ep ro O du nly ct . Therefore. io n 89 . The physical address of each group corresponds to an input and output image table word.Introduction to Programmable Logic Controllers 1-Slot Addressing When 1-slot addressing is selected. Figure 63 illustrates 1-slot addressing. Therefore. When you use 8-point I/O modules with 1-slot addressing. for that I/O group. a 16-slot chassis contains two logical racks (rack 0 and rack 1) when 1-slot addressing is used. the processor addresses one slot in the rack as one group.

a 16-slot chassis contains one rack (rack 0) when 2-slot addressing is used. you must alternate an input card with an output card in the chassis.Introduction to Programmable Logic Controllers 2-Slot Addressing Two-slot addressing forces the processor to address two I/O module slots as one I/O group. Alternating the cards is the only way to match the points on the card with the corresponding points in the image tables. Each I/O group is then allotted one word (16 points) in the input image table and one word in the output image table. Therefore. An example of 2-slot addressing is shown in Figure 64. io n 90 . If you are using 16point cards. N Figure 64: 2-Slot Addressing Fo ot r Fo R ev rR i ew ep ro O du nly ct . This means you cannot use a 32-point card with 2-slot addressing because only 16 points are reserved in the respective image table. You can use 8-point or 16-point I/O modules with 2-slot addressing.

you can mix 8. the processor addresses one-half of an I/O module slot as one I/O group. Since 16 input bits and 16 output bits are available in the processor’s image table for each I/O group. rack 2.Introduction to Programmable Logic Controllers 1/2-Slot Addressing When you select 1/2-slot addressing. Figure 65 illustrates 1/2-slot addressing. Fewer I/O points are available by using 1/2–slot addressing with 8 or 16-point I/O modules. io n 91 . N Figure 65: 1/2-Slot Addressing Fo ot r Fo R ev rR i ew ep ro O du nly ct . 16 and 32-point I/O modules in any order in the I/O chassis. Therefore. The type of module you install determines the number of bits in these words that are used. and rack 3) when 1/2-slot addressing is used. a 16-slot chassis contains four racks (rack 0. The physical address of each I/O slot corresponds to two input and two output image table words. rack 1. A 32-point I/O module (two 1/2-slot I/O groups) uses two words of the image table.

A 16-point I/O module uses a full word in the input or output image table.Introduction to Programmable Logic Controllers Examples of I/O Image Addressing Sixteen-point I/O modules have 16 input terminals or 16 output terminals. Figure 66 illustrates how 16-point I/O modules are mapped to the image tables. N Figure 66: Sixteen Point I/O Modules Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n 92 .

How to Go On-Line with a Controller These steps assume that the laptop and the controller have already been configured to communicate with each other. along with basic editing and file manipulation commands. Connect the communications interface cable between the laptop computer that is running RSLogix and the controller. This includes going on-line with a controller. Follow these steps to start RSLogix and go online with a controller. 1. GOING ON-LINE WITH A CONTROLLER You must be on-line with a controller in order to see what is happening with the project that the controller is currently running. You will need to set up the communication link using the RSLinx software package if the communication protocol has changed or is otherwise incorrect.Introduction to Programmable Logic Controllers USING RSLOGIX 5 This section discusses the more common operations performed using RSLogix. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n 93 .

io n Figure 67: Starting RSLogix 5 94 .Introduction to Programmable Logic Controllers 2. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Start the RSLogix software package. RSLogix opens to a blank screen as shown in Figure 67. This will generally be through a shortcut icon on the desktop of the computer you are using.

io n 95 . Open the “Comms” drop down menu.Introduction to Programmable Logic Controllers 3. Figure 68: Comms Drop Down Menu/WHO ACTIVE GO ONLINE Selection N Fo ot r Fo R ev rR i ew ep ro O du nly ct . The Comms drop down menu is shown in Figure 68.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 4. io n Figure 69: Communications Popup Window 96 . This opens the Communications popup window shown in Figure 69. If you see a large red “X” over any device then communication is not established with that device. Select WHO ACTIVE GO ONLINE from the Comms drop down menu. If this is the case then check the configuration of the communications driver using RSLinx.

Click the ONLINE button. When the matching file is located. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . RSLogix reads the name of the project from the controller and attempts to find a file with the same name on the hard drive.Introduction to Programmable Logic Controllers 5. RSLogix now attempts to go on-line with the connected controller. io n Figure 70: RSLogix On-Line with a Controller 97 . the ladder logic appears in the display as shown in Figure 70.

Uploading is necessary because RSLogix requires that you have a copy of the project on the hard disk before you can go on line to the controller. 2. How to Upload a Project These steps assume that the laptop and the controller have already been configured to communicate with each other. N Figure 71: Starting RSLogix 5 Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers UPLOADING A PROJECT FROM A PLC-5 Uploading a project is the process of transferring a program loaded on a PLC-5 processor into memory of the programming interface connected to the processor. This will generally be through a shortcut icon on the desktop of the computer you are using. You will be prompted to upload the project if you attempt to go on-line and RSLogix cannot find a copy of the project on the hard disk. You will need to set up the communication link using the RSLinx software package if the communication protocol has changed or is otherwise incorrect. 1. RSLogix opens to a blank screen as shown in Figure 71. Start the RSLogix software package. Connect the communications interface cable between the laptop computer that is running RSLogix and the controller. io n 98 .

io n Figure 72: Comms Drop Down Menu/UPLOAD Selection 99 . The Comms drop down menu is shown in Figure 72.Introduction to Programmable Logic Controllers 3. Open the “Comms” drop down menu. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

or browse for a location to store the file. Select UPLOAD from the Comms drop down menu. RSLogix then searches for a project saved in the default directory on the hard disk for a file with the same name as that on the controller. This popup window allows you to create a new file in the default directory. merge the file with one of those identified in the bottom half of the popup window. The Going to Online Programming State popup window is shown in Figure 73. io n Figure 73: Going to Online Programming State Popup Window 100 . If RSLogix cannot locate a file then the Going to Online Programming State popup window opens.Introduction to Programmable Logic Controllers 4. You will be prompted to go on-line with the controller after the upload is finished. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

Be sure to save your work frequently if you are working off-line. This icon is shown in Figure 74. How to Save a Project Follow these steps to save a copy of your work to the hard disk.Introduction to Programmable Logic Controllers SAVING A PROJECT Saving your project writes a current copy of your work to the hard drive. Left click the icon of the floppy disk from the standard toolbar located at the top of the screen. 1. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 74: Floppy Disk Icon from Standard Toolbar 101 .

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 75: File Drop Down Menu/SAVE Selection 102 .Introduction to Programmable Logic Controllers Note that you may also select SAVE from the File drop down menu to accomplish the same thing. The File drop down menu is shown in Figure 75.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . It is also helpful to enter the date that the software changes were made. Selecting either the icon from the standard toolbar or the SAVE selection from the File drop down menu method opens the Revision Note popup window shown in Figure 76. This window allows you to enter some descriptive comment regarding any corrections or updates to the software. 3.Introduction to Programmable Logic Controllers 2. io n Figure 76: Revision Note Popup Window 103 . This saves the project to the default location on the hard drive. Click the OK button after the revision note is entered.

This also changes the default path for upload operations.Introduction to Programmable Logic Controllers How to Change the Default Path where Projects are Saved Changing the default path prevents the need to browse for the location where projects are stored. io n Figure 77: Tools Drop Down Menu 104 . Follow these steps to change the default project path. This opens the Tools drop down menu shown in Figure 77. 1. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Select Tools from the menu bar at the top of the screen.

Select OPTIONS from the Tools drop down menu. This opens the System N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Options popup window shown in Figure 78. io n Figure 78: System Options Popup Window 105 .Introduction to Programmable Logic Controllers 2.

This is the BROWSE button for the “Project Files Search Path” field. Selecting this button opens the Set Directory popup window shown in Figure 79. io n Figure 79: Set Directory Popup Window 106 .Introduction to Programmable Logic Controllers 3. Note that you must be in the OFFLINE mode with RSLogix before you can download a project to a controller. Select the top BROWSE button from the three shown in the lower. Select the new default location from the list of folders available. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Left click the OK button from the System Options popup window. This closes the popup window and returns you to the System Options popup window. This closes the popup and changes the default location for saving files. 4. You will need to set up the communication link using the RSLinx software package if the communication protocol has changed or is otherwise incorrect. Projects are downloaded after completing any offline edits and you are ready to run the project. 5. then left click the OK button from the Set Directory popup window. 1. How to Download a Project These steps assume that the laptop and the controller have already been configured to communicate with each other. Connect the communications interface cable between the laptop computer that is running RSLogix and the controller. DOWNLOADING A PROJECT TO A PLC-5 Downloading a project moves a copy of the software on the programming interface (laptop) to the PLC-5 controller. right-hand corner of the popup window.

This will generally be through a shortcut icon on the desktop of the computer you are using. Left click the icon of the open folder. shown in Figure 81. from the standard toolbar. You must open the file on the hard drive before you can download it to the controller. Start the RSLogix software package. N Figure 81: Open Folder Icon Fo ot r Fo R ev rR i ew ep ro O du nly ct . This opens the Open/Import PLC5 Program popup window from which you can select a file to open. 3.Introduction to Programmable Logic Controllers 2. RSLogix opens to a blank screen as shown in Figure 80. io n Figure 80: Starting RSLogix 5 107 .

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . as shown in Figure 82. io n Figure 82: Open/Import PLC5 Program Popup Window 108 . You can browse for a file in a different folder by clicking the GOTO button located near the middle of the window. Notice the revision notes for the project located at the bottom of the window. Select the desired file from the Open/Import PLC5 Program popup window.Introduction to Programmable Logic Controllers 4.

This opens the project in the RSLogix display as shown in Figure 83.Introduction to Programmable Logic Controllers 5. Left click the OPEN button after selecting a project. io n Figure 83: Open Project in RSLogix Display 109 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

Open the Comms drop down menu. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 6. io n Figure 84: Comms Drop Down Menu 110 . The Comms drop down menu is shown in Figure 84.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Click YES from the popup window and the program in the display will be downloaded to the controller. 8. io n Figure 85: RSLogix 5 Popup Window 111 . You will be asked if you want to go on-line after the download completes. This opens the RSLogix 5 popup window shown in Figure 85. Select DOWNLOAD from the drop down menu.Introduction to Programmable Logic Controllers 7.

RSLogix usually provides multiple ways to perform a task. inserting. Edit Zone Markers Online edits are indicated in the project by the upper case zone markers “I.” “R. and instructions to the ladder logic. branches.” and “D. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . These markers appear between the rung number and the vertical bar (power rail) on the left side of the ladder logic. Rungs marked with an “R” will continue to function until new edits have been tested.” Uppercase markers indicate edits that are present in controller memory. Zone markers in the ladder logic identify the rungs being edited. R (Replace): These rungs have been replaced in controller memory. io n 112 . and offer you opportunities to easily remove unwanted changes. A project can be edited in one of two ways: online and offline. The methods presented in this text are designed to familiarize you with some of the capabilities of RSLogix. D (Delete): These rungs have been deleted in controller memory.Introduction to Programmable Logic Controllers EDITING LADDER LOGIC Editing is the process of adding. These zone markers change to allow you to track the status of your edits. • • • I (Insert): These are new rungs that have been inserted into the ladder logic. and deleting rungs. and editing ladder logic is no exception. Rungs marked with a “D” will continue to function until the new edits have been tested.

Once accepted. There are four steps involved in online editing.” Lowercase markers indicate edits that are present in computer memory. io n 113 . Edits are tested after they are accepted. Rungs marked with a “d” are not moved to controller memory until the rung is accepted. Any rungs that are marked with an “I” (insert) are used in the ladder logic in place of those marked with an “R” (replace). This zone marker disappears after the ladder logic is verified. the lower case “r” is replaced by the uppercase “R. • e (edit): These are new rungs that have been inserted into the ladder logic and are currently being edited.” d (delete): These rungs are marked to be deleted.Introduction to Programmable Logic Controllers Offline edits are indicated in the project by the lower case zone markers “e. i (insert): These rungs have been inserted into the ladder logic in computer memory while online with a controller. This allows you to check your work before finalizing the changes. These are verify. the lower case “i” is replaced by the uppercase “I. Once accepted. • N • Fo ot r Fo R ev rR i ew ep ro O du nly ct .” “r. Once accepted. • Verifying edits is the process in which RSLogix checks your new programming for syntax errors. These rungs will then be marked with an “I” (insert). and assemble.” and “d. Syntax errors must be corrected before the controller will accept the new instructions.” • • • Online Editing Online editing allows you to change a project while you are online with RSLogix 5 to ladder logic that is actively running on a controller. The lower case “d” means that these rungs still reside in computer memory. the lower case “d” is replaced by the uppercase “D. Rungs marked with an “i” are not moved to controller memory until the rung is accepted. This takes any offline edits (those marked with an “e”) and moves them into controller memory. accept. These markers also appear between the rung number and the vertical bar (power rail) on the left side of the ladder logic. Edits are accepted after they are verified. Syntax errors are those that involve incorrect or improper use of ladder logic instructions.” “i.” r (replace): These rungs are marked for replacement. Rungs marked with an “r” are not moved to controller memory until the rung is accepted. test. indicating that the edits are now included in the project.

and those rungs marked with an “R” are removed. Accept. N Figure 86: Original Ladder Logic for Online Editing Example Fo ot r Fo R ev rR i ew ep ro O du nly ct . and Assemble Online Edits 1. Rungs marked with an “I” are incorporated into the ladder logic. Go online with the controller being edited. io n 114 . create project files. How to Verify. Edit zone markers are removed at this stage. You cannot undo any edits after they are assembled. You must go offline with the controller before performing these types of operations.Introduction to Programmable Logic Controllers • Edits are assembled after they are tested. and locate the rung where changes are being made. Online Editing Restrictions RSLogix does not permit you to resize the data tables. The original ladder logic is shown in Figure 86. or delete project files while you are online. This example replaces the OTE instruction at logical address B3:0/0 on rung 0000 with an OTE instruction at logical address O:012/3. Test.

Right click the mouse over the number of the rung being edited.Introduction to Programmable Logic Controllers 2. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 87: Popup Menu for Online Editing 115 . This opens the popup window shown in Figure 87.

This inserts a duplicate of the rung being edited above the original as shown in Figure 88. This allows you to back out of any changes if they do not work as planned.Introduction to Programmable Logic Controllers 3. Select START RUNG EDITS from the popup window. The rung being edited (rung 0000) is marked by the lower case letter “e. This rung will be replaced by the rung being edited.” Lower case letters mean that the edits are offline. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . RSLogix keeps track of the original rung until the edits are tested and assembled. io n Figure 88: New Rung for Editing (Offline) 116 . The original rung (which is now rung0001) is marked by the lower case letter “r” shown just to the right of the rung number.

Introduction to Programmable Logic Controllers 4. io n Figure 89: OTE Logical Address Changed 117 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct .” This example changes the OTE instruction from logical address B3:0/0 to O:012/3 as shown in Figure 89. Make the changes to the rung marked with the “e.

io n Figure 90: Popup Menu for Verifying Rung Edits 118 . Right click the mouse over the number of the rung being edited.Introduction to Programmable Logic Controllers 5. This opens the popup menu shown in Figure 90. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

Introduction to Programmable Logic Controllers 6. Select VERIFY RUNG from the popup menu. if the rung does not contain errors. io n Figure 91: Rung Verified 119 . Notice that the edits are still offline as indicated by the lower case letters. This checks the syntax of the rung being edited. The rung is marked for insertion as shown in Figure 91. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

Right click the mouse over the number of the rung being edited. This opens the popup menu shown in Figure 92.Introduction to Programmable Logic Controllers 7. io n Figure 92: Popup Menu for Accepting Rung Edits 120 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

Introduction to Programmable Logic Controllers 8. The online bar above the project window now indicates that edits exist in the controller as shown in Figure 93. This moves the edits from computer RAM to the controller. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . The rung is now marked by a capital letter “I” to indicate the edits are online. io n Figure 93: Rung Edits Accepted 121 . Select ACCEPT RUNG EDITS from the popup menu.

Introduction to Programmable Logic Controllers You must now test the edits to ensure correct operation of the changes. The TEST EDITS button is the second from the right as shown in Figure 94. 9. Left click the TEST EDITS button to initiate testing. During testing the rung marked “I” takes precedence over the rung marked “R” during execution of the ladder logic. Testing edits can be performed using selections from another popup menu. This opens the confirmation popup window shown in Figure 95. N Figure 95: Test Edits Confirmation Popup Window Fo ot r Fo R ev rR i ew ep ro O du nly ct . however this example uses the online editing toolbar icons located just above the ladder logic. io n Figure 94: TEST EDITS Button from Online Editing Toolbar 122 .

io n Figure 96: Test Edits Online Indication 123 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 10. The ladder logic display will not change. Left click YES from the confirmation popup window. however the online bar indicates edits are active as shown in Figure 96. This allows you to test the edits in the project.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . You may either assemble the edits using a popup menu selection. Once the edits are assembled. the rung marked for removal is actually removed from the ladder logic. Assemble the edits when you are satisfied the program works correctly. and the rung marked for insertion becomes part of the project as shown in Figure 97.Introduction to Programmable Logic Controllers 11. as in this example. io n Figure 97: Edits Assembled 124 . or select the ASSEMBLE EDITS button.

How to Verify a Single Rung 1. RSLogix checks for unknown instruction types in the ladder logic and ensures that the addresses in the ladder logic are defined in the data tables. a file. Offline edits need only be verified as correct before the program is downloaded to the PLC-5. Right click the mouse over the number of the rung being verified. There are various methods for verifying edits. N Figure 98: Popup Window to Verify a Single Rung of Ladder Logic Fo ot r Fo R ev rR i ew ep ro O du nly ct . During verification. This opens the popup menu shown in Figure 98. Rungs that need to be verified are marked by the lower case letter “e” shown just to the right of the rung number.Introduction to Programmable Logic Controllers Offline Editing Offline editing allows you to change a project residing in computer memory (RAM). Any errors found during verification are reported under the BUILD tab of the Results window. which is located at the bottom of the screen. or an entire project. io n 125 . You may verify a single rung.

Note that double-clicking the mouse over the error message moves the cursor to the instruction in the ladder logic that contains the error. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 99: Results Window 126 . Select VERIFY RUNG from the popup window. The Results window is shown in Figure 99. RSLogix will verify the rung and display any errors in the Results window at the bottom of the screen.Introduction to Programmable Logic Controllers 2.

UNDO and REDO are two buttons found on the standard toolbar at the top of the screen as shown in Figure 101. and the REDO button is on the right with the arrow that points to the right. Selecting the respective icon located at the top of the screen verifies a file or project. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . or make just about any other mistake. The major difference relates to the scope of the verification. Errors are displayed in the Results window regardless of which verification is selected. io n Figure 100: Verify File and Verify Project Icons 127 . Figure 101: UNDO Button (Left Arrow) and REDO Button (Right Arrow) The UNDO button reverses your last step. If you insert a rung in the wrong place. The icons are shown in Figure 100. and the project verification icon is on the right side. incorrectly change the text of an instruction. If you make a mistake with the UNDO button and remove something you did not mean to. The file verification icon is on the left side. UNDO can be used on up to 200 previous actions. UNDO and REDO UNDO and REDO are functions designed to help you back out of mistakes.Introduction to Programmable Logic Controllers How to Verify a File or Project Verifying a file or project is similar to verifying a single rung. the UNDO button will back you up to where you were before you made the mistake. the REDO button will restore the object you just removed with the UNDO button. The UNDO button is on the left with the arrow that points to the left.

Rungs are inserted above the current location of the cursor in the ladder window. Remember that inserting a rung places it above the location of the cursor. How to Insert a Rung 1.Introduction to Programmable Logic Controllers INSERTING AND APPENDING RUNGS OF LADDER LOGIC New rungs of ladder logic can be added to a program by either inserting the rung or appending the rung. Rung 0001 is highlighted in this example. Move the mouse pointer over the rung number where you want the new rung to go then right-click the mouse. io n 128 . This opens the popup menu shown in Figure 102. N Figure 102: Popup Menu with Mouse Pointer over Rung Number Fo ot r Fo R ev rR i ew ep ro O du nly ct . while appended rungs are added below the location of the cursor.

Notice the number of the new rung is 0001. io n Figure 103: New Rung Inserted 129 . The lower case letter “e” to the right of the rung number indicates that new edits are present. This pushes the existing ladder logic down one rung and inserts a new rung at the location of the cursor.Introduction to Programmable Logic Controllers 2. The new rung is shown in Figure 103. Select INSERT RUNG from the popup menu. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

Remember that appending a rung places it below the location of the cursor. io n Figure 104: Popup Window with Mouse Pointer Over Rung Number 130 . This opens the popup menu shown in Figure 104. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Rung 0002 is highlighted in this example. Move the mouse pointer over the rung number where you want the new rung to go then right-click the mouse.Introduction to Programmable Logic Controllers How to Append a Rung 1.

io n Figure 105: New Rung Appended 131 . Select APPEND RUNG from the popup menu. The new rung is shown in Figure 105. along with rung 0001 which was inserted in the previous example.Introduction to Programmable Logic Controllers 2. which is below the location of the cursor. The new rung is then inserted at rung number 0003. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

Hold the left mouse button down over the branch icon under the USER tab of the instruction toolbar. How to Insert a Branch 1. N 2. Branches allow you to program conditional instructions in which one branch or another is taken for a given set of inputs. This may seem obvious.Introduction to Programmable Logic Controllers BRANCHING Branches are parallel flow paths within the ladder logic. Decide where you are going to put the branch. but there are many ways in which to insert a branch. io n Figure 106: Location for New Branch Figure 107: Rung Icon Under USER Tab of Instruction Toolbar 132 . This example inserts a branch on rung 0000 across the XIO instruction labeled “First Scan of Ladder or SFC Step” at S:1/15. Fo ot r Fo R ev rR i ew ep ro O du nly ct . Your ladder logic can quickly become a confused jumble of lines if you are not careful about what you are doing. which is highlighted in Figure 106. The rung icon is shown in Figure 107.

Drag the mouse into the ladder window. These red boxes. You will also notice that the mouse pointer changes to the rung icon as soon as the pointer is over the ladder logic. N Figure 109: New Branch Inserted Fo ot r Fo R ev rR i ew ep ro O du nly ct . represent valid positions at which you can place the branch. io n Figure 108: Insertion Points for the New Branch 133 . Release the mouse pointer when the branch is over the desired position. This inserts a new branch at the location as shown in Figure 109.Introduction to Programmable Logic Controllers 3. shown in Figure 108. As you move the mouse around the window. 4. This green box represents the point at which the branch will be inserted. A series of red boxes appears in the ladder logic as soon as you drag the mouse into the window. you will notice that one of the red boxes changes color from red to green and contains a small “X” within the box.

This indicates the point at which the branch will terminate when the mouse button is released. Hold the left mouse button down over the red box on the end of the branch then drag it to the termination point. N Figure 111: New Branch Terminated Fo ot r Fo R ev rR i ew ep ro O du nly ct . One of the boxes will change color from red to green as you drag the mouse. This places the branch across the XIC instruction as shown in Figure 111. io n Figure 110: Dragging the Branch to the Termination Point 134 . Release the left mouse button. 6. The series red boxes again appear in the window as shown in Figure 110. These red boxes indicate valid termination points for the branch.Introduction to Programmable Logic Controllers 5.

Examples of discrete components are limit switches. io n 135 . The bit instructions discussed in this text that are supported by the PLC-5 are as follows: • • • • • Examine If Closed (XIC) Examine If Open (XIO) Output Energize (OTE) Output Latch (OTL) Output Unlatch (OTU) N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Bit instructions also read and write information to internal processor memory. or LED’s. photo sensors. SELECTED BIT INSTRUCTIONS Bit instructions provide the interface between discrete components and the application software. these single point instructions are known collectively as bit instructions. Discrete I/O consists of those field devices that are either on or off. such as the S2 (status) and B3 (binary) data files. There are a number of different bit instructions. Therefore. or bit.Introduction to Programmable Logic Controllers PROGRAMMING WITH BIT INSTRUCTIONS More than 120 instructions make up the PLC-5 programming language. The simplest and most common instructions control the flow of data to a single point.

Two XIC instructions are shown on the left side of Figure 112. io n Figure 112: XIC Instructions 136 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers Examine IF CLOSED (XIC) Examine If Closed is a bit-input instruction identified by the mnemonic XIC.

a “1” is written to the input image table at the address corresponding to that input device as illustrated in Figure 113.Introduction to Programmable Logic Controllers An XIC address beginning with the letter “I” is used with devices that are physically connected to the terminals of a discrete input module. When one of these input devices closes a circuit. The processor then verifies that the circuit is still closed when the XIC instruction referencing the address is encountered in the user program. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . which will energize an output instruction on the same rung as the XIC instruction. then the processor sets the logic for the XIC instruction as true. io n Figure 113: XIC Instruction and the Input Image Data Table 137 . If the circuit is still closed.

Introduction to Programmable Logic Controllers An XIC address beginning with the letter “B” is used with internal processor memory instead of physical devices. which will energize an output instruction on the same rung as the XIC instruction. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . If the address still contains a “1” then the processor sets the logic for the XIC instruction as true. then a “1” is written to the bit data table at the address corresponding to that memory location as illustrated Figure 114. When another instruction (such as an output enable) writes a “1” to a bit in memory. io n Figure 114: XIC Instruction and the Bit Data Table 138 . The processor then verifies that the memory address still contains a “1” when the XIC instruction referencing the memory address is encountered in the user program.

Introduction to Programmable Logic Controllers Examine IF OPEN (XIO) Examine If Open is a single bit input instruction identified by the mnemonic XIO. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Two XIO instructions are shown in Figure 115. when encountered in the program. or begin with the letter “B” for internal processor memory. As with XIC. the XIO instruction may begin with the letter “I” for physical devices connected to the terminals of a discrete input module. the XIO instruction looks for a “0” (zero) value at the address to which it is attached in the data table. io n Figure 115: XIO Instructions 139 . The XIO instruction is similar to the XIC instruction except.

Output Enable Instruction (OTE) OTE is a single bit output instruction. Output Enable instruction addresses begin with the letter “O” for physical outputs. As an example. Output O:000/00 will be energized if I:002/17 is on and O:000/01 will be energized if I:002/17 is off. io n Figure 116: Comparison of XIC and XIO 140 . The output remains true (on) for as long as rung continuity to the OTE instruction remains true. N Figure 117: OTE Instruction Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers The XIO instruction looks for a “0” value at the address with which it is associated in order to make the ladder logic true. compare the XIC instruction to the XIO instruction in Figure 116. An example of the Output Enable instruction is shown in Figure 117 on the right side of the rung. or the letter “B” for internal outputs.

io n Figure 118: OTL Instruction 141 . an Output Latch instruction.Introduction to Programmable Logic Controllers Output Latch (OTL) Once the Output Latch instruction becomes true/energized. It is considered a retentive device. An example of an Output Unlatch instruction is shown in Figure 119. N Figure 119: OTU Instruction Fo ot r Fo R ev rR i ew ep ro O du nly ct . An example of the OTL instruction is shown in Figure 118. Retentive devices retain their value until they are reset by another rung of logic. Therefore. Latches remain in their last state even if the machine is powered off and on again. Output Unlatch (OTU) The Output Unlatch instruction is used to clear a latched output. the Output Unlatch is normally paired with. and given the same address as. it remains on even if rung continuity is removed.

the output device associated with the latch/unlatch address will be deenergized. Inserting the instruction is relatively straightforward. You may also search for unused addresses that you may assign to an instruction. These options include typing the address directly (if you know it). Just drag the part from the instruction toolbar to the desired position in the ladder logic. USING BIT INSTRUCTIONS There are two basic steps involved in programming with bit instructions: inserting the instruction and assigning an address. regardless of the state of the latch. An example of this arrangement is shown in Figure 120. If power is applied to the unlatch. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 120: Arrangement of Latch And Unlatch Instructions 142 . or assigning an address from a data file. There are then several options for assigning an address.Introduction to Programmable Logic Controllers Latch and unlatch instructions are usually arranged so they cannot both be on at the same time.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers How to Insert Bit Instructions into a Program Input instructions are always on the left side of the ladder logic. If you forget the name of a particular instruction. This displays all of the bit instructions under the tab as shown in Figure 121. and output instructions are on the right side. Hold the left mouse button down over the specific bit instruction in the instruction toolbar. This means that continuity through a rung is from left (input) to right (output). Left click the BIT tab on the instruction menu. Figure 121: Bit Instruction Icons under BIT Tab of Instruction Toolbar 2. An XIC instruction (located on the far left side of the instruction toolbar) is used in the following steps. holding the mouse pointer over the instruction will display the name in a popup window. 1. io n 143 .

io n Figure 122: Insertion Points for XIC Instruction 144 . As you move the mouse around the window. In this example. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Drag the mouse into the ladder window.Introduction to Programmable Logic Controllers 3. you will see that one of the red boxes changes color from red to green and contains a small “X” within the box. A series of red boxes appears in the ladder logic as soon as you drag the mouse into the window. the insertion point for the instruction is rung 0003. You will also notice that the mouse pointer changes to the XIC icon as soon as the pointer is over the ladder logic. These red boxes. This green box represents the point at which the branch will be inserted. represent valid positions at which you can place the instruction. shown in Figure 122.

Introduction to Programmable Logic Controllers
4. Release the left mouse button. This inserts the instruction on rung 0003 as shown in Figure 123. The small question mark above the instruction means that an address has not yet been assigned.

5. Now insert an OTE instruction on the rung. Begin by holding the left mouse button down over the desired instruction in the instruction toolbar. Note that the OTE instruction is the third icon from the left as shown in Figure 124.

N
Figure 124: OTE Instruction on Instruction Toolbar

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 123: XIC Instruction Inserted into Ladder Logic

145

Introduction to Programmable Logic Controllers
6. Drag the mouse into the ladder window. Move the OTE instruction to the right side of the insertion point on rung 0003 as shown in Figure 125. Be sure you are close enough to the insertion point so that the box changes color from red to green.

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 125: Insertion Point for OTE Instruction
146

Introduction to Programmable Logic Controllers
7. Release the left mouse button. This inserts the instruction on the rung as shown in Figure 126. You now need to assign addresses to the new parts.

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 126: OTE Instruction Inserted into Ladder Logic
147

Introduction to Programmable Logic Controllers
How to Assign a Logical Address Directly at the Instruction 1. Select the part for which the address is being assigned. This example uses the XIC instruction on rung 0003 as shown in Figure 127.

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 127: XIC Instruction Selected for New Address
148

Introduction to Programmable Logic Controllers
2. Begin typing a valid address. Depending on the application, the letters “B” (binary), which is used in this example, or “I” (input) would be acceptable logical addresses for the XIC instruction. Typing the first letter of the logical address opens the drop down menu shown in Figure 128.

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 128: Starting the Logical Address
149

BINARY from the drop down list. io n Figure 129: Available Logical Addresses 150 .Introduction to Programmable Logic Controllers 3. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Double click B. The options in the drop down list change to reflect some of the available logical addresses as shown in Figure 129.

Introduction to Programmable Logic Controllers 4. Double click one of the options from the drop down list. io n Figure 130: Logical Address Selected 151 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct . or continue typing if the displayed options are not acceptable. The first option in the drop down list is selected in this example as shown in Figure 130.

Left click the mouse somewhere in the ladder window. io n Figure 131: Logical Address Assigned to XIC Instruction 152 .Introduction to Programmable Logic Controllers 5. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . This assigns the logical address to the component as shown in Figure 131.

io n Figure 132: B3 Data Table File Open 153 .Introduction to Programmable Logic Controllers How to Drag and Drop a Logical Address from a Data File You may assign a logical address by dragging it from any data table file then dropping the address onto the component. 1. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Open the data table file from which the address is being selected. This example uses the B3 (binary) file as shown in Figure 132.

A series of red boxes appears in the ladder logic as soon as you drag the mouse into the window. shown in Figure 133. The target for the logical address in this example is the OTE instruction on rung 0003. You will also notice that the mouse pointer identifies the selected logical address as soon as the pointer is over the ladder logic. represent valid targets for the logical address. This green box represents the component for which the address will be assigned. As you move the mouse around the window. These red boxes. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 133: Logical Address Targets 154 .Introduction to Programmable Logic Controllers 2. Hold the left mouse button down over the desired logical address in the B3 data table window and drag the address into the ladder window. you will see that one of the red boxes changes color from red to green and contains a small “X” within the box.

io n Figure 134: Logical Address Assigned to OTE Instruction 155 . Release the left mouse button. This assigns the logical address to the component as shown in Figure 134. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Any symbolic address or description previously assigned to the logical address will also transfer to the target component and appear in the display.Introduction to Programmable Logic Controllers 3.

Introduction to Programmable Logic Controllers How to Search for Unused Logical Addresses You can easily search for an open logical address if you require an address that is not already assigned to another component in the project. the I1 (input image) data table is open in Figure 135. io n Figure 135: I1 Input Image Data Table File 156 . 1. Open the data file in which to search. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . As an example.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Left click the USAGE button from the bottom of the data table window. A “W” states that the address is used at the word level with the project. This changes the display to reflect the logical address usage as shown in Figure 136.Introduction to Programmable Logic Controllers 2. Any address marked by an “X” has already been assigned in the project. io n Figure 136: Logical Address Usage 157 .

Just drag the I:010/0 address from the open data table window to the target then release the mouse. You can assign or reassign the logical address of a component by dragging the address from the data table window to the target component. As an example.Introduction to Programmable Logic Controllers 3. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 137: XIC Logical Address Changed from B3:0/0 to I:010/0 158 . the logical address of the XIC instruction on rung 0003 shown in Figure 137 is being changed from B3:0/0 to I:010/0.

io n These parameters include the There are three timer 159 . following: • • • • • • Timer type (on-delay.Introduction to Programmable Logic Controllers PROGRAMMING WITH TIMERS Timers are devices that delay the energizing or de-energizing of an output signal for a selected amount of time. off-delay. There are three timer instructions available through RSLogix 5: • • • Timer On-Delay (TON) Timer Off-Delay (TOF) Retentive Timer On-Delay (RTO) TIMER OPERATION Several parameters define the operation of timers. They provide many of the same capabilities available with timing relays and solid-state timing devices. These are as follows: • • • Timer On-Delay (TON) Timer Off-Delay (TOF) Retentive Timer On-Delay (RTO) N Fo ot r Fo R ev rR i ew ep ro O du nly ct . instructions supported by the PLC-5. or retentive on-delay) Timer address Time base Timer preset value Timer accumulator value Timer status bits Timer Type The type defines how the timer affects the output signal.

An example of a TON instruction is shown in Figure 138. The timer is programmed with a time base of 0. The input signal to the timer is provided through the XIC instructions at address B3:1/0 and address B3:1/7. io n Figure 138: Timer On-Delay (TON) Instruction 160 . This accumulated value appears in the “Accum” field at the bottom of the timer instruction. The timer ondelay instruction is identified by the mnemonic TON. The “Done Bit” from the timer then becomes true after the accumulated value equals the preset value.01 seconds and a preset value of 100.Introduction to Programmable Logic Controllers Timer On-Delay (TON) The timer on-delay instruction is used to delay an output from going on after an input to the timer goes on. The timer begins accumulating time towards the calculated ondelay when both XIC instructions are true. The timer is assigned the address T4:26 in the example provided in Figure 138. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . which means the timer has reached the calculated on-delay time (which is 1.0 seconds).0 seconds.01 x 100 = 1. The calculated on delay of the timer would then be 0. The length of the delay is programmed into the timer.

io n Figure 139: Timer Off-Delay (TOF) Instruction Figure 140: Retentive Timer On-Delay (RTO) Instruction 161 . The retentive timer on-delay instruction is identified by the mnemonic RTO. The timer-enable bit (EN) is de-energized when the input rung goes false.Introduction to Programmable Logic Controllers Timer Off-Delay (TOF) The timer-off delay instruction is used to delay an output from going off after the input to the timer goes off. Fo ot r Fo R ev rR i ew ep ro O du nly ct . An example of a RTO instruction is shown in Figure 140. The length of the delay is programmed into the timer. The timer-timing bit turns off when the preset value equals the accumulator value. The timer offdelay instruction is identified by the mnemonic TOF. An example of a TOF instruction is shown in Figure 139. The timertiming bit turns on when the input goes false and stays energized while the timer instruction is timing. or when the timer finishes timing. A reset instruction (RES) with the same address as the timer has to be programmed on another rung in order to reset the retentive timer accumulator value. The retentive timer instruction lets the timer stop and start without resetting the accumulated value. The timer-done bit turns off when the accumulator is equal to the preset value. Retentive Timer On-Delay (RTO) N The retentive timer instruction is used to maintain the accumulator value if the input to the timer goes false. The timer-done bit also turns on when the input logic to the timer goes false.

retentive timers measure the cumulative period during which the input rung is true. one word holds the accumulated value. Use the lowest available number when programming a new timer in order to conserve memory space. The processor faults or loses power. even if one of the following occurs: • • • The rung goes false. Timer Accumulator Value The timer accumulator accumulates time base increments (while the timer is timing) until it matches the timer preset. timing continues from the retained accumulated value.Introduction to Programmable Logic Controllers The RTO instruction begins timing when the input to the timer goes true. When the accumulator equals the preset.01 or 1 second) to be timed. The time delay is calculated by multiplying the preset value by the time base. Data file T4 is reserved for timers.01 seconds = 10 seconds). There is room for 1000 timers in data file T4 numbered from T4:0 to T4:999. The accumulator counts the number of timed intervals that have elapsed since the timer was activated. then the time delay equals 10 seconds (1000 x 0. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . One of these words holds the timer preset value. Timer Address Each timer has a unique address in the data table of the PLC-5 memory. The timer updates the accumulated value until it reaches the preset value for as long as the rung remains true. and one word holds the status bits that are used for output control of the timer. The PLC-5 is changed from run to program mode. 162 .01 second. and the time base is equal to 0. By retaining its accumulated value. io n When the processor resumes operation or the rung goes true. If the preset is equal to 1000.767. Timer Preset Value The range for the timer preset is a value from 0 to 32. The preset value establishes the number of timed intervals (0. the time delay is complete. The RTO instruction retains its accumulated value. Each timer address references three words of data table memory.

The DN bit then changes state to off and remains off until the input to the timer changes state to on The TT bit is also reset (off) for both the on-delay and the off-delay when the timer is reset by a RES instruction. the DN bit is on until the accumulator reaches the preset. Timer Done Bit (DN) (bit 13) indicates when the accumulator value equals the preset value. Timers have the following status bits: • • Timer Enable Bit (EN) (bit 15) is set (on) when the input to the timer is true. meaning that the timer has timed-out. For an offdelay timer. For an on-delay timer. and reset (off) when the input is false or when timer is reset by a RES instruction. The time base is multiplied by the timer preset value to determine the delay time of the timer. For an on-delay timer.Introduction to Programmable Logic Controllers Timer Status Bits There are three status bits in the timer status word. The TT bit is also reset (off) when the timer is reset by a RES instruction. The DN bit then changes state to on and remains on until the input to the timer goes false. Timer Timing Bit (TT) (bit 14) is set (on) when the timer is actively timing. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . The processor changes the state of status bits depending on the condition of the timer.01 or 1 seconds. the TT bit is set (on) when the input to the timer is off. the status of the TT bit follows the input signal to the timer (on when the input is true and off when the input is false). This is the time base of the timer. This means that for an off-delay timer. and the TT bit is reset (off) when the input is on. • Time Base A timer can count in increments of 0. io n 163 . the DN bit is off until the accumulator reaches the preset. These status bits can be used in the ladder program to trigger some event.

This includes dragging a timer into a program. which retains the accumulator value. Note how the logical address of the RES instruction corresponds to that of the RTO instruction. USING TIMER INSTRUCTIONS This section of the module discusses programming with timers. only the retentive timer. Left click the TIMER/COUNTER tab on the instruction menu. How to Insert a New Timer into a Program A timer is a type of output instruction. setting up or modifying the time-base. If you forget the name of a particular instruction. This displays all of the timer and counter instructions under the tab as shown in Figure 142. TON and TOF timers are normally reset by the removal of the input signal enabling the timer. requires the use of the reset instruction. holding the mouse pointer over the instruction will display the name in a popup window. 1. Of the three timer instructions. This means it is programmed on the right side of the ladder logic. io n Figure 141: Reset Timer/Counter (RES) Instruction 164 . Figure 142: Timer Instruction Icons under TIMER/COUNTER Tab of Instruction Toolbar N Fo ot r Fo R ev rR i ew ep ro O du nly ct . and using the timer status bits as indicators. The reset instruction is identified by the mnemonic RES. An example of a RES instruction is shown in Figure 141.Introduction to Programmable Logic Controllers RESET TIMER/COUNTER INSTRUCTION (RES) There is one reset instruction used with both timers and counters.

Introduction to Programmable Logic Controllers 2. An RTO instruction (located third from the left side of the instruction toolbar) is used in the following steps. Drag the mouse into the ladder window. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . As you move the mouse around the window. In this example. Hold the left mouse button down over the specific timer instruction in the instruction toolbar. 3. You will also notice that the mouse pointer changes to the RTO icon as soon as the pointer is over the ladder logic. These red boxes. you will see that one of the red boxes changes color from red to green and contains a small “X” within the box. io n Figure 143: Insertion Point for RTO Instruction 165 . the insertion point for the instruction is rung 0001. This green box represents the point at which the instruction will be inserted. the insertion point is to the right of the box on the far right side of the rung. represent possible positions at which you can place the instruction. Since the timer is an output instruction. A series of red boxes appears in the ladder logic as soon as you drag the mouse into the window. shown in Figure 143.

io n Figure 144: RTO Instruction Inserted into Ladder Logic 166 . This inserts the instruction on rung 0001 as shown in Figure 144. The small question mark in the “Timer” field means that an address has not yet been assigned to the instruction.Introduction to Programmable Logic Controllers 4. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Release the left mouse button.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . This address links the timer to a specific location in the T4 data file. The example searches for an unused address in the T4 data file and then assigns that address to the timer. io n Figure 145: T4 Data File Popup Window 167 . 1. Double click the T4 file from the Data Files folder in the project window of RSLogix. This opens the T4 data file popup window shown in Figure 145. There is more than one way to assign an address to a timer.Introduction to Programmable Logic Controllers How to Assign or Modify a Timer Address Timer addresses are entered in the “Timer” field of the instruction.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 146: Timer Usage 168 . A “W” in the column labeled “FW” indicates timers that are already used in a program. Timer addresses are indicated under the “Offset” column.Introduction to Programmable Logic Controllers 2. This changes the display to reflect the logical address usage as shown in Figure 146. Left click the USAGE button from the bottom of the data table window.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Hold the left mouse button down and drag the scroll bar down until you find a timer that is not used. io n Figure 147: Unused Timer T4:61 169 . Move the mouse pointer over the scroll bar located on the right side of the window. This example uses timer T4:61 as shown in Figure 147.Introduction to Programmable Logic Controllers 3.

Figure 148: “Timer” Field in RTO Instruction as the Logical Address Target N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 4. Move the mouse pointer over the desired timer address in the “Offset” column of the T4 data file popup window. This red box turns green when the logical address is properly positioned over the “Timer” the field in the instruction. Hold the left mouse button down and drag the address to the “Timer” field in the RTO instruction as shown in Figure 148. io n 170 . A red box appears in the “Timer” field as soon as you drag the mouse into the window.

This assigns the logical address to the timer. Release the left mouse button. A “W” in the “FW” column of the T4 data file popup window identifies the logical address as assigned in the project. io n Figure 149: Completed Logical Address Assignment 171 . The completed logical address assignment is shown in Figure 149.Introduction to Programmable Logic Controllers 5. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

Introduction to Programmable Logic Controllers How to Assign or Modify a Time Base and Preset Two time base settings are available: 0. This opens the drop down menu shown in Figure 150 containing the two time base options. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . The preset value can be an integer value between 0 and 32. Remember that the time base multiplied by the preset value determines the time delay interval of the timer. io n Figure 150: Time Base Drop Down Menu 172 .767. Changing the Time Base 1. Double click the value in the “Time Base” field.01 seconds and 1 second.

the cursor automatically moves down to the “Preset” field for you to change the preset value as illustrated in Figure 152. io n Figure 151: New Time Base Selected Figure 152: New Time Base Entered 173 .Introduction to Programmable Logic Controllers 2. or left click the mouse pointer somewhere in the ladder display in order to move the cursor from the “Time Base” field. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Press the ENTER key on the keyboard. Note that if you press the ENTER key. 3. This enters the new time base into the timer. This changes the time base display as shown in Figure 151. Left click the desired time base from the drop down menu.

Introduction to Programmable Logic Controllers Changing the Timer Preset 1. Left click the mouse in a blank area of the ladder logic. 3. However. io n Figure 153: New Value Typed into “Preset” Field Figure 154: New Preset Entered 174 . This opens the field for editing as illustrated in Figure 152. This enters the new preset into the timer as shown in Figure 154. Double click the value in the “Preset” field. Enter the new value for the preset using the keyboard as shown in Figure 153. This value should be an integer (which is a number that does not have a decimal point) between 0 and 32767. if you enter zero as a preset then your timer will not provide a delay. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . 2.

timer timing. The output will be on while the timer is timing. The XIC instruction and the OTE instruction are both on rung 0002 as illustrated in Figure 155. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . 1. and go off when the timer is not timing. A specific status bit is linked to an input (XIC) instruction. Any actual program usage would depend entirely on your application and individual need. the XIC instruction will energize the OTE instruction at O:000/11. For this example. io n Figure 155: XIC Instruction Inserted into Ladder Logic 175 . The XIC instruction is then programmed to an output (OTE) instruction to reflect the condition of the status bit. All three status-bits are programmed in the same manner. timer done) provide an indication of what the timer is doing. This example uses only the timer timing (TT) status bit to illustrate the process of programming. The insertion point depends on how you are going to use the instruction. Insert an XIC instruction at the desired location in the ladder logic. The timer status bits are programmed using bit input and bit output instructions.Introduction to Programmable Logic Controllers How to Program the Timer Status Bits The three timer status bits (timer enabled.

Introduction to Programmable Logic Controllers 2. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . This opens the T4 data file popup window shown in Figure 156. io n Figure 156: T4 Data File Popup Window 176 . Double click the T4 file from the Data Files folder in the project window of RSLogix.

Scroll the popup window down until you locate the address of the timer. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . This example uses the retentive timer at address T4:61. io n Figure 157: Timer Address Located in Data File Popup Window 177 .Introduction to Programmable Logic Controllers 3. which is shown in Figure 157.

Be sure you drag the mouse to the correct instruction in the ladder logic or you could overwrite an existing logical address at some other bit instruction in the program. Red boxes appear in the ladder logic field as soon as you drag the mouse into the ladder window to indicate valid targets for the logical address assignment. Hold the left mouse button down and drag the mouse to the XIC instruction.Introduction to Programmable Logic Controllers 4. Move the mouse pointer over the “TT” field of timer T4:61. io n Figure 158: XIC Instruction as the Logical Address Target 178 . The red box over the target XIC instruction turns green when the logical address is properly positioned as shown in Figure 158. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

” respectively. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .TT) status bits as well. in place of the “TT” indication. How to Reset the RTO Accumulator using the RES Instruction 1. which could affect the operation of any machine that uses this bit as a trigger.Introduction to Programmable Logic Controllers 5. This is because the RST instruction resets not only the accumulator.DN) and timing (. Resetting the done bit of a TOF instruction is an indication that the timer is done timing. Left click the TIMER/COUNTER tab on the instruction menu. The reset instruction is the one on the right side. holding the mouse pointer over the instruction will display the name in a popup window. This assigns the logical address of the timer to the XIC instruction as shown in Figure 159. Figure 160: Timer Instruction Icons under TIMER/COUNTER Tab of Instruction Toolbar 2. 179 . This displays all of the timer and counter instructions under the tab as shown in Figure 160. If you forget the name of a particular instruction. Hold the left mouse button down over the RES instruction in the instruction toolbar. Notice also the “TT” indication below the XIC instruction instead of a bit number. but also the done (. The timer enabled and timer done status bits carry the abbreviations “EN” and “DN. This reflects the assignment of the XIC instruction to the timer timing status bit of timer T4:61. Release the left mouse button. io n Figure 159: Logical Address Assignment Complete Do not reset a delay timer-off (TOF) with a reset (RES) instruction.

Since the reset is an output instruction. In this example. This green box represents the point at which the branch will be inserted. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . A series of red boxes appears in the ladder logic as soon as you drag the mouse into the window. You will also notice that the mouse pointer changes to the RES icon as soon as the pointer is over the ladder logic. As you move the mouse around the window. you will see that one of the red boxes changes color from red to green and contains a small “X” within the box. These red boxes. shown in Figure 161. the insertion point is to the right of the box on the far right side of the rung. the insertion point for the instruction is rung 0003. represent possible positions at which you can place the instruction.Introduction to Programmable Logic Controllers 3. Drag the mouse into the ladder window. io n Figure 161: Insertion Point for RES Instruction 180 .

Release the left mouse button. 5. Double click question mark in the highlight bar above the RES instruction. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 162: RES Instruction Inserted into Ladder Logic Figure 163: Dialog Box for Logical Address Entry 181 . This opens a dialog box. shown in Figure 163.Introduction to Programmable Logic Controllers 4. in which the logical address of the timer is entered. The small question mark above the instruction field means that a logical address has not yet been assigned. This inserts the instruction on rung 0003 as shown in Figure 162.

An alternative to directly typing the logical address is opening the T4 data file and dragging the desired timer address to the RES instruction. 7.Introduction to Programmable Logic Controllers 6. Be sure to include the leading letter “T” and the colon in the address. This opens a popup for the entry of a symbolic address or descriptive comments as shown in Figure 165. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Type the logical address of the timer. io n Figure 164: Logical Address for the RES Instruction Figure 165: Symbolic Name/Comment Popup Window 182 . For this example. Press the ENTER key on the keyboard. the RTO at logical address T4:61 is used as shown in Figure 164.

if desired a symbolic address in the “Symbol” field as illustrated in Figure 166. and Comment 183 . Left click the OK button from the bottom of the popup window. Enter a functional description of the component in the “Edit Description Type” field and. This enters the symbolic address and comment with the logical address as shown in Figure 167. Symbolic Address. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 8. io n Figure 166: Comment and Symbolic Name Information Figure 167: Logical Address. 9.

the accumulator value of a counter is zeroed using a reset (RES) instruction. Counters are retentive instructions that maintain their accumulated value regardless of the condition of the input rung. io n • • Count Up Counter (CTU) Count Down Counter (CTD) 184 . The up counter increments the accumulator and the down counter decrements the accumulator. There are two counter instructions available through RSLogix 5: COUNTER OPERATION Several parameters define the operation of counters. As with the RTO instruction.Introduction to Programmable Logic Controllers PROGRAMMING WITH COUNTERS Counters are used to keep track of the number of times that a certain event happens. Count-up counters increment an accumulator for each instance of an event. and count-down counters decrement an accumulator. The type also defines how the status bits are used with the counter. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . These parameters include the following: • • • • • Counter type (up counter or down counter) Counter address Counter preset value Counter accumulator value Counter status bits Counter Type The type defines how the accumulator value changes as the counter keeps track of the triggering events. There are two types of counters: count up and count down.

N 185 . An example of a CTU instruction is shown in Figure 168. The accumulated value of the counter is retentive. The accumulator is reset to zero using the reset (RES) instruction. the CTU instruction sets the done (DN) status bit. io n Figure 168: CTU Instruction Figure 169: CTD Instruction An The CTD instruction counts down over a range from +32.Introduction to Programmable Logic Controllers Count Up Counter (CTU) The count-up counter is represented by the CTU instruction in the ladder logic. The done (DN) status bit is set as long as the accumulated value is greater than or equal to the preset value. Count Down Counter (CTD) The count-down counter is represented by the CTD instruction in ladder logic. Fo ot r Fo R ev rR i ew ep ro O du nly ct . The DN bit is reset to zero when the accumulated value is less than the preset value. The accumulator increments by one unit each time the input to the instruction goes from false to true. The accumulator is reset to zero using the reset (RES) instruction. The CTU instruction counts up over a range of -32. The accumulated value of the counter is retentive. The accumulator decrements by one unit each time the input to the instruction goes from false to true. example of a CTD instruction is shown in Figure 169.767.768. When the accumulated value equals or exceeds the preset value.767 to -32.768 to +32.

Introduction to Programmable Logic Controllers Counter Address Each counter has a unique address in the data table of the PLC-5 memory. Counters have the following status bits: • Count Up Enable Bit (CU) (bit 15) is set when the rung goes true to indicate that the counter is enabled as an up counter.767. Each counter address references three words of data table memory. Data file C5 is reserved for counters. Count Down Enable Bit (CD) (bit 14) is set when the rung goes true to indicate that the counter is enabled as a down counter. You cannot enter a preset value that contains a decimal point. regardless of whether the counter is counting up or down. The accumulator either increments (for up counters) or decrements (for down counters) each time the counter is triggered. There is room for 1000 counters in data file C5 numbered from C5:0 to C5:999. The CD bit is reset when the rung goes false or when reset by a RES instruction. Acceptable preset values are integer numbers ranging from -32. The CU bit is reset when the rung goes false or when reset by a RES instruction. These status bits can be used in the ladder program to trigger some event. Counter Accumulator Value The accumulator stores the current value of the counter. • N Fo ot r Fo R ev rR i ew ep ro O du nly ct . One of these words holds the counter preset value. The counter preset specifies the target to which the counter is counting. The accumulator continues to change with each trigger. and one word holds the status bits that are used for output control of the counter.768 to +32. Use the lowest available number when programming a new counter in order to conserve memory space. one word holds the accumulated value. even though the preset value is exceeded. io n Counter Preset Value 186 . The processor changes the state of status bits depending on the condition of the counter. Counter Status Bits There are five status bits in the counter status word.

This includes dragging a counter into a program. Figure 170: Counter Instruction Icons under TIMER/COUNTER Tab of Instruction Toolbar N Fo ot r Fo R ev rR i ew ep ro O du nly ct . USING COUNTER INSTRUCTIONS This section of the module discusses programming with counters.767. Count Down Underflow Bit (UN) (bit 11) is set by the processor to show that the down counter has exceeded the lower limit of -32.768 and has wrapped around to +32. Creating a counter that counts up and down is also discussed. io n 187 . The CTD instruction continues to count down from there.767 and has wrapped around to 32. holding the mouse pointer over the instruction will display the name in a popup window. and resetting the counter. This means it is programmed on the right side of the ladder logic. Count Up Overflow Bit (OV) (bit 12) is set by the processor to show that the up counter has exceeded the upper limit of +32. Wrapping around to -32. How to Insert a New Counter into a Program A counter is a type of output instruction. If you forget the name of a particular instruction. • • All of the bits are reset with a RES instruction that has the same address as the counter instruction. The done bit is also reset by the RES instruction. and wrapping around to +32767 with a CTD instruction can reset the overflow bit. Left click the TIMER/COUNTER tab on the instruction menu. 1.768 with a CTU instruction can reset the underflow bit. The done bit is reset when the accumulated value count is less than the preset value.768. The CTU instruction continues to count up from there. The DN bit is reset (off) for an up counter while the counter is in the process of counting up to the preset. This displays all of the timer and counter instructions under the tab as shown in Figure 170. This means that the DN bit is set (on) for a down counter while a down counter is in the process of counting down to the preset value.Introduction to Programmable Logic Controllers • Done Bit (DN) (bit 13) is set by the processor when the accumulated value is greater than or equal to the preset value.

io n 188 . Drag the mouse into the ladder window. You will also notice that the mouse pointer changes to the CTU icon as soon as the pointer is over the ladder logic. A CTU instruction (located third from the right side of the instruction toolbar) is used in the following steps. Since the counter is an output instruction. In this example. As you move the mouse around the window. These red boxes. you will see that one of the red boxes changes color from red to green and contains a small “X” within the box. represent possible positions at which you can place the instruction. This green box represents the point at which the instruction will be inserted. A series of red boxes appears in the ladder logic as soon as you drag the mouse into the window. 3. the insertion point is to the right of the box on the far right side of the rung. Hold the left mouse button down over the specific counter instruction in the instruction toolbar. N Figure 171: Insertion Point for CTU Instruction Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 2. shown in Figure 171. the insertion point for the instruction is rung 0012.

Release the left mouse button.Introduction to Programmable Logic Controllers 4. This inserts the instruction on rung 0012 as shown in Figure 172. io n Figure 172: CTU Instruction Inserted into Ladder Logic 189 . The small question mark in the “Counter” field means that an address has not yet been assigned to the instruction. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

The example searches for an unused address in the C5 data file and then assigns that address to the counter by typing it into the “Counter” field of the instruction. 1.Introduction to Programmable Logic Controllers How to Assign or Modify a Counter Address Timer addresses are entered in the “Counter” field of the instruction. This opens the C5 data file popup window shown in Figure 173. This address links the counter to a specific location in the C5 data file. Double click the C5 file from the Data Files folder in the project window of RSLogix. io n Figure 173: C5 Data File Popup Window 190 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct . There is more than one way to assign an address to a counter.

to locate an unused counter. in which the logical address of the counter is entered. this example uses timer C5:2 as shown in Figure 174. Left click the USAGE button from the bottom of the data table window. 3. if necessary. Scroll the data file window down. 4. Double click the “Counter” field from the counter instruction whose logical address is being assigned. This opens a dialog box. N Figure 175: Dialog Box for Logical Address Entry Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 174: Counter Usage 191 . A “W” in the column labeled “FW” indicates counters that are already used in a program. Counter addresses are indicated under the “Offset” column. Since there are already several available counters in the window. This changes the display to reflect the logical address usage as shown in Figure 174.Introduction to Programmable Logic Controllers 2. shown in Figure 175.

This opens another popup menu. 6. that shows the available logical addresses for the counter. The entry in the list is that of the first open C5 data file address. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . C5:2. which is what is being assigned in this example. shown in Figure 177. io n Figure 176: Instruction Type Popup Menu Figure 177: Logical Address Popup Menu 192 . Type the first letter of the logical address of the counter.Introduction to Programmable Logic Controllers 5.” This opens a small popup menu shown in Figure 176 from which you can select from a list of instruction types and other instructions beginning with that letter. Counter” instruction type from the popup menu. which in this example is the letter “C. Double click the “C.

Introduction to Programmable Logic Controllers 7. io n Figure 178: Completed Logical Address Assignment Figure 179: “Preset” Field Open for Editing 193 . Double click the “5:2” entry from the popup menu. How to Assign or Modify a Preset Value at the Instruction 1. Double click the value in the “Preset” field. This assigns the logical address for the counter as shown in Figure 178. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . This opens the field for editing as illustrated in Figure 179. then left click the mouse anywhere in an open area of the ladder logic.

Introduction to Programmable Logic Controllers 2. io n Figure 180: New Value Typed into “Preset” Field Figure 181: New Preset Entered 194 . 3.767. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . You cannot enter a preset value that contains a decimal point. This enters the new preset into the counter as shown in Figure 181. Enter the new value for the preset using the keyboard as shown in Figure 180.768 to +32. Left click the mouse in a blank area of the ladder logic. Acceptable preset values are integer numbers ranging from -32. regardless of whether the counter is counting up or down.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Double click the C5 file from the Data Files folder in the project window of RSLogix. This opens the C5 data file popup window shown in Figure 182. io n Figure 182: C5 Data File Popup Window 195 .Introduction to Programmable Logic Controllers How to Assign or Modify a Preset Value using the C5 Data File 1.

This example uses counter at logical address C5:2. scroll the data file window down to the counter being changed. in which to enter the logical address of the timer. If necessary. Double click the value in the “PRE” field for the counter whose preset value is being changed. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . This opens a dialog box.Introduction to Programmable Logic Controllers 2. io n Figure 183: Preset Field Open for Editing 196 . shown in Figure 183. 3.

The change is also reflected at the counter as shown in Figure 184. This enters the new preset value into the data file. Type the new preset value into the “pre” field then press the enter key on the keyboard.Introduction to Programmable Logic Controllers 4. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 184: New Preset Value Entered 197 .

the same accumulator value will decrease. the accumulator value will increase and when the CTD rung goes true. Poor programming could cause both counters to try to count up and count down at the same time. accumulator. io n Figure 185: Count Up/Count Down Ladder Logic 198 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct . When the CTU rung goes true. The ladder logic in Figure 185 shows how the count up/count down counters are programmed. This allows both counters to share the same preset. It is important to discriminate between the inputs to the two different counters. and status bits.Introduction to Programmable Logic Controllers How to Create an Up/Down Counter A counter that counts up and counts down can be created with a CTU instruction and a CTD instruction that have the same logical address.

This moves the cursor to that instruction in the ladder logic. and trend the flow of information almost anywhere in a project. Keep in mind that the majority of problems will be in the plant. Locate the output in the ladder logic that is not energizing. 1.Introduction to Programmable Logic Controllers TROUBLESHOOTING This section introduces a variety of tools available through RSLogix that enable you to quickly locate and isolate problems. SYSTEMATIC TROUBLESHOOTING The following steps outline a systematic method of locating and isolating control system faults. Right click the mouse over the input instruction that is breaking continuity and select FIND ALL from the popup menu. or force bit inputs and outputs in the ladder logic. 5. 4. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Repeat from step 1 until you find the “real world” input device causing the problem. 3. Trace the output backwards across the rung to the input instruction that is breaking logical continuity. override. 2. not in a PLC program. This displays all instances of the logical address in the Search Results window located at the bottom of the display. io n 199 . These tools allow you to search for specific instructions. Left click the instance in the Search Results window where the logical address is attached to an output instruction.

make sure the subroutine is actually being called. 200 . • If the output that is not energizing is located within a subroutine. and switches the processor offline. search for T4:0 because a timer is an output instruction). • • CLEARING PROCESSOR MEMORY Clearing processor memory removes any program currently running on the processor. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . You must be online with the processor with the processor in program mode before you can clear memory. instead of searching for T4:0/TT. Any instructions within these active zones will be skipped.Introduction to Programmable Logic Controllers There are a few exceptions to the systematic troubleshooting process. Make sure the output being investigated is not within an active JMP to LBL zone or MCR zone. make sure to search for the full address and not the status bit address (For example. io n If the address attached to an instruction being investigated is a status bit address. You will then have to download a project to the processor to resume operation. None of the instructions within a subroutine will execute until the main program calls the subroutine. Make sure none of these exceptions apply before using the systematic process.

1. This will stop production if the line is operating normally. 3. Open the on-line drop down menu as shown in Figure 186. Go online with the processor whose memory is being cleared.Introduction to Programmable Logic Controllers How to Clear Processor Memory Clearing memory erases any project that is currently running on the processor. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . popup window shown in Figure 187. io n Figure 186: On-Line Drop Down Menu Figure 187: Change Mode Confirmation Popup Window This opens the confirmation 201 . 2. Select PROGRAM from the drop down menu.

Open the Comms drop down menu as shown in Figure 189. N Figure 189: Comms Drop Down Menu Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 188: Processor in Program Mode 202 . 5.Introduction to Programmable Logic Controllers 4. This switches the processor to the program mode as indicated by the on-line bar shown in Figure 188. Left click the YES button from the popup window.

Introduction to Programmable Logic Controllers 6. This opens the confirmation popup window shown in Figure 190. 7. Select CLEAR PROCESSOR MEMORY from the drop down menu. Another confirmation popup opens asking if you want to save changes to your program. io n Figure 190: Clear Memory Confirmation Popup Window 203 . This clears processor memory and takes the processor off line. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Make the appropriate selection from the confirmation window. Left click the OK button from the popup window. You may then go online with the processor or download another project to the controller.

Forcing I/O turns specific I/O bits on or off and they remain in that state until the force is removed. for example. the input could be forced in the software in order to complete the production run. This could cause injury to nearby personnel or damage to the equipment. io n 204 . A force can be thought of as a software jumper because it allows you to bypass a device. The faulty sensor can then be replaced during the down turn. If an input sensor fails during production. Forcing a point may cause sudden or unexpected movement in associated equipment. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers FORCING I/O BITS Use extreme caution when forcing I/O bits.

. . These force tables. .. .. . . . ... ... 1. . 1 1 INPUT FORCE TABLE OUTPUT FORCE TABLE PB I:002 01 O:003 07 OFF ON OUTPUT MODULE LOAD Figure 191: Force Table Positioning Diagram 205 . ... ... .. Input instructions that examine the output image table cannot be forced.. .. The positioning of the force tables relative to the image tables is illustrated in Figure 191. INPUT IMAGE TABLE 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 OUTPUT IMAGE TABLE 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 INPUT MODULE The position of the force tables has a significant impact on the program execution in the following ways: • • • • Input instructions that examine the input image table are affected by what is in the input force table.. ..... . Output instructions that control a bit in the input image table cannot be forced...... .. Output instructions that control a bit/bits in the output image table do not affect the output force table. . .. . . . . .. ...... io n .. . ..... which are similar to data tables. ..0 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct .... . . . are logically located between the I/O modules and the image tables. . .Introduction to Programmable Logic Controllers RSLogix uses force tables to keep track of the points that are forced in the software.

Any forces that are not removed become active again when forces are enabled. N Figure 192: Force Status Indications Fo ot r Fo R ev rR i ew ep ro O du nly ct . Forces cannot be applied to timers. counters. These are: • • Install the force. Forces should be removed from the software when no longer needed. 206 . The upper status line identifies whether a project has forces installed or not. Figure 192 illustrates a project with no forces installed. io n Forces are installed individually at each instruction in the ladder logic. Live I/O points are those I/O points that are physically attached to and configured in the system. How to Determine the Status of Forces in a Project The status of forces is displayed in two status lines of the on-line bar as shown in Figure 192. When you enable forces. Enabling forces with other forces previously installed may cause immediate and unexpected equipment motion. Always check the status of forces before installing a new force. however. There are two steps involved in forcing a bit in a project. all of the forces installed in the project become active at the same time. binary. The bottom status line identifies whether the forces are enabled or disabled. or integer bits. Enable the force.Introduction to Programmable Logic Controllers Only live I/O points can be forced (bits that are in an input or an output word).

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 193: Forces Installed but Not Enabled Figure 194: Forces Installed and Enabled 207 . The lower force status line indicates “Forces Enabled” and the background color changes from white to yellow. The upper force status line indicates “Forces Installed” and the background color changes from white to green.Introduction to Programmable Logic Controllers The online bar for a project with at least one force installed but not enabled is shown in Figure 193. The online bar for a project with at least one force installed and enabled is shown in Figure 194.

has two options: FORCE ON and FORCE OFF located at the bottom of the popup menu. Move the part being forced into the ladder logic display. An instruction that is not already forced. N Figure 195: Popup Menu with Install Force Selections Fo ot r Fo R ev rR i ew ep ro O du nly ct . 2.Introduction to Programmable Logic Controllers How to Install and Remove a Force Using Popup Menus Installing a force at one logical address forces the instruction everywhere it is used in the project. This opens the popup menu shown in Figure 195. 1. Install the force. Right click the mouse over the part being forced. io n 208 . as in this example. The actual menu selections will depend on the status of the instruction.

Introduction to Programmable Logic Controllers
3. Choose the appropriate selection from the popup menu. Note that forcing an XIO instruction ON will turn the instruction OFF. Likewise, forcing an XIO instruction OFF will turn the instruction ON. This example forces ON the input instruction at address I:000/4. The instruction on rung 0003 is an XIC, and the instruction on rung 0004 is an XIO. However, both instructions share the same logical address. Figure 196 illustrates the appearance of an instruction that is forced ON. The label “ON” appears at the bottom of the part, just to the left of the bit number. The online bar has been moved into the ladder logic to show how RSLogix reflects the status of the installed forces.

4. Enable the force. Left click the mouse over the “Forces Disabled” down-arrow from the online bar. This opens the drop down menu shown in Figure 197.

N
Figure 197: Drop Down Menu with Enable Force Selection

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 196: Inputs Forced ON

209

Introduction to Programmable Logic Controllers
5. Left click ENABLE ALL FORCES. This opens the confirmation popup window shown in Figure 198.

6. Left click the YES button from the confirmation window. All of the installed forces in the project now become active as illustrated in Figure 199. The “ON” text below the instruction changes color from black to red, and a “>” (greater than) symbol appears next to the text indicating the part is now forced ON. Highlight bars also appear on either side of the instruction to reflect the current status, and the online bar indicates that forces are enabled in the project. Notice the difference between the XIO and XIC instructions in Figure 199, even though both parts are forced ON.

N
Figure 199: Forces Enabled

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n

Figure 198: Enable Forces Confirmation Popup Window

210

Introduction to Programmable Logic Controllers
7. Remove the force. You may remove any force without first disabling it. This allows all of the other forces in the project to remain active while you remove only the forces that are no longer required. The I:000/5 instruction on rung 0003 has been forced OFF, as shown in Figure 200, to illustrate the response of RSLogix when selected forces are removed.

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 200: Multiple Forces in Project
211

Introduction to Programmable Logic Controllers
8. Right click the mouse over the part whose force is being removed. This opens the popup menu shown in Figure 201. The actual menu selections will depend on the status of the instruction. An instruction that is already forced ON, as in this example, has two options: REMOVE FORCE and FORCE OFF located at the bottom of the popup menu.

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 201: Popup Menu with Remove Force Selections
212

Introduction to Programmable Logic Controllers
9. Select REMOVE FORCE from the popup window. This removes the force from the selected logical address, but leaves other forces in the project active as indicated in Figure 202.

N

Fo ot r Fo R ev rR i ew ep ro O du nly ct , io n
Figure 202: Selected Force Removed
213

The two force files are labeled O0 (output force file) and I1 (input force file). io n Figure 203: Force Files in Project Window 214 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers How to Install and Remove a Force Using the Force Tables Forces can be installed using the two force files located in the Force Files folder of the Project window as shown in Figure 203.

io n Figure 204: O0 (Output Force File) Popup Window 215 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct . A “1” in the display means that the corresponding logical address is forced ON. Double click the O0 (output force file) or I1 (input force file) icon in the Force Files folder of the Project window.” (period) represents an address that is not forced. A “. This opens a popup window for the respective force file. The Output Force File is shown in Figure 204 as an example. and a “0” means the corresponding address is forced OFF.Introduction to Programmable Logic Controllers 1.

Introduction to Programmable Logic Controllers 2. Scroll down in the popup window until you see the address being forced. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . This example uses output address O:015/7 as shown in Figure 205. 3. io n Figure 205: Output Address to Force 216 . Left click the address being forced in the popup window.

The force data is reflected in both the popup window and at the instruction in the ladder logic as shown in Figure 206. Type a “1” or a “0” to set the force ON or OFF. Install the force. and then press the ENTER key on the keyboard. Left click the ENABLE button from the popup window. Enable the force.Introduction to Programmable Logic Controllers 4. io n Figure 206: Force Installed Figure 207: Enable Forces Confirmation Popup Window 217 . This opens the confirmation popup window shown in Figure 207. Notice how the force installation is reflected in the online bar. 5. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . respectively.

Left click the YES button from the confirmation window. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . All of the status information in the popup window changes color from black to red.Introduction to Programmable Logic Controllers 6. indicating forces are enabled. and a “>” (greater than) symbol appears next to the text indicating the part is now forced ON. All of the installed forces in the project now become active as illustrated in Figure 208. io n Figure 208: Force Enabled 218 . The “ON” text below the instruction changes color from black to red.

or disabling all forces. removing all forces. Right click the mouse over the address of the instruction with the force being removed. io n Figure 209: Popup Menu with Remove Force Selections 219 . An instruction that is already forced OFF as in this example. Remove the force. You may remove any force without first disabling it. The actual menu selections will depend on the status of the instruction. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 7. This opens the popup menu shown in Figure 209. has several options including removing or changing the force at the selected address. This allows all of the other forces in the project to remain active while you remove only the forces that are no longer required.

The force indication on the online bar also changes since this was the only force in the software. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 210: Force Removed 220 .Introduction to Programmable Logic Controllers 8. Select REMOVE FORCE – O:015/7 from the popup menu. This removes the force from the instruction as shown in Figure 210.

and symbolic address of each instruction the project. The cross-reference list. io n Figure 211: Cross Reference Report – Sorted by Address 221 .Introduction to Programmable Logic Controllers CROSS REFERENCING INSTRUCTIONS The cross-reference report is a list of all instances of a given logical address in the ladder logic. includes the project file number. shown in Figure 211. description. rung number. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

Introduction to Programmable Logic Controllers How to Open the Cross Reference Report The cross-reference report opens from either the ladder window or the project window. as with the timer in Figure 212. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . From the Ladder Window 1. If you are opening the popup from an instruction containing multiple data fields. This opens the popup menu for the instruction as shown in Figure 212. Right-click the mouse over the address of the instruction. Scroll the ladder window to the instruction being cross-referenced. You will not get the cross-reference option in the popup menu if the mouse is not over the address. io n Figure 212: Cross Reference Popup Window 222 . make sure you highlight the address of the instruction and not some other data field. 2.

Figure 213: Cross-Reference Report for Address Selected in Ladder Window N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 3. io n 223 . This selection will also indicate the target address of the cross-reference report. Select CROSS REFERENCE from the popup window. The cross-reference report opens with the target address at the top of the window as shown in Figure 213.

Introduction to Programmable Logic Controllers From the Project Window 1. io n Figure 214: Data Files Folder Open in Project Window 224 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Open the Data Files folder in the project window. The cross-reference selection is the first file in the folder as shown in Figure 214.

Double click the CROSS REFERENCE file. This opens the cross-reference 3. report shown in Figure 215. io n Figure 215: Cross Reference Report Open 225 . Scroll the display in the cross-reference report down until the desired address is in the display. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 2.

This moves the cursor in the ladder window over the instruction at the selected rung as shown in Figure 216.Introduction to Programmable Logic Controllers 4. Figure 216: Address in Ladder Window Selected from Cross-Reference Report N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Double click the rung number for the instruction. io n 226 .

Introduction to Programmable Logic Controllers DATA TABLE MONITORING The data table files are all of the files within the Data File folder in the Project window. Each data table consists of a grid of logical addresses that displays the data stored at each address. Each file contains information specific to the logical addresses contained within the file. The data table also displays any symbolic address or description associated with a selected address. An example of a data table is shown in Figure 217. io n Figure 217: Data Table 227 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct . You can also use the data tables to determine which logical addresses are used in the ladder logic. Any data table file can be used to monitor or change the information stored at a specific address.

2. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers How to Open a Data Table The data tables open from either the ladder window or the project window. io n Figure 218: Data Table Popup Window 228 . From the Ladder Window 1. Scroll the ladder window to the instruction for which the data table is being opened. Right-click the mouse over the address of the instruction. This opens the popup menu for the instruction as shown in Figure 218.

The data table opens with the target address highlighted in the as shown in Figure 219. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Select GO TO DATA TABLE from the popup window.Introduction to Programmable Logic Controllers 3. This selection will also indicate the target address of the data table. io n Figure 219: Data Table for Address Selected in Ladder Window 229 .

The data files are listed below the cross-reference file as shown in Figure 214. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Open the Data Files folder in the project window. io n Figure 220: Data Files Folder Open in Project Window 230 .Introduction to Programmable Logic Controllers From the Project Window 1.

Double click the desired data file. io n 231 . Double clicking any abbreviation opens a data file for the corresponding selection.6 or 6.999 File Type Output image table Input image table Status Bit or binary Timers Counters Control Integer Floating-point User assigned Notes Bits in this memory area control the status of all outputs.Introduction to Programmable Logic Controllers 2. Numbers containing a decimal point such as 5.2. Bits in this memory area indicate the status of all inputs. Counter information. N Figure 221: Data Table Open Fo ot r Fo R ev rR i ew ep ro O du nly ct . An example of the T4 (timer) data table is shown in Figure 221. Used for advanced file instructions. User assigned file types as needed. Timers and counters may also use these file numbers. The file type abbreviations are described in Table 21 Table 21: Data File Type Abbreviations File No.768 to +32. Processor configuration and status report. Timer information. Integer values in the range -32. O0 I1 S2 B3 T4 C5 R6 N7 F8 9 . Binary (0 or 1) information.767.

Figure 222 shows address N10:22 contains the value “10” which is being used in a division instruction.Introduction to Programmable Logic Controllers How to Change Values Using a Data Table 1. io n Figure 222: N10 Data Table for Address N10:22 232 . The N10 (integer) data table is shown in Figure 222 as an example. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Open the data table and locate the desired address within the table.

As an example. which changes the data at the instruction as shown in Figure 224. 4. type “1550” as illustrated in Figure 223. Left click the mouse over the value in the data table that is being changed. io n Figure 223: New Value in Data Table Figure 224: Value Changed through Data Table 233 . Press the ENTER key on the keyboard. 3. Type the new value.Introduction to Programmable Logic Controllers 2. This changes the value in the data table. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

Right click the mouse over an instruction in the ladder logic. This opens a popup window at the instruction as shown in Figure 225. io n 1.Introduction to Programmable Logic Controllers SEARCHING Search functions allow you to locate specific addresses. There are a variety of ways to perform a search. data types. 234 . and then navigate to the various instances returned by the search. The output instruction at logical address O:011/16 is used in this example. and using specific buttons on the standard toolbar. These include using popup menus at the instruction. How to Search using Popup Menus at an Instruction N Figure 225: Find All Popup Menu Fo ot r Fo R ev rR i ew ep ro O du nly ct . using drop down menus from the Windows toolbar. or descriptions within the ladder logic.

The results contain the project file number and rung number of the instruction. Select FIND ALL from the popup menu. displays all instances of the address in the project. and the instruction type. The results window. This opens the Search Results window at the bottom of the display. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 2. io n Figure 226: Search Results Window for O:011/16 235 . shown in Figure 226.

Figure 227: Going to an Instruction in the Ladder Logic from a Search Result N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Left click any instance in the Search Results window to go to the instruction in the ladder logic. An example is shown in Figure 227. io n 236 .Introduction to Programmable Logic Controllers 3. in which the XIC instruction of rung 0148 was selected from the Search Results window.

FIND NEXT. This opens the Search drop down menu shown in Figure 228. and FIND PREVIOUS.Introduction to Programmable Logic Controllers How to Search using Drop Down Menus from the Windows Toolbar Left click the SEARCH selection from the Windows toolbar located at the top of the RSLogix window. GOTO. REPLACE. io n Figure 228: Search Drop Down Menu 237 . There are several functions available through the drop down menu including: FIND. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

4.Introduction to Programmable Logic Controllers Find Selecting FIND from the Search drop down menu opens the Find popup menu shown in Figure 229. You cannot search for a field if it is not checked. the search will proceed in the selected direction from the current location of the cursor in the ladder logic. or LOCAL if you want to restrict the search to the ladder file that is currently open in the display. Enter the address or mnemonic of the instruction into the “Find What:” field. 2. 1. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Select the “Direction” as either UP or DOWN. Select the “Scope” as either GLOBAL if you want to search all program files in the project. 3. Selecting the various items in the “Advanced” field allows you to search for more than one item at a time. io n Figure 229: Find Popup Window 238 . When initiated.

The results of a FIND ALL search are shown in Figure 230. Selecting any entry from the Search Results window moves the cursor to that location in the ladder logic. Selecting FIND ALL opens the Search Results window at the bottom of the display with all instances of the instruction. Left click the FIND NEXT button to search for the next instance of the instruction. or FIND ALL to locate all instances of the instruction.Introduction to Programmable Logic Controllers 5. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . io n Figure 230: FIND ALL Search Results 239 .

and the REPLACE and REPLACE ALL buttons. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers Replace Selecting REPLACE from the Search drop down menu opens the Replace popup menu shown in Figure 231. The functions in the Replace window are similar to that of the Search window. The REPLACE ALL button replaces every instance at one time. The REPLACE button replaces only one instance at a time. with the exception of the “Replace With:” field. The search criteria that you enter into the “Find What:” window will be replaced with the entry in the “Replace With:” field when you start the replacement function. io n Figure 231: Replace Popup Window 240 .

or cross-reference report. Enter the search criteria into the “Enter program location:” field. N Figure 233: Go To Example Fo ot r Fo R ev rR i ew ep ro O du nly ct . RSLogix recognizes the format of the search criteria and will change the “Go to What:” button to match the format of your input. data table file. rung or address in the ladder logic. The symbolic name “PL8” is entered as an example of a program location as shown in Figure 233. you open the cross-reference report by first clicking the CROSS REFERENCE button.Introduction to Programmable Logic Controllers Go To Selecting GOTO from the Search drop down menu opens the popup window shown in Figure 232. The “Go to What:” button automatically changes to ADDRESS/SYMBOL. io n Figure 232: Go To Popup Window 241 . The Go To popup window allows you to quickly find a specific project file. 1. However.

Left click the GOTO button. This opens the selected file. N Figure 235: Additional Options Available through Popup Menu Fo ot r Fo R ev rR i ew ep ro O du nly ct . shown in Figure 235. The Address/Symbol Editor popup window opens if. as in this example. The popup window opens with the desired symbol highlighted in the display as shown in Figure 234. a symbolic name is entered as the go to target.Introduction to Programmable Logic Controllers 2. io n Figure 234: Address/Symbol Editor Popup Window 242 . Right click the mouse over the selected address to open a popup menu. with additional options for data manipulation and searching. 3.

which displays all instances of the selected instruction. to view the ladder logic behind it.Introduction to Programmable Logic Controllers 4. io n Figure 236: Search Results from Address/Symbol Editor 243 . An example of the Search Results window is shown in Figure 236. Selecting FIND ALL from the popup menu opens the Search Results window. You can select from any entry in the Search Results window and navigate to that instruction in the ladder logic. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . or drag the window out of the way. Note that you may have to close the Address/Symbol Editor window.

Introduction to Programmable Logic Controllers How to Search Using the Standard Toolbar Searches can be performed from the standard toolbar using the search entry box in combination with the three FIND buttons shown in Figure 237. and FIND ALL. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . The FIND buttons are FIND PREVIOUS. FIND NEXT. io n Figure 237: Search Entry Box and FIND Buttons 244 .

Type the search criteria into the search entry box.Introduction to Programmable Logic Controllers 1. The search criteria can be a specific address (such as B3:000/1) or an instruction type (such as TON or XIC). N Fo ot r Fo R ev rR i ew ep ro O du nly ct . Consider an example that searches for a delay timer-on instruction as shown in Figure 238. io n Figure 238: Searching for TON Instruction 245 . Notice that TON is entered for the search criteria. and the current position of the cursor in the ladder logic is over the TON on rung 0105.

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . respectively. Left click FIND NEXT button or FIND PREVIOUS button to search the ladder logic forward or backward. io n Figure 239: Result of FIND NEXT for TON Instruction 246 . for the next instance of the search criteria.Introduction to Programmable Logic Controllers 2. The cursor has moved from TON instruction on rung 0105 to the TON instruction on rung 0112. The search proceeds from the current position of the cursor. Figure 239 illustrates the results after selecting FIND NEXT.

below the display with a list of everything meeting the search criteria. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . shown in Figure 240. Selecting FIND ALL opens the Search Results window.Introduction to Programmable Logic Controllers 3. io n Figure 240: Result of FIND ALL for TON Instruction 247 . Selecting any instance of the instruction from the Search Results window moves the cursor to that location in the ladder logic. Left click the FIND ALL button to locate all instances of the selected search criteria.

The histogram contains the following components: • • • START/STOP buttons: These buttons start or stop the development of the trend in the lower portions of the window. or drag an address from a data file. Histogram data can either be viewed on the display or saved in a file on disk for later analysis. A “1” in the mask allows trending. The mask is a hexadecimal-format number (FH = 11112.Introduction to Programmable Logic Controllers HISTOGRAMS A histogram is a graph of how the data is changing at a particular location in the ladder logic. and FFFFH = 11111111111111112). io n Figure 241: Histogram 248 . A histogram can only be developed for one word address at time. N Fo ot r Fo R ev rR i ew ep ro O du nly ct . and a “0” in the mask inhibits trending. Address field: The address contains the address of the word being trended by the histogram. An example of a histogram is shown in Figure 241. You may type this directly. Mask field: The mask allows you to inhibit trending of specific bits within a word of data.

Selections available through the drop down menu are decimal. The elapsed time will reset to zero if the histogram is stopped then restarted. The maximum rate of sampling is 10 ms. This history log will continue to grow until the hard disk is filled. Open the Comms drop down menu from the Windows toolbar as shown in Figure 242. binary.log. Log to File/Log to View: These fields allow you to save to disk or view on the display the histogram. and hexadecimal. if the histogram is selected to run that long. io n • 249 . Time Base field: The time base defines how often the address is examined in order to build the histogram.Introduction to Programmable Logic Controllers • Radix field: The radix is the base of the number being trended in the top half of the split window. • • • How to Create a Histogram 1. N Figure 242: Comms Drop Down Menu Fo ot r Fo R ev rR i ew ep ro O du nly ct . and the lower half is a graphical display of how the data changes at each bit within the target. Elapsed Time field: Identifies the time elapsed from when the START button was pressed. Split window display: The upper half of the split window displays the raw data of the target address. When saved to disk the default file name of the histogram is Hist. octal.

Introduction to Programmable Logic Controllers 2. io n Figure 243: Histogram Popup Window 250 . Left click HISTOGRAM from the Comms drop down menu. Histogram popup window shown in Figure 243. This opens the N Fo ot r Fo R ev rR i ew ep ro O du nly ct .

N Fo ot r Fo R ev rR i ew ep ro O du nly ct . and log destination options as necessary. io n Figure 244: Entering Target Address 251 . or drag an address from the ladder logic or data file as shown in Figure 244. 4. You may type the address directly.Introduction to Programmable Logic Controllers 3. time base. radix. Change the mask. Enter the target address of the data being sampled in the “Address” field.

This opens the Histogram Properties popup menu shown in Figure 245. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 5. Right click the mouse while the mouse pointer is over the Histogram popup window. io n Figure 245: Histogram Popup Menu 252 .

This opens the Histogram Properties popup window shown in Figure 246. 7. The default name of “Bit 0” is changed to “Test Bit” in the example shown in Figure 246. Left click PROPERTIES from the Histogram popup window. change graph colors. This closes the window and returns you to the Histogram window. Pen names are assigned by left clicking the desired bit. and assign names to each pen through the Histogram Properties popup window. N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 6. You may change the target destination of the log file if the histogram is being saved to disk. Left click the OK button from the Histogram Properties popup window when you are satisfied with the setup. entering the new name. io n Figure 246: Histogram Properties Popup Window 253 . then pressing the ENTER key on the keyboard.

Notice the label for bit 0 reflects the text that was entered in the Histogram Properties window. io n Figure 247: Creating Histogram Trends 254 . N Fo ot r Fo R ev rR i ew ep ro O du nly ct .Introduction to Programmable Logic Controllers 8. Left click the START button to begin trending. 9. Left click the STOP button to halt the histogram. and the histogram begins building in the lower half of the window as shown in Figure 247. The raw data will scroll in the upper half of the split window.

Sign up to vote on this title
UsefulNot useful