char *base_addr_dmm;
/* pointer to multimeter base address */
char *base_addr_fet;
/* pointer to multiplexer base address */
clrscr( );
/* clear the user screen */
/* create and open device sessions */
INST e1411b;
e1411b = iopen("vxi,24");
INST e1351a;
e1351a = iopen("vxi,25");
/* map the E1411B and E1351A registers into user memory space */
base_addr_dmm = imap(e1411b, I_MAP_VXIDEV, 0, 1, NULL);
base_addr_fet = imap(e1351a, I_MAP_VXIDEV, 0, 1, NULL);
/* function calls to reset the multimeter and the multiplexer */
reset_mm(base_addr_dmm);
reset_fet(base_addr_fet);
/* function calls to configure the multimeter; the parameters */
/* are the multimeter’s A16 base address, the command opcode, */
/* and the parameter opcode or value */
configure_dmm(base_addr_dmm,4,0);
/* function = DCV */
configure_dmm(base_addr_dmm,2,2);
/* range = 8V */
configure_dmm(base_addr_dmm,0,6);
/* aperture time = 10 us */
configure_dmm(base_addr_dmm,8,1);
/* autozero = off */
configure_dmm(base_addr_dmm,36,0); /* offset compensation = off */
/* trigger system */
configure_dmm(base_addr_dmm,6,2);
/* trigger source = HOLD */
configure_dmm(base_addr_dmm,7,1);
/* sample source = TIMER */
set_sample_period(base_addr_dmm,10,76);/* sample rate = 76 us */
set_dmm_counts(base_addr_dmm,39,25);/* trigger count = 25 */
set_dmm_counts(base_addr_dmm,23,0);/* trigger delay = 0 */
set_dmm_counts(base_addr_dmm,38,1);/* sample count = 1 */
configure_dmm(base_addr_dmm,12,1); /* arm the multimeter */
Continued on Next Page
254 HP E1326B/E1411B Multimeter Register-Based Programming
Appendix C
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com