PICO_STATUS ps6000aGetTimebase
(
int16_t handle,
uint32_t timebase,
uint64_t noSamples,
double * timeIntervalNanoseconds,
uint64_t * maxSamples
uint64_t segmentIndex
)
This function calculates the sampling rate and maximum number of samples for a given timebase under the specified conditions. The result will depend on the number of channels enabled by the last call to ps6000aSetChannelOn() or ps6000aSetChannelOff().
The easiest way to find a suitable timebase is to call ps6000aNearestSampleIntervalStateless(). Alternatively, you can estimate the timebase number that you require using the information in the timebase guide, then pass this timebase to ps6000aGetTimebase() and check the returned timeIntervalNanoseconds argument. Repeat until you obtain the time interval that you need.
Applicability |
All modes
Arguments |
handle, the device identifier returned by ps6000aOpenUnit().
timebase, see timebase guide.
noSamples, the number of samples required. This value is used to calculate the most suitable time interval.
timeIntervalNanoseconds, on exit, the time interval between readings at the selected timebase. Use NULL if not required.
maxSamples, 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 segments, number of channels enabled, and the timebase chosen. Use NULL if not required.
segmentIndex, the index of the memory segment to use.
Returns |
PICO_OK
PICO_INVALID_HANDLE
PICO_TOO_MANY_SAMPLES
PICO_INVALID_CHANNEL
PICO_INVALID_TIMEBASE
PICO_INVALID_PARAMETER
PICO_SEGMENT_OUT_OF_RANGE
PICO_DRIVER_FUNCTION