EasyManua.ls Logo

Agilent Technologies E4406A VSA Series User Manual

Agilent Technologies E4406A VSA Series
420 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 #158 background imageLoading...
Page #158 background image
158 Chapter3
Programming Examples
Using Java Programming Over Socket LAN
Using Java Programming Over Socket LAN
This is a Java programming example (ScpiDemo.java) that
demonstrates simple socket programming with Java. It is written in
Java programming language, and will compile with Java compilers
versions 1.0 and above.
Example:
import java.awt.*;
import java.io.*;
import java.net.*;
import java.applet.*;
// This is a SCPI Demo to demonstrate how one can communicate with the
// E4406A VSA with a JAVA capable browser. This is the
// Main class for the SCPI Demo. This applet will need Socks.class to
// support the I/O commands and a ScpiDemo.html for a browser to load
// the applet.
// To use this applet, either compile this applet with a Java compiler
// or use the existing compiled classes. copy ScpiDemo.class,
// Socks.class and ScpiDemo.html to a floppy. Insert the floppy into
// your instrument. Load up a browser on your computer and do the
// following:
// 1. Load this URL in your browser:
// ftp://<Your instrument's IP address or name>/int/ScpiDemo.html
// 2. There should be two text windows show up in the browser:
// The top one is the SCPI response text area for any response
// coming back from the instrument. The bottom one is for you
// to enter a SCPI command. Type in a SCPI command and hit enter.
// If the command expects a response, it will show up in the top
// window.
public class ScpiDemo extends java.applet.Applet implements Runnable {
Thread responseThread;
Socks sck;
URL appletBase;
TextField scpiCommand = new TextField();
TextArea scpiResponse = new TextArea(10, 60);
Panel southPanel = new Panel();
Panel p;
// Initialize the applets
public void init() {
SetupSockets();
SetupPanels();
// Set up font type for both panels
Font font = new Font("TimesRoman", Font.BOLD,14);
scpiResponse.setFont(font);

Table of Contents

Other manuals for Agilent Technologies E4406A VSA Series

Question and Answer IconNeed help?

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

Agilent Technologies E4406A VSA Series Specifications

General IconGeneral
BrandAgilent Technologies
ModelE4406A VSA Series
CategoryTest Equipment
LanguageEnglish

Summary

Safety Information

Front Panel Error Messages Annunciators

Describes status indicators for transmitter tester functions and error conditions.

1 Preparing for Use

Programming the Transmitter Tester

Explains how to program the E4406A VSA Series Transmitter Tester.

Installing Optional Measurement Personalities

Details the two-step process for installing measurement personalities.

Cables for Connecting to RS-232

Describes various cables and adapters for connecting to PCs and printers via RS-232.

Connecting to a LAN Server

Explains how to connect to a LAN server for instrument control.

2 Programming Fundamentals

SCPI Language Basics

Introduces the SCPI programming language and its core concepts.

Using the Instrument Status Registers

Explains how to monitor instrument hardware and firmware events using status registers.

Overview of the GPIB Bus

Explains the fundamentals of the GPIB instrument nomenclature and command statements.

Using the LAN to Control the Analyzer

Covers various methods to control the analyzer via LAN connection.

3 Programming Examples

Using Markers

Demonstrates how to use markers in a C programming example.

Saving Binary Trace Data in an ASCII File

Provides a C programming example for saving binary trace data to an ASCII file.

Using C Programming Over Socket LAN

Demonstrates simple socket programming using C for analyzer control.

4 Programming Command Cross References

Functional Sort of SCPI Commands

Organizes SCPI commands by function for easier reference.

5 Language Reference

SCPI Command Subsystems

Lists and describes various SCPI command subsystems available in the instrument.

Common IEEE Commands

Details commands specified in IEEE Standard 488.2 for instrument control.

6 Error Messages

Error Queues

Explains the instrument's history and SCPI remote interface error queues.

Error Message Descriptions

Provides descriptions for unnumbered, query, device-specific, execution, and command errors.

Related product manuals