LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Variable number of plots in LabView 6i

G'day,
Bit of a LabView newbie here. I'm trying to plot a variable number of
values in a waveform chart under LabView 6.0i. There is a boolean
associated with each value to determine whether it should be plotted or not.
One way that I've thought of is to make an array containing all the
booleans, search through this in a for loop and build up an array of all the
values to be plotted, then convert this into a cluster and shove it out to
the chart. Is this a reasonable way of doing this, or am I not thinking
LabView enough?

Alf Katz.
0 Kudos
Message 1 of 2
(2,243 Views)
This is a reasonable approach. I assume when you say "variable number of values" that each value is a scalar, not a graph in and of itself. Even better than searching in a For loop is to search in a while loop (using the search 1-D array function) and end the loop once the search function returns -1 (not found). That way the loop completes very quickly if the data set is sparse.
0 Kudos
Message 2 of 2
(2,243 Views)