LibTiePie
0.9.16
Library for interfacing TiePie engineering instruments
|
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 is defined as the time between 50% of the leading edge of the pulse and 50% of the trailing edge of the pulse, in seconds. See also pulse edge times.
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 can be affected by changing the signal frequency.
The pulse width is not available on all instruments and only available for signal type Pulse. Use GenHasWidth() to check whether pulse width is available for your instrument and the currently set signal type.
By default the pulse width is set to: 1 us.
Functions | |
bool8_t | GenHasWidth (LibTiePieHandle_t hDevice) |
Check whether the current signal type of a specified generator supports controlling the signal pulse width. More... | |
double | GenGetWidthMin (LibTiePieHandle_t hDevice) |
Get the minimum pulse width with the current signal frequency, of a specified generator. More... | |
double | GenGetWidthMax (LibTiePieHandle_t hDevice) |
Get the maximum pulse width with the current signal frequency, of a specified generator. More... | |
double | GenGetWidth (LibTiePieHandle_t hDevice) |
Get the current pulse width, of a specified generator. More... | |
double | GenSetWidth (LibTiePieHandle_t hDevice, double dWidth) |
Set the pulse width, of a specified generator. More... | |
bool8_t GenHasWidth | ( | LibTiePieHandle_t | hDevice | ) |
Check whether the current signal type of a specified generator supports controlling the signal pulse width.
[in] | hDevice | A device handle identifying the generator. |
INVALID_HANDLE | The handle is not a valid generator handle. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
double GenGetWidthMin | ( | LibTiePieHandle_t | hDevice | ) |
Get the minimum pulse width with the current signal frequency, of a specified generator.
[in] | hDevice | A device handle identifying the generator. |
NOT_SUPPORTED | The generator does not support pulse width 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_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
double GenGetWidthMax | ( | LibTiePieHandle_t | hDevice | ) |
Get the maximum pulse width with the current signal frequency, of a specified generator.
[in] | hDevice | A device handle identifying the generator. |
NOT_SUPPORTED | The generator does not support pulse width 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_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
double GenGetWidth | ( | LibTiePieHandle_t | hDevice | ) |
Get the current pulse width, of a specified generator.
[in] | hDevice | A device handle identifying the generator. |
NOT_SUPPORTED | The generator does not support pulse width 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_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
double GenSetWidth | ( | LibTiePieHandle_t | hDevice, |
double | dWidth | ||
) |
Set the pulse width, of a specified generator.
[in] | hDevice | A device handle identifying the generator. |
[in] | dWidth | The requested pulse width in seconds. |
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. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |