Technical data
Programming Examples 3
Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz 55
LAN Programming Interface Examples
The LAN programming examples in this section demonstrate the use of VXI-11 and Sockets
LAN to control the N8211A/N8212A.
To use these programming examples you must change references to the IP address and
hostname to match the IP address and hostname of your N8211A/N8212A.
• “VXI-11 Programming Using SICL and C++" on page 55
• “VXI-11 Programming Using VISA and C++" on page 58
• “Sockets LAN Programming and C" on page 60
• “Sockets LAN Programming Using Java" on page 91
• “Sockets LAN Programming Using PERL" on page 94
For additional LAN programming examples that work with user-data files, refer to:
“Save and Recall Instrument State Files" on page 133
VXI-11 Programming
The N8211A/N8212A supports the VXI-11 standard for instrument communication over the
LAN interface. Agilent IO Libraries support the VXI-11 standard and must be installed on
your computer before using the VXI-11 protocol. Refer to“Using VXI-11" on page 33 for
information on configuring and using the VXI-11 protocol.
The VXI-11 examples use TCPIP0 as the board address.
To communicate with the N8211A/N8212A over the LAN interface you must enable the
VXI-11 SCPI service. For more information, refer to “Configuring for VXI-11" on page 33.
VXI-11 Programming Using SICL and C++
The following program uses the VXI-11 protocol and SICL to control the N8211A/N8212A.
Before running this code, you must set up the interface using the Agilent IO Libraries IO
Config utility. vxisicl.cpp performs the following functions:
• sets N8211A/N8212A to 1 GHz CW frequency
• queries N8211A/N8212A for an ID string
• error checking
The following program example is available on the N8211A/N8212A Documentation
CD-ROM as vxisicl.cpp.
//****************************************************************************************
//
// PROGRAM NAME:vxisicl.cpp