TC-08 Reset after termination

Post your .Net discussions here
Post Reply
CJM
Newbie
Posts: 0
Joined: Thu Jul 25, 2013 11:26 am

TC-08 Reset after termination

Post by CJM »

Hi,

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.

Thanks

Martyn
Site Admin
Site Admin
Posts: 4499
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: TC-08 Reset after termination

Post by Martyn »

I am not planning on my software crashing ;)
A good plan ;)

Do you try the usb_tc08_stop command before trying the usb_tc08_close_unit command ?
Martyn
Technical Support Manager

Post Reply