LibTiePie  0.5
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Macros Modules Pages
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.

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

Function Documentation

double GenGetFrequencyMin ( TpDeviceHandle_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.
DEVICE_GONE The device indicated by the device 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 ( TpDeviceHandle_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.
DEVICE_GONE The device indicated by the device 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 ( TpDeviceHandle_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.
DEVICE_GONE The device indicated by the device 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 ( TpDeviceHandle_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.
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.
DEVICE_GONE The device indicated by the device 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