Setting Waveform Attributes in LabVIEW

Updated Dec 30, 2021



  • LabVIEW

Operating System

  • Windows
  • Mac OS X



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.

When the waveform is got you have to set the attributes that you want. For this, you can use the "Set waveform attributes" function.
The "Set waveform attributes" function can be found in the "Waveform" section of the Functions Palette in LabVIEW. To open the Function Palette Right Click on the Block Diagram.
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.