Example Code

Programmatically Select URL and Read Multiple DataSockets Simultaneously

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.


  • LabVIEW
  • LabVIEW Communications

Code and Documents



This example allows you to choose the URL of multiple tags programmatically and read them simultaneously. This allows you to read tags and not have to know the URL of each tag beforehand.



DataSocket Select URL.VI displays a dialog box for the user to select a data source and returns the URL to that data. Then open the connection to each tag with a 10s timeout. This example will continuously read the tags until user specifies a stop. Close the connection to each tag individually


  • LabVIEW 2012 (or compatible)

Steps to Implement or Execute Code

  1. Choose number of tags.
  2. Run the VI.
  3. Choose server.
  4. Get the tag URLS and Data.

 Additional Information or References  

 Front Panel 

DSFP.pngVI Snippet



**This document has been updated to meet the current required format for the NI Code Exchange.**


Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.