If you convert the status code to a hexadecimal number, this gives 0x10000008 (PICO_DEVICE_MEMORY_OVERFLOW) indicating that the device memory has overflowed.
What sampling rate are you using and how large are the overview and application buffers? Its possible that they might not be large enough for the data being returned on each iteration of the loop.
Indeed, the problems seemed that the buffers wasn't large enough. They were a size of 250.000 and we have increased them to a more relevant size and it works for our test of 1min.
But it doesn't work when we want to do loooooong acquisition of data, even if we increase the size of the buffer. Well, it might works but it takes very long times.
We have a sampling rate of 1MS/s, we set the buffer size to 10e+9 and we want to collect datas for 15min, that is we set this like this :
For a long data capture at 1 MS/s, try setting the overview buffer size to something like 500,000 or 1,000,000. Depending on the rate being used, setting the overview buffer with a large size can slow down the streaming data collection.
Setting the number of post trigger samples to a very large number can cause issues as well, as the underlying ps4000.dll shared library stores the data samples. With each sample being 2 bytes (16-bits), 900000000 samples will be about 1.67 GB.
What you can try doing is set the number of post-trigger samples to a much smaller number and setting the autoStop property in the Streaming group to 0. You can then either choose to monitor the total samples collected and stop data collection when this is reached or use a timer to exit the data collection loop after a period of time.
I am also trying to make long data captures in Streaming Mode using Matlab and a PicoScope 4224.
The longest data capture I can take is about 1 minute long with a sampling rate of 10MS/s.
After that time the same error occurs. I tried many different buffersizes and sampling rates. The lower the sampling rate, the longer is the time before the programm returns the error.
Has anyone succeeded in taking extremely long/ indefinitely long data captures using Matlab (with a sampling rate of 9-10 MS/s)?