mic_k86 Posted February 13, 2009 Report Share Posted February 13, 2009 hi all, i have some concept from visual basic but i not sure can applied it to labview or not. let say i have a numeric control to set the delay time. if the user selected 00:00:00 and click run, message box "wrong time selected" pop out and return the user to the labview control panel to selected the time interval again. how to do that in labview? *i am using labview 8.5 Quote Link to comment
Aristos Queue Posted February 13, 2009 Report Share Posted February 13, 2009 QUOTE (mic_k86 @ Feb 11 2009, 09:20 PM) hi all, i have some concept from visual basic but i not sure can applied it to labview or not.let say i have a numeric control to set the delay time. if the user selected 00:00:00 and click run, message box "wrong time selected" pop out and return the user to the labview control panel to selected the time interval again. how to do that in labview? *i am using labview 8.5 In the Dialog palette, you'll find One Button Dialog, Two Button Dialog and Three Button Dialog. Quote Link to comment
Mark Yedinak Posted February 13, 2009 Report Share Posted February 13, 2009 I think the answer is more fundamental then that. What you need to do is validate your input prior to execution. In your example you would need to capture the start event (using an event structure is one possibility), then validate all of your input. If the input is valid start the execution. If not, display a message using a simple dialog box and return to waiting for the start message again. Quote Link to comment
mic_k86 Posted February 16, 2009 Author Report Share Posted February 16, 2009 mark, i not sure what you mention. (i am beginner in labview). Attached is my vi. this vi when execute will automatically collected data based on the time duration set by user. few step i need to modify with it, but i no idea. 1. if possible, when the vi is execute, it will not automatically collected data. (i.e user have to selected time interval and press a start button) 2.when the user selected 0 hour 0 minute 0 second and click start, the message box "error time entered" is pop up, and user will return the the front panel again to selected the time interval. 3. during 0 hour 0 minute 0 second time interval, no data is collected and save to the lvm file (this is my recently main problem) help...plz... Quote Link to comment
Aristos Queue Posted February 17, 2009 Report Share Posted February 17, 2009 Here you go. Download File:post-5877-1234783260.vi Quote Link to comment
mic_k86 Posted February 21, 2009 Author Report Share Posted February 21, 2009 Aristos, thanks for your help, but hv one problem. when user selected 0 hour 0 minute 0 second the error box will pop out, but after that when waiting the user to select another new time interval, the sensor still keep saving data. is it possible to set the vi to not save any data during that waiting interval? how to do it? regard mic_k86 Quote Link to comment
Aristos Queue Posted February 21, 2009 Report Share Posted February 21, 2009 QUOTE (mic_k86 @ Feb 19 2009, 09:36 PM) Aristos, thanks for your help, but hv one problem. when user selected 0 hour 0 minute 0 second the error box will pop out, but after that when waiting the user to select another new time interval, the sensor still keep saving data. is it possible to set the vi to not save any data during that waiting interval? how to do it? Yes, it is possible... in fact, I had to go out of my way to make it keep acquiring data because that's what I thought you wanted. Guess I misunderstood. I don't have LV available at the moment, so I'll tell you the easiest way in text: Take the VI I gave you and put the data acquisition code inside a Case Structure. Connect the time to the ? terminal. Put your acquisition code in the "Default" case and don't do anything in the "0" case. There's actually a much better way (the way I just told you will have the loop spin as an empty loop polling for a value change) but I can't explain it in text. Quote Link to comment
mic_k86 Posted February 22, 2009 Author Report Share Posted February 22, 2009 QUOTE put the data acquisition code inside a Case Structure. Connect the time to the ? terminal. Put your acquisition code in the "Default" case and don't do anything in the "0" case. aristos, i hv connect it. but not sure correct or not. i upload here. hv block diagram error: missing assignment to tunnel. my default case is 0 not 1. so i dont know wat to do. help... (if possible help me edit it) Quote Link to comment
mic_k86 Posted February 23, 2009 Author Report Share Posted February 23, 2009 aristos, here i upload the update from my previous version by following ur method. can execute, but have the following problem: 1. when 00:00:00, still continue saving data. (your previous version dont hv this problem, so i dont know what wrong i do on it) 2. only will save data when 00:00:01, other times (00:00:02, 00:01:00, etc...) will save as 0. (your previous version also dont hv this problem) regard mic_k86 Quote Link to comment
mic_k86 Posted February 24, 2009 Author Report Share Posted February 24, 2009 any help? 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.