ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

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

How to connect cluster of arrays to a waveform graph

已解决!
转到解答

I am trying reproduce the block diagram that is attached with this question, but I cannot find out how  can I connect the waveform to my clusters of arrays. I am getting an error that  "The type of the source is 1D array of cluster of 2 elements. The type of the sink is 1D array of double [64-bit real (~15 digit precision)]. 

下载全部
1 条消息(共 7 条)
6,297 次查看
解答
已被主题作者 taifarif94 接受

You need an xy graph, not a waveform graph.

 

(Also remember that index array is resizable. You only need one instance. Your code picture is ancient, ~LabVIEW 4.0 or older)

0 项奖励
2 条消息(共 7 条)
6,282 次查看

Actually XY graph is just a name given to waveform graph. Is there any way I can do it on the waveform. I tried the XY graph and it works just fine.

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

@taifarif94 wrote:

Actually XY graph is just a name given to waveform graph. Is there any way I can do it on the waveform. I tried the XY graph and it works just fine.


No! An xy graph and a waveform graph are completely different. The example uses a real xy graph.

 

if you want to use a waveform graph, you need to set x0 and dx for the xaxis and only graph the Ys. It also assumes that the x-values are spaced equally. Are they?

0 项奖励
4 条消息(共 7 条)
6,251 次查看

Thank you so much ! This has been bugging since a long time.

0 项奖励
5 条消息(共 7 条)
6,241 次查看
解答
已被主题作者 taifarif94 接受

Here's one possibility to use a waveform graph. There are many other ways. (e.g. setting x0 and dx via property nodes, converting to a waveform, etc)

 

(Also you can transpose in the graph if you want (right-click...transpose Array) instead of explicit as shown)

 

 

 

A cluster of two scalars and a 1D or 2D array is a valid datatype for a graph. The first two scalars represent x0 (the x corresponding to the first element of the array) and dx (the time spacing between adjacent array elements) for the x-axis.

0 项奖励
6 条消息(共 7 条)
6,238 次查看

this is a very interesting solution. Thank you

0 项奖励
7 条消息(共 7 条)
6,224 次查看