LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I programmatically change waveform attributes?

Solved!
Go to solution

Hello,

 

I am using the Formula VI to calculate a power level based upon measured values of voltage and current, both of which are dynamic data. The result has the name "(Formula Result)". I'd like to be able to change the name attribute to "Power", but I can't see how to do so.

 

Thanks,

 

Jonathan

0 Kudos
Message 1 of 4
(2,975 Views)
Solution
Accepted by topic author jmcglump

Here is one idea. Create a subVI that all it does is take the dynamic data wire in and passes it right back out.  In the subVI change the name of the indicator that the output connector is associated with to "Power".

 

Now when the signal passes through, the wire will be known as the name of the indicator in the subVI rather than the name "Result".

 

There may be a better way of doing this, but Dynamic Datatypes are difficult to really know what is going on behind the scenes, so I don't work with them much.

0 Kudos
Message 2 of 4
(2,945 Views)

Jonathan,

 

Do you just want to change the label of the result? You can just double-click the label and change it to whatever you want it to be.

Regards,
Claire Reid
National Instruments
0 Kudos
Message 3 of 4
(2,923 Views)

Claire,

 

I needed to change the attribute itself since I am writing the result to a file, and I want it to have the name "Power" there as opposed to "(Formula Result)"

 

Ravens Fan,

 

I was able to do as you suggsted using a sub-VI that reads in the dynamic data, converts it to a waveform array, then uses the Write Waveform Attribute function to change the channel name. Finally, I convert the waveform array back to dynamic data.

 

Thanks to you both!

 

Jonathan

0 Kudos
Message 4 of 4
(2,913 Views)