User`s manual

C Version
/* E1411_QY.CPP - This program sets the multimeter function to (4-wire) */
/* OHMS and then queries the function setting and reads it from the Query */
/* Response register. */
#include <sicl.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#define READY (iwpeek((unsigned short *)(base_addr + 0x04)) & 0x01)
#define DONE ((iwpeek((unsigned short *)(base_addr + 0x04)) & 0x81) == 0x81)
#define QRYRDY ((iwpeek((unsigned short *)(base_addr + 0x04)) & 0x83) == 0x83)
/* Function prototypes */
void set_function(char *base_addr);
void main(void)
{
char *base_addr;
/* clear the user screen */
clrscr();
/* 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 set the multimeter function */
set_function(base_addr);
/* close session */
iclose(e1411b);
}
/******************************************************/
void set_function(char *base_addr)
{
Continued on Next Page
228 HP E1326B/E1411B Multimeter Register-Based Programming Appendix C