06-16-2009 06:01 PM
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.
06-16-2009 06:10 PM
seems you are using labview 8.6 could you recompile it for 8.2?
Thank You.
06-16-2009 06:22 PM
06-16-2009 06:31 PM
06-17-2009 11:21 AM
06-17-2009 11:33 AM
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.
06-17-2009 11:45 AM
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.
06-17-2009 12:11 PM
06-17-2009 12:14 PM - edited 06-17-2009 12:19 PM
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!!! 😉 hahaMrSafe 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.
EDIT: sorry, changed the default values in the controls... look at new attachement
06-17-2009 12:20 PM