Using Vision Builder AI as an OPC Server

Publish Date: Jan 03, 2012 | 4 Ratings | 3.75 out of 5 | Print | Submit your review

Table of Contents

  1. Overview
  2. Creating a Shared Variable
  3. Setting the Value of a Shared Variable
  4. Creating Tags to Be Shared by the OPC Server
  5. Connecting to Vision Builder AI as an OPC Server

1. Overview

This document explains how to configure Vision Builder AI as an OPC server and use shared variables to share results produced by Vision Builder AI steps. OPC is a series of standard specifications that define the communication of real-time plant data between control devices from different manufacturers. OPC Data Access communication is a client server based communication.

Shared system variables allow you to share data with Vision Builder AI. You can use shared system variables to publish data using OPC.

 

Back to Top

2. Creating a Shared Variable

Complete the following steps to create a shared system variable.

  1. Select Tools»Variable Manager.
  2. Select the System Variables tab.
  3. Click Add.
  4. Enter a name for your variable and select a Type and Initial Value.
  5. Enable the Publish on Network checkbox.
  6. Click OK.
  7. Click OK to exit the Variable Manager.

 

Back to Top

3. Setting the Value of a Shared Variable

Use a Set Variable step to set the value of a shared variable. The Set Variable step is located on the Use Additional Tools palette.

Complete the following steps to set the value of a shared variable.

  1. Add a Set Variable step to the inspection. The property page for the step opens.
  2. Select a variable in the Variable list.
  3. Use the Operation controls to change the value of the shared variable or to set the value of the shared variable to a measurement.

 

Back to Top

4. Creating Tags to Be Shared by the OPC Server

This section applies only if Vision Builder AI is running on a remote target. If Vision Builder AI is running on Windows, continue to the next section.

If Vision Builder AI is running on a remote target, you must use a Windows computer to create tags and link them to shared system variables. For example, you might use the same computer that you used to configure the remote target. The Windows computer must meet the following requirements:

  • Either Vision Builder AI or NI LabVIEW is installed.
  • Distributed System Manager 2010 or later is installed. Distributed System Manager 2010 is available here.
  • The computer must remain available on the network in order to use an OPC client to access the data published by Vision Builder AI running on the remote target.

 

Complete the following steps to create the tags to be shared by the OPC Server.

  1. Launch the NI Distributed System Manager. From the Start Menu, select All Programs»National Instruments»Distributed System Manager 2010.
  2. Expand My Systems.
  3. Right-click localhost and select Add Process.



  4. Enter a Process Name, for example VBAI OPC Server.
  5. Click OK. The VBAI OPC Server process is listed under localhost.
  6. Right-click VBAI OPC Server and select Add Variable.



  7. Enable the Enable Aliasing checkbox.
  8. Click Browse and expand the IP address of the remote target where the inspection is running.
  9. Expand the Vision Builder item and select the variable that you want to share.
  10. Ensure that the Make properties match selection? checkbox is enabled and click OK.
  11. Click OK to create the OPC tag and link the tag to the Vision Builder AI variable.
  12. In the Name field, enter the name of the OPC tag you want to create. To prevent confusion, use the name of the selected variable.
  13. When you are finished creating tags, close Distributed System Manager.

Tags that you create are listed in your OPC client when when you connect to Vision Builder AI as an OPC server.

Distributed System Manager is only required to add or delete tags. You do not need to launch Distributed System Manager to enable OPC communication. Do not use Distributed System Manager to delete any variables listed under the Vision Builder process.

Back to Top

5. Connecting to Vision Builder AI as an OPC Server

Configure your OPC client to connect to the following OPC server: National Instruments.Variable Engine.

Use your OPC client to locate the shared variable tags:

  • Vision Builder AI running on Windows—The shared variable tags are listed in the Vision Builder folder.
  • Vision Builder AI running on a Remote Target—The shared variable tags are listed in a folder with the same name as the process you created in Distributed System Manager 2010, for example, VBAI OPC Server

 

Back to Top

Bookmark & Share


Ratings

Rate this document

Answered Your Question?
Yes No

Submit