GtDio6xChannelSetPmuForcedVoltage

Applies To

GX5296, GX5961, GX5964, File

Purpose

Sets the channel forced voltage.

Syntax

GtDio6xChannelSetPmuForcedVoltage (nHandle, lChannelListArraySize, palChannelListArray, dVoltage, nCurrentRange, nMode, dMaxCurrent, 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.

lChannelListArraySize
LONG
Used to specify the number of channels to set. This parameter should not be greater than the size of palChannelListArray. If GTDIO6X_ALL_DOMAIN is passed in, then the palChannelListArray parameter can be set to NULL and the settings will be applied to all channels in the Domain.
palChannelListArrary
PLONG
Array containing channels numbers that will be set by this function, channels numbers are 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.
dVoltage
DOUBLE
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.
nCurrentRange
SHORT
Used to Set 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.

dwSetupMode
DWORD
Not used.
dMaxCurrent
DOUBLE
The maximum current allowed to be generated in terms of mA.
pnStatus
PSHORT
Returned status: 0 on success, negative value on failure.

Comments

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.

Example

The following example sets GX5960 channels 0 and 2 forced voltage to +2.5V 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, 0, 30, &nStatus);

 

GtDio6xChannelGetPmuForcedVoltage(nHandle, 0, &dVoltage, &nCurrentRange, &nStatus);

 

See Also

GtDio6xChannelSetPmuForcedVoltageRamp , GtDio6xChannelSetPmuForcedCurrentCommutatingVoltage, GtDio6xChannelSetPmuForcedCurrent, GtDio6xChannelGetPmuForcedCurrent,  GtDio6xChannelSetMode, GtDio6xChannelGetMode, GtDio6xChannelGetPmuForcedVoltage, GtDio6xGetErrorString