NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

modify unload option dynamically

Hi,

 

I want to change the way of how a SequenceCall step is unloaded during execution.
Here is the situation, you can find a template of the sequence content :

 

CallerSequence :

 

For i=0 to N calls

{

        SequenceCall()

}

 

The SequenceCall module is defined during execution so it is always loaded dynamically and changed at each iteration. All the SequenceCall steps call sequences which are never in the same SequenceFile.

The problem is that I need to modify the ModuleUnloadOption of the SequenceCall step at each iteration. To do it, I performed 2 things :

- I unticked the "Optimize Reentrant Call to this Sequence" option for each sequence called. Because the sequence called can be unloaded (depending on unload option) at the end of the CallerSequence. The execution is not over after.

- I wrote, in the CallBack ProcessModel "ProcessModelPreStep", instructions to change the flag "ModuleUnloadOption" => After Step Executes (=2) or Sequence File unloaded (=4)


Observations :

During execution, it seems that the flag "ModuleUnloadOption" is correctly modified before each SequenceCall (I checked it with breakpoints). but it seems that is not applied. It seems that the Unload Option setting before starting execution remains the same even if the flag "ModuleUnloadOption" is modified.

 

Any ideas of what is wrong with this method ?

 

Thanks for any help

 

Pierre

0 Kudos
Message 1 of 1
(3,876 Views)