Вы находитесь на странице: 1из 23

Using RSView as an OPC Client

Covering RSView32 and SE

Page 2 of 23

Table of Contents

INTRODUCTION CONNECTING RSVIEW32


Start a New Project Create a Device Node Browse For Available Servers Create a Tag Check the OPC Connection

3 4
4 5 7 9 13

CONNECTING WITH RSVIEWSE


Open a New Project Define an OPC Server Browse For Available Servers Create a Tag Test the OPC Connection

15
15 16 18 19 22

SUMMARY
Contact Us

23
23

Page 3 of 23

Introduction
Rockwell Softwares RSView is one of many HMIs that can be used as an OPC Client to connect to an OPC Server. There are two versions that we will cover here, RSView32 and RSView SE standalone. The purpose of this document is to show the user how to make an OPC connection to TOPServer with the RSView products. The document is geared to the new user, although the experienced user may find value in this document as well. We make the assumptions that the user 1) has a valid installation of RSView32 or SE, 2) has a valid installation of TOPServer, 3) has TOPServer properly configured for communications to the PLC. TOPServer is a product of Software Toolbox and may be referred to as the server or OPC Server. RSView is a product of Rockwell Software and may be referred to as HMI, client, or OPC Client. You will also see OPC items referred to as tags or items. Also note that while it is not covered here nor is it recommended by Software Toolbox, the server can also act as a DDE Server to RSView.

Page 4 of 23

Connecting RSView32
The following steps will show you how to make an OPC connection from RSView32 to TOPServer. This was done using version 6.50.07 of RSView32.

Start a New Project


First, open a copy of RSView32 and start a new project.

Figure 1 Save the file with a descriptive name.

Figure 2

Page 5 of 23

This will open your new project in Edit Mode.

Figure 3

Create a Device Node


In RSView32 double-click on the System folder and then double-click on Node in the Project Control Panel. If you have multiple devices in the server project, you may want to create multiple nodes in RSView and link them to the devices in the server.

Figure 4

Page 6 of 23

This will show your node assignment screen.

Figure 5 Select a data source, in this case OPC Server, check the Enabled check box and give the source a meaningful name. Then we will browse for the server.

Figure 6

Page 7 of 23

Browse For Available Servers To browse for the server that you want to connect, click the button to the right of the Name text box.

Figure 7 This will show your list of available servers in the OPC Server Browser window. Select SWToolbox.TOPServer from the list of Servers and click OK.

Figure 8

Page 8 of 23

Select the Type of connection you are going to make to the server. Select Local for connection to a server on the same PC. Select Remote to connect to a server running on another PC. This will enable the Server Computer Name or Address field. You can enter either a computer name or IP address for the PC running the server. You will also want to set your update rate to 0. This tells RSView that the server will use the fastest possible rate to send data. If you design a large RSView project with multiple nodes, you may want to slow down the update rates of your nodes.

Figure 9 RSView allows you to create the node with or without an Access Path. By leaving the Access Path blank RSView can link to any tag within the server from this node. This means you can access tags from multiple devices in the server application. Had we entered an Access Path, only tags from a single device could be accessed through this node. Check "Enabled" so that the node will connect to the server when you run your RSView project. Click Accept and Close. This will show your server in your node list. Click Close.

Figure 10

Page 9 of 23

Create a Tag
Next, we need to create a tag(s) to access the data in the device(s). Double-click on the System folder and then double-click on Tag Database in the Project Control and open the Tag Database dialog box.

Figure 11 This will show your tag database dialogue.

Figure 12

Page 10 of 23

In the Tag Database, enter the tag name and description information and select the tag type. Set your minimum and maximum values as needed. In the Data Source section Click on the Device radio button. Then click the Node Browser button.

Figure 13 This will display your Node Browser window.

Figure 14

Page 11 of 23

Select the node name, in this case TOPServer, and click OK to assign the node to the tag you are defining. In our example, we have only TOPServer node that we have added. This will bring you back to the Tag Database tag definition. Click on the Address Browser button located to the right of the Address field.

Figure 15 This will show you the OPC Address Browser.

Figure 16

Page 12 of 23

Expand your server Node and channel that contains the device and highlight the device to show the tags in the right pane. Then select the tag you want to read in the right pane. Click OK. Remember, we are using predefined tags from TOPServer in this instance.

