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

Description

Functions for starting and stopping the generator and checking its status.

In certain conditions, like when performing a streaming measurement with the oscilloscope, the generator cannot be controlled. Use GenIsControllable() to poll if the generator can be controlled or use a notification.

Use GenGetStatus() to check the signal generation status.

Before a signal appears on the generator output, use GenSetOutputOn() to switch the output of the generator on (enable it). When the output is enabled, but the generator is not started, the output will be at the currently set Offset.

Functions

bool8_t GenIsControllable (TpDeviceHandle_t hDevice)
 Check whether a specified generator can be controlled. More...
 
uint32_t GenGetStatus (TpDeviceHandle_t hDevice)
 Get the current signal generation status of a specified generator. More...
 
bool8_t GenGetOutputOn (TpDeviceHandle_t hDevice)
 Check whether the output of a specified generator is enabled. More...
 
bool8_t GenSetOutputOn (TpDeviceHandle_t hDevice, bool8_t bOutputOn)
 Enable or disable the output of a specified generator. More...
 
bool8_t GenGetOutputInvert (TpDeviceHandle_t hDevice)
 Check whether the output of a specified generator is inverted. More...
 
bool8_t GenSetOutputInvert (TpDeviceHandle_t hDevice, bool8_t bInvert)
 Enable or disable the output invert of a specified generator. More...
 
bool8_t GenStart (TpDeviceHandle_t hDevice)
 Start the signal generation of a specified generator. More...
 
bool8_t GenStop (TpDeviceHandle_t hDevice)
 Stop the signal generation of a specified generator. More...
 

Function Documentation

bool8_t GenIsControllable ( TpDeviceHandle_t  hDevice)

Check whether a specified generator can be controlled.

In certain conditions like when performing a streaming measurement with the oscilloscope, the generator cannot be controlled.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
BOOL8_TRUE if the generator is controllable, BOOL8_FALSE otherwise.
Status values
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
Notification Controllable changed.
Measure mode.
Since
0.4.0
uint32_t GenGetStatus ( TpDeviceHandle_t  hDevice)

Get the current signal generation status of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
The current signal generation status, a GS_* value or GSM_NONE when unsuccessful.
Status values
NOT_SUPPORTED The generator does not support getting the status.
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.
Since
0.5
bool8_t GenGetOutputOn ( TpDeviceHandle_t  hDevice)

Check whether the output of a specified generator is enabled.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
BOOL8_TRUE if the output is currently enabled, BOOL8_FALSE if the output is disabled.
Status values
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
GenSetOutputOn
Since
0.4.0
bool8_t GenSetOutputOn ( TpDeviceHandle_t  hDevice,
bool8_t  bOutputOn 
)

Enable or disable the output of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
[in]bOutputOnThe requested output state, BOOL8_TRUE to enable the output, BOOL8_FALSE to disable the output.
Returns
The actually set output state, BOOL8_TRUE if the output is enabled, BOOL8_FALSE if the output is disabled.
Status values
NOT_CONTROLLABLE The generator is currently not controllable, see GenIsControllable.
UNSUCCESSFUL An error occurred during execution of the last called function.
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
GenGetOutputOn
Since
0.4.0
bool8_t GenGetOutputInvert ( TpDeviceHandle_t  hDevice)

Check whether the output of a specified generator is inverted.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
BOOL8_TRUE if the output is currently inverted, BOOL8_FALSE if the output is normal.
Status values
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
GenSetOutputInvert
Since
0.5
bool8_t GenSetOutputInvert ( TpDeviceHandle_t  hDevice,
bool8_t  bInvert 
)

Enable or disable the output invert of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
[in]bInvertThe requested output state, BOOL8_TRUE to invert the output, BOOL8_FALSE to disable the output invert.
Returns
The actually set output state, BOOL8_TRUE if the output is inverted, BOOL8_FALSE if the output is normal.
Status values
NOT_CONTROLLABLE The generator is currently not controllable, see GenIsControllable.
UNSUCCESSFUL An error occurred during execution of the last called function.
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
GenGetOutputInvert
Since
0.5
bool8_t GenStart ( TpDeviceHandle_t  hDevice)

Start the signal generation of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
BOOL8_TRUE if succesful, BOOL8_FALSE if failed.
Status values
NO_TRIGGER_ENABLED The current setup requires a trigger input to be enabled.
NOT_CONTROLLABLE The generator is currently not controllable, see GenIsControllable.
UNSUCCESSFUL An error occurred during execution of the last called function.
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
GenStop
Since
0.5
bool8_t GenStop ( TpDeviceHandle_t  hDevice)

Stop the signal generation of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
BOOL8_TRUE if succesful, BOOL8_FALSE if failed.
Status values
NOT_CONTROLLABLE The generator is currently not controllable, see GenIsControllable.
UNSUCCESSFUL An error occurred during execution of the last called function.
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
GenStart
Since
0.5