EasyManuals Logo

Keysight Technologies N5172B EXG Programming Guide

Keysight Technologies N5172B EXG
398 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 #152 background imageLoading...
Page #152 background image
152 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Programming Examples
LAN Programming Interface Examples
BufferedWriter out =
new BufferedWriter(
new OutputStreamWriter(t.getOutputStream()));
BufferedReader in =
new BufferedReader(
new InputStreamReader(t.getInputStream()));
System.out.println("Setting frequency to 1 GHz...");
out.write("freq 1GHz\n"); // Sets
frequency
out.flush();
System.out.println("Waiting for source to settle...");
out.write("*opc?\n"); // Waits for
completion
out.flush();
String opcResponse = in.readLine();
if (!opcResponse.equals("1"))
{
System.err.println("Invalid response to '*OPC?'!");
System.exit(1);
}
System.out.println("Retrieving instrument ID...");
out.write("*idn?\n"); // Querys the id
string
out.flush();
String idnResponse = in.readLine(); // Reads the id
string
// Prints the id string
System.out.println("Instrument ID: " + idnResponse);
}
catch (IOException e)
{
System.out.println("Error" + e);
}
}
}

Table of Contents

Other manuals for Keysight Technologies N5172B EXG

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keysight Technologies N5172B EXG and is the answer not in the manual?

Keysight Technologies N5172B EXG Specifications

General IconGeneral
BrandKeysight Technologies
ModelN5172B EXG
CategoryPortable Generator
LanguageEnglish

Related product manuals