12-09-2015 02:25 PM
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)].
Solved! Go to Solution.
12-09-2015 02:38 PM - edited 12-09-2015 02:41 PM
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)
12-09-2015 02:52 PM
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.
12-09-2015 02:59 PM
@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?
12-09-2015 03:04 PM
Thank you so much ! This has been bugging since a long time.
12-09-2015 03:05 PM - edited 12-09-2015 03:08 PM
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.
12-09-2015 03:09 PM
this is a very interesting solution. Thank you