Anda di halaman 1dari 70

Fundamentals Of Logix

Learn how to use RSLogix to reduce engineering time and cost

Table of Contents
TABLE OF CONTENTS___________________________________________________________3 INTEGRATED ARCHITECTURE COMPACT MACHINE SOLUTIONS (90 MINUTES) ________________5 WHAT IS INTEGRATED ARCHITECTURE ?__________________________________________5 ABOUT COMPACTLOGIX CONTROLLERS _________________ERROR! BOOKMARK NOT DEFINED. ABOUT THIS HANDS-ON LAB __________________________________________________6 BEFORE YOU BEGIN ________________________________________________________7 LAB MATERIALS ___________________________________________________________7 DOCUMENT CONVENTIONS ____________________________________________________8 LAB 1: CREATING A NEW PROJECT (30 MINUTES) _____________________________________9 ABOUT THIS LAB ___________________________________________________________9 LAUNCHING RSLOGIX 5000 PROGRAMMING SOFTWARE ____________________________9 CREATING A NEW CONTROLLER PROJECT _______________________________________10 ADDING LADDER LOGIC TO THE MAIN ROUTINE ___________________________________12 CREATING TAGS FOR THE LADDER CODE ________________________________________18 MONITORING/EDITING TAGS __________________________________________________25 LAB 2: CONFIGURING I/O (20 MINUTES) ____________________________________________28 ABOUT THIS LAB __________________________________________________________28 ADDING COMPACTLOGIX I/O _________________________________________________28 LAB 3: CONNECTING YOUR COMPUTER TO THE CONTROLLER (5 MINUTES)__________________44 ABOUT THIS LAB __________________________________________________________44 LAUNCHING RSLINX SOFTWARE ______________________________________________44 ADDING THE AB_ETHIP-1 (ETHERNET/IP) DRIVER ________________________________45 LAB 4: LOADING THE PROJECT FROM THE COMPUTER TO THE CONTROLLER (5 MINUTES) ______47 LAB 5: TESTING YOUR LOGIC PROGRAM (5 MINUTES) _________________________________49 ABOUT THIS LAB __________________________________________________________49 PUTTING THE CONTROLLER INTO RUN MODE AND TESTING THE PROGRAM _______________50 LAB 6: ADDING LOGIC AND TAGS ONLINE (10 MINUTES) _______________________________53 ABOUT THIS LAB __________________________________________________________53 ADDING A TIMER TO THE LOGIC _______________________________________________53 LAB 7: CREATING AND RUNNING A TREND (5 MINUTES) ________________________________62 ABOUT THIS LAB __________________________________________________________62 CREATING AND RUNNING A TREND _____________________________________________62 LAB 8: USING RSLOGIX 5000 HELP (10 MINUTES) _________________________________67 ABOUT THIS LAB __________________________________________________________67 INSTRUCTION HELP ________________________________________________________67 USING ONLINE REFERENCE MATERIALS _________________________________________68 3RD PARTY VENDOR SAMPLE PROJECTS _________________________________________69 QUICK START, LEARNING CENTER, RESOURCE CENTER _____________________________69 APPENDIX A DESCRIPTION OF DOCUMENT CHANGES ______________________________70

CMSW02ENv1.1.doc 28-Aug-08 Page 3 of 70

Integrated Architecture Compact machine Solutions (90 minutes)


What is Integrated Architecture ?
Integrated Architecture is a concept that allows automation components to be used as standalone control devices or combined together as an integrated system based on a common set of enabling technologies. Integrated Architecture brings together an outstanding range of pre-integrated components and systems to help today's manufacturing enterprises across a wide range of industries. The Integrated Architecture technologies are the core of a robust system: LOGIX is the Control Platform based on the same control engine embedded in scaleable controllers using a single programming environment NETLINX is the Communication Platform based on the Open Networks integrated to Control, Configure & Collect data VIEWANYWARE is the Visualization Platform. This technology is a unified, scalable and extensible HMI platform using a single development environment. FACTORYTALK is the Information Platform. This technology integrates control systems and connects the enterprise with the production facility

