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

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

Functions

double GenGetSymmetryMin (TpDeviceHandle_t hDevice)
 Get the minimum signal symmetry of a specified generator. More...
 
double GenGetSymmetryMax (TpDeviceHandle_t hDevice)
 Get the maximum signal symmetry of a specified generator. More...
 
double GenGetSymmetry (TpDeviceHandle_t hDevice)
 Get the current signal symmetry of a specified generator. More...
 
double GenSetSymmetry (TpDeviceHandle_t hDevice, double dSymmetry)
 Set the signal symmetry of a specified generator. More...
 

Function Documentation

double GenGetSymmetryMin ( TpDeviceHandle_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.
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
GenGetSymmetryMax
GenGetSymmetry
GenSetSymmetry
Since
0.4.3
double GenGetSymmetryMax ( TpDeviceHandle_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.
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
GenGetSymmetryMin
GenGetSymmetry
GenSetSymmetry
Since
0.4.3
double GenGetSymmetry ( TpDeviceHandle_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.
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
GenGetSymmetryMin
GenGetSymmetryMax
GenSetSymmetry
Since
0.4.0
double GenSetSymmetry ( TpDeviceHandle_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.
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.
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