HP E1326B User Manual page 223

5 1/2 digit multimeter
Table of Contents

Advertisement

C Version
222
HP E1326B/E1411B Multimeter Register-Based Programming
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
/* E1411_RS.CPP - This program resets the multimeter. */
#include <sicl.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#define PASS_FAIL (iwpeek((unsigned short *)(base_addr + 0X04)) & 0x04)
/* Function prototypes */
void reset_mm(char *base_addr);
void main(void)
{
char *base_addr;
/* create and open a device session */
INST e1411b;
e1411b = iopen("vxi,24");
/* map the E1411B registers into user memory space */
base_addr = imap(e1411b, I_MAP_VXIDEV, 0, 1, NULL);
/* function call to reset the multimeter */
reset_mm(base_addr);
/* close session */
iclose(e1411b);
}
/******************************************************/
void reset_mm(char *base_addr)
{
/* This function resets the multimeter by disabling the Control register */
/* 'SYSFAIL' bit (bit 1), and then by writing a '1' to bit 0 and then by */
/* writing a '0' to bit 0. After the reset, the 'SYSFAIL' bit is re-enabled. */
iwpoke((unsigned short *)(base_addr + 0x04),2); /* disable 'SYSFAIL' */
iwpoke((unsigned short *)(base_addr + 0x04),3);
iwpoke((unsigned short *)(base_addr + 0x04),3); /* bit must be set for 2 us */
iwpoke((unsigned short *)(base_addr + 0x04),3);
iwpoke((unsigned short *)(base_addr + 0x04),2);/* turn off reset */
while (!PASS_FAIL); /* wait for the reset to complete */
iwpoke((unsigned short *)(base_addr + 0x04),0);/* enable 'SYSFAIL' */
}
Appendix C

Advertisement

Table of Contents
loading

This manual is also suitable for:

E1411b

Table of Contents