GtDio6xChannelGetPmuComparatorsSource

Applies To

GX5296

Purpose

Returns the specified channel’s comparators’ source.

Syntax

GtDio6xChannelGetPmuComparatorsSource (nHandle, nChannel, pnSourcel, 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.
pnSource
PSHORT
Returned the specified channel comparators’ source, source can be:

0.  GTDIO6X_PMU_COMPARATORS_SOURCE_IO_VOLTAGE: I/O voltage is the input signal to the channel low and high comparators.

1.  GTDIO6X_PMU_COMPARATORS_SOURCE_FORCED_CURRENT: PMU forced current is the input signal to the channel low and high comparators.

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’ source to I/O voltage, and returns the comparators’ source of channel 0:

 

SHORT  nSource, nStatus;

LONG alChannelList[2];

 

GtDio6xChannelSetPmuComparatorsSource (nHandle,2, alChannelList, GTDIO6X_PMU_COMPARATORS_SOURCE_IO_VOLTAGE, &nStatus);

GtDio6xChannelGetPmuComparatorsSource (nHandle,0, &nSource, &nStatus);

 

See Also

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