LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error in/out handling

I'm starting to write bigger and bigger code. And as such...I'm having more and more error handling to handle. Do I need to wrap each VI with an Error Out to "simple error handler" or can I just string them together and the "simple error handler" will spit out the errors? I know that I might need to use event handling in my VIs to pass errors but I'm ok with that. I'm just not sure of the compadibitiy of the error lines from different VIs.


0 Kudos
Message 1 of 6
(2,550 Views)
All Labview functions have the same Error cluster for Error In/Out.  You should have no problem to string Error Out from one vi to Error In of the next vi.  You can put your simple error handler at the end (the last Error Out).
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 6
(2,548 Views)

And when you write your own subVIs, you can put the code inside a case statement and wire the error cluster to the case selector. NI functions with an error connection will just pass the error cluster through without executing. If you have code that might take a while to execute, you would want to skip that if an error condition exists.

Message Edited by Dennis Knutson on 05-16-2007 04:06 PM

0 Kudos
Message 3 of 6
(2,545 Views)
Thanks for the help, that will clean up my code some. I'm not build alot of subVIs yet as most of our VIs are so completely different from each other that very little carries over.


0 Kudos
Message 4 of 6
(2,534 Views)
The key thing with managing errors is to be systematic in the way you do it. For example, if you handle things properly at the lower levels in your code hierarchy there will be very little code that you have to wrap in a case statement driven by an error cluster. The reason for this is that in-bound errors will almost always disable the operation of built-in functions. For example, you don't have to put a case around property node because an error will prevent the property from being updated.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 6
(2,527 Views)

B@frontiergeo wrote:
I'm not build alot of subVIs yet as most of our VIs are so completely different from each other that very little carries over.


I'm taking note of this statement because it hints to me that your code might need some structure. Not using subvi's is a first sign of trouble.


Michael Aivaliotis
VI Shots LLC
0 Kudos
Message 6 of 6
(2,517 Views)