LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to close an error dialog using software control without user's response

Hi all,

 

I was wondering if there is a way to press "continue" button programmatically when an error massage pops up. In USB communication application, if an error occures because of disconnection of USB cable, in this case VISA would generate an error windows, I am working on an effect that when the user reconnect the USB cable to the system, the error massage would disappear automatically. Your ideas would be appreciated.

 

Thanks & Regards

Peter Huang

 

    

0 Kudos
Message 1 of 9
(4,114 Views)

You are getting a popup because you either have automatic error handling turned (Tools>Options>Block Diagram) or you have the General Error Handler function in your code. So, the best way to fix your problem is to not have the popup displayed at all

0 Kudos
Message 2 of 9
(4,104 Views)

Thanks for your reply, I think I didn't make myself clear enough. I mean in my application, We hope user to see a popo up warning if USB cable somehow accidently disconnected. But we hope it would automatically close by software condition say detecting the reconnection of USB. I am thinking a way to avoid the susppession of code execution when error dialog box comes up, so that my programme would wait and hold an error window until certain boolean condition is met, then finally close itself.  So far, the information I found is simulating key stroke, another possible option is using invoke node with OK button as a control. Any other ideas?

0 Kudos
Message 3 of 9
(4,099 Views)

You can't use the built-in LabVIEW error popups.  You'll have to catch that error yourself and create your own subVI that pops up as an error dialog.  When it runs, it stays open until the user hits a stop button on it, or the part of your main VI that detects the USB has been reconnected sends a message to it (global variable, action engine, queue, notifier) to tell it to stop running and close itself down.

0 Kudos
Message 4 of 9
(4,096 Views)

Yes, I disabled Labview built-in auto error handle, trying to create my own error dialog. Thanks.  

0 Kudos
Message 5 of 9
(4,089 Views)

By it's nature an error dialogue will halt your code and stop it looking for the error condition to go away. Ravens Fan has the right answer for you, don't use the in-built functions, they don't actually give you what you want, a custom dialog would give you far more power.

0 Kudos
Message 6 of 9
(4,072 Views)

To build my own dialog vi, I am still using build-in dialog message like "Display message to user". My problem is  When I call this dialog subVi , my main VI code would still be susppended unless I press "OK" on the dialog.  I tried to configure subvi execution system different from main vi, I thought by this way It would be run in different thread. but it doesn't help....

0 Kudos
Message 7 of 9
(4,050 Views)
0 Kudos
Message 8 of 9
(4,047 Views)

also here: 

Calling a SubVI Without Waiting for It to Complete Execution

http://digital.ni.com/public.nsf/allkb/EEBEBEF66704646986256FBA007635BD

0 Kudos
Message 9 of 9
(4,046 Views)