LibTiePie  0.9.16
Library for interfacing TiePie engineering instruments
Amplitude range

Description

Functions for controlling the amplitude range of a generator.

A generator has one or more output ranges, use GenGetAmplitudeRanges() to get the available ranges. Within each range, the amplitude can be set in a fixed number of steps. When amplitude auto ranging is disabled, the amplitude can only be set within the selected amplitude range. When amplitude auto ranging is enabled, selecting a certain amplitude may change the amplitude range to the most appropriate value.

By default the amplitude auto ranging is enabled (BOOL8_TRUE).

Functions

uint32_t GenGetAmplitudeRanges (LibTiePieHandle_t hDevice, double *pList, uint32_t dwLength)
 Get the supported amplitude ranges for a specified generator. More...
 
double GenGetAmplitudeRange (LibTiePieHandle_t hDevice)
 Get the currently set amplitude range for a specified generator. More...
 
double GenSetAmplitudeRange (LibTiePieHandle_t hDevice, double dRange)
 Set the amplitude range for a specified generator. More...
 
bool8_t GenGetAmplitudeAutoRanging (LibTiePieHandle_t hDevice)
 Get the amplitude auto ranging setting for a specified generator. More...
 
bool8_t GenSetAmplitudeAutoRanging (LibTiePieHandle_t hDevice, bool8_t bEnable)
 Set the amplitude auto ranging setting for a specified generator. More...
 

Function Documentation

uint32_t GenGetAmplitudeRanges ( LibTiePieHandle_t  hDevice,
double *  pList,
uint32_t  dwLength 
)

Get the supported amplitude ranges for a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
[out]pListA pointer to an array to hold the amplitude range values.
[in]dwLengthThe number of elements in the array.
Returns
The number of amplitude ranges.
Status values
NOT_SUPPORTED The current signal type does not support signal amplitude (range).
INVALID_HANDLE The handle is not a valid generator 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
uint32_t dwRangeCount = GenGetAmplitudeRanges( hDevice , NULL , 0 );
double* pRanges = malloc( sizeof( double ) * dwRangeCount );
dwRangeCount = GenGetAmplitudeRanges( hDevice , pRanges , dwRangeCount );
printf( "GenGetAmplitudeRanges:\n" );
for( uint32_t i = 0 ; i < dwRangeCount ; i++ )
printf( "- %f\n" , pRanges[ i ] );
free( pRanges );
See also
GenGetAmplitudeRange
GenSetAmplitudeRange
GenGetAmplitudeAutoRanging
GenSetAmplitudeAutoRanging
Since
0.4.1
double GenGetAmplitudeRange ( LibTiePieHandle_t  hDevice)

Get the currently set amplitude range for a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
The currently set amplitude range.
Status values
NOT_SUPPORTED The current signal type does not support signal amplitude (range).
INVALID_HANDLE The handle is not a valid generator 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
GenGetAmplitudeRanges
GenSetAmplitudeRange
GenGetAmplitudeAutoRanging
GenSetAmplitudeAutoRanging
Since
0.4.1
double GenSetAmplitudeRange ( LibTiePieHandle_t  hDevice,
double  dRange 
)

Set the amplitude range for a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
[in]dRangeThe maximum value that must fit within the requested amplitude range.
Returns
The actually set amplitude range.
Status values
VALUE_CLIPPED The requested amplitude range is outside the valid range and clipped to the closest limit.
VALUE_MODIFIED The requested amplitude range is within the valid range but not available. The closest valid value is set.
INVALID_VALUE The requested amplitude range is < 0.
NOT_CONTROLLABLE The generator is currently not controllable, see GenIsControllable.
NOT_SUPPORTED The current signal type does not support signal amplitude (range).
INVALID_HANDLE The handle is not a valid generator 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.
Remarks
Setting the amplitude range will disable amplitude auto ranging when enabled.
Setting the amplitude range may affect the amplitude.
Example
double dRange = 10;
dRange = GenSetAmplitudeRange( hDevice , dRange );
printf( "GenSetAmplitudeRange = %f" , dRange );
See also
GenGetAmplitudeRanges
GenGetAmplitudeRange
GenGetAmplitudeAutoRanging
GenSetAmplitudeAutoRanging
Since
0.4.1
bool8_t GenGetAmplitudeAutoRanging ( LibTiePieHandle_t  hDevice)

Get the amplitude auto ranging setting for a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
The currently set amplitude auto ranging setting: BOOL8_TRUE if enabled, BOOL8_FALSE if disabled.
Status values
NOT_SUPPORTED The current signal type does not support signal amplitude (range).
INVALID_HANDLE The handle is not a valid generator 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
GenGetAmplitudeRanges
GenGetAmplitudeRange
GenSetAmplitudeRange
GenSetAmplitudeAutoRanging
Since
0.4.1
bool8_t GenSetAmplitudeAutoRanging ( LibTiePieHandle_t  hDevice,
bool8_t  bEnable 
)

Set the amplitude auto ranging setting for a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
[in]bEnableThe required amplitude auto ranging setting: BOOL8_TRUE to enable or BOOL8_FALSE to disable.
Returns
The actually set amplitude auto ranging setting: BOOL8_TRUE if enabled, BOOL8_FALSE if disabled.
Status values
NOT_CONTROLLABLE The generator is currently not controllable, see GenIsControllable.
NOT_SUPPORTED The current signal type does not support signal amplitude (range).
INVALID_HANDLE The handle is not a valid generator 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.
Remarks
Setting amplitude auto ranging may affect the amplitude range.
See also
GenGetAmplitudeRanges
GenGetAmplitudeRange
GenSetAmplitudeRange
GenGetAmplitudeAutoRanging
Since
0.4.1