LibTiePie  0.5
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Macros Modules Pages
Pulse width

Description

Functions for controlling the pulse width of a generator.

The pulse width defines the width of the pulse when signal type is set to ST_PULSE, without affecting the signal frequency. The pulse width of a generator can be set between a minimum and a maximum value. Use GenGetWidthMin() and GenGetWidthMax() to get the pulse width limits.

The pulse width is defined as a time in seconds.

The pulse width is only available for signal type Pulse.

By default the pulse width is set to: 1 us.

Functions

double GenGetWidthMin (TpDeviceHandle_t hDevice)
 Get the minimum pulse width with the current signal frequency, of a specified generator. More...
 
double GenGetWidthMax (TpDeviceHandle_t hDevice)
 Get the maximum pulse width with the current signal frequency, of a specified generator. More...
 
double GenGetWidth (TpDeviceHandle_t hDevice)
 Get the current pulse width, of a specified generator. More...
 
double GenSetWidth (TpDeviceHandle_t hDevice, double dWidth)
 Set the pulse width, of a specified generator. More...
 

Function Documentation

double GenGetWidthMin ( TpDeviceHandle_t  hDevice)

Get the minimum pulse width with the current signal frequency, of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
The minimum pulse width in seconds.
Status values
NOT_SUPPORTED The generator does not support pulse width 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
GenGetWidthMax
GenGetWidth
GenSetWidth
Since
0.5
double GenGetWidthMax ( TpDeviceHandle_t  hDevice)

Get the maximum pulse width with the current signal frequency, of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
The maximum pulse width in seconds.
Status values
NOT_SUPPORTED The generator does not support pulse width 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
GenGetWidthMin
GenGetWidth
GenSetWidth
Since
0.5
double GenGetWidth ( TpDeviceHandle_t  hDevice)

Get the current pulse width, of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
The currently set pulse width in seconds.
Status values
NOT_SUPPORTED The generator does not support pulse width 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
GenGetWidthMin
GenGetWidthMax
GenSetWidth
Since
0.5
double GenSetWidth ( TpDeviceHandle_t  hDevice,
double  dWidth 
)

Set the pulse width, of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
[in]dWidthThe requested pulse width in seconds.
Returns
The actually set pulse width in seconds
Status values
VALUE_CLIPPED The requested pulse width is outside the valid range and clipped to the closest limit.
VALUE_MODIFIED The requested pulse width is within the valid range but not available. The closest valid value is set.
NOT_SUPPORTED The generator does not support pulse width 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.
Remarks
When the generator is active, changing the pulse width will shortly interrupt the output signal.
See also
GenGetWidthMin
GenGetWidthMax
GenGetWidth
Since
0.5