NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

VI locked at end of sequence

Solved!
Go to solution

Hi,

 

I'm pretty new to LabVIEW and very new to TestStand, so hopefully this is just a case of me being a bit thick.

 

I have a sequence that calls some VIs. These are a mixture of purely windows based VIs and a Windows VI host for an FPGA based VI.

If I test one scenario with the file in a sequence then everything is fine. If, however, I attempt to run it again it appears that the VI has been left running at the end of the sequence (despite completing an TestStand obtaining its test result data). I get the following error information:

 

Details : 

Close File in Test Controller.vi->Test Controller.vi.ProxyCaller
LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
=========================
NI-488: Command requires GPIB Controller to be Controller-In-Charge.

 

Error Code:

1; User-defined error code.

 

Any help would be greatly appreciated. I've been hunting round the help, manuals, forums and the internet in general for most of the day with no success.

 

Cheers,

 

Simon

 

0 Kudos
Message 1 of 7
(3,508 Views)

I should have said that if I select File | Unload All Modules before the second run everything works as expected. So I naturally thought that adding the Unload Option to the VI calls would solve my problem. I was mistaken Smiley Sad

0 Kudos
Message 2 of 7
(3,506 Views)

The problem seems to be in the labview vi called.

You can use the debug mode to trace out the cause.

 

Unload modules in Teststand closes the vi and is like starting afresh so you will not face problem.

0 Kudos
Message 3 of 7
(3,487 Views)

I understand your response, and would agree with it normally. However, if I repeatedly run the code from LabVIEW directly no error occurs, so I can only make the assumption that is something to do with the interaction between TestStand and LabVIEW.

 

 

0 Kudos
Message 4 of 7
(3,480 Views)

Thanks for your help. I hunted through my VI and traced the problem to a feedback node. I had this set to 'Initialize on Compile or Load'. I therefore thought that if I forced the module to unload after execution that the feedback node would re-initialise the next time the VI was called. However, since the unload VI doesn't appear to actually unload the VI after it has finished executing, therefore I had an indexer for an array that was already at the end of the array.

 

So now I have a different question: What does the 'Unload after step execute' unload option actually do? As far as I can see it doesn't unload the VI as I can't edit it in LabVIEW after running the sequence without forcing an unload via the File | Unload all modules step. Does it leave sub VIs of the invoked loaded?

 

 

0 Kudos
Message 5 of 7
(3,469 Views)
Solution
Accepted by topic author SimonDeacon

It should unload the VI if all steps which use the VI have a similar setting. If the VI is used anywhere else, the load lifetime is effectively the longest of all of the places in which it is used. Also if another VI that is still loaded also references that VI it will effectively keep the vi loaded. Since unload all modules unloads everything, it's possible another VI that you still have loaded references that VI in some way.

 

Hope this helps,

-Doug

Message 6 of 7
(3,456 Views)

Doug,

 

That certainly does help. I suppose this makes sense, although it makes the setting a little misleading.

 

Simon

0 Kudos
Message 7 of 7
(3,441 Views)