LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform chart number of clusters

I am in the process of modifying a VI worked up by one of my coworkers.  My setup has 4 waveforms coming into a "Bundle" block and then the resulting cluster going to a waveform chart.  My coworker's VI was working with 8 waveforms.  When I copied his waveform chart into my VI and tried to connect the bundle of now 4 waveforms to that waveform chart, it gives me the error "You have connected 2 clusters with different contents.  Clusters (unnamed), a cluster of 4 elements, conflicts with cluster waveform chart, a cluster of 8 elements."  How do I change the number of elements that the waveform chart is expecting?  I've been poking around at it for a couple hours and havn't found a solution.  I tried creating a new chart but can't figure out how to make it accept clusters instead of the default double precision input.  Let me know if you need more description.  Thanks.
0 Kudos
Message 1 of 6
(4,626 Views)

I don't think it's possible to send in a cluster of waveforms to a waveform chart at all, regardless of how many waveforms are in the cluster. To send in multiple waveforms into a waveform chart, build them into an array of waveforms.

You do need to bundle scalar data into a cluster when sending multiple single-point signals into a waveform chart so that the waveform chart doesn't confuse an array of separate signals with an array of values from one individual signal.

Charts automatically change to the data type that is input into them. By default, they're scalar doubles. If you wire a cluster of scalars into them, then they change into scalars. My guess is you had a waveform chart configured to be a cluster of scalars, and then you were trying to wire an cluster of waveforms into it.

In any case, always refer to the example Charts.vi in the Example Finder (Help >> Find Examples from LabVIEW) for examples of properly sending in data to waveform charts. For waveform graphs, the example is called Waveform Graph.vi, and for XY graphs the example is called XY Chart.vi. Hope this helps!

Jarrod S.
National Instruments
Message 2 of 6
(4,603 Views)
I figured it out.  It is possible to pass a bundle of waveforms to the waveform chart.  For some odd reason one must first pass a bundle of scalers to the chart to initalize the chart to take a bundle.  Then the bundle of waveforms can be wired to the chart.  And it works.  Very odd...
0 Kudos
Message 3 of 6
(4,597 Views)
It does work.  It has a conversion dot, so I guess it is converting the waveforms to array of DBL.  Is this a bug?  Hidden feature?  A horrible abuse of polymorphism?
0 Kudos
Message 4 of 6
(4,594 Views)
It does appear to "work," but I don't think the chart displays any useful information. I bundled together 2 clusters of sine waveforms in the method described, but when I run the VI, the chart only shows 2 plots with a single value of zero. Furthermore, if I unbundle this cluster value from a local variable of the chart, I see the following:

Message Edited by Jarrod S. on 03-03-2006 04:38 PM

Jarrod S.
National Instruments
Message 5 of 6
(4,592 Views)
That actually makes a certian amount of sense.  Since the cluster format only allows one point per cluster element.  I guess it is doing two coersions.  Once from waveform to 1D array and another from 1D array to a single element.

It would be really nice if you could easily tell (via tooltip message or something) what sort of coersion is occuring at a coersion dot.  Sometimes it is obvious, but othertimes it is not.
0 Kudos
Message 6 of 6
(4,582 Views)