08-09-2012 08:39 AM
Hi there,
I've got a subVI that loads a 2D double array from an Excel file. Currently, it needs about 500ms between runs to not cause a variant error, something to do with getting everything opened and closed. I was wondering if anybody could see anything obvious that's slowing it down. If you could help me optimise this a little that would be great. Even if I could shave it down to 200ms.
Solved! Go to Solution.
08-09-2012 08:40 AM
Sorry,
forgot to attach the subVi.
08-09-2012 09:02 AM
What do you mean "between runs?". Are you running this subVI multiple times? If so, you should open the app reference outside the subvi and leave the reference open between runs (and don't quit Excel).
08-09-2012 09:25 AM
I pass an array of filenames into the subVI. It might contain 1, or it may contain 10. So I don't know whether or not I'll need to run it multiple times.
08-09-2012 09:35 AM
Here is a quick example of what I'm talking about. Placing the App reference open/close outside the loop gets you down to around 300 ms.
08-09-2012 09:46 AM
Hey, sorry to be a pain, for some reason I can't download that file, something to do with my network I'm sure. Any chance you could email it to me? chris84948@gmail.com
Thanks
08-09-2012 10:58 AM
That worked great. Now the total cycle time is down to about 300ms. I was worried that if everytime I added a new file to the array we would add 500ms, I would be taking 5-10 seconds on a larger recipe setup.
Thanks again.