sometime my picoscope lock your connection with the PC and i would like of know if exixsts any sample in C/C++ that cut the this connection of usb port and after reset this connection
i'm using pico3205 e pico3206, sometimes its broke your connection with the pc when i used my software and the software picoscope6.because i would like developing a software that cut the connection and after restart that connection
Without further details of exactly what is happening when the unit stops responding to your software it is difficult to offer a solution to your problem.
If you wanted to create a workaround you may be able to add a watchdog to your application which will call CloseUnit to close the connection to the device and then create a new handle to the device by calling OpenUnit.
Periodically ask the scope for some simple information, for example device serial number, and if you don't get any data back just close the unit before opening it again. I can't be more specific without more details of your software so can't guarantee that this would work.
I have the same problem with my picoscope 2203. It sometimes (it is hard to reproduce and find a pattern, sometimes after 10 minutes, sometimes after 2 days) looses the connection to the PC, meaning the picoscope is not found by any application (picoscope 6 software, or my own little app) anymore. In order to get it back, i have to unplug the usb connection and plug it again, or restart the PC.
My little app, that causes the crash does the following:
Unfortunately I cant see where and when the program gets stuck and it is hard to reproduce. What basically happens, is that I lose the usb connection to the picoscope and the call to get_streaming_last_values_ns gets stuck. When I then restart the PC I sometimes get the windows message, that the picoscope could not be initialized. After switching off and on the PC a second time the picoscope is detected again.
Is it possible, that streaming with one microsecond sampling interval over a longer period of time is too much for the picoscope?
Streaming at that rate shouldn't cause an issue for the device, so the problem is more likely to reside with the use of resources by the driver and/or the application, particularly if other applications/services are running on the PC. One suggestion would be to disable as much as possible, including removing unused USB hardware and see if the time before lock up changes significantly.