/
******************************************************
/
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_ad 0x08),command);
while(!DONE); /* wait until mm is done before sending the */
/* next command and parameters */
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;
/* 2-byte reading variable */
long dmm_4byte = 0, temp_4byte = 0;
/* 4-byte reading variable */
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++)
/* loop for 5 bursts of 5 readings */
{
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_ad 0x0C));
dmm_4byte = (temp_4byte << 16);
while(!DATARDY); /* wait for lower word of reading */
Continued on Next Page
Appendix C
HP E1326B/E1411B Multimeter Register-Based Programming 243
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com