LibTiePie  0.9.8
Library for interfacing TiePie engineering instruments

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 generator can be used, the hardware must be switched on (enabled) using GenSetOutputOn(). When enabeld, the generator signal properties can be set. When the generator hardware is enabled, but the generator is not started, the output will be at the currently set Offset. When the generator hardware is disabled, the hardware is switched off, resulting in the instrument using less power.

Output invert is not available for all instruments. Use GenHasOutputInvert() to check whether output invert is available for your instrument.

Functions

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

Function Documentation

bool8_t GenIsControllable ( LibTiePieHandle_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.
OBJECT_GONE The object indicated by the 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
bool8_t GenIsRunning ( LibTiePieHandle_t  hDevice)

Check whether the generator is running.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
BOOL8_TRUE if running, BOOL8_FALSE otherwise.
Since
0.6
uint32_t GenGetStatus ( LibTiePieHandle_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.
OBJECT_GONE The object indicated by the 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 ( LibTiePieHandle_t  hDevice)

Check whether a specified generator is enabled.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
BOOL8_TRUE if the generator hardware is currently enabled, BOOL8_FALSE if the generator hardware is disabled.
Status values
INVALID_HANDLE The handle is not a valid generator handle.
OBJECT_GONE The object indicated by the 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 ( LibTiePieHandle_t  hDevice,
bool8_t  bOutputOn 
)

Enable or disable the hardware of a specified generator.

Parameters
[in]hDeviceA device handle identifying the generator.
[in]bOutputOnThe requested hardware state, BOOL8_TRUE to enable the hardware, BOOL8_FALSE to disable the hardware.
Returns
The actually set hardware state, BOOL8_TRUE if the hardware is enabled, BOOL8_FALSE if the hardware 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.
OBJECT_GONE The object indicated by the 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 GenHasOutputInvert ( LibTiePieHandle_t  hDevice)

Check whether the output of a specified generator can be inverted.

Parameters
[in]hDeviceA device handle identifying the generator.
Returns
BOOL8_TRUE if the output can be inverted, BOOL8_FALSE if not.
Status values
INVALID_HANDLE The handle is not a valid generator handle.
OBJECT_GONE The object indicated by the handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
GenGetOutputInvert
GenSetOutputInvert
Since
0.6
bool8_t GenGetOutputInvert ( LibTiePieHandle_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
NOT_SUPPORTED The requested functionality is not supported by the hardware.
INVALID_HANDLE The handle is not a valid generator handle.
OBJECT_GONE The object indicated by the handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
GenHasOutputInvert
GenSetOutputInvert
Since
0.5
bool8_t GenSetOutputInvert ( LibTiePieHandle_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.
NOT_SUPPORTED The requested functionality is not supported by the hardware.
INVALID_HANDLE The handle is not a valid generator handle.
OBJECT_GONE The object indicated by the handle is no longer available.
LIBRARY_NOT_INITIALIZEDThe library is not initialized, see LibInit().
SUCCESS The function executed successfully.
See also
GenHasOutputInvert
GenGetOutputInvert
Since
0.5
bool8_t GenStart ( LibTiePieHandle_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.
OBJECT_GONE The object indicated by the 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 ( LibTiePieHandle_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.
OBJECT_GONE The object indicated by the 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