LibTiePie  0.9.16
Library for interfacing TiePie engineering instruments

Description

Functions for controlling the phase of a generator.

The phase defines the starting point in the period of the signal that is generated, as well as the ending point. The phase of a generator can be set between a minimum and a maximum value. Use GenGetPhaseMin() and GenGetPhaseMax() to get the phase limits.

The phase is defined as a number between 0 and 1, where 0 defines the beginning of the period () and 1 defines the end of the period (360°).

Phase is not available on all instruments and all signal types. Use GenHasPhase() to check whether phase is available for your instrument and for the currently set signal type.

By default the phase is set to: 0.

Functions

bool8_t GenHasPhase (LibTiePieHandle_t hDevice)
 Check whether the specified generator and the current signal type of the specified generator support controlling the signal phase. More...
 
double GenGetPhaseMin (LibTiePieHandle_t hDevice)
 Get the minimum signal phase of a specified generator. More...
 
double GenGetPhaseMax (LibTiePieHandle_t hDevice)
 Get the maximum signal phase of a specified generator. More...
 
double GenGetPhase (LibTiePieHandle_t hDevice)
 Get the current signal phase of a specified generator. More...
 
double GenSetPhase (LibTiePieHandle_t hDevice, double dPhase)
 Set the signal phase of a specified generator. More...
 

Function Documentation

bool8_t GenHasPhase ( LibTiePieHandle_t  hDevice)

Check whether the specified generator and the current signal type of the specified generator support controlling the signal phase.

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
GenGetPhaseMin
GenGetPhaseMax
GenGetPhase
GenSetPhase
Since
0.6
double GenGetPhaseMin ( LibTiePieHandle_t  hDevice)

Get the minimum signal phase of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
The minimum signal phase, a number between 0 and 1.
Status values
NOT_SUPPORTED The generator does not support phase 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
GenHasPhase
GenGetPhaseMax
GenGetPhase
GenSetPhase
Since
0.4.3
double GenGetPhaseMax ( LibTiePieHandle_t  hDevice)

Get the maximum signal phase of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
The maximum signal phase, a number between 0 and 1.
Status values
NOT_SUPPORTED The generator does not support phase 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
GenHasPhase
GenGetPhaseMin
GenGetPhase
GenSetPhase
Since
0.4.3
double GenGetPhase ( LibTiePieHandle_t  hDevice)

Get the current signal phase of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
The currently set signal phase, a number between 0 and 1.
Status values
NOT_SUPPORTED The generator does not support phase 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
GenHasPhase
GenGetPhaseMin
GenGetPhaseMax
GenSetPhase
Since
0.4.0
double GenSetPhase ( LibTiePieHandle_t  hDevice,
double  dPhase 
)

Set the signal phase of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
[in]dPhaseThe requested signal phase, a number between 0 and 1.
Returns
The actually set signal phase, a number between 0 and 1.
Status values
VALUE_CLIPPED The requested phase is outside the valid range and clipped to the closest limit.
VALUE_MODIFIED The requested phase is within the valid range but not available. The closest valid value is set.
NOT_SUPPORTED The generator does not support phase 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.
Remarks
When the generator is active, changing the phase will shortly interrupt the output signal.
When signal type DC or Noise is active, setting phase is not available.
See also
GenHasPhase
GenGetPhaseMin
GenGetPhaseMax
GenGetPhase
Since
0.4.0