LibTiePie  0.9.16
Library for interfacing TiePie engineering instruments
Resolution

Description

Functions to control the oscilloscope resolution.

The resolution determines how accurate the amplitude of a signal can be measured. The higher the resolution, the more accurate the input signal can be reconstructed.

Devices can support multiple resolutions, use ScpGetResolutions() to determine the available resolutions for a device.

Besides native hardware resolutions, also enhanced resolutions can be available for a device. Use ScpIsResolutionEnhanced() to determine whether the current resolution is a native hardware resolution or an enhanced resolution.

The resolution can be set manually, but can also be set automatically, when auto resolution mode is enabled.

Modules

 Auto resolution mode
 Functions to control the auto resolution mode.
 

Functions

uint32_t ScpGetResolutions (LibTiePieHandle_t hDevice, uint8_t *pList, uint32_t dwLength)
 Get an array with the supported resolutions of the specified oscilloscope. More...
 
uint8_t ScpGetResolution (LibTiePieHandle_t hDevice)
 Get the current resolution of the specified oscilloscope. More...
 
uint8_t ScpSetResolution (LibTiePieHandle_t hDevice, uint8_t byResolution)
 Set the resolution of the specified oscilloscope. More...
 
bool8_t ScpIsResolutionEnhanced (LibTiePieHandle_t hDevice)
 Check whether the currently selected resolution is enhanced or a native resolution of the hardware. More...
 

Function Documentation

uint32_t ScpGetResolutions ( LibTiePieHandle_t  hDevice,
uint8_t *  pList,
uint32_t  dwLength 
)

Get an array with the supported resolutions of the specified oscilloscope.

The caller must assure that the array is available and that enough memory is allocated.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
[out]pListA pointer to an array to contain the supported resolutions, or NULL.
[in]dwLengthThe number of elements in the array.
Returns
Total number of supported resolutions, or 0 when unsuccessful.
Status values
INVALID_HANDLE The handle is not a valid oscilloscope handle.
OBJECT_GONE The object indicated by the handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
Example
uint8_t byResolutionCount = ScpGetResolutions( hDevice , NULL , 0 );
uint8_t* pResolutions = malloc( sizeof( uint8_t ) * byResolutionCount );
byResolutionCount = ScpGetResolutions( hDevice , pResolutions , byResolutionCount );
printf( "ScpGetResolutions:\n" );
for( i = 0 ; i < byResolutionCount ; i++ )
printf( "- %u bits\n" , pResolutions[ i ] );
free( pResolutions );
See also
ScpGetResolution
ScpSetResolution
Since
0.4.0
uint8_t ScpGetResolution ( LibTiePieHandle_t  hDevice)

Get the current resolution of the specified oscilloscope.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
Returns
The current resolution in bits, or 0 when unsuccessful.
Status values
INVALID_HANDLE The handle is not a valid oscilloscope handle.
OBJECT_GONE The object indicated by the handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
ScpGetResolutions
ScpSetResolution
Since
0.4.0
uint8_t ScpSetResolution ( LibTiePieHandle_t  hDevice,
uint8_t  byResolution 
)

Set the resolution of the specified oscilloscope.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
[in]byResolutionThe required resolution in bits.
Returns
The actually set resolution in bits, or 0 when unsuccessful.
Remarks
Changing the resolution may affect the sample frequency, record length and/or channel trigger enabled.
Setting the resolution will set auto resolution mode to AR_DISABLED.
Status values
INVALID_VALUE The requested value is invalid.
INVALID_HANDLE The handle is not a valid oscilloscope handle.
OBJECT_GONE The object indicated by the handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
ScpGetResolutions
ScpGetResolution
Since
0.4.0
bool8_t ScpIsResolutionEnhanced ( LibTiePieHandle_t  hDevice)

Check whether the currently selected resolution is enhanced or a native resolution of the hardware.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
Returns
BOOL8_TRUE if the current resolution is enhanced, BOOL8_FALSE otherwise.
Status values
INVALID_HANDLE The handle is not a valid oscilloscope handle.
OBJECT_GONE The object indicated by the handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
Since
0.4.0