NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a popup and PASS/FAIL Criteria

How do you use a popup to query the user for PASS/FAIL criteria? I have an LED ON/OFF. Want to use POPUP to ask user condition. If LED is in an incorrect state, seq fails. Want to allow user 2nd chance in case wrong button is hit the 1st time.
0 Kudos
Message 1 of 5
(3,558 Views)
Use the TestStand variable Step.Result.ButtonHit. This is a numeric value and corresponds to the button number (starting with 1) that was pressed. You can do a pass/fail result based on this variable. Like Step.Result.PassFail = (Step.Result.ButtonHit==1 ? True : False)
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 5
(3,558 Views)
TBOB,
How do I set a varible in TS so that at the end of the test I have a passed or failed sequence ? The status for a popup ( unlike a Numerical Limit Test) is always "DONE". For this particular test I ask the operator ( via popup) if a LED is on/off. I know what it should be so have something to compare it to. I then tell them what they selected (popup again) and ask if they want to retest ( maybe they selected too fast). Ask again ( loop) if the led is on/off. If they select correctly the tests passes otherwise the test fails. If the test fails the seq fails and shows up in the default report. I can't figure out how to set the pass/fail seq on the first (or second time depending on the answer to the retest) pass or fail.
0 Kudos
Message 3 of 5
(3,558 Views)
Look at the attached seq, and the Post Expression and Status Expression of Test1. Do the same for Test2 and Test3, but change the logic to make button 2 pass for testing LED off. Do you really want to have a terminate action in your Post Action? This causes an incomplete test without a pass/fail indication. Instead, set pass/fail like in Test1. If you want to abort the rest of the test, put a Goto End in your Post Action instead of Terminate.
BTW, Mr. Eastwood, can I have your autograph?
- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 5
(3,558 Views)
If this works..... sure !
0 Kudos
Message 5 of 5
(3,558 Views)