EasyManuals Logo

Agilent Technologies EMC Series Programmer's Guide

Agilent Technologies EMC Series
349 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #156 background imageLoading...
Page #156 background image
156 Chapter 3
Programming Examples
Determine if an Error has Occurred
/* STAT:QUES:INT:ENAB 0 */
/* *CLS */
/* - Continue monitoring for an interrupt */
/* - Close the session */
/************************************************************/
#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 "Hewlett-Packard, E4401B"
#define hpESA_IDN_E4411B "Hewlett-Packard, E4411B"
#define hpEMC_IDN_E7401A "Hewlett-Packard, E7401A"
#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 =0;
printf ("\t\nWaiting for an SRQ to be generated ...");
for (lCount =0;(lCount<10) && (iSrqOccurred ==0); lCount++)
{
long lCount2 =0;
printf(".");
while ((lCount2++ < 100) && (iSrqOccurred ==0))
{
YIELD;
}

Table of Contents

Other manuals for Agilent Technologies EMC Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies EMC Series and is the answer not in the manual?

Agilent Technologies EMC Series Specifications

General IconGeneral
BrandAgilent Technologies
ModelEMC Series
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals