LibTiePie  0.4.4
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Macros Groups Pages
Amplitude

Functions for controlling the amplitude and amplitude range. More...

Functions

double GenGetAmplitudeMax (TpDeviceHandle_t hDevice)
 Get maximum signal amplitude.
 
double GenGetAmplitudeMin (TpDeviceHandle_t hDevice)
 Get minimum signal amplitude.
 
double GenGetAmplitude (TpDeviceHandle_t hDevice)
 Get signal amplitude.
 
double GenSetAmplitude (TpDeviceHandle_t hDevice, double dAmplitude)
 Set signal amplitude.
 
bool8_t GenGetAmplitudeAutoRanging (TpDeviceHandle_t hDevice)
 Get auto ranging.
 
bool8_t GenSetAmplitudeAutoRanging (TpDeviceHandle_t hDevice, bool8_t bEnable)
 Set auto ranging.
 
uint32_t GenGetAmplitudeRanges (TpDeviceHandle_t hDevice, double *pList, uint32_t dwLength)
 Get supported ranges.
 
double GenGetAmplitudeRange (TpDeviceHandle_t hDevice)
 Get range.
 
double GenSetAmplitudeRange (TpDeviceHandle_t hDevice, double dRange)
 Set range.
 

Detailed Description

Functions for controlling the amplitude and amplitude range.

By default the amplitude is set to: 1 V and auto ranging is enabled (BOOL8_TRUE).

Function Documentation

double GenGetAmplitudeMax ( TpDeviceHandle_t  hDevice)

Get maximum signal amplitude.

Parameters
hDeviceA device handle.
Returns
Maximum signal amplitude.
Since
0.4.0
double GenGetAmplitudeMin ( TpDeviceHandle_t  hDevice)

Get minimum signal amplitude.

Parameters
hDeviceA device handle.
Returns
Minimum signal amplitude.
Since
0.4.0
double GenGetAmplitude ( TpDeviceHandle_t  hDevice)

Get signal amplitude.

Parameters
hDeviceA device handle.
Returns
Signal amplitude.
Since
0.4.0
double GenSetAmplitude ( TpDeviceHandle_t  hDevice,
double  dAmplitude 
)

Set signal amplitude.

Parameters
hDeviceA device handle.
dAmplitudeSignal amplitude.
Returns
Signal amplitude.
Remarks
The amplitude range can change when auto ranging is enabled.
When signal type Square wave is active, a new waveform pattern may be uploaded, shortly interrupting the output signal.
When signal type DC is active, setting amplitude is not available.
Since
0.4.0
bool8_t GenGetAmplitudeAutoRanging ( TpDeviceHandle_t  hDevice)

Get auto ranging.

Parameters
hDeviceA device handle.
Returns
BOOL8_TRUE if enabled, BOOL8_FALSE if disabled.
Since
0.4.1
bool8_t GenSetAmplitudeAutoRanging ( TpDeviceHandle_t  hDevice,
bool8_t  bEnable 
)

Set auto ranging.

Parameters
hDeviceA device handle.
bEnableBOOL8_TRUE to enable or BOOL8_FALSE to disable.
Returns
BOOL8_TRUE if enabled, BOOL8_FALSE if disabled.
Since
0.4.1
uint32_t GenGetAmplitudeRanges ( TpDeviceHandle_t  hDevice,
double *  pList,
uint32_t  dwLength 
)

Get supported ranges.

Parameters
hDeviceA device handle.
pListPointer to array.
dwLengthNumber of elements in array.
Returns
Total number of ranges.
Example
uint32_t dwRangeCount = GenGetAmplitudeRanges( hDevice , NULL , 0 );
double* pRanges = malloc( sizeof( double ) * dwRangeCount );
dwRangeCount = GenGetAmplitudeRanges( hDevice , pRanges , dwRangeCount );
printf( "GenGetAmplitudeRanges:\n" );
for( i = 0 ; i < dwRangeCount ; i++ )
printf( "- %f\n" , pRanges[ i ] );
free( pRanges );
Since
0.4.1
double GenGetAmplitudeRange ( TpDeviceHandle_t  hDevice)

Get range.

Parameters
hDeviceA device handle.
Returns
Range.
Since
0.4.1
double GenSetAmplitudeRange ( TpDeviceHandle_t  hDevice,
double  dRange 
)

Set range.

Parameters
hDeviceA device handle.
dRangeMaximum value that must fit within range.
Returns
Range.
Remarks
Setting the amplitude range will disable amplitude auto ranging if enabled.
Example
double dRange = 10;
dRange = GenSetAmplitudeRange( hDevice , dRange );
printf( "GenSetAmplitudeRange = %f" , dRange );
Since
0.4.1