To download NI software, including the products shown below, visit ni.com/downloads.
1. Overview:
This example shows you how to programmatically change the names of Waveform using Set Waveform Attribute. This will allow for updated names within the Plot Legend.
2. Description
Waveform Graph_Modified Channel Name programatically changes the names of the channels in the plot legend, and Waveform Graph keeps the names of the channels as they were originally.
1. Wire a for loop to the number of waveform channel names you want to change
2. Place a Set Waveform Attribute down with a NI_ChannelName string constant
as the input to Name
3. Wire in the waveform signal to Waveform in Set Waveform Attribute
3. Wire a string constant array with the new names of the channels to Value of the Set Waveform Attribute
This can be done with arrays or dynamic data types. For dynamic data types you need to convert the signal to its component waveforms.
3. Requirements
LabVIEW 2012 (or compatible)
4. Steps to Implement or Execute Code
1. Open the VI "Programatically Change Waveform Channel Names_LV2012_NI Verified"
2. Set the new channel names
3. Run the VI
4. Names of the channels in the plot legend are updated
5. Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Thanks for posting! Could you please rename your attachment to include the LabVIEW version? "_lvXX.vi" is good enough. Thanks!