NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand clearing value of a StationGlobal before execution

Solved!
Go to solution

I'm having trouble determining why/how TestStand is reverting one of my StationGlobal strings back to an empty string as soon as execution begins. I have a default value set before running the sequence, and setting a breakpoint at the first step in the ModelSequence itself shows that the initial value has already been erased.

 

I'm certain there must be some setting or something that I'm missing, although my other StationGlobals seem to have no problem retaining their initial values.

 

Can anybody point me in the right direction?

0 Kudos
Message 1 of 6
(4,952 Views)
Solution
Accepted by topic author aswanson08

Hi anwanson08,

 

Try to find the location in your sequence where the value is modified (Edit » Find/Replace... with the name of the variable) in any in your sequence. You may use also Edit » Find/Replace in Files... (quite brutal, yes).

Perhaps the value is modified by the ProcessModel (is the one you're using custumized?). Use the Watch View on the string variable, with break "On Change" option (have to be set during execution, so keep your breakpoint, add your variable to the watch view, and restart the execution).

If the modification is made by the process model, it will not occur using Run Main Sequence. So try to do a Run MainSequence (instead of Single Pass or TestUUT).

 

Hope this helps...

0 Kudos
Message 2 of 6
(4,934 Views)

Most likely it is being done by the process model which executes before your mainsequence is called.

 

-Doug

0 Kudos
Message 3 of 6
(4,924 Views)

Unfortunately, it seems to be resetting itself before the process model even runs (or perhaps when I enter the initial value it's not being saved?). Setting up a watch on the variable, a breakpoint on the very first step, and running 'Execute Main Sequence', shows that the variable value has already been cleared.

 

Running 'Execute Main Sequence' should take the process model out of the equation, but either way I'm using the default SequentialModel provided with TestStand.

0 Kudos
Message 4 of 6
(4,908 Views)

On further investigation, it appears that this problem is sequence specific. Using other sequences the variable seems to keep its initial value. Despite the fact that the variable seems to change before any step of the sequence is executed, there must be something in that particular sequence file causing this behavior.

 

Either something in the file is corrupted, or I am missing a setting or overlooking a step which resets that particular variable. In any case, I'll simply recreate the problem sequence and that should hopefully take care of the problem.

 

I'm marking Mathieu_R.'s solution as the accepted answer, since he covered what will most likely be the problem for anybody else with a similar problem.

Message 5 of 6
(4,904 Views)

On further investigation, it appears that this problem is sequence specific. Using other sequences the variable seems to keep its initial value. Despite the fact that the variable seems to change before any step of the sequence is executed, there must be something in that particular sequence file causing this behavior.

 

Either something in the file is corrupted, or I am missing a setting or overlooking a step which resets that particular variable. In any case, I'll simply recreate the problem sequence and that should hopefully take care of the problem.

 

I'm marking Mathieu_R.'s solution as the accepted answer, since he covered what will most likely be the problem for anybody else with a similar problem.

0 Kudos
Message 6 of 6
(4,904 Views)