Example; Determine If An Error Has Occurred - HP ESA-E Series Programmer's Manual

Esa spectrum analyzers
Table of Contents

Advertisement

Programming Examples

Determine if an Error has Occurred

Determine if an Error has Occurred
This C programming example does the following:
• Open an HP-IB session at address 18.
• Clear the Instrument.
• Reset the analyzer.
• Set the service request mask to assert SRQ when either a
measurement is uncalibrated or an error message has occurred.
• Configure the computer to respond to an interrupt.
• Set analyzer to an uncalibrated state.
• When an interrupt occurs, poll all instruments.
• Report the nature of the interrupt on the HP ESA analyzer.
• Clear the analyzer status register.
• Continue monitoring for an interrupt.
• Send an illegal command.
• When an interrupt occurs, recognize it.
• Report the nature of the interrupt on the HP ESA analyzer.
• Clear the analyzer status register.
• Continue monitoring for an interrupt.
• Close the session.

Example:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <conio.h>
#include <ctype.h>
#include <string.h>
#include <windows.h>
#include "visa.h"
#define
hpESA_IDN_E4401B
#define
hpESA_IDN_E4411B
3-62
"Hewlett-Packard, E4401B"
"Hewlett-Packard, E4411B"
Chapter 3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents