Background: I've been porting my Picoscope composite decoder software to 3000-series scopes and adding color support. I'm now using timebase = 3 to achieve captures at 16 ns intervals. To guarantee two full NTSC frames, I'll need 3 150 000 samples. Everything is working fine, but currently PS3000 data acquisition takes 75 % of time, 213 ms per frame, which effectively limits the FPS of my program to ~4.
The programming manual tells that 50 ms of setup time is usually needed for each capture, and to avoid that, suggests the use of rapid block mode and avoiding setup functions between calls. However:
1. ps3000aGetValuesBulk call fails when buffer size is over 2 080 000 samples - this is very close to 2^20, which suggests me that there's some kind of driver limit for using this function
2. ps3000aGetValuesBulk actually seems a bit slower (a few ms) than ps3000aGetValues when I capture 2M samples or less
3. Rapid mode doesn't seem to give and speedup when using it for single captures
So my questions are:
* Why the ...Bulk() method fails with larger capture sizes?
* Is rapid mode actually even supposed to speed up the initial setup time for capture (I trust it greatly reduces gaps between consecutive captures, but I only need 1 capture at a time to provide minumum latency to decoding)?
* Is ps3000aGetValuesBulk() actually needed for rapid mode, or could I just use ps3000aGetValues() as long as I set number of captures?
* Are there any other ways I could speed up the capture? (I have a gut feeling that probably not)
In case it helps, here's essentially my "inner loop" currently (removing ps3000aSetDataBuffer for consecutive calls had a speedup of 0.5%...):
ps3000aRunBlock(handle, 0, samples, timebase, 1, &timeIndisposed, 0, NULL, NULL));
ps3000aSetDataBuffer(handle, PS3000A_CHANNEL_A, buffer, samples, 0, PS3000A_RATIO_MODE_NONE);
ps3000aGetValues(handle, 0, (unsigned long*)&samples, 1, PS3000A_RATIO_MODE_NONE, 0, overflow);