grogg Posted July 12, 2005 Report Share Posted July 12, 2005 How can I prompt a warning to the user when he/she writes an incorrect value in a "controller box". Another question is how do I create a start button for the whole script? I guess these problems are easy to solve but I very new with using labview. I have tried the help file but it didn't help. Quote Link to comment
Riceman Posted July 13, 2005 Report Share Posted July 13, 2005 1) How can I prompt a warning to the user when he/she writes an incorrect value in a "controller box". 2) Another question is how do I create a start button for the whole script? 5290[/snapback] 1) Use a Case Structure to check the validity of the values you want and if invalid in the Output Palette you have a Block to Display Messages or in the Input Palette you have a Prompt User Block with which you can ask for a value in the message. Notice that if you enter into the Box Properties (in case it's for numeric values) you may limit the accepted range of values and type of values (byte, word, long, double, etc.) and LabView will do the validation automatically. 2) If the script must be run only once, Add a button in your front panel, put all the code inside an event structure (except the button), and set it to the Value Change of the button. Thus, when you press the start button the event will be executed once and the VI will end. If you want a Start Button and a Close button (so the program will be open until the user wants) create another button and add an Event Case to the same Event Sctucture. Put it all (including the buttons) inside a While Loop, and from within the Close Button Event Case link a "True" constant to the Loop Stop control. Quote Link to comment
Mark Balla Posted July 14, 2005 Report Share Posted July 14, 2005 How can I prompt a warning to the user when he/she writes an incorrect value in a "controller box". 5290[/snapback] Usually I try to do the data checking while the user in inputting the information. If they enter incorrect data I will erase the input box and ask them to try again. I've attached a basic serial number dialogue box that I use as a template. good luck. Download File:post-584-1121312835.vi Another question is how do I create a start button for the whole script? 5290[/snapback] It depends on how your code is structured. If you could post a vi I would be happy to look at it. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.