LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Outputs One Input

I think an easier solution would be to use a Queue.  Each of the four files (I guess you could call them sub-VIs and not really files since you need some type of sub-VI to process a spreadsheet file) share the same format output from what I gather and you are simply trying to feed these similar outputs into one “Input VI” block to process them.

 

I would recommend you take a look at “queues”.  For each new file (sub-VI) you put in the main VI that calls and passes its output to the “Input-VI”, you would “enqueue” your output data to a queue.  I would then place the Input-VI in some sort of loop and each frame of the loop would “dequeue” the data and input it into the Input-VI for processing.

 

Here’s an example attached.  You should also look into the “producer and consumer” architecture. 

 

0 Kudos
Message 11 of 21
(2,474 Views)

seems you are using labview 8.6 could you recompile it for 8.2?

 

Thank You.

0 Kudos
Message 12 of 21
(2,472 Views)
try this...
0 Kudos
Message 13 of 21
(2,467 Views)
Thank you that works. I will take a look at it and post quests in this thread as they come along. I am still unsure of how I would use the queue system with my subvis but thats probabily due to the lack of experiance on my part.
0 Kudos
Message 14 of 21
(2,464 Views)
If I were to use an array, how would it work with enqueue and dequeue?
0 Kudos
Message 15 of 21
(2,440 Views)

can you elaborate on your use of an array?  Would you be passing in all the elements of an array into your Input_VI for processing OR are you passing in only one element of teh array at a time for each frame of the loop?

 

if you are passing an entire array into the input_VI, this is simple.  You'd just have to make sure you turn off "Auto Indexing" by right clicking the tunnel the array uses to pass information into the loop and selecting  "Disable Auto Indexing". 

 

Does this help?  I hope i'm understanding your question/situation.

0 Kudos
Message 16 of 21
(2,436 Views)

PhilipJoeP wrote:

can you elaborate on your use of an array?  Would you be passing in all the elements of an array into your Input_VI for processing OR are you passing in only one element of teh array at a time for each frame of the loop?

 

if you are passing an entire array into the input_VI, this is simple.  You'd just have to make sure you turn off "Auto Indexing" by right clicking the tunnel the array uses to pass information into the loop and selecting  "Disable Auto Indexing". 

 

Does this help?  I hope i'm understanding your question/situation.


I would be passing only one element of the array at a time. Well at least my assumption is that I can load all my values into a build array send these values into the enqueue which will send one element then dequeue so that it no longer has that element in the queue.

0 Kudos
Message 17 of 21
(2,434 Views)
The goal really is to have a single input which I have the problem I have is that I have several outputs which must use this single input and labview (it makes sense) will not allow multiple wires to be connected to a single sink. I could possible add a T/F statements to each value that gets spit out and build an array. Where it will only send the value for the True statment and ignore the false statement.
0 Kudos
Message 18 of 21
(2,424 Views)

 


MrSafe wrote:

 

I would be passing only one element of the array at a time. Well at least my assumption is that I can load all my values into a build array send these values into the enqueue which will send one element then dequeue so that it no longer has that element in the queue.


So let's see if I understand... you have basically four arrays (not necessarily of same size) corresponding to the four "files" you are using as inputs.  Correct?  You want the program to grab one of those arrays and then send each of the array elements into the Input_VI separately?  And then repeat this same process for the remaining three arrays? This is easily doable.  In that case, I would use nested for loops.  So inside the for loop I provided, you would want an additional for loop containing the Input_VI.  The first loop would grab the enqueued array.  The second loop would take the size of the array and execute that many times.  Each time that second loop iterates, it would pass the next element of that array.   Take a look at the code I’m attaching.  my input is still a cluster but now it has an array inside of it in place of the "ten" element i used earlier.  Let me know what you think.  Of course... Kudos are always welcomed!  I’m trying to try this whole role playing in the forum and getting  points!!! 😉  haha

 

EDIT:  sorry, changed the default values in the controls... look at new attachement

 

Message Edited by PhilipJoeP on 06-17-2009 12:19 PM
Message 19 of 21
(2,423 Views)
I will give this a shot and post questions / problems I have in this thread. When I first started I had no idea how complex what I'm trying to do would be. Such is life.
0 Kudos
Message 20 of 21
(2,418 Views)