Sets the measured values for a calibration group (range function combination)
GxDmmSetCalibrationMeasurements (nHandle, dwCalGroup, dRefPositiveMeasurement, dRefNegativeMeasurement, dRefGroundMeasurement, dDmmPositiveMeasurement, dDmmNegativeMeasurement, dDmmGroundMeasurement, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle for a GX2065 board. |
dwCalGroup |
DWORD |
Chooses the range/function combination to calibrate
|
dRefPositiveMeasurement |
DOUBLE |
The positive reference DMM measurement |
dRefNegativeMeasurement |
DOUBLE |
The negative reference DMM measurement |
dRefGroundMeasurement |
DOUBLE |
The ground reference DMM measurement |
dPositiveMeasurement |
DOUBLE |
The positive GX2065 DMM measurement |
dNegativeMeasurement |
DOUBLE |
The negative GX2065 DMM measurement |
dGroundMeasurement |
DOUBLE |
The ground GX2065 DMM measurement |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The GX2065 can be calibrated in system, in field, by the end user.
Call this function to store measured values for each combination of range and function. The firmware will internally calculate the resultant gains and offset. Call GxDmmWriteEEPROM to write the measured values to the onboard EEPROM.
The Reference measurements, dRefPositiveMeasurement, dRefNegativeMesaurement, and dRefGroundMeasurement, are used to input the values being generated by the Calibrator. Normally these values should be exactly the same as the Calibrator setting. For example, when calibrating VDC 10 Volt Range, dPositiveMeasurement would be +10.0, dNegativeMeasurement would be -10.0, and dGroundMeasurement would be 0.
When using a discrete source and reference DMM instead of a Calibrator, dPositiveMeasurement, dNegativeMeasurement, and dGroundMeasurement would store measured values from the reference DMM.
Note that this function only affects the User calibration. If the User calibration is done incorrectly and the results have been finalized (by calling GxDmmWriteCalEEPROM), the contents can be restored by calling GxDmmRestoreFactoryCalibration.
The following example calibrates the Volts DC function for the 10 Volt Range and stores it in the User Calibration:
SHORT nHandle, nStatus;
DOUBLE dPositiveMeasurement, dNegativeMeasurement, dGroundMeasurement;
SetCalibration(VDC, 10.0, “Volts”); //Calibrator API, Set Calibrator to VDC +10.0 Volts
GxDmmMeasure(nHandle, &dPositiveMeasurement, &nStatus);
SetCalibration(VDC, -10.0, “Volts”); //Calibrator API, Set Calibrator to VDC -10.0 Volts
GxDmmMeasure(nHandle, &dNegativeMeasurement, &nStatus);
SetCalibration(VDC, 0.0, “Volts”); //Calibrator API, Set Calibrator to VDC 0.0 Volts
GxDmmMeasure(nHandle, &dGroundMeasurement, &nStatus);
GxDmmSetCalibrationMeasurements (nHandle, GXDMM_CAL_HiRes10VDC, 10.0, -10.0, 0.0, dPositiveMeasurement, dNegativeMeasurement, dGroundMeasurement, &nStatus);
GxDmmSetCalibrationSet, GxDmmGetCalibrationSet, GxDmmRestoreFactoryCalibration, GxDmmWriteCalibrationEEPROM, GxDmmGetErrorString