EasyManua.ls Logo

Keysight 34420A - C;GPIB Example 1

Keysight 34420A
307 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6 Application Programs
256 Keysight 34420A User’s Guide
C/GPIB 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> /* Used for printf() */
#include <stdlib.h> /* Used for atoi() */
#include <string.h> /* Used for strlen() */
#include <cfunc.h> /* Header file from GPIB Command Library */
#define ADDR 722L /* Set GPIB address for meter */
/* Function Prototypes */
void rst_clear(void);
void meter_meas(void);
void check_error(char *func_name);
/**************************************************************************/
void main(void) /* Start of main() */
{
rst_clear(); /* Reset the instrument and clear error queue */
meter_meas(); /* Set up meter for measurement */
}
/**************************************************************************/
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);
}

Table of Contents

Related product manuals