EasyManua.ls Logo

HP ESA-E Series - Example; Reading Trace Data Using ASCII Format (RS-232)

HP ESA-E Series
398 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...
Chapter 3 3-31
Programming Examples
Reading Trace Data Using ASCII Format (RS-232)
Reading Trace Data Using ASCII Format
(RS-232)
This C programming example does the following:
Open a serial session at COM1/COM2.
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 "," token 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 "Hewlett-Packard, E4401B"
#define hpESA_IDN_E4411B "Hewlett-Packard, E4411B"
Visession defaultRM, viESA;
ViStatus errStatus;
ViChar cIdBuff[256]={0};
char cEnter = 0;
int iResult = 0;

Table of Contents

Related product manuals