EasyManuals Logo

Keysight Technologies N5166B CXG Programming Guide

Keysight Technologies N5166B CXG
398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #112 background imageLoading...
Page #112 background image
112 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Programming Examples
GPIB Programming Interface Examples
viStatus=viOpen(defaultRM, "GPIB::19::INSTR", VI_NULL, VI_NULL,
&vi);
if(viStatus){ // If problems then prompt user
printf("ERROR: Could not open communication with
instrument\n");
printf("\n");
return -1;}
viClear(vi); // Clears the signal generator
viPrintf(vi, "*RST\n"); // Resets signal generator
// Print program header and
information
printf("** End of Sweep Service Request **\n");
printf("\n");
printf("The signal generator will be set up for a step sweep mode
operation.\n");
printf("An ’*’ will be printed while the instrument is sweeping.
The end of \n");
printf("sweep will be indicated by an SRQ on the GPIB and the
program will end.\n");
printf("\n");
printf("Press Enter to continue\n");
printf("\n");
getch();
viPrintf(vi, "*CLS\n");// Clears signal generator status byte
viPrintf(vi, "STAT:OPER:NTR 8\n");// Sets the Operation Status
Group // Negative Transition Filter to indicate a // negative
transition in Bit 3 (Sweeping)
// which will set a corresponding event in // the Operation
Event Register. This occurs // at the end of a sweep.
viPrintf(vi, "STAT:OPER:PTR 0\n");// Sets the Operation Status
Group // Positive Transition Filter so that no
// positive transition on Bit 3 affects the // Operation Event
Register. The positive // transition occurs at the start of a
sweep.
viPrintf(vi, "STAT:OPER:ENAB 8\n");// Enables Operation Status
Event Bit 3 // to report the event to Status Byte // Register
Summary Bit 7.

Table of Contents

Other manuals for Keysight Technologies N5166B CXG

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keysight Technologies N5166B CXG and is the answer not in the manual?

Keysight Technologies N5166B CXG Specifications

General IconGeneral
BrandKeysight Technologies
ModelN5166B CXG
CategoryPortable Generator
LanguageEnglish

Related product manuals