LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect cluster of arrays to a waveform graph

Solved!
Go to solution

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)]. 

Download All
Message 1 of 7
(6,170 Views)
Solution
Accepted by topic author 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 Kudos
Message 2 of 7
(6,155 Views)

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 Kudos
Message 3 of 7
(6,133 Views)

@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 Kudos
Message 4 of 7
(6,124 Views)

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

0 Kudos
Message 5 of 7
(6,114 Views)
Solution
Accepted by topic author 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 Kudos
Message 6 of 7
(6,111 Views)

this is a very interesting solution. Thank you

0 Kudos
Message 7 of 7
(6,097 Views)