Manage OPC Channels

 

In this Topic Hide

About OPC Channels

OPC Specification Types

Using OPC DA Specifications

Using OPC UA Specifications

Create an OPC Channel

Add a Channel Message

Create Trust Between UA Server, UA Client and LDS

Configure the OPC UA Server to trust the LDS

Configure the LDS to trust the OPC UA Server

Configure the OPC UA Server to trust ATS Bus

Configure the OPC UA Server endpoints

About OPC Channels

OPC Channels are used to create named connections to the shop floor via an OPC Server. These connections are called tags. In order to create a tag you need to specify the server on which the data exists, the format of the data, when the data should be read and the address of the data.

This information is specified in different layers as shown below where the channel contains messages which contain the tags:

ATS Bus can handle OPC connections using either the more recent OPC Unified Architecture (UA) specifications or the legacy OPC Data Access (DA) specifications.

OPC Specification Types

Using OPC DA Specifications

The Workcenter bus stop must be installed on the same system as the OPC DA server because the OPC channels do not support remote OPC servers.

ATS Bus Cockpit on the other hand can be installed on another system but needs access to the OPC DA server to get the OPC configuration.

ATS Bus Cockpit accesses the OPC DA server through a service named OPC Browsing Service which is available in the ATS Bus installer. This helper service invokes OpcEnum (an OPC foundation OPC server enumerator) to query the available OPC servers on that host.

In order to configure the OPC DA channel the OPC Browsing Service must be installed and started on the system that hosts the OPC DA server.

Using OPC UA Specifications

One of the advantages of OPC UA specification is that the Workcenter Bus Stop can be installed on a separate host to the OPC UA server.

A Local Discovery Server (LDS) is required. The LDS does not need to be installed on the host where the OPC UA server is installed.

Create an OPC Channel

1.     Select the Workcenter Bus Stop tab.

2.     Click OPC Channels.

A list of the existing OPC channels is shown.

3.     Click Add.

A new window opens.

General Details for OPC DA Specifications

4.     Enter a name for the channel.

5.     Select Data Access in the OPC Specification drop-down list.

6.     Enter the Browsing Host. This is the hostname of the computer that hosts the OPC Browsing Service.

7.     Enter the Browsing Port. This is the port where the browsing service listens.

8.     Enter the OPC Host. This is the hostname of the computer that is running the OPC Server. Its value must match the Browsing Host value.

9.     Click Refresh to update the list of OPC servers.

10.  Select the OPC Server from the drop-down list.

11.  Enter a description in the default language and any other required languages.

12.  Add channel messages as described below.

General Details for OPC UA Specifications

4.     Enter a name for the channel.

5.     Select Unified Architecture in the OPC Specification drop-down list.

6.     Enter the Discovery Host. This is the host that runs the OPC UA Local Discovery Service (LDS). The service is on port 4840.

7.     Click Refresh to update the list of OPC servers.

8.     A dialog asking to trust the OPC Server may appear. Click Yes if you trust the server.

9.     Select the OPC Server from the drop-down list.

10.  Enter an Endpoint Address. Endpoints specify which security policy is used for communication (signing and encryption).

11.  Enter a description in the default language and any other required languages.

12.  Add channel messages as described below.

Add a Channel Message

Channel messages can be created once an OPC channel has been defined.

1.     While editing an OPC Channel select the Channel Messages tab.

All existing channel messages contained in the channel are listed. The table shows the name of the channel message, the direction in which the message is going and whether or not the message is currently active.

2.     Click Add.

3.     Enter a name for the channel message.

4.     Select a Message definition. Message Definitions act as templates when adding messages to a Channel. They specify whether the message is being uploaded from equipment or downloaded to equipment and also list the different data fields that will be available in the message.

The Tags control opens. In the right-hand pane it lists the fields contained within the message. The left-hand pane lists tags that will be created that match those fields.

5.     If you don't want tags to be created automatically disable Create remaining tags for message fields.

6.     Use the arrows on the right-hand side to re-order the fields. To refresh the list of tags to match it disable and enable Create remaining tags.

7.     If required, enable Generated tags include data source.

8.     Click Save. You are returned to the New Channel Message window.

9.     Select an Acquisition Type. This will define how frequently the channel message is read.

For Upload messages the following acquisition types are available:

o       Interval Acquisition

o       Trigger Tag Acquisition

o       On Change Acquisition

For Download messages the following acquisition types are available:

o       Trigger Tag Acquisition

10.  Select the required Acquisition Settings.

11.  If required, enable Handshake Only. This should be selected if the message is to be used for a heartbeat interface.

12.  Enable Active so that the channel message can be used.

Add and Modify Tags

The tags provide the link to the location of the data on the server.

13.  Click Add below the Tags pane (or Edit to modify an existing tag).

A new window opens.

14.  Enter the name of the tag in the Description field.

