Read SystemLink Tag Using LabVIEW

Updated Feb 8, 2024

Environment

Software

  • SystemLink
  • LabVIEW

This article goes through the steps on how to use the LabVIEW SystemLink API to read a SystemLink tag. This article assumes that you have basic knowledge related to SystemLink and how to use tags to store data.

Follow these steps to read a SystemLink tag using LabVIEW:

1. Place the Open Configuration VI in the block diagram and add the necessary inputs to communicate with the SystemLink Server. In the example below, the Open Configuration (HTTP Auto) VI is used which automatically retrieves credentials when executed on a managed system.
2. Use the Open Tag VI to open a reference to a tag on the server. Wire the path input with the name of the tag that you wish to read and the data type terminal with the type of data saved by this tag.
3. Create a while loop to continuously read a value and place a Read Tag VI within the while loop.
4. Once you have created the Read Tag VI select the type of data for this polymorphic VI that must match the type of data being read from the tag. Wire the reference output from the previously created Open Tag VI to the tag in terminal of the Read Tag VI.
5. Create a Close Tag VI outside the while loop to close the tag reference and wire the reference to the tag input.
6. Finally, place the Close Configuration VI after the Close Tag VI and wire the reference from the Open Configuration VI output to the configuration in terminal. This VI terminates connections associated with the configuration and invalidates open references to SystemLink objects on SystemLink Server or SystemLink Cloud.

Read SystemLink tag.png

Next Steps

Users can always verify the current value of the SystemLink tag by opening the web application and selecting Utilities Tags. Here is an example:

 
Tags.png