GX5961, GX5964
Sets the power source.
GtDio6xPowerSetSource (nHandle, nPowerSource, bDoamin, 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. |
nPowerSource |
SHORT |
Used to specify the front-end power connect relay state.0. GTDIO6X_POWER_DISCONNECT: Disconnect power. 1. GTDIO6X_POWER_FRONT: Connect to front J7 Power Connector. 2. GTDIO6X_POWER_BACKPLANE: Connect to the backplane for power. |
bDoamin |
BOOL |
Specify if the power source should be applied to all boards in the domain, if false then only the board associated with the board handle will be set. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative value on failure. |
The pin electronics require the rail voltages (VCC, VEE, and VDD) to be present in order to operate correctly. These rails are connected by way of a relay switch to either the J7 front panel connector or to the backplane when using a special high-powered chassis with the J5 connecter present. When setting the connection state to GTDIO6X_POWER_FRONT or GTDIO6X_POWER_BACKPLANE, the Vmid will be calculated based on what rail voltages are detected. The rail voltages should be present before connecting the power so the Vmid can be calculated correctly.
The following example:
1. Sets the power connection to the backplane and returns the power connection settings
2. Enables the high-powered chassis power supply.
3. Program VCC to 5.0V.
4. Program VDD voltage rail to 14.0V.
5. Program VEE voltage rail to 12.0V.
6. Read back each of the 4 voltages.
7. Read back each of the power supply current.
SHORT nStatus;
SHORT nPowerState;
DOUBLE dVoltage, dCurrent;
GtDio6xPowerSetSource (nHandle, GTDIO6X_POWER_BACKPLANE, &nStatus);
GtDio6xPowerGetSource (nHandle, &nPowerState, &nStatus);
GtDio6xPowerSupplySetState(nHandle, GTDIO6X_ENABLED, &nStatus);
GtDio6xPowerSupplySetVoltage (nHandle, GTDIO6X_POWER_SUPPLY_VCC, 5.0V, pnStatus)
GtDio6xPowerSupplySetVoltage (nHandle, GTDIO6X_POWER_SUPPLY_VCC2, 14.0, pnStatus)
GtDio6xPowerSupplySetVoltage (nHandle, GTDIO6X_POWER_SUPPLY_VEE, 12.0, pnStatus)
Read back the voltages:
GtDio6xPowerSupplyGetVoltage (nHandle, GTDIO6X_POWER_SUPPLY_VCC, &dVoltage, pnStatus)
GtDio6xPowerSupplyGetVoltage (nHandle, GTDIO6X_POWER_SUPPLY_VCC2, &dVoltage, pnStatus)
GtDio6xPowerSupplyGetVoltage (nHandle, GTDIO6X_POWER_SUPPLY_VEE, &dVoltage, pnStatus)
GtDio6xPowerSupplyGetCurrent (nHandle, GTDIO6X_POWER_SUPPLY_VCC, &dCurrent, &nStatus);
GtDio6xPowerSupplyGetCurrent (nHandle, GTDIO6X_POWER_SUPPLY_VCC2, &dCurrent, &nStatus);
GtDio6xPowerSupplyGetCurrent (nHandle, GTDIO6X_POWER_SUPPLY_VEE, &dCurrent, &nStatus);
GtDio6xPowerSupplyGetCurrent (nHandle, GTDIO6X_POWER_SUPPLY_VDD, &dCurrent, &nStatus);
GtDio6xPowerGetSource, GtDio6xPowerSupplyResetFault, GtDio6xGetErrorString