Example; Reading Trace Data Using Ascii Format (Hp-Ib) - HP ESA-E Series Programmer's Manual

Esa spectrum analyzers
Table of Contents

Advertisement

Reading Trace Data using ASCII Format
(HP-IB)
This C programming example does the following:
• Open an HP-IB session at address 18.
• Clear the analyzer.
• Reset the analyzer.
• Set the input port to the 50 MHz amplitude reference.
• Set the analyzer center frequency and span to 50 MHz.
• Set the analyzer to single sweep mode.
• Trigger a sweep.
• Read the operation complete query.
• Specify units in dBm.
• Set the analyzer trace data format to ASCII format.
• Trigger a sweep.
• Read the operation complete query.
• Query the trace data using ASCII format.
• Remove the "," from the ASCII trace data for analyzing data.
• Save trace data to an ASCII file by removing the "," token.
• Close the session.

Example:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <conio.h>
#include <ctype.h>
#include <string.h>
#include "visa.h"
#define hpESA_IDN_E4401B
#define hpESA_IDN_E4411B
Visession defaultRM, viESA;
ViStatus
errStatus;
ViChar
cIdBuff[256]={0};
char
cEnter = 0;
Chapter 3

Reading Trace Data using ASCII Format (HP-IB)

"Hewlett-Packard, E4401B"
"Hewlett-Packard, E4411B"
Programming Examples
3-23

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents