LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Cluster Wiring - Styles?

I consider a VISA timeout error a very likely error that shouldn't kill your program.  A user knocks out a cable.  They plug it back in.  You want the program to be able to recover.

 

 

0 Kudos
Message 11 of 15
(601 Views)

I suppose that it all depends, as it usually does, doesn't it?  However, I stand by my statement that an error such as a VISA timeout is not benign.  A user knocks out a cable?  In the middle of a critical test causing you to receive bad or no data and this is benign?  What would qualify as catastrophic if not this?  I believe that all errors should be dealt with and further state that no error should kill your program with the exception of something that indicates the programmer did something wrong which is about to damage hardware.  Even then, I don't think it should kill the program and if it does, it should do so after bringing up a notification which is acknowledged by the user or logged and proceed to a safe state if such is the requirement.

So, to summarize.  I feel that no error should "kill" a program and all errors should be handled or if erased (which should be quite rare), erased very specifically and in a protected area which guarantees no other errors are being erased.

0 Kudos
Message 12 of 15
(592 Views)

Maybe that VISA timeout error is not benign in your particular application if it causes catastrophic results.  In which case you better have a whole lot more control and prevention such as making sure the cable is locked into place and can't be touched.  And it sounds like you are enabling error handling to a level commeasurate to the level you need.

 

The original comment in this entire thread is that shift registers on an error wire without proper error handling can cause far more problems in an application well beyond the level of risk at it might entail.

 

 

0 Kudos
Message 13 of 15
(581 Views)

There isn't one correct way to do it.  You have to understand what the code is doing, and what would be the consequences of errors at various points; then wire accordingly.  Attached are some VIs I use frequently in error handling.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 14 of 15
(565 Views)

@paul_cardinale wrote:

There isn't one correct way to do it.  You have to understand what the code is doing, and what would be the consequences of errors at various points; then wire accordingly.  Attached are some VIs I use frequently in error handling.


You are right, of course.  I guess I only know about my world and I assume everyone is living in it.

 

I apologize to RavensFan for becoming so vehement, my posts were way more aggressive than they needed to be...

0 Kudos
Message 15 of 15
(517 Views)