NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

New execution step behaviour

I am running TS4.1 with sequential model. Setup group has a newExecution subsequence. When this execution is started then some time critical tests in main group fails. If the newExecution subseqeunce is skipped the time critical steps in Main group executed.

Is this the expected behaviour of newExecution? Isn't launchng newExecution runs on its own thread without interfering with other threads (i.e steps in Main group)?

Settings for newExecution are set as shown in the image.

*************************************************
CLD
*************************************************
0 Kudos
Message 1 of 4
(2,842 Views)

Things are not so simple. It depends on what the threads are doing. You can try to minimize the impact of the other thread in several ways.

 

1) You can use the thread priority step types to give your time critical thread a higher priority while it's in a time critical section.

2) You can wait until the new thread has settled, there is some overhead in the UI thread if it is displaying the execution so you might want to wait until the execution gets to it's first step before continuing in the main thread. This might also help for other reasons even if you aren't displaying the execution in the UI. You can use a teststand notification step to help do this synchronization.

 

Anyway, one or both of these might fix the problem for you.

-Doug

0 Kudos
Message 2 of 4
(2,838 Views)

Thanks Doug, I tired with Thread priorty but didnt help:(...like you said things are not simple.

 

Here is a question:

Running new execution subsequence in separate CPU Affinity help? It is a quad core processor although not certain how to set TPS to run under one processor and new execution in another? 

New execution does have station globals and file globals that share data between TPS and new execution.

Also new execution monitors and if critical value is reached it is required to terminate execution.

Any inputs if heading this direction would help?

 

Thanks!!

 

*************************************************
CLD
*************************************************
0 Kudos
Message 3 of 4
(2,798 Views)

Some APIs might require critical sections used by the new execution while it is being created so it's possible your time critical thread is getting blocked in teststand while the new execution starts up. One thing that might speed up the startup of the new execution is to ensure that all of the sequence files it requires are already loaded. Another idea is to start your new execution way in advance, before the time critical code is running and just have it block on a notification which you don't set until you need it.

 

-Doug

0 Kudos
Message 4 of 4
(2,784 Views)