From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
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?
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.