LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My error handling case cannot catch error message box pop up

Hello all, 

 

   Here is the case, when I am using my system for long hours,  there are times that I cannot be able to keep an eye on the measurements thats why I have created an error handling case structure which turns off my heaters and power supplies in any case of an error. However, that is not the case when there is an error message popping up which waits for the user input to click. I was wondering how I can control this error box and let the error handling take care of that when user is not around?

 

Thanks in advance. 

 

0 Kudos
Message 1 of 12
(3,522 Views)

This depends. What are you using for the error popup? A one button dialog, the "display message to user" express VI? A custom dialog? The general error handler?

 

I would suggest using the "display message to user" because there is an option to "show or not show" the message. Just have the user click a checkbox on the front panel called "away" or something like that before he leaves. If this boolean is clicked, then choose not to show the error message. If it isn't checked, then show it the message.

 

You could also turn off the heaters BEFORE showing the message. Then if the message sits there, it doesn't matter because they have already been turned off. This way when the user comes in in the morning they will know there was an error. (or you could use an error log also). There's all sorts of options and it really depends on what you ultimately want, which will drive your decision.

0 Kudos
Message 2 of 12
(3,515 Views)

What software architecture do you have? and how are you handling errors?


By default, LabVIEW automatically handles any error when a VI runs by suspending execution, highlighting the subVI or function where the error occurred, and displaying an error dialog box.


You should disable automatic error handling and handle the error yourself. If you have a state machine architecture, you could add an error case that you can transition to if an error occurs where you can deal with it.

 

Read this

Lewis Gear CLA
LabVIEW UAV

0 Kudos
Message 3 of 12
(3,507 Views)

Thanks for the responses, they are very helpful. 

 

I am attaching my screenshot for the error case structure I am using, error out 2 here is the error coming from the error out previous sub VI that was running. So I am not using error pop out windows, I just have 2 cases, If there is error, stop the Sub VI's which are heaters and power supplies and If there is no error then do nothing. 

 

Problem is when there is an error pop out window, then this error case structure does not catch it as an error (when the pop up is  open and the user did not give any input).

 

What should I do to make the error pop out windows send en error out to my case structure w/o removing the box so I can see what the error was in the morning as 'for(imstuck)' recommended. 

 

Thanks,

0 Kudos
Message 4 of 12
(3,495 Views)

If you have a standard LabVIEW error dialog popping up, that means you haven't handled all of your errors.  Somewhere you have a VI that had an error coming out but isn't wired to anything else.

 

You need to find that spot and wire up that error wire to something, and handle it within you architecture in a way that makes sense.

0 Kudos
Message 5 of 12
(3,482 Views)

One example of a VI which behaves as RavensFan suggests is the Write to Spreadsheet File.vi.  It uses the pop up Error Handler VIs internally.  Read from Spreadsheet File.vi is another culprit.

 

If you use those and decide to change them, be sure to save the modified files with a different name and in a location other than vi.lib.

 

Lynn

0 Kudos
Message 6 of 12
(3,466 Views)

Dear 

0 Kudos
Message 7 of 12
(3,462 Views)

It depends on what your error is.  Do you know?

 

If it is something like a an error caused by and invalid filename or path, you could check if the filename is valid before passing it on to the Write to Spreadsheet file VI, then the error wouldn't occur.

0 Kudos
Message 8 of 12
(3,459 Views)

I have a loop of measurements that is going on and I am updating the spreadsheet each time I get a measurement. so it works fine sometimes there is no error until the end of the measurement but in some cases an error pops out and luckily I was there at that time to catch it cos then the heaters remain at the constant current which might cause a problem If the measurement is at the maximum current when the error cccurs. 

 

Some of the Sub Vi's have for loops inside and I can only monitor the error after the subvi is ended so I suspect when the error occurs in one of the loops in the sub vi - then it may yield to an pop up window? Maybe I should put the error case handlers inside the for loops of the sub vi's as well ? 

0 Kudos
Message 9 of 12
(3,457 Views)

As I said, it all depends on your architecture.  You need to handle them where they occur, then decide what you need to do with it.  That may mean breaking out of the subVI loops.  Or passing the information to an error handling loop via a notifier.

0 Kudos
Message 10 of 12
(3,454 Views)