ni.com is currently experiencing unexpected issues.
Some services may be unavailable at this time.
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)].
已解决! 转到解答。
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)
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.
@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?
Thank you so much ! This has been bugging since a long time.
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.
this is a very interesting solution. Thank you