Read Multiple OPC Tags

Updated Dec 18, 2023

Reported In


  • OPC Servers
  • LabVIEW Datalogging and Supervisory Control Module
  • LabVIEW

Issue Details

  1. I would like to manually select multiple OPC tags, how can I do this?
  2. I would like to automatically retrieve all available OPC tags of a server/device/URL, is this possible?


1. You can use the DataSocket Select URL VI to do this. The following example lets the user choose the URL of multiple tags and read them simultaneously:
Programmatically Select URL and Read Multiple DataSockets Simultaneously

2. This is possible, but it requires the Datalogging and Supervisory Control (DSC) Module. Dynamic OPC Server Discovery and Connection explains in detail how this is done, and provides downloadable reference example VIs. In short, by using the DSC module, you can publish all OPC tags in the shared variable engine by using the NI Publish and Subscribe Protocol (NI-PSP). Once so, you can use shared variable engine property nodes to retrieve the OPC tags.