10-31-2013 02:31 AM
Ooops! Now hopefully the files are here!
11-01-2013 09:38 AM - edited 11-01-2013 09:39 AM
@weltaran wrote:
"
If the unload callback itself (or some other sequence in the process model file) directly referenced the VIs you care about they would stay loaded.
"
No! It is as I said: the sequence file which loaded the VI into memory unloads the VI. It does not help to place the same VI in the unload callback (of the model) to prevent it from being unloaded. Because all SEQ files which are in the cache are unloaded at the same time (I think an execution for every SEQ file is started the moment I close my sequence editor) then the VI is already unloaded when it comes to the point where it must be executed (the other SEQ files unload instantly because they have no unload callback enabled) --> it must be loaded into memory again!
I have prepared a slightly modified sequential model + two VIs + one external SEQ file for demonstration. Should I post them?
By the way (maybe important?): I am working with TS2010 and LV2010SP1.
Ciao
weltaran
I haven't looked at your code yet, but one thing you might be missing is that, not only does the VI have to be in the process model file, it has to be loaded as well. If you have it set to Load Dynamically then it won't get loaded until your unload callback is run (i.e. too late). It must be set to one of the other load options like load when execution begins or load when sequence file is opened.
The file for which an unload callback is run is not unloaded until after the unload callback is run.
-Doug
11-01-2013 09:48 AM - edited 11-01-2013 09:49 AM
It looks like my suspicions were correct:
I looked at the vi in the unload callback in your process model and saw the above. Because the vi is loaded dynamically, it is not loaded at all by the process model until your unload callback runs, which is too late. I am not sure why the process model has its sequence file load option set to dynamic. Perhaps just to make things a bit more responsive the first time you launch an execution (I'll ask around and see if I can find out why), but you might try changing the sequence file property setting to "Use Steps Load Option" and see if that works for you.
Hope this helps,
-Doug
08-07-2014 09:15 AM
Hello All,
I'm having a problem related to VI loading and unloading, and this post comes very close to answering it, so I thought I would reopen.
I have a code module VI that is run asynchronously. At the end of my sequence, I have a cleanup step that unloads all code modules. Everything seems to get unloaded except the VI that was run asynchronously. I know enough to edit the load and unload options in the properties tab, but when I get there, the load option is set to "load dynamically" and the unload option is set to "unload after step executes", but I am not allowed to change them. Is this because it is a special utility that is set to run asynchronously? If so, how to I unload the VI? Right now, the only way it seems that I can get it unloaded is to close Labview and close the sequence file. Please advise. Thanks.
Running Labview 2013 and TestStand 2013.
GSinMN
08-07-2014 09:31 AM
GSinMN,
This issue is actually being tracked internally under CAR 420123, and the issue was fixed in TestStand 2014 (The listed issue does not exactly mention your situation, but this is the same root cause). The best workaround for this issue in previous versions of TestStand is to click the "Edit VI" button on the Run VI Asynchronously step. This will properly unload the VI so that it can be edited in LabVIEW.
I hope this helps, and please let me know if you have any additional questions about it.
08-07-2014 10:26 AM
Hello Daniel,
Thanks for the info. I have confirmed that this workaround does indeed unload the module. Not able to update to 2014, is there a plan to include this in the next 2013 patch?
Thanks again,
GSinMN
08-08-2014 08:21 AM
GSinMN,
It was pointed out to me that since this issue was being caused by the Sequence Analyzer, another workaround to this issue is to disable the analyzer from analyzing the sequence before execution. There is a button to toggle this functionality on the toolbar in TestStand. This might be a less disruptive workaround. If you need the analyzer functionality, you can explicitly analyze the sequence when necessary, but for normal development, you can disable the analyzer and the modules should unload correctly. I confirmed that this works for me in TestStand 2013. Let me know what you think.