NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to unload a particular sequence using Teststand APIs.

  

      I am trying to unload a particular sequence using Teststand APIs,but I always get the return as false. Attached is the Error popup.

0 Kudos
Message 1 of 4
(4,288 Views)

Karthik,

How are releasing the sequence file, You have to use the Engine.ReleaseSequenceFile method to release the sequence file.

 

Thanks

0 Kudos
Message 2 of 4
(4,283 Views)
Thanks Sathish,I use Runstate.Sequence-Unload Modules method.
I have a sequence where i create an object for a class using .net code modules and set some properties for that object.I have a while loop on top of the sequence which does this operation for N number of times.so after each iteration i need to unload the sequence.This happens good for few iteration and throws an error.
0 Kudos
Message 3 of 4
(4,265 Views)

First of all:

It is not possible to unload a sequence unless you unload its sequence file (this is what lordsatish refers to).

 

What you are trying to achieve is to unload the modules of all steps within a certain sequence. This is quite different.

And i think you need some information on this before getting to an "answer":

Unloading a module from TestStand tells the runtime engine of the module that the module is not used anymore from TestStand. So the runtime engine of the module has to decide if it actually unloads the module or keeps it in memory.

Loading/unloading modules generates overhead in the sequence execution which is most often not desired. So often modules (which are used more than once in a sequence execution) are unloaded only if the module contains serious flaws making it impossible to execute the module more than once after it has been loaded.

 

So if the reason for your question is the fact that the modules can only execute once after being loaded into memory, i highly recommend you:

Find the flaw and eliminate it!

 

If you are still interested in an answer:

Just configure your steps using the Unload Option (Step properties => Run Options) to "Unload after Step executes". This setting does exactly what you are trying to achieve with a single difference: The module is unloaded after the steps executio, not after the whole subsequence was executed.

 

hope this helps,
Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 4
(4,257 Views)