NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Only one thread in batch model

Hello guys.

 

My situation is the following, I am using a bacth model to test 6 UUTs, in one of my initial steps I am using a VI as a pop up to select some input chanels for thermocouple measurements, I want the user to select the chanels that have been connected to the analog board,  but since I am using batch model, the pop up VI shows up 6 different times (or the number of test sockets), but I don't want it, I just want to the VI/step to execute only in one thread but I want the output values are available in all the test sockets, is there a way to do that?

 

Thanks for your comments

 

Eder

0 Kudos
Message 1 of 4
(3,238 Views)

@Eder22 wrote:
[...]I am using a VI as a pop up to select some input chanels for thermocouple measurements, [...]

Is this selection per socket? What i mean is that each socket has a dedicated channel which should be selected. Is that the case?

 

There are several ways to accomplish what you are looking for. The most professional is a customized GUI which includes the selection dialog (e.g. as a tab register).

Another option would be to use a model callback if the selection has to happen only once when starting the test.

A third option is to include the dialog in the test sequence (as is) but use the batch synchronization steps configured "one thread only" to make sure that only one dialog opens up.

 

However, regardless of which option you pick, it will create another question:

Which thread will acquire the data and how will distribution of data to the different sockets happen?

Again, there are multiple options:

The most professional solution is what i call "IO Server". Its a separate piece of software which takes control of all hardware in the system. The test (sequences/sockets) only request data or output from it. The IO Server can run as a standalone application (TCP communication) or can be part of the GUI or the TS model (TCP, process internal communication options).

Another option is to use a separate 'virtual' socket which behaves similar to the IO Server.

A third option is to include the concept of IO Server in a customized batch model.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(3,216 Views)

Hello Norbert,

 

Thanks for your response, Yes each socket has a dedicated 5 chanels(thermocouple board has 32 analog inputs), which should be selected based on the user input, the user/test enginner needs to be able to select in which of the chanels he/she connects the thermocouple,  for example:

UUT0: chanel_0_Active, chanel_1_Active, chanel_2_Not active....

UUT1: chanel_5_Active, chanel_6_Not Active, chanel_7_Not active....

...

UUT5: chanel_25_Not Active, chanel_26_active, chanel 27_active

 

Based on that selection I need to adquiring the signals and show them in a custom User Interface (this part is already working)

But I want that step happend only once to select those inputs at the beggining of the sequence,

I have tried using batch synchronization steps configured "one thread only" but it just work in one of the sockets, the others skip the output value, I am not pretty familiar with the other options that you told me but let me try to use them.

I am not sure if my explanation was clear?

Again thanks for your help

 

 

 

 

 

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

It is correct that each socket has a dedicated set of data. That means that the one thread, which executed the dialog and collects the configuration data, will not automatically provide the information to the other sockets.

To do so, i recommend you to use Notifications to pass on the information to each socket individually or you could use a StationGlobal for this. Please note that i am not a fan of storing execution data as a StationGlobal, however in your case it is one of the simpliest ways to make configuration data accessible on a global scale.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 4
(3,192 Views)