22
1 Tech Note #13 Integration of the WonderWare InTouch9.5 HMI and CTC OPCServer2.0 This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via a simple example. 1. Create Tags in the CTC OPCServer2.0 It is assumed that the CTC OPCServer has been installed correctly. The OPC Server can be launched from the desktop icon shortcut or from the shortcut in the START menu. After starting the OPCServer, an empty project is created and the main screen is shown. See below: The screen is made up of two sections : left and right along with a toolbar to the far left of the window. The left section is the tag tree and depicts the tree structure of a CTCOPC project. The right section is the property editor and allows the user to edit various parameters for the controllers and tags.

Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

1

Tech Note #13

Integration of the WonderWare InTouch9.5 HMI and CTC OPCServer2.0

This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via a simple example.

1. Create Tags in the CTC OPCServer2.0

It is assumed that the CTC OPCServer has been installed correctly. The OPC Server can be launched from the desktop icon shortcut or from the shortcut in the START menu. After starting the OPCServer, an empty project is created and the main screen is shown. See below:

The screen is made up of two sections : left and right along with a toolbar to the far left of the window. The left section is the tag tree and depicts the tree structure of a CTCOPC project. The right section is the property editor and allows the user to edit various parameters for the controllers and tags.

Page 2: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

2

We will create a new, simple project to illustrate the process of creating tags. In this example, we will assume one CTC 2700-5 controller exists and its IP address is 169.254.203.250. This controller is added to the project by clicking the control icon on the toolbar or by right-mouse clicking the Controllers node in the tag tree. See below:

A property box appears asking you to name the controller. This name will get sent out to OPC clients such as WonderWare In Touch. In this example we will call the controller “2700Node3” See the next page :

Page 3: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

3

Once the name is entered and the “OK” button is pressed, the controller will appear on the left side tag tree. See below :

Page 4: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

4

From the previous page, the right side of the screen (property editor) has filled in with a few default values for this node(controller name). The property editor will change and update depending upon which node is selected in the tag tree. The most important property that we need to edit is called HOST . This field defines the address and the protocol that the CTC OPCServer will use to communicate to the controller. In our example, the Host parameter should be 169.254.203.250. This is accomplished by clicking in the blank field next to Host and entering the address. See below:

Adding multiple controllers is as simple as repeating the process described above. You would assign a different IP address and a unique name to each controller. To add a tag to a controller, highlight the controller in the tag-tree section and then click the appropriate icon in the toolbar for the type of tag you want to create. On the next page, we will add two tags to the controller.

Page 5: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

5

A prompt will appear for the name of the tag. In our example, we will choose the name mstimer and then click the OK button.

If a numeric name (such as “13002”) is entered for a tag name, then the Index property is automatically set to the value of the numeric name. If an alphanumeric name is entered (such as “mstimer”), then the Index property must be set manually. Therefore, to finish creating the “mstimer” tag, we should put the register number for this tag located in the Index property from its default value of “0” to a value of 13002, which corresponds to the millisecond timer in the controller. Screen shot on next page.

Page 6: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

6

Now let’s add the digital output tag in the same manner. Select a digital output tag from the icon on the toolbar. See below:

When you click on the output icon, a window opens asking for the name of the output to be inserted. Chose a name and click OK. See the next page.

Page 7: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

7

Since it is the second output, the index should correspond to the 2nd physical output channel. See below:

We now have 2 tags created in the OPCServer. Other tag types – flags, analog I/O and digital inputs are created in a similar manner. NOTE : Index Values The Index Value field in the CTCOPCServer is the actual number of the resource which you would like to assign to the tag you create. See the examples below: The index value for the millisecond timer is 13002 since register 13002 holds that value. Your OPC tag would be a register type with index number 13002.

Page 8: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

8

Digital I/O and Analog I/O use the actual channel number for the Index Value. For example, if you set up a digital Output tag in the OPCServer and call it Output 1(to correspond to the first physical output channel), then the Index Number would be 1. Output 2 would be 2, 3 would be 3, etc. NOTE : Resource Types The following are supported resource types in the CTCOPCServer :

� Registers � Digital Inputs � Digital Outputs � Analog Inputs � Analog Ouputs � Flags

Page 9: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

9

2. Setting Up, Configuring and Using OPCLink from WonderWare, Definitions

A. Configuring OPCLink Once the Wonderware OPCLink has been installed, some configuration is required. Configuring OPCLink automatically saves the data in a configuration file. If no configuration file is selected, you will be prompted to select a file name.

B. Configuring OPC Servers Use the OPC Servers option from the Configure menu to access the OPC Server Configuration window. This window lists all OPC Servers alphabetically, referenced by configured topics.

To configure the settings for a listed server name, double-click the server name, or select the server name then click Configure. · The OPC Server Settings window appears:

Page 10: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

10

C. Configuring a Topic Definition Use the Topic Definition option from the Configure menu to create new, modify, or delete topic definitions. One or more topic definitions must exist for each OPC server that OPCLink will communicate with. Each topic definition must contain a unique name.

When this option is selected, the Topic Definition dialog box will appear:

This dialog box appears when the New or Modify button is selected in the Topic Definition dialog box. This dialog box is used to define the settings for the topic name. For details on an item in this dialog box, click on it in the example below:

Page 11: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

11

The Topic Name should be an intuitive name for a group(s) of resources found as tags in an OPCServer, in this case CTC's OPCServer2.0.

The Node name is the name of the PC on which the OPCServer is found. The node fields can be left blank or labeled “localhost”. The OPC Server Name is the actual name of the OPCServer being used.

