EasyManuals Logo

Keysight Technologies N5166B CXG Programming Guide

Keysight Technologies N5166B CXG
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 #151 background imageLoading...
Page #151 background image
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 151
Programming Examples
LAN Programming Interface Examples
4. Compile the program. At the command prompt type: javac
ScpiSockTest.java.
The directory path for the Java compiler must be specified. For example:
C:\>jdk1.3.0_02\bin\javac ScpiSockTest.java
5. Run the program by typing java ScpiSockTest at the command
prompt.
6. Type exit at the command prompt to end the program.
Generating a CW Signal Using Java
The following program example is available on the signal generator
Documentation CD-ROM as javaex.txt.
//*****************************************************************
// PROGRAM NAME: javaex.txt
// Sample
java program to talk to the signal generator via SCPI-over-sockets
// This program requires Java version 1.1 or later.
// Save this code as ScpiSockTest.java
// Compile by typing: javac ScpiSockTest.java
// Run by typing: java ScpiSockTest
// The signal generator is set for 1 GHz and queried for its id
string
//*****************************************************************
import java.io.*;
import java.net.*;
class ScpiSockTest
{
public static void main(String[] args)
{
String instrumentName = "xxxxx"; // Put instrument
hostname here
try
{
Socket t = new Socket(instrumentName,5025); // Connect to
instrument
//
Setup read/write mechanism

Table of Contents

Other manuals for Keysight Technologies N5166B CXG

Questions and Answers:

Question and Answer IconNeed help?

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

Keysight Technologies N5166B CXG Specifications

General IconGeneral
BrandKeysight Technologies
ModelN5166B CXG
CategoryPortable Generator
LanguageEnglish

Related product manuals