API Functions
25
Copyright © 2006–2022 Pico Technology Ltd. All rights reserved.
ps2000pg.en-12
PicoScope 2000 Series Programmer's Guide
5.6
ps2000_get_timebase
int16_t ps2000_get_timebase
(
int16_t handle,
int16_t timebase,
int32_t no_of_samples,
int32_t *time_interval,
int16_t *time_units,
int16_t oversample,
int32_t *max_samples
)
are available on the oscilloscope. You should set up
first. Then call this function with increasing values of
timebase
, starting
from 0, until you find a timebase with a sampling interval and sample count close enough to
your requirements.
Applicability
All modes
Arguments
handle
: the handle of the required oscilloscope
timebase
: a code between 0 and the maximum timebase (depending on
the oscilloscope). Timebase 0 is the fastest timebase. Each successive
timebase has twice the sampling interval of the previous one.
no_of_samples
: the number of samples that you require. The function
uses this value to calculate the most suitable time unit to use.
time_interval
: on exit, this location will contain the time interval, in
nanoseconds, between readings at the selected timebase. If
time_interval
is
NULL
, the function will write nothing.
time_units
: on exit, this location will contain an enumerated type
indicating the most suitable unit for expressing sample times. You should
pass this value to
. If
time_units
is
null, the function will write nothing.
oversample
: the amount of oversample required. For example, an
oversample of 4 results in a
time_interval
4 times larger and a
max_samples
4 times smaller. At the same time it increases the effective
max_samples
: on exit, the maximum number of samples available. The
scope allocates a certain amount of memory for internal overheads and this
may vary depending on the number of channels enabled, the timebase
chosen and the oversample multiplier selected. If
max_samples
is
NULL
,
the function will write nothing.
Returns
non-zero: if all parameters are in range
0: on error
Содержание PicoScope 2000 Series
Страница 1: ...Programmer s Guide ps2000pg en 12 PC Oscilloscopes PicoScope 2000 Series ...
Страница 2: ......
Страница 67: ......