/* get range code from reading, get range from */
/* the appropriate range table */
range_code = ((dmm_4byte >> 24) & 7);
if (func == 2)
range = ohm_range[range_code];
else
range = volt_range[range_code];
/* compute and print reading */
dmm_4byte = (dmm_4byte << 8);
reading = (range * dmm_4byte) / 0x7FFFFF00;
printf("\n%.5E", reading);
}
}
else
/* aperture time is 10 us (2-byte readings) */
{
dmm_2byte = (short) iwpeek((unsigned short *)
(base_ad 0x0C));
/* check for reading overrange */
if (dmm_2byte & 0x1)
{
printf("\nReading Overrange");
}
else
{
/* remove error bit from reading */
dmm_2byte = (dmm_2byte >> 1);
/* get range code from rng variable, get range from */
/* the appropriate range table */
if (func == 2)
range = ohm_range[rng];/* resistance ranges */
else
range = volt_range[rng]; /* voltage ranges */
/* compute and print reading */
reading = (range * dmm_2byte) / 0x3FFF;
printf("\n%.5E", reading);
}
}
}
Continued on Next Page
260 HP E1326B/E1411B Multimeter Register-Based Programming
Appendix C
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com