11-19-2018 08:47 AM - edited 11-19-2018 08:48 AM
Hello!
I'm trying to display a measured resistance with a boxplot. For that i modified a boxplot.vi I found in these forums. I want to be able to change "time measured in minutes" and "measurements per minute", which means i got an array of variable size. Each loop-iteration (of the loop fetching the data from my measurement device) adds one row and each row is displayed as one box in the plot.
Problem is that i have to manually add every row by indexing it in the array and building it into the array that's wired to the xy graph. As far as i know there is no way of increasing the size of "build array" programmatically and a loop won't work since only the data of the newest iteration will be available.
I can use the maximum number of boxplots thats likly to be used and just display as many as needed, but that isnt very efficient or good programming style at all.
Is there any other way?
Here's the .vi I used and a snippet of my program.
Greetings,
Auer
Solved! Go to Solution.
11-19-2018 08:51 AM
Hi Auer,
Is there any other way?
Sure!
Use an autoindexing (FOR) loop to create your plots!
(Whenever you need to repeat the same operation several times you should use a loop. No need to copy and paste the same code 10 times like in your image!)
11-21-2018 07:00 AM
Hello GerdW,
thanks for your suggestion, but I can't get it to work. I tried a few different things and I either get only one box plotted or the output array of the loop has too many dimensions.
Would you mind giving me an example?
Thanks,
Auer
11-21-2018 07:13 AM
Nevermind, I just got it. I also included the "build array" into my loop, which is why i always had too many dimensions.
Now that I see it, it's quite simple 😄
Greetings,
Auer