Jump to content

message box in labview


mic_k86

Recommended Posts

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

Link to comment

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.

Link to comment

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.

Link to comment

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...

Link to comment

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

Link to comment

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. :D 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.

Link to comment

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)

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.