Hi!
I am using a 2204 device and I want to read one sample at a time (every 10ms) in the Compatible streaming mode. So I use ps2000_run_streaming(handle, 10, 1, 0). Now inside a while loop, I read value using ps2000_get_values(handle, &value, NULL, NULL, NULL, &overflow, 1) here value and overflow are defined as short. There is a sleep of 10ms inside the loop (usleep of 10000 us).
The problem I face is as follows. Unless I put a sleep of at least around 300ms after the ps2000_run_streaming and before the start of the loop (i.e., before the invocation of first ps2000_get_values), the return value of ps2000_get_values is zero (i.e., the function does not read any value). With the sleep of 300ms before the loop, it works for few iterations (10 to18 times) and then starts giving return value of zero for next many iterations.
The documentation says that short ps2000_ready is only applicable in the block mode so I assume I dont have to wait for the device/driver to be ready after starting the streaming and before reading a value or between two invocations of ps2000_get_values if there is a sleep of the time equal to the sampling rate.
Is this a driver bug or a limitation of the driver code or device?
Thanks,
Atul
Cart

