LibTiePie
0.9.15
Library for interfacing TiePie engineering instruments
|
Functions for controlling signal frequency, sample frequency and frequency mode of a generator.
The frequency of a generator can be set between a minimum and a maximum value. Use GenGetFrequencyMin() and GenGetFrequencyMax() to get the frequency limits.
The frequency setting can either set the signal frequency or the sample frequency of the generator, depending on the selected Frequency mode.
When signal type DC is active, frequency is not available. Use GenHasFrequency() to check whether frequency is available for the currently set signal type.
By default the frequency mode is set to signal frequency (FM_SIGNALFREQUENCY) and the frequency is set to 1 kHz.
Modules | |
Frequency mode | |
Functions to control the generator frequency mode. | |
Functions | |
bool8_t | GenHasFrequency (LibTiePieHandle_t hDevice) |
Check whether the current signal type and frequency mode of a specified generator support controlling the signal/sample frequency. More... | |
double | GenGetFrequencyMin (LibTiePieHandle_t hDevice) |
Get the minimum signal/sample frequency with the current frequency mode, of a specified generator. More... | |
double | GenGetFrequencyMax (LibTiePieHandle_t hDevice) |
Get the maximum signal/sample frequency with the current frequency mode and signal type, of a specified generator. More... | |
double | GenGetFrequency (LibTiePieHandle_t hDevice) |
Get the current signal/sample frequency, of a specified generator. More... | |
double | GenSetFrequency (LibTiePieHandle_t hDevice, double dFrequency) |
Set signal/sample frequency, of a specified generator. More... | |
bool8_t GenHasFrequency | ( | LibTiePieHandle_t | hDevice | ) |
Check whether the current signal type and frequency mode of a specified generator support controlling the signal/sample frequency.
[in] | hDevice | A device handle identifying the generator. |
INVALID_HANDLE | The handle is not a valid generator handle. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
double GenGetFrequencyMin | ( | LibTiePieHandle_t | hDevice | ) |
Get the minimum signal/sample frequency with the current frequency mode, of a specified generator.
[in] | hDevice | A device handle identifying the generator. |
NOT_SUPPORTED | The generator does not support frequency for the current signal type. |
INVALID_HANDLE | The handle is not a valid generator handle. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
double GenGetFrequencyMax | ( | LibTiePieHandle_t | hDevice | ) |
Get the maximum signal/sample frequency with the current frequency mode and signal type, of a specified generator.
[in] | hDevice | A device handle identifying the generator. |
NOT_SUPPORTED | The generator does not support frequency for the current signal type. |
INVALID_HANDLE | The handle is not a valid generator handle. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
double GenGetFrequency | ( | LibTiePieHandle_t | hDevice | ) |
Get the current signal/sample frequency, of a specified generator.
[in] | hDevice | A device handle identifying the generator. |
NOT_SUPPORTED | The generator does not support frequency for the current signal type. |
INVALID_HANDLE | The handle is not a valid generator handle. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
double GenSetFrequency | ( | LibTiePieHandle_t | hDevice, |
double | dFrequency | ||
) |
Set signal/sample frequency, of a specified generator.
[in] | hDevice | A device handle identifying the generator. |
[in] | dFrequency | The requested signal/sample frequency, in Hz. |
VALUE_CLIPPED | The requested frequency is outside the valid range and clipped to the closest limit. |
VALUE_MODIFIED | The requested frequency is within the valid range but not available. The closest valid value is set. |
NOT_SUPPORTED | The generator does not support frequency for the current signal type. |
NOT_CONTROLLABLE | The generator is currently not controllable, see GenIsControllable. |
INVALID_HANDLE | The handle is not a valid generator handle. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |