libtiepie-hw
1.2.1
|
Functions for controlling the pulse width of a generator. More...
Functions | |
TIEPIE_HW_API tiepie_hw_bool | tiepie_hw_generator_has_width (tiepie_hw_handle handle) |
Check whether the current signal type of a specified generator supports controlling the signal pulse width. More... | |
TIEPIE_HW_API double | tiepie_hw_generator_get_width_min (tiepie_hw_handle handle) |
Get the minimum pulse width with the current signal frequency, of a specified generator. More... | |
TIEPIE_HW_API double | tiepie_hw_generator_get_width_max (tiepie_hw_handle handle) |
Get the maximum pulse width with the current signal frequency, of a specified generator. More... | |
TIEPIE_HW_API double | tiepie_hw_generator_get_width (tiepie_hw_handle handle) |
Get the current pulse width, of a specified generator. More... | |
TIEPIE_HW_API double | tiepie_hw_generator_set_width (tiepie_hw_handle handle, double value) |
Set the pulse width, of a specified generator. More... | |
Functions for controlling the pulse width of a generator.
The pulse width defines the width of the pulse when signal type is set to TIEPIE_HW_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 tiepie_hw_generator_get_width_min() and tiepie_hw_generator_get_width_max() 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 tiepie_hw_generator_has_width() 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.
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_has_width | ( | tiepie_hw_handle | handle | ) |
Check whether the current signal type of a specified generator supports controlling the signal pulse width.
[in] | handle | A device handle identifying the generator. |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid generator handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API double tiepie_hw_generator_get_width_min | ( | tiepie_hw_handle | handle | ) |
Get the minimum pulse width with the current signal frequency, of a specified generator.
[in] | handle | A device handle identifying the generator. |
TIEPIE_HW_STATUS_NOT_SUPPORTED | The generator does not support pulse width for the current signal type. |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid generator handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API double tiepie_hw_generator_get_width_max | ( | tiepie_hw_handle | handle | ) |
Get the maximum pulse width with the current signal frequency, of a specified generator.
[in] | handle | A device handle identifying the generator. |
TIEPIE_HW_STATUS_NOT_SUPPORTED | The generator does not support pulse width for the current signal type. |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid generator handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API double tiepie_hw_generator_get_width | ( | tiepie_hw_handle | handle | ) |
Get the current pulse width, of a specified generator.
[in] | handle | A device handle identifying the generator. |
TIEPIE_HW_STATUS_NOT_SUPPORTED | The generator does not support pulse width for the current signal type. |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid generator handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API double tiepie_hw_generator_set_width | ( | tiepie_hw_handle | handle, |
double | value | ||
) |
Set the pulse width, of a specified generator.
[in] | handle | A device handle identifying the generator. |
[in] | value | The requested pulse width in seconds. |
TIEPIE_HW_STATUS_VALUE_CLIPPED | The requested pulse width is outside the valid range and clipped to the closest limit. |
TIEPIE_HW_STATUS_VALUE_MODIFIED | The requested pulse width is within the valid range but not available. The closest valid value is set. |
TIEPIE_HW_STATUS_NOT_SUPPORTED | The generator does not support pulse width for the current signal type. |
TIEPIE_HW_STATUS_NOT_CONTROLLABLE | |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid generator handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |