NI TestStand

Showing results for 
Search instead for 
Did you mean: 

accessing locals UUT's during a batch model

Go to solution

Hello, I have a simple question I think!


I have a batch model running and I write values to a spreadsheet during the seq. there are 24 UUT's testing and instead of having the excel write in all of the batch "clones", I would like to have the first sequence gather the values detected from the other batch processes and write only once to the file. This will happen at the end of a loop cycle that can be testing many many loops.


so I would like to access to the RunState.TestSockets. "locals.variable" some how and copy the runstate value of a local variable back to the main caller.


can this be done?

Bill Lewis
0 Kudos
Message 1 of 4

There is RunState.Sequence.Locals.ResultList that you can use. I believe this will provide you with the solution that you are looking for. 

0 Kudos
Message 2 of 4

Looks promissing but how would i get the values for (RunState.TestSockets.MyIndex) any sockets of the myindex array?

Bill Lewis
0 Kudos
Message 3 of 4
Accepted by topic author Bill_Lewis

With the default batch model, each 'test socket' maintain it's own set of variables.

There are many methods to fulfill what you want to do, 

One method is, to put certain fileglobals as shared variable, so that every socket can access it as transparently.

Example, you could have FileGlobals.TestResults[22]  as a shared array that is available to every socket,

Each of the test socket can put it's own result  to  FileGlobals.TestResults[RunState.TestSockets.MyIndex] 

Your socket 0 can access rest of the sockets, eg, socket 7 via FileGlobals.TestResults[7

If you don’t have experience with ‘shared variable’, please come to this page :

0 Kudos
Message 4 of 4