Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 91
Programming Examples
GPIB Programming Interface Examples
printf("\n");
viClear(vi);
viClose(vi);
viClose(defaultRM);
}
Generating an Externally Applied AC-Coupled FM Signal Using VISA
and C
In this example, the VISA library is used to generate an ac-coupled FM signal
at a carrier frequency of 700 MHz, a power level of
−
2.5 dBm, and a deviation
of 20 kHz. Before running the program:
— Connect the output of a modulating signal source to the signal generator’s
EXT 2 input connector.
— Set the modulation signal source for the desired FM characteristics.
Launch Microsoft Visual C++ 6.0, add the required files, and enter the code into
your .cpp source file.
visaex5.cpp
performs the following functions:
— error checking
— resets the signal generator
— sets up the EXT 2 connector on the signal generator for FM
— sets up FM path 2 coupling to AC
— sets up FM path 2 deviation to 20 kHz
— sets carrier frequency to 700 MHz
— sets the power level to -2.5 dBm
— turns on frequency modulation and RF output
The following program example is available on the signal generator
Documentation CD-ROM as
visaex5.cpp
.
//*****************************************************************
// PROGRAM FILE NAME:visaex5.cpp
//
// PROGRAM DESCRIPTION:This example sets the signal generator FM
source to External 2,
// coupling to AC, deviation to 20 kHZ, carrier frequency to 700 MHz
and the power level
// to -2.5 dBm. The RF state is set to on.
//
//*****************************************************************
#include <visa.h>
#include "StdAfx.h"
Summary of Contents for X-Series
Page 4: ...4 ...
Page 10: ...10 Contents ...