Technical data

88 Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
4 LAN, USB, and GPIB Interfaces
Communicating via Telnet and Sockets
"Telnet" on page 88
"Sockets" on page 88
Tel ne t
To open a connection to the oscilloscope via a telnet connection, use the
following syntax in a command prompt:
telnet Oscilloscope_IP_Address 5024
5024 is the port number and the name of the oscilloscope can be used in
place of the IP address if desired.
After typing the above command line, press enter and a SCPI command
line interface will open. You can then use this as you typically would use
a command line.
Sockets
Sockets can be used to connect to your oscilloscope on either a Windows
or Unix machine.
The sockets are located on port 5025 on your oscilloscope. Between ports
5024 and 5025, only six socket ports can be opened simultaneously. It is,
therefore, important that you use a proper close routine to close the
connection to the oscilloscope. If you forget this, the connection will
remain open and you may end up exceeding the limit of six socket ports.
Some basic commands used in communicating to your oscilloscope include:
The receive command is: recv
The send command is: send
Below is a programming example (for a Windows- based machine) for
opening and closing a connection to your oscilloscope via sockets.
#include <winsock2.h>
void main ()
{
WSADATA wsaData;
SOCKET mysocket = NULL;
char* ipAddress = "130.29.70.70";
const int ipPort = 5025;
//Initialize Winsock
int iResult = WSAStartup(MAKEWORD(2,2), &wsaData);
if(iResult != NO_ERROR)
{
printf("Error at WSAStartup()\\n");