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.