GtDio6xChannelGetPmuForcedCurrent

Applies To

GX5296, GX5961, GX5964, File

Purpose

Returns the channel forced current.

Syntax

GtDio6xChannelGetPmuForcedCurrent (nHandle, nChannel, pdCurrent, pnCurrentRange, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Session identifier:

     Board handle is used when communicating with the hardware. The Board handle session identifier is returned by calling GtDio6xInitialize or GtDio6xSetupInitialization.

     File handle is used when communicating with a file. The File handle session identifier is  returned by calling GtDio6xFileOpen.

nChannel
SHORT
Used to specify the channel to Get. This parameter is 0-based and refers to any channel in the Domain. Auxiliary channel numbers begin with 1000.
GX5296: Each GX5296 board has 4 auxiliary channels that support all the Pin Electronics API functions.
GX5961: Each GX5961 board has 4 fully programmable auxiliary channels, and 8 TTL I/O channels. First 4 auxiliary channels may use all the Pin Electronics API.
GX5964: Does not have Auxiliary channels.
pdCurrent
PDOUBLE
Forced current in terms of mA.
pnCurrentRange
PSHORT
Used to get the channel current range:
GX5961/GX5964:

0.     GTDIO6X_PMU_CURRENT_RANGE_N200MA_TO_P200MA: +200 to -200 mA current range.

1.     GTDIO6X_PMU_CURRENT_RANGE_N25MA_TO_P25MA: +25 to -25 mA current range.

GX5296:

0.  .GX529X_PMU_CURRENT_RANGE_N32MA_TO_P32MA: PMU current range -32mA to +32mA.

1.   GX529X_PMU_CURRENT_RANGE_N8MA_TO_P8MA: PMU current range -8mA to +8mA.

2.   GX529X_PMU_CURRENT_RANGE_N2MA_TO_P2MA: PMU current range -2mA to +2mA.

3.   GX529X_PMU_CURRENT_RANGE_N512UA_TO_P512UA: PMU current range -512uA to +512uA.

4.   GX529X_PMU_CURRENT_RANGE_N128UA_TO_P128UA: PMU current range -128uA to +128uA.

5.   GX529X_PMU_CURRENT_RANGE_N32UA_TO_P32UA: PMU current range -32uA to +32uA.

6.   GX529X_PMU_CURRENT_RANGE_N8UA_TO_P8UA: PMU current range -8uA to +8uA.

7.   GX529X_PMU_CURRENT_RANGE_N2UA_TO_P2UA: PMU current range -2uA to +2uA.

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

Comments

In Forced Current mode, the pin electronics attempt to force a certain current. The current range functions to provide greater accuracy when lower current values are needed.

The voltage being generated in order to source or sink current can be measured using the GtDio6xMeasure function.

Example

The following example sets GX5964 channels 0 and 2 forced current to 20mA and current range to -25mA to +25mA, and returns  channel 0 forced current and current range:

 

SHORT nStatus, nCurrentRange;

LONG alChannelList[2];

DOUBLE dCurrent;

DWORD dwComparisonResult;

 

// Fill channel array

alChannelList[0] = 0;

alChannelList[1] = 2;

GtDio6xChannelSetPmuForcedCurrent(nHandle, 2, alChannelList, 20, GTDIO6X_PMU_CURRENT_RANGE_N25MA_TO_P25MA, &nStatus);

GtDio6xChannelGetPmuForcedCurrent(nHandle, 0, &dCurrent, &nCurrentRange, 0, 20, &nStatus);

 

See Also

GtDio6xChannelSetPmuForcedCurrent, GtDio6xChannelSetPmuForcedCurrentCommutatingVoltage,  GtDio6xChannelGetPmuForcedCurrentCommutatingVoltage, GtDio6xChannelSetMode, GtDio6xChannelGetMode, GtDio6xChannelSetPmuForcedVoltage, GtDio6xChannelGetPmuForcedVoltage, GtDio6xGetErrorString