LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Bundle VI

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!

 

0 Kudos
Message 1 of 11
(6,493 Views)
It's there because you can't have an array of arrays, so you put each array into a cluster and build an array of those.  It's not the case here, but if those two arrays of clusters were of different lengths then the build array would expand the shorter one to make two columns of the same length, which could result in plotting invalid empty data.
Message 2 of 11
(6,489 Views)

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 🙂

0 Kudos
Message 3 of 11
(6,481 Views)
The final output is a cluster of array of clusters
0 Kudos
Message 4 of 11
(6,476 Views)

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. 

Message 5 of 11
(6,473 Views)

Got it now.

Much appreciated!

 

Thread can be locked now, nathand received a big Kudo! 🙂

 

0 Kudos
Message 6 of 11
(6,470 Views)

Of course things are a bit more complicated. 🙂

 

If you look at the example VI, you can see the following revision history:

 


rev. 1 Mon, Jun 27, 1994 4:55:00 PM Apostolos K
VI was converted from LabVIEW version 3.0.1 to LabVIEW version 3.1a16.

 

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. 🙂

 

Message Edited by altenbach on 10-22-2008 05:43 PM
Download All
Message 7 of 11
(6,430 Views)

Excelent, this is even more elegant than previous solution 🙂

 

Thanks a lot for help 🙂

0 Kudos
Message 8 of 11
(6,405 Views)

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

Thanks...

Pallavi
0 Kudos
Message 9 of 11
(5,523 Views)

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.

0 Kudos
Message 10 of 11
(5,510 Views)