NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Pass new thread step result to report?

I have two threads that launch from Main sequence file. The steps from the new threads do not get recorded in the report. How do I pass the step results that are part of these new thread to the report? I am using TS 4.1.

0 Kudos
Message 1 of 7
(4,153 Views)

use a Wait syncronization step and Set the Wait Settings to Wait For Thread. Select the Thread you want to wait for and the results will be in the Step will contain the results as though it were a sequence call.

 

Hope this helps.

 

-Jack

0 Kudos
Message 2 of 7
(4,152 Views)

If I use Wait synchronization step then I need to uncheck "Automatically Wait for the Thread to Complete at the End of the Current Sequence" option, correct?

 

Not sure what is causing the sequence to "Terminate" but from the main sequence I launch two threads and monitor the stationGlobal. If this StationGlobal sets to true then both the threads should stop. When I have the option "Automatically Wait for the Thread to Complete at the End of the Current Sequence" and if one one thread stops before the other(as usually they do based on the station global value), I get a Terminate dialog everytime.

0 Kudos
Message 3 of 7
(4,143 Views)

No you don't need to uncheck that option. You can wait on a thread in more than one place.

 

What do you mean by terminate dialog? Did you try to terminate the execution? If you terminate an execution and it doesn't complete within a certain amount of time, then a dialog is displayed to ask if you want to do something more drastic like abort the execution. Is this the dialog you are referring to? If so then one of your threads isn't completing for some reason and you need to debug it to determine what it is doing and why it's not completing.

 

Hope this helps,

-Doug

0 Kudos
Message 4 of 7
(4,137 Views)

Hello Doug,

 

After looking into the issue the problem that I am facing is that the control does not return to the Main sequence. I launch the first thread (lets say "Thread1") from the Setup group of Main Sequence. Then in the Main group I have a call to another sequence file (Monitor.seq) and then from this sequence file the second thread is launched (say "Thread 2"). Thread 2 returns the control to Monitor.seq but then the execution stays in Monitor.seq and never returns to Main.seq file.

I am wondering if Monitor.seq is a separate sequence file and that is the reason the control is not returning to Main.seq?

Any suggestions?

Thanks.

0 Kudos
Message 5 of 7
(4,116 Views)

I'm not really sure what you mean. If you are just doing a regular sequence call to monitor.seq then it is called in the same thread as the original sequence, thus monitor.seq's sequence must finish before the call returns back to the main sequence. Or did you mean something different? Perhaps you meant that monitor.seq is waiting for thread 2 at the end of its sequence because you have the "auto wait" checkbox checked for the "new thread" sequence call? Either way, Monitor.seq being a separate sequence file does not in any way affect what threads are created.

 

-Doug

0 Kudos
Message 6 of 7
(4,109 Views)

Perhaps if you listed the order or events you want to see happen, from beginning to end, we'd understand what you're trying to do.

 

-Jack

0 Kudos
Message 7 of 7
(4,104 Views)