LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clear chart history with only reference to cluster

Solved!
Go to solution

I have a cluster of UI elements that I save as a strict type def to be reused between programs. I can nicely send data into each of these elements. However, I am using waveform charts instead of waveform graphs so that I can nicely stack the data. In my application the user can select the data at different points in time so I need to clear the waveform chart history and then update the graph with the necessary values. This works nicely if I make a direct reference from the graph but I can't get it to work using just the reference to the cluster. I get either a type mismatch if I use a strict reference, or I don't see the history property at all if a non-strict reference is used. I have seen people post this problem before but hadn't seen any good solutions that work with just the cluster reference. Any thoughts?

0 Kudos
Message 1 of 4
(3,139 Views)
Solution
Accepted by topic author tesla745

In the BD, right-click on the reference to "Waveform Chart" and select Create -> Constant.  Wire that strictly typed constant to the "target class" input of "To More Specific Class".

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 4
(3,131 Views)

Great, this worked! One of the sources of the problem was that not all 'Waveform Chart (strict)" constants were equal. It seems that the data type that the chart receives was still embedded in this constant (array of doubles or waveforms). The constants look the same but the vi will fail if the inappropriate one is used.

0 Kudos
Message 3 of 4
(3,099 Views)

The same applies to all classes of class specifier constants.  When is says "(strict)", there could be lots of particulars that are different from the basic class; and there's no direct way to see what they are.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 4
(3,057 Views)