LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a Bundle of Doubles From One vi to Another

Hello,

 

Please see the vis attached. I am trying to pass a bundle of doubles from one vi to another. I can't quite figure out how to do this? Basically, I don't know how to create a double bundle in File Save.vi to accept the passed bundle from Master Program.vi?

 

Nevica 

 

 

Download All
0 Kudos
Message 1 of 12
(2,762 Views)

I don't see any "double bundle" of anything in the "Master Program" VI. I also don't see it calling the "File Save" VI. I also see that the cluster in the "File Save" VI is undefined.

 

So, what is it that you want us to look at again?

0 Kudos
Message 2 of 12
(2,740 Views)

First off:

Replace those arrays of strings with Type def'ed enumerated controls!!!! See attached Reserve State.ctl

 

Always use unbundle by name- really a lot cleaner and self documenting.

 

As for getting the data from the producer loop (where the read is) to the Consumer (supposedly the write file routine) look into the Template for Producer/Consumer Design pattern (data) to see how Queues workUntitled.png


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 12
(2,733 Views)

Sorry, i sent you the wrong .vi.

 

It's attached.

 

I am basically passing the bundled double to the next .vi (which is called File Save.vi).

 

File Save.vi is new and I cannot create a bundled double in File Save.vi to accept the passed bundle. I am not sure how to do this.

 

Nevica

0 Kudos
Message 4 of 12
(2,729 Views)

Jeff, am I looking at the same code as you? I don't see what strings to replace with typedefs, and I don't see where the producer consumer architecture would come into play here. Or even queues, for that matter.

0 Kudos
Message 5 of 12
(2,728 Views)

You need to create a cluster constant of the type of cluster to bundle and wire it to the bundle type input.  then you'll be golden.  without the "prototype" of the cluster LabVIEW does not have enogh information to creat the FP objects (Control or indicator)

 

Untitled.png

These arrays


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 12
(2,725 Views)

Sorry, I am not fully clear as to what I have to do.

 

I have a bundled double from 'All parameters.vi' and I am passing this into 'File save.vi'. I can easily convert the bundled double to a bundled string, that is no problem. The problem is accepting the bundled double in 'File Save.vi' not the other way around!

 

Nevica

0 Kudos
Message 7 of 12
(2,718 Views)

In other words, how do I create a cluster constant of doubles of length 15 to which I can create a node to pass another cluster into?

0 Kudos
Message 8 of 12
(2,714 Views)

This is what I have so far. (See attached). There is an empty cluster input indicator but I dont know how to full it will 15 doubles ie an equivalent 15 double.

 

I have tried dragging and dropping from the master .vi but this doesn't work.

 

Nevica 

0 Kudos
Message 9 of 12
(2,706 Views)

If you have an existing cluster of the right type in some other VI, right-click it and "create control". Now move it to the new VI.

 

Else just put the desired elements inside the currently empty container.

0 Kudos
Message 10 of 12
(2,701 Views)