libtiepie-hw  1.1.13
Pulse width

Functions for controlling the pulse width of a generator. More...

Collaboration diagram for Pulse width:

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...
 

Detailed 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 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.

Function Documentation

◆ tiepie_hw_generator_has_width()

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.

Parameters
[in]handleA device handle identifying the generator.
Returns
TIEPIE_HW_BOOL_TRUE if supported, TIEPIE_HW_BOOL_FALSE if not.
Status values
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
See also
tiepie_hw_generator_get_width_min
tiepie_hw_generator_get_width_max
tiepie_hw_generator_get_width
tiepie_hw_generator_set_width
Since
1.0

◆ tiepie_hw_generator_get_width_min()

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.

Parameters
[in]handleA device handle identifying the generator.
Returns
The minimum pulse width in seconds.
Status values
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
See also
tiepie_hw_generator_get_width_max
tiepie_hw_generator_get_width
tiepie_hw_generator_set_width
Since
1.0

◆ tiepie_hw_generator_get_width_max()

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.

Parameters
[in]handleA device handle identifying the generator.
Returns
The maximum pulse width in seconds.
Status values
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
See also
tiepie_hw_generator_get_width_min
tiepie_hw_generator_get_width
tiepie_hw_generator_set_width
Since
1.0

◆ tiepie_hw_generator_get_width()

TIEPIE_HW_API double tiepie_hw_generator_get_width ( tiepie_hw_handle  handle)

Get the current pulse width, of a specified generator.

Parameters
[in]handleA device handle identifying the generator.
Returns
The currently set pulse width in seconds.
Status values
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
See also
tiepie_hw_generator_get_width_min
tiepie_hw_generator_get_width_max
tiepie_hw_generator_set_width
Since
1.0

◆ tiepie_hw_generator_set_width()

TIEPIE_HW_API double tiepie_hw_generator_set_width ( tiepie_hw_handle  handle,
double  value 
)

Set the pulse width, of a specified generator.

Parameters
[in]handleA device handle identifying the generator.
[in]valueThe requested pulse width in seconds.
Returns
The actually set pulse width in seconds
Remarks
When the generator is active, changing the pulse width will shortly interrupt the output signal.
Changing the pulse width may affect the leading and trailing edge time value(s).
Status values
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
See also
tiepie_hw_generator_get_width_min
tiepie_hw_generator_get_width_max
tiepie_hw_generator_get_width
Since
1.0