Sign in to follow this  
steveandrews

Device Error Handling

Recommended Posts

Hi,

 

I want to catch the device errors thrown by Daqfactory when a labjack is disconnected or not present on startup.

I have some startup code that autoruns and initiates the labjack etc. I want this code to try to communicate and catch the device error if no labjack is present and display a message box saying the labjack should be plugged in etc. Then when the message box is 'ok'd', it tries to run the startup sequence again. I also want to catch the error when it's disconnected whilst running, although in this case it will reconnect automatically but I would stop a sequence running and display a message. 

 

The error code is D0050:01:1007 for no labjack found - i assume the 01 is the device number and the last 4 digits the unique code. It's 1015 for labjack disconnected.

I know how to catch 'C' errors and display messages etc. I have tried catch("D0050") and catch ("D0050:01:1007") with no luck.

 

Any tips?

 

 

Cheers

 

Steve

 

 

Share this post


Link to post
Share on other sites

Are you reading the labjack with Channels or through script?  Through script you can use catch(), but through channels, you'll have to use the OnAlert system event to capture it.  See section 5.28 in the user's guide.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this