libtiepie-hw  1.1.3
Frequency

Functions for controlling signal frequency, sample rate and frequency mode of a generator. More...

Collaboration diagram for Frequency:

Modules

 Frequency mode
 Functions to control the generator frequency mode.
 

Functions

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_has_frequency (tiepie_hw_handle handle)
 Check whether the current signal type and frequency mode of a specified generator support controlling the signal/sample frequency. More...
 
TIEPIE_HW_API double tiepie_hw_generator_get_frequency_min (tiepie_hw_handle handle)
 Get the minimum signal/sample frequency with the current frequency mode, of a specified generator. More...
 
TIEPIE_HW_API double tiepie_hw_generator_get_frequency_max (tiepie_hw_handle handle)
 Get the maximum signal/sample frequency with the current frequency mode and signal type, of a specified generator. More...
 
TIEPIE_HW_API double tiepie_hw_generator_get_frequency (tiepie_hw_handle handle)
 Get the current signal/sample frequency, of a specified generator. More...
 
TIEPIE_HW_API double tiepie_hw_generator_set_frequency (tiepie_hw_handle handle, double value)
 Set signal/sample frequency, of a specified generator. More...
 

Detailed Description

Functions for controlling signal frequency, sample rate and frequency mode of a generator.

The frequency of a generator can be set between a minimum and a maximum value. Use tiepie_hw_generator_get_frequency_min() and tiepie_hw_generator_get_frequency_max() to get the frequency limits.

The frequency setting can either set the signal frequency or the sample rate of the generator, depending on the selected Frequency mode.

When signal type DC is active, frequency is not available. Use tiepie_hw_generator_has_frequency() to check whether frequency is available for the currently set signal type.

By default the frequency mode is set to signal frequency (TIEPIE_HW_FM_SIGNALFREQUENCY) and the frequency is set to 1 k_hz.

Function Documentation

◆ tiepie_hw_generator_has_frequency()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_has_frequency ( tiepie_hw_handle  handle)

Check whether the current signal type and frequency mode of a specified generator support controlling the signal/sample frequency.

Parameters
[in]handleA device handle identifying the generator.
Returns
TIEPIE_HW_BOOL_TRUE if supported, TIEPIE_HW_BOOL_FALSE if not.
Status values
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_frequency_min
tiepie_hw_generator_get_frequency_max
tiepie_hw_generator_get_frequency
tiepie_hw_generator_set_frequency
Since
1.0

◆ tiepie_hw_generator_get_frequency_min()

TIEPIE_HW_API double tiepie_hw_generator_get_frequency_min ( tiepie_hw_handle  handle)

Get the minimum signal/sample frequency with the current frequency mode, of a specified generator.

Parameters
[in]handleA device handle identifying the generator.
Returns
The minimum signal/sample frequency, in Hz.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The generator does not support frequency for the current signal type.
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_frequency_max
tiepie_hw_generator_get_frequency
tiepie_hw_generator_set_frequency
Since
1.0

◆ tiepie_hw_generator_get_frequency_max()

TIEPIE_HW_API double tiepie_hw_generator_get_frequency_max ( tiepie_hw_handle  handle)

Get the maximum signal/sample frequency with the current frequency mode and signal type, of a specified generator.

Parameters
[in]handleA device handle identifying the generator.
Returns
The maximum signal/sample frequency, in Hz.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The generator does not support frequency for the current signal type.
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_frequency_min
tiepie_hw_generator_get_frequency
tiepie_hw_generator_set_frequency
Since
1.0

◆ tiepie_hw_generator_get_frequency()

TIEPIE_HW_API double tiepie_hw_generator_get_frequency ( tiepie_hw_handle  handle)

Get the current signal/sample frequency, of a specified generator.

Parameters
[in]handleA device handle identifying the generator.
Returns
The currently set signal/sample frequency, in Hz.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The generator does not support frequency for the current signal type.
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_frequency_min
tiepie_hw_generator_get_frequency_max
tiepie_hw_generator_set_frequency
Since
1.0

◆ tiepie_hw_generator_set_frequency()

TIEPIE_HW_API double tiepie_hw_generator_set_frequency ( tiepie_hw_handle  handle,
double  value 
)

Set signal/sample frequency, of a specified generator.

Parameters
[in]handleA device handle identifying the generator.
[in]valueThe requested signal/sample frequency, in Hz.
Returns
The actually set signal/sample frequency, in Hz.
Remarks
When the generator is active, changing the signal/sample frequency will shortly interrupt the output signal.
When signal type DC is active, setting signal/sample frequency is not available.
Changing the frequency may affect the pulse width and/or leading and trailing edge time value(s) when signal type pulse is active.
Status values
TIEPIE_HW_STATUS_VALUE_CLIPPED The requested frequency is outside the valid range and clipped to the closest limit.
TIEPIE_HW_STATUS_VALUE_MODIFIED The requested frequency is within the valid range but not available. The closest valid value is set.
TIEPIE_HW_STATUS_NOT_SUPPORTED The generator does not support frequency for the current signal type.
TIEPIE_HW_STATUS_NOT_CONTROLLABLE
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_frequency_min
tiepie_hw_generator_get_frequency_max
tiepie_hw_generator_get_frequency
Since
1.0