Reading Trace Data Using Ascii Format (Gpib) - 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 (GPIB )
Reading Trace Data using ASCII Forma t
(GPIB)
/************************************************************ /
/*
Reading Trace Data using ASCII Format (HP-IB )
/ *
/* This C programming example does the following .
/* The required SCPI instrument commands are given a s
/* reference .
/ *
/* -
Opens an HP-IB session at address 1 8
/* - Clears the Analyze r
/* - Resets the Analyzer
/*
*RS T
/* -
Set the input port to the 50 MHz amplitude referenc e
/*
E4411B or E4401 B
/*
CAL :SOUR :STAT ON
/*
E4402, E4403B, E4404BE, 4405B, E4407B or E4408 B
/*
Prompt to connect AMPTD REF OUT to INPU T
/*
CAL :SOUR STAT O N
/* -
Query for the number of sweep points (only applies t o
/* firmware revisions A .04 .00 and later) ; default is 40 1
/*
SENS :SWE :POIN ?
/* -
Sets the analyzer center frequency to 50 MH z
/*
SENS :FREQ :CENT 50 MH Z
/* - Sets the analyzer span to 50 MHz
/*
SENS :FREQ :SPAN 50 MH Z
/* - Set the analyzer to single sweep mod e
/*
INIT :CONT 0
/* - Trigger a sweep
/*
INIT :IMM
/* -
Check for operation complet e
/*
*OPC ?
/* -
Specify units in dEm
/*
UNIT :POW DBM
/* -
Set the analyzer trace data to ASCI I
/*
FORM :DATA : ASC
/* - Trigger a swee p
/*
INIT :IMM
/* -
Check for operation complet e
/*
*OPC ?
/* -
Query the trace data
/*
TRAC :DATA? TRACE 1
/* -
Remove the "," from the ACSII data
3-24
Chapter 3

Advertisement

Table of Contents
loading

Table of Contents