From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

accessing locals UUT's during a batch model

Solved!
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
(3,115 Views)

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
(3,086 Views)

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
(3,076 Views)
Solution
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 :

http://zone.ni.com/reference/en-XX/help/370052H-01/tsref/infotopics/db_edit_flags/

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