NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Pressing the cancel button to fail sequence

Solved!
Go to solution

Hi All,

 

Little question:

 

In a (main)sequence, I call a subsequence. This sub sequence sends three signals to a monitor, which result in three different screens.

Using message popups, I want the tester to decide wether the screen is good. If it's good, he/she should press OK button, if not good, press Fail button.

 

So, when I press the OK button (button 1) the test has passed, and should continue to the next.

When I press the Fail button (button 2) I want the test to fail, and the (main)sequence to be failed to.

 

Currently, when I press Fail, the step in the subsequence fails, but the main sequence from which the sub sequence is called, is still saying passed.

 

These are the settings for my message popup as they are:

Expressions:

Post expression:  RunState.SequenceFailed = (Step.Result.ButtonHit == 1) ? False : True

Pre expression: Step.Result.ButtonHit == 1 ? "Passed" : "Failed"

 

 

 

Thanks in advance!

Jeroen, The Netherlands

0 Kudos
Message 1 of 8
(5,053 Views)

Hi Jeroen,

 

Can you check if the Step Failure Causes Sequence Failure check box in the Run options of the sequence call step in the main sequence is unchecked. If its unchecked can you check it and try. I'm guess this should be your problem.

 

Thanks,

Sathish

0 Kudos
Message 2 of 8
(5,049 Views)

Hey,

 

Thanks for your fast reply!

However, this is not the solution 😞

 

Jeroen

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

Can you post your sequence. When I tried what you have put up in your post, the main sequence failed and the overall result was failed.

I'm not sure if you are using the pre expression or the status expression for setting the step failure. From your post it seems like you are using the pre expression. Can you clarify on that ?

 

Thanks,

Sathish

0 Kudos
Message 4 of 8
(5,043 Views)

Here it is

 

(I have posted the main sequence, and the three sub sequences)

(Made the extension a jpg, change it to rar, so you can extract all the sequences from it)

0 Kudos
Message 5 of 8
(5,040 Views)

Hi,


I'm using Post expressions, and status expressions.

 

Looked like I missed some files in the archive. 

Here is the archive, complete with all the sub sequences, and DLL.

(again, I changed the extension to jpg, just change it back to rar)

 

Jeroen

0 Kudos
Message 6 of 8
(5,026 Views)
Solution
Accepted by topic author Jeroen_Mechatronics

Hey Jeroen,

 

I think I got the cause of your problem this time. You need not use the post expression in the message popup step at all. You can just have your status expression. Whats happeing is when you run the sequence when the 1st two steps fail and the 3rd step passes, the 3rd step sets the RunState.SequenceFailed boolean back to False. So the sequence result becomes Passed. In short removing the post expression in your message pop up steps will solve the problem.

 

Thanks,

Sathish

0 Kudos
Message 7 of 8
(5,020 Views)

Thanks man, that did indeed fix my problem!

 

Jeroen

0 Kudos
Message 8 of 8
(5,015 Views)