libtiepie-hw  1.2.5
Amplitude range

Functions for controlling the amplitude range of a generator. More...

Collaboration diagram for Amplitude range:

Functions

TIEPIE_HW_API uint32_t tiepie_hw_generator_get_amplitude_ranges (tiepie_hw_handle handle, double *list, uint32_t length)
 Get the supported amplitude ranges for a specified generator. More...
 
TIEPIE_HW_API double tiepie_hw_generator_get_amplitude_range (tiepie_hw_handle handle)
 Get the currently set amplitude range for a specified generator. More...
 
TIEPIE_HW_API double tiepie_hw_generator_set_amplitude_range (tiepie_hw_handle handle, double value)
 Set the amplitude range for a specified generator. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_get_amplitude_auto_ranging (tiepie_hw_handle handle)
 Get the amplitude auto ranging setting for a specified generator. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_set_amplitude_auto_ranging (tiepie_hw_handle handle, tiepie_hw_bool value)
 Set the amplitude auto ranging setting for a specified generator. More...
 

Detailed Description

Functions for controlling the amplitude range of a generator.

A generator has one or more output ranges, use tiepie_hw_generator_get_amplitude_ranges() 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.

Function Documentation

◆ tiepie_hw_generator_get_amplitude_ranges()

TIEPIE_HW_API uint32_t tiepie_hw_generator_get_amplitude_ranges ( tiepie_hw_handle  handle,
double *  list,
uint32_t  length 
)

Get the supported amplitude ranges for a specified generator.

Parameters
[in]handleA device handle identifying the generator.
[out]listA pointer to an array to hold the amplitude range values.
[in]lengthThe number of elements in the array.
Returns
The number of amplitude ranges.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The current signal type does not support signal amplitude (range).
TIEPIE_HW_STATUS_INVALID_HANDLE The handle is not a valid generator handle.
TIEPIE_HW_STATUS_OBJECT_GONE
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
Example
uint32_t Range_count = tiepie_hw_generator_get_amplitude_ranges(h_device, NULL, 0);
double* Ranges = malloc(sizeof(double) * Range_count);
Range_count = tiepie_hw_generator_get_amplitude_ranges(h_device, Ranges, Range_count);
printf("Gen_get_amplitude_ranges:\n");
for(uint32_t i = 0 ; i < Range_count ; i++)
printf("- %f\n", Ranges[ i ]);
free(p_ranges);
TIEPIE_HW_API uint32_t tiepie_hw_generator_get_amplitude_ranges(tiepie_hw_handle handle, double *list, uint32_t length)
Get the supported amplitude ranges for a specified generator.
See also
tiepie_hw_generator_get_amplitude_range
tiepie_hw_generator_set_amplitude_range
tiepie_hw_generator_get_amplitude_auto_ranging
tiepie_hw_generator_set_amplitude_auto_ranging
Since
1.0

◆ tiepie_hw_generator_get_amplitude_range()

TIEPIE_HW_API double tiepie_hw_generator_get_amplitude_range ( tiepie_hw_handle  handle)

Get the currently set amplitude range for a specified generator.

Parameters
[in]handleA device handle identifying the generator.
Returns
The currently set amplitude range.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The current signal type does not support signal amplitude (range).
TIEPIE_HW_STATUS_INVALID_HANDLE The handle is not a valid generator handle.
TIEPIE_HW_STATUS_OBJECT_GONE
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
See also
tiepie_hw_generator_get_amplitude_ranges
tiepie_hw_generator_set_amplitude_range
tiepie_hw_generator_get_amplitude_auto_ranging
tiepie_hw_generator_set_amplitude_auto_ranging
Since
1.0

◆ tiepie_hw_generator_set_amplitude_range()

TIEPIE_HW_API double tiepie_hw_generator_set_amplitude_range ( tiepie_hw_handle  handle,
double  value 
)

Set the amplitude range for a specified generator.

Parameters
[in]handleA device handle identifying the generator.
[in]valueThe maximum value that must fit within the requested amplitude range.
Returns
The actually set amplitude range.
Status values
TIEPIE_HW_STATUS_VALUE_CLIPPED The requested amplitude range is outside the valid range and clipped to the closest limit.
TIEPIE_HW_STATUS_VALUE_MODIFIED The requested amplitude range is within the valid range but not available. The closest valid value is set.
TIEPIE_HW_STATUS_INVALID_VALUE The requested amplitude range is < 0.
TIEPIE_HW_STATUS_NOT_CONTROLLABLE
TIEPIE_HW_STATUS_NOT_SUPPORTED The current signal type does not support signal amplitude (range).
TIEPIE_HW_STATUS_INVALID_HANDLE The handle is not a valid generator handle.
TIEPIE_HW_STATUS_OBJECT_GONE
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
Remarks
Setting the amplitude range will disable amplitude auto ranging when enabled.
Setting the amplitude range may affect the amplitude.
Example
double Range = 10;
Range = tiepie_hw_generator_set_amplitude_range(h_device, Range);
printf("Gen_set_amplitude_range = %f", Range);
TIEPIE_HW_API double tiepie_hw_generator_set_amplitude_range(tiepie_hw_handle handle, double value)
Set the amplitude range for a specified generator.
See also
tiepie_hw_generator_get_amplitude_ranges
tiepie_hw_generator_get_amplitude_range
tiepie_hw_generator_get_amplitude_auto_ranging
tiepie_hw_generator_set_amplitude_auto_ranging
Since
1.0

◆ tiepie_hw_generator_get_amplitude_auto_ranging()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_get_amplitude_auto_ranging ( tiepie_hw_handle  handle)

Get the amplitude auto ranging setting for a specified generator.

Parameters
[in]handleA device handle identifying the generator.
Returns
The currently set amplitude auto ranging setting: TIEPIE_HW_BOOL_TRUE if enabled, TIEPIE_HW_BOOL_FALSE if disabled.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The current signal type does not support signal amplitude (range).
TIEPIE_HW_STATUS_INVALID_HANDLE The handle is not a valid generator handle.
TIEPIE_HW_STATUS_OBJECT_GONE
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
See also
tiepie_hw_generator_get_amplitude_ranges
tiepie_hw_generator_get_amplitude_range
tiepie_hw_generator_set_amplitude_range
tiepie_hw_generator_set_amplitude_auto_ranging
Since
1.0

◆ tiepie_hw_generator_set_amplitude_auto_ranging()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_set_amplitude_auto_ranging ( tiepie_hw_handle  handle,
tiepie_hw_bool  value 
)

Set the amplitude auto ranging setting for a specified generator.

Parameters
[in]handleA device handle identifying the generator.
[in]valueThe required amplitude auto ranging setting: TIEPIE_HW_BOOL_TRUE to enable or TIEPIE_HW_BOOL_FALSE to disable.
Returns
The actually set amplitude auto ranging setting: TIEPIE_HW_BOOL_TRUE if enabled, TIEPIE_HW_BOOL_FALSE if disabled.
Status values
TIEPIE_HW_STATUS_NOT_CONTROLLABLE
TIEPIE_HW_STATUS_NOT_SUPPORTED The current signal type does not support signal amplitude (range).
TIEPIE_HW_STATUS_INVALID_HANDLE The handle is not a valid generator handle.
TIEPIE_HW_STATUS_OBJECT_GONE
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
Remarks
Setting amplitude auto ranging may affect the amplitude range.
See also
tiepie_hw_generator_get_amplitude_ranges
tiepie_hw_generator_get_amplitude_range
tiepie_hw_generator_set_amplitude_range
tiepie_hw_generator_get_amplitude_auto_ranging
Since
1.0