GX5055, GX5295
Returns the channel’s programmed PMU forced current value and the current range.
DioPmuGetForcedCurrent (nHandle, nChannel, pdCurrent, pnCurrentRange, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Master board handle, or Board handle |
nChannel |
SHORT |
If Board Handle was passed:Channel number in the DIO board, each board has 32 I/O channels. I/O channels number range is 0-31.Gx5295: Each DIO board has 4 Auxiliary channels. Auxiliary channels number range is 0-3.If Master Board Handle was passed:Channel number in the DIO domain, each DIO board adds 32 I/O channels. I/O channels number range is 0-991 (1 master and 30 slaves).Gx5295: Each DIO board adds 4 Auxiliary channels, Auxiliary channels number range is 0-123 (1 master and 30 slaves) |
pdCurrent |
PDOUBLE |
Returned programmed PMU forced current value. PMU forced current value depends on the current range settings. |
pnCurrentRange |
PSHORT |
Returned programmed PMU forced current range. PMU forced current range can as follows:0. GX529X_PMU_CURRENT_RANGE_N32MA_TO_P32MA: PMU forced current range is between -32mA to +32mA.1. GX529X_PMU_CURRENT_RANGE_N8MA_TO_P8MA: PMU forced current range is between -8mA to +8mA.2. GX529X_PMU_CURRENT_RANGE_N2MA_TO_P2MA: PMU forced current range is between -2mA to +2mA.3. GX529X_PMU_CURRENT_RANGE_N512UA_TO_P512UA: PMU forced current range is between -512uA to +512uA.4. GX529X_PMU_CURRENT_RANGE_N128UA_TO_P128UA: PMU forced current range is between -128uA to +128uA.5. GX529X_PMU_CURRENT_RANGE_N32UA_TO_P32UA: PMU forced current range is between -32uA to +32uA.6. GX529X_PMU_CURRENT_RANGE_N8UA_TO_P8UA6: PMU forced current range is between -8uA to +8uA.7. GX529X_PMU_CURRENT_RANGE_N2UA_TO_P2UA7: PMU forced current range is between -2uA to +2uA. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The board must be in the PMU Forced current mode prior calling this function otherwise the function returns an error.
The following example returns channel 0 programmed PMU forced current value and the current range:
SHORT nCurrentRange, nStatus;
DOUBLE dCurrent;
DioPmuGetForcedCurrent (nHandle, 0, &dCurrent, &nCurrentRange, &nStatus);
DioSetupChannelMode, DioPmuSetupForcedCurrent, DioPmuSetupForcedVoltage, DioPmuSetupForcedCurrentCommutatingVoltage, DioGetErrorString