HP E1418A User Manual
Page 164
![background image](/manuals/90248/164/background.png)
•
•
/*** VOLTAGE OUTPUT ADJUSTMENT ***/
for
(i=1;i { result = 0; while (result < 1) { err=viPrintf(dac, “CAL%d:CONF:VOLT?\n”,i); /* Configure for calibration */ /* Enter integer returned */ if(err < VI_SUCCESS) err_handler(dac, err); result = 1; { /* Get the voltage measurement */ err=viPrintf(dac, “CAL%d:VAL:VOLT? %f\n”,i,meas_volt); /* Send the measurement*/ /* Enter integer returned */ if(err < VI_SUCCESS) err_handler(dac, err); /* Calibration for this channel aborted */ { } } /*** CURRENT OUTPUT ADJUSTMENT ***/ /*** set the calibration resistor value ***/ result = 0; { /* Configure for resistance calibration */ if(err < VI_SUCCESS) err_handler(dac, err); /* Enter integer returned */ if(err < VI_SUCCESS) err_handler(dac, err); meas_res = get_resistance(); /*** channel current output adjustment ***/ for (i=1;i { { 163 Voltage/Current Output Adjustment Appendix D Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
if(err < VI_SUCCESS) err_handler(dac, err);
err=viScanf(dac, “%d”, &result);
/* returns a 1 when ready to calibrate */
}
while (result !=0)
meas_volt=get_voltage ();
if(err < VI_SUCCESS) err_handler(dac, err);
err=viScanf(dac, “%d”, &result);
/* returns a 0 when calibration complete */
if (result == 5)
printf (“Calibration for channel %d aborted\n”,i);
result = 0;
}
while (result < 1)
err=viPrintf(dac, “CAL:CONF:RES?\n”);
err=viScanf(dac, “%d”, &result);
/* returns a 1 when ready to calibrate */
}
err=viPrintf(dac, “CAL:VAL:RES %f\n”,meas_res); /* Send the resistance value */
if(err < VI_SUCCESS) err_handler(dac, err);
result = 0;
while (result < 1)
err=viPrintf(dac, “CAL%d:CONF:CURR? \n”,i); /* Configure for calibration */
if(err < VI_SUCCESS) err_handler(dac, err);