NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using multi-threading: Setting a VI to be used for two sequences at same time

I have two sequences running as two different threads. This is supposed to be in parallel but both sequences access the same VI, then they're not executing as parallel because one sequence use this VI then liberates it and the other sequence use it, and so on consecutively until both sequences finish. This is not what I want.

How can I do to set this VI with any kind of property or something that can be accessed for both sequences at the same time?

Thanks,

0 Kudos
Message 1 of 2
(2,729 Views)

Hi Margarita, you can set a VI to be reentrant (under VI Setup»Execution Options from TestStand, this function can also be used from LabVIEW) . Now depending on the king of VI you are using this can be something safe or can cause trouble. If the VI needs to keep information (for example a Functional Global Variable) or it is handling Hardware it can give you errors (for example trying to access the same DAQ at the same time from different task.

If you need more information can you tell us what does this VI does?

This Links might also be useful:

When I Run Parallel TestStand Executions That Call the Same VI, Why Don't the VIs Run in Parallel?

Differences Between Reentrant VIs (Preallocate), Reentrant VIs (Share Clones), VI Templates, and Dyn...

 

Best Regards

Benjamin C
Principal Systems Engineer // CLA // CLED
0 Kudos
Message 2 of 2
(2,714 Views)