Creating OPC Client I/O Servers
- Updated2025-11-07
- 2 minute(s) read
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:
- 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 Client and click the Continue button.
- 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.
- Enter values for the Update rate (ms), Deadband (%), and Reconnect poll rate (s) settings.
- Click the Advanced tab to configure the Server Instance Preference, the Write Method Preference, and the Use Shared Variable Engine timestamps options.
- Click the Diagnostics tab to configure the settings for logging diagnostic information about the OPC Client I/O server.
- 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:
- Add the Create and Configure IO Server Express VI on the block diagram.
- In the configuration dialog box that appears, select OPC Client from the I/O server type pull-down menu.
- 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.
- In the Configure OPC Client I/O Server dialog box, configure the settings for the new I/O server.
- Click the OK button to close the Configure OPC Client I/O Server dialog box.
- Click the OK button to close the configuration dialog box for the Express VI.