Technical data

Table Of Contents
94 Agilent Infiniium 9000 Series Oscilloscopes Programmer's Reference
4 LAN, USB, and GPIB Interfaces
Communicating Over the LAN Interface
The device address used to send commands and receive data using the
LAN interface is located in the Remote Setup dialog box (Utilities > Remote
Setup).
The following C example program shows how to communicate with the
oscilloscope using the LAN interface and the Agilent Standard Instrument
Control Library (SICL).
#include <sicl.h>
#define BUFFER_SIZE 1024
main()
{
INST Bus;
int reason;
unsigned long actualcnt;
char buffer[ BUFFER_SIZE ];
/* Open the LAN interface */
Bus = iopen( "lan[130.29.71.143]:hpib7,7" );
if(Bus!=0){
/* Bus timeout set to 20 seconds */
itimeout( Bus, 20000 );
/* Clear the interface */
iclear( Bus );
/* Query and print the oscilloscope's Id */
iwrite( Bus, "*IDN?", 5, 1, &actualcnt );
iread( Bus, buffer, BUFFER_SIZE, &reason, &actualcnt );
buffer[ actualcnt - 1 ] = 0;
printf( "%s\\n", buffer );
iclose( Bus );
}
}