NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Message popup timeout reached or button pressed?

I have a Message Popup with one button.  This button is also set up to be the Timeout Button.  If I press the button, RunState.Sequence….Result.ButtonHit is set to 1.  Alternately, if I allow the timeout to be reached, Result.ButtonHit is also set to 1.  Is there a way to determine whether the timeout was reached or if the user pressed the button?

0 Kudos
Message 1 of 8
(4,545 Views)

Hi Christine,

 

I have just played with Message Popup's timeout and i also do not see a way to check if a timeout has been occured.

The only way is to use a new button for timeout but you can not hide it ! Only changing the colour stuff and this is looking

terrible. And if the user is pressing this button you will not determine a timeout, too!

 

I think the "blue ones"  should add this feature in next TS release.

Or they have some other suggestions.

 

Sorry that i have no solution.

 

Juergen 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 8
(4,526 Views)

workaround pseudocode:

 

MessageBox Pre Expression: Locals.PopupTime = Seconds()

MessageBox Post Expression: Locals.PopupTime = Seconds() - Locals.PopupTime

 

 

if (buttonHit == timeoutButton && Locals.PopupTime >= timeoutPeriod)

{

     // message box timed out

}

 

 

 

Message Edited by James Grey on 03-17-2010 09:32 AM
0 Kudos
Message 3 of 8
(4,512 Views)

Probably not the best solution, but you could measure the time it takes for the step to complete and determine if a timeout occurred.   There is a very small chance a user could click the button at the very end and have it show up as a timeout.

 

In the 'Expressions' for the message popup step enter the following:

 

Pre-Expression:  Locals.StartTime = Seconds()

Post-Expression:  Locals.TimeOut = (Seconds() - Locals.StartTime) > 4.9   //Set this as .1 less than the time interval for time to wait. 5 seconds in this case.

 

Jim

 

 

0 Kudos
Message 4 of 8
(4,510 Views)

Many thanks to all of you for your help and suggestions.  I'll try them out and see what works best for my application.

 

Christine

0 Kudos
Message 5 of 8
(4,484 Views)
The best solution, imho, is to modify the step and add a timedout? value to the step properties. The message boxes are written with CVI and the source code is provided.
0 Kudos
Message 6 of 8
(4,473 Views)

If you modify the step type, please create a copy of it and rename it to something specific to your company. Also, put the modified copy of the source code and dll under <TestStand Public>\Components\StepTypes\ and your modified step type in your own type palette file or MyTypes.ini. Doing these things will ensure that your modifications aren't lost when you upgrade to a newer version of TestStand in the future as well as making it easier to build a deployment for your system.

 

-Doug

0 Kudos
Message 7 of 8
(4,459 Views)
You're right. I should have mentioned that. With step types that I have modified, I also made sure to use a different menu name and in the menu editor, placed most of them under a different subMenu.
0 Kudos
Message 8 of 8
(4,449 Views)