NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Wait in main execution suspends parallel thread

Hi,

 

In my main sequence I have a call to another sub-sequence.

The called sub-sequence is running as a thread.

The Called sequence is continuosly reading current values and stores them in an array together with a timestamp.

 

In the main sequence I have a Wait step that waits for 15 sec.

 

From the timestamps in the array I can see, that the threaded sub-sequence is put on hold for 15 seconds.

In other words: The wait in the main thread also suspends the parallel thread.

 

Is that is a correct behaviour?

I would expect, that the parallel thread would continue its work (monitoring current in my case)

 

Is there is any setting, that I can make to reach my wanted behaviour?

 

Many Thanks,

Thorsten

 

 

 

0 Kudos
Message 1 of 2
(3,024 Views)

This is not expected behavior, and I cannot reproduce this problem. In my simple test case, the subsequence thread continues to run while I'm at a wait step as expected. Are you sure there isn't some dependency in your second thread on something that the first thread does after the wait step? Have you tried to reproduce this problem in a simple case? I suspect the cause of the delay you are seeing is not directly related to the wait step, but to something else being done in the sequences. I recommend trying to debug this issue further to see why your thread is blocked.

 

Also some other ideas:

1) Are you running in a custom UI or the sequence editor? If using a custom UI try using the sequence editor or one of the default UIs and see if the problem goes away.

2) What version of TestStand are you using?

 

NOTE: You can switch threads for debugging while at a breakpoint, using the thread view window. In this way you can see what your other thread is doing. If your other thread blocks inside your own code you might need to be using Thread.ExternallySuspended in that code for breakpoints to work. See the online help for Thread.ExternallySuspended for more info if needed.

 

Hope this helps,

-Doug

 

Message Edited by dug9000 on 04-20-2010 11:01 AM
0 Kudos
Message 2 of 2
(3,019 Views)