LibTiePie  0.5
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Macros Modules Pages
Sample frequency

Description

Functions to control the sample frequency of the oscilloscope.

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

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

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

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

Functions

double ScpGetSampleFrequencyMax (TpDeviceHandle_t hDevice)
 Get the maximum supported sample frequency of a specified oscilloscope. More...
 
double ScpGetSampleFrequency (TpDeviceHandle_t hDevice)
 Get the currently selected sample frequency of a specified oscilloscope. More...
 
double ScpSetSampleFrequency (TpDeviceHandle_t hDevice, double dSampleFrequency)
 Set the sample frequency of a specified oscilloscope. More...
 

Function Documentation

double ScpGetSampleFrequencyMax ( TpDeviceHandle_t  hDevice)

Get the maximum supported sample frequency of a specified oscilloscope.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
Returns
The maximum supported sample frequency in Hz, or 0 when unsuccessful.
Status values
INVALID_HANDLE The handle is not a valid oscilloscope handle.
DEVICE_GONE The device indicated by the device handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
ScpGetSampleFrequency
ScpSetSampleFrequency
Since
0.4.0
double ScpGetSampleFrequency ( TpDeviceHandle_t  hDevice)

Get the currently selected sample frequency of a specified oscilloscope.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
Returns
The currently selected sample frequency in Hz, or 0 when unsuccessful.
Status values
INVALID_HANDLE The handle is not a valid oscilloscope handle.
DEVICE_GONE The device indicated by the device handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
ScpGetSampleFrequencyMax
ScpSetSampleFrequency
Since
0.4.0
double ScpSetSampleFrequency ( TpDeviceHandle_t  hDevice,
double  dSampleFrequency 
)

Set the sample frequency of a specified oscilloscope.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
[in]dSampleFrequencyThe required sample frequency in Hz.
Returns
The actually selected sample frequency in Hz, or 0 when unsuccessful.
Remarks
Changing the sample frequency may affect the record length, trigger time out, trigger delay and/or channel trigger time(s) value(s).
Changing the sample frequency may change the resolution if auto resolution mode is AR_NATIVEONLY or AR_ALL.
Status values
VALUE_CLIPPED The requested sample frequency is outside the valid range and clipped to the closest limit.
VALUE_MODIFIED The requested sample frequency is within the valid range but not available. The closest valid value is set.
INVALID_VALUE The requested value is not valid.
INVALID_HANDLE The handle is not a valid oscilloscope handle.
DEVICE_GONE The device indicated by the device handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
ScpGetSampleFrequencyMax
ScpGetSampleFrequency
Since
0.4.0