LibTiePie
0.5
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.
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 | |
double | GenGetFrequencyMin (TpDeviceHandle_t hDevice) |
Get the minimum signal/sample frequency with the current frequency mode, of a specified generator. More... | |
double | GenGetFrequencyMax (TpDeviceHandle_t hDevice) |
Get the maximum signal/sample frequency with the current frequency mode and signal type, of a specified generator. More... | |
double | GenGetFrequency (TpDeviceHandle_t hDevice) |
Get the current signal/sample frequency, of a specified generator. More... | |
double | GenSetFrequency (TpDeviceHandle_t hDevice, double dFrequency) |
Set signal/sample frequency, of a specified generator. More... | |
double GenGetFrequencyMin | ( | TpDeviceHandle_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. |
DEVICE_GONE | The device indicated by the device handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
double GenGetFrequencyMax | ( | TpDeviceHandle_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. |
DEVICE_GONE | The device indicated by the device handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
double GenGetFrequency | ( | TpDeviceHandle_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. |
DEVICE_GONE | The device indicated by the device handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
double GenSetFrequency | ( | TpDeviceHandle_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. |
DEVICE_GONE | The device indicated by the device handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |