Setting Waveform Attributes in LabVIEW

Updated Oct 31, 2025

Environment

Software

  • LabVIEW
  • LabVIEW NXG

Operating System

  • Windows
  • Mac OS X

Other


 

It is important to have additional information about the waveform for later usage. This information can contain the HW device name, the channel name that the waveform was got from, the units of measured data. This information can be helpful for later usage. It can be automatically displayed on the graph as a pre-defined plot name, can make it easier to analyze the data in TDMS files, and so on.

Below is discussed how you can get this information.

Once the waveform is acquired, you need to set the desired attributes accordingly. For this, you can use the Set Waveform Attributes function.

  1. Navigate to Programming>>Waveform in the palette.
  2. Locate and place the Set Waveform Attributes.vi on the Block Diagram. 
    icon
                                   
  3. Wire your waveform data to the VI.
    • Configure the desired attributes, such as start time, sampling rate, or units.
    • Each attribute has its unique name that has to be inserted into the name input of the function. If you want to configure the attribute using NI-DAQ you can refer to the table below.
NameAttributeData TypeAcceptable ValuesDescription
Hardware Device NumberNI_DeviceNumberStringAny value is acceptable for NI_DeviceNumber.NI_DeviceNumber is the device number of the hardware producing the waveform.
Name of ChannelNI_ChannelNameStringAny value is acceptable for NI_ChannelName.NI_ChannelName is the name of the virtual channel producing the waveform.
Name of Digital Line(s)NI_LineNamesStringAny value is acceptable for NI_LineNames.NI_LineNames is the name of the digital line in the waveform.
Unit for DataNI_UnitDescriptionStringVolts, PSI, and so forth are acceptable values for NI_UnitDescription.NI_UnitDescription is the unit of measure for the waveform.


Attributes can be set by the Express VIs as well.

You can see the difference between configured waveform and non-configured waveform in TDMS file format in the picture
Configured, Non-configured waveforms.png

 

Refer to the Waveform - Create VI in the LabVIEW\Examples\Waveform directory for an example of using the Set Waveform Attribute function.