Technical data
58 Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz
3 Programming Examples
VXI-11 Programming Using VISA and C++
The following program uses the VXI-11 protocol and the VISA library to control the
N8211A/N8212A. The N8211A/N8212A is set to a –5 dBm power level and queried for its
ID string. Before running this code, you must set up the interface using the Agilent IO
Libraries IO Config utility. vxivisa.cpp performs the following functions:
• sets N8211A/N8212A to a –5 dBm power level
• queries N8211A/N8212A for an ID string
• error checking
The following program example is available on the N8211A/N8212A documentation
CD-ROM as vxivisa.cpp.
//****************************************************************************************
// PROGRAM FILE NAME:vxivisa.cpp
// Sample test program using the VISA libraries and the VXI-11 protocol
//
// NOTE: You must have the Agilent Libraries installed on your computer to run
// this program
//
// PROGRAM DESCRIPTION:This example uses the VXI-11 protocol and VISA to query
// the N8211A/N8212A for its ID string. The ID string is then printed to the
// screen. Next the N8211A/N8212A is set for a -5 dBm power level and then
// queried for the power level. The power level is printed to the screen.
//
// IMPORTANT: Set up the LAN Client using the IO Config utility
//
//****************************************************************************************
#include <visa.h>
#include <stdio.h>
#include "StdAfx.h"
#include <stdlib.h>
#include <conio.h>