LibTiePie  0.9.16
Library for interfacing TiePie engineering instruments

Description

The channel trigger level property is used to control at which level(s) the channel trigger responds to the channel input signal.

The number of available trigger levels depends on the currently set trigger kind. Use ScpChTrGetLevelCount() to determine the number of trigger levels for the currently set trigger kind.

If the trigger level mode is TLM_RELATIVE, the trigger level is set as a floating point value between 0 and 1, corresponding to a percentage of the full scale input range:

If the trigger level mode is TLM_ABSOLUTE, the trigger level is set as a floating point value, clipped by the full scale input range.

By default the trigger level is set to 0.5 (50%) of the full-scale range.

Functions

uint32_t ScpChTrGetLevelCount (LibTiePieHandle_t hDevice, uint16_t wCh)
 Get the number of channel trigger levels for a specified channel with the currently selected trigger kind. More...
 
double ScpChTrGetLevel (LibTiePieHandle_t hDevice, uint16_t wCh, uint32_t dwIndex)
 Get the currently set channel trigger level value for a specified channel and trigger level. More...
 
double ScpChTrSetLevel (LibTiePieHandle_t hDevice, uint16_t wCh, uint32_t dwIndex, double dLevel)
 Set the channel trigger level value for a specified channel and trigger level. More...
 

Function Documentation

uint32_t ScpChTrGetLevelCount ( LibTiePieHandle_t  hDevice,
uint16_t  wCh 
)

Get the number of channel trigger levels for a specified channel with the currently selected trigger kind.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
[in]wChThe channel number identifying the channel, 0 to ScpGetChannelCount() - 1.
Returns
The number of available trigger levels for the currently set trigger kind.
Status values
NOT_SUPPORTED The indicated channel does not support trigger with the current settings.
INVALID_CHANNEL The requested channel number is invalid.
INVALID_HANDLE The handle is not a valid oscilloscope 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
ScpChTrGetKind
ScpChTrGetLevel
ScpChTrSetLevel
Since
0.4.1
double ScpChTrGetLevel ( LibTiePieHandle_t  hDevice,
uint16_t  wCh,
uint32_t  dwIndex 
)

Get the currently set channel trigger level value for a specified channel and trigger level.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
[in]wChThe channel number identifying the channel, 0 to ScpGetChannelCount() - 1.
[in]dwIndexThe trigger level index, 0 to ScpChTrGetLevelCount() - 1.
Returns
The currently set trigger level value.
Status values
NOT_SUPPORTED The indicated channel does not support trigger (level) with the current settings.
INVALID_INDEX The trigger level index is invalid.
INVALID_CHANNEL The requested channel number is invalid.
INVALID_HANDLE The handle is not a valid oscilloscope 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
ScpChTrGetLevelCount
ScpChTrSetLevel
Since
0.4.1
double ScpChTrSetLevel ( LibTiePieHandle_t  hDevice,
uint16_t  wCh,
uint32_t  dwIndex,
double  dLevel 
)

Set the channel trigger level value for a specified channel and trigger level.

Parameters
[in]hDeviceA device handle identifying the oscilloscope.
[in]wChThe channel number identifying the channel, 0 to ScpGetChannelCount() - 1.
[in]dwIndexThe trigger level index, 0 to ScpChTrGetLevelCount() - 1.
[in]dLevelThe required trigger level.
Returns
The actually set trigger level.
Status values
VALUE_CLIPPED The requested trigger level is outside the valid range and clipped to the closest limit.
NOT_SUPPORTED The indicated channel does not support trigger (level) with the current settings.
INVALID_INDEX The trigger level index is invalid.
INVALID_CHANNEL The requested channel number is invalid.
INVALID_HANDLE The handle is not a valid oscilloscope 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.
Remarks
Changing the channel trigger level may change the input range if the channel trigger is enabled, trigger level mode is TLM_ABSOLUTE and auto ranging is enabled.
See also
ScpChTrGetLevelCount
ScpChTrGetLevel
Since
0.4.1