Gx3348CalDac

Purpose

Calibrates a DAC

Syntax

Gx3348CalDac (nHandle, nDac, dRefPositive, dRefNegative, dRefZero, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle for the PXI board.
nDac
SHORT
Set the DAC that will be configured
0. GX3348_RAIL_DAC_A: Calibrate DAC A
1. GX3348_RAIL_DAC_B: Calibrate DAC B
2. GX3348_RAIL_DAC_C: Calibrate DAC C
dRefPositive
DOUBLE
Sets the positive measurement taken from an external DMM
dRefNegative
DOUBLE
Sets the negative measurement taken from an external DMM
dRefZero
DOUBLE
Sets the zero measurement taken from an external DMM
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

This function calibrates a DAC by passing in three measurements taken using a reference DMM at three calibration points (positive, zero and negative). A Voltage point is selected by calling Gx3348CalSetDacVoltagePoint. Calling Gx3348CalWriteEEPROM will finalize the calibration.

Example

The following example calibrates DAC A:

 

Gx3348Initialize (1, &nHandle, &nStatus);

Gx3348CalSetMode(nHandle, GX3348_CAL_MODE_ENABLED, &nStatus);

for(nGroup=0; nGroup<3; nGroup++)

{

for(nChannel=0; nChannel<16; nChannel++)

{

Gx3348SetRailSource(nHandle, GX3348_RAIL_A, GX3348_RAIL_SOURCE_INTERNAL_DAC, &nStatus);

Gx3348SetChannelRail(nHandle, nGroup, nChannel, GX3348_RAIL_A, &nStatus)

Gx3348CalSetDacVoltagePoint(nHandle, GX3348_RAIL_DAC_A, GX3348_CAL_DAC_VOLTAGE_POINT_POSITIVE, &nStatus);

DMMMeasure(&dRefPositive);

Gx3348Measure(nHandle, nGroup, nChannel, &dMeasurePositive, &nStatus);

Gx3348CalSetDacVoltagePoint(nHandle, GX3348_RAIL_DAC_A, GX3348_CAL_DAC_VOLTAGE_POINT_NEGATIVE, &nStatus);

DMMMeasure(&dMeasureNegative);

Gx3348Measure(nHandle, nGroup, nChannel, &dMeasureNegative, &nStatus);

Gx3348CalAdc(nHandle, nGroup, nChannel, dRefPositive, dRefNegative, dMeasurePositive, dMeasureNegative, &nStatus);

}

}

 

See Also

Gx3348CalSetDacVoltagePoint  Gx3348CalWriteEEPROM, GxPdoGetErrorString