NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Status of the mainsequence

Solved!
Go to solution

I use the batch model in Teststand 2014 and in the cleanup of the mainsequence i want to show  pupup message depending on the stauts ("Failed, Passed, Terminated or Error") of the mainsequence at that moment.

 

How can i do this ?

 

Thanks in advance.

0 Kudos
Message 1 of 7
(1,441 Views)

Heya Tonnie, 

When running a sequence in TestUUTs there is a popup box that appears showing this information. How does what you are looking for differ from this? 

Will you be running your sequence using TestUUTs?

What will you be doing with the information presented in the popup?

Does it need to be at the start of the Cleanup section?

 

Depending on your answers it will determine how we approach this problem

Thanks, 
Alastair

0 Kudos
Message 2 of 7
(1,394 Views)

Hello Allastair

 

Yes we use TestUUT.

I have a main of the mainsequence where a product is tested. At the end of that test (in the cleanup of the mainsequence) i have to reset the data logging of the product depending on the results of the measurements in the main part of the mainsequence. When the main sequence is failing, or has an error, or the sequence is terminated, the logging must not be reset. Only when the sequence is passed the logging must be reset in the Cleanup. 

Now i have made a sub sequence which i call in the Cleanup to reset the logging with a Precondition "Runstate.SequenceFailed == False".

This works when the sequence is Passed of Failed but not in the Terminated or Error situation. 

So i am looking  for a way to get all for states of the  mainsequence.

0 Kudos
Message 3 of 7
(1,389 Views)

Ok so I have two options. I've attached a sequence file example for each. In both examples I have put a popup and test step to determine the pass/fail and you can test the termination by terminating the sequence while the message popup is there. I haven't simulated an errors in these sequences. 

 

1. There isn't a SequencePassed property, but you can do multiple pre-conditions for the sequence. The checks I make in this one are on whether the sequence has passed, there was no error and it had not been terminated. If they all come out as True then I run the sub-sequence, otherwise it skips over. This requires storing the termination status in a local variable called termState. I'm sure there is a better way of doing this but I couldn't figure it out! This is what the Statement step is before the sequence call, which is an added step.

In the precondition for the sequence call I've put in the check. 

 

 

 

2. PostUTT

If you are thinking of having this run at the end of every test then having something in the PostUUT callback could be good. This runs regardless of the outcome of the sequence and you can check the status of the overall sequence more easily. I've put the following in the Pre-Condition for the Sequence call.

Parameters.Result.Status == "Passed"

This may change how the reporting works but it is neater and more scalable. This also will only work when the process model is called, so by running through SinglePass or TestUUTs.

 

 

You can find the numbers for the termination states by searching in your TestStand help for "ExecutionTerminationStates Enumeration". 

Let me know if this helps. 

Download All
0 Kudos
Message 4 of 7
(1,383 Views)

Thanks for all  the effort you have take to create the examples (although i cant read them. I use Teststand 2014) but i think the message is clear.

Maybe you can save them as Teststand 2014 files

 

Thanks in advance

0 Kudos
Message 5 of 7
(1,355 Views)

Ah yeah sorry about that. 

I've attached them again here. 

 

Download All
0 Kudos
Message 6 of 7
(1,351 Views)
Solution
Accepted by topic author Tonnie

Oke thanks 😁

0 Kudos
Message 7 of 7
(1,346 Views)