07-06-2005 05:33 PM
07-06-2005 07:59 PM
07-06-2005 10:01 PM
07-07-2005 03:02 PM
07-08-2005 05:08 PM
Brock,
I have to admit that I'm fairly confused about your application. In the attached VI, there is nothing on the block diagram, so I assume that you are writing datalog files through VI Server from some other VI, but I'm not sure why you're going about it that way rather than writing the data directly. I'm curious about that.
But as far as releasing a VI from memory, there is a function on the All Functions>>Advanced>>Data Manipulation palette called "Request Deallocation". This function frees the VI from memory in which it is placed. So if you wanted a subVI cleared from memory after it is called, you could place this function in that subVI to clear it from memory after it is run. This might be what you are looking for.
I hope this helps. Have a good one!
Tyler S
07-08-2005 06:31 PM
OK Brock;
I see your trouble. 1st off you don't have any template VIs in your code. You may have VIs you're using as templates, but that's not the same thing as a template VI. Template VI have the extension *.vit. Next, the reason you are getting the error is that you have the top level VI (your importer function) that is still running and so everything in its hierarchy is still marked for execution even though its not actually running.
I'll fix this for you and send it back in a bit. Wanted to get back to you with an update first...
Mike...
07-08-2005 07:38 PM
07-08-2005 10:12 PM
07-08-2005 10:24 PM
Yes, the input terminal on the write VI isn't connected to anything at this point it's primary function is to allow the polymorphic vi to link up the right version of the write routine. Beyond, that the code pretty much works the way you had it before--just more efficiently...
Yes, also to your question on the source of the error. I found it because after getting the template VI part sorted out the code worked if execution highlighting was on in the top-level but failed at full speed. You see that happen and two words should pop into your head "Race Condition". I looked back into it and that's when I noticed that you weren't waiting for the VI to finish before continuing.
On a similar point, notice I also rearranged things so the front panel wasn't opened until after the subvi was running. The advantage of this is that it looks better to the user. The other way around and you can see the window open in non-runtime form for just an instant. The way you had the window appearance set the change was very noticable. The only cost to doing this way is that you have to programatically wait for the subvi's execution state to become Idle before continuing.
Mike...
07-08-2005 11:49 PM