NI TestStand

Showing results for 
Search instead for 
Did you mean: 

Use a Barcode-Rreader for communicating with TestStand?

Hello everyone, At my project 4 testsockets are executing in parallel and asychronously. Very often during the testing procedure the user is asked to input information to TestStand and this has to be done through a barcode reader. Most of the barcodes contain the information about which testsocket are referring to, but other times this has to be decided by taking into account the barcode previously read. I decided to use a Labview vi that takes inputs from the barcode reader, call it from the process model and let it execute in a different thread in the background. This vi should execute in parallel with the other 4 testsockets and every time a new barcode is read, the value should be passed to the right executing thread that would be waiting for it. I guess, this could be done by passing, everytime a barcode is read, the current barcode value to a station global and then send a notification to the right thread that should be waiting, to read this value. My question is, how is this done in TestStand? Thanks a lot!
0 Kudos
Message 1 of 4

One of the ways to do it:


For labview vi which runs in parallel and reads the barcode :


In station globals have a  array where in stationglobals.slno[0]="socket_0_information",stationglobals.slno[1]="socket_1_information"....

The labview vi which runs in parallel can put the information in the respective socket station global variable.


For the tests sequence :

Override pre uut and remove the default behaviour of serial number popping.(skip/delete those steps).Add the following :

for loop

check stationglobals.slno[RunState.TestSockets.MyIndex] != "" // by default it will be empty else valid data will be present

Copy the value to a local variable

reset the station global value to empty for next iteration

time delay 1 second ( avoiding tight looping)


if(read value == "stop") \\ This is required for the final stopping of the tests

parameters.continue testing = False

end loop



0 Kudos
Message 2 of 4

Thank you very much! This was really helpful!

0 Kudos
Message 3 of 4



The Runstate.Root property can also be used to access socket information when using the batch or parallel models through the ModelData parameter.  The following example shows how to access whether the current socket is enabled:


Keep in mind that the available properties will change depending on the entry point used.

0 Kudos
Message 4 of 4