LAN Interface Supplement 6-3
Controlling the Analyzer via the LAN
Using Socket Programming to Control Your Analyzer
Using Socket Programming to Control
Your Analyzer
Your analyzer implements a sockets applications programming interface
(API) compatible with Berkeley sockets, Winsock, and other standard
sockets APIs. You can write programs using sockets to control your
analyzer by sending SCPI commands to a socket connection you create in
your program. Refer to “Controlling the Analyzer with a C Program” on
page 6-9 and “Controlling the Analyzer with a Java™ Applet” on page
6-33 for example programs using sockets to control the analyzer.
Setting Up Your Analyzer for Socket
Programming
Before you can use socket programming, you must set up your analyzer
by setting a socket port number. Follow the steps below to set up a port
number for socket programming:
1. Press
.
2. Enter the port number that you will use for your socket connection to
the analyzer.
Port 5025 is set up for you as a default value.
NOTE Ports 1000 and below are reserved for common services such as Telnet,
FTP, etc. It is good practice to select a port number greater than 2001 for
the custom socket services you write. Consult your system administrator
to find out what ports are available for your use.
If you would like to select or restore the default value for the
, press
NOTE All of the example programs in this chapter that use socket
programming use port 5025. If you change the port setting in your
analyzer, and you use the example programs, be sure to change the port
number in the programs source listings also.
SYSTEM OPTIONS
LAN
SCPI Sock. Setup
Socket Port No.
Socket Port No.
SYSTEM OPTIONS
LAN
SCPI Sock. Setup
Restore Defaults