GX5296, GX5961, GX5964, File
Returns the channel forced voltage.
GtDio6xChannelGetPmuForcedVoltage (nHandle, nChannel, pdVoltage, pnCurrentRange, pnStatus)
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. |
pdVoltage |
PDOUBLE |
Programmed PMU forced voltage value.GX5296:PMU forced voltage value can be between -2V to and 7V.GX5961/GX5964: :PMU forced voltage value depends on power supply voltage rails. |
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. |
In Forced Voltage mode, the pin electronics attempt to force a certain voltage. The output current limit serves to limit the amount of current the pin electronics will generate in order to generate a given forced voltage.
The current being sourced or sunk can be measured using the GtDio6xMeasure function.
The following example sets GX5960 channels 0 and 2 forced voltage to +2.0V with -25mA to +25mA current range, and read back the channel 0 forced voltage settings:
SHORT nStatus, nCurrentRange;
LONG alChannelList[2];
DOUBLE dVoltage;
// Fill channel array
alChannelList[0] = 0;
alChannelList[1] = 2;
GtDio6xChannelSetPmuForcedVoltage(nHandle, 2, alChannelList, 2.5, GTDIO6X_PMU_CURRENT_RANGE_N25MA_TO_P25MA, &nStatus);
GtDio6xChannelGetPmuForcedVoltage(nHandle, 0, &dVoltage, &nCurrentRange, &nStatus);
GtDio6xChannelSetPmuForcedCurrentCommutatingVoltage, GtDio6xChannelSetPmuForcedCurrent, GtDio6xChannelGetPmuForcedCurrent, GtDio6xChannelSetMode, GtDio6xChannelGetMode, GtDio6xChannelSetPmuForcedVoltage, GtDio6xChannelGetPmuForcedVoltage, GtDio6xGetErrorString