API Functions
39Copyright © 2006–2022 Pico Technology Ltd. All rights reserved.ps2000pg.en-12
PicoScope 2000 Series Programmer's Guide
5.19 ps2000_run_streaming_ns
int16_t ps2000_run_streaming_ns
(
int16_t handle,
uint32_t sample_interval,
PS2000_TIME_UNITS time_units,
uint32_t max_samples,
int16_t auto_stop,
uint32_t noOfSamplesPerAggregate,
uint32_t overview_buffer_size
)
This function tells the oscilloscope to start collecting data in fast streaming mode. It returns
immediately without waiting for data to be captured. After calling it, you should next call
ps2000_get_streaming_last_values to copy the data to your application's buffer.
PicoScope 2202, 2203, 2204, 2204A, 2205 and 2205A only
handle: the handle of the required oscilloscope
sample_interval: the time interval, in time_units, between data
points
time_units: the units in which sample_interval is measured
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.
auto_stop: a Boolean to indicate whether streaming should stop
automatically when max_samples is reached. Set to any non-zero value
for TRUE.
noOfSamplesPerAggregate: the number of incoming samples that the
driver will merge together (or aggregate: see aggregation) to create each
value pair passed to the application. The value must be between 1 and
max_samples.
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. The maximum allowable value is 1,000,000. We
recommend using an initial value of 15,000 samples.
non-zero: if streaming has been enabled correctly
0: if a problem occurred or a value was out of range