10-22-2008 03:08 PM
I've opened NI Examples:: Fundamentals:: Graphs and Charts:: XY Graph.vi, and I'm having trouble understanding purpose of two single input/single output Bundle VI's placed just right before XY Graph (as it is shown on the picture). Can anyone briefly explain to me, what is Bundle VI doing in this particular instance. Why is it changing already formed Cluster to another Cluster, and what is the difference between two of these?
Thanks in advance!
10-22-2008 03:21 PM
10-22-2008 03:55 PM
I'm sorry, I'm not quite following what you meant to say. This is how I understand what is happening:
1) A Cluster of 2 elements is created inside the loop.
2) Auto-Indexed Tunnel creates an Array of Clusters.
3) Array of Clusters is sent to Bundle VI (1 input/1 output), and at the output is... what?
Array of Clusters has transformed to something else, and I can't perceive what that is (pink colored wire, but can't be a string).
Thanks 🙂
10-22-2008 04:03 PM
10-22-2008 04:07 PM
The output of the bundle is a cluster containing a single element; that single element is an array. The bundle node "wraps" a cluster around the array, so that it can then be built into an array of clusters. The pink wire, like the brown wire, is a cluster; the difference between the brown wire and the pink wire is that a cluster that contains only simple numeric elements is brown, whereas a cluster containing at least one non-numeric element is pink.
You can find the data type of a wire by turning on context help and putting the cursor over a wire.
The desired output for the graph is two plots. Each plot is generated from an array of data. Each array is wrapped in a cluster so that the two arrays can be combined and fed to the plot without requiring that both data arrays have the same length.
10-22-2008 04:12 PM
Got it now.
Much appreciated!
Thread can be locked now, nathand received a big Kudo! 🙂
10-22-2008 07:40 PM - edited 10-22-2008 07:43 PM
Of course things are a bit more complicated. 🙂
If you look at the example VI, you can see the following revision history:
This means that it is ancient (!!!), dating back to LabVIEW 3. Back then, everything needed to be done with stone-age tools. 😄
Today, we have "built cluster array" which does the job of the bundle and built array in one step.
Also don't forget that the xy graph in newer LabVIEW versions also accepts complex data, which then will graph IM vs RE. This often simplifies the data handling significantly. Here's the example rewritten using complex datatypes. 🙂
10-23-2008 05:23 AM
Excelent, this is even more elegant than previous solution 🙂
Thanks a lot for help 🙂
07-16-2011 05:41 AM
Alten bach,
I'm attaching part of the vi that plots.. this works fine as is.
Currently i want to add 2 more elements to the cluster and plot in XY graph- 'Process Value, Set Value V/s Time'
This "Process Value, Set Value V/s Time" XY graph is set for a cluster of size 3 ..
How can I increase the size of this XY graph cluster?
I'm using LV8.5
-Palchen
07-16-2011 01:51 PM
Drag two more numeric constants (you can copy one of the existing ones) into the cluster inside the array constant (connected to the left side of the shift register outside the loop). The bundle node will then expand to the size of the cluster and you can bundle your additional data points.
Remove the unnecessary sequence structure and local variable. Wire the output of Get Date/Time in Seconds (outside the while loop) directly to the subtraction node inside the while loop.