HP E1418A Service Manual page 70

8/16-channel d/a converter
Hide thumbs Also See for E1418A:
Table of Contents

Advertisement

/** FUNCTION PROTOTYPES **/
void main (void);
void err_handler(ViSession vi, ViStatus x);
void sys_err(ViSession resource);
void pause();
int config_check ();
float get_voltage ();
float get_resistance ();
void main (void)
{
char cal_point [5],int_ext [4];
int num_chan,result,compare,i,condition [4];
float meas_volt,meas_res;
/***
VOLTAGE OUTPUT ADJUSTMENT
for (i=1;i<num_chan+1;i++)
{
result = 0;
while (result < 1)
err=viPrintf(dac, "CAL%d:CONF:VOLT?\n",i); /* Configure for calibration */
if(err < VI_SUCCESS) err_handler(dac, err);
err=viScanf(dac, "%d", &result);
if(err < VI_SUCCESS) err_handler(dac, err);
}
result = 1;
while (result !=0)
{
meas_volt=get_voltage ();
err=viPrintf(dac, "CAL%d:VAL:VOLT? %f\n",i,meas_volt); /* Send the measurement*/
70 Adjustments
/* Waits for a keystroke to continue program execution */
/* Checks and reports the module configuration */
/* returns the number of channels in module
/* Obtains the measured voltage
/* Obtains the measured resistance */
{
/* VTL error routine
/* Checks for SCPI programming errors */
***/
/* Enter integer returned
/* returns a 1 when ready to calibrate */
/* Get the voltage measurement */
*/
*/
*/
*/
Chapter 5

Advertisement

Table of Contents
loading

Table of Contents