RSLinx Training Guide
Contacting Rockwell Software Technical Support Telephone—440-646-5800 Technical Support Fax—440-646-5801 World Wide Web—www.software.rockwell.com Copyright Notice © 2002 Rockwell Software Inc. All rights reserved Printed in the United States of America Portions copyrighted by Allen-Bradley Company, Inc. and used with permission. This manual and any accompanying Rockwell Software products are copyrighted by Rockwell Software Inc.
RSLinx Training Guide
RSLinx – Training Guide Table Of Contents Goals of this manual........................................................................1 Training Section 1: Introduction.......................................................3 New Features .........................................................................5 Training Section 2: Installing RSLinx ............................................. 25 Training Section 3: Configuration of Communication Hardware, RSWho and Diagnostics ............................
RSLinx – Training Guide Goals: By the end of the training period, using this training guide, classroom instruction and experience with RSLinx, you should understand and correctly perform configuration steps for the following: • The features of RSLinx • Installation requirements and how to install RSLinx • How to configure communications hardware in RSLinx • Using the new RSWho • How to use the diagnostics in RSLinx • DDE (Dynamic Data Exchange) and OPC (OLE for Process Control) and how they work • How to
2 RSLinx – Training Guide
RSLinx – Training Guide 3 Training Section 1: Introduction Product Description RSLinx is a complete 32-bit product family that provides communications to a wide range of applications. RSLinx supports Rockwell Software and Allen-Bradley programming, HMI, and component software products. It serves shop floor data to commercially available DDE client applications, such as Microsoft Excel and Access.
4 RSLinx – Training Guide RSLinx – DDE/OPC Server C-API RSI Software Packages • RSView32 • RSLogix5 • RSLogix500 • RSTrend • Etc. (Direct Driver) OPC DDE Server Server Network Device Any DDE Compatible Program (client) • Microsoft Excel • Microsoft Access • Lotus 123 for Windows • Etc.
RSLinx – Training Guide 5 New Features RSLinx version 2.1 Features • Network Shortcuts – Provides quick access to specific network hiding routing complexities from client applications. • New Driver Configuration Ø Selectively enable/disable drivers Ø Have multiple COM port drivers configured but disabled. Quickly switch between drivers for the same COM port. Ø Specify driver startup state (i.e.
6 RSLinx – Training Guide New Features (cont.) • Drivers Ø 1784-PCC PCMCIA for ControlNet (NT driver). § The NT kernel mode driver is shipped with the 1784-PCC card (Series B or a reflashed Series A) and must be installed prior to configuring the 1784-PCC driver in RSLinx. Ø 5136-SD/SD2 S&S DH+ (Windows 95/98 driver) Ø DF1 Slave driver Ø DeviceNet 1747-SDN Pass Through driver Ø Support for DeviceNet drivers (1784-PCD, 1784-PCID(S)). § Install the driver provided with the hardware.
RSLinx – Training Guide 7 New Features (cont.) • RSLinx runs "headless" when automatically started by RSView32, OPC clients, RSLogix products, and custom C applications. Ø No splash screen appears and the RSLinx main window is not shown. In this case, the RSLinx application is said to be running "headless." Ø RSLinx does however appear as a system tray icon, just as if it were running as a service.
8 RSLinx – Training Guide RSLinx Features RSLinx has had the following existing features since version 2.0 and earlier: • Support for all A-B PLC types; SLC-500 family, PLC-2, PLC-3, PLC-5, PLC-5/250 in one software package. • All communications hardware devices for Allen Bradley PLCs are supported in a single software package. There is no need to buy a separate software package for each hardware device you wish to use and there are no TSR (memory resident) programs to install.
RSLinx – Training Guide 9 RSLinx Processor/Communications Device Support Matrixes Allen-Bradley Hardware 1747-PIC 1770-KFC 1770-KFD (Serial Interface) 1770-KF2 1770-KF3/1747-KE 1771-SDNPT * 1784-KT/KTX/PCMK 1784-KTC(X) or 9904-KTCX 1784-PCC (PCMCIA CARD) 1784-PCD (PCMCIA CARD) 1784-PCDIS (PCI CARD) 1784-PCMK 1784-PKTX 1785-KE AB Ethernet (TCP/IP) Linx Gateway Client Driver Logix 5550 MicroLogix Panel View PLC-5 Channel Zero SLC500 5/03 Channel Zero SoftLogix 5 Controller S&S Technologies 5136-SD/SD2 Ethe
10 RSLinx – Training Guide Benefits of RSLinx • Ease of upgrade to new processors and networks because all of the 32-bit Allen-Bradley drivers are included in one package. • Compatibility of products from Rockwell Software, Allen-Bradley and third party products or custom solutions using RSLinx’s open C API, OPC or AdvanceDDE. • Synchronous read and write access to processor data in PLC-5 and SLC 500 processors via DDE interface.
RSLinx – Training Guide 11 RSLinx Lite, RSLinx OEM, RSLinx Professional, RSLinx SDK, RSLinx Gateway What’s the difference? RSLinx is available in versions to meet the cost and functionality requirements of many different applications. Depending on the version you are running, some functionality may or may not be operational. To know which version you are running, read RSLinx main title bar text (the line of text at the very top of the main window).
12 RSLinx – Training Guide • RSLinx Gateway – Includes all the functionality in RSLinx Professional, plus remote client connectivity or TCP/IP. Allows additional workstations running RSLinx or an OPC Client application to "gateway" to Allen-Bradley networks connected to the server PC. Can connect from an off-site location using Remote Access Service (RAS). With the purchase of RSLinx Gateway, you have a license for up to five concurrent remote connections.
RSLinx – Training Guide 13 RSLinx Requirements Software requirements RSLinx requires one of the following software environments: • Microsoft Windows NT Version 4.0 (Service Pack 3 or later recommended). Because RSLinx takes advantage of features not available in Windows NT prior to Version 4.0, RSLinx is only supported on Windows NT Version 4.0 or later. • Microsoft Windows 95 with DCOM for Windows 95 installed.
14 RSLinx – Training Guide RSLinx Help Systems Rockwell Software Technical Support Most questions can be answered with RSLinx’s many internal help options without a call to Rockwell Software’s Technical Support, but if you must call, expect superior customer service.
RSLinx – Training Guide 15 RSLinx Internal Help Help with RSLinx can be easily accessed by either pressing the F1 key or using the Help Menu Options seen below. It uses a standard help format you may have seen in other products. Enhancements to the help system include: • What’s This? help in most areas of RSLinx by right-clicking an option. Press the What’s This? button and a help topic popup will appear. • Similar to What’s This?, the Context Help icon has been added to the toolbar.
16 RSLinx – Training Guide Help on the Web On the Rockwell Software website, support area: http://www.software.rockwell.com/support/ Support Library Browse our on-line Support Library for tips and answers to your most common problems. Our support technicians enter tech notes in the Support Library based on calls to our Support group. Reset Codes Have you lost a Rockwell Software product's activation due to some type of hard drive damage or corruption? A Reset Code can help you get up and running quickly.
RSLinx – Training Guide 17 Software Updates If your software is currently under warranty or a support contract, you may be able to download a Software Update. Training Our Training Catalog is available on-line, including detailed course descriptions, schedules and enrollment information. You'll find a range of courses covering Rockwell Software and Microsoft technologies. You can even sign up for a course on-line! Support Guide The purpose of our Support Guide is to describe our support services for you.
18 RSLinx – Training Guide Application Notes and Suggestions • • • • • • • • • • • • With a ControlLogix 5550, unsolicited messages work on only an Ethernet network or a DH+ network. To receive unsolicited DDE messages from a processor through a DHRIO module, and through an ENET module over an Ethernet network, select your DDE topic from the DDE/OPC Topic Configuration dialog box.
RSLinx – Training Guide 19 Application Notes and Suggestions (continued) • • • • • • • • When receiving unsolicited messages from an SLC 500 processor via a 1785KA5 Bridge, the DDE topic's remote configuration must be set to Internet mode. Ø Also, in the SLC 500 message instruction, the remote bridge node address must be set to 0. Ø Also, unsolicited messages sent from a PLC or other node to RSLinx will cause errors if no DDE clients or C-API applications are running to receive them.
20 RSLinx – Training Guide Application Notes and Suggestions (continued) Downgrading to a previous version of RSLinx If you have RSLinx Version 2.1 installed, but wish to downgrade to a previous version of RSLinx, complete the following: 1. Select DDE > Topic Configuration, and delete any DDE topics configured in RSLinx 2.1. 2. From the Start menu, select Programs > Rockwell Software > RSLinx > Uninstall RSLinx 2.1 (assuming you used the defaults when you installed RSLinx 2.1).
RSLinx – Training Guide 21 Application Notes and Suggestions (continued) 1784-PCMK and PCMCIA information and Windows NT limitations When using a 1784-PCMK (PCMCIA or “PC” card) communications card, Windows NT has the following limitations: • When a 1784-PCMK is reconfigured through RSLinx, your Windows NT system must be rebooted for the changes to take effect. • Only one PCMCIA card of the same type may be used at one time.
22 RSLinx – Training Guide Application Notes and Suggestions (continued) Running RSLinx on machines not on a network Important: This procedure requires that you log into Windows NT with system administrator privileges. For RSLinx to work properly in Windows NT 4.0, you must have installed RSLinx Release 1.50.58 or later. If you have an earlier version of RSLinx, please upgrade to the latest version of RSLinx. 1. Start Windows NT 4.0 and go into the Control Panel. 2. Double-click the Network icon.
RSLinx – Training Guide 23 Application Notes and Suggestions (continued) Routing through bridge devices • • • • • • RSLinx can not communicate through an external bridge device when using the 1756-DHRIO bridge device with the TCP or CNET driver. The problem exists when the first bridge is a 1756-DHRIO device and the second bridge is not a 1756-DHRIO device (for example, Pyramid Integrator). In this case, the source link ID remains at zero and the response packets fail.
24 RSLinx – Training Guide
RSLinx – Training Guide 25 Training Section 2: Installing RSLinx RSLinx is installed using a standard Windows setup program. Your RSLinx package may consist either of a CD or of several disks (not both). If disks, you can start with the disk labeled Disk 1. Complete the following to install RSLinx: Note: In Microsoft Windows NT, as with any other network software, you must have administrator privileges to install RSLinx software. 1.
26 RSLinx – Training Guide 6. A new installation step will require a 10-digit number. • The setup program will not all you to proceed until after the serial number found on the RSLinx activation disk is entered. Enter 10-digit serial number here 7. Click Next and proceed with the installation. 8. After completing the RSLinx installation, remove the RSLinx diskettes and store them in a safe place, especially the master activation disk.
RSLinx – Training Guide 27 Training Section 3: Configuration of Communication Hardware, RSWho and Diagnostics 1. Open RSLinx. The following screen will appear: Context Help Topic Configuration Copy DDE Link to Clipboard Driver Diagnostics Configure Drivers RSWho Open DDE/OPC Project Status Bar The first time you start-up a newly installed RSLinx package you are required to configure communications hardware.
28 RSLinx – Training Guide Lab / Discussion: 1. Start-up RSLinx. 2. Click the Configure Communications Hardware icon. The Configure Drivers box, seen below, will appear. To delete a driver configured earlier, click here. 3. Pick the hardware device from the Available Drivers list that you intend to use to communicate with the PLC world and press Add New… • For the example in this training exercise, we will select the 1784 KT/KTX(D)/PCMK/PKTX(D).
RSLinx – Training Guide 29 4. Click Add New. The following dialog will appear to name the new driver: • Use the default AB_KT-1 5. Click OK • Then the following dialog will appear to choose the type of KT card and begin configuration: Click the pulldown arrow and select KT. Tip: Rockwell Software provides a utility to read your WINtelligent LINX configuration and display it for use in configuring RSLinx. This utility is available on the Rockwell Software website (www.software.rockwell.
30 RSLinx – Training Guide Configuring the 1784 KT 1. To configure the KT, take the following steps (each item is selected and configured by clicking on that item’s row in the previous box). a) Select the hardware (Device Type) by. Choose KT. b) Select the Network Type (DH+ or DH485) by clicking the Network Type item and then clicking the pull down arrow on the right side of this box to select the correct option. Choose DH+. c) Create a Station Name up to eight characters.
RSLinx – Training Guide 31 Take note of the new AB_KT-1 driver that is displayed in the Configured Drivers section of the Configure Hardware dialog box. For the first KT card configured this will be AB_KT-1. The full configuration should read: AB_KT-1 DH+ Sta:0 Addr:D800 RUNNING RSLinx supports multiple communication hardware devices, so the next KT configured will be named AB_KT-2 (by default, although you can change it) and so on.
32 RSLinx – Training Guide RSWho RSWho is RSLinx’s network browser interface. RSWho allows you to view all the active network connections from a single screen. The left pane of RSWho is the Tree Control, which shows networks and devices. The right pane is the List Control, which shows all members of a collection. A collection is a network, or a device that is a bridge. Features: • • • RSWho browsing is restricted to one network at a time.
RSLinx – Training Guide 33 Lab / Discussion 1. Check if the connection to the DH+ is good by opening an RSWho. • Click the RSWho icon. Ø Alternatively, open an RSWho by selecting Communications / RSWho from the top menu of RSLinx. 2. A right-click on an RSWho screen will allow you select many options, depending on where you right-click, the RSWho below shows many of the RSWho right-click menus.
34 RSLinx – Training Guide RSWho in Large Icon View Note: It is not a good idea to let RSWho screens run all the time in Autobrowse mode. To keep an RSWho screen fresh, RSLinx must continually poll all the processors on the network selected. This generates a lot of network traffic and increases the load on RSLinx’s network drivers. Rockwell Software suggests that an RSWho only be used when necessary, then closed.
RSLinx – Training Guide 5. Right-click on the KT in the RSWho window. Select Driver Diagnostics. • When you are finished looking at the diagnostics, close the RSWho window and diagnostics windows by clicking the “Xs” in the upper right of the window.
36 RSLinx – Training Guide
RSLinx – Training Guide 37 Training Section 4: Using the Data Table Monitor Data Table Monitors The Data Monitor can now view the activity in your data table files for both PLC-5 data as well as SLC data. This procedure is called data monitoring. The Data Monitor window is modeless; therefore, they can remain on the desktop if you minimize RSLinx - OR - When you are monitoring your data, the information displays in either a data file list window or a data table window.
38 RSLinx – Training Guide The following fields display on the Data Monitor dialog box: Double click here to see Data File. Data Grid displays data values for addresses in the data table file (even if they are not currently being used). The width of the grid can be adjusted to meet your display requirements. When you click a position in this grid, the address displays in the field directly below. Offset displays the file type and number and the data file element.
RSLinx – Training Guide The Data Table’s Properties option allows you to change the poll rate and radix of the data (Binary, Octal, Decimal, Hexadecimal, or ASCII.
40 RSLinx – Training Guide
RSLinx – Training Guide 41 Training Section 5: DDE and How It Works Dynamic Data Exchange (DDE) is an interprocess communications specification that is built into the Microsoft Windows operating system. Note: AdvanceDDE protocol is the only version supported by RSLinx-OEM. DDE is not available with RSLinx Lite. It allows Windows programs that support DDE to exchange data between themselves.
42 RSLinx – Training Guide DDE Continued - Application, Topic, Item Each Dynamic Data Exchange question consists of three parts: • • • To whom am I talking (i.e., which APPLICATION gets the question)? What subject are we talking about (i.e., what is the general TOPIC)? Which data do I require (i.e.
RSLinx – Training Guide 43 Item: After the Application and Topic are known, your Microsoft Windows application must provide RSLinx with the specific Item to discuss. To use the example of the conversing people: if the individual (who) and general topic of conversation are known, you must determine the exact data you require.
44 RSLinx – Training Guide Data Format: AdvanceDDE, XL_Table and CF_Text A brief discussion of available Data Formats for DDE communications follows. It is intended to provide you with a general understanding of Data Format from a user standpoint. Normally no user intervention or control of data formats is possible, and for the most part, the use of different data formats is transparent to the user.
RSLinx – Training Guide 45 AdvanceDDE In addition to supporting CF_Text and XL_Table, Rockwell Software has also implemented its own DDE data format. This format is called AdvanceDDE (also known as PackedDDE). AdvanceDDE is specifically designed for industrial communications giving the communications increased data throughput and well defined error checking to ensure data communications integrity. AdvanceDDE’s speed performance is accomplished in numerous ways.
46 RSLinx – Training Guide Lab/Discussion: DDE Terminology You should be familiar with the following terms (if not, please read the immediately preceding pages titled DDE and how it works). • • • Clients Servers Client/Servers Three Basic Parts to any DDE request: • • • Application Topic Item Examples RSLinx Excel Application RSLinx Excel Topic Testsol (a PLC station) T4:0.acc (a valid PLC data table address) [book1.
RSLinx – Training Guide 47 Training Section 6: Project, Topic and Alias Configuration After configuring your communications hardware and verifying its connection, you can now configure a DDE/OPC Project and Topic to enable RSLinx to provide data to DDE requests. The Topic contains the information necessary to communicate with the intended PLC. 1. Click the File menu/Open Project, then click the New button. Type in a project name, such as TEST and click OK.
48 RSLinx – Training Guide 2. A topic is a pointer to a PLC, much like how your telephone number “points” to your house. It also determines how fast or when data will be collected. Topics may be configured in two ways : • The preferred method is from an RSWho. Right-click a station and select “Configure New DDE/OPC Topic.
RSLinx – Training Guide 49 The following Topic Configuration will appear: DDE/OPC Topic Configuration – Data Source Tab Topic Names have a 49-character limit Clone duplicates the selected topic to help quickly create other topics with similar names or other common features. 3. Replace the default topic name with the name testsol.
50 RSLinx – Training Guide 4. Click on the Data Collection Tab and set the Data Collection mode to Poll Rate and the rate at 100 mSec (one-tenth of a second). --See illustrations on the next two pages.-- • Polled Messages data collection mode instructs RSLinx to actively go out on the network and poll data. If you select Polled, you must also enter a polling rate in the Poll Rate (mSec) field.
RSLinx – Training Guide 51 Use good judgement when selecting poll rates. Only collect fast changing data at the higher rates. Create slower topics to the same PLC for slower changing data. This technique can reduce network traffic if handled correctly. Unsolicited data collection may be used alone or in conjunction with polling. It requires the PLC logic to be written to send a message to the RSLinx station. Unsolicited Message is an excellent way to reduce network traffic for infrequently changing data.
52 RSLinx – Training Guide Keep DeviceNet connection open Enabling this checkbox may increase DeviceNet Traffic. Do not check this box if the poll rate accuracy is greater than 5 seconds. Enable this option if your poll rate exceeds 5 seconds and your desired poll rate accuracy is 5-10 seconds. The target device closes the connection if no communication occurs in 5 seconds. • RSLinx will keep the explicit message connection open between the DDE server and the node configured in the topic.
RSLinx – Training Guide 53 Click the Advanced Communications Tab, look but do not change anything. Important: Changing the information on this tab may cause the information to be disconnected from the correct object on the Data Source tab. This tab is usually only used to set up a new topic without starting from the RSWho. The RSWho new topic creation method automatically applies the driver and station information.
54 RSLinx – Training Guide Local or Remote Addressing These options vary depending on the current communication hardware driver and the bridge device selected. RSLinx supports six different methods (listed in the Bridge Device drop-down list box) for accessing remote processor networks: • • • • • • 1785-KA Local/Remote 1785-KA5 Bridge/5130-KA Ethernet EI RM Module Ethernet EI 5130-KA Module Remote ControlNet 1756-DHRIO See RSLinx Help for specific instructions. 5.
RSLinx – Training Guide 55 Alias Configuration An Alias Topic is a “virtual” or “redundant” topic that you can use to reference other topics. This allows you to define a “virtual topic” which can be directed to one of several physical PLC devices, with automatic switchover. You can also configure the criteria used for switching from primary to backup devices, or you can force a switchover using a DDE Execute command. Alias topics are not mandatory for communication to occur.
56 RSLinx – Training Guide The following information is displayed in the Alias Topic Configuration dialog box: • List of Alias Topics shows a list of configured alias topics. If a topic is active and is selected, all configuration items for that topic will be grayed out. • Alias Name is the reference to the alias topic. • Available Topics shows a list of device topics available for the alias topic. Once an aliased topic is used, only matching topics will be displayed.
RSLinx – Training Guide 57 Training Section 7: Establishing a DDE Link to Microsoft Excel Once a DDE topic is configured, you are ready to establish a DDE Hot Link to Microsoft Excel. There are two ways to establish a DDE Hot Link to Excel, the hard way and the easy way. The hard way is to type it by hand with all the proper syntax marks in place, but we will try it the easy way using the Windows clipboard. The clipboard will copy only hot links.
58 RSLinx – Training Guide 5. In the Columns per Row box leave it at the default value of 1. This will format the block of data to be placed in one column in the destination application which is Microsoft Excel in this case 6. Pick the topic you have configured, TESTSOL, which is displayed in the Select a Topic box. 7. Click OK. All of the information required to establish a Hot Link to Excel is now residing in the Windows clipboard. 8.
RSLinx – Training Guide 59 11. Note that the formula bar in Excel contains the formula that is needed to establish the DDE Hot Link. This link was pasted in from the clipboard. It should look similar to the following: Note the formula for the DDE Link that was pasted into Excel. 12. The parts of the formula are as follows: The Application Name Data Table Address Array Bracket { = RSLinx| Testsol!'T4:0.ACC,L5,C1'} Columns per Row The Topic Name Block Size Note the braces { } around the formula.
60 RSLinx – Training Guide Charting Data In Excel 13. We are now going to create a live chart from the PLC data. Make sure that the five cells that contain the PLC data are highlighted (Left-click on cell A1, hold, and drag down to cell A5). 14. Click on the Chart Wizard icon on the Excel toolbar. The Chart Wizard icon looks like the following: Excel 97 Chart Wizard Icon & Tooltip 15. The following Chart Wizard Step 1 of 4 will immediately appear as the Chart Wizard icon is clicked.
RSLinx – Training Guide 61 16. After selecting the chart type, just click Finish or, if you prefer, click Next repeatedly until the Wizard is complete just to be aware of the charting options available. 17. After clicking Finish, a live chart of the data will appear on your spreadsheet. 18. Click on the File menu/Save As… and call the new workbook Test.xls and save it in the default folder. 19. The exercise is complete.
62 RSLinx – Training Guide
RSLinx – Training Guide 63 Training Section 8: Writing a Simple Microsoft Excel Macro Goal: In this section, we will go through the steps to write a macro that will write a piece of data to a register in a PLC. The macro will be controlled by a typical windows button. We will write a value to a timer preset. This lab assumes that you have completed section six and that both RSLinx and Excel are active in your Windows environment.
64 6. 7. RSLinx – Training Guide Click on the Button tool and the mouse pointer will turn into a cross. Now you must identify where you would like to place the button on your sheet • For the purpose of this exercise, place the button somewhere to the right of Column D. • With your “cross” cursor, click-hold and drag your mouse to outline the size, shape and location of your button.
RSLinx – Training Guide 8. 65 The View Code option opens the Excel 97 Visual Basic environment. • From here you will enter the code (subroutine) which will execute when you push the button. Enter the following code into the code window as shown below: RSIchan = DDEInitiate("RSLinx", "testsol") DDEPoke RSIchan, "T4:0.pre", Range("DDE_Sheet!D7") DDETerminate (RSIchan) Enter the code in the code window as shown here. 9.
66 RSLinx – Training Guide 11. Your command button should now be ready to function. However, before you press it, you should put a value into cell D7. • This is the location that the macro code you wrote expects to find the value that it will write to T4:0.PRE. • Type 300 into cell D7 (be sure you press [Enter] to have Excel accept the number into the cell). Then click your button. 12.
RSLinx – Training Guide 67 Additional Macro Examples: Using procedures similar to those on the previous pages, the following Visual Basic Code can be added to additional command buttons to do a read from PLC, a block read, and a block write. Read a word (reads T4:0.acc and places in cell C7 on DDE_Sheet): RSIchan = DDEInitiate("RSLinx", "testsol") data = DDERequest(RSIchan, "T4:0.acc") Range("DDE_Sheet!C7").
68 RSLinx – Training Guide
RSLinx – Training Guide 69 Training Section 9: Local and Remote OPC Introduction This section outlines step by step the configuration of Windows to use OPC, local and remote, with Rockwell Software products. Both Windows 95/98 and NT are covered along with RSLinx, RSView32 and RSTools. The steps outlined here are the results of actual experimentation with Windows and RSI products.
70 RSLinx – Training Guide RSView32 6.0 or higher can be configured for OPC through the node configuration. Under the systems folder in the project dialog, choose “Node”. Radio buttons on the top of the dialog will allow you to select Direct Driver, DDE or OPC as a node type. Choose OPC. Next, move to the “Name” text box. Enter a name for the station. It can be anything you want. Then move to the “Server Name” text box, click the browse button .
RSLinx – Training Guide RSTools can connect to an OPC server by using a special syntax for the application name under the “Link” Tab. Right click on the RSTools Active X control and select properties. Go to the “Link” tab. Under application type in “OPC://Server Name”, for example “OPC://RSLinx OPC Server”. Enter the topic name as usual. Note: You must have a version of tools that specifically supports OPC. See the help file or call Rockwell Software to see if you have the right version.
72 RSLinx – Training Guide OPC over a network Notes: (1) To use OPC over a network with RSLinx, you must have RSLinx Gateway 2.0 or higher. RSLinx OEM or regular RSLinx will not do OPC over a network. (2) Remote OPC works best when RSLinx is run as a service. • When running RSLinx as a service, do not open it as an application! Configuring Windows for DCOM OPC between two PCs over a network uses Windows DCOM. The setup is slightly different depending on the version of Windows you are running.
RSLinx – Training Guide 73 If you do NOT have a domain controller on your network, you will need to setup a PC running Windows NT Server (not workstation) as a domain controller. Don’t do this on your office or plant network without checking with your network administrator first. A primary domain controller is configured during the Windows NT Server (not workstation) install. If you are upgrading an existing NT install, you must choose to do a new install of NT, not the upgrade when prompted.
74 RSLinx – Training Guide Allow some or all domain users privileges to a specific application only under DCOM configuration. In order to do this Access control must be set to “user level” first under the access control tab of network configuration. Go to Network Neighborhood and right click. Choose properties and go to the access control tab. Select “user level access control.” You must fill in a domain name in the text box. Enter the name of the domain from which you wish to allow users access.
RSLinx – Training Guide 75 Allow some or all domain users privileges under DCOM Configuration. Go to the start menu and choose run. Type in “DCOMCNFG” and click OK. Go to the Default Security tab and click the first “edit default” button (the one under the Default Access Permissions section). Click add and choose the domain from where you want to add users. Choose “Everyone” from the list. This will grant all domain users DCOM access to this Windows NT system.
76 RSLinx – Training Guide Configuring Rockwell Software for OPC over a network No special configuration should be required for RSI servers built with the RSServer OPC Toolkit such as RSLinx or RSServers. You must have RSLinx 2.0 or higher to use OPC. See the help files of each specific RSServer to see if it supports OPC or call Rockwell Software.
RSLinx – Training Guide 77 Training Section 10: Using OPC Automation in VB to Read a Single Element - The Basics 1. Open Microsoft Visual Basic and create a new Standard EXE project [Start] > Programs > Microsoft Visual Studio > Microsoft Visual Basic 2. From the main Visual Basic menu, click Project and References. 3.
78 RSLinx – Training Guide 4. Add a ListBox control to Form1 as shown. ListBox 5. Double click in a gray area of Form1 to display the code window for the project. Click the drop down list of Objects (Currently displaying the word Form) and select General.
RSLinx – Training Guide 79 6. Enter the following lines of code to the [General][Declarations] section of the project. Note: Throughout this lab any line of code starting with an apostrophe (‘) is a comment used to document the code. These lines are not required for the project to run properly and do not need to be entered. 7. Add the following code to the Form_Load event.
80 RSLinx – Training Guide 8. Click on the drop down list of objects and select MyOPCGroup. The DataChange event will be displayed by default. Add the following code to the MyOPCGroup_DataChange event. Note: If MyOPCGroup is not listed in the drop down list of objects, review steps 2-7 and verify each one was performed accurately. 9. Add the following code to the Form_QueryUnload event.
RSLinx – Training Guide 10. Start the project and observe the changing data.
82 RSLinx – Training Guide - Going Further 11. Display all of the information returned by the OPC Server in the ListBox by modifying the MyOPCGroup_DataChange event code as follows. Start the project and observe the values being returned for the TransactionID, ClientHandle, ItemValue, Quality and TimeStamp. 12. Add another data item to monitor by modifying the Form_Load event as nd follows. Run the project and watch closely to observe 2 data point.
RSLinx – Training Guide 83 Training Section 11: Using OPC Automation in VB to Write a Single Element - The Basics 13. Open Microsoft Visual Basic and create a new Standard EXE project [Start] > Programs > Microsoft Visual Studio > Microsoft Visual Basic 14. From the main Visual Basic menu, click Project and References. 15.
84 RSLinx – Training Guide 16. Add a ListBox, a TextBox and a CommandButton to Form1 as shown. TextBox CommandButton ListBox 17. Click on Text1 to give the TextBox object focus. Using the Properties dialog box on the right side of the screen, change the Text property to zero (0).
RSLinx – Training Guide 85 18. Double click in a gray area of Form1 to display the code window for the project. Click the drop down list of Objects (Currently displaying the word Form) and select General. 19. Enter the following lines of code to the [General][Declarations] section of the project. Note: Throughout this lab any line of code starting with an apostrophe (‘) is a comment used to document the code. These lines are not required for the project to run properly and do not need to be entered. 20.
86 RSLinx – Training Guide 21. Add the following code to the Command1_Click event. Note the dimensions for the arHandles and arValues arrays are appropriate for only one data item. Also note that the arErrors array remains dimensionless.
RSLinx – Training Guide 87 22. Click on the drop down list of objects and select MyOPCGroup. The DataChange event will be displayed by default. Add the following code to the MyOPCGroup_DataChange event. Note: If MyOPCGroup is not listed in the drop down list of objects, review steps 2-7 and verify each one was performed accurately. 23. Add the following code to the Form_QueryUnload event.
88 RSLinx – Training Guide 24. Start the project and observe the changing data. 25. Enter a number from 0 to 60 in the TextBox and click the Command1 button. Observe how the data item is affected.
RSLinx – Training Guide 89 Training Section 12: Diagnostics, Troubleshooting and Options Once a link is established, we can look back into RSLinx to see some of its diagnostic and troubleshooting features (this section assumes the link you established in the previous section is still active). Open the RSLinx window. Driver diagnostic counters are available for each configured and running driver. From the Communications menu, select Driver Diagnostics to display a Driver Diagnostics dialog box.
90 RSLinx – Training Guide More TCP diagnostics are found under the General, Performance, Connection Event Log, and Active Connections tabs in the tabbed dialog. TCP diagnostics are modeless windows; therefore, they can remain on the desktop if you minimize RSLinx. The Driver Diagnostics for TCP box is shown below: Server Diagnostics are found under the DDE/OPC menu - Server Diagnostics. Server diagnostics are modeless; therefore, they can remain on the desktop if you minimize RSLinx.
RSLinx – Training Guide 91 • Text Packets Hot - The number of DDE Advises sent from RSLinx to DDE Clients via the CF_TEXT DDE Protocol. • Text Packets Cold - The number of DDE Requests sent from RSLinx to DDE Clients via the CF_TEXT DDE Protocol. • Text Request Timeouts - The number of timeouts on a DDE Client's request of items via the CF_TEXT DDE Protocol. • Excel Item Count - The number of DDE Items talking to RSLinx via the XL_Table DDE Protocol.
92 The DDE/OPC Server Diagnostics Dialog Box RSLinx – Training Guide
RSLinx – Training Guide 93 Select DDE Client Diagnostics from the DDE/OPC menu to display the following diagnostic counters: Scroll to the right for Process ID and Elapsed Time diagnostic counters • • • • Module Name -The application’s executable name that is talking to RSLinx. • Poke Count - The number of pokes sent via the DDE Client module in this DDE Format. • Packets Hot - The number of advise updates sent to the DDE Client module in this DDE Format.
94 RSLinx – Training Guide The CIP Diagnostics Dialog Box The CIP Diagnostics dialog provides global information that is not specific to any driver. The CIP Diagnostics dialog currently displays CIP Dispatching, CIP Messaging, and CIP Connections diagnostics. Diagnostic counters shown are only available in this dialog; they are not available via RSWho. For additional help on this topic, refer to the help FIND tab and type “CIP” (no quotes).
RSLinx – Training Guide 95 The DDE Communication Event Log Communication Events from the DDE/OPC menu displays information on any DDE error messages logged while running RSLinx with DDE compliant programs. Each time a DDE error message is seen by RSLinx, the number of errors logged counter is increased by one and the entry is added to the window viewer.
96 RSLinx – Training Guide Communication events displays details such as processor manufacturer and type, the item affected by the error, and the DDE command type of the message. • To enable logging of DDE errors, select Options from the DDE/OPC menu, and select the Log Communication Errors checkbox.
RSLinx – Training Guide 97 The Event Log When you select View Event Log from the Tools menu, an Open Event Viewer dialog box displays: The NT Event Viewer records important system occurrences. For RSLinx, events such as drivers starting and stopping successfully are displayed. For more information on the Event Viewer, search the help that accompanies the Event Viewer.
98 RSLinx – Training Guide Options When you select Options from either the DDE/OPC or Tools menu, an Options dialog box displays. The Options dialog box contains three tabs: The General Tab allows you to toggle on and off RSLinx screen viewing options such as the Status Bar and Tool Bar. It also enables or disables two options: Event Viewer notification and the RSWho autobrowse feature. The DDE Tab provides the ability to log communication errors and display addressing errors.
RSLinx – Training Guide 99 The Services Tab gives the option of starting RSLinx as an NT Service each time your system is started. If you are using RSLinx as a server, it must be running as an NT service. It is usually recommended to run RSLinx as a service on NT and Remote OPC works best when RSLinx is run as a service. Running RSLinx as a service requires no user logon, and user logoff will NOT automatically close RSLinx.
RSLinx – Training Guide A-1 Appendix A: Support Library Technotes The following technotes and more can be found in the Support Library at the Rockwell Software website. Check here first to answer most of your questions and discover the latest about any Rockwell Software product: http://support.software.rockwell.com/supportlibrary/ http://software.rockwell.com/ http://suppport/rockwellautomation.
A-2 RSLinx – Training Guide NetDDE NT to NT The information in this technote applies to: Product: Type: RSLinx Application Note Technote ID: A958 Package/Mod Modified: RSLinx for NT 03/29/99 ule(s): Revision(s): N/A Fixed In N/A Revision: SubDDE Server System(s): Technical Note Details: Syntax in Excel when doing NetDDE from an NT machine to another NT machine: ='\\ComputerName\NDDE$'|'DDEShareName'!'N7:0' When doing NetDDE from an NT machine to another NT machine on the same Domain then no password is ne
RSLinx – Training Guide A-3 NetDDE Configuration with RSLinx, RSView32, and EXCEL The information in this technote applies to: Product: Type: RSView32 Application Note Technote ID: Q528 Package/Mod Modified: Works 02/16/99 ule(s): Revision(s): 5.01.
A-4 RSLinx – Training Guide RSView32 connecting to RSView32: 1. Start the DDE server in RSView32. To do this check the DDE Server check box in the RSView32 startup editor, or execute the command DDEServerOn. 2. Create a DDE node in RSView32 with the following information: Application = \\computer_name\ndde$ Topic = RTDataProject_Name$ The RSView32 DDEshare is automatically configured as RTDataProject_Name$ This DDEshare name must be used in the RSView32 client topic configuration. 3.
RSLinx – Training Guide Legal Notice: The information provided in the Rockwell Software Inc. (RSI) Knowledgebase is provided "as is" without warranty of any kind. RSI disclaims all warranties, either expressed or implied and in no event shall RSI be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of profit or damage, even if RSI have been advised of the possibility of such damages.
A-6 RSLinx – Training Guide The OPC client poll rate can over ride the RSLinx topic poll rate The information in this technote applies to: Product: Type: RSLinx Release Note Technote ID: R221 Package/Mod Modified: RSLinx (All) 12/28/98 ule(s): Revision(s): 2.x Fixed In N/A Revision: SubDDE/OPC Server System(s): Technical Note Details: If the update rate specified by an OPC client is faster than the poll rate specified in RSLinx.
RSLinx – Training Guide A-7 TEN THINGS YOU SHOULD KNOW ABOUT TCP/IP The information in this technote applies to: Product: Type: RSLinx Application Note Technote ID: A1152 Package/Mod Modified: RSLinx (All) 03/29/99 ule(s): Revision(s): N/A Fixed In N/A Revision: SubN/A System(s): Technical Note Details: TEN THINGS YOU SHOULD KNOW ABOUT TCP/IP 1) What is TCP/IP? TCP/IP is a suite of protocols that can be used to route information. TCP/IP stands for Transmission Control Protocol/Internet Protocol.
A-8 RSLinx – Training Guide 3) How is the TCP/IP Address formatted? A TCP/IP address is comprised of 32-bits of information. These 32-bits are then divided into four 8-bit sections. These sections are referred to as octets. The octets are typically displayed in decimal format (i.e. 131.150.186.10). This type of format is commonly referred to as dotted decimal notation. Octets can also be displayed in binary format (i.e. 10000011.10010110.10111010.00001010).
RSLinx – Training Guide A-9 7) What are the specifications for a Class A, Class B, and Class C network? In a Standard Class A network, the first octet is reserved for the Network Address, and the remaining three octets are reserved for the Node Addresses. The Class A format is: Network.Node.Node.Node To determine the valid number of Network Addresses, recall that a Class A network has a first octet with the leading bit pattern 0.
A - 10 RSLinx – Training Guide Network.Network.Node.Node To determine the valid number of Network Addresses, recall that a Class B network has a first octet with the leading bit pattern 10. This leaves only 14-bits available, from the first two octets, for Network Addresses. Converting this binary number to decimal gives a total of 16,384 possible Network Addresses.
RSLinx – Training Guide A - 11 Class Decimal Range of First Octet Maximum Networks Maximum Hosts A 1-126 126 16,777,214 B 128-191 16,384 65,534 C 192-223 2,097,152 254 8) What is a Subnet Mask? A Subnet Mask is a 32-bit value that allows the TCP/IP protocol stack to distinguish the Network Address from the Node Address. 9) What are valid Subnet Masks for Standard Class A, Class B, and Class C networks? Standard Addressing by definition means that no Subnetting is being used on the network.
A - 12 RSLinx – Training Guide How to monitor which topic within an Alias is currently active The information in this technote applies to: Product: Type: RSLinx Application Note Technote ID: A1143 Package/Mod Modified: RSLinx (All) 03/01/99 ule(s): Revision(s): N/A Fixed In N/A Revision: SubDDE Server System(s): Technical Note Details: Background: RSLinx's "Alias" topic allows users to specify alternate communications paths.
RSLinx – Training Guide A - 13 Example: 1. In RSLinx, configure an topic called "MyAlias". Within the alias configure topics, configure topics "Topic1" through "Topic4". In Microsoft Excel, enter the following formula: =RSLinx|'MyAlias'!'Activetopic' 2.
A - 14 RSLinx – Training Guide Understanding How RSView32 Manages Communications With RSLinx - or Any DDE/OPC Server. The information in this technote applies to: Product: Type: RSView32 Application Note Technote ID: A951 Package/Mod Runtime Modified: 12/15/98 ule(s): Works Revision(s): 6.00.41 Fixed In Revision: SubRSLinx System(s): Technical Note Details: Background: RSView32 has implemented a very sophisticated mechanism for only requesting the data that is needed from the data server.
RSLinx – Training Guide A - 15 Show Last Acquired Value in Graphics: By default graphic screens have this property checked or enabled. The last acquired value is displayed on a graphic, rather than a wireframe outline indicating the data is not fresh, when this property is enabled. The last acquired value is never displayed when the tag is in Error.
A - 16 RSLinx – Training Guide Communication Status Information: In RSLinx when using DDE/OPC there are diagnostic tools for troubleshooting communications problems. The Active Items List shows the addresses currently being requested by RSView32. The Communication Event Log shows the last 500 errors, and the affected item in the list. The Optimized Packets shows how RSLinx is optimizing the data requested by RSView32, and shows the number of packets received, how many are valid, and how many are invalid.
RSLinx – Training Guide A - 17 When a OPC node is created in RSView32, the following 4 system tags are created. System\ComErrorStringOPC System\ComErrorValueOPC System\ComStatusStringOPC System\ComStatusValueOPC All system communications tags may be viewed in Tag Monitor by entering System\Com* as the tag name, and selecting all. Legal Notice: The information provided in the Rockwell Software Inc. (RSI) Knowledgebase is provided "as is" without warranty of any kind.
A - 18 RSLinx – Training Guide How to connect a remote RSView32 client to an RSLinx Gateway OPC Server. The information in this technote applies to: Product: Type: RSView32 Application Note Technote ID: A945 Package/Mod Runtime Modified: 06/03/99 ule(s): Works 6.00.41 Revision(s): 6.10.15 6.10.
RSLinx – Training Guide A - 19 RSLinx Gateway currently supports up to 5 remote clients. The easiest way to make a successful remote connection is to run RSLinx as a Service Automatically. For more information on DCOM configuration requirements for RSLinx, Jump to A1239 DCOM Configuration Requirements for RSLinx Gateway Remote OPC Enabling Client Software: RSLinx Gateway CD provides the Remote OPC Client enabling software.
A - 20 RSLinx – Training Guide Tip: When upgrading from RSLinx Gateway 2.0 to 2.1 the node configuration in RSView32 should be altered to reflect the server name change. The old name remains configured as long as RSLinx 2.0 was installed. Legal Notice: The information provided in the Rockwell Software Inc. (RSI) Knowledgebase is provided "as is" without warranty of any kind.
RSLinx – Training Guide A - 21 RSLinx OPC Server and RSView32 The information in this technote applies to: Product: Type: RSLinx Application Note Technote ID: A1181 Package/Mod Modified: RSLinx (All) 03/29/99 ule(s): Revision(s): 2.1.xx Fixed In N/A Revision: SubOPC Server System(s): Technical Note Details: When using RSView and OPC to RSLinx a slight difference in configuration of the OPC connection is seen between RSLinx v2.00.97.30 and RSLinx v2.1.xx.
A - 22 RSLinx – Training Guide This graphic for reference only. Legal Notice: The information provided in the Rockwell Software Inc. (RSI) Knowledgebase is provided "as is" without warranty of any kind. RSI disclaims all warranties, either expressed or implied and in no event shall RSI be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of profit or damage, even if RSI have been advised of the possibility of such damages.
RSLinx – Training Guide A - 23 Client: Could not connect to the OPC Server - caused by Upgrading RSLinx Professional from 2.0 to 2.1 The information in this technote applies to: Product: Type: RSView32 Error Message Technote ID: E945 Package/Mod Runtime Modified: 06/03/99 ule(s): Works Revision(s): 6.10.16 Fixed In Revision: SubOPC Comms System(s): RSLinx Technical Note Details: Problem: The following error is generated after upgrading RSLinx from 2.0 to 2.
A - 24 RSLinx – Training Guide Solution: Update the node definition, changing the RSLinx OPC Server Type from Local to In-Process. Legal Notice: The information provided in the Rockwell Software Inc. (RSI) Knowledgebase is provided "as is" without warranty of any kind.
RSLinx – Training Guide A - 25 Cannot perform NetDDE with RSLinx on Windows 95/98 The information in this technote applies to: Product: Type: RSLinx Problem / Solution Technote ID: P687 Package/Mod Modified: RSLinx for 95 05/14/99 ule(s): Revision(s): N/A Fixed In Revision: SubAll DH System(s): Technical Note Details: Problem: You will not be able to do NetDDE from one Windows 95 Computer to another Windows 95 Computer with RSLinx.
A - 26 RSLinx – Training Guide Alternate Solution - Run RSLinx on a Windows NT computer. This enables you to create the DDE Share that is necessary to do NetDDE. Legal Notice: The information provided in the Rockwell Software Inc. (RSI) Knowledgebase is provided "as is" without warranty of any kind.
RSLinx – Training Guide A - 27 Checklist for trouble-free serial port communications. The information in this technote applies to: Product: Type: Third Party Application Note Technote ID: A957 Package/Mod Modified: Communications 05/13/99 ule(s): Revision(s): N/A Fixed In N/A Revision: SubSerial Communications System(s): Technical Note Details: Below is a list of errors returned by various Rockwell Software products when attempting to configure a serial port communications driver.
A - 28 RSLinx – Training Guide Be sure that the comm port selected is enabled in the BIOS / CMOS setup.* Be sure there are no conflicting devices on the selected comm port. (i.e. modems, Infrared ports, etc...) Be sure there are no conflicting devices on the opposing comm port (ie. COM1 vs. COM3 and COM2 vs.COM4) Be sure there are no low level drivers loading in the AUTOEXEC.BAT or CONFIG.SYS. Windows 3.x Be sure the correct comm port is selected.
RSLinx – Training Guide Legal Notice: The information provided in the Rockwell Software Inc. (RSI) Knowledgebase is provided "as is" without warranty of any kind. RSI disclaims all warranties, either expressed or implied and in no event shall RSI be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of profit or damage, even if RSI have been advised of the possibility of such damages.
A - 30 RSLinx – Training Guide Receiving Unsolicited Messages in RSView32 with RSLinx The information in this technote applies to: Product: Type: RSView32 Application Note Processor Technote ID: A449 Family: Package/Mod Modified: Works 12/10/98 ule(s): 5.01.26 Revision(s): 6.00.41 Fixed In Revision: SubRSLinx System(s): Technical Note Details: Background: RSView32 does not directly support Unsolicited Messages.
RSLinx – Training Guide A - 31 Configuration: By configuring an Unsolicited DDE Topic in RSLinx, RSView32 can receive unsolicited writes to the tag database. 1. The appropriate RSLinx communication driver must be configured 2. Select Topic Configuration from the DDE menu 3. Enter a new topic name. 4. Click the Update List button to browse for the correct PLC or SLC device connection, and double click the device. 5.
A - 32 RSLinx – Training Guide How this works: When a graphic is initially displayed, the data is read from the PLC5/SLC5. Thereafter, all updates are generated by the unsolicited message instruction in the PLC5/SLC5. Because the RSView32 / RSLinx application are initially reading the data, the source address must be equal to the target address. To guarantee the proper initialization of unsolicited data, the data must be polled once per hour.
RSLinx – Training Guide B–1 Appendix B: OPC Specification Overview OPC Overview Version 1.
B-2 RSLinx – Training Guide Specification Type Industry Standard Specification Title: OPC Overview Date: Version: 1.0 Soft MS-Word Source Opcovw.doc : Author: Opc Task Force Status: Release October 27, 1998 Synopsis: This specification serves as overview to OPC. It gives background information, motivation, architectural highlights and an abstract for each OPC topic. Trademarks: Most computer and software brand names have trademarks or registered trademarks.
RSLinx – Training Guide B-3 NON-EXCLUSIVE LICENSE AGREEMENT The OPC Foundation, a non-profit corporation (the “OPC Foundation”), has established a set of standard OLE/COM interface protocols intended to foster greater interoperability between automation/control applications, field systems/devices, and business/office applications in the process control industry.
B-4 RSLinx – Training Guide technology. THE OPC MATERIALS ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF PERFORMANCE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. USER BEARS ALL RISK RELATING TO QUALITY, DESIGN, USE AND PERFORMANCE OF THE OPC MATERIALS.
RSLinx – Training Guide B-5 GENERAL PROVISIONS: This Agreement and User’s license to the OPC Materials shall be terminated (a) by User ceasing all use of the OPC Materials, (b) by User obtaining a superseding version of the OPC Materials, or (c) by the OPC Foundation, at its option, if User commits a material breach hereof.
B-6 RSLinx – Training Guide Table of Contents 1. INTRODUCTION ...................................................................................................... 7 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 1.4 1.5 READERS GUIDE ......................................................................................................................... 7 OPC BACKGROUND.................................................................................................................... 7 PURPOSE..........................
RSLinx – Training Guide B-7 Introduction Readers Guide This document serves as an overview to OPC. It gives background information, motivation, architectural highlights and an abstract for each OPC topic. Specific interface specifications to develop OPC clients and/or OPC Servers (e.g., for DataAccess, Alarm&Event Handling or Historical DataAccess) and a specification for interfaces that are common for all OPC Servers are available as separate documents. Chapter 1 gives some background information.
B-8 RSLinx – Training Guide Windows 3.
RSLinx – Training Guide B-9 OPC Alarm&Event Server, OPC HistoricalData Server. The Current Client Application Architecture There are many client applications that have been developed that require data from a data source and access that data by independently developing “Drivers” for their own packages. This leads to the problems that follow: • • • • Much duplication of effort Everyone must write a driver for a particular vendor’s hardware.
B - 10 RSLinx – Training Guide The architecture and design of the interfaces are intended to support development of OPC servers in other languages as well.
RSLinx – Training Guide B - 11 General OLE for Process Control (OPC™) is designed to allow client applications access to plant floor data in a consistent manner. With wide industry acceptance OPC will provide many benefits: • • • Hardware manufacturers only have to make one set of software components for customers to utilize in their applications. Software developers will not have to rewrite drivers because of feature changes or additions in a new hardware release.
B - 12 RSLinx – Training Guide Scope A primary goal for OPC is to deliver specifications to the industry as quickly as possible. With this in mind, the scope of the first document releases is limited to areas common to all vendors. Additional functionality will be defined in future releases. Therefore, the first releases focus on • Online DataAccess, i.e., the efficient reading and writing of data between an application and a process control device flexibly and efficiently; • Alarm and Event Handling, i.
RSLinx – Training Guide B - 13 This specification describes the OPC COM Objects and their interfaces implemented by OPC Servers. An OPC Client can connect to OPC Servers provided by one or more vendors. OPC Server Vendor A OPC Server Vendor B OPC Client OPC Server Vendor C Figure 0-1 OPC Client OPC Servers may be provided by different vendors.
B - 14 RSLinx – Training Guide There are two types of groups, public and local (or ‘private’). Public is for sharing across multiple clients, local is local to a client. Refer to the section on public groups for the intent, purpose, and functionality and for further details. There are also specific optional interfaces for the public groups. Within each Group the client can define one or more OPC Items.
RSLinx – Training Guide B - 15 related to specific conditions. OPC Clients may subscribe to be notified of the occurrence of specified events. The IOPCEventServer interface provides methods enabling the OPC Client to: • Determine the types of events which the OPC Server supports. • Enter subscriptions to specified events, so that OPC Clients can receive notifications of their occurrences. Filters may be used to define a subset of desired events.
B - 16 RSLinx – Training Guide Application OPC I/F OPC I/F SCADA System Physical I/F Physical I/O Physical I/F Physical I/O OPC Server Figure 0-4 - OPC Client/Server Relationship General OPC Architecture and Components OPC specifications always contain two sets of interfaces; Custom Interfaces and Automation interfaces. This is shown in Figure 0-5.
RSLinx – Training Guide VB Application OPC Automation Interface B - 17 OPC Automation Local or Remote OPC Server (Shared by many clients) C++ Application OPC Custom Interface Server Data Cache Physical Device/ Data Figure 2-6 - Typical OPC Architecture Local vs. Remote Servers It is expected that OPC Server vendors will take one of two approaches to networking: 1. They can indicate that the client should always connect to a local server which makes use of an existing proprietary network scheme.
B - 18 RSLinx – Training Guide NOTE: the issue under discussion here is Server Browsing. This is entirely different from the Address Space browsing discussed in the OPC Data Access Interface. Overview of the Solution The OPC Foundation supplied Server Browser OPCENUM.EXE can reside on any machine, will access the local Component Categories Manger and provides a new interface IOPCServerList which can be marshaled and used by remote clients.
RSLinx – Training Guide C-1 Appendix C: RSEmulate 5 & 500 RSEmulate 5 & 500 Table of Contents Subject Page Introduction to the Rockwell Software Emulator C-2 What Emulators are Available? C-3 Setting up and Basic Usage of the Emulator C-4 Using LINX with the Emulator C-6 “Simulating” real world conditions C-8 Scanning Modes C-10 Break Points C-12 Debug Files C-13
C-2 RSLinx – Training Guide Introduction to the Rockwell Software RSLogix Emulator Rockwell Software’s Emulator allows the testing of ladder logic and operator interface systems without the need for actual PLC hardware or I/O. The function of the Emulator, simply put, is to exercise the large majority of ladder instructions in any ladder program without the need of any PLC related hardware. The emulator does this by using the computer’s CPU (instead of the CPU in a PLC) to scan the ladder logic.
RSLinx – Training Guide C-3 Emulators available from Rockwell Software This training guide discusses the concepts and techniques used in the emulation of ladder logic programs using Rockwell Software’s RSLogix Emulate 5 or RSLogix Emulate 500 software. Rockwell Software offers several options for emulation of ladder logic programs, both DOS and Windows based.
C-4 RSLinx – Training Guide Setting Up and Basic Usage of the Emulator Getting the Emulator to scan a normal ladder logic program is quite simple. You just turn it on! This involves two steps: 1. Tell the emulator which ladder logic file you want to scan. Do this via: File/Open and pick the ladder file (.X5 or .ACH). 2. Tell the emulator to start scanning. Do this via: Select either the Run, Test or One Rung scan modes (more on modes later). In the above example, a ladder logic file named ICOM5DM7.
RSLinx – Training Guide C-5 The emulator can emulate multiple ladder logic files at one time, essentially creating a network of PLC’s analogous to a DH+ or DH485. The following “WHO” screen shows a WINtelligent LINX Super Who with multiple PLCs and the emulator. Note the “Emulator” is at station 1, the PLCs are at stations 0, 3 and 5 (PLC-5/10, 5/25, 5/15 respectively).
C-6 RSLinx – Training Guide Using LINX with the Emulator The Emulator uses RSLinx or Wintelligent LINX as its driver or “link” to other software packages such as RSView32 or RSTools HMI projects or RSLogix 500 or RSLogix 5 ladder logic software. The emulator functions much the same as a real PLC. Under Windows, it runs separately, and does it’s job (pretending to be a PLC) without being “aware” of what other software programs are “using” it.
RSLinx – Training Guide C-7 Configuring LINX: For software to communicate with a PLC (real or emulated), LINX must be running, and must have the proper communication driver set up and running.
C-8 RSLinx – Training Guide “Simulating” real world conditions Since the Emulator functions from within the computer environment, there needs to be some way of making the ladder program "think" that there is some real world I/O connected. The emulator allows for a variety of means of creating “action” in the emulated PLC, as well as offering several special troubleshooting tools you wouldn’t have with a real PLC.
RSLinx – Training Guide C-9 Analog Emulation Since the data table is fully emulated, you can simulate values raising and lowering if necessary by means of ladder logic, either in debug rungs (explained later), or simply rungs in the normal logic which would, via timers and math/compare/move instructions, raise and lower integer values in the data table. You could also use an HMI such as RSView32 or WINtelligent VIEW to change values, e.g., via slider bars or other downloading functions.
C - 10 RSLinx – Training Guide Scanning Modes The emulator allows for three types of ladder scanning modes and a Halt mode: Run Mode: continuous scanning of the program from start to finish and over again. Single/Test Mode: one complete scan of the program from start to finish. One Rung Mode: (See sample below) Scanning one rung at a time based on user command. Halt Mode: Somewhat analogous to the program mode, i.e.
RSLinx – Training Guide C - 11 Limit Execution to a Block of Rungs The Emulator has the ability to selectively execute only the rungs in a block that you define. Rungs outside the block are ignored - they won't have any affect on the rungs under study. This comes in handy when trying to determine the reason why a section of logic isn't acting the way that you expected. Perhaps you have incorrectly entered an address elsewhere in the program that is overwriting the data that you expected to get.
C - 12 RSLinx – Training Guide BreakPoints Breakpoints are special conditions that you assign to a rung or rungs. When these special conditions are met, scanning (execution) of your ladder logic will be frozen at that given rung/ breakpoint and the program scan will be turned to One Rung Mode. This way you can examine the data table, which is also now also frozen at that given point. There are two circumstances where you may wish to assign breakpoints.
RSLinx – Training Guide C - 13 scanned at all, either true or false, five times (e.g., I could find out if that subroutine were being scanned). Debug Files Another special feature of the Emulator that functions to simulate I/O devices is the concept of "Debug" files. Debug files are ladder programs that you include as part of your application program.
C - 14 RSLinx – Training Guide program file. That way, the information that the debug program temporarily stores cannot affect the normal flow of information in the rest of the data table. In operation, the Emulator causes the primary debug file to be scanned and executed prior to scanning any normal (or non-debug) program files. Creating a Debug File To create a Debug program file, call up the Program File display (in A.I.
RSLinx – Training Guide C - 15 Example & Strategies for a Debug File As a brief example, consider the following…In normal machine operation, to manipulate a part, an output from the programmable controller might open a solenoid which extends an arm attached to a hydraulic cylinder. As the arm reaches the end of its travel, a limit switch trips which de-energizes the output, which closes the valve and stops arm travel (if all goes well).
C - 16 RSLinx – Training Guide Debug Rung #1 Purpose: Read the status of the solenoid output bit in the main program and then start a timer when true. Instructions Used: Examine On (XIC) instruction with the same Symbol or address as the output connected to the solenoid. Timer On Delay (TON) used to simulate the cylinder travel delay, programmed with an available timer address with a suitable time delay. Debug Rung #2 Purpose: To monitor the timers done bit and then simulate the limit switch closure.
RSLinx – Training Guide C - 17 Next, the rungs from the debug file: Another possibility for a debug file might be to simulate a bit toggling on/off every 3 seconds, or going on for 4 seconds every ten seconds, etc. Again, a recycling timer could be used, but this time in conjunction with a comparison instruction of some sort. For example: In the example above, B3/12 would come on for 4 seconds out of 10.
RSLinx – Training Guide D-1 Appendix D: Using Network DDE Network DDE: Network DDE, referred to as NetDDE, is an extension of the DDE available in Windows. It provides information-sharing capabilities by opening two one-way pipes between applications. Network DDE is an extension of Dynamic Data Exchange (DDE) that can be used between two computers across the network.
D-2 RSLinx – Training Guide Starting Windows NT’s NetDDE Services Using NetDDE requires NT’s NetDDE Services to be started. Windows NT Network DDE services are not automatically started. They must be set up and started. You must have Windows NT administrator privileges to complete these procedures. Note: If the client machine is running in a Windows 95 environment, you must manually start NETDDE.EXE before using Network DDE. 1. Launch the Control Panel. 2. Double-click the Services icon. 3.
RSLinx – Training Guide D-3 Shared Topic Configuration: With RSLinx, no user intervention is required to implement NetDDE. The only difference from the user’s point of view is in the Application/Topic/Item string that they enter in the client application to implement DDE communications with RSLinx (see the examples on the next page).
D-4 RSLinx – Training Guide Syntax: The client setup for entering NetDDE syntax is similar to standard DDE syntax. The major additional piece of information is that you must identify the target computer where the server (e.g. RSLinx) resides, and instead of using the Application/Topic, you use the share name (which identifies the application/topic).. The computer name is added in the beginning of the command syntax, and the share name follows.
RSLinx – Training Guide D-5 RSTREND as Client, RSLinx as Server: To establish a Network DDE hot link from RSTREND to RSLinx the syntax for the request is: The Application is \\COMPUTERNAME\NDDE$. COMPUTERNAME is the name of the computer that has RSLinx installed on it and is to be the server of the data. This name is assigned in Windows NT. • To find this name start-up Control Panel in Windows and then double-click on the Network icon.
D-6 RSLinx – Training Guide RSView32 as Client, RSLinx as the Server: To establish a Network DDE link from RSView32 RSLinx create a DDE Node in RSView32’s Node Editor: In this example, the Application is \\COMPUTER_NAME\NDDE$. COMPUTER_NAME is the name of the computer that has RSView32 installed on it and is to be the server of the data. This name is assigned in Windows NT or 95.
RSLinx – Training Guide D-7 The Item is pictured below. It is created as a tag in RSView32’s Tag Database Editor using the NetDDE node created earlier. In this case, the DDE item is the PLC address is N7:21.
D-8 RSLinx – Training Guide Beyond RSLinx - Another NetDDE Example RSView32 as Client, Different RSView32 Computer as Server: If you are running RSView32 on two different computers, both of which are networked, you can use Network DDE to share data between them. When RSView32 acts as a NetDDE server, it provides real-time tag values to other RSView32 computers acting as NetDDE clients, or to any application that is NetDDE compliant. RSView32’s DDE server supports a maximum of 3000 tags on scan.
RSLinx – Training Guide D-9 Note: RSView32 is a DDE client by default, which means that it will not share it’s tag data with other DDE compliant programs unless configured to do so. • A RSView32 command called RTDATASERVERON starts RSView32’s DDE/OPC server and when the command is executed, RSView32 is changed to a Client/Server application. The Application is \\COMPUTER_NAME\NDDE$. COMPUTER_NAME is the name of the computer that has RSView32 installed on it and is to be the server of the data.
D - 10 RSLinx – Training Guide The Item is pictured below. It is created as a tag in RSView32’s Tag Database Editor using the NetDDE node created earlier. In this case, the DDE item is the RSView32 tag called EXAMPLE. In this Network DDE example, RSView32 would find the data for this tag in: • • a computer on the network known as “COMPUTER_NAME” • The address is an RSView32 tag called “EXAMPLE.” from the RSView32 project named “PROJECT.
RSLinx – Training Guide D - 11 NetDDE Reminders • If you are using NetDDE in Windows NT, you must configure the Network DDE DSDM services to start automatically before you can start the DDE Server in RSView32. This is configured under Services in the Control Panel. You only need to make this configuration change once. Ø If you do not do this, an error message is reported. However, RSView32 can still function as a local DDE server. You only need to make this configuration change once.
www.rockwellautomation.com Corporate Headquarters Rockwell Automation, 777 East Wisconsin Avenue, Suite 1400, Milwaukee, WI, 53202-5302 USA, Tel: (1) 414.212.5200, Fax: (1) 414.212.5201 Headquarters for Allen-Bradley Products, Rockwell Software Products and Global Manufacturing Solutions Americas: Rockwell Automation, 1201 South Second Street, Milwaukee, WI 53204-2496 USA, Tel: (1) 414.382.2000, Fax: (1) 414.382.