This could be considered a more generic question for NiDaqmx, but I am writing a custom control for internal use with the USB-6525 and eventually other I/O devices using C#. I'm using DigitalChangeDetectionEvent to notify me when an input has changed and everything seems to work very well. In an effort to be thorough, I decided to disconnect the USB cable to see the result and found that no error was detected until I attempted an output write. This isn't acceptable because under normal circumstanced the input starts a process which will change outputs - since the input never happens the system is basically hung.
I attempted many things, and have spent more time on this than I want to admit so I would like to hear suggestions on how to approach this problem. Here are my attempts that I'm not happy with:
1) periodically toggling an output (heartbeat) which will detect the problem, but I may not have an output available so this isn't a good situation.
2) periodically trying to read the input byte with the same input task stream, this doesn't work because I believe the other reader is always active to handle the DigitalChangeDetectionEvent.
3) attempted to capture the Windows message for hardware change, but seems too complex.
4) I've read about the watchdog, but am not sure it is available on the USB-6525. So before I start with this I'd rather hear suggestions from others with more experience.
Any suggestions please?
Thx, Ed