取消
显示结果 
搜索替代 
您的意思是: 

Programmatically change the number of plots drawn

已解决!
转到解答

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

0 项奖励
1 条消息(共 4 条)
2,857 次查看
解答
已被主题作者 Auer 接受

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!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
2 条消息(共 4 条)
2,852 次查看

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

0 项奖励
3 条消息(共 4 条)
2,803 次查看

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

0 项奖励
4 条消息(共 4 条)
2,800 次查看