EasyManuals Logo

Agilent Technologies 8712ET Programmer's Guide

Agilent Technologies 8712ET
320 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 #75 background imageLoading...
Page #75 background image
Programmer’s Guide 6-5
Trace Data Transfers
Querying the Measurement Trace Using SICL
Querying the Measurement Trace Using
SICL
This section includes a complete SICL C program that shows how to read
the measurement trace from the analyzer.
/**************************************************************************
* This program takes a sweep, reads the trace, and prints it.
* It uses SICL (Standard Instrument Control Library) to talk
* to the analyzer over HP-IB.
*
* On HP-UX, compile using: cc -Aa -o query_trace query_trace.c -lsicl
**************************************************************************/
#include <sicl.h> /* For iopen(), iprintf(), iscanf(), INST, ... */
#include <stdio.h> /* For printf() */
int main(void) {
INST analyzer; /* Handle used to talk to analyzer */
float data_buf[1601]; /* measurement trace. 32-bit floats */
int num_trace_bytes;
int pt;
num_trace_bytes = sizeof(data_buf); /* Set to max allowable bytes */
/* Open the network analyzer at address 16 */
analyzer = iopen("hpib,16");
/* Clear the bus */
iclear(analyzer);
/* Abort current sweep and put analyzer sweep in hold */
iprintf(analyzer, "ABORT\n");
iprintf(analyzer, "INIT:CONT OFF\n");
/* Take one sweep, wait until done */
iprintf(analyzer, "INIT1\n");
iprintf(analyzer, "*OPC?\n");
iscanf(analyzer, "%*s");
/* Request the trace data in 32-bit floating point format */
iprintf(analyzer, "FORM:BORD NORM\n");
iprintf(analyzer, "FORM:DATA REAL,32\n");
/* Query the trace, read into data_buf[]. */
iprintf(analyzer, "TRAC? CH1FDATA\n");
iscanf(analyzer, "%#b%*c", &num_trace_bytes, &data_buf[0]);
/* Print the trace values. */
for (pt = 0; pt < num_trace_bytes/sizeof(float); pt++) {
printf("%4d %g\n", pt, data_buf[pt]);
}
/* Close analyzer and exit. */
iclose(analyzer);
return 0;
}

Table of Contents

Other manuals for Agilent Technologies 8712ET

Questions and Answers:

Question and Answer IconNeed help?

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

Agilent Technologies 8712ET Specifications

General IconGeneral
BrandAgilent Technologies
Model8712ET
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals