Documente Academic
Documente Profesional
Documente Cultură
Introduction to Logix
INTRODUCTION TO LOGIX HANDS-ON LAB ___________________________________________7 ABOUT THIS HANDS-ON LAB __________________________________________________7 BEFORE YOU BEGIN ________________________________________________________7 LAB MATERIALS ___________________________________________________________8 DOCUMENT CONVENTIONS ____________________________________________________9 LAB 1: CREATING A NEW PROJECT (40 MINUTES) ____________________________________11 ABOUT THIS LAB __________________________________________________________11 ABOUT CONTROLLOGIX, FLEXLOGIX, AND COMPACTLOGIX CONTROLLERS ______________11 LAUNCHING RSLOGIX 5000 PROGRAMMING SOFTWARE_____________________________13 CREATING A NEW CONTROLLER PROJECT _______________________________________14 ADDING LADDER LOGIC TO THE MAIN ROUTINE ___________________________________17 CREATING TAGS FOR THE LADDER CODE ________________________________________23 MONITORING/EDITING TAGS __________________________________________________30 CONFIGURING I/O _________________________________________________________32 VIEWING THE I/O TAGS JUST CREATED _________________________________________44 ASSIGNING ALIAS TAGS _____________________________________________________46 LAB 2: CONNECTING YOUR COMPUTER TO THE CONTROLLER (5 MINUTES) _________________52 ABOUT THIS LAB __________________________________________________________52 LAUNCHING RSLINX SOFTWARE ______________________________________________52 ADDING THE AB_ETHIP-1 (ETHERNET/IP) DRIVER ________________________________53 LAB 3: LOADING THE PROJECT FROM THE COMPUTER TO THE CONTROLLER (DOWNLOADING) (10 MINUTES) 55 ABOUT THIS LAB __________________________________________________________55 SECTION A: DOWNLOADING TO THE CONTROLLOGIX CONTROLLER ____________________57
Introduction to Logix Hands-On Lab 4/6/2004 Page 5 of 93
DOWNLOADING THE PROJECT TO THE CONTROLLER _______________________________ 57 SECTION B: DOWNLOADING TO THE FLEXLOGIX CONTROLLER _______________________ 60 OPENING AN EXISTING CONTROLLER FILE _______________ ERROR! BOOKMARK NOT DEFINED. DOWNLOADING THE PROJECT TO THE CONTROLLER _______ ERROR! BOOKMARK NOT DEFINED. SECTION C: DOWNLOADING TO THE COMPACTLOGIX CONTROLLER ____________________ 66 OPENING AN EXISTING CONTROLLER FILE _______________________________________ 66 DOWNLOADING THE PROJECT TO THE CONTROLLER _______________________________ 66 LAB 4: TESTING YOUR LOGIC PROGRAM (5 MINUTES) _________________________________ 72 ABOUT THIS LAB __________________________________________________________ 72 PUTTING THE CONTROLLER INTO RUN MODE AND TESTING THE PROGRAM. ______________ 72 LAB 5: ADDING LOGIC AND TAGS ONLINE (15 MINUTES) _______________________________ 76 ABOUT THIS LAB __________________________________________________________ 76 ADDING THE TIMER TO THE LOGIC _____________________________________________ 76 ABOUT THIS LAB __________________________________________________________ 85 CREATING AND RUNNING A TREND _____________________________________________ 85 ABOUT THIS LAB __________________________________________________________ 90 INSTRUCTION HELP ________________________________________________________ 90 I/O MODULE WIRING DIAGRAMS _______________________________________________ 91 ON-LINE REFERENCE MATERIALS ______________________________________________ 92 3RD PARTY VENDOR SAMPLE PROJECTS _________________________________________ 92 QUICK TOUR TUTORIAL _____________________________________________________ 93
Lab Materials
For this Hands-On lab, we have provided you with the following materials that will allow you to complete the labs in this workbook. Hardware Your lab station will consist of one of the following: The ControlLogix Coordinated Demo case Catalog No. 1796-CL11 contains the following hardware: (1) 1756-A10/A chassis with a 1756-PA72 power supply (2) 1756-L63 processors in slots 1 and 3 (2) 1756-OB16D 16 Point 19.2V - 30VDC diagnostic output modules in slots 0 and 4 (1) 1756-IB16D 16 Point 10V - 30VDC diagnostic input module in slot 2 (1) 1756-M08SE SERCOS Interface module in slot 5 (1) 1756-ENBT communication module in slot 6 (1) 1756-OF6VI Isolated Analog (10V) output module in slot 7 (1) 1756-IF6I Isolated Analog Voltage/Current input module in slot 8 (1) 1756-MO2AE Analog Encoder servo module in slot 9 (1) 1747-CP3 or 1756-CP3 serial cable (9-pin female to 9-pin female null modem cable) (1) Ethernet Cable The FlexLogix Coordinated Demo case Catalog No.1796-FLEXLOGIX1 contains the following hardware: (2) 1794A-TB3 terminal base (2) 1794-L34 processors in slot 0 (2) 1788-CNCR ControlNet communication card (1) 1788-DNBO DeviceNet communication card (1) 1788-ENBT Ethernet/IP communication card (2) 1794-IB10XOB6/A 10 Input 6 Output 24V DC Sink/Source in slot 1 (2) 1794-IE4XOE2 4 Input 2 Output 24V DC Non-Isolated Analog in slot 2 (1) 1747-CP3 or 1756-CP3 serial cable (9-pin female to 9-pin female null modem cable) (1) EtherNet cable
The CompactLogix Coordinated Demo case contains the following hardware: (1) 1769-L35E processor in slot 0 (1) 1769-IQ6X0W4/A 24V DC Sink/Source Input, AC/DC Relay Output (1) 1769-IF4/A 4 Channel Current/Voltage Analog Input (1) 1769-OF2/A 2 Channel Current/Voltage Analog Output (1) 1769-PA2 power supply (1) 1747-CP3 or 1756-CP3 serial cable (9-pin female to 9-pin female null modem cable)
Software This hands-on lab uses the following software: RSLogix 5000 programming software V12.01 RSLinx V2.41.06 build 10 Files This hands-on lab uses the following files: These files are located in C:\RSLogix 5000\Project. This is the default directory for RSLogix 5000. Controller1_CLX.ACD Controller1_FLX.ACD Controller1_CMP.ACD
Document Conventions
Throughout this workbook, we have used the following conventions to help guide you through the lab materials. This style or symbol:
Words shown in bold italics (e.g., RSLogix 5000 or OK)
Indicates:
Any item or button that you must click on, or a menu name from which you must choose an option or command. This will be an actual name of an item that you see on your screen or in an example. An item that you must type in the specified field. This is information that you must supply based on your application (e.g., a variable). Note: When you type the text in the field, remember that you do not need to type the quotes; simply type the words that are contained within them (e.g., Controller1). The text that follows this symbol is supplemental information regarding the lab materials, it is not information that is required reading in order for you to complete the lab exercises. The text that follows this symbol may provide you with helpful hints that can make it easier for you to use this product.
FYI
Note: If the mouse button is not specified in the text, you should click on the left mouse button.
Introduction to Logix Hands-On Lab 4/6/2004 Page 9 of 93
FlexLogix The FlexLogix platform combines the high performance Logix control engine with the popular distributed FLEX I/O to provide a cost-effective distributed controller. The FlexLogix system is built on these components: FLEX I/O modules which provide a compact, DIN-rail mounted I/O system. Through two local Flex rails. This gives you up to 16 local I/O modules. Two 1788 communication daughter cards which provide communication over ControlNet, EtherNet I/P or DeviceNet networks. A simple FlexLogix system can consist of a single, stand-alone assembly with one controller and as many as eight I/O modules per rail or you can use multiple controllers across networks and distribute multiple I/O platforms over multiple I/O links. FlexLogix controllers will fit your applications if: You are already using FLEX I/O and are looking for a simple way to add control to your distributed architecture You are currently using a centralized control architecture to control multiple stations in a process CompactLogix The combination of features, scalability, and the small size of the CompactLogix platform provide a powerful alternative for machine-level control, material handling, data acquisition, and distributed control. CompactLogix combines the high performance Logix control engine with the cost-effective rackless 1769 I/O platform and EtherNet and DeviceNet connectivity. CompactLogix will fit your applications if: You are an existing Logix customer with lower-end, lower-cost control applications. You are a new customer who wishes to apply Logix technology, but at a lower initial investment. You are an existing PLC and/or SLC customer who wishes to convert to Logix technology. You perform SCADA/RTU applications within a range of industries (e.g., petrochemical, wastewater, etc.)
2. Verify that your entries match those shown below and click on OK.
The Controller Organizer appears on the left side of the RSLogix5000 window, with a folder called Controller Controller1. You have now created your first controller project. At this time, there is no I/O, no tag database, and no logic associated with the controller.
FYI
The Controller Organizer is a graphical representation of the contents of your controller file. This display consists of a tree of folders and files that contain all of the information about the programs and data in the current controller file. The default main folders in this tree are: Controller File Name Tasks Motion Groups Trends Data Types I/O Configuration In front of each folder, there is a square containing a + sign or a - sign. The + sign indicates that the folder is closed. Click on it to expand the tree display and display the files in the folder. The - sign indicates that the folder is already open and its contents are visible.
3. Double Click on the MainRoutine icon. empty rung will be added for you.
4. From the instruction toolbar left click and hold on the Examine if Closed (XIC) instruction 5. Drag the XIC onto rung 0 until the green dot appears as shown below. Release the mouse button at the location you wish to place your instruction.
7. From the instruction toolbar left click and hold on the Examine if Open (XIO) instruction
8. Drag the XIO onto rung 0 to the right of the XIC instruction. Again a green dot will appear to the right of the XIC instruction indicating where your new instruction will be inserted. Release the mouse button at the location you wish to place your instruction.
10. From the instruction toolbar left click and hold on the Output Energize (OTE)
instruction.
11. Drag the OTE onto rung 0 to the right of the XIO instruction. Again a green dot will appear to the right of the XIO instruction indicating where the OTE instruction will be inserted. Release the mouse button at the location you wish insert the instruction.
13. We will now add a branch around the XIC instruction. Click on the XIC instruction to select it.
16. Left-Click and hold on the blue highlighted part of the branch and drag your selected leg of the branch to the left side of the XIO instruction. Place the branch over the green dot and release the mouse button.
17. From the instruction toolbar left click and hold on the XIC
instruction.
18. Drag the XIC onto your newly created branch until the green dot appears.
19. You have completed adding the rung. The entire rung should look like the figure below.
20. Save the program by clicking on the Save icon on the toolbar. This will save the program in the default program directory, which is C:\RSLogix 5000\Projects\.
As you can see the free form editing in RSLogix 5000 can help speed development. You no longer have to place an instruction and tie an address to the instruction before you add the next instruction.
Creating a tag
When you create a tag there are several attributes for a tag. The main attributes we are interested in for this lab are as follows: Tag Type: Defines how the tag operates within the project. Base: Stores a value or values for use by logic within a project Alias: A tag that represents another tag Produced: Send data to another controller Consumed: Receive data from another controller Data Type: Defines the type of data that the tag stores. For example Boolean, Integer, Real, String, etc. Scope: Defines how the data is accessed in the project. Is it either controller scoped, global data accessible throughout the controller or program scoped, data accessible for a specific program.
4. Click on OK to accept and create the tag. 5. The rung will now look like the figure below.
6. Next you will create the tag Motor_Stop. Right click on the ? of the XIO instruction and select New Tag.
10. The rung will now look like the figure below.
11. You will now create the tag Motor_Run. Right click on the ? of the OTE instruction and select New Tag. 12. The New Tag window will appear. 13. Enter the parameters as shown below.
16. For the XIC instruction in the branch we do not have to create a tag. You will use the tag Motor_Run. 17. Left Click and hold over the tag Motor_Run on the OTE instruction. 18. Drag the tag Motor_Run tag over to the XIC instruction until a green dot appears next to the ?. Then release the mouse button.
20. Notice the es next to rung zero. These indicate that the rung is in edit mode. Click on the (End) rung. The es are now gone. RSLogix 5000 software verifies each rung automatically when you click the mouse off of it. This makes programming easier. 21. Your rung should now appear as shown below.
on the toolbar.
The tag database of Logix versus a traditional PLCs fixed memory addresses help you create self-documenting code. This means you do not have to use address descriptions or symbols to make code easy to read.
Monitoring/Editing Tags
We will now look at the Tag Monitor/Editor in RSLogix 5000. We will also discuss the concept of Controller versus Program scoped tags. You will continue to use the project already opened. 1. From the Controller Organizer double click on Controller Tags.
2. The tag Monitor/Editor window appears. You notice in the lower left corner of the window two tabs labeled Monitor Tags and Edit Tags as shown below.
4. You now notice a field in the upper left corner of the Tag Editor window labeled Scope. You remember from earlier in the lab that we talked briefly about Controller and Program scoped tags. Currently the selection is Controller1(controller).
5. When we created the tags earlier we created them in the Program Scope.
Data at the program scope is isolated from other programs. Routines cannot access data that is at the program scope of another program. Thus you can re-use the tag name of a program-scoped tag in multiple programs.
6. Click on the down arrow for the Scope selection box. 7. Select MainProgram.
8. The Tag Editor now has switched views to the program level and you see the tags you created earlier.
on the toolbar.
Configuring I/O
We will now look at configuring I/O for our project. To communicate with I/O modules you must add modules to the I/O Configuration folder. During this off-line lab we will only show adding 1756 I/O. Follow these steps no matter what controller is at your lab station. The procedure to add Flex I/O and Compact I/O is the same. The 1756 I/O platform is the premier I/O platform and we will show you some of its advanced features such as: No load detection Open wire detection Output verification On board scaling for analog On board alarming for analog You will continue to use the project already opened. For this lab we will add the following I/O modules: 1756-IB16D (Diagnostic Input card) in slot 2 1756-OB16D (Diagnostic Output card) in slot 0 1756-IF4XOF2F (Combination Fast Analog card) in slot 3
1. From the Controller Organizer right click on I/O Configuration and select New Module.
3. Scroll thru the list until you locate the 1756-IB16D. 4. Select the 1756-IB16D module. 5. Click OK.
FYI
Comm Format: Determines the data structure for the tags that are associated with the module. Many I/O modules support different formats. Each format uses a different data structure. Electronic Keying: When you insert a module into a slot of a chassis, the controller compares the information read from the newly inserted module with what the user configured that particular slot to be in their project. The following data is read and compared: Vendor, Product Type, Catalog Number, Major Revision, Minor Revision.
The user may select one of the following module keying options during the initial module configuration: Exact Match all of the parameters described above must match or the inserted module will reject the connection. Compatible Module The following criteria must be met, or else the inserted module will reject the connection: Module Types, Catalog Number, and Major Revision must match and the Minor Revision of the physical module must be equal to or greater than the one specified in the software Disable Keying No keying used at all. 8. Click Next.
10. Click Next. 11. The first 2 screens that you viewed are common to all I/O modules. From this point on the remaining screens are dependent on the specific module you select. 12. Click Next - 2 times 13. You will find yourself on the following screen. This shows specific configuration parameters for the 1756-IB16D module.
14. Click on Finish to close the wizard. 15. In the Controller Organizer, the I/O Configuration folder should look as follows.
16. From the Controller Organizer right click on I/O Configuration and select New Module.
18. Scroll through the list locate and select the 1756-OB16D. 19. Click OK
20. The Module Properties Wizard will appear for the 1756-OB16D.
21. Enter Name & Slot the parameters shown below. Leave all other fields set to their default values.
22. Click Next 3 times. You will see configuration data that is specific to the 1756-OB16D module.
23. Click on Finish to close the wizard. 24. In the Controller Organizer, the I/O Configuration folder should look as follows.
25. From the Controller Organizer right click on I/O Configuration and select New Module.
27. Scroll through the list and locate and select the 1756-IF4FXOF2F. 28. Click on OK.
29. The Module Properties Wizard will appear for the 1756-IF4FXOF2F.
31. Click on Next 3 times. You will see configuration data specific for the 1756-IF4FXOF2F.
You notice the scaling section. Yes, this module does scaling for inputs right on board the module. Instead of having the module return raw engineering units, you can now have the module return data in engineering units such as inches, PSI, speed, etc. This saves you programming your application. 32. Click on Next.
You now notice that you can do all the alarming that you used to do for analog inputs on board the module. This will again save you application programming time since it is done for you on-board the module. 32. Keep Clicking on Next to view the options for the analog outputs. When done click Finish. 33. In the Controller Organizer, the I/O Configuration folder should look as follows.
on the toolbar.
Drag to the right to increase the size of the Tag Name field
FYI
3. You notice by looking in the upper left corner of the tag editor that you are in the Controller Scope. All I/O module tags are created in the Controller Scope.
The above entries are tag structures for the modules you added. They contain more tags than are actually displayed. Note the + sign next to the tag name, this indicates that you can expand the tag structure to see more information. 5. Expand the tag for the I/O modules and explore them. What you will find under the Configuration tags, for each module, is all the data, you entered and selected from the Module Configuration Wizard. While exploring the tags for the I/O modules you notice that the 1756-OB16D, which is an output module, has input data associated with it. You may be asking, why does an output module have inputs? The OB16D is a diagnostics module. All the diagnostic data is return to the controller thru the inputs. 6. Save the program by clicking on the Save icon on the toolbar.
FYI Aliasing
An Alias tag lets you create one tag that represents another tag. Both tags share the same value When the value of one of the tags changes, the other tag reflects the change Use Aliases in the following situations: Program logic in advance of wiring diagrams Assign a descriptive name to an I/O device Provide a simpler name for a complex tag Use a descriptive name for an element of an array 1. From the Controller Organizer double click on MainRoutine.
3. In the last part of the lab we added I/O modules to the project. Now lets Alias the tags in the program to the I/O Modules. Motor_Start will be Aliased to input point zero of the 1756-IB16D in Slot two. Motor_Stop will be Aliased to input point one of the 1756-IB16D in Slot two. Motor_Run will be Aliased to output point zero of the 1756-OB16D in Slot zero. 4. Right click on the tag Motor_Start and select Edit Motor_Start Properties.
Currently the tag is defined as a Base tag. 6. Click on the Alias radio button. The Tag Properties window will change.
7. Click on the down arrow for Alias For. The tag browser appears.
8. You need to select your address from controller scoped tags. Click on the Controller Scoped Tags button. The view on the screen will change to view your Controller Scoped Tags.
9. Expand Local 2:I and select Local 2:I.Data 10. Click the down arrow for Local 2:I.Data next to its data type (DINT) 11. This will open the table of data points for the 1756-IB16D module. 12. Select 0 from the table
13. When you select 0 from the tag browser the window will close, and the Tag Properties will appear as follows.
Motor_Start will now be aliased to Local:2:I.Data.0. This is the 1756-IB16D in Slot 2. 14. Click on OK to close and apply the changes to the tag Motor_Start. Look carefully at the tag for Motor_Start in the ladder code. Under the tag Motor_Start you see < Local:2:I.Data.0>. This means that Motor_Start has been Aliased to Local:2:I.Data.0. This means that the tags are equivalent to one another in code. Is it easier to read Motor_Start than Local:2:I.Data.0.
15. Using steps 4 14, alias the remaining two tags. Motor_Stop = Local:2:I.Data.1 Motor_Run = Local:0:O.Data.0
16. When you are finished the ladder code should appear as follows.
17. Save the program by clicking on the Save icon 18. From the File menu, choose Close.
on the toolbar.
19. This will close the project Controller1 and your RSLogix 5000 screen should appear as shown below.
FYI
The RSWho screen is actually RSLinx's network browser interface, which allows you to view all of your active network connections. The left pane of this display is the Tree Control, which shows networks and devices in a hierarchical view. When a network or device is collapsed, as indicated by the + sign, you can click on the + sign or double click on the network or device icon to expand the view and begin browsing. When a network or device is expanded, as indicated by the - sign, you can click on the - sign or double click on the network or device icon to collapse the view. The right pane of the RSWho display is the List Control, which is a graphical representation of all of the devices present on the network.
2. From the Available Driver Types pull-down menu, choose EtherNet/IP Driver then click on the Add New button. In RSLinx you will notice two different Ethernet drivers listed: EtherNet/IP Driver and Ethernet devices. In general, you should use the new EtherNet/IP driver... it will automatically scan for and find any EtherNet/IP compatible devices on the network. A few older Rockwell Ethernet products cannot be found using this driver. The older Ethernet devices driver works with all Rockwell Ethernet products, but it will only scan for IP address that you manually tell it to search for. You can have both types of drivers and/or multiple instances of each type active in RSLinx at the same time if needed. 3. Click on OK to accept the default name (AB_ETHIP-1).
4. Ensure that the Browse Local Subnet radio button is enabled, and then click OK.
Lab 3: Loading the Project from the Computer to the Controller (Downloading) (10 minutes)
About This Lab
In this lab you will open a controller project based on the lab station that you are seated at. You will: Determine the type of controller you are using Open the project that corresponds to the controller you are using Download the program to the controller You will be using a program that is based from the steps you performed in Lab 1. We have modified the program for you to match the Logix controller and I/O configuration for your lab station. Follow the steps to complete Lab 3. If your lab station looks like the picture below you have a ControlLogix controller proceed to section A on page 57.
If your lab station looks like the picture below you have a FlexLogix controller proceed to section B on page 60
If the lab station looks similar to the picture below you have a CompactLogix controller proceed to section B on page 66
3. Expand the view by clicking on the +s until your screen appears as shown below.
5. Click Download.
6. You will be asked to verify the download, Click Download once more.
7. The project will then begin to download to your controller. If your controller was in the RUN mode prior to the download, you may be prompted to return to the RUN mode. If asked select YES. 8. At this point you will be online with the controller and the status leds will mimic the leds on your controller. Shown below is an example for a controller that is in program mode.
3. From the Controller Properties screen click on Change Type to convert from the ControlLogix controller to the FlexLogix controller that will be used for your lab station.
1. From the Controller Type drop down list select the 1794-L34.
2. Click OK 3. The following warning message will appear indicating what will happen next and asking you to be sure if this is what you intended to do.
4. Select YES and the conversion will be completed. Notice that after your conversion request has completed the controller type has now been changed.
You may notice that some errors in the RSLogix error window indicating some unverified tags. This is because you now must select the I/O modules you wish to use with your FlexLogix controller.
5. Add the following FLEX I/O module to the correct slot on FlexBus Local of your projects I/O configuration. 1794-IB10XOB6/A Slot 0
a. From the Controller Organizer, under I/O Configuration, right click on FlexBus Local and select New Module. b. Add the module referenced above, making sure to add a module name and choose the correct slot number. 6. Now return to the tag database and alias your Motor_Start (Input 0), Motor_Stop (Input 1), Motor_Run (Output 0) tags to the FLEX I/O module. Thats it that is all there is to it when switching between Logix Controllers.
3. Expand the view by clicking on the +s until your screen appears as shown below.
5. Click Download.
6. You will be asked to verify the download, Click Download once more.
7. The project will begin to download. If your controller was in the RUN mode prior to the download, you may be prompted to return to the RUN mode. If asked select YES. 10. At this point you will be online with the controller and the status leds will mimic the leds on your controller. Shown below is an example for a controller that is in program mode.
6. From the Controller Properties screen click on Change Type to convert from the ControlLogix controller to the CompactLogix controller that will be used for your lab station.
1. From the Controller Type drop down list select the 1769-L35E.
2. Click OK 3. The following warning message will appear indicating what will happen next and asking you to be sure if this is what you intended to do.
7. Select YES and the conversion will be completed. Notice that after your conversion request has completed the controller type has now been changed.
You may notice some errors in the RSLogix error window indicating some unverified tags. This is because you now must select the I/O modules you wish to use with your CompactLogix controller. 8. Add the following Compact I/O module to the correct slot on CompactBus Local of your projects I/O configuration. 1769-IQ6XOW4/B Slot 1
c. From the Controller Organizer, under I/O Configuration, right click on CompactBus Local and select New Module. d. Add the module referenced above, making sure to add a module name and choose the correct slot number. 9. Now return to the tag database and alias your Motor_Start (Input 0), Motor_Stop (Input 1), Motor_Run (Output 0) tags to the Compact I/O module. Thats it that is all there is to it when switching between Logix Controllers.
3. Expand the view by clicking on the +s until your screen appears as shown below.
5. Click Download.
6. You will be asked to verify the download. Click Download once more.
7. The project will begin to download. If your controller was in the RUN mode prior to the download, you may be prompted to return to the RUN mode. If asked select YES. 11. At this point you will be online with the controller and the status leds will mimic the leds on your controller. Shown below is an example for a controller that is in program mode.
Putting the Controller into Run Mode and Testing the Program.
1. From RSLogix 5000 put the controller into run mode. From the Controller Faceplate select Run Mode.
2. The controller will go into run mode. This can be verified by looking at the Run LED on the controller. It should now illuminate green. It can also be verified through RSLogix 5000 by viewing the controller faceplate.
You notice that this is a replica of your controllers faceplate. 3. From the Controller Organizer expand the MainProgram by clicking on the +.
5. The ladder editor will appear. In your specific program you will actually see your alias addresses which we have removed, for this lab.
Note the actual I/O aliass on your program may differ depending on the hardware found at your lab station. You will now see the ladder logic. Notice the green power rails. This indicates you are online and the routine is executing.
6. You notice that the XIO instruction Motor_Stop is green. This means that this instruction is in the true or on state. This is because the Motor_Stop Pushbutton is not pressed.
7. If you press button DI1 the XIO instruction for Motor_Stop will no longer be green. This is because the instruction is no longer true.
8. Press button DI0 (Motor_Start). The XIC instruction will become true and turn green. Motor_Run will energize (turn green). And the pilot light DO0 on your lab station will illuminate.
9. When you release push button DI0 (Motor_Start), output DO0 (Motor_Run) stays illuminated. The ladder logic you have just written is a simple 3-wire control or motor start/stop seal in circuit.
10. Press pushbutton DI1 (Motor_Stop). Output DO0 (Motor_Run) will turn off.
Note the actual I/O aliass on your program may differ depending on the hardware found at your lab station. 2. The ladder editor will now look as follows.
The rung with the Is on the power rails is the rung you will perform the edits on. 3. Click the OTE instruction so it becomes highlighted.
6. A timer is inserted into the code to the right of the OTE instruction.
In Logix you can string output instructions together. You do not have to create branches. 7. On the timer instruction right click in the blue area next to the word Timer and select New Tag.
8. The New Tag window appears. You notice that the Data Type is already set to TIMER. This is because you are creating a tag in a timer instruction. 9. In the Name field enter Timer then click OK.
11. Double-Click on the 0, in the timer instruction, next to the word Preset. 12. Enter a value of 32767 In Logix the Timer Preset is a 32-bit DINT which means the maximum value for your timers can be: 2,147,483,647 13. Press Enter.
Your Preset value is now 32767 milliseconds. Leave the accumulated value set to zero. 14. You are now ready to verify the edits you made. 15. Click on the Accept Pending Program Edits icon .
Pending Program Edits are changes to a routine that have been made in the RSLogix 5000 software, but have not yet been communicated to the controller. 16. When asked to accept pending edits click on YES. 17. Click on the Test Program Edits icon .
Test Program Edits instructs RSLogix 5000 to test your program edits to ensure the program changes operate as you expect them to. 18. A window will appear. Click Yes. You are allowing the software and controller to test the edits. 19. Click on the Assemble Program Edits icon .
Assembling Program Edits instructs RSLogix 5000 to convert the edit zones in all routines of a program into regular rungs. 20. A window will appear. Click Yes. You are allowing the software and controller to assembly the edits. 21. The ladder editor will now appear as follows.
We now need to add a rung that will reset the timer when the Motor_Stop (DI1) is pushed. 22. Right click on the (End) rung and select Add Rung.
24. From the Instruction Toolbar, 25. This will place a Timer-Reset instruction on the rung.
26. From the timer instruction on rung zero, click and hold on the word Timer. 27. Drag the tag name Timer to the RES instruction, a green dot will appear next to the instruction. Release the mouse button.
27. Right click on the XIO (Motor_Stop) instruction on rung zero and select Copy Instruction.
The instruction mnemonic can now be edited. 29. Type XIC in place of XIO 30. Press Enter when finished. 31. The rung should now appear as shown below.
You are now ready to verify the program edits you have made. 32. Click on the Accept Pending Program Edits icon 33. When asked to accept pending edits click on YES. 34. Click on the Test Program Edits icon . .
35. A window will appear. Click Yes. You are allowing the software and controller to test the edits. 36. Click on the Assemble Program Edits icon .
37. A window will appear. Click Yes. This allows the software and controller to assemble your edits. The code should now appear as shown below.
Now when you press the DI0 (Motor_Start) push button DO0 (Motor_Run) will illuminate and the Timer instruction will start incrementing. When you press push button DI1 (Motor_Stop), DO0 will turn off and the Timer will reset. Congratulations you have Completed Lab 5
FYI Trending
Basic Trending in RSLogix 5000 allows you to view data sampled over a time period in a graphical display. Data is sampled at a periodic rate that is configurable from 10 milliseconds to 30 minutes. RSLogix 5000 will allow you to create a trend and save it as part of your project file. Basic Trending has these constraints: you can trend data elements of type BOOL, SINT, INT, DINT, and REAL, you are limited to sampling eight unique data elements, and you will be limited to one active trend at a time.
5. We want to trend the timer accumulate value. When you added the timer the tag was created in the Program Scope. So we must select the MainProgram tags.
9. Click the Add button. This will add the tag Timer.ACC to the Tags To Trend list.
10. Click on Finish. 11. The Trend window will now appear.
12. Start the trend by clicking on Run. 13. Start the Timer in the program by pressing the DI0 pushbutton on your lab station. 14. You see the Trend begin capturing the data of the Timer.ACC.
15. Try pressing the DI1 pushbutton and watch the trend. 16. When you are finished investigating the trend stop the trend by clicking on Stop.
Instruction Help
1. From the Help pull down menu select Instruction Help.
2. Click on an instruction to locate its description, details about its parameters, and related instructions along with examples on how to use the instruction.
6. Click Display to view the wiring diagram for this module. Note you may need to maximize your screen.
7. When you are finished viewing the wiring diagram close the display window.
When you install RSLogix 5000 software you have the option to also install the On-Line reference materials. If these are installed they can be viewed here via RSLogix 5000 help.
Thats it Congratulations!! You have now completed The Introduction to Logix Hands On Lab.