User Manual SoftLogix 5800 System Catalog Numbers 1789-L10, 1789-L30, 1789-L60
Important User Information Solid-state equipment has operational characteristics differing from those of electromechanical equipment. Safety Guidelines for the Application, Installation and Maintenance of Solid State Controls (publication SGI-1.1 available from your local Rockwell Automation sales office or online at http://www.rockwellautomation.com/literature/) describes some important differences between solid-state equipment and hard-wired electromechanical devices.
Summary of Changes Introduction The release of this document contains new and updated information. To find new and updated information, look for change bars, as shown next to this paragraph. Updated Information The document contains these changes. This table represents major topics. Make sure to look for the change bars throughout this document.
Summary of Changes Notes: 4 Rockwell Automation Publication 1789-UM002J-EN-P - December 2012
Table of Contents Preface Studio 5000 Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Chapter 1 About the SoftLogix 5800 Controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Install the SoftLogix 5800 Controller . . . .
Table of Contents Chapter 3 Communicate with Devices on an Ethernet Network Configure Your System for an Ethernet Network . . . . . . . . . . . . . . . . . . . Step 1: Disable UDP Messages in RSLinx Classic Software . . . . . . . Disabling the UDP option. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enabling the UDP option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 2: Create the Communication Card in the SoftLogix Chassis Monitor . . . . . . .
Table of Contents Connect the ASCII Device to the Controller . . . . . . . . . . . . . . . . . . . 90 User Mode Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 ASCII Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Chapter 5 Configure and Use Simulated I/O Configure Your System for a 1789-SIM Module . . . . . . . . . . . . . . . . . . . . 93 Step 1: Create the 1789-SIM Module in the SoftLogix Chassis Monitor .
Table of Contents Start a Debug Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Set Breakpoints in External Routine Code . . . . . . . . . . . . . . . . . . . . . Data Type Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ARRAY Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . INTEGER Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents DeviceNet I/O Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Determine How Often to Update Data . . . . . . . . . . . . . . . . . . . . . . . Place the Communication Card in Run Mode . . . . . . . . . . . . . . . . . . . . . CommandRegister Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . StatusRegister. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents Appendix D Windows Considerations Observe Windows Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Run a SoftLogix Controller on the Windows Operating System . . . . . Dwell Time Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Periodic Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Preface Use this manual to become familiar with the SoftLogix™ 5800 controller and its features. Studio 5000 Environment The Studio 5000 Engineering and Design Environment combines engineering and design elements into a common environment. The first element in the Studio 5000 environment is the Logix Designer application.
Preface Additional Resources These documents address the Logix5000™ family of controllers and networks. IMPORTANT We recommend that you read the appropriate release notes for software requirements, compatible PCI cards and driver, and system requirements. To locate the release notes for your system, search for 1789-RN in Literature Library. Resource Description Logix5000 Controllers Quick Start, publication 1756-QS001 Explains how to set up a Logix5000 controller.
Chapter 1 SoftLogix 5800 System Catalog Numbers 1789-L10, 1789-L30, 1789-L60 Topic Page About the SoftLogix 5800 Controller 13 Before You Begin 14 Install the SoftLogix 5800 Controller 15 FactoryTalk Activation Manager 15 Configure the RSLinx Virtual-backplane Driver 18 About the SoftLogix 5800 Controller The type of SoftLogix™ 5800 controller you use determines how many slots are available in the virtual chassis and how many devices you can install.
Chapter 1 IMPORTANT SoftLogix 5800 controllers and software do not support Integrated Motion on the EtherNet/IP network. All motion PCI cards are not supported by the Softlogix software, version 20.00.00 and later. PCI-based cards are not supported when using the Microsoft Windows 7 operating system. The 1784-PCIDS card is not supported when using the Microsoft Windows Vista or Windows 2008 Server operating system.
Chapter 1 Install the SoftLogix 5800 Controller IMPORTANT If you have a previous version of the SoftLogix 5800 controller already installed on the computer, use Start>Control Panel>Programs and Features to remove that earlier version before installing the current version. When you insert the installation DVD into your CD ROM drive, the DVD automatically begins the set-up program for the controller.
Chapter 1 Run the FactoryTalk Activation Manager When you install Studio 5000 environment, FactoryTalk Activation Manager is automatically installed on the computer where the activation needs to reside. The FactoryTalk Activation Manager software manages activations for the Rockwell Software products installed on the computer. The FactoryTalk Activation Manager opens automatically when you install a new Rockwell Software product.
Chapter 1 Activation Tools and Rehosting For information on Activation Tools and Rehosting Activations, see the Rockwell Software Activation website at https://activate.rockwellautomation.com. Troubleshoot FactoryTalk Activations There could be several reasons you might have trouble installing your activations: • If you accidentally requested too few concurrent activations for a product, you can download more new activations for the same Host ID.
Chapter 1 Configure the RSLinx Virtual-backplane Driver Use RSLinx software to configure the virtual-backplane driver. You do this only once for the computer. IMPORTANT The RSLinx virtual-backplane driver is required for SoftLogix software to operate. To install the virtual-backplane driver, follow these steps. 1. In RSLinx software, from the Communications menu, choose Configure Drivers. 2. From the Available Driver Type pull-down menu, choose Virtual Backplane Driver. 3. Click Add New. 4.
Chapter 1 The RSLinx software module defaults in Slot 0 if not set up for another slot position. 6. From the Slot Number pull-down menu, choose a slot number. 7. Click OK and then click Close. IMPORTANT Even if you remotely program the controller over a ControlNet or Ethernet link, you must add the virtual-backplane driver via RSLinx software. If you do not, the SoftLogix application will not be restored when you restart the computer.
Chapter 1 Table 1 - Troubleshooting the Controller (continued) Indicator OK Status Description Red flashing Recoverable fault. Red Nonrecoverable fault. Complete the following to correct. 1. Remove the controller from the virtual chassis and then reinstall the controller. 2. Download the project. 3. Place the controller in Run mode. If the problem continues to occur, contact your Rockwell Automation sales representative or local Allen-Bradley distributor. Green (1) 20 The controller is OK.
Chapter 2 What is the SoftLogix System? Topic Page SoftLogix System Components 22 Set Up the Chassis Monitor 24 Configure the SoftLogix Controller 27 Developing Programs 34 How the SoftLogix System Uses Connections 38 Connections for Produced and Consumed Tags 38 Connections for Messages 38 Connections for I/O Modules 40 Total Connection Requirements 40 Restart the Controller 41 Select a System Overhead Percentage 42 This chapter discusses SoftLogix controller options and characte
Chapter 2 What is the SoftLogix System? SoftLogix System Components A SoftLogix system can consist of these components, depending on your needs: • The Chassis Monitor resides in the SoftLogix Virtual Chassis. It is a virtual ‘soft’ chassis as opposed to a physical chassis. It lets you create, delete, monitor, and configure controllers, communication interface cards, and motion cards in your SoftLogix System. • The Studio 5000 environment supports every Logix controller.
What is the SoftLogix System? Chapter 2 SoftLogix System Description The same RSLogix 5000 software supports program development for all Logix controllers. The system can make a connection through a 1784-PCICS card via the ControlNet network, through a 1784-PCIDS card via the DeviceNet network, and through a standard EtherNet port via the EtherNet/IP network. SoftLogix supports two types of motion cards; the 1784-PM02AE analog motion card and the 1784-PM16SE SERCOS motion card.
Chapter 2 What is the SoftLogix System? Set Up the Chassis Monitor The Chassis Monitor is your window into the SoftLogix system that lets you configure and monitor the system components. The Chassis Monitor models a physical chassis, but is virtual, or ‘soft.’ You install virtual devices in the virtual chassis to represent the controller and cards in your system. An example of the SoftLogix Chassis Monitor is shown here.
What is the SoftLogix System? Chapter 2 Table 1 - Chassis Motor Characteristic Characteristic Description Startup mode Specify how the controller should behave when its service is started. Select Remote Program (default) or Last Controller State. Memory size Specify the memory size (KB) to allow for the controller. The maximum limit depends on the controller type. See page 25 for more information.
Chapter 2 What is the SoftLogix System? Specify a Periodic Save Interval The periodic save task executes at a priority of ‘user-mode high’. This means that the control process running within the SoftLogix 5800 controller will not be impacted by a periodic save, but other user applications will be impacted if they run at a priority lower than ‘user-mode high’. Most HMI applications run at a ‘user-mode normal’ priority.
What is the SoftLogix System? Configure the SoftLogix Controller Chapter 2 You must first create and configure your SoftLogix controller, that is, catalog number 1789-L10, 1789-L30, or 1789-L60, in the virtual chassis monitor. Step 1: Create and Configure the Controller in the SoftLogix Chassis Monitor When you install a controller, the Chassis Monitor lets you configure specific characteristics about the controller. To configure the controller in the Chassis Monitor, follow these steps. 1.
Chapter 2 What is the SoftLogix System? For this example, we will enter slot 1 for the 1789-L60 SoftLogix controller. 3. Click OK. The General dialog box appears. 4. In the General dialog box, enter Startup Mode, Memory Size and Periodic Save Interval values. 5. Click Next. The NT System dialog box appears. 6. In the NT System dialog box, enter Continuous Task Dwell Time, CPU Affinity, and Channel Serial Port values. 7. Click Finish.
What is the SoftLogix System? Chapter 2 This SoftLogix Chassis Monitor now shows our new controller in slot 1. Change the RSLinx Software Slot The RSLinx software module automatically defaults to Slot 0 in the chassis. But you can program the virtual backplane to use the RSLinx module in another slot before starting up the SoftLogix application. This flexibility allows a SoftLogix module to be used in Slot 0 if so desired. Complete these steps to set up RSLinx software, version 2.59.
Chapter 2 What is the SoftLogix System? 3. Click Add New and click OK. 4. Select AB-VBP-1 RSLinx Classic Driver from the list and click Configure. The driver must be running if SoftLogix is used. If the driver is deleted while SoftLogix is running after choosing a slot other than zero for the RSLinx module, RSLinx chooses the next available slot in the chassis monitor. 5. From the Slot Number pull-down menu, choose the slot for the RSLinx module. 6. Click OK and then click Close.
What is the SoftLogix System? Chapter 2 Step 2: Create the New Controller Project in RSLogix 5000 Software 1. In RSLogix 5000 software, from the File menu, choose New. The New Controller dialog box appears. 2. In the New Controller dialog box, from the Type pull-down menu, choose your SoftLogix controller. 3. Enter the controller Name, Chassis Type, and Slot Number to create the new controller project. The example above shows the 1789-L60 controller in slot 1. For RSLogix 5000 software version 20.00.
Chapter 2 What is the SoftLogix System? You now see the new controller in the Controller Organizer’s I/O Configuration section of RSLogix 5000 software. RSLogix 5000 Controller Organizer Step 3: Configure the Controller in the RSLogix 5000 Project 1. To configure the controller, in the Controller Organizer, from the I/O Configuration folder, right-click the new controller you just created and choose Properties.
What is the SoftLogix System? Chapter 2 The Controller Properties dialog box appears. 2. In the Controller Properties dialog box, set controller configuration information for the open project, and when online—for the attached controller. The tabs that appear are particular to the type of controller you have selected. 3. Click OK when you are done configuring each tab for your controller.
Chapter 2 What is the SoftLogix System? The controller’s execution model is a preemptive, multitasking system that is IEC 1131-3 compliant.
What is the SoftLogix System? Chapter 2 Setting Task Priorities Each task in the controller has a priority level. The controller uses the priority level to determine which task to execute when multiple tasks are triggered. There are 3 configurable priority levels for periodic tasks that range from 1…3, with 1 being the highest priority and 3 being the lowest priority. A higher priority task will interrupt any lower priority task.
Chapter 2 What is the SoftLogix System? Table 2 - Task Execution Order for Application with Periodic Tasks and Continuous Task Task Priority Level Task Type Actual Execution Time Worst Case Execution Time 1 1 20 ms periodic task 2 ms 2 ms 2 2 10 ms periodic task 4 ms 6 ms N/A None (lowest) Continuous task 25 ms 35 ms N/A None Dwell time 10 ms 14 ms Task 1 Task 2 Continuous Task Dwell Time Task Description A The highest priority task interrupts all lower priority tasks.
What is the SoftLogix System? Chapter 2 Supporting Routines A routine is a set of logic instructions in a single programming language, such as ladder logic. Routines provide the executable code for the project in a controller. A routine is similar to a program file or subroutine in a PLC or SLC™ processor. Each program has a main routine. This is the first routine to execute when the controller triggers the associated task and calls the associated program.
Chapter 2 What is the SoftLogix System? How the SoftLogix System Uses Connections The SoftLogix system uses a connection to establish a communication link between two devices.
What is the SoftLogix System? Chapter 2 connection when the message is done transmitting. This table shows which messages use a connection and whether you can cache the connection. Message Type Communication Method CIP data table read or write CIP PLC-2®, PLC-3®, PLC-5®, or SLC (all types) CIP Connection CIP with source ID CIP generic DH+™ N/A Connected messages are unscheduled connections on both ControlNet and EtherNet/IP networks.
Chapter 2 What is the SoftLogix System? Connections for I/O Modules The SoftLogix system uses connections to transmit I/O data. These connections can either be direct connections or rack-optimized connections. Connection Description Direct A direct connection is a real-time, data transfer link between the controller and an I/O module. The controller maintains and monitors the connection between the controller and the I/O module.
What is the SoftLogix System? Restart the Controller Chapter 2 You restart the controller by either of these methods: • Restarting the computer • Removing and reinserting the controller in the virtual chassis After restarting the controller, you must upload or download from RSLogix 5000 software before you can go online with the controller. This is because the RSLogix 5000 project file (.ACD) contains explicit knowledge of the physical memory addresses used by the controller.
Chapter 2 What is the SoftLogix System? Select a System Overhead Percentage The Controller Properties dialog box lets you specify a percentage of controller time (excluding the time for periodic tasks) that is devoted to communication and background functions. 1. In the RSLogix 5000 software, from the Controller Organizer, right-click the controller and choose Properties. 2. Click the Advanced tab. 3. In the System Overhead Time Slice box, enter a percentage.
Chapter 3 Communicate with Devices on an Ethernet Network Topic Page Configure Your System for an Ethernet Network 43 Multiple EtherNet/IP Modules 54 Controller Connections over the EtherNet/IP Network 55 Distributed Ethernet I/O 56 Add a Remote Controller 60 Check EtherNet/IP Statistics 63 Example 1: Workstation Remotely Connected to a SoftLogix Controller 65 Example 2: Send Messages over the EtherNet/IP Network 68 Example 3: Send Messages over the EtherNet/IP Network to a PLC-5 Proces
Chapter 3 Communicate with Devices on an Ethernet Network Step 1: Disable UDP Messages in RSLinx Classic Software To send messages, or control I/O, you must change the RSLinx Classic configuration so that it does not accept UDP messages.(1) 1. Launch RSLinx software on the computer with the controller. 2. From the View menu and choose Options. The Options dialog box appears. 3. On the General tab, clear ‘Accept UDP Messages on the Ethernet Port’. 4. Click OK. 5. Restart your computer.
Communicate with Devices on an Ethernet Network Chapter 3 Disabling the UDP option Disabling the UDP option lets RSLinx software and the SoftLogix 5800 EtherNet/IP functionality coexist on the same personal computer. Disabling the UDP option also disables RSLinx software’s Gateway functionality. RSLinx software still functions, but the Gateway options are removed while RSLinx software continues to display that it has a full Gateway activation.
Chapter 3 Communicate with Devices on an Ethernet Network If UDP is disabled on a local computer, you can browse the ControlNet and EtherNet/IP networks and serial devices to see configured devices, as long as the appropriate module is installed in the virtual chassis on the local computer. To be able to browse DeviceNet networks, RSLinx Gateway functionality (and therefore UDP) must be enabled on the computer that hosts the DeviceNet communication card.
Communicate with Devices on an Ethernet Network Chapter 3 If you want the UDP option enabled, you should also enable the Gateway functionality within RSLinx Gateway software. You must have RSLinx Gateway software to enable Gateway functionality. Follow these steps. 1. Launch RSLinx software on the computer with the controller. 2. From the Communications menu, choose Configure Gateway. The Configure RSLinx Gateway dialog box appears. 3. Check Enable RSLinx Gateway. 4. Click OK.
Chapter 3 Communicate with Devices on an Ethernet Network Step 2: Create the Communication Card in the SoftLogix Chassis Monitor Add the EtherNet/IP module to the SoftLogix virtual chassis if you are controlling I/O or sending messages over Ethernet network. These instructions show a a SoftLogix controller installed already in slot 4. Follow these steps to add an EtherNet/IP module to your chassis. 1. In the SoftLogix Chassis Monitor, from the Slot menu, choose Create Module.
Communicate with Devices on an Ethernet Network Chapter 3 The Select Device dialog box appears. 10.88.94.12 255.255.252.0 10.88.92.1 00:13:20:03:C1:1E 5. Select the serial number of the port you want. If you previously had an Ethernet port configured in this slot, the chassis monitor remembers the configuration of that previous port. 6. Click Next. The Module Properties General dialog box appears. 7. Specify a label name for the EtherNet/IP I/O Module Marquee.
Chapter 3 Communicate with Devices on an Ethernet Network This chassis monitor shows the selected IP address as a virtual module in the SoftLogix chassis. This chassis monitor has an EtherNet/IP module installed in slot 3. Step 3: Configure the Communication Card as Part of the Project If you want to control I/O over an EtherNet/IP network, use RSLogix 5000 software to add the SoftLogix 5800 EtherNet/IP module to your project. You should already have added the SoftLogix controller to the project.
Communicate with Devices on an Ethernet Network Chapter 3 The Select Module dialog box appears. 2. Expand the Communications list and choose the 1756-EWEB/A module. 3. Click OK. The Select Major Revision dialog box appears. 4. From the Major Revision pull-down menu, choose the revision number and click OK.
Chapter 3 Communicate with Devices on an Ethernet Network The Module Properties dialog box appears. 5. Name the module, enter the IP address, and select the Disable Keying option. 6. Click OK. The Module Properties dialog box appears.
Communicate with Devices on an Ethernet Network Chapter 3 Step 4: Configure the SoftLogix EtherNet/IP Module to Communicate on an Ethernet Network Configuring a SoftLogix 5800 EtherNet/IP module is similar to configuring a 1756-ENBT module in a ControlLogix project, except for these differences: • If the SoftLogix 5800 EtherNet/IP module is in the same virtual chassis as the SoftLogix controller, you do not have to enter an IP address. The configuration defaults to the IP address of the computer.
Chapter 3 Communicate with Devices on an Ethernet Network Multiple EtherNet/IP Modules If the computer has multiple IP addresses available, you can install multiple Ethernet modules in the virtual chassis. Choose the appropriate IP address when you configure the EtherNet/IP module in the virtual chassis. The configuration you choose for the UDP option in RSLinx software applies to every IP address on the same computer.
Communicate with Devices on an Ethernet Network Chapter 3 Possible solutions include the following. Solution Description Multi-homed Windows 2003 member server on active directory or mixed domain Connect both Ethernet modules to domain controllers so that they both receive correct routing information. Multi-homed personal computer not connected to a domain and set up in a work group.
Chapter 3 Communicate with Devices on an Ethernet Network Supported Functionality of the SoftLogix 5800 EtherNet/IP Module Compared to a 1756-ENBT EtherNet/IP module in a ControlLogix system, the SoftLogix 5800 EtherNet/IP module does the following: • Supports the same number of I/O connections • Supports the same number of messaging connections • Supports the same bridging functionality • Supports an EtherNet/IP statistics utility (see page 63) • Does not support a web-based interface • Does not support
Communicate with Devices on an Ethernet Network Chapter 3 You build the I/O configuration in this order. 1. Add (see page 50) the remote adapter to the SoftLogix 5800 EtherNet/IP module of the controller (1794-AENT/A remote_flex_adapter). Module Adapter 2. Add (see page 50) the I/O modules to the remote adapter (1794-IA16/A remote_flex_input, 1794-CB16/A remote_flex_output, 1794IF2XOF2I/A remote_flex_combo).
Chapter 3 Communicate with Devices on an Ethernet Network Ethernet I/O Data I/O information is presented as a structure of multiple fields, which depend on the specific features of the I/O module. The name of the structure is based on the location of the I/O module in the system. Each I/O tag is automatically created when you configure the I/O module through the programming software. Each tag name follows this format: Location:SlotNumber:Type.MemberName.SubMemberName.
Communicate with Devices on an Ethernet Network Chapter 3 See this example. EXAMPLE Device Example Tag Names (automatically created by the software) remote adapter ‘remote_flex_adapter’ remote_flex_adapter:I remote_flex_adapter:I.SlotStatusBits remote_flex_adapter:I.Data remote_flex_adapter:O remote_flex_adapter:O.Data ‘remote_flex_input’ in slot 0 rack-optimized connection remote_flex_adapter:0:C remote_flex_adapter:0:C.Config remote_flex_adapter:0:C.DelayTime_0 remote_flex_adapter:0:C.
Chapter 3 Communicate with Devices on an Ethernet Network Add a Remote Controller If you want this controller to consume tags from another controller via Ethernet, add the controller to the EtherNet/IP module. The consumer initiates any actions. To add a remote controller, build the I/O configuration in this order. 1. Add the devices to the EtherNet/IP port of the controller. 2. For a controller that requires a communication module, add the module first, and then add the controller.
Communicate with Devices on an Ethernet Network Chapter 3 Add a Consumed Tag A consumed tag’s value comes from a remote controller. The local controller is the consumer, and the remote controller is the producer. Consumed tags are always at controller scope. Complete these steps to add a consumed tag. 1. On the Controller folder in the Controller Organizer, right-click Controller Tags and choose New tag. The New Tag dialog box appears.
Chapter 3 Communicate with Devices on an Ethernet Network 2. Enter tag configuration information. Parameter Description Name Enter the name of the tag. Description Enter a tag description. Type Consumed. Data Type Enter the type of tag you want to create. Scope Consumed tags are always controller scope. External Access Select whether the tag has Read/Write, Read Only, or no access (None) from external applications such as HMIs.
Communicate with Devices on an Ethernet Network Chapter 3 To view the tag, from the Controller, double click the Controller Tags folder in the Controller Organizer. Check EtherNet/IP Statistics The SoftLogix controller installs with an EtherNet/IP statistics utility that displays different counters for the EtherNet/IP module. Complete these steps to display the statistics. 1. Choose the EtherNet/IP Statistics Utility from the folder where you installed the SoftLogix controller.
Chapter 3 Communicate with Devices on an Ethernet Network The SoftLogix 5800 EtherNet/IP Module Statistics dialog box appears. 2. Use the character key at the top of the utility screen to display information and change screen characteristics.
Communicate with Devices on an Ethernet Network Example 1: Workstation Remotely Connected to a SoftLogix Controller Chapter 3 In this example, a workstation remotely connects to a SoftLogix controller over an Ethernet network to remotely program the SoftLogix controller.
Chapter 3 Communicate with Devices on an Ethernet Network Browsing from a computer to a remote SoftLogix controller looks like this example.
Communicate with Devices on an Ethernet Network Chapter 3 Browsing from the EtherNet/IP module in a SoftLogix controller to remote devices looks like this example. The computer cannot be an RSLinx gateway. The UDP option in RSLinx software must be disabled.
Chapter 3 Communicate with Devices on an Ethernet Network Example 2: Send Messages over the EtherNet/IP Network In the following example, the SoftLogix controller can send messages to the other devices on the EtherNet/IP network.
Communicate with Devices on an Ethernet Network Chapter 3 Configure a MSG Instruction How you configure the MSG instruction depends on the target device. 1. Click MSG to launch the Message Configuration dialog box. 2. On the Configuration tab, configure the following.
Chapter 3 Communicate with Devices on an Ethernet Network On the Communication tab, specify the communication path. A communication path requires pairs of numbers. The first number in the pair identifies the port from which the message exits. The second number in the pair designates the node address of the next device. 70 For this item Specify Communication Path (Each SoftLogix controller resides in its own computer) 1,2,130.151.255.
Communicate with Devices on an Ethernet Network Example 3: Send Messages over the EtherNet/IP Network to a PLC-5 Processor Chapter 3 In this example, the SoftLogix controller sends a message through the 1756-ENBT, out the 1756-DHRIO, and to a PLC-5 processor at DH+ node 2.
Chapter 3 Communicate with Devices on an Ethernet Network Specify the path and communication method. The example path is 1, 6, 2, 10.88.55.186, 1, 2. This value Specifies 1 The SoftLogix virtual chassis 6 The sending device (the Ethernet port in the controller’s computer) is in slot 6 of the virtual chassis 2 Sending the message out the Ethernet communication port 10.88.55.
Communicate with Devices on an Ethernet Network Example 4: Control Distributed I/O Chapter 3 In this example, one SoftLogix controller controls distributed I/O through a 1794-AENTmodule. 2 1 3 Item Description 1 EtherNet/IP network 2 SoftLogix controller (Soft1) 3 1794-AENT with distributed I/O (remote_flex_adapter) This example has Soft1 controlling the I/O connected to the remote 1794-AENT module.
Chapter 3 Communicate with Devices on an Ethernet Network In RSLogix 5000 software, the controller project and associated tags looks like this example. Throughput is based on the performance of the personal computer running the SoftLogix controller.
Chapter 4 Communicate with Serial Devices Topic Page Configure Your System for a Serial Device 75 Controller Status Indicators 85 Example 1: Workstation Directly Connected to a SoftLogix Controller 85 Example 2: Workstation Remotely Connected to a SoftLogix Controller 86 Example 3: SoftLogix Controller to a Bar Code Reader 90 This chapter explains how to use a serial device with your SoftLogix system. Details on configuring your system for a serial device and examples are included.
Chapter 4 Communicate with Serial Devices Step 1: Configure the Serial Port Use the SoftLogix Chassis Monitor to choose which COM port to use for serial communication. The controller supports only one COM port for DF1 communication. Follow these steps to configure serial communication. 1. In the SoftLogix Chassis Monitor, from the Slot menu, choose Create Module. Or right-click the appropriate slot and choose Create. The Select Module dialog box appears. 2.
Communicate with Serial Devices Chapter 4 The General dialog box appears. 5. Specify the settings for the controller. 6. Click Next. The NT System dialog box appears. 7. Choose the COM port. 8. Click Finish.
Chapter 4 Communicate with Serial Devices Your SoftLogix Chassis Monitor now looks like this example. Change the COM Port Setting Once you choose a COM port for the controller, you can only change the setting by removing the controller from the chassis and reinstalling the controller. Follow these steps to change the COM port. 1. In the SoftLogix Chassis Monitor, from the Slot menu, choose Remove Module. The Remove Module dialog box appears. 2. Verify the slot number and click OK.
Communicate with Serial Devices Chapter 4 The Remove Module verification dialog box appears. Do not clear the SoftLogix Chassis Monitor module configuration unless you want to enter all new information. 3. Click OK. The SoftLogix Chassis Monitor now appears with slot 1 empty.
Chapter 4 Communicate with Serial Devices 4. In the same slot, re-add the controller. COM port. The SoftLogix Chassis Monitor prompts whether to use the previous configuration. 5. Click Next.
Communicate with Serial Devices Chapter 4 Your SoftLogix Chassis Monitor looks like this example. Step 2: Configure the Serial Port of the Controller in the Project Complete these steps to configure the controller in your project. 1. Open a project in the Logix Designer application and add the controller to the I/O Configuration folder. Refer to Step 3: Configure the Controller in the RSLogix 5000 Project on page 32. 2. From the Edit menu, choose Controller Properties.
Chapter 4 Communicate with Serial Devices The Controller Properties dialog box appears. 3. On the Serial Port tab, specify the appropriate serial port settings.
Communicate with Serial Devices Chapter 4 Specify Serial Port Characteristics Specify these characteristics on the Serial Port tab. Characteristic Description Mode Choose System (for DF1 communication) or User mode (for ASCII communication). Baud Rate Specifies the communication rate for the serial port. Choose a baud rate that all devices in your system support. Select 110, 300 600, 1200, 2400, 4800, 9600, or 19200 KBps. Data Bits Specifies the number of bits per message packet. Choose 8.
Chapter 4 Communicate with Serial Devices 4. Click the System Protocol tab and specify the appropriate settings. Specify System Protocol Characteristics These are the available system modes and their characteristics. Table 4 - System Protocol Tab Descriptions Field Mode Protocol DF1 Master - control of polling and message transmission between the master and slave nodes.The master/slave network includes one controller configured as the master node and as many as 254 slave nodes.
Communicate with Serial Devices Chapter 4 Table 4 - System Protocol Tab Descriptions Field Mode Station Address The station address for the serial port on the DF1 point-to-point network. Enter a valid DF1 address (0…254). Address 255 is reserved for broadcast messages. The default is 0. Enable Store and Forward Enable Store Forward box should only be checked if the controller that you are downloading the project to is connected to the Master radio modem.
Chapter 4 Communicate with Serial Devices IMPORTANT The workstation with the Logix Designer application must also have the Logix5550® serial port driver installed through RSLinx software. DF1 Point-to-Point Configuration Field Description Station Address The station address for the serial port on the DF1 point-to-point network. Enter a valid DF1 address (0…254). Address 255 is reserved for broadcast messages. The default is 0.
Communicate with Serial Devices Item Description 1 Workstation with Logix Designer application and Logix5550 serial port driver 2 Modem 3 Modem 4 SoftLogix controller Chapter 4 If you use a modem to remotely connect the controller to one workstation, use the Logix Designer application to configure the serial port of the controller for the DF1 Point-to-Point (full-duplex) protocol, as in the previous example.
Chapter 4 Communicate with Serial Devices DF1 Slave Configuration Field Description Station Address The station address for the serial port on the DF1 slave. Enter a valid DF1 address (0…254). Address 255 is reserved for broadcast messages. The default is 0. Transmit Retries The number of times the remote station retries a message after the first attempt before the station declares the message undeliverable. Enter a value 0…127. The default is 3.
Communicate with Serial Devices Chapter 4 Table 5 - Master Station Configuration Field Description Normal Poll Group Size Standard Polling modes only The number of stations the master station polls after polling all the stations in the priority poll array. Enter 0 (default) to poll the entire array. Priority Poll Node Tag Standard Polling modes only An integer tag array that contains the station addresses of the slave stations you need to poll more frequently.
Chapter 4 Communicate with Serial Devices Example 3: SoftLogix Controller to a Bar Code Reader In the following example, the SoftLogix controller connects to a bar code reader. A bar code reader is an ASCII device, so you configure the serial port differently than in the previous examples. Configure the serial port for user mode, rather than a DF1 mode.
Communicate with Serial Devices Chapter 4 2. Connect the sending pins to the corresponding receiving pins and attach jumpers.
Chapter 4 Communicate with Serial Devices The Controller Properties dialog box appears 2. Click the User Protocol tab. Table 6 - Default Serial Port Configuration Settings Field Description Read/Write Buffer Size Specify the maximum size (in bytes) of the data array you plan to send and receive. The default is 82 bytes. Termination Character 1 & 2 In the Termination Character 1 and Termination Character 2 fields, enter the character you wish to use to designate the end of a line.
Chapter 5 Configure and Use Simulated I/O Topic Page Configure Your System for a 1789-SIM Module 93 Map I/O Data to the 1789-SIM Module 100 Toggle Inputs and Monitor Outputs 101 Example: Move Application Data into the 1789-SIM Tags 103 This chapter explains how to use SIM modules with a SoftLogix controller. The 1789-SIM module is a software-only module that comes with the SoftLogix controller; no hardware is required.
Chapter 5 Configure and Use Simulated I/O Step 1: Create the 1789-SIM Module in the SoftLogix Chassis Monitor Before you can operate the module, you must create the 1789-SIM module as part of the SoftLogix Chassis Monitor. You can install as many 1789-SIM modules as allowed by your activation level of the controller. Complete these steps to install the SIM module. 1. From the Slot menu in the SoftLogix Chassis Monitor, choose Create Module. The Select Module dialog box appears. 2.
Configure and Use Simulated I/O Chapter 5 The Select Device dialog box appears. 5. Verify the slot number and click Next. The General dialog box appears. 6. Enter the label name for the 1789-SIM module. The text you enter for the module scrolls across the Marquee on the front of the module in the chassis monitor. If you do not enter a label name, the default label of ‘Simulator Module’ appears. For RSLogix 5000 software, version 20.00.00 and the Logix Designer application, version 21.00.
Chapter 5 Configure and Use Simulated I/O The chassis monitor shows the 1789-SIM module as a virtual module in the SoftLogix Chassis Monitor. Note that the door of the 1789-SIM module opens to display the output bits. Left-click to open or close the module door. The module door is open. 96 The module door is closed.
Configure and Use Simulated I/O Chapter 5 Step 2: Configure the 1789-SIM module as Part of the Project Use the software to map the 1789-SIM module as part of the SoftLogix project. 1. In the project, right-click I/O Configuration folder, and choose New Module. The Select Module dialog box appears. 2. Select the Generic 1789 Module and click OK. The New Module dialog box appears.
Chapter 5 Configure and Use Simulated I/O 3. Enter the module parameters. Field Description Type Read and Write - This connection lets the computer read inputs and write outputs. Listen Only - This connection lets the controller read inputs, but not write outputs. The Output Assembly Instance is the only field that is different from the Read and Write connection parameters. Name Enter the name of the module. The name must be IEC 1131-3 compliant.
Configure and Use Simulated I/O Chapter 5 5. Specify the connection parameter; use this tab to define controller-to-module behavior. Field Description Requested Packet Interval (RPI) Enter the requested rate of packet arrival (connection update rate). The connection is scheduled to move data to or from the module at least this often. The minimum and maximum RPI values are shown parenthetically to the right of the box/spin control. The RPI is determined by the Owner Controller of a module.
Chapter 5 Configure and Use Simulated I/O Map I/O Data to the 1789-SIM Module When you add a 1789-SIM module to a project, the software automatically assigns input and output data structures for the module. For example, this I/O configuration generates these I/O data structures. View Description I/O Configuration The SIM module is in slot 9. Controller Tags The programming software assigns these controller-scoped tags to the 1789-SIM module in slot 9.
Configure and Use Simulated I/O Toggle Inputs and Monitor Outputs Chapter 5 Once the 1789-SIM module is installed in the SoftLogix Chassis Monitor, you can monitor the module. Follow these steps. 1. In the SoftLogix Chassis Monitor, right-click SIM module and choose Properties. The Module Properties dialog box appears. 2. Click the I/O tab. 3. Click a specific input bit to toggle it on or off. This tab also shows the state of the output bits.
Chapter 5 Configure and Use Simulated I/O Turn On or Force a Bit You can use the second address of input I/O tags to turn on, or force an I/O bit, in the SIM module. Notice that there is one output value tag address available in the tag database, but two input value tag addresses that can be used. Always use the second input bit value address to force or turn on a bit (Local:9:I.Data[1]). 1 2 3 4 Item Description 1 Tag database is the location where tag data is stored for the project. 2 +Local:9:I.
Configure and Use Simulated I/O Example: Move Application Data into the 1789-SIM Tags Chapter 5 This example uses MOV instructions to copy: • Input data from the 1789-SIM module into the application’s input tags • Application’s output tags into the output data for the 1789-SIM module Rockwell Automation Publication 1789-UM002J-EN-P - December 2012 103
Chapter 5 Configure and Use Simulated I/O Notes: 104 Rockwell Automation Publication 1789-UM002J-EN-P - December 2012
Chapter 6 Execute External Routines Topic Page Configure Your System to Execute an External Routine 105 Add an External Routine to the Controller Organizer 106 Call an External Routine 112 Type Checking 114 This chapter explains how to add external routines to your project. External routines are programs or functions developed outside of the Logix Designer application environment by using commonly available programming languages, such as C or C++.
Chapter 6 Execute External Routines Add an External Routine to the Controller Organizer You add an external routine to the Controller Organizer the same way you create a new ladder routine. Follow these steps. 1. In the software, right-click Main Program folder in the Controller Organizer and choose New Routine.
Execute External Routines Chapter 6 The New Routine dialog box appears. 2. Name the new routine. In this example, we named it ‘math_test.’ 3. From the Type pull-down menu, choose External Routine. 4. Click OK. The new routine now appears in the Controller Organizer under the Main Program.
Chapter 6 Execute External Routines 5. Right-click new routine and choose Open. Use the quick view pane of the Controller Organizer to verify that you specified the external routine DLL and function that you wanted.
Execute External Routines Chapter 6 The Routine Properties dialog box appears. 6. On the General tab, verify that the information for the external routine is correct and that it appears this way in the Controller Organizer. 7. On the Configuration tab, click Browse to select the DLL file that contains the function you want to execute. 8. On the Configuration tab, click Function and choose the DLL you want to execute.
Chapter 6 Execute External Routines 9. Click OK.
Execute External Routines Chapter 6 How the Project Stores and Downloads an External Routine To use an external routine, you must associate (also known as ‘map’) a DLL file to an external routine that you create in the Controller Organizer of a project (see Add an External Routine to the Controller Organizer). You choose the DLL file that contains the function you want to execute.
Chapter 6 Execute External Routines Call an External Routine Use the Jump to External Routine ( JXR) instruction to call the external routine from a ladder routine in your project. The JXR instruction supports multiple parameters so you can pass values between the ladder routine and the external routine. Jump to External Routine (JXR) The JXR instruction executes an external routine. This instruction is supported only by the SoftLogix5800 controllers. Operands Table 7 - Relay Ladder .
Execute External Routines Chapter 6 Table 8 - EXT_ROUTINE_CONTROL Structure Mnemonic Data Type Description Implementation ErrorCode SINT If an error occurs, this value identifies the error. Valid values are from 0…255. There are no predefined error codes. The developer of the external routine must provide the error codes. NumParams SINT This value indicates the number of parameters associated with this instruction. Display only - this information is derived from the instruction entry.
Chapter 6 Execute External Routines Fault Conditions This table describes major fault conditions. A major fault occurs if Fault type • An exception occurs in the external routine DLL. • The DLL could not be loaded. • The entry point was not found in the DLL. 4 Fault code 88 Execution The JXR can be synchronous or asynchronous depending on the implementation of the DLL. The code in the DLL also determines how to respond to scan status, rung-condition-in status, and rung-condition-out status.
Chapter 7 Develop External Routines Topic Page Considerations For External Routines 115 How the SoftLogix Controller Executes External Routines 116 Create Synchronous, Single-threaded External Routines 117 Project Files 118 Create an HTML Resource 123 Add Version Information to an External Routine DLL 128 Build and Download External Routines 130 Update an Existing External Routine 130 Create Multi-threaded External Routines 130 Debug External Routines 136 Data Type Support 138 Exp
Chapter 7 Develop External Routines IMPORTANT If proper procedures are not followed, it is possible that the controller may respond in an unpredictable manner. Due to the requirements of this feature it is not possible for Rockwell Automation to safeguard and protect from certain scenarios that may interfere with the operation of the controller and result in unpredictable behavior. Carefully read and follow the recommendations in this chapter.
Develop External Routines Chapter 7 How the Project Stores and Downloads an External Routine To use an external routine, you must associate (also known as ‘map’) a DLL file to an external routine that you create in the Controller Organizer of a project (as shown in Chapter 6). You choose the DLL file that contains the function you want to execute.
Chapter 7 Develop External Routines 2. From the File menu, choose New and name the project. For this example, our Project name is InlineExample. 3. From the Visual C++ folder, choose Win32, and choose the Win32 Console Application template. The Win32 Application Wizard launches. 4. Click the DLL Application type. 5. Click Finish. The software displays the type of files it will generate for the project. Project Files 118 Add external routine code to the project files.
Develop External Routines Chapter 7 RA_ExternalRoutines.h #ifndef __RA_EXTROUTINE_H__ #define __RA_EXTROUTINE_H__ #define MAX_PARAMS /* 10 MSC assumes LSB first, 32 bit integers */ #pragma pack(push,1) struct RoutineControlWord // 4 bytes (32 bit word) total { unsigned ErrorCode : 8; // Error code if ER bit is set.
Chapter 7 Develop External Routines The control structure for an external routine contains control, status, and meta information for that routine. The control structure is accurate at the time of its invocation and it enables the external routine to validate and influence its operation. Upon routine completion, the control structure contains status about the routine’s execution as to its degree of success or failure. Other data areas are either reserved or defined by you.
Develop External Routines Chapter 7 InlineExample.cpp // InlineExample.cpp : Defines the entry point for the DLL application. #include "stdafx.h" //Include file for External Routine interface #include "RA_ExternalRoutines.h" BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } // This is an example of an exported function.
Chapter 7 Develop External Routines // Set Error bit to zero if successful. pERCtrl->ctrlWord.ER = 0; } else { // Some error // Set Error bit to indicate error occurred pERCtrl->ctrlWord.ER = 1; pERCtrl->ctrlWord.ErrorCode = 1; // Set ErrorCode } // Set Done bit before exit of this XR. pERCtrl->ctrlWord.DN = 1; } else { // Rung not enabled pERCtrl->ctrlWord.DN = 0; } return itemp; // returns 0.0 if error } InlineExample.
Develop External Routines Create an HTML Resource Chapter 7 The HTML resource does the following: • Describes the external routines that are contained in the DLL • Provides descriptions that the Logix Designer application uses • Provides type checking in the JXR instruction • Gets the name of the routine to be used in the GetProcAddress call The information stored in the HTML resource is in XML. Use an HTML resource because Visual Studio does not support an XML resource.
Chapter 7 Develop External Routines The Resource View dialog box appears. 2. In the InlineExample, right-click Add and choose Resource. The Add Resource dialog box appears. 3. Choose HTML as the resource type and click New.
Develop External Routines Chapter 7 4. Open the new resource. Choose the IDR_HTML1 file from the HTML folder. 5. Choose the Client Objects & Events. The HTML code for the project example appears. 6. Edit the HTML file and put in the XML descriptions of the external routines.
Chapter 7 Develop External Routines These tags are required. Tag Description This tag indicates that the following information is related to external routines. This tag documents the type of routines that are contained in the DLL. The information provided here is completely up to the developer. This information is not used by the Logix Designer application and is not displayed to the user. This information is for internal documentation purposes only.
Develop External Routines Chapter 7 The Resource Properties dialog box appears. 8. Change the name of the resource to ‘RA_EXTERNALROUTINES_XML.’ Do this by editing the ID field of the resource properties dialog box. IMPORTANT The quotes in the code are required. 9. From the File menu, choose Save.
Chapter 7 Develop External Routines Add Version Information to an External Routine DLL Add version information to your DLL to keep track of your development changes. Follow these steps. 1. From the View menu, choose Resource View. The Resource View dialog box appears. 2. Right-click InlineExample and choose Add>Resource. The Add Resource dialog box appears. 3. Select Version as the Resource type and click New.
Develop External Routines Chapter 7 FileVersion field 4. Choose the FileVersion field. The application uses the FileVersion field under the Block Header English (United States) to display version information for the external routine DLL. The software uses only this field; not the FILEVERSION (all capital letters) or any other FileVersion field located in any other language sections. The FileVersion field is a string and is completely under the control of the developer.
Chapter 7 Develop External Routines Build and Download External Routines Before you build an external routine, make sure that RA_ExternalRoutines.h is in the include path for the project. Then, follow these steps. 1. Build the project. 2. Map the external routines into a project. 3. Download the project to a SoftLogix controller. The external routine DLL is downloaded as a part of the project download. Update an Existing External Routine To update an existing external routine do the following. 1.
Develop External Routines Chapter 7 Sounds.cpp // Sounds.cpp : Defines the entry point for the DLL application. #include #include #include #include HANDLE // // // // // // "stdafx.h" "RA_ExternalRoutines.h" hTerminate = NULL; DllMain needs to create a global event which all threads need to check for. This event will be used to tell the threads that the DLL is being unloaded and that it is time to terminate.
Chapter 7 Develop External Routines void PlaySound(char * Snd) { HGLOBAL hResLoad; HRSRC hRes; LPTSTR lpResLock; BOOL bRes = TRUE; // handle to loaded resource // handle/ptr. to res. info. in hDLL // pointer to resource data // By building the sound resourced into the dll and doing a load // library on the dll we ensure that the resources are written // down to the controller with the dll. This means that we do not // have to worry about copying the resources to the controller on our own.
Develop External Routines while (!exitThread) { // This example // to determine // If this time // is no longer Chapter 7 uses an arbitrary timeout of 5 seconds whether the controller is still in run mode. expires, we can assume that the controller in run mode, and we can terminate this thread. // Note: The 5000 millisecond timeout value can be adjusted // to a value that fits the requirements for your specific // application.
Chapter 7 Develop External Routines extern "C" __declspec(dllexport) void SayRungState(EXT_ROUTINE_CONTROL * pERCtrl) { pERCtrl->ctrlWord.EN = pERCtrl->ctrlWord.EnableIn; rungState = INVALID_STATE; // Only create the thread on prescan. if (pERCtrl->ctrlWord.
Develop External Routines Chapter 7 Thread Priorities in a Multithreaded External Routine DLL If you use Microsoft C or C++ to develop your external routine, use only the ‘_beginthread’ C runtime function, as shown above in the example. By using the ‘_beginthread’ and ‘_endthread’ calls verifies that the system resources are properly allocated by the Microsoft C runtime library. When developing a multithreaded DLL, you must link with the multithreaded version of the C runtime library.
Chapter 7 Develop External Routines Debug External Routines You can debug external routines by setting up a debug session. Set Up the Debug Session If you built your DLL with Program Database Symbolic Information (PDB), you must copy the PDB file into the directory where the External Routine DLL is copied during a download to the controller. This file is not copied as a part of the normal download to the SoftLogix controller.
Develop External Routines Chapter 7 Start a Debug Session To debug an external routine, execute the SoftLogix controller (SoftLogix5800.exe) from the Visual Studio debugger. Create an empty project and edit the project settings. ATTENTION: Do not attempt to control equipment while debugging external routines. 1. Set the debug dialog box as follows. Debug Dialog Box Item Description Executable for debug session C:\Program Files\Rockwell Automation\SoftLogix 5800\ SoftLogix5800.
Chapter 7 Develop External Routines 3. Copy the external_routine.pdb file produced by visual studio to the SoftLogix 5800\data\slot# folder. 4. Map over the DLL file produced into the Logix Designer Project for all JXR instructions 5. Download the project to the controller and go offline 6. Remove the controller from the chassis. 7. Go back to Visual Studio and set your break points (see Set Breakpoints in External Routine Code). 8. Start the Visual Studio Project into Debug Mode by pressing F5. 9.
Develop External Routines Chapter 7 ARRAY Example C Declaration extern "C" __declspec(dllexport) float SumArray(EXT_ROUTINE_CONTROL* pERCtrl, float Val[]) XML Declaration SumArray Sum floating point array elements float SumArray(EXT_ROUTINE_CONTROL* pERCtrl, float Val[]) Software Declaration Rockwell Automation Publication 1789-UM002J-EN-P - December 2012 139
Chapter 7 Develop External Routines INTEGER Example C Declaration extern "C" __declspec(dllexport) int SomeCalculation(EXT_ROUTINE_CONTROL* pERCtrl, int Val) XML Declaration SomeCalculation Do an important calculation int SomeCalculation (EXT_ROUTINE_CONTROL* pERCtrl, int Val) Software Declaration 140 Rockwell Automation Publication 1789-UM002J-EN-P - December 2012
Develop External Routines Chapter 7 STRUCTURE Example C Declaration struct MyStruct { // Structure with four integers int n1; int n2; int n3; int sum; }; extern "C" __declspec(dllexport) int uvUDT(EXT_ROUTINE_CONTROL* pERCtrl, MyStruct* pMS) XML Declaration uvUDT This function accepts a pointer to a UDT int uvUDT(EXT_ROUTINE_CONTROL* pERCtrl, struct MyStruct* pMS) Software Declaration Rockwell Automation Pub
Chapter 7 Develop External Routines STRING Example C Declaration struct RA_String { unsigned long Len; char Data[82]; }; extern "C" __declspec(dllexport) void StringFunc(EXT_ROUTINE_CONTROL* pERCtrl, RA_String* pInRA_String, RA_String* pOutRA_String) XML Declaration StringFunc This function accepts two strings.
Develop External Routines Chapter 7 Packing in Structures Take care when designing user-defined structures that are shared between the SoftLogix controller and external routines. The packing mechanisms vary between the Visual Studio compiler and the Logix Designer compiler. This table and guidelines help illustrate this situation.
Chapter 7 Develop External Routines Parameter Type Checking RSLogix 5000 Data Type Formal Parameter Enumeration Allowed C Language Types (XML) Literal integer value (such as 121) IntegerValue Char, short, int, long, bool DINT IntegerAddress IntegerValue VoidAddress Int*, long* Int, long Void* INT IntegerAddress IntegerValue VoidAddress Short* Short Void* SINT IntegerAddress IntegerValue VoidAddress Char* Char Void* Literal floating point values (such as 12.
Develop External Routines Chapter 7 Visual Studio software includes a tool (dumpbin.exe) that you can use to obtain the C++ decorated name from your DLL file. The dumpbin.exe tool is installed as part of Visual Studio product. The examples below show how to use this tool. InlineExample.h // Exported Functions: __declspec(dllimport) int SumArray(EXT_ROUTINE_CONTROL* pERCtrl, int Val[]); InlineExample.cpp __declspec(dllexport) int SumArray(EXT_ROUTINE_CONTROL* pERCtrl, int Val[]) { // body of function.
Chapter 7 Develop External Routines Edit XML Resource Change the tag to be the decorated name (found when you ran dumpbin.exe). The XML EntryPoint name must EXACTLY match the decorated named displayed by the dumpbin.exe utility. Sum array elements.
Chapter 8 Program Windows Events to Monitor and Change Controller Execution Topic Page Use Outbound Events 147 Configure Windows Events to Launch Tasks within the SoftLogix Controller 151 Programmatically Saving the Controller 156 This chapter discusses how to program Windows events to control and monitor execution of the SoftLogix controller. There are different ways to programmatically use Windows events to monitor and change SoftLogix controller execution.
Chapter 8 Program Windows Events to Monitor and Change Controller Execution Programming Example: Outbound Events This example monitors a controller for mode changes and displays the controller mode whenever a change occurs. /**************************************************************************** ** ** ** SOFTLOGIX 5800 OUTBOUND EVENTS EXAMPLE CODE ** ** COPYRIGHT (c) 2003 ALLEN-BRADLEY COMPANY, L.L.C. ** ** ** ** All rights reserved, except as specifically licensed in writing.
Program Windows Events to Monitor and Change Controller Execution Chapter 8 // Use strings to define the event names in which we are interested // The user will pass in the slot number via the command line TCHAR sa_mode_change_event_fmt[] = _T("SOFTLOGIX_%02d_MODE_CHANGE"); TCHAR sa_program_event_fmt[] = _T("SOFTLOGIX_%02d_PROGRAM"); TCHAR sa_run_event_fmt[] = _T("SOFTLOGIX_%02d_RUN"); TCHAR sa_test_event_fmt[] = _T("SOFTLOGIX_%02d_TEST"); TCHAR sa_fault_event_fmt[] = _T("SOFTLOGIX_%02d_FAULT"); int main(
Chapter 8 Program Windows Events to Monitor and Change Controller Execution { _tprintf(_T("Bad run mode event handle\n")); _tprintf(_T("GetLastError() = %d\n"), GetLastError()); return 1; } else { // Add the run mode event to the event array EventArray[numevents] = hRunMode; numevents++; } // Create the test mode event. Note: it must be created as manual reset.
Program Windows Events to Monitor and Change Controller Execution Chapter 8 _tprintf(_T("Mode change occured: ")); fflush(stdout); break; } // A mode change occured. Now we have to check to determine the new controller mode. // This is done by performing a WaitForMultipleObjects on the mode event handles. // These events are manual reset events that are controlled by the SoftLogix // controller. // Only one of these events can be set at any given time.
Chapter 8 Program Windows Events to Monitor and Change Controller Execution The New Task dialog box appears.
Program Windows Events to Monitor and Change Controller Execution Chapter 8 4. Type the information in the fields specific to the task. Field Description Name Type a task name. Description Type a description for the task. Type pull-down menu Choose the Event type. Trigger pull-down menu Choose the action that will trigger the task’s execution.
Chapter 8 Program Windows Events to Monitor and Change Controller Execution Trigger a Controller Task from a Windows Application In your application, such as Visual Basic or FactoryTalk software, use standard Windows API functions to open and set the Windows event in the controller. Make sure you do the following: • Name the Windows-event task in the controller with the same name as the Windows event in the external application.
Program Windows Events to Monitor and Change Controller Execution Chapter 8 hOutbound(0) = CreateEvent(ByVal 0&, 0, 0, "SOFTLOGIX_01_SHUTDOWN") ErrorCodeEvent1 = Err.LastDllError hOutbound(1) = CreateEvent(ByVal 0&, 0, 0, "SOFTLOGIX_01_PROGRAM") ErrorCodeEvent1 = Err.LastDllError hOutbound(2) = CreateEvent(ByVal 0&, 0, 0, "SOFTLOGIX_01_RUN") ErrorCodeEvent1 = Err.LastDllError hCounter = CreateEvent(ByVal 0&, 0, 0, "Counter") ErrorCodeEvent1 = Err.
Chapter 8 Program Windows Events to Monitor and Change Controller Execution Programmatically Saving the Controller From an external routine or application, you can programmatically save the current controller information (tag data values and configuration information). A programmatic save can use these pre-defined Windows events. Replace the ‘xx’ with the 2-digit slot number where the controller resides.
Program Windows Events to Monitor and Change Controller Execution Chapter 8 swprintf(eventname, sa_savedone_event_fmt, slot); h_saveDoneEvent = CreateEvent (&sa, TRUE, FALSE, eventname); printf("h_saveDoneEvent = %d swprintf(eventname, sa_savelock_event_fmt, slot); h_saveLockEvent = CreateEvent (&sa, TRUE, FALSE, eventname); printf("h_saveLockEvent = %d // Yield remainder of timeslice to make it less likely that a // context switch will occur between the wait for lock event and // corresponding SetEvent()
Chapter 8 Program Windows Events to Monitor and Change Controller Execution Notes: 158 Rockwell Automation Publication 1789-UM002J-EN-P - December 2012
Appendix A Communicate with Devices on a DeviceNet Network Topic Page Configure Your System for a DeviceNet Network 160 Perform DeviceNet Test 179 DeviceNet I/O Data 186 Place the Communication Card in Run Mode 188 StatusRegister 189 Example: SoftLogix Controller and DeviceNet I/O 191 This chapter explains how to configure your SoftLogix controller on a DeviceNet network. IMPORTANT DeviceNet modules are not currently supported in RSLogix 5000 software on 64-bit Windows operating systems.
Appendix A Communicate with Devices on a DeviceNet Network Configure Your System for a DeviceNet Network For the SoftLogix controller to operate on a DeviceNet network, you need the following: • 1784-PCIDS DeviceNet communication card • RSLinx software to install the DeviceNet communication driver • RSLinx software to install the virtual backplane driver You install the virtual backplane driver only once on the computer running the SoftLogix controller.
Communicate with Devices on a DeviceNet Network Appendix A See the DeviceNet Universal PCI Scanner Card Installation Instructions, publication 1784-IN004. 3. Make a label to place on the mounting bracket of the card, or use a pen to write on the mounting bracket of the card. The label should include the serial number of the card and a name you can use to identify the card from any others you might install in the computer. IMPORTANT Remember the serial number of each communication card you install.
Appendix A Communicate with Devices on a DeviceNet Network 3. In the Select Module dialog box, select the 1784-PCIDS card. 4. Enter the backplane slot number. For this example, we chose 3 as the slot number. 5. Click OK. 6. When the Select Device dialog box opens, choose the serial number of the 1784-PCIDS card that you want.
Communicate with Devices on a DeviceNet Network Appendix A • Enter the label name for the card (this is the name you wrote on the label of the card to help you identify the card from others in the same computer). 9. Click Finish. IMPORTANT When you add a 1784-PCIDS card to the SoftLogix Chassis Monitor, the card must be connected to a valid, powered DeviceNet network.
Appendix A Communicate with Devices on a DeviceNet Network Step 3: Install the Communication Driver Use RSLinx software to configure the DeviceNet communication driver for the 1784-PCIDS communication card. RSLinx software is a communication server providing device connectivity. For additional user information on RSLinx software, see the RSLinx Classic Getting Results Guide, publication LINX-GR001. Follow these steps to install and configure the DeviceNet communication driver. 1. Launch RSLinx software.
Communicate with Devices on a DeviceNet Network Appendix A 3. From the Available Driver Types pull-down menu, choose the appropriate DeviceNet driver. TIP The device settings are grayed out because you specified the baud rate and node address when you created the module in the SoftLogix Chassis Monitor. 4. Click Add New. The DeviceNet Driver Selection dialog box appears. 5. Select the 1784-PCIDS driver and click Select.
Appendix A Communicate with Devices on a DeviceNet Network The 1784-PCIDS Driver Configuration dialog box appears. 6. Click OK. The Add New RSLinx Classic Driver dialog box appears. 7. Name the driver. 8. Click OK. You will see the driver running. 9. Click Close. IMPORTANT 166 You install the DeviceNet communication driver only on the computer that you use to run RSNetWorx for DeviceNet software.
Communicate with Devices on a DeviceNet Network Appendix A Step 4: Configure the Communication Card as Part of the Project Use RSLogix 5000 software to map the 1784-PCIDS communication card as part of the SoftLogix project. In the Controller Organizer, add the communication card to the I/O Configuration folder. You should already have added the SoftLogix controller to the project. See Step 1: Create and Configure the Controller in the SoftLogix Chassis Monitor on page 27, Your controller is offline. 1.
Appendix A Communicate with Devices on a DeviceNet Network The Select Module dialog box appears. 3. Click OK. The Select Major Revision dialog box appears. 4. Choose the Major Revision number for this module. 5. Click OK. The New Module dialog box appears.
Communicate with Devices on a DeviceNet Network Appendix A 6. Enter the name and slot number, (for this example, slot number 3 is used, which matches the SoftLogix Chassis Monitor location), Input Size, Output Size, and Status Size. Make sure your selections for Input Size, Output Size, and Status Size are large enough to hold the data you expect. If the sizes are too small, data truncates. If the sizes are too large, the software zero pads the data blocks. 7.
Appendix A Communicate with Devices on a DeviceNet Network 4. Click Download. The Download dialog box appears. 5. Click Download on the Download dialog box. This will download the .acd project into the controller and put you online with the controller. IMPORTANT The virtual backplane driver must be installed via RSLinx software before you can download a project to the SoftLogix controller. Step 6: Define the Scanlist Use RSNetWorx for DeviceNet software to survey the scanlist.
Communicate with Devices on a DeviceNet Network Appendix A For detailed information on how to use RSNetWorx for Device Net software, see the RSNetWorx for DeviceNet Getting Results Guide, publication DNET-GR001. IMPORTANT The project must already be downloaded from RSLogix 5000 software to the controller and the controller must be in Program or Remote Program mode. 1. Launch RSNetWorx for DeviceNet software. 2. Go online to begin browsing the network. Click to go online. 3.
Appendix A Communicate with Devices on a DeviceNet Network 4. Click OK. An upload/download prompt dialog box appears. 5. Click OK. IMPORTANT 172 If you cannot browse the network after installing the 1784-PCIDS card, check and make sure the status indicator on the card is green. If it is red, see the DeviceNet Universal PCI Scanner Card Installation Instructions, publication 1784-IN004, for detailed troubleshooting information about status indicators.
Communicate with Devices on a DeviceNet Network Appendix A The RSNetWorx for DeviceNet network appears. At this point, you can configure your device’s network parameters so that I/O data lengths and contents are in the desired formats. Devices default to transmit and receive data format. Some device formats can be changed. Changes should be made to such devices prior to creating the scanlist.
Appendix A Communicate with Devices on a DeviceNet Network 8. Double-click the 1784-PCIDS card in the RSNetWorx for DeviceNet Network Configuration dialog box. The 1784-PCIDS General Device Properties dialog box appears. Table 9 - General Device Properties Tab Descriptions Tab Definition General On the General tab, view the device properties (including catalog or product name, current slot number address, and identification information).
Communicate with Devices on a DeviceNet Network Appendix A Table 9 - General Device Properties Tab Descriptions Tab Definition ADR On the ADR property tab, you can configure the automatic device replacement (ADR) parameters for scanners that support the ADR feature, which automates the replacement of a failed slave device on a DeviceNet network by returning it to the prior level of operation. This feature includes Configuration Recovery (CR) and Auto-address Recovery (AAR).
Appendix A Communicate with Devices on a DeviceNet Network The Full Scanlist dialog box appear. Click each device to enable Edit I/O parameters. The I/O data is automatically loaded into the scanlist from the device’s EDS file with default parameters set. If you want to change I/O Parameters for a device, perform the following steps. a. Click each device to enable the Edit I/O Parameters dialog box. b. Set the parameters for each device and click OK.
Communicate with Devices on a DeviceNet Network Appendix A 12. Click the Input tab. 13. Verify input mapping. 14. Click the Output tab. 15. Verify output mapping. 16. Click Apply to download the parameters to the device.
Appendix A Communicate with Devices on a DeviceNet Network The Scanner Configuration Applet dialog box appears. 17. Click Yes. 18. When finished, click OK. 19. From the main menu, choose Save to save the scanlist configuration.
Communicate with Devices on a DeviceNet Network Perform DeviceNet Test Appendix A The IOLinx 1784-PCIDS/CPCIDS Driver CD includes a stand-alone test application (called DNetTest.exe) that lets you diagnose simple anomalies over the network before the control application is available for integration. In addition, you can use the application to make certain that the 1784-PCIDS card has been correctly installed and is functioning in the personal computer.
Appendix A Communicate with Devices on a DeviceNet Network Step 2: Configure the Port You must configure the port the first time you use a 1784-PCIDS card. To configure the port, follow these steps. 1. From Setup menu, choose Configure Port. The DeviceNet Driver Selection dialog box appears. 2. Select the Allen-Bradley 1784-PCIDS driver and click Select.
Communicate with Devices on a DeviceNet Network Appendix A The 1784-PCIDS Drive Configuration dialog box appears. 3. Click OK. The DNetTest dialog box appears indicating the operation was successful. 4. Click OK.
Appendix A Communicate with Devices on a DeviceNet Network The Port Configuration dialog appears indicating that the port has been configured. 5. Click OK. Step 3: Create a View 1. From the Setup menu, choose Create View. The View Creation Parameters dialog box appears. 2. Choose the port name matching the port for the view you are creating. 3. Click the Message Type (input, output, or input/output) that you want to use for the view you are creating.
Communicate with Devices on a DeviceNet Network Appendix A 4. Click the Privileges (read only, read/write) that you want to use for the view that you are creating. 5. If you want to use the Watchdog timer for the view you are creating, check Enabled and enter the watchdog timeout value (in milliseconds) that you want to use. 6. Click OK. The DNetTest dialog box appears indicating the operation was successful. 7. Click OK. The DeviceNet Test Application dialog box appears. 8.
Appendix A Communicate with Devices on a DeviceNet Network Step 4: Read Inputs and Write Outputs 1. Click the I/O tab. The I/O dialog box appears. The hexadecimal number is the count in bytes. The DeviceNet Test Application lets you read as many as 2048 bytes from the input image table of the 1784-PCIDS card. The Input Image Table is displayed and is automatically updated when inputs change. The DeviceNet Test Application lets you write as many as 2048 bytes to the output image table of the scanner. 2.
Communicate with Devices on a DeviceNet Network Appendix A Step 5: Change the Scanner Mode The Port Mode window displays the current mode of the scanner: Run, Idle, No View. When the view is initially created, the scanner mode is set to Idle. The view state must be set to Run for the I/O devices to energize their outputs based on the output data from the scanner. WARNING: Changing the view state to Run will cause the I/O devices to energize their outputs based on the output data from the scanner.
Appendix A Communicate with Devices on a DeviceNet Network DeviceNet I/O Data I/O information is presented as a structure of multiple fields that depend on the specific features of the I/O module. The name of the structure is based on the location of the I/O module in the system. Each I/O tag is automatically created when you configure the I/O module through the programming software. Each tag name follows this format: Location:SlotNumber:Type.MemberName.SubMemberName.
Communicate with Devices on a DeviceNet Network Appendix A The rack-optimized connection creates a DINT element for each possible I/O module connected to the device in slot 3, ‘Local:3.’ The array Local:3:I.Data contains the possible input elements; the Local:3:O.Data contains the possible output elements. The index number on the array element refers to the same numbered word mapped to the device in RSNetWorx for DeviceNet. Depending on the device, there can be several words mapped to one device.
Appendix A Communicate with Devices on a DeviceNet Network To place the 1784-PCIDS card in Run mode, your program logic needs to set the CommandRegister.Run bit in the output word for the card. Place the Communication Card in Run Mode Set This Bit This is an example. CommandRegister Bits This table describes how the 1784-PCIDS card uses the CommandRegister bits. CommandRegister.Run Bit Description Zero (0) Idle mode.
Communicate with Devices on a DeviceNet Network StatusRegister Appendix A The input data for the 1784-PCIDS card includes a StatusRegister. StatusRegister Bits This table describes how the 1784-PCIDS card uses the StatusRegister bits. StatusRegister Bit Description StatusRegister.Run This bit echoes the CommandRegister.Run bit to determine if the card is in Run or Idle mode. A 0 in this bit means the card is in Idle. A 1 means the card is in Run mode. StatusRegister.
Appendix A Communicate with Devices on a DeviceNet Network Status Data Elements The status data for the 1784-PCIDS card includes several elements. Status Data Elements This table describes the status data for a 1784-PCIDS card. Status Element Data Type Default Display Style S.ScanCounter DINT Binary S.DeviceFailureRegister SINT[8] Binary S.AutoverifyFailureRegister SINT[8] Binary S.DeviceIdleRegister SINT[8] Binary S.ActiveNodeRegister SINT[8] Binary S.StatusDisplay SINT[4] Binary S.
Communicate with Devices on a DeviceNet Network Example: SoftLogix Controller and DeviceNet I/O Appendix A In this example, one SoftLogix controller controls I/O modules through a 1784-PCIDS communication card. 1 2 3 4 5 Item Description 1 SoftLogix Controller 2 DeviceNet Network 3 Device 1 4 Device 2 5 Device 3 6 Device 4 6 This example has a SoftLogix controller controlling four DeviceNet devices. The controller automatically creates a rack-optimized connection for the I/O data.
Appendix A Communicate with Devices on a DeviceNet Network Create Alias Tags You might want to create alias tags to better represent the elements of the input and output array tags. An alias for an I/O point does the following: • Provides a descriptive name for the device that is wired to the point. • Represents the value of the point. When one changes, the other reflects the change.
Appendix B Communicate with Devices on a ControlNet Network Topic Page Configure Your System for a ControlNet Network 193 ControlNet I/O Data 215 Example 1: SoftLogix Controller and ControlNet I/O 218 Example 2: SoftLogix Controller to SoftLogix Controller 219 Example 3: SoftLogix Controller to Other Devices 224 Example 4: Use the SoftLogix Controller as a Gateway 230 This chapter provides detailed information about configuring and accessing your SoftLogix controller on a ControlNet network
Appendix B Communicate with Devices on a ControlNet Network You install the virtual backplane driver only once on the computer running the SoftLogix controller. (This chapter assumes you have already installed the driver.) • RSLogix 5000 software to configure the communication card as part of the SoftLogix system. • RSNetWorx for ControlNet software to schedule the SoftLogix system on the network.
Communicate with Devices on a ControlNet Network IMPORTANT Appendix B Remember the serial number and name of each communication card you install. You use this information to identify which card you want in which slot of the SoftLogix Chassis Monitor. For more information about installing a 1784-PCICS communication card, see the ControlNet Universal PCI Communication Interface Card Installation Instructions, publication 1784-IN003.
Appendix B Communicate with Devices on a ControlNet Network The Select Device dialog box appears. 5. Select the serial number of the 1784-PCICS card you want. If you previously configured the 1784-PCICS card that you selected by serial number, the chassis monitor remembers the configuration from the last time you used the card (whether in the same slot or not). 6. Click Next. The General dialog box appears. Node Address Card Label Name 7.
Communicate with Devices on a ControlNet Network Appendix B After you add the card to the chassis monitor, you can browse the network by expanding the Virtual Backplane driver and then expanding the port on the desired 1784-PCICS or 1784-PCIC communication card. Browsing ControlNet through the Virtual Backplane driver provides the same functionality as the RSLinx driver. This example shows the 1784-PCICS card as a virtual module in the SoftLogix Chassis Monitor in slot 2.
Appendix B Communicate with Devices on a ControlNet Network Step 3: Configure the Communication Card as Part of the Project Use RSLogix 5000 software to add the communication card as part of the SoftLogix project. In the Controller Organizer, add the communication card to the I/O Configuration folder as outlined below. You should already have added the SoftLogix controller to the project.
Communicate with Devices on a ControlNet Network Appendix B 3. Click OK. The Major Revision dialog box appears. 4. Choose the Major Revision number that matches your module and click OK. The New Module dialog box appears. 5. Name the module and choose the slot number. Our example uses slot 2. (The slot number must be the same number you assigned the module to in the SoftLogix Chassis Monitor). 6. Click OK.
Appendix B Communicate with Devices on a ControlNet Network The Module Properties dialog box appears. 7. In the Module Properties dialog box, click each tab and choose the settings for the module. Tab Definition General On this tab, you can view the following information: • Type and description of the module being created. • Vendor of the module being created. • Status the controller has about the module (only while online). The tab also lets you enter the following information: • Name of the module.
Communicate with Devices on a ControlNet Network Appendix B Step 4: Add Remote Communication Devices for the Communication Card Complete your system configuration by adding the remote communication devices and appropriate I/O modules to your project. Follow these steps. 1. In RSLogix 5000 software, from the Controller Organizer, right-click the 1784-PCICS communication card you added, then choose New Module to add a ControlNet Adapter. The Select Module dialog box appears.
Appendix B Communicate with Devices on a ControlNet Network 2. Expand the Communications list. Select Module Type 3. Choose the module type. The 1794-ACNR15/C 1794 ControlNet Adapter, Redundant Media is shown in this example. 4. Click OK. The Major Revision dialog box appears. 5. Choose the revision number and click OK.
Communicate with Devices on a ControlNet Network Appendix B The New Module Properties dialog box appears. 6. In the Module Properties dialog box, name the adapter and choose the appropriate communication settings. 7. Choose the Open Module Properties box. 8. Click OK. The Module Properties dialog box for the remote module appears.
Appendix B Communicate with Devices on a ControlNet Network Add and Configure I/O Modules for the Remote Communication Module 1. Add an input I/O module, right-click 1794-ACNR15/C adapter card in the I/O Configuration folder and choose New Module. The Select Module dialog box appears. 2. Expand the Digital list. 3. Select the input module and click OK. For this example, we chose the 1794-IB16/A 16 Point 24V DC Input, Sink module.
Communicate with Devices on a ControlNet Network Appendix B The New Module dialog box appears. 4. Enter the module name and slot number. 5. Make sure the Open Module Properties box is unchecked. 6. Click OK. 7. Add an output I/O module, right-click 1794-ACNR15/C adapter card in the I/O Configuration folder and choose New Module. The Select Module dialog box appears.
Appendix B Communicate with Devices on a ControlNet Network 8. Expand the Digital list. 9. Select the output module and click OK. For this example, we chose the 1794-OB16/A 16 Point 24V DC Output, Source module. The New Module dialog box appears 10. Enter the module name and slot number. Make sure the Open Module Properties box is unchecked. 11. Click OK. Continue to add and configure I/O modules for the remote communication module by adding them as we did in step 1 on page 201.
Communicate with Devices on a ControlNet Network Appendix B Step 5: Download the Project to the Controller 1. From the Communications menu, choose Who Active. The Who Active dialog box appears. 2. Browse to the SoftLogix controller. 3. Click Set Project Path button to cause this controller’s path to be saved as part of the .acd and will link the .acd project with this path to the controller. 4. Click Download.
Appendix B Communicate with Devices on a ControlNet Network The Download dialog box appears. 5. Click Download on the Download dialog box. This will download the .acd project into the controller and put you online with the controller.
Communicate with Devices on a ControlNet Network Appendix B Step 6: Schedule the Network Use RSNetWorx software to schedule the ControlNet network. The controller project must already be downloaded from RSLogix 5000 software to the controller and the controller must be in Program or Remote Program mode. For more detailed information, see the RSNetWorx for ControlNet Getting Results Guide, publication CNET-GR001. These steps describe how to schedule the network. 1. Launch RSNetWorx for ControlNet software.
Appendix B Communicate with Devices on a ControlNet Network The Network Browser dialog box appears. 3. Browse to the desired ControlNet Network and select the network. 4. Click OK.
Communicate with Devices on a ControlNet Network Appendix B The network window appears. 5. Click Edits Enabled.
Appendix B Communicate with Devices on a ControlNet Network 6. From the Network menu, choose Properties to set the network’s properties. The Network Properties dialog box appears. Tab Description Network Parameters On the Network Parameters tab, you can view the current configuration parameters associated with your ControlNet network.
Communicate with Devices on a ControlNet Network Appendix B 7. On the Network Parameters tab, specify the network update time (NUT). The default NUT is 5 ms. The NUT you specify must be lower than or equal to the lowest RPI in your system. 8. Enter the Pending Max Scheduled Address and Pending Max Unscheduled Address. 9. Click Apply to save the information you entered. 10. Click the Media Configuration tab. The Media Configuration tab appears. 11. Enter data on the media tab to match your system. 12.
Appendix B Communicate with Devices on a ControlNet Network 13. In RSNetWorx software, from the File menu, choose Save to save the network. The Save As dialog box appears. 14. Name the file and click Save. The Save Configuration dialog box appears. 15. Click Optimize and re-write schedule for all connections.
Communicate with Devices on a ControlNet Network Appendix B 16. Click OK. IMPORTANT Every device on the network must be in Program or Remote Program mode for the software to rewrite all of its connections. If a device is not in the correct mode, the software prompts you to let it change the device’s mode. The SoftLogix controller supports as many communication cards as you have PCI slots in the computer.
Appendix B Communicate with Devices on a ControlNet Network The tags created for the remote device (1794-ACN15 in this example) depend on the communication format you choose for that device when you add the device to the I/O Configuration folder. If you choose The automatically-created tags are for a Rack optimization rack-optimized connection to the remote communication device. Listen-only-rack optimization rack-optimized connection to the remote communication device.
Communicate with Devices on a ControlNet Network Appendix B Note that the tags for the analog module (‘remote_flex:2:I,’ ‘remote_flex:2:O,’ and ‘remote_flex:2:C’) are not alias tags. IMPORTANT Analog modules require direct connections to operate. Do not use the element of the rack-optimized array tag to control the analog module. Use the individual, slot-referenced tag.
Appendix B Communicate with Devices on a ControlNet Network Example 1: SoftLogix Controller and ControlNet I/O In this example, one SoftLogix controller controls I/O modules through a 1794-ACN15 module. 1 2 3 Item Description 1 SoftLogix controller 2 ControlNet network 3 1784-ACN15 module with I/O (remote FLEX™I/O) Controlling I/O Modules This example has the SoftLogix controller controlling the I/O modules connected to the remote 1794-ACN15 module.
Communicate with Devices on a ControlNet Network Appendix B If you configure the 1794-ACNR15 module as rack-optimized and the I/O modules as rack-optimized, you use only one connection to the 1794-ACN15 module, reducing the above example by three connections. This table calculates the connections for this rack-optimized configuration. Connection Amount SoftLogix controller to 1784-PCICS card 0 SoftLogix controller to remote 1794-ACNR15 module (communication format is ’rack optimization’).
Appendix B Communicate with Devices on a ControlNet Network Send a MSG Instruction To send an MSG from Soft1 to Soft2, follow these steps. 1. For Soft1, create a controller-scoped tag and choose the Message data type. 2. Enter an MSG instruction. In this example logic, a message is sent when a specific condition is met. When count_send is set, send count_msg. count_sendcount_msg.en / MSG Type - Unconfigured Message Control EN count_msg ... DN ER 3.
Communicate with Devices on a ControlNet Network Appendix B Produce and Consume Tags You can produce a base tag, alias tag, or consumed tag. Produced data can be the following: • A tag of DINT or REAL data type • An array of DINT or REAL elements • A user-defined structure with any type of elements. Use a user-defined structure to group BOOL, SINT, and INT data The consumed tag must have the same data type as the produced tag in the originating controller.
Appendix B Communicate with Devices on a ControlNet Network This example shows two controllers in the project. The Soft1 controller produces TagA and the Soft2 controller consumes TagA and stores it as TagB. 1. To add two controllers in the I/O tree named Soft1 and Soft2, right-click I/O Configuration and choose New Module. 2. Name and configure each controller. 3. Create TagA for Soft1 controller. Enter the Name, Type and Data Type. Click OK. TagA will look as follows.
Communicate with Devices on a ControlNet Network Appendix B 6. Click Connection to complete creating TagB. Soft2 Controller - Consumes TagA and Stores it in TagB The Consumed Tag Connection dialog box appears. 7. Enter the Producer controller’s name (Soft1) in the Producer field and the tag to be consumed (TagA) in the Remote Data field and click OK.
Appendix B Communicate with Devices on a ControlNet Network Each produced tag requires one connection for the producing controller and an additional connection for each consuming controller. Each consumed tag requires one connection. Total Connections Required by the Soft1 Controller This table calculates the connections used in this example.
Communicate with Devices on a ControlNet Network Appendix B Send a MSG Instruction You configure an MSG instruction to a ControlLogix and FlexLogix controller the same as you do for a SoftLogix controller. All Logix-based controllers follow the same MSG configuration requirements. Configuring an MSG instruction for a PLC-5 controller depends on the originating controller.
Appendix B Communicate with Devices on a ControlNet Network Produce and Consume Tags You can produce and consume tags with any Logix controller the same as you do with a SoftLogix controller. All Logix controllers follow the same requirements for producing and consuming tags. Producing and consuming tags with a PLC-5 controller for the ControlNet network depends on the type of data.
Communicate with Devices on a ControlNet Network Appendix B Produce a Tag to a PLC-5 Controller for the ControlNet Network Complete these steps to produce a tag that a PLC-5 controller for the ControlNet network can consume. 1. Determine the type of data to produce.. If And you are producing Then INT N/A Create a user-defined data type that contains an array of INTs with an even number of elements, such as INT[2]. When you produce INTs, you must produce two or more.
Appendix B Communicate with Devices on a ControlNet Network Consume a Tag from a PLC-5 Controller for the ControlNet Network Complete these steps to consume a tag from a PLC-5 controller for the controlNet network. 1. In RSNetWorx software, open the ControlNet configuration of the PLC-5 controller and insert a Send Scheduled Message. 2. In RSLogix 5000 software, add the PLC-5 controller to the Controller Organizer. 3. Create a user-defined data type that contains these members.
Communicate with Devices on a ControlNet Network Appendix B Total Connections Required by the Soft1 Controller This table calculates the connections used in this example.
Appendix B Communicate with Devices on a ControlNet Network Example 4: Use the SoftLogix Controller as a Gateway The SoftLogix controller supports bridging over a ControlNet network. Any SoftLogix MSG instruction that bridges one network has multiple pairs of numbers in its communication path. To construct a communication path, follow these steps. 1. Specify the port where the message exits.
Communicate with Devices on a ControlNet Network Appendix B In the following illustration, the ControlLogix controller can remotely access a PanelView™ terminal over a ControlNet network. The SoftLogix Chassis Monitor resides on the computer. A SoftLogix controller is not required for the gateway—you only need a 1784-PCICS card for each ControlNet network.
Appendix B Communicate with Devices on a ControlNet Network Notes: 232 Rockwell Automation Publication 1789-UM002J-EN-P - December 2012
Appendix C Program Virtual Motion Topic Page Virtual Motion Overview 233 Logic for Motion Control 234 Considerations When Running a Motion Application in Windows Operating System 236 To set up virtual motion via a virtual axis in a SoftLogix system, you must install the following items: • SoftLogix controller in the SoftLogix Chassis Monitor • RSLogix 5000 software IMPORTANT Virtual Motion Overview SoftLogix 5800 controllers and software do not support Integrated Motion on the EtherNet/IP netwo
Appendix C Program Virtual Motion 3. Add and configure the SERCOS interface module. If you are not using a SERCOS interface module, you can still configure a virtual axis in RSLogix 5000 software. Each ControlLogix controller can control up to 16 motion modules. Use one of the following SERCOS interface modules: • 1756-M03SE • 1756-M08SE • 1756-M16SE 4. Add and configure a SERCOS drive. You can create an axis when you are configuring the drive, or you can create it later.
Program Virtual Motion Appendix C You can read motion status and configuration parameters in your logic by using two methods. Method Example Direct access of the MOTION_GROUP and AXIS structures • Axis faults • Motion status • Servo status Use the GSV instruction • Actual position • Command position • Actual velocity In your ladder logic program, you can modify motion configuration parameters by using the SSV instruction.
Appendix C Program Virtual Motion Considerations When Running a Motion Application in Windows Operating System The System Restore feature of the Windows operating system can affect SoftLogix motion applications. The need to use System Restore can occur because other applications running in Windows can impact the time available to run motion. When System Restore is enabled, random motion retries occur, which can result in irregular motion or motion glitches.
Appendix D Windows Considerations Topic Page Observe Windows Objects 237 Additional Considerations 238 Run a SoftLogix Controller on the Windows Operating System 239 HMI Considerations 243 Personal Computer Hardware Considerations 244 This appendix describes considerations when using the Microsoft Windows operating system.
Appendix D Windows Considerations This diagram shows the relationship between these objects and shows how one object has to stop running if another with higher priority wants to execute. The SoftLogix controller executes as a real-time priority process, and thus waits for all ISRs and DPCs to complete before executing. 3 2 2 ISR 1 1 2 3 DPC real time Closer to the operating system 1 IN SC- -AN OUT The interruption of scan time in the real-time thread is due to driver interrupt activity.
Windows Considerations Appendix D Table 11 - Windows Operating System Considerations Consideration Description Third party peripheral devices Third-party peripheral devices, such as network cards and IDE devices should be installed directly in the computer’s primary PCI bus. IDE devices should use PCI bus mastering. Bus mastering is the capability of writing directly to the computer’s memory without having to use the Pentium chip to move the data. You can use Microsoft’s DMACHECK.
Appendix D Windows Considerations If multiple SoftLogix controllers in the same virtual chassis are set for a dwell time of 0 ms, the controllers will starve other applications that are running at normal priority. The effect is sluggish mouse control and slow response time by other Windows applications. And if you run this configuration on a slower computer, you may even lock yourself out of being able to do anything in the Windows operating system.
Windows Considerations Appendix D A periodic task detects an overlap and sets the Overlap fault bit in the controller if a periodic tasks fails to run at all during its assigned time slot or if a periodic tasks starts later than scheduled and cannot complete before the start of the next period. This diagram shows periodic task intervals, when a task actually starts, and what is considered an overlap condition.
Appendix D Windows Considerations The following diagram shows the timing of task execution between two SoftLogix controllers in the same virtual chassis. Each controller has periodic tasks and a continuous task. The example periodic tasks are short and take only 0.25 ms to execute. The example continuous tasks take 0.5 ms to execute.
Windows Considerations Appendix D System Overhead Timeslice All Logix-based controllers have a configuration setting for the system overhead timeslice. This function lets the controller take care of communication requests that occur from other controllers or from queued requests from within the controller’s application program. The timeslice switches the priority level of the continuous task with that of the background communication task, which is always running at a lower level than the continuous task.
Appendix D Windows Considerations Personal Computer Hardware Considerations The personal computer hardware you chose for the SoftLogix controller will have a dramatic impact on the performance of the SoftLogix control system. Most SoftLogix applications run additional software on the same personal computer as the controller. Make sure the computer meets these requirements: • IBM-compatible Pentium 4 1.
Appendix E System Performance Tuning Guidelines Topic Page Pre-qualify Your Personal Computer for Soft Control 245 System Performance 248 System Startup 249 Monitor Personal Computer Performance 249 The amount of personal computer processing power required for your application depends on your control application configuration. For example, the number of tasks, periodic rate settings, number of data tags, and whether other windows applications are running on your computer.
Appendix E System Performance Tuning Guidelines When you open the utility, this information appears. The Test Time utility monitors your system’s responsiveness to a repetitive 2 ms timer. It displays both a textual and a graphical display of the timing response of your computer. If your system is set up and operating properly the maximum value in the range should be no greater than 3 or 4 ms.
System Performance Tuning Guidelines Appendix E • Check that your personal computer BIOS is compatible with the operating system. Windows 2000 and Windows XP power management features and other aspects of the operating system require support in the personal computer vendor’s supplied BIOS. Check your personal computer vendor’s website for updated BIOS versions and for details on which operating systems are supported.
Appendix E System Performance Tuning Guidelines There are a number of configurable parameters in the SoftLogix 5800 controller that affect the overall system performance of your personal computer. These are the parameters. System Performance Table 12 - Parameters for Improved Performance SoftLogix Parameter Description Continuous task dwell time By default this value is 10 ms.
System Performance Tuning Guidelines System Startup Appendix E There are much greater CPU demands on the personal computer during system starts up. This is due to the fact that the SoftLogix controller restores its application program so that it can restart in the same state as it was shutdown. This restore is done at a high priority level so that the time from ‘power button press’ to running the control application is as short as possible.
Appendix E System Performance Tuning Guidelines 2. From the Properties menu, click Customize to customize the Start menu to display the Administrative Tools Option. The Customize Classic Start Menu dialog box appears. 3. Choose the Display Administrative Tools and click OK twice.
System Performance Tuning Guidelines Appendix E 4. From the Start menu, choose Programs>Administrative Tools>Performance. The Performance dialog box appears.
Appendix E System Performance Tuning Guidelines Notes: 252 Rockwell Automation Publication 1789-UM002J-EN-P - December 2012
Appendix F Status Indicators Topic Page SoftLogix Controller Status Indicators 253 SoftLogix EtherNet/IP Module Status Indicators 255 This appendix describes the status indicators for the SoftLogix 5800 controller and its associated modules. SoftLogix Controller Status Indicators The controller has these status indicators.
Appendix F Status Indicators Controller Status Indicator and Display Indicator Status Description RUN Off The controller is in Program or Test mode. Solid green The controller is in Run mode. Off Either: • There are no devices in the I/O configuration of the controller. • The controller does not contain a project (controller memory is empty). Solid green The controller is communicating with all the devices in its I/O configuration.
Status Indicators SoftLogix EtherNet/IP Module Status Indicators Appendix F This section describes the EtherNet/IP modules’ status indicators for the SoftLogix system. The EtherNet/IP modules have these status indicators. 1 2 Indicator Description 1 Module display status 2 Module status indicators Link Status (LINK) Indicator LINK Indicator Display Description Off No link • The module is not connected to a powered Ethernet device. • The module cannot communicate on Ethernet.
Appendix F Status Indicators Network Status (NET) Indicator NET Indicator Display Description Solid green CIP connections established • The module has an IP address and CIP connections (Class 1 or Class 3) are established. • Normal operation. No action required. Flashing green No CIP connections established • The module has an IP address, but no CIP connections are established. • Normal operation if no connections are configured. No action required.
Appendix G SoftLogix 5800 Revision History This appendix summarizes the revisions to this manual. Reference this appendix if you need information to determine what changes have been made across multiple revisions. This may be especially useful if you are deciding to upgrade your hardware or software based on information added with previous revisions of this manual.
Appendix G SoftLogix 5800 Revision History Notes: 258 Rockwell Automation Publication 1789-UM002J-EN-P - December 2012
Index Numerics 1784-PCICS card chassis monitor 197 communication 194 configuring 198 ControlNet connection 40 creating 195 SoftLogix controller 194 1784-PCIDS card 190 chassis monitor 163 configure 167 create 161 rack-optimized 186 RPI 187 slave nodes 189 1789-SIM module creating 94 force a bit 102 using 93 A add external routines 106 alias tag create 192 analog module tag 217 array 187 rack-optimized 191 ASCII device controller 90 protocol 90 B bit force 102 on 102 bus mastering 238 C calculating cam in
Index control I/O modules 218 motion devices 233 structure 112, 113, 120 controller ASCII device 90 configure 27, 32 EtherNet/IP network connection 55 event task 151 motion faults 235 online 41 programmatically saving 156 project creation 31 project upload 41 restart 41 single-float values SoftLogix 37 SoftLogix 27 SoftLogix to ControlNet 219 status indicators 85, 253 Windows event 147, 156 task 151 ControlNet network 1784-PCICS card 195 communication driver 196 configuring 1784-PCICS card 198 configuring
Index card 48 configuring the controller 43 controller connection 54 creating Ethernet card 48 disabling UDP 44 distributed I/O 56 example sending message to PLC-5 71 example sending messages 68 I/O data 58 message 68 module status indicators 255 multiple EtherNet/IP modules 54 port 22 remote workstation to SoftLogix controller 65 RSLinx UDP messages 44 EtherNet/IP network access remote device 58 controller connection 55 module functionality 56 multiple modules 54 remote device 56 statistics 63 event 35 ta
Index status 98 toggle 101 instruction error motion 235 execution 37 MAM 235 motion 234 PLC-5 message 71 INT to REAL conversion 37 IOLinx software 22, 189 IP address 54 ISR routine 240 J jump external routines 112 JXR instruction control structure 112, 113, 120 operands 112 L ladder logic software 22 LINK status indicators 255 listen-only connection 216 logic motion 234 M major fault 99 revision number 1784 PCIDS card 168 MAM instruction 235 map I/O data 100 simulated I/O 100 MAPC instruction calculatin
Index P PCI slot communication card 194 PCIDS card major revision number 168 performance personal computer 249 system 248 periodic 28 save 248 save interval high user mode 26 HMI application 26 normal user mode 26 task Windows 240 personal computer hardware consideration 244 performance 249 physical address information download 41 upload 41 PLC-5 message instruction 71 processor message 71 port Ethernet 22 serial 28 pre-qualify soft control 245 priority 35 level task 34 program defining 36 developing 34 de
Index SIM module chassis monitor 94 configure 93 Generic module 97 project 97 RPI 99 SoftLogix controller 93 tag 103 simulated I/O configure 93 creating 1789-SIM module 94 example 103 map data 100 outputs in last state 101 toggling inputs and outputs 101 size memory 28 slave 87 master communication 87 nodes 1784-PCIDS card 189 soft control pre-qualify 245 SoftLogix chassis monitor 24 configuration 25 continuous task dwell time 25 controller 27 1784-PCICS card 194 connection 219 SIM module 93 single-float v
Index user mode configure 91 high priority 26 normal priority 26 V version information 128 virtual chassis SoftLogix 22 Visual Studio 117 W Windows blue screen 238 consideration 237 dwell time 239 eoutbound event 147 event controller 147, 156 example 154 trigger controller 151 object 237 periodic task 240 service pack 238 SoftLogix controller 239 system overhead timeslice 243 Windows XP considerations system restore 236 write schedule 214 X XML descriptions 126 Rockwell Automation Publication 1789-UM00
Index Notes: 266 Rockwell Automation Publication 1789-UM002J-EN-P - December 2012
Rockwell Automation Support Rockwell Automation provides technical information on the Web to assist you in using its products. At http://www.rockwellautomation.com/support, you can find technical manuals, technical and application notes, sample code and links to software service packs, and a MySupport feature that you can customize to make the best use of these tools. You can also visit our Knowledgebase at http://www.rockwellautomation.