EasyManua.ls Logo

Agilent Technologies E8257D User Manual

Agilent Technologies E8257D
366 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 #85 background imageLoading...
Page #85 background image
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 75
Programming Examples
GPIB Programming Interface Examples
rdVal[ibcntl] = '\0'; // Null character indicating end of array
// Prints signal generator power level
cout<<"Source power (dBm) is : "<<rdVal;
cout<<"Press any key to continue"<<endl;
cin.ignore(10000,'\n');
ibwrt(sig, ":FREQ:MODE?",11); // Querys source frequency mode
ibrd(sig, rdVal,100); // Enters in the source frequency mode
rdVal[ibcntl] = '\0'; // Null character indicating end of array
cout<<"Source frequency mode is "<<rdVal; // Print source frequency mode
cout<<"Press any key to continue"<<endl;
cin.ignore(10000,'\n');
ibwrt(sig, "OUTP OFF",12); // Turns off RF source
ibwrt(sig, "OUTP?",5); // Querys the on/off state of the instrument
ibrd(sig,rdVal,2); // Enter in the source state
rdVal[ibcntl] = '\0';
num = (int (rdVal[0]) -('0'));
if (num > 0){
cout<<"Source RF state is : On"<<endl;
}else{
cout<<"Source RF state is : Off"<<endl;}
cout<<endl;
ibwrt(sig, "*IDN?",5); // Querys the instrument ID
ibrd(sig, rdVal,100); // Reads the source ID
rdVal[ibcntl] = '\0'; // Null character indicating end of array
cout<<"Source ID is : "<<rdVal; // Prints the source ID
cout<<"Press any key to continue"<<endl;
cin.ignore(10000,'\n');
ibwrt(sig, "SYST:COMM:GPIB:ADDR?",20); //Querys source address
ibrd(sig, rdVal,100); // Reads the source address
rdVal[ibcntl] = '\0'; // Null character indicates end of array
// Prints the signal generator address
cout<<"Source GPIB address is : "<<rdVal;
cout<<endl;
cout<<"Press the 'Local' key to return the signal generator to LOCAL control”<<endl; cout<<endl;
return 0;
}
Queries for GPIB Using VISA and C
This example uses VISA library functions to query different instrument states and conditions. Launch
Microsoft Visual C++ 6.0, add the required files, and enter the following code into your .cpp source
file. visaex3.cpp performs the following functions:
verifies the GPIB connections and interface are functional

Table of Contents

Other manuals for Agilent Technologies E8257D

Questions and Answers:

Agilent Technologies E8257D Specifications

General IconGeneral
BrandAgilent Technologies
ModelE8257D
CategoryInverter
LanguageEnglish

Summary

Getting Started with Remote Operation

Interfaces

Details various interface types (GPIB, LAN, RS-232, USB) for instrument communication.

IO Libraries and Programming Languages

Covers IO libraries and common programming languages for instrument control.

Using IO Interfaces

Using GPIB

Details GPIB interface for instrument connection and control, including setup and verification.

Using LAN

Explains LAN interface protocols (VXI-11, Sockets, Telnet, FTP) for remote instrument programming.

Programming Examples

Using the Programming Interface Examples

Introduces programming examples for remote control using various interfaces and languages.

GPIB Programming Interface Examples

Provides examples for GPIB programming and instrument control, including interface checks and queries.

LAN Programming Interface Examples

Covers LAN programming examples using VXI-11 and Sockets LAN protocols for instrument control.

Programming the Status Register System

Overview

Provides an overview of the status register system for monitoring signal generator conditions and errors.

Status Register Bit Values

Explains how each bit in a register is represented and how to enable/query bits using SCPI commands.

Accessing Status Register Information

Details methods for monitoring conditions, including polling and service request interrupts.

Status Byte Group

Describes the Status Byte Group, including the Status Byte Register and Service Request Enable Register.

Creating and Downloading Waveform Files

Creating and Downloading User-Data Files

Related product manuals