HP ESA-E Series Programmer's Manual page 120

Esa spectrum analyzers
Table of Contents

Advertisement

Programming Examples
Status Register–Determine When a Measurement is Done
report the result.
• Close the context before returning.
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
#define
YIELD Sleep(10)
ViSession defaultRM, viESA;
ViStatus
errStatus;
ViChar
cIdBuff[256] = {0};
char
cEnter =0;
int
iResult =0;
int
iSrqOccurred=0;
char
cBuf[3]=0;
/*Wait until SRQ is generated and for the handler to be
called. Print something while waiting. When interrupt occurs
it will be handled by interrupt handler*/
void WaitForSRQ()
{
long
lCount = 0L;
iSrqOccurred
printf ("\t\nWaiting for an SRQ to be generated ...");
for (lCount =0;(lCount<10) && (iSrqOccurred
lCount++)
3-56
"Hewlett-Packard, E4401B"
"Hewlett-Packard, E4411B"
=0;
==0);
Chapter 3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents