NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

"Batch Synchronization" in Parallel Model

Hi,

 

I'm working on a project with up to 15 UUTs which are supposed to be running using the parallel model, since they have to be able to start and stop separately.

There are conditions in which all active UUTs are paused and restarted upon request. Communication with the UUTs is established using a single demon. Now I need a synchronization method, to make sure only one thread runs the daemons initialization. Just like a batch synchronization using the "One Thread Only" option.

The Batch steps do not work in the Parallel Model Smiley Sad so is there a best practice establish a synchronization like this? I have some ideas, but I guess I'm thinking too complicated and can't see the wood for trees....Smiley Frustrated

 

Cheers

Oli

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

Can you do something like this?

 

InitializeIfNeeded()

{

    Lock("Initialization");

    if (!initialized)

    {

        Initialize();

        initialized = true;

    }

   Unlock("Initialization");

}

0 Kudos
Message 2 of 3
(4,391 Views)

James,

 

thanks for the reply. I guess I can implement sth like you suggested. Was just wondering, if I'm missing some built in option that saves me from tinkering myself.

 

Cheers

Oli

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