steveandrews Posted March 3, 2016 Share Posted March 3, 2016 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 Link to comment Share on other sites More sharing options...
AzeoTech Posted March 4, 2016 Share Posted March 4, 2016 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.