09-23-2011 08:04 AM - edited 09-23-2011 08:13 AM
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
09-23-2011 08:35 AM - edited 09-23-2011 08:35 AM
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?
09-23-2011 08:49 AM
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 work
09-23-2011 08:52 AM
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
09-23-2011 08:53 AM
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.
09-23-2011 08:56 AM - edited 09-23-2011 09:00 AM
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)
These arrays
09-23-2011 09:26 AM - edited 09-23-2011 09:27 AM
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
09-23-2011 09:54 AM
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?
09-23-2011 10:18 AM - edited 09-23-2011 10:21 AM
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
09-23-2011 10:23 AM
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.