Gx3348GetDac

Purpose

Returns the specified DAC‘s voltage .

Syntax

Gx3348GetDac (nHandle, nDac, pdVoltage, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle for the PXI board.
nDac
SHORT
DAC to set.
0. GX3348_DAC_RAIL_A: dedicated Rail A DAC
1. GX3348_DAC_RAIL_B: dedicated Rail B DAC .
2. GX3348_DAC_RAIL_C: dedicated Rail C DAC .
pdVoltage
PDOUBLE
Returns DAC Voltage (-20 to 30V are valid)
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Each DAC can be programmed with a voltage ranging between -20V to 30V.

Example

The following example initializes the board, returns the rail connecting Channel 12 of Group A, and returns DAC B voltage:

 

SHORT nRail, nStatus;

 

DOUBLE dVoltage;

 

Gx3348Initialize (1, &nHandle, &nStatus);

Gx3348GetChannelRail(nHandle, GX3348_GROUP_A, 12, &nRail, &nStatus);

 

Gx3348GetDac(nHandle, GX3348_DAC_RAIL_B, &dVoltage, &nStatus);

if(nRail== GX3348_RAIL_B)

printf(“Channel 12 in Group A is connected to DAC B in Rail B”);

See Gx3348SetRailSource API for a cmprehansive C example.

 

See Also

Gx3348SetChannelRail, Gx3348SetDac, Gx3348SetDigitalOutputs, Gx3348SetRailSource, GxPdoGetErrorString