HP E1326B User Manual page 244

5 1/2 digit multimeter
Table of Contents

Advertisement

Appendix C
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
/******************************************************/
void no_dmm_parameters(char *base_addr_dmm, int command)
{
/* this function sends those multimeter commands which do not have */
/* parameters; this includes trigger immediate and software sample. */
/* write command to command register */
/* wait for mm ready bit = 1 */
while(!READY);
iwpoke((unsigned short *)(base_addr_dmm + 0x08),command);
while(!DONE); /* wait until mm is done before sending the */
if(!NOERR) check_for_error(base_addr_dmm);
/* check for configuration errors */
}
/******************************************************/
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 */
HP E1326B/E1411B Multimeter Register-Based Programming
/* next command and parameters */
/* 2-byte reading variable */
/* 4-byte reading variable */
/* loop for 5 bursts of 5 readings */
Continued on Next Page
243

Advertisement

Table of Contents
loading

This manual is also suitable for:

E1411b

Table of Contents