scope handle, sample interval, time units, max samples, auto stop, no. of samples per aggregate, and overview buffer size
If "auto stop" is false, does the parameter "max samples" mean or do anything? I assume it only means the total number of samples the user wants streamed before the scope stops streaming, but that is not clear in the documentation. Based on the documentation, "max samples" and "overview buffer size" sound almost identical, hence why I am confused.
The documentation reads as such:
max_samples: the maximum number of samples that the driver
should store from each channel. Your computer must have enough
physical memory for this many samples, multiplied by the number
of channels in use, multiplied by the number of bytes per sample.
overview_buffer_size: the size of the overview buffers,
temporary buffers used by the driver to store data before passing it
to your application. You can check for overview buffer overruns
using the ps2000_overview_buffer_status() function and adjust the
overview buffer size if necessary. We recommend using an initial
value of 15,000 samples.
To give you an idea of the context in which I am doing this in: In my application, I am doing constant streaming (so I set auto stop to be false). I have a software-defined logical trigger in my code that collects the samples I care about from the oscilloscope.
When my software-defined trigger is activated, I collect about 500ms worth of data at a sample rate of 1 sample = 10 us.
This is my call to the ps2000_run_streaming_ns function to set up streaming before all of that happens:
- Code: Select all
uint _bufferSize = 15000; //is this really even necessary?!?!?!?
uint _overview_buffer_size = 15000;
uint microseconds_per_sample = 10;
short auto_stop = 0;
short result = PicoScopeLibrary.Imports.ps2000_run_streaming_ns(ScopeHandle, microseconds_per_sample,
_bufferSize, auto_stop, 1, _overview_buffer_size);
Thanks for any help!