ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

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

Graph using only a few elements of array

已解决!
转到解答

Hi,

I am in "for loop", have array of elements(ex: 10) and doing some calculations.

Now i want to generate graph using this array. I can do it for all elements.

But i want to draw graph of only from Row 2 to 8 elements.

How can i?

下载全部
0 项奖励
1 条消息(共 6 条)
3,593 次查看
解答
接受人 sacsk123

Hello,

 

insert "Array Subset" function into the array wire before the graph und set "index" and "length" input as needed.

 

Hope this helps.

UliB

2 条消息(共 6 条)
3,569 次查看

Hi UliB,

This works like a charm.I didnt expect even after bundling arrays, we can select the start and end of array. Thank you for that.

Now,  little addition to this.

what if i have x-axis elements inside the "for loop" and y-axis elements are outside the for loop?

How to bundle these 2 arrays and draw graph?

The arrays and for loops confuse me a lot.

0 项奖励
3 条消息(共 6 条)
3,501 次查看

@sacsk123 wrote:

Hi UliB,

This works like a charm.I didnt expect even after bundling arrays, we can select the start and end of array. Thank you for that.

Now,  little addition to this.

what if i have x-axis elements inside the "for loop" and y-axis elements are outside the for loop?

How to bundle these 2 arrays and draw graph?

The arrays and for loops confuse me a lot.


You'll need as many X-elements as Y-elements - as i interpret your text it sounds like you'll end up with skewed arrays.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 项奖励
4 条消息(共 6 条)
3,493 次查看

Hello,

your data type is 1D array of cluster of 2 elements, so you have to bundle your elements together and create an array (autoindexing).

I see you are using picture indicator to show the graph. I would use a XY Graph (not 2D picture), which can use a cluster of two 1D array as data type. In this case you would bundle X array and Y array after for loop together and wire it directly to XY Graph indicator.

 

Hope this helps

UliB

0 项奖励
5 条消息(共 6 条)
3,475 次查看
解答
接受人 sacsk123

Hi UliB,

In for loop,I was clubbing elements of 2 arrays using the "bundle by name" and come out of loop and use XY graph.This works fine.

But for this case(1 array inside the loop and other array outside the loop) - i just got both arrays outside the loop and used "Build XY graph". It worked for me.

 

Thanks for the help.

0 项奖励
6 条消息(共 6 条)
3,466 次查看