LibTiePie  0.9.16
Library for interfacing TiePie engineering instruments
Symmetry

Description

Functions for controlling the signal symmetry of a generator.

The symmetry of a signal defines the ratio between the length of positive part of a period and the length of the negative part of a period of the generated signal. The symmetry of a generator can be set between a minimum and a maximum value. Use GenGetSymmetryMin() and GenGetSymmetryMax() to get the symmetry limits.

The symmetry is defined as a number between 0 and 1, where 0 defines a symmetry of 0% (no positive part) and 1 defines a symmetry of 100% (no negative part).

When signal type Pulse, DC, Noise or Arbitrary is active, setting symmetry is not available. Use GenHasSymmetry() to check whether symmetry is available for the currently set signal type.

By default the symmetry is set to: 0.5 (50%).

Functions

bool8_t GenHasSymmetry (LibTiePieHandle_t hDevice)
 Check whether the current signal type of a specified generator supports controlling the signal symmetry. More...
 
double GenGetSymmetryMin (LibTiePieHandle_t hDevice)
 Get the minimum signal symmetry of a specified generator. More...
 
double GenGetSymmetryMax (LibTiePieHandle_t hDevice)
 Get the maximum signal symmetry of a specified generator. More...
 
double GenGetSymmetry (LibTiePieHandle_t hDevice)
 Get the current signal symmetry of a specified generator. More...
 
double GenSetSymmetry (LibTiePieHandle_t hDevice, double dSymmetry)
 Set the signal symmetry of a specified generator. More...
 

Function Documentation

bool8_t GenHasSymmetry ( LibTiePieHandle_t  hDevice)

Check whether the current signal type of a specified generator supports controlling the signal symmetry.

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
GenGetSymmetryMin
GenGetSymmetryMax
GenGetSymmetry
GenSetSymmetry
Since
0.6
double GenGetSymmetryMin ( LibTiePieHandle_t  hDevice)

Get the minimum signal symmetry of a specified generator.

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

Get the maximum signal symmetry of a specified generator.

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

Get the current signal symmetry of a specified generator.

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

Set the signal symmetry of a specified generator.

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