LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error "occurred at..."

Hi all,

 

Trying to handle custom error codes in state machine.  When my custom errors occur and the dialog is displayed it tells the user the VI which the error occurred in.  I don't want to show the user this info.

 

Just want to display custom code and description.

 

Has anyone got any advanced tips or examples on State Machine error handling?

 

Thanks,

 

Battler.

0 Kudos
Message 1 of 10
(3,212 Views)

I usually have an error case as one the state in state machine. This case will just sorts out the error and forms a description like the error source, description and the state in which this error has occured. Which is later either diaplyed on a string indicator on the FP or written to a error log file with time stamps

 

Guru 

Regards
Guru (CLA)
0 Kudos
Message 2 of 10
(3,201 Views)

Thanks Guru.

 

Does this mean you don't use the General Error Handler VI?

0 Kudos
Message 3 of 10
(3,188 Views)

battler. wrote:

Thanks Guru.

 

Does this mean you don't use the General Error Handler VI?


If you don't want the pop-up yes.

 

In my simple apps I have a hidden Error cluster that is made visable (property >>> Visable True) when the error is set.

 

THe only thing more simple is to show the indicator all of the time and let the user decide when to look at it.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 10
(3,170 Views)

I also prefer to have an "Error" case in my state machine which handles any errors which occur...some of them can be handled silently by the software and some of them require user interaction (such as plugging the serial cable back in).  Having an error case gives you a lot of flexibility.

 

However, if you want to use the "General Error Handler" and don't want a pop-up, you can select that option...

 

gen err hndl.PNG

 

 

d

Message Edited by DianeS on 05-13-2010 01:17 PM
Message 5 of 10
(3,163 Views)

I do want a pop-up.  I don't want the user to see which subVI caused the error (which is part of the default message given by the general error handler).

 

Is there a nugget about error handling?

0 Kudos
Message 6 of 10
(3,140 Views)

Probably your best bet is to create your own pop-up, containing the error code and message and whatever else you want. 

 

To the best of my knowledge, there is no error handling nugget...I might be wrong but I haven't seen one.  That would be a great topic!

Message Edited by DianeS on 05-13-2010 07:14 PM
0 Kudos
Message 7 of 10
(3,125 Views)

battler. wrote:

I do want a pop-up.  I don't want the user to see which subVI caused the error (which is part of the default message given by the general error handler).

 

Is there a nugget about error handling?


 

In my case, I have an Event Logging library that is used in most of my apps so we have had errors handled for years and I don't spend much time thinking about that. There was a lively discussion on LAVA last year about error handling. 

 

No Nugget but here is a link to the Error handling presentation that Chris Relf gave at NI week last year.

 

This thread is the one that spawned the above.

 

Here is a thread on automatic error handling.

 

I hope those links help,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 10
(3,097 Views)

That's really helpful Ben.  I'm going to now spend my Saturday evening enjoying videos about Advanced Error Handling 😉  No really... I am. Smiley Very Happy

 

Cheers mate.

 

BTW, I think the General Error Handler VI should have a few more options with regards to the message displayed to the user.  It would also be nice if we could choose from some of the Windows dialogs such as the exclamation mark (!) dialog etc.

Message Edited by battler. on 05-15-2010 03:01 AM
Message 9 of 10
(3,077 Views)

battler. wrote:

That's really helpful Ben.  I'm going to now spend my Saturday evening enjoying videos about Advanced Error Handling 😉  No really... I am. Smiley Very Happy

 

Cheers mate.

 

BTW, I think the General Error Handler VI should have a few more options with regards to the message displayed to the user.  It would also be nice if we could choose from some of the Windows dialogs such as the exclamation mark (!) dialog etc.

Message Edited by battler. on 05-15-2010 03:01 AM

If you find that entertaining I have my audio cassettes of "Quantum Mechanics 2"* laying around somewhere.

 

Smiley Tongue

 

Ben

 

* You have not slept until you have been lulled to sleep by someone lecturing while solving Schroedenger Wave Equation. Can I have a big S'  ?

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 10
(3,041 Views)