GtDio6xChannelGetPmuComparatorsValues

Applies To

GX5296

Purpose

Returns the specified channel’s comparators’ high and low voltage levels settings.

Syntax

GtDio6xChannelGetPmuComparatorsValues (nHandle, nChannel, pdHighVal, pdLowVal, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Board handle is a session identifier returned by calling GtDio6xInitialize or GtDio6xSetupInitialization.
nChannel
SHORT
Used to specify the channel to Get. This parameter is 0-based and refers to any channel in the Domain.
This function does not support auxiliary channels.
pdHighVal
PDOUBLE
Returned Comparators high voltage level settings.

     If the comparators’ source was set to GTDIO6X_PMU_COMPARATORS_SOURCE_IO_VOLTAGE: I/O (0) the value is in voltages and can be between -2.V to and +7.0V and should to be less than pdHighVal.

     If the comparators ‘source was set to GTDIO6X_PMU_COMPARATORS_SOURCE_FORCED_CURRENT: I/O (1) the value is in mA and should to be less than pdHighVal. The value should be inside the current range limits as was set by the PMU Forced Current range settings, see the GtDio6xChannelSetPmuForcedCurrent API for value limits.

pdLowVal
PDOUBLE
Returned Comparators low voltage level settings.

     If the comparators’ source was set to GTDIO6X_PMU_COMPARATORS_SOURCE_IO_VOLTAGE: I/O (0) the value is in voltages and can be between -2.V to and +7.0V and should to be less than pdHighVal.

     If the comparators ‘source was set to GTDIO6X_PMU_COMPARATORS_SOURCE_FORCED_CURRENT: I/O (1) the value is in mA and should to be less than pdHighVal. The value should be inside the current range limits as was set by the PMU Forced Current range settings, see the GtDio6xChannelSetPmuForcedCurrent API for value limits.

pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Each channel’s PMU (parametric measurement unit) supports two high-speed window comparators. The PMU on-chip window comparator supports a 2-bit “go / no-go” test with a low and high threshold settings. The thresholds are set using the GtDio6xChannelSetPmuComparatorsValues function call.

The PMU comparator window translates the forced voltage or the forced current being sensed into an output voltage that can be compared against an upper and lower limit.

The PMU window comparator low and high outputs can be read back directly providing direct access to the actual comparator status at any time.

Example

The following example sets channels 0 and 2 comparators’ high to 5.4V and low voltage to -1.2V, and returns channel 2comparators’ high and low voltage levels settings:

 

SHORT nStatus;

DUOBLE dHiVal, dLoLevel;

LONG alChannelList[2];

 

// Fill channel array

alChannelList[0] = 0;

alChannelList[1] = 2;

 

GtDio6xChannelSetPmuComparatorsValues (nHandle, 2, alChannelList, 5.4, -1.2, &nStatus);

GtDio6xChannelGetPmuComparatorsValues (nHandle, 2, &dHiVal, &dLoLevel, &nStatus);

 

See Also

GtDio6xChannelSetPmuComparatorsSource, GtDio6xChannelSetPmuComparatorsValues, GtDio6xChannelGetPmuComparisonResult, GtDio6xChannelSetPmuForcedCurrent,  GtDio6xChannelSetPmuForcedVoltage, GtDio6xChannelSetPmuForcedCurrentCommutatingVoltage, GtDio6xGetErrorString