I am writing a C# program to control the TC-08 data logger. I set the device into streaming mode and record the data periodically (every 1s). I have noticed during debugging that should the software be terminated that the logger continues running (LED toggles red/green). When I next start the application I am not able to open the device again (error code 9 is reported) until I physically disconnect it and reconnect it to the PC.
I thought I could get round this by storing the device handle in the registry and simply closing it the next time the application started. Unfortunately, this does not seem to work. I get error code 0 back from the close request, but also a 0 back from get last error, so I'm not sure what the problem is. The device continues running and cannot be opened.
Any suggestions for resetting the device automatically in this case? It is not a problem on my desk PC, but when running on a test rig the USB ports cannot be accessed easily.
I am not planning on my software crashing , but the tests run over many days so there is always a possibility of a windows crash.