15.  Select a Data Type. This is the format in which the data will be received (e.g. Integer, Text, Char, etc.).

16.  Enable the Active checkbox to ensure the tag is active.

17.  If required, enable Mandatory. If a message is received and a mandatory tag doesn't have a value then the message won't be processed.

The source and destination can now be selected. The source and destination will depend on whether it is an Upload or Download message definition.

18.  Select the Data source and the additional information the data source requires. This can be one of the following:

Name

Description

Required Information

OPC access path (upload only)

The value is read from an OPC data source.

Enter the OPC data source. This can be entered manually or you can click the search button () to locate it. In the Browse OPC tags dialog click Refresh to view the potential tags.

Message Field (download only)

The message field.

Select the message field.

Constant value

The tag will always be the same value.

Enter the value to be used.

Translation table

The value is read from an OPC data source and then translated using a data translation table.

Select the translation table to use and the access path for the source value that will be translated.

Function evaluation

The value is read from an OPC data source and then modified using a function.

Enter the function to use and the access path for the source value that will be modified by the function.

19.  Select the Destination. This will either be an OPC Access Path (for download) or a message field (for upload).

20.  Click OK.

The tag is added to the channel message.

21.  Click OK.

The channel message is added to the channel.

22.  Click OK.

The channel is saved.

Create Trust Between UA Server, UA Client and LDS

In order to use the LDS (Local Discovery Server), the OPC UA Server and LDS should trust each other. This is done by using certificates.

Configure the OPC UA Server to trust the LDS

The following steps are required to have a Kepware OPC UA Server trust the LDS:

1.     Open the Kepware OPC UA Configuration manager.

2.     Go to the Discovery Servers tab.

3.     Click Import….

4.     Select C:\ProgramData\OPC Foundation\UA\Discovery\pki\own\ualdscert.der and click Open.

5.     Click Close.

If the certificate file is not present in that location then first perform the following steps:

6.     Open the Microsoft Management Console by entering mmc.exe in a dos console.

7.     Select File > Add or remove Snap-in (or press Ctrl+M)

8.     Select Certificates from the Available snap-ins and click Add.

9.     Select Computer account and click Next.

10.  Select Local Computer and click Finish.

11.  Click Ok

12.  Go to Console Root > Certificates (Local Computer) > UA Applications > Certificates.

13.  Right-click on the Certificates leaf under UA Applications in the left hand side pane and select All tasks > Import.

14.  Click Next.

15.  Click Browse.

16.  Locate and open the ualdscert.der file that you were trying to import in step 4. You may need to change the file type to All files (*.*).

17.  Click Next.

18.  Select Place all certificates in the following store and click Browse.

19.  Select UA Applications and click OK.

20.  Click Next.

21.  Click Finish.

22.  Restart the OPC server.

23.  Run the Kepware OPC UA Configuration Manager.

24.  Select the Discovery Servers tab.

25.  Click Import….

26.  Locate and select the exported certificate file.

27.  Click Open.

28.  Click Close.

Configure the LDS to trust the OPC UA Server

The first step in this process is to export the Server instance certificate to a file, the following steps are required:

1.     Run the Kepware OPC UA Configuration Manager.

2.     Select the Instance Certificates tab.

3.     Click Export server certificate….

4.     Enter a filename and click Save.

5.     Click Close.

6.     Open the Microsoft Management Console by entering mmc.exe in a dos console.

7.     Select File > Add or remove Snap-in (or press Ctrl+M)

8.     Select Certificates from the Available snap-ins and click Add.

9.     Select Computer account and click Next.

10.  Select Local Computer and click Finish.

11.  Click Ok

12.  Go to Console Root > Certificates (Local Computer) > UA Applications > Certificates.

13.  Right-click on the certificate that has been issued to UA Local Discovery Server and select All Tasks > Import.

14.  Click Next.

15.  Click Browse.

16.  Select the file that has been saved. You may need to change the file type to All files (*.*).

17.  Click Next.

18.  Select Place all certificates in the following store and click Browse.

19.  Select UA Applications and click Ok.

20.  Click Next.

21.  Click Finish.

Configure the OPC UA Server to trust ATS Bus

All listed clients need to be trusted in the OPC UA Server configuration. The steps will vary depending on the software used. The following steps are for Kepware.

1.     Open the OPC UA Configuration application.

2.     Select the Trusted Clients tab.

3.     Right-click on the untrusted ATS Bus OPC UA Client and select Trust.

Configure the OPC UA Server endpoints

The OPC UA client requires endpoints to communicate with the OPC UA Server.

1.     Run the Kepware OPC UA Configuration Manager.

2.     Select the Server Endpoints tab.

3.     Click Add….

4.     Change the settings according to your requirements and click Ok.

5.     Click Close.

ATS Bus OPC UA Client certificate is used for the low level connection between ATS Bus and the OPC UA server