libtiepie-hw  1.1.10

Functions to control the sample rate of the oscilloscope. More...

Collaboration diagram for Sample rate:

Functions

TIEPIE_HW_API double tiepie_hw_oscilloscope_get_sample_rate_max (tiepie_hw_handle handle)
 Get the maximum supported sample rate of a specified oscilloscope. More...
 
TIEPIE_HW_API double tiepie_hw_oscilloscope_get_sample_rate (tiepie_hw_handle handle)
 Get the currently selected sample rate of a specified oscilloscope. More...
 
TIEPIE_HW_API double tiepie_hw_oscilloscope_set_sample_rate (tiepie_hw_handle handle, double value)
 Set the sample rate of a specified oscilloscope. More...
 

Detailed Description

Functions to control the sample rate of the oscilloscope.

The rate at which samples are taken by the oscilloscope is called the sample rate, the number of samples per second. A higher sample rate corresponds to a shorter interval between the samples. With a higher sample rate, the original signal can be reconstructed much better from the measured samples.

The maximum supported sample rate depends on the used instrument and its configuration. Use tiepie_hw_oscilloscope_get_sample_rate_max to determine the maximum supported sample rate of a oscilloscope.

The sample rate can be affected by changing the channel enable, resolution and/or measure mode.

By default the sample rate is set to the highest value available.

Function Documentation

◆ tiepie_hw_oscilloscope_get_sample_rate_max()

TIEPIE_HW_API double tiepie_hw_oscilloscope_get_sample_rate_max ( tiepie_hw_handle  handle)

Get the maximum supported sample rate of a specified oscilloscope.

Parameters
[in]handleA device handle identifying the oscilloscope.
Returns
The maximum supported sample rate in Hz, or 0 when unsuccessful.
Status values
TIEPIE_HW_STATUS_INVALID_HANDLE The handle is not a valid oscilloscope handle.
TIEPIE_HW_STATUS_OBJECT_GONE
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
See also
tiepie_hw_oscilloscope_get_sample_rate
tiepie_hw_oscilloscope_set_sample_rate
Since
1.0

◆ tiepie_hw_oscilloscope_get_sample_rate()

TIEPIE_HW_API double tiepie_hw_oscilloscope_get_sample_rate ( tiepie_hw_handle  handle)

Get the currently selected sample rate of a specified oscilloscope.

Parameters
[in]handleA device handle identifying the oscilloscope.
Returns
The currently selected sample rate in Hz, or 0 when unsuccessful.
Status values
TIEPIE_HW_STATUS_INVALID_HANDLE The handle is not a valid oscilloscope handle.
TIEPIE_HW_STATUS_OBJECT_GONE
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
See also
tiepie_hw_oscilloscope_get_sample_rate_max
tiepie_hw_oscilloscope_set_sample_rate
Since
1.0

◆ tiepie_hw_oscilloscope_set_sample_rate()

TIEPIE_HW_API double tiepie_hw_oscilloscope_set_sample_rate ( tiepie_hw_handle  handle,
double  value 
)

Set the sample rate of a specified oscilloscope.

Parameters
[in]handleA device handle identifying the oscilloscope.
[in]valueThe required sample rate in Hz.
Returns
The actually selected sample rate in Hz, or 0 when unsuccessful.
Remarks
Changing the sample rate may affect the record length, trigger time out, trigger delay, channel trigger enabled and/or channel trigger time(s) value(s).
Changing the sample rate may change the resolution if auto resolution mode is TIEPIE_HW_ARM_NATIVEONLY or TIEPIE_HW_ARM_ALL.
Status values
TIEPIE_HW_STATUS_VALUE_CLIPPED The requested sample rate is outside the valid range and clipped to the closest limit.
TIEPIE_HW_STATUS_VALUE_MODIFIED The requested sample rate is within the valid range but not available. The closest valid value is set.
TIEPIE_HW_STATUS_INVALID_VALUE
TIEPIE_HW_STATUS_INVALID_HANDLE The handle is not a valid oscilloscope handle.
TIEPIE_HW_STATUS_OBJECT_GONE
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
See also
tiepie_hw_oscilloscope_get_sample_rate_max
tiepie_hw_oscilloscope_get_sample_rate
Since
1.0