Reading Trace Data Using Ascii Format (Rs-232) - Agilent Technologies ESA-E Series Programmer's Manual

Esa spectrum analyzers
Hide thumbs Also See for ESA-E Series:
Table of Contents

Advertisement

Programming Examples
Reading Trace Data Using ASCII Format (RS-232 )
Reading Trace Data Using ASCII Format
(RS-232)
/************************************************************ /
/* Reading Trace Data using ASCII Format (RS-232 )
/*
/* This C programming example does the following .
/* The SCPI instrument commands used are given as
/* reference .
/ *
/* - Opens an RS-232 session at COM1/COM2
/* - Clears the Analyze r
/* - Resets the Analyze r
/*
*RST
/* - Set the input port to the 50 MHz amplitude referenc e
/*
CAL :SOUR :STAT O N
/* - Query for the number of sweep points (for firmwar e
/* revisions A.04 .00 and later) . Default is 401 .
/*
SENS :SWE :POIN ?
/* - Set the analyzer to single sweep mode
/*
INIT:CONT 0
/* - Sets the analyzer center frequency and span to 50 MHz
* /
/*
SENS :FREQ :CENT 50 MH Z
/*
SENS :FREQ :SPAN 50 MH Z
/* - Trigger a sweep
/*
INIT:IMM
/* - Check for operation complet e
/*
*OPC?
/* -
Specify dam Uni t
/*
UNIT:POW DBM
/* - Set the analyzer trace data ASCI I
/*
FORM:DATA : ASC
/* - Trigger a sweep
/*
INIT:IMM
/* - Check for operation complet e
/*
*OPC?
/* - Query the trace data
/*
TRAC :DATA? TRACE 1
/* - Remove the "," from the ACSII data
/* - Save the trace data to an ASCII fil e
/* - Close the session
/************************************************************ /
#include <stdio .h>
3-34
Chapter 3

Advertisement

Table of Contents
loading

Table of Contents