Figure 17 This will bring you back to the tag database, showing you the access path to the tag.

Figure 18

Page 13 of 23

Click accept to add the tag to the tag database. This will show you the tag in the tag list in the bottom right pane. Click Close to close the tag database.

Figure 19

Check the OPC Connection


We need to verify the OPC Connection to the server. To do this, double-click Tag Monitor in the System Folder.

Figure 20

Page 14 of 23

This will show you the Tag Monitor dialogue.

Figure 21 Enter the Tag Name or names that you want to check. In this case we entered "Tag1" which is the name of our tag that we added. Hit the Enter key after typing in the tag name. You should see a State of "valid" in the Tag Monitor window for the tag and a Value that is ramping or incrementing very quickly. If you see this, you have established a good OPC connection to the server from RSView32.

Figure 22

Page 15 of 23

Connecting with RSViewSE


The following steps will show you how to make an OPC connection from RSViewSE standalone to TOPServer. This was done using version xxx of RSView Studio.

Open a New Project


Open RSView Studio and choose the appropriate type of application and click Continue.

Figure 23

Page 16 of 23

Create a new application, giving it a descriptive name and any description necessary. Click Create.

Figure 24 This will load your blank Studio screen.

Define an OPC Server


To define an OPC Server, do the following. First, click File|New|OPC

Figure 25

Page 17 of 23

This will open the OPC Data Server Properties dialogue. Enter a meaningful name and description (optional) for the Server. Select if the server will be on the local computer or a remote computer. If remote, click the browse button in the Computer hosting the server section. If not the box will be inactive with localhost populated in the field, then skip to browse for the server.

Figure 26 This will bring up the network browser. Browse to and select the computer where your OPC Server resides. The computer name will then show in the text box in the Computer hosting the server section. Now we can browse for the OPC Server.

Page 18 of 23

Browse For Available Servers To browse for the server, click the browse button beside the OPC Server Name (ProgID) text box. This will open the OPC Server browser window.

Figure 27 Select Software Toolbox OPC Power Server and click OK. This will populate the server ProgID in the text box. Alternatively, you could just type the ProgID, SWToolbox.TOPServer, into the text box without browsing. Click OK to continue.

Figure 28

Page 19 of 23

You will see an informational message at the bottom of RSView alerting you that the server is now active.

Figure 29

Create a Tag
We now need to create the tags in RSView to read data from TOPServer. At this time, if it is not already open, then open your Application Explorer by clicking the second icon from the right in the toolbar. Right click on HMI Tags|Tags and click open.

Figure 30 This will open your tag database window. Here you will need to define your tag.

Page 20 of 23

In the Tag Database, enter the tag name and description information and select the tag type. Set your minimum and maximum values as needed. In the Data Source section Click on the Device radio button. Then click the Tag Browser button to the right of the address text box.

Figure 31

Page 21 of 23

This will show your Tag Browser window. Here you will browse to your server tags and select the tag you want to read. You will see when you select the tag the tag access path in the Selected Tag section at the bottom. Click OK.

Figure 32

Page 22 of 23

This will populate the tag address field. Click Accept to add the tag to the database and it will add the tag to the list in the bottom pane. Click close.

Figure 33

Test the OPC Connection


To test your OPC connection, you will want to set up a new simple display with a single tag with a known changing value. After creating your display, you will want to launch the runtime to verify the changing data from your tag.

Page 23 of 23

Summary
This document has been provided to assist the end-user in the basic configuration of Rockwell Softwares RSView family to read data from an OPC Server, specifically, TOP Server. From this guide, we hope that you have gained a better understanding of how TOPServer and RSView interact and in the process, some insight into OPC itself. While the document is not an exhaustive reference or Users Guide to RSView, it has been designed to cover the items that are needed by the vast majority of users to connect the client and server. If you have further questions or need assistance our experienced staff is more than happy to help. We can be contacted in the methods outlined below.

Contact Us
If you have any questions, or seek further information and help: Online Support Email Support Phone Support Fax Mailing Address Software Toolbox, Inc. 148 A East Charles Street, Matthews, NC, 28105. USA. http://support.softwaretoolbox.com/ Support@softwaretoolbox.com +1 (704) 849-2773 +1 (704) 849-6388