To access data items on a local or remote OPC server, you need to create an OPC client instance. You can create an OPC client instance interactively or programmatically.
Creating an OPC Client Instance Interactively
Complete the following steps to configure a DSC Module OPC client instance interactively.
- 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.
- In the Create New I/O Server dialog box, select OPC and click the Continue button.
 |
Note If you have not specified a default project library, LabVIEW creates a project library and places the OPC client instance inside it. Right-click a library and select Make Default to specify a library as the default library. |
- In the Configure OPC Client Instance dialog box, select the Machine from which you want to select a Registered OPC Server.
- Enter values for the Update Rate (ms), Deadband (%), and Reconnect Poll Rate (s) settings.
- (Optional) Click the Advanced tab to configure the Server Instance Preference and the Read/Write Method.
- Click the OK button.
Creating an OPC Client Instance Programmatically
Complete the following steps to configure a DSC Module OPC client instance programmatically.
- Place the Create and Configure IO Server Express VI on the block diagram.
- In the configuration dialog box that appears, select OPC from the I/O Server Type drop-down list.
- Click the Set Attributes button to display the Configure OPC Client Instance dialog box.
 |
Note If you click the OK button before you set the attributes for this I/O server instance, LabVIEW automatically displays the Configure OPC Client Instance dialog box. |
- In the Configure OPC Client Instance dialog box, configure the settings for the new I/O server.
- Click the OK button to close the Configure OPC Client Instance dialog box.
- Click the OK button to close the configuration dialog box for the Express VI.