C / Hp-Ib Example 2 - 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 2

This program example demonstrates two input channels can be
independently configured and used.
/***************************************************************************
This program configures the meter for voltage measurements on two
input channels. The channels are set to different ranges and resolutions
to show the independence of the settings for each channel.
***************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cfunc.h>
#define ISC 7L
#define ADDR 722L
/* Function Prototypes */
void rst_clear(void);
void meter_meas(void);
void command_exe(char *commands[], int length);
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 */
/* Assign GPIB select code */
/* Set GPIB address for meter */
/* Start of main() */
/* Reset the instrument and clear error queue */
/* Set up meter for measurement */
6
235

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents