NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

StationGlobals in Batch Mode - same for all batches?

Solved!
Go to solution

Hello,

i am trying to create a simple Testplan running in BatchModel with 4 TestSockets.

In the testplan is a for loop looping around a SationGlobal.Dut for 10 times

Question: Is this StationGlobal copied for all 4 testsockets and exists also 4 times in the backgrouodn or is the stationglobals the same for all testsockets?

 

Do i have to use a 1D array for the loop variable and use as Index the MyIndex of SocketNumber?

 

Thx

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

StationGlobals are stored in the StationGlobals.ini file and are shared between all executions. For more information on that, see the Help page about StationGlobals here: http://zone.ni.com/reference/en-XX/help/370052P-01/tsfundamentals/infotopics/station_global_variable...

0 Kudos
Message 2 of 4
(4,127 Views)
Solution
Accepted by OnlyOne

Solved.

Changed the StationGlobal to an array with size = Number of TestSockets.

In the testplan write and read of the StationGlobal using:

StationGlobal.MyGlobal[RunState.TestSockets.MyIndex]

0 Kudos
Message 3 of 4
(4,121 Views)

i see you are messing with paralell and batch testing.. it is tricky and  thats what i kind of do a lot on my testing.  To do paralell testing it requires some planning..

 

The station globals can be shared accross all test executions. Avoid them at all cost to write stuff, you will find your self sometimes on some race conditions.

 

File globals are unique for each test socket. just make sure that under Edit->Sequence File properties.... theres is an option for Sequence File Globals and make sure it is set to "separate file globals for each executiong"

 

I only use station globals for Object references for my instruments and i would like to avoid them but i also use some booleans as globals as "Flags" but you need to be very carefull.

 

 

 

 

CLAD, CTD
0 Kudos
Message 4 of 4
(4,089 Views)