EasyManuals Logo

Keysight Technologies N5173B EXG Programming Guide

Keysight Technologies N5173B EXG
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 #100 background imageLoading...
Page #100 background image
100 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Programming Examples
GPIB Programming Interface Examples
stat = viPrintf(inst, "SWEEP:DWELL %e\n", dwell);
// setup number of points
stat = viPrintf(inst, "SWEEP:POINTS %d\n", npoints);
// set interface timeout to double the expected sweep time
// sweep takes (~15ms + dwell) per point * number of points
// the timeout should not be shorter then the sweep, set it
// longer
long timeoutMS = long(2*npoints*(.015+dwell)*1000);
// set the VISA timeout
stat = viSetAttribute(inst, VI_ATTR_TMO_VALUE, timeoutMS);
// set continuous trigger mode off
stat = viPrintf(inst, "INIT:CONT OFF\n");
// turn list sweep on
stat = viPrintf(inst, "FREQ:MODE LIST\n");
int sweepNo = 0;
while(intCounter>0 )
{
// start the sweep (initialize)
stat = viPrintf(inst, "INIT\n");
printf("Sweep %d started\n",++sweepNo);
// wait for the sweep completion with *OPC?
int res ;
stat = viPrintf(inst, "*OPC?\n");
stat = viScanf(inst, "%d", &res);
// handle possible errors here (most likely a timeout)
// err_handler( inst, stat );
puts("Sweep ended");
// delay before sending next INIT since instrument
// may not be ready to receive it yet
Sleep(15);

Table of Contents

Other manuals for Keysight Technologies N5173B EXG

Questions and Answers:

Question and Answer IconNeed help?

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

Keysight Technologies N5173B EXG Specifications

General IconGeneral
BrandKeysight Technologies
ModelN5173B EXG
CategoryPortable Generator
LanguageEnglish

Related product manuals