HP E1326B User Manual page 62

5 1/2 digit multimeter
Table of Contents

Advertisement

Chapter 3
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
void main(void)
/* run the program */
{
clrscr();
/* clears screen (turbo C only) */
rst_clr();
/* reset the scanning multimeter */
scan_mult(); /* function to configure multimeter and take readings */
}
/******************************************************************/
void scan_mult(void)
{
time_t T1, T2;
int c = 0, i = 0, j = 0, length = 0, swap = 0, bytes = 0;
float *rdgs, rdy;
char lf_remove[1];
/* dynamically allocate memory for readings */
rdgs = malloc(8000 * sizeof(float));
/* set number of bytes placed in memory, and number of bytes read */
swap = size of (float);
bytes = 8000 * swap;
/* configure the scanning multimeter and wait for configuration to complete */
IOOUTPUTS(ADDR, "CONF:VOLT:DC
(@1(00:15),2(00:15),3(00:15),4(00:01))", 51);
IOOUTPUTS(ADDR, "VOLT:RANGE 10;:CAL:ZERO:AUTO
OFF;:VOLT:APERMIN",47 );
IOOUTPUTS(ADDR, "FORMAT REAL,32",14 );
IOOUTPUTS(ADDR, "*OPC?", 5);
IOENTER(ADDR, &rdy);
/* function call to check for multimeter configuration errors */
check_error("scan_mult");
T1 = time(NULL);
/* program loop which set 4, 40 scan measurements */
for (c = 0; c 4; c++)
{
/* program loop which scans the 50 multiplexer channels 40 times */
for (i = 0; i 40; i++)
{
IOOUTPUTS(ADDR, "INIT", 4);
IOOUTPUTS(ADDR, "FETCH?", 6);
IOENTERAB(ADDR, rdgs, &bytes, swap);
/* remove line feed which trails the last data byte */
length = 1;
IOENTERS(ADDR, lf_remove, &length);
/* compare each reading to a set of limits */
for (j = 0; j 50; j++)
{
Continued on Next Page
Using the HP E1326B/E1411B Multimeter
/* float = 32-bit real number */
/* place 4 bytes/reading in memory */
/* read 32,000 bytes */
/* wait for configuration to complete */
/* enter *OPC? response from multimeter */
/* get start time */
/* trigger multimeter */
/* fetch the readings */
/* enter readings and remove
block header*/
61

Advertisement

Table of Contents
loading

This manual is also suitable for:

E1411b

Table of Contents