LibTiePie  0.4.5
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Macros Modules Pages
Amplitude

Description

Functions for controlling the amplitude and amplitude range.

When signal type DC is active, amplitude is not available.

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

Functions

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

Function Documentation

double GenGetAmplitudeMax ( TpDeviceHandle_t  hDevice)

Get the maximum signal amplitude.

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

Get the minimum signal amplitude.

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

Get the signal amplitude.

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

Set the signal amplitude.

Parameters
hDeviceA device handle.
dAmplitudeSignal amplitude.
Returns
Signal amplitude.
Remarks
Setting the amplitude may change the amplitude range when amplitude auto ranging is enabled.
Setting the amplitude may cause a new waveform pattern to be uploaded when signal type Square wave is active, shortly interrupting the output signal.
Since
0.4.0
uint32_t GenGetAmplitudeRanges ( TpDeviceHandle_t  hDevice,
double *  pList,
uint32_t  dwLength 
)

Get the supported amplitude ranges.

Parameters
hDeviceA device handle.
pListPointer to array.
dwLengthNumber of elements in array.
Returns
Total number of ranges.
Remarks
Setting amplitude auto ranging may affect the amplitude range.
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 the amplitude range.

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

Set the amplitude range.

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

Get amplitude 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 amplitude 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