Get Custom Device Channel Value Programmatically From NI VeriStand System Definition File

Updated Aug 30, 2023

Reported In

Software

  • VeriStand
  • LabVIEW

Issue Details

I want to read the default channel value of my Custom Device programmatically in LabVIEW. How can I do the same?

Solution

The NI VeriStand System Definition File is just an XML that you should be able to parse with the help of .NET APIs in NI LabVIEW.
 
The steps involved to access the Custom Device Channel would be:
  1. Refer Constructor Node topic in NI LabVIEW Help to understand how .NET API .dlls can be called in LabVIEW.
  2. Call NIVeriStandSystemDefinitionAPI.dll in the Constructor node in order to instantiate a class within the .NET assembly. This assembly is located at : <LabVIEW Installation Directory>\VeriStand 20xx\.
  3. Use Property and Invoke Nodes in Application Control VIs and Functions to access properties and methods of the class by simply wiring in the class reference from the Constructor Node to the property or Invoke Node.
You will need to access the CustomDeviceChannel Class first and then use the Property node to access the Channel values.
 

Additional Information

The NIVeriStandSystemDefinitionAPI.dll automates the operation and configuration of a system definition file. This API performs the same operations as configuring the file in the System Explorer window.
 
Refer NationalInstruments.VeriStand.SystemDefinitionAPI Namespace to understand in detail the functioning of all the Classes in this assembly.