NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Detect which button was selected from a message popup dialog box

Solved!
Go to solution

I'm sure I've done this before and cannot remember how I did it.

I even searched the forum for posts but could not find any.

 

I have a popup message that asks if a certain LED was lit.

There are two buttons "YES" & "NO".

 

I want to know which button was selected in order to assign a Pass/Fail result for the LED Test.

 

How do I accomplish this?

 

R

0 Kudos
Message 1 of 8
(6,349 Views)
Solution
Accepted by Ray.R

Step.Result.ButtonHit

 

It will 1 or 2 or more if you have more than 2 buttons

 

Omar

Omar
Message 2 of 8
(6,346 Views)

Hi Omar!

 

Well done you are right.

I just want to attach for your "Zealous" friend a link to an example

http://forums.ni.com/ni/board/message?board.id=330&message.id=19906&query.id=464727#M19906

 

Thanks

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 3 of 8
(6,339 Views)

Thanks guys 🙂

 

Yes... it triggered some of my memory cells..

It's the lack of cafeine  😉  (I have to blame it on something) .

 

Juergen,

 

Which version of TS were you using, as I could not open the sequence file with TS3.1

However, it is okay, since I'll find my way the the info provided.

 

R

 

(strangely enough, I can pick the correct solution, but cannot give kudos... 😮  I'll log in tonight from another PC)

Message Edited by Ray.R on 09-03-2009 12:49 PM
0 Kudos
Message 4 of 8
(6,336 Views)

It does not appear to be a feature that was available in TS3.1  😞

 

 

 noStepReultButton.PNG

 

 

And the error message from TS while trying to open the sequence file.

 

seqError.PNG

 

 

I created a dll in CVI that passes the selected button as a result.

Message Edited by Ray.R on 09-03-2009 01:37 PM
0 Kudos
Message 5 of 8
(6,326 Views)

Ray,

 

I believe the property has existed going back to version one. Are you sure you are looking at the properties of the actual popup step?

0 Kudos
Message 6 of 8
(6,308 Views)

Pass or Fail on which button was selected. How do you accomplish this?

 

The popup step does not by default Pass or Fail.

 

Are you trying to read in a which button in a step after the popup? Then you will need to read it from the result list.

Locals.ResultList[?].ButtonHit

 

But I would try configuring the Status Expression of the actual popup step that you ask it the LED was lit to something like 

 

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

Omar
0 Kudos
Message 7 of 8
(6,302 Views)

buttonProp.PNG

 

Just found it.  Thanks guys.  This is good to know in the future.

 

RayR

0 Kudos
Message 8 of 8
(6,282 Views)