10-12-2010 10:50 AM
Hi,
I'm calling one VI which has the First call internal LV function. It works as expected when I run the sequence first time. However, when I run the sequence second time, First Call function returns 'false' when I run this VI first time. Expected value is 'true'.
Why?
I'm using the default loading/unloading options. I was playing with Unload options in Run Options property, however unsuccesfully.
What should I do to make it works as I'm expecting?
Solved! Go to Solution.
10-13-2010 05:29 AM
Hey MimiKLM,
I have written a simple sequence/LabVIEW code module to replicate your issue. I have attached them here.
The steps you tried to resolve this issue were very, very, VERY nearly correct. The "first call" function only resets once the VI (or subVI) has completed execution. And, because TestStand is reserving the code module for execution, the first call within the code module is never really reset. So (exactly as you suggested) we do need tinker with the unload options.
In my example code, I have set the run options for EACH of the test steps that call the code module to unload after the sequence executes. This releases the vi, and resets the "first call?" function.
I imagine you were very close to this solutions when you were playing with the step settings. Please remember to change this unload option with EVERY step that calls the code module in question.
I hope this has been useful. Best wishes and kind regards,
10-13-2010 09:18 AM
Hi RER,
How are you?
Thanks for the explanation. However, before I reply you, could you post it LV modules in 8.6 version please?
Thanks,
Kamil
10-13-2010 09:45 AM
Im very well, thanks for asking!!
Please find the attached 8.6 version of the first call vi
Hopefully this should work for you,
Best wishes
10-13-2010 10:02 AM
Hi RER,
I'm sorry, but are we missing something? The example you sent behaves EXACTLY as I described 😞
When I'm executing second step the output is FALSE.
Is there any global option/setting which we have set differently in our environments?
10-13-2010 10:17 AM - edited 10-13-2010 10:18 AM
Hmmmm... that is strange. On my developement station, the "first call" definately resets between executions of the sequence.
I think you are correct about the global settings. Could you please check your sequence file settings (edit > sequence file properties).
Make sure the unload setting is set to "use Step unload option" (if you follow my advice from earlier) or "unload after sequence executes".
10-13-2010 10:40 AM
Hi,
This window looks exactly the same at my computer.
Kamil
10-13-2010 11:11 AM - edited 10-13-2010 11:15 AM
That is very strange. Like I say, it is working perfectly for me. I would recommend running through the Sequence, Sequence file, Station option and Adaptor properties, and making sure that you havent changed any settings that would prevent the code modules from unloading.
For example, you shouldnt need to do this, but it may be worth configuring the LabVIEW adaptor and unchecking the reserve VI for execution. See if this helps.
Also, are you using an entry point? If so, which process model are you using? Is it a custom process model? I would recommend running the vi I supplied to you with the default "SequencialModel", to see if that helps.
Lastly, as a work around, you could add an expression step in the cleanup group, and call the TestStand engine method to unload your code modules. This will ensure that your code modules are unloaded between executions - regardless of any of the station/sequence settings. Its not as flexible as the step options method we initially discussed, but it will certainly work!
RunState.Engine.UnloadAllModules()
10-14-2010 07:33 AM
Hey RER,
Yes, it's strange...
I'll post you the outcome of my research later.
However, we have this behavior even we change the sequential model from our custom to original one.
Any others suggestions? Which version do you use? I'm using 4.2
BTW: What do you exactly mean by saying "...TestStand is reserving the code module for execution..."? Is it something diffrent than loading modules or it is the same thing?
12-23-2010 09:32 AM
Hi Kamil, I'm getting the same behaviour.
I've run up a couple of quick sequences, both calling the same VI.
It's a pass fail step type with a LabVIEW step module where the pass/fail boolean is coming from the First Call? function.
It doesn't matter if I put the Load Dynamically and Unload after Step Executes around the step or use the defaults.
I run the first execution and it's shows true as a First Call. The execution finishes and the next execution is returning a fail.
If I specifically get the sequence editor to "unload all modules" then it's working again.
It appears as if the unload option is not being correctly actioned.
There are a few different options to handle this.
If you want to initialise a VI on first call, you could pass in a flag from TestStand that you can then reset at the appropriate point to say "this is a new execution" so reset.
You could force an unload all modules as per Richard's posting. - This can affect execution times, since unloading all modules means they will need re-loading every "Test UUTs" iteration or every execution.
The reserving the code moule for execution is controlled by the load and unload options.
Thanks
Sacha