Rockwells Integrated Architecture provides all the control you need in one package: Distributed Control Functionality for: o o o o Global Access to data Deterministic control Distributed HMI Extensive library of process control algorithms (Function Blocks)

Programmable Controller Flexibility for: o o o o o An optimized maintenance & troubleshooting with the source stored in controller, tag based Integrated Drives and Motion control Standalone operation Scalable architecture Interfaces to many devices

CMSW02ENv1.1.doc 28-Aug-08 Page 5 of 70

About This Hands-On Lab


This Hand-On-Lab will introduce you to the Integrated Architecture Technologies. In this lab you will learn how to use RSLogix5000 programming software to create a user program. You'll write a ladder logic program and see how symbolic tag name addresses makes your program more user friendly. Then you will also download the configuration to a Logix controller and examine a controller tag database. Your system is based on the following devices:
IA Lite Demo Box V3

CompactLogix 1769-L3x

PanelView Plus 600

Point I/O 1734-AENT

PowerFlex40 Stratix 6000 Ethernet Switch With 22-COMM-E

The IA Lite demonstration box is configured for either stand alone IP addressing, or networked IP addressing. Use the table below to locate the IP addresses of your components.

Table A: Component IP Addressing


Component Stand Alone IP Add Subnet 255.255.255.0 PanelView Plus 600 CPU 1769-L3x Point I/O PowerFlex40 drive Stratix 6000 switch 192.168.100.4 192.168.100.5 192.168.100.6 192.168.100.7 192.168.100.50 Networked IP Add Subnet 255.255.0.0 172.16.workstation#. 4 172.16.workstation#. 5 172.16.workstation#. 6 172.16.workstation#. 7 172.16.workstation#. 50

N.B. The IP addresses on the screenshots within this document are shown as an example only. When inputting IP addresses, please refer to the table above for the correct IP address.

Before You Begin


Before you begin this Hands-On Lab, please be sure to close any applications that are currently running. To complete this lab, a general familiarity of computers, programmable controllers, I/O and automation software is recommended but not essential.

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

The IA Lite Demonstration Box contains the following hardware: (1) 1769-L32E / 35E with a 1769-PA2 power supply (1) 1769-IQ16F 16 Point 24VDC input module in slot 1 (1) 1769-OB16P 16 Point 24VDC output module in slot 2 (1) 1769-IF4XOF2 Analog I/O Combination Module in slot 3 (1) 1734-AENT EtherNet/IP adapter for PointI/O (1) 1734-IB8 8 Point 24VDC input module in slot 1 (1) 1734-OB4E 4 Point 24VDC input module in slot 2 (1) 1734-IE2V Voltage Input Analog Module in slot 3 (1) 1734-OE2V Voltage Output Analog Module in slot 4 (1) 1734-VHSC24 Very High Speed Counter in slot 5
CMSW02ENv1.1.doc 28-Aug-08 Page 7 of 70

(1) PanelView Plus 600 (1) 1783-EMS08T Stratix 6000 8 port switch (4) Ethernet Cables (1) PowerFlex40 ac drive with 22-COMM-E EtherNet/IP adapter Computer or laptop equipped with: Windows XP SP2 RSLogix 5000 v17_00 RSLinx Professional v2.54 Factory Talk View Studio v5