To determine the correct OPC Path entry, click on the browse tab as listed above. You should see the window listed on the next page. The OPC Path will be filled in as the OPC Browser finds all OPCServers and their associated tags. Cut and paste the contents of the OPC Path field into the OPC Path field in the window for the topic definition.

Page 12: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

12

Once the Topic Definition is done correctly, you are ready to launch the InTouch9.5 WindowMaker.

3. Launching and Getting Started with InTouch9.5 Window Maker A. From the Start button, click on the InTouch9.5 link. See Below:

The InTouch Application Manager screen will launch as shown below. If this is the first time you have used InTouch9.5, no Windows will show up and you will have to create them. In the example screen below, 5 Windows already exist. See below:

Page 13: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

13

B. From the File tab, click on “New”:

A new window appears asking you to select a path for the New Application. Once you have chosen a path, click “NEXT”

Page 14: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

14

The Next two screens will ask you to enter a name for a Directory to store the Application in. After creating one or browsing and entering a location, click next. This next screen will ask for the name of the new application. Enter one and click finish. If you are successful, a new InTouch application will be highlighted in the Application Manager screen. See Next page:

To launch the new application, Double Click on the highlighted name or click the WindowMaker icon in the upper left of the screen. When the WindowMaker opens, right-mouse click on “Window” in the upper left explorer bar. This will allow you to create a new HMI window.

Page 15: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

15

By clicking on new, a properties window comes up, allowing you to name and describe the new HMI window. Fill in the appropriate data requested to create a new Window.

Page 16: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

16

D. Using the Tag Creator in WindowMaker

Now you should have Windowmaker launched with a new project. In the example below, it is called “new window” See below:

As you can see in the example directly above, the Tag Creator is highlighted. The final focus of this document will deal solely with creating resource tags to be used by Windowaker to create HMI screens. It is not the intent to be an explanation of how to use the WindowMaker package. Before continuing, it is desirable to review/define two definitions : Topics and Access Names. A TOPIC is an application-specific sub-group of data elements. In the case of data coming from a CTC OPC Server program, the topic name is the exact same name configured for the topic in the OPC Server program. An ACCESS NAME contains the information that is used to communicate with other I/O data sources including the node name, application name and topic name.

InTouch uses Access Names to reference real-time I/O data. Each Access Name equates to an I/O

Page 17: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

17

address, which can contain a Node, Application, and Topic. Understanding this, we can now create our first tag. Double-click on the Tag Creator in the Explorer bar. A field window as shown below should come up:

As it states, any topics listed have been linked and found by the OPCLink program and have OPCTags already created in the CTCOPCServer. We now have to create an Access Name so that InTouch symbols can access the OPC tag data. Highlight the topic listed and click on create. See the next page as to what screen should appear:

Page 18: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

18

As you can see, we have created an Access name which is the same as the topic name associated with the CTCOPCServer. The node name is left blank or should be “localhost” for the PC on which the OPCServer2.0 is located. The Application name is filled in as is the topic name. Make sure DDE is selected. SuiteLink is only selected if one uses the FSGateway program from WonderWare instead of the OPCLink program. The default on the update interval is 1000ms, but can be lowered drastically to 1mS if need be. Clicking “OK” will bring up the Tag Creator as we have now defined both a Topic and Access name which allows us to visualize/import CTC's OPCServer tags already created. See the next page:

Page 19: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

19

In the example screen above, the timer tag (millisecond timer) in CTC's OPCServer is highlighted. You will also notice that in the “Data Types” field, “use native type” is chosen. This means that the CTC controller will send to the OPCServer the default data type(double signed word,i.e. 32 bit signed word) and that the OPCServer will try and use this data type to pass info to the InTouch package. Below, you will find a short list of WonderWare symbols and what type they are: – Switches and pushbuttons, I/O Discrete type, prefix is “d” for discrete – Lamps, sliders, alarm displays,value displays,etc., I/O Integer, prefix is “i” for Integer An example will illustrate the significance of the above mentioned data types : If I use a simple pushbutton symbol to toggle an output in the CTC Controller, since it is an I/O discrete type(Boolean), I can only use it with a tag set up in the CTC OPCserver as a digital output. I can not use it with a tag set up as a register, even if it corresponds to the output register, e.g. 1001 in the CTC controller.

Page 20: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

20

Continuing on, with the timer tag highlighted, I click on “Create Tag”. A tag properties window appears as below:

As you can see, the tag name has already been created. Notice the “i” prefix. This is because the “timer” tag in the OPCServer is associated with a register (13002) and is natively a 32 bit integer. If we try and change the type in the window above, it will not allow it as there would be a data type mismatch. The comment field is actually the path through the CTC OPCServer to get to this particular tag. By clicking “OK”, we create this tag in the InTouch Tagname Dictionary for use on the HMI Screen. See below:

The Tagname Dictionary is accessed by clicking on the icon in the Explorer tree on the left side of the WindowMaker screen.

Page 21: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

21

Using the same procedure just viewed, we can create a digital output tag.

It can then be found in the Tagname Dictionary. See next page.

Page 22: Tech Note #13...This tech tip will show you how to set up CTC’s OPC server with Wonderware Intouch 9.5. It explains how to use both the CTC and Wonderware configuration tools via

22

Notice the prefix “d” on the tag name. It is considered a discrete data type, i.e. Value 0 or 1. It can only be used with InTouch symbols which support discrete data types. All tags are created in the manner illustrated above. It is important to remember the following to insure success: – The tags should first be created in the CTC OPCServer with intuitive names – The WonderWare OPCLink program should be configured to recognize the path and tags in

the CTC OPCServer2.0 – A new project with new window(s) needs to be created before you can create tags – The tags must have the correct data types associated with them to be recognized by the

symbols/widgets in the HMI screen.