Sets a DAC’s offset and gain before writing it to the EEPROM
Gx3348CalSetDacVoltagePoint (nHandle, nDac, nCalVoltagePoint, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle for the PXI board. |
nDac |
SHORT |
Set the DAC that will be configured0. GX3348_RAIL_DAC_A: Calibrate DAC A1. GX3348_RAIL_DAC_B: Calibrate DAC B2. GX3348_RAIL_DAC_C: Calibrate DAC C |
nCalVoltagePoint |
SHORT |
Sets the positive measurement taken from an external DMM0. GX3348_CAL_DAC_VOLTAGE_POINT_ZERO: Calibrate DAC A1. GX3348_CAL_DAC_VOLTAGE_POINT_NEGATIVE: Calibrate DAC B2. GX3348_CAL_DAC_VOLTAGE_POINT_POSITIVE: Calibrate DAC C |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
This function sets a voltage point for DAC Calibration. Channel 0 of Group A should be measured by a reference DMM at each of the three voltage points (Zero, Negative, and Positive voltages). These measurements will be passed into the Gx3348CalDac function. Calling Gx3348CalWriteEEPROM will finalize the calibration.
The following example calibrates DAC A:
SHORT nHandle, nStatus;
DOUBLE dRefPositive, dRefNegative, dRefZero;
Gx3348Initialize (1, &nHandle, &nStatus);
Gx3348CalSetMode(nHandle, GX3348_CAL_MODE_ENABLED, &nStatus);
Gx3348CalSetDacVoltagePoint(nHandle, GX3348_RAIL_DAC_A, GX3348_CAL_DAC_VOLTAGE_POINT_POSITIVE, &nStatus);
DMMMeasure(&dRefPositive);
Gx3348CalSetDacVoltagePoint(nHandle, GX3348_RAIL_DAC_A, GX3348_CAL_DAC_VOLTAGE_POINT_ZERO, &nStatus);
DMMMeasure(&dRefZero);
Gx3348CalSetDacVoltagePoint(nHandle, GX3348_RAIL_DAC_A, GX3348_CAL_DAC_VOLTAGE_POINT_NEGATIVE, &nStatus);
DMMMeasure(&dRefNegative);
Gx3348CalDac(nHandle, GX3348_RAIL_DAC_A, dRefPositive, dRefNegative, dRefZero, &nStatus);
Gx3348CalWriteEEPROM(nHandle, &nStatus);