Gx3348CalAdc

Purpose

Calibrates an ADC Channel

Syntax

Gx3348CalAdc (nHandle, nGroup, nChannel, dRefPostive, dRefNegative, dMeasurePositive, dMeasureNegative, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle for the PXI board.
nGroup
SHORT
Selects the group to calibrate
0. GX3348_GROUP_A: Calibrates an ADC Channel from Group A
1. GX3348_GROUP_B: Calibrates an ADC Channel from Group B
2. GX3348_GROUP_C: Calibrates an ADC Channel from Group C
3. GX3348_GROUP_D: Calibrates an ADC Channel from Group D
nChannel
DOUBLE
Selects the ADC channel within a group to calibrate
dRefPostive
DOUBLE
Sets the positive measurement taken from an external DMM
dRefNegative
DOUBLE
Sets the negative measurement taken from an external DMM
dMeasurePositive
DOUBLE
Sets the positive measurement taken from the ADC channel
dMeasureNegative
DOUBLE
Sets the negative measurement taken from the ADC channel
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

This function calibrates and ADC channel by using the internal DAC to source voltages. Calibration of the ADC does require external DMM. Calling Gx3348CalWriteEEPROM will finalize the calibration.

Example

The following example calibrates all ADC channels:

 

SHORT nHandle, nStatus, nGroup, nChannel;

DOUBLE dMeasurePositive, dMeasureNegative, dRefPositive, dRefNegative;

 

Gx3348Initialize (1, &nHandle, &nStatus);

Gx3348CalSetMode(nHandle, GX3348_CAL_MODE_ENABLED, &nStatus);

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

{

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

{

Gx3348SetRelay(nHandle, GX3348_RAIL_DAC_A, nGroup, nChannel, TRUE, &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);

}

}

Gx3348CalWriteEEPROM(nHandle, &nStatus);

 

See Also

Gx3348CalDac, Gx3348CalSetDacVoltagePoint  Gx3348CalWriteEEPROM, GxPdoGetErrorString