NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Terminating subsequence with fail, main gives passed!

Hello,

 

I run a main sequence which calls selectable subsequences.

When I call a subsequence I use "Use New Execution".

 

Now when a fail appears in the subsequence and I terminate the subsequence it states "Passed" when returning to the main sequence.

This problem does not happen when I don't terminate the subsequence.

 

I tried to modify in the main sequence the "Runstate.SequenceFailed" but this does not work.

Included is the main sequence.

 

gr,

Bart

0 Kudos
Message 1 of 8
(3,919 Views)

Bart,

 

what version of TS are you using?

 

Looking into the sequence file does not help much since you use a lot of StationGlobals and unknown subsequence files.

What i think is that the subsequence (New Execution) is not finished when you try to access its result. You do start a parallelism with your sequence call step, but i don't see any synchronization included which makes sure that you get the result only if the subsequence is finished.

 

So all in all: Why do you start a new execution at all if you obviously require sequential execution flow?

 

Norbert

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

Hi Norbert,

 

I use teststand version 2010 f1 4.5.0.330(editor 4.5.0.310).

The mainsequence doens't have to logged for the report it's only there to gather information about the product to be tested, it then call's a test sequence.

If the test sequence is finished then the results are logged and the main sequence will be ready for the user to input information about the new product.

 

This test isn't parallism as far as I know since the main sequence will wait till the subsequence is finished or am I wrong?

 

gr,

Bart

 

 

 

0 Kudos
Message 3 of 8
(3,887 Views)

Bart,

 

since you spawn a new execution, you are invoking parallelism, regardless if you need it or not.

So your MainSequence from the calling sequence file is keeping executing until it is finished. So the expression "asking" for the status of your newly spawned execution is executed in parallel, not once the subsequence is finished!

You have chosen to wait in the caller until the subsequence is finished, so it just stays in running mode until the sub is also going idle.

 

So all in all, works as expected (intended).

 

From my understanding, you are currently meddling on a workaround of a proper custom user interface....

 

Norbert

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

Well the reason I do it now like this is because the standard UUT modell had not enough option, or I had to change it with some c programming.

 

Maybe I'm not understanding you properly but how can I make the sequence go as I mention:

- all pass "Pass"

- 1 or more fail "FAIL"

- 1 or more Fail + break test(Subsequence) "FAIL"

 

As the 3e case I get Passed this has to be "Fail".

 

 

0 Kudos
Message 5 of 8
(3,880 Views)

What do you mean by "break test"?

 

Did you check the Batch Model?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 8
(3,876 Views)

Hi Norbert,

 

Here below you can see the result when I did a simple fail generator test and I break this sub test which called from the main.

As you can see there was a fail and then I terminated the test which results in a "PASS" which is not good ofcourse.

This allways happens when I do a break test in the sub sequence which is called from the mainsequence.

 

 

 

Failed_status.JPG

0 Kudos
Message 7 of 8
(3,874 Views)

I have madde a workaround I guess.

Made a stationglobal which defines if the subsequence is finished.

Then I copy the RunState.SequenceFailed from the subsequence to the main sequence.

 

Dont know what I'm doing wrong exactly.

I set the Synchronization to Serial for both the main en sub sequence but to result.

0 Kudos
Message 8 of 8
(3,867 Views)