C / Hp-Ib Example 1; C Language Programs - Agilent Technologies 34420A User Manual

Nano volt/micro ohm meter
Table of Contents

Advertisement

Chapter 6 Application Programs

C Language Programs

C / HP-IB Example 1

This example demonstrates the general sequence of programming and
the use of the MEASure? command to set and obtain a 4-wire Ohms
measurement.
/***************************************************************************
This program configures the meter for a 4-wire ohms measurement on
Channel 1 using the MEAS command.
***************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cfunc.h>
#define ADDR 722L
/* Function Prototypes */
void rst_clear(void);
void meter_meas(void);
void check_error(char *func_name);
/**************************************************************************/
void main(void)
{
rst_clear();
meter_meas();
}
/**************************************************************************/
void rst_clear(void)
{
/* Reset the meter, clear the error queue, and wait for commands to
complete. A "1" is sent to the output buffer from the *OPC? command
when *RST and *CLS are completed. */
float value;
IOOUTPUTS(ADDR, "*RST;*CLS;*OPC?", 15);
IOENTER(ADDR, &value);
}
GPIB
/* Used for printf() */
/* Used for atoi() */
/* Used for strlen() */
/* Header file from GPIB Command Library */
/* Set GPIB address for meter */
/* Start of main() */
/* Reset the instrument and clear error queue */
/* Set up meter for measurement */
6
233

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents