LibTiePie  0.7.4
Library for interfacing TiePie engineering instruments
Frequency

Description

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...
 

Function Documentation

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.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
BOOL8_TRUE if supported, BOOL8_FALSE if not.
Status values
INVALID_HANDLE The handle is not a valid generator handle.
OBJECT_GONE The object indicated by the handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
GenGetFrequencyMin
GenGetFrequencyMax
GenGetFrequency
GenSetFrequency
Since
0.6
double GenGetFrequencyMin ( LibTiePieHandle_t  hDevice)

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

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
The minimum signal/sample frequency, in Hz.
Status values
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_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
GenGetFrequencyMax
GenGetFrequency
GenSetFrequency
Since
0.4.0
double GenGetFrequencyMax ( LibTiePieHandle_t  hDevice)

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

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
The maximum signal/sample frequency, in Hz.
Status values
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_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
GenGetFrequencyMin
GenGetFrequency
GenSetFrequency
Since
0.4.0
double GenGetFrequency ( LibTiePieHandle_t  hDevice)

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

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
The currently set signal/sample frequency, in Hz.
Status values
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_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
GenGetFrequencyMin
GenGetFrequencyMax
GenSetFrequency
Since
0.4.0
double GenSetFrequency ( LibTiePieHandle_t  hDevice,
double  dFrequency 
)

Set signal/sample frequency, of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
[in]dFrequencyThe 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
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_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
GenGetFrequencyMin
GenGetFrequencyMax
GenGetFrequency
Since
0.4.0