LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control user input with a button?

How do I control a user input from a dialog box by activating it with a button. I am saying "press zero", then when the user does press zero, it should zero the scale.

 

screen shot of program test 1.gif

0 Kudos
Message 1 of 5
(2,819 Views)

Looks like you already did.  Of course, since the case that is controlled by the button is inside the loop it will not occur till the program gets there.  You could move the "zero" VI out of the loop and right after the dialog.

-------
Mark Ramsdale
-------
0 Kudos
Message 2 of 5
(2,811 Views)

Did you want to activate the dialog by pressing "0" or did want the dialog to be comfirmed be the "0"?

 

If you want a user input to activate the dialog by pressing "0" you might be out of luck. But, you can use other key functions. First make a button, then right-click it and go to Properties and then the Key Navigation tab and change the toggle to what you so desire and add the modifer if you wish as well.

 

Hope this helped

0 Kudos
Message 3 of 5
(2,808 Views)

Right now I have it saying, please press ok to zero. I hooked the ok button boolean to the zero case structure. It appears to not be working.

0 Kudos
Message 4 of 5
(2,804 Views)

The user has only one button they can press.  You should enable the cancel so that the dialog can output an F.  

 

What you have works, but the zero will not occur until the case is activated.  If the insides of the case do not work, that is another story.  Put a pop up in the active case to convince yourself that the case is being entered.

 

This, what you have, always returns T.

 

ok.png

-------
Mark Ramsdale
-------
0 Kudos
Message 5 of 5
(2,802 Views)