Error handling with Zaber devices in LabVIEW

409 views Asked by At

When writing a LabVIEW VI to control Zaber devices for a long test, can it recover from errors and continue the test while displaying the error text in a field? The VI is using the Zaber LabVIEW driver.

1

There are 1 answers

0
Don Kirkby On BEST ANSWER

The National Instruments web site has an article on handling errors. The basic technique is to wire the error output of each VI to the input of the next VI. Any VI that sees an error on its input line should skip its function and pass the error along.

To recover from an error, you just clear the error line and continue with your regular routine. Of course, you probably want to check the error code to make sure it's one that you want to recover from, and you probably want to record the error in a log or something. You might also want to perform some logic to move the Zaber devices back to their starting positions and settings.

In this example from our web site, the basic routine is to keep executing MoveRelative commands to extend the device. Obviously, it will eventually run out of room and return an error. When the error occurs, the error message is displayed in a field, and the device is moved back to position 0, where the basic routine can start again.

LabVIEW error handling