HP E1326B User Manual page 260

5 1/2 digit multimeter
Table of Contents

Advertisement

Appendix C
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
/******************************************************/
void trigger_dmm(char *base_addr_dmm)
{
/* this function triggers the multimeter and retrieves and prints the */
/* readings from the data register */
int i, range_code;
short dmm_2byte = 0;
long dmm_4byte = 0, temp_4byte = 0;
float range, reading;
/* voltage range and resistance range tables */
float volt_range[5] = {0.125, 1.0, 8.0, 64.0, 300.0};
float ohm_range[5] = {256.0, 2048.0, 16384.0, 131000.0, 1048000.0};
for (i=0; i<25; i++)
{
no_dmm_parameters(base_addr_dmm,13);/* trigger the multimeter */
while(!DATARDY);
if (aper != 6)/* aperture time is NOT 10 us (4-byte readings) */
{
/* get upper word of reading from the data register, shift the */
/* word 16-bits to the left */
temp_4byte = (long) iwpeek((unsigned short *)(base_addr_dmm + 0x0C));
dmm_4byte = (temp_4byte << 16);
while(!DATARDY); /* wait for lower word of reading */
/* get lower word of reading from the data register, add the */
/* word to the reading upper word in the variable dmm_4byte, */
/* ensure upper word of temp_4byte is 00h */
temp_4byte = (long) iwpeek((unsigned short *)(base_addr_dmm + 0x0C));
dmm_4byte = dmm_4byte + (temp_4byte & 0xFFFF);
/* check for reading overrange */
if (dmm_4byte & 0x80000000)
{
printf("\nReading Overrange");
}
else
{
HP E1326B/E1411B Multimeter Register-Based Programming
/* 2-byte reading variable */
/* 4-byte reading variable */
/* loop for 5 scans of 5 readings */
Continued on Next Page
259

Advertisement

Table of Contents
loading

This manual is also suitable for:

E1411b

Table of Contents