NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Update locals subsequence in runtime

I have already done in the second way you suggested me, but when the sequence ends the locals variables remain changed, does not return to the previous value. With the "RunMode" I have the same problem: if I skip a step programmatically it keeps the change when the sequence ends.

 

Could me write just an example of the lookup string for using the Sequence context?

 

Erik: there was a misunderstanding. The sequence is running, and into the setup of the main sequence I'd like change variables and "RunMode" property of some step both main sequence and subSequence.

 

Thanks. 

0 Kudos
Message 11 of 14
(1,068 Views)

Hi,

 

"RunMode" will be remembered and therefore if you want this to be returned back to the static state you will have to restore it back when you finished or use the Load / Unload property on the sequence / step.

 

The Locals value should not be remembered when you change its value while its in scope, the trouble is you are changing the actual value stored in memory when it's first loaded so this is the new default value not the static value. You will again have to Unload the Sequence to restore the Locals to the static state.

 

 

Regards
Ray Farmer
0 Kudos
Message 12 of 14
(1,065 Views)

Thanks Ray, I understood better.

Last question. When you said "Use the SequenceContext and specify the exact lookup string", could you give me just an example?

 

Thanks.

0 Kudos
Message 13 of 14
(1,048 Views)

Example: RunState.SequenceFile.Data.Seq["SequenceName"].Locals.VariableName

0 Kudos
Message 14 of 14
(972 Views)