Files
There are no starting project files for this lab; you will be creating your own file as you go.

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 (e.g., IO Configuration 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. - Type in the specified field. This is information that you must supply based on your application (e.g., a variable).
The text that appears inside of this gray box is supplemental information regarding the lab materials, but 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. Most often, authors use this Tip Text style for important information they want their students to see.

Note: If the mouse button is not specified in the text, you should click on the left mouse button.

Lab 1: Creating a New Project (30 Minutes)


About This Lab
In this lab, we will introduce you to the Logix product family. In this lab you will:
Create a new project Write ladder logic Use symbolic tag names Use the tag monitor/editor

Launching RSLogix 5000 Programming Software


In this section of the lab, you will launch the RSLogix 5000 software, which will allow you to program a processor.

1. Double-click on the RSLogix 5000 icon RSLogix 5000 software.

on the computer desktop to launch

2. Create a new RSLogix 5000 project by selecting File > New from the toolbar menu.

CMSW02ENv1.1.doc 28-Aug-08 Page 9 of 70

Creating a New Controller Project


In this portion of the lab, you will create a project offline. You will download the project to the CompactLogix controller in the second part of the lab.

3. Make the following changes and select OK. Verify your processor type (on the top of the CompactLogix CPU), and select your processor in the following drop down box. i.e. 1769L32E or L35E.

FYI
New Controller From the New Controller window you are defining the project. Type: This is the type of Logix controller you will use. This could be a ControlLogix, FlexLogix, CompactLogix, DriveLogix, or SoftLogix controller. Only one programming software package is needed for all Logix Controllers. Revision: Here you are selecting the firmware revision that the project will be created with. Revision 16 is currently the newest one. Name: The name of the controller and the project. Chassis Type: Select the size of the chassis you will use. This is not applicable for the rack-less controllers. Slot: The slot number that you wish the controller to be installed in. This is not applicable for all controller types. For example, CompactLogix is fixed at slot zero.

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.

CMSW02ENv1.1.doc 28-Aug-08 Page 11 of 70

Adding Ladder Logic to the Main Routine


In this lab you will add code for a simple motor start/stop seal in circuit. This will show the ease of programming with RSLogix 5000 software. During the labs we will only utilize ladder logic programming, but Logix controllers also can be programmed using Function Block, Sequential Function Charts, and Structured Text. You can select which program language best fits your application. You will continue to use the project already opened. 4. In the Controller Organizer expand the MainProgram folder by clicking on the +.

5. Once expanded, the MainProgram will appear as shown below:

6. Double-click on the MainRoutine icon. This will open the routine editor. An empty rung will be added for you as shown below:

7. From the instruction toolbar, left click and hold on the Examine if Closed (XIC) instruction .

8. Drag the XIC onto rung 0 until the green dot appears as shown above. Release the mouse button at the location you wish to place your instruction. Verify your rung appears like the figure below:

9. From the instruction toolbar left click and hold on the Examine if Open (XIO) instruction .

10. Drag the XIO onto rung 0 to the right of the XIC instruction as shown above. 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.

11. Verify your rung appears like the figure below:

CMSW02ENv1.1.doc 28-Aug-08 Page 13 of 70

FYI If you place an instruction in the wrong location on a rung simply click and hold on the instruction and drag it to the correct location. 12. From the instruction toolbar, left click and hold on the Output Energize (OTE) instruction.

13. Drag the OTE onto rung 0 to the right of the XIO instruction as shown above. 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.

14. Verify your rung appears as shown below:

We will now add a branch around the XIC instruction.

15. Click on the XIC instruction to select it as shown below:

16. From the instruction toolbar click on the Branch instruction A branch will be inserted on the rung.

17. 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 XIC instruction.

18. Place the branch over the green dot and release the mouse button.

CMSW02ENv1.1.doc 28-Aug-08 Page 15 of 70

19. From the instruction toolbar, left click and hold on the XIC

instruction.

20. Drag the XIC onto your newly created branch until the green dot appears. The rung should now appear as shown below.

You have completed adding the rung. 21. Verify that the entire rung appears like the figure below.

22. Save the program by clicking File > Save As on the toolbar and enter the name Controller1.ACD 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 it before you add the next instruction.

CMSW02ENv1.1.doc 28-Aug-08 Page 17 of 70

Creating Tags for the Ladder Code


In this section of the lab you will create the tags needed for the program. In traditional PLCs, a physical memory address identifies each item of data, for example N7:0. In Logix controllers, there is no fixed numeric format. We use tags. You will continue to use the project already opened. FYI What is a tag and why are they better? A tag is a text-based name for an area of memory. By using a text-based system you can use the name of the tag to document your ladder code and organize your data to mirror your machinery. For example you could create a tag named North_Tank_Pressure. This helps to speed code generation and debugging. All tag names are stored in the controller. We will create 3 tags for the program: Motor_Start, Motor_Stop, and Motor_Run.

23. First you will create the tag Motor_Start. Right click on the ? of the first XIC instruction and select New Tag.

24. The New Tag window will appear.

FYI 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.

CMSW02ENv1.1.doc 28-Aug-08 Page 19 of 70

25. Enter the parameters as shown below.

26. Click on OK to accept and create the tag. The rung will now look like the figure below.

Next you will create the tag Motor_Stop.

27. Right click on the ? of the XIO instruction and select New Tag. Again, the New Tag window will appear:

28. Enter the parameters as shown below:

29. Click on OK to accept and create the tag.

30. Verify the rung appears like the figure below:

CMSW02ENv1.1.doc 28-Aug-08 Page 21 of 70

You will now create the tag Motor_Run. 31. Right click on the ? of the OTE instruction and select New Tag. The New Tag window will appear. 32. Enter the parameters as shown below:

33. Click on OK to accept and create the tag.

Your rung should now appear as shown below:

For the XIC instruction in the branch we do not have to create a tag. You will use the tag Motor_Run. 34. Left click and hold the mouse button over the tag Motor_Run on the OTE instruction. 35. Drag the tag Motor_Run tag over to the XIC instruction until a green dot appears next to the ?.. Then release the mouse button.

CMSW02ENv1.1.doc 28-Aug-08 Page 23 of 70

Your rung should now appear as shown below.

Notice the es next to rung zero. These indicate that the rung is in edit mode. 36. 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. Your rung should now appear as shown below:

37. Save the program by clicking on the Save icon

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
In this section of the lab, we will review 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. 38. From the Controller Organizer double-click on Controller Tags.

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.

FYI Monitor/Edit Tags Tabs When the Monitor Tags tab is selected the actual value(s) for the tags will be shown. For example, if you were to view an input button the software would show the button tag actively energized or de-energized. When the Edit Tags tab is selected, NEW tags may be created, and existing tag properties may be modified. If you are having difficulty creating or modifying tag parameters, verify that the Edit Tags tab is selected. You notice first that there are no tags present, but you remember just created 3 tags.

Notice a field in the upper left corner of the Tag Editor window labeled Scope. Earlier in the lab we talked briefly about Controller and Program scoped tags. Currently the selection is Controller1(controller).

When we created the tags earlier we created them in the Program Scope.

CMSW02ENv1.1.doc 28-Aug-08 Page 25 of 70

FYI Data Scoping When you create a tag, you define it either as a controller tag (global data) or a program tag for a specific program (local data).

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 reuse the tag name of a program-scoped tag in multiple programs.

39. Click on the down arrow for the Scope selection box. 40. Select MainProgram.

The Tag Editor now has switched views to the program level and you see the tags you created earlier.

41. Save the program by clicking on the Save icon

on the toolbar.

Congratulations! You have Completed Lab 1. Please move on to Lab 2.

CMSW02ENv1.1.doc 28-Aug-08 Page 27 of 70

Lab 2: Configuring I/O (20 Minutes)


About this Lab
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. You will continue to use the project already opened. For this lab we will add the following I/O modules.

1769-IQ16F: 16 Point 24VDC input module in slot 1 1769-OB16P: 16 Point 24VDC output module in slot 2 1769-IF4XOF2: Analog I/O Combination module in slot 3

Adding CompactLogix I/O


In this section of the lab, you will: Add CompactLogix I/O and Point IO to your application View the I/O tags that were automatically created Learn about tag aliasing

Adding CompactLogix I/O


1. From the Controller Organizer, right click on I/O Configuration and select New Module.

The Select Module window appears as shown below:

2. Scroll through the list Digital until you locate the 1769-IQ16F. 3. Select the 1769-IQ16F module.

4. Click OK. The Module Properties Wizard will appear for the 1769-IQ16F.

CMSW02ENv1.1.doc 28-Aug-08 Page 29 of 70

FYI Module Configuration Wizard Whenever you add an I/O module, to the system you will go through the Module Configuration Wizard. The Wizard allows you to step through the entire configuration needed for a module. You can access this information later by double clicking on a module in the I/O Configuration folder or through the tag monitor/editor. In Logix there are no more dip switches or jumpers needed to configure I/O modules. I/O modules are software configured. This saves time when setting up a system. The configuration for all modules is part of the controllers program and is downloaded to the module from the controller; this allows for ease of replacement if an I/O module fails. 5. Enter the Name and Slot as shown below.

FYI Name Note that the Name can be any unique IEC 1131-3 compliant alpha-numeric name that the user wants. IEC1131-3 basically says that it must begin with an alpha character, can only be a maximum of 40 characters long and cannot contain certain characters like % or #.

6. Click on the Change button and make sure the Electronic Keying information is set to Compatible Module as shown below, and then 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.

CMSW02ENv1.1.doc 28-Aug-08 Page 31 of 70

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.

7. Click on the Connection tab to view the Requested Packet Interval data. FYI Requested Packet Interval (RPI) The Requested Packet Interval (RPI) specifies the period at which data is updated to and from the module. RPIs are configured in milliseconds. The range is .2ms to 750ms for this particular module.

8. Take a quick look to the Connection menu and uncheck the Major Fault on Controller if Connection Fails checkbox. By unchecking this feature we prevent the controller to go in major fault state if the module is disconnected from the chassis.
Major Fault on Controller if Connection Fails checkbox Check this box to configure the controller so that failure of the connection to this module causes a major fault on the controller if the connection for the module fails. Note: This checkbox is automatically checked for all 1769 I/O modules and the CompactBus Virtual Backplane adapter.

9. Click OK to accept.

In the Controller Organizer, the I/O Configuration folder should appear as follows:

10. From the Controller Organizer, right click on I/O Configuration and select New Module.

11. Scroll through the list Digital until you locate the 1769-OB16P. 12. Select the 1769-OB16P module.

13. Click OK.

14. The Module Properties Wizard will appear for the 1769-OB16P. Enter the Name and Slot as shown below.

CMSW02ENv1.1.doc 28-Aug-08 Page 33 of 70

15. Click on the Change button and make sure the Electronic Keying information is set to Compatible Module as shown below, and then click OK.

16. Click on the Connection tab to view the Requested Packet Interval data. 17. Click OK to accept.

18. Add another module in Slot 3. Now take the 1769-IF4XOF2 in the Analog section

19. Go to the Input Configuration tab and enable Input 1. Go to the Output Configuration tab and enable Input 1.

20. Click OK to close this properties window. Your IO configuration should look like this:

CMSW02ENv1.1.doc 28-Aug-08 Page 35 of 70

21. . Save the program by clicking on the Save icon Viewing the I/O Tags Just Created

on the toolbar.

Now that we have configured CompactLogix I/O modules in the project, lets take a look how that information is presented in RSLogix 5000. You will continue to use the project already opened. 22. From the Controller Organizer double click on Controller Tags.

22. The tag editor window will appear.

Drag to the right to increase the size of the Tag Name field. This will allow you to view the entire Tag Name.

FYI: I/O Address Format

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.

23. Switch to Monitor Tags by Clicking on the Monitor Tags Tab.

CMSW02ENv1.1.doc 28-Aug-08 Page 37 of 70

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.

24. Expand and explore the tags for the I/O modules by clicking the +. What you will find under the Configuration tags, for each module, is all the data, you entered and selected from the Module Configuration Wizard. 25. Save the program by clicking on the Save icon on the toolbar.

Assigning Alias Tags


In this section of the lab you will learn about Alias Tags. You will continue to use the project already opened. 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

26. From the Controller Organizer double click on MainRoutine.

The ladder editor appears as shown below:

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 0 of the 1769-IQ16F in Slot 1. Motor_Stop will be Aliased to input point 1 of the 1769-IQ16F in Slot 1. Motor_Run will be Aliased to output point 0 of the 1769-OB16P in Slot 2.

27. Right click on the tag Motor_Start and select Edit Motor_Start Properties.

The Tags Properties window for Motor_Start will appear. Currently the tag is defined as a Base tag.

CMSW02ENv1.1.doc 28-Aug-08 Page 39 of 70

28. Change the Type to Alias and notice that the Tag Properties window changes.

29. Click on the down arrow for Alias For. The tag browser appears.

You need to select your address from controller scoped tags. (Note: this window is resizable). 30. Make sure the Controller button is pressed. The view on the screen will change to view your Controller Scoped Tags

31. Expand Local:1:I and select Local:1:I.Data.

32. Click the down arrow for Local:1:I.Data next to its data type (DINT).

This will open the table of data points for the 1769-IQ16F module.
33. Select 0 from the table as shown below:

When you select 0 from the tag browser the window will close and the Tag Properties dialog will appear as follows:

CMSW02ENv1.1.doc 28-Aug-08 Page 41 of 70

Motor_Start will now be aliased to Local:1:I.Data.0. This is the 1769-IQ16F in Slot 1.

34. 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:1:I.Data.0>. This means that Motor_Start has been Aliased to Local:1:I.Data.0. This means that the tags are equivalent to one another in code. It is easier to read Motor_Start than Local:1:I.Data.0.

35. Using the previous steps, alias the remaining two tags as follows: Motor_Stop = Local:1:I.Data.1 Motor_Run = Local:2:O.Data.0

When you are finished, the ladder code should appear as follows.

36. Save the program by clicking on the Save icon 37. Minimize the RSLogix 5000 software.

on the toolbar.

Congratulations! You have Completed Lab 2. Please move on to Lab 3.

CMSW02ENv1.1.doc 28-Aug-08 Page 43 of 70

Lab 3: Connecting Your Computer to the Controller (5 Minutes)


About This Lab
In this lab, we will introduce you to the online operations that you will complete with the RSLogix5000 software. In this lab, you will: Launch RSLinx communications software Configure your communications driver

Launching RSLinx Software


In this section of the lab, you will launch the RSLinx software, which will enable you to configure the driver you will use to communicate with the Logix processor in the Demo Box.

1. Double click on the RSLinx icon on the Desktop to launch RSLinx software or go to START > All Programs > Rockwell Software > RSLinx > RSLinx. 2. Click the RSWho icon .

The Rockwell Software RSLinx Gateway - [RSWho - 1] screen appears.

FYI RSWho 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.

Adding the AB_ETHIP-1 (Ethernet/IP) Driver


In this section of the lab, you will add the Ethernet/IP driver that you will use to communicate with your Logix processor. 1. From the Communications menu, choose Configure Drivers. The Configure Drivers dialog appears.

CMSW02ENv1.1.doc 28-Aug-08 Page 45 of 70

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.

5. Exit the Configure Driver Dialog by clicking on Close.

Congratulations! You have Completed Lab 3. Please move on to Lab 4.

Lab 4: Loading the Project from the Computer to the Controller (5 Minutes)
In this section of the lab you will download the project. 1. Maximize RSLogix 5000 and your Controller1.ACD project. 2. From the Communications menu, choose Who Active.

The Who Active Screen appears.

3. Expand the view by clicking on the +s until your screen appears as shown below. Use the 1769-L32E / 35E Ethernet port with the IP address as detailed in Table A.

CMSW02ENv1.1.doc 28-Aug-08 Page 47 of 70

4. Click on the CompactLogix Processor, 1769-L32E or 35E controller in slot 00. 5. Click Download. You will be asked to verify the download. 6. When the following prompt appears, 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. At this point you will be online with the controller and the status LEDs will mimic the LEDs on your controller. 8. Check that the I/O LED is solid green. If the LED is solid green proceed to the next lab.

Congratulations! You have Completed Lab 4. Please move on to Lab 5.

Lab 5: Testing Your Logic Program (5 Minutes)


About This Lab
In this lab you will verify the operation of your program. You should be able to start and stop the motor.

FYI I/O Mapping There are push buttons on the Demo Box. The push buttons are mapped as follows:

Motor_Run

Motor_Start

Motor_Stop

CMSW02ENv1.1.doc 28-Aug-08 Page 49 of 70

Putting the Controller into Run Mode and Testing the Program
1. If not already in run mode, from the Controller Faceplate select Run Mode.

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. 2. From the Controller Organizer expand the MainProgram by clicking on the +.

3. Double-click on the MainRoutine to bring up the ladder editor.

Note: To make the following section of the lab clearer, we show screenshots with aliased addresses being hidden. In your program you will actually see the alias addresses you configured earlier in the lab exercise. Leave the aliases unchanged.

You will now see the ladder logic. Notice the green power rails on both sides of the ladder. This indicates you are online and the routine is executing. 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.

4. Press button Motor_Stop button on pushbutton panel. This correlates to the XIO instruction for Motor_Stop. Notice its no longer green. This is because the instruction is no longer evaluated as true.

5. Press button Motor_Start.


The XIC instruction will become true and turn green. Motor_Run will energize (turn green). And the pilot light Motor_Run on your lab station will illuminate.

6. Verify that output Motor_Run stays illuminated when you release pushbutton Motor_Start. The ladder logic you have just written is a simple 3-wire control or motor start/stop seal-in circuit.

CMSW02ENv1.1.doc 28-Aug-08 Page 51 of 70

7. Press pushbutton Motor_Stop and verify that output Motor_Run turns off.

8. Save your program by clicking Save in the toolbar and close RSLogix5000.

Congratulations! You have Completed Lab 5. Please move on to Lab 6.

Lab 6: Adding Logic and Tags Online (10 Minutes)


About This Lab
In this lab you will perform online editing. You will: Add a timer to the logic and its execution will be based on the motor running. Add ladder logic to reset the timer when the motor is stopped. Read analog values from the potentiometer and display them on the numeric display. The execution will be based on the motor running. You will continue to use the project already opened.

Adding a Timer to the Logic


1. Right click in the blue area to the left of rung zero and select Start Pending Rung Edits.

The ladder editor will now look as follows:

CMSW02ENv1.1.doc 28-Aug-08 Page 53 of 70

The rung with the Is on the power rails is the rung you will perform the edits on. 2. Click the OTE instruction so it becomes highlighted.

3. From the Instruction Toolbar click on the Timer/Counter tab.

4. Click on the Timer On (TON) icon

A timer is inserted into the code to the right of the OTE instruction.

In RSLogix 5000 you can string output instructions together. branches.

You do not have to create

5. When the Timer is selected insert the Move (MOV) instruction by clicking the MOV button on the Instruction toolbar.

Your rung appears like this:

6. In the Move instruction double click on the ? behind the Source and then click on the drop down arrow. A drop down list appears:

CMSW02ENv1.1.doc 28-Aug-08 Page 55 of 70

7. Select the Local:3:I.Ch1Data (I for Input) as Source. As destination you do the same but you select Local:3:O.Ch1Data (O for Output). With this instruction we move the value coming from the potentiometer (Local:3:I.Ch1Data) to the output (Local:3:O.Ch1Data) that is displayed on the numeric display.

8. On the timer instruction right click in the blue area next to the word Timer and select New Tag.

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.

10. Verify that the tag has been created in the timer instruction as shown below:

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 TON instruction should now appear as shown below.

CMSW02ENv1.1.doc 28-Aug-08 Page 57 of 70

Your Preset value is now 32767 milliseconds. Leave the accumulated value set to zero. You are now ready to verify the edits you made. 14. Click on the Finalize All Edits icon .

15. When asked to finalize all edits click on YES. 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. 16. Right click on the (End) rung and select Add Rung.

A new rung will appear in the ladder editor.

17. From the Instruction Toolbar, .

click on the RES icon

This will place a Timer-Reset instruction on the rung.


18. From the timer instruction on rung zero, click and hold on the word Timer. 19. Drag the tag name Timer to the RES instruction, a green dot will appear next to the instruction. Release the mouse button.

20. Right click on the XIO (Motor_Stop) instruction on rung zero and select Copy Instruction.

21. Right click to the left of rung 1 and select Paste.

CMSW02ENv1.1.doc 28-Aug-08 Page 59 of 70

22. Double-click on the pasted XIO instruction.

The instruction can now be edited. 23. Type XIC in place of XIO. 24. Press Enter when finished.

The rung should now appear as shown below.

You are now ready to accept the program edits you have made. 25. Click on the Finalize All Edits icon .

26. When the next dialog box appears, click Yes. This allows the software and controller to assemble your edits. The code should now appear as shown below.

27. Test this program : Press the Motor_Start pushbutton. Verify that Motor_Run illuminates (the light on the demo case should be lit), the Timer instruction starts incrementing and when you turn the potentiometer the value on the numeric display will change. The value on the display is the 0-100% range. Now, press the push button Motor_Stop.

Verify that Motor_Run turns off (light goes out), the Timer resets and you can no longer change the value of the numeric display.

In this lab you learned how easy it is to add instructions while you are online with the controller.

Congratulations! You have Completed Lab 6. Please move on to Lab 7.

CMSW02ENv1.1.doc 28-Aug-08 Page 61 of 70

Lab 7: Creating and Running a Trend (5 Minutes)


About This Lab
In this lab you will see the built-in trending capabilities of RSLogix 5000. In this Lab you will: Create a trend to watch the Timer instructions accumulated value. This will be done online with the program from the previous Lab. 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.

Creating and Running a Trend


1. From the Controller Organizer, right click on Trends and select New Trend.

The New Trend window appears.

2. In the Name field enter Timer_Trend.

3. Click Next. The New Trend Add/Configure Tags window appears.

CMSW02ENv1.1.doc 28-Aug-08 Page 63 of 70

4. 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 as shown below:

Now only the tags for the MainProgram are shown.

5. Expand the Timer tag by clicking on the +.

6. Select Timer.ACC and then click the Add button. This will add the tag Timer.ACC to the Tags To Trend list.

7. Click on Finish. The Trend window will now appear.

8. Start the trend by clicking on Run. 9. Start the Timer in the program by pressing the Motor_Start pushbutton on your lab station.

CMSW02ENv1.1.doc 28-Aug-08 Page 65 of 70

10. Verify that you see the Trend begin capturing the data of the Timer.ACC as shown below:

11. Try toggling the Motor_Start pushbutton and watch the trend. 12. When you are finished investigating the trend, click Stop.

Congratulations! You have Completed Lab 7. Please move on to Lab 8.

Lab 8: Using RSLogix 5000 Help (10 Minutes)


About This Lab
In this lab you will investigate the extensive online Help system in RSLogix 5000. In this lab you will be viewing: Instruction help Module wiring diagrams On-line reference materials 3rd party vendor sample projects The Quick Tour Tutorial

Instruction Help
1. From the Help pull down menu select Instruction Help.

The following window will appear.

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.

CMSW02ENv1.1.doc 28-Aug-08 Page 67 of 70

Using Online reference materials


3. From the Help pull down menu select Online Books.

When you install RSLogix 5000 software you have the option to also install the Online reference materials. If these are installed they can be viewed here via RSLogix 5000 help. 4. Download different types of manuals available to you via this tool.

3rd Party Vendor Sample Projects


5. From the Help pull down menu select Vendor Sample Projects. The Adobe Acrobat viewer will open showing several 3rd party modules allowing you to view and reuse sample programs for RSLogix 5000.

6. When finished close Adobe Acrobat.

Quick Start, Learning Center, Resource Center


7. From the Help pull down menu select Quick Start. If you ever require a refresher, the Quick Start is a great way to brush up on the basics of Configuring RSLinx, Creating an RSLogix 5000 project and downloading to a controller.

CONGRATUALTIONS!!! YOU HAVE COMPLETED THE FUNDAMENTALS OF LOGIX LAB!

CMSW02ENv1.1.doc 28-Aug-08 Page 69 of 70

Appendix A Description of Document Changes

HANDS-ON DOCS
Fundamentals of Logix.doc CMSW02ENv1.0.doc CMSW02ENv1.1.doc

DESCRIPTION OF CHANGES
Original document using RSLogix5000 v16 converted to CPR9.

PAGE

Above document with new numbering system New Automation University front cover Picture updated to Stratix 6000 switch. Table A - IP Address table added, to allow lab to be used networked or standalone. Reference to Table A added Lab updated to RSLogix v17. Computer requirements changed. Screenshots changed. Added this Description of Changes table 6 6

8 10 Appendix

Anda mungkin juga menyukai