Querying The Measurement Trace Using Sicl - Agilent Technologies 8712ET Programmer's Manual

Rf network analyzers
Hide thumbs Also See for 8712ET:
Table of Contents

Advertisement

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:
**************************************************************************/
#include <sicl.h>
#include <stdio.h>
int main(void) {
INST analyzer;
float data_buf[1601];
int num_trace_bytes;
int pt;
num_trace_bytes = sizeof(data_buf);
/* 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
}
/* Close analyzer and exit. */
iclose(analyzer);
return 0;
}
Programmer's Guide

Querying the Measurement Trace Using SICL

cc -Aa -o query_trace
/* For iopen(), iprintf(), iscanf(), INST, ... */
/* For printf() */
/* Handle used to talk to analyzer */
/* measurement trace.
/* Set to max allowable bytes */
%g\n", pt, data_buf[pt]);
Trace Data Transfers
query_trace.c -lsicl
32-bit floats */
6-5

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

8712es8714et8714es

Table of Contents