You can create an OPC Client I/O server to connect to a local or remote OPC server in a LabVIEW project or programmatically. After you create an OPC Client I/O server, you can configure a local OPC server to work with an OPC Client I/O server. You also can bind shared variables to the data items of the OPC Client I/O server.

Creating an OPC Client I/O Server in a LabVIEW Project

Complete the following steps to create an OPC Client I/O server in a LabVIEW project:

  1. In the Project Explorer window, right-click a target, such as the My Computer target, and select New»I/O Server from the shortcut menu.
  2. In the Create New I/O Server dialog box, select OPC Client and click the Continue button.
  3. In the Configure OPC Client I/O Server dialog box, specify the Registered OPC servers to which you want to connect. The Registered OPC servers option lists all the OPC servers installed on a particular Machine.
  4. Enter values for the Update rate (ms), Deadband (%), and Reconnect poll rate (s) settings.
  5. Click the Advanced tab to configure the Server Instance Preference, the Write Method Preference, and the Use Shared Variable Engine timestamps options.
  6. Click the Diagnostics tab to configure the settings for logging diagnostic information about the OPC Client I/O server.
  7. Click the OK button.

Creating an OPC Client I/O Server Programmatically

Complete the following steps to create an OPC Client I/O server programmatically:

  1. Add the Create and Configure IO Server Express VI on the block diagram.
  2. In the configuration dialog box that appears, select OPC Client from the I/O server type pull-down menu.
  3. Click the Set Attributes button to display the Configure OPC Client I/O Server dialog box.
    Note If you click the OK button before you set the attributes for this OPC Client I/O server, LabVIEW automatically displays the Configure OPC Client I/O Server dialog box.
  4. In the Configure OPC Client I/O Server dialog box, configure the settings for the new I/O server.
  5. Click the OK button to close the Configure OPC Client I/O Server dialog box.
  6. Click the OK button to close the configuration dialog box for the Express VI.