LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

bundle by name

Solved!
Go to solution

Hi guys 

 

the attached picture shows one of the labview examples that come with the software and i need to understand its function for some purpose in my mind.

 

i was wondering what does the ( 1/x ) function does and why did they use the function (bundle) and why did they add the elements(0.0) DBL 

 

can anyone explain please ? 

Bill David
0 Kudos
Message 1 of 6
(4,392 Views)
Solution
Accepted by topic author Bildavid

David,

 

Thanks for your post.  The bundle by name is a very useful feature when you want to mix data types.  In the example you uploaded, you are mixing two double precision variables with an array data type (that just happens to contain doubles itself).  The bundle by name function lets you pass the data as a cluster if there are pieces of information that are linked in some way.

 

For example - an error cluster contains a boolean, a signed integer (error code) and a string.  This means you can pass the cluster through your code instead of having three individual wires for each.  You can also use clusters to tidy up terminals in sub-vis; so notice how error in and error out take up the bottom two terminals rather than six if they were wired individually.

 

Furthermore, since you can use a bundle by name there is also an unbundle by name so using the example of the error code if say you wanted the boolean that was passed but not the error code or string then you can just pull this data from the cluster.  This is often used inside while loops with a stop button and an Or gate wired into the stop condition.

 

Clusters are all too often an underused resource in LabVIEW but they are very very useful!

 

As for the 1/x function, as with any kind of frequency analysis one would expect that it is a converson from frequency (Hz) into time (s).  It is not uncommon to see this function just be careful with factors of 2*pi in relation to angular frequency.

 

Hope this helps,


Regards

 

Robert Ward
Applications Engineer, NI
Message 2 of 6
(4,379 Views)

Dear Rob_Ward

 

Thanks for the reply . One more thing i wanna ask .

 

 

if you can take another look at the attached picture above you will find that there is 0.0 as a double variable to be one of the input of the bundle by name function.

 

what is the role of 0.0 , what does it do ?

 

by the way the attached picture is one of the examples offered by the software .

Bill David
0 Kudos
Message 3 of 6
(4,353 Views)

Hey Bill David,

 

To answer it as simply as possible - I don't know why a 0.0 double has been put into the cluster.  You are correct sir - it doesn't seem to serve any purpose! 

 

The only thing I can assume is that it could be used as the filter input details when you pass the cluster.  If you go to the detailed help for the Butterworth Filter VI, it says that;

 

"the values for high cutoff freq: fh and low cutoff freq: fl must observe the following relationship:

           0<f1<f2<0.5fs

where f1 is low cutoff freq: fl, f2 is high cutoff freq: fh, and fs is sampling freq fs"

 


Therefore I assume that the information stored in the cluster; 0, 1/fs and the array data, is in accordance with the limits set out in the help file, in case you then wanted to use the cluster data to plot a graph with the correct x-axis parameters.

 

Regards,

Robert Ward
Applications Engineer, NI
0 Kudos
Message 4 of 6
(4,345 Views)

@Bildavid wrote:

Dear Rob_Ward

 

Thanks for the reply . One more thing i wanna ask .

 

 

if you can take another look at the attached picture above you will find that there is 0.0 as a double variable to be one of the input of the bundle by name function.

 

what is the role of 0.0 , what does it do ?

 

by the way the attached picture is one of the examples offered by the software .


 

 

Is it a reference line?

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 6
(4,335 Views)
Putting zero in the cluster is setting t0 for the graph. Same as the next element is dt. Look at the context help for the graph. Before the waveform data type did this automatically, this is what you had to do.
Message 6 of 6
(4,333 Views)