Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 75
Programming Examples
GPIB Programming Interface Examples
cout <<"annunciator R should appear on the signal generator
display"<<endl;
return 0;
}
Interface Check for GPIB Using VISA and C
This program uses VISA library functions and the C language to communicate
with the signal generator. The program verifies that the GPIB connections and
interface are functional. Launch Microsoft Visual C++ 6.0, add the required
files, and enter the following code into your .cpp source file.
visaex1.cpp
performs the following functions:
— verifies the GPIB connections and interface are functional
— switches the signal generator into remote operation mode
The following program example is available on the signal generator
Documentation CD-ROM as
visaex1.cpp
.
//*****************************************************************
// PROGRAM NAME:visaex1.cpp
//
// PROGRAM DESCRIPTION:This example program verifies that the GPIB
connections and
// and interface are functional.
// Turn signal generator power off then on and then run the program
//
//*****************************************************************
#include <visa.h>
#include <stdio.h>
#include "StdAfx.h"
#include <stdlib.h>
void main ()
{
ViSession defaultRM, vi; // Declares a variable of type
ViSession
// for instrument communication
Summary of Contents for X-Series
Page 4: ...4 ...
Page 10: ...10 Contents ...