EasyManua.ls Logo

Agilent Technologies E4440A User Manual

Agilent Technologies E4440A
434 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 #336 background imageLoading...
Page #336 background image
336 Chapter 5
Programming Fundamentals
Programming in C Using the VTL
Programming Fundamentals
Example Program
This example program queries a GPIB device for an identification
string and prints the results. Note that you must change the address.
/*idn.c - program filename */
#include "visa.h"
#include <stdio.h>
void main ()
{
/*Open session to GPIB device at address 18 */
ViOpenDefaultRM (&defaultRM);
ViOpen (defaultRM, GPIB0::18::INSTR", VI_NULL,
VI_NULL, &vi);
/*Initialize device */
viPrintf (vi, "*RST\n");
/*Send an *IDN? string to the device */
printf (vi, "*IDN?\n");
/*Read results */
viScanf (vi, "%t", &buf);
/*Print results */
printf ("Instrument identification string: %s\n", buf);
/* Close sessions */
viClose (vi);
viClose (defaultRM);
}
Including the VISA Declarations File
For C and C++ programs, you must include the visa.h header file at
the beginning of every file that contains VTL function calls:
#include "visa.h"
This header file contains the VISA function prototypes and the
definitions for all VISA constants and error codes. The visa.h header
file includes the visatype.h header file.
The visatype.h header file defines most of the VISA types. The VISA
types are used throughout VTL to specify data types used in the
functions. For example, the viOpenDefaultRM function requires a
pointer to a parameter of type ViSession. If you find ViSession in the
visatype.h header file, you will find that ViSession is eventually
typed as an unsigned long.

Table of Contents

Other manuals for Agilent Technologies E4440A

Question and Answer IconNeed help?

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

Agilent Technologies E4440A Specifications

General IconGeneral
BrandAgilent Technologies
ModelE4440A
CategoryMeasuring Instruments
LanguageEnglish

Summary

2. Instrument Functions: A - L

2.1 AMPLITUDE / Y Scale

Controls display of amplitude data, including reference level and scaling.

3. Instrument Functions: M - O

3.1 Marker

Controls marker functions for measuring trace data points.

3.4 MEASURE (Spectrum Analysis Mode)

Provides access to measurement setup and configuration options.

4. Instrument Functions: P - Z

4.1 Peak Search

Locates and analyzes peaks on the trace based on defined parameters.

4.5 Save

Saves analyzer states, traces, and screen data to storage.

4.7 SPAN / X Scale

Adjusts the displayed frequency range and X-axis scale.

4.8 SWEEP

Controls sweep time and mode for signal acquisition.

5. Programming Fundamentals

SCPI Language Basics

Introduces the SCPI programming language, keywords, syntax, and parameters.

Improving Measurement Speed

Provides techniques to optimize program execution and measurement speed.

Using the LAN to Control the Instrument

Explains how to control the instrument using LAN connectivity.

6. Using the STATus System

STATus Subsystem

Explains the SCPI-defined instrument-status reporting structures and registers.

7. Menu Maps: Spectrum Analysis

Marker Key (See page 167)

Details the menu structure for controlling marker functions on the trace.

Peak Search Key (See page 203)

Shows the menu flow for performing peak searches on trace data.

SPAN X Scale Key (See page 227)

Details the menu structure for adjusting span and X-axis scale.

Sweep Key (See page 231)

Shows the menu paths for controlling sweep time and mode.

Trig Key (See page 281)

Details the menu paths for setting trigger conditions for sweeps and measurements.

Related product manuals