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

The frequency mode can be affected by changing the signal type. 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.

Functions

void GenGetFrequencyMinMax (TpDeviceHandle_t hDevice, uint32_t dwFrequencyMode, double *pMin, double *pMax)
 Get minimum and maximum signal/sample frequency by mode. More...
 
double GenGetFrequencyMin (TpDeviceHandle_t hDevice)
 Get minimum signal/sample frequency. More...
 
double GenGetFrequencyMax (TpDeviceHandle_t hDevice)
 Get maximum signal/sample frequency. More...
 
double GenGetFrequency (TpDeviceHandle_t hDevice)
 Get signal/sample frequency. More...
 
double GenSetFrequency (TpDeviceHandle_t hDevice, double dFrequency)
 Set signal/sample frequency. More...
 
uint32_t GenGetFrequencyModes (TpDeviceHandle_t hDevice)
 Get supported generator frequency modes. More...
 
uint32_t GenGetFrequencyMode (TpDeviceHandle_t hDevice)
 Get generator frequency mode. More...
 
uint32_t GenSetFrequencyMode (TpDeviceHandle_t hDevice, uint32_t dwFrequencyMode)
 Set generator frequency mode. More...
 

Function Documentation

void GenGetFrequencyMinMax ( TpDeviceHandle_t  hDevice,
uint32_t  dwFrequencyMode,
double *  pMin,
double *  pMax 
)

Get minimum and maximum signal/sample frequency by mode.

Parameters
hDeviceA device handle.
dwFrequencyModeGenerator frequency mode, a FM_* value.
pMinPointer to memory location for minimum or NULL.
pMaxPointer to memory location for maximum or NULL.
Since
0.4.0
double GenGetFrequencyMin ( TpDeviceHandle_t  hDevice)

Get minimum signal/sample frequency.

Parameters
hDeviceA device handle.
Returns
Minimum signal/sample frequency.
Since
0.4.0
double GenGetFrequencyMax ( TpDeviceHandle_t  hDevice)

Get maximum signal/sample frequency.

Parameters
hDeviceA device handle.
Returns
Minimum signal/sample frequency.
Since
0.4.0
double GenGetFrequency ( TpDeviceHandle_t  hDevice)

Get signal/sample frequency.

Parameters
hDeviceA device handle.
Returns
Signal/sample frequency.
Since
0.4.0
double GenSetFrequency ( TpDeviceHandle_t  hDevice,
double  dFrequency 
)

Set signal/sample frequency.

Parameters
hDeviceA device handle.
dFrequencySignal/sample frequency.
Returns
Signal/sample frequency.
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.
Since
0.4.0
uint32_t GenGetFrequencyModes ( TpDeviceHandle_t  hDevice)

Get supported generator frequency modes.

Parameters
hDeviceA device handle.
Returns
Supported generator frequency modes, a set of OR-ed FM_* values.
Since
0.4.1
uint32_t GenGetFrequencyMode ( TpDeviceHandle_t  hDevice)

Get generator frequency mode.

Parameters
hDeviceA device handle.
Returns
Generator frequency mode, a FM_* value.
Since
0.4.1
uint32_t GenSetFrequencyMode ( TpDeviceHandle_t  hDevice,
uint32_t  dwFrequencyMode 
)

Set generator frequency mode.

Parameters
hDeviceA device handle.
dwFrequencyModeGenerator frequency mode, a FM_* value.
Returns
Generator frequency mode, a FM_* value.
Remarks
Setting frequency mode is only available when signal type Arbitrary is active.
When signal type Sine, Triangle or Square is active, frequency mode is fixed at signal frequency.
When signal type Noise is active, frequency mode is fixed at sample frequency.
Since
0.4.1