NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Result of a sequence that run in a new thread

I'm running a sub sequence in a new thread. The problem is that the result of the step is always 'Done' & not 'Pass' or 'Fail'.
Why?
Ofer
0 Kudos
Message 1 of 4
(3,049 Views)
Ofer,

each thread has its own unique SequenceContext. So if you choose to run a subsequence in a new thread, the result of the subsequence is traced in another SequenceContext than the call took place. So in the caller, you can only decide if you called the subsequence (Done) or didn't (Skipped or Error).

If you like to know the result of the subsequence in the report for example, you have to make sure that the result is passed from subsequence to caller. Now the tricky thing is to replace "Done" as stepresult from the sequencecall with the result passed back from the called sequence. It is not too simple since the result from each step is evaluated in the status expression which is executed as last part of the step. So maybe you want to create a customized sequencecall with a modified status expression here....

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(3,046 Views)

Thanks,

Ofer

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

  The other solution is to use a 'wait' step as outlined near the bottom of this knowledge base:

    http://zone.ni.com/devzone/cda/tut/p/id/4823#toc2

 (Section 'Collecting Result Information from a Sequence Run in a New Execution or in a New Thread').

  The final result of the 'new thread' subsequence will be the result of the 'wait'.  This worked for me.


Andrew

 

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