
160
N9310A User’s Guide
6
Subsystem Command Reference
Example 4 - Generating an continuous RF Sweep
Assume you wish to initiate an RF sweep, with the following
characters:
•
RF sweeps from 1 GHz to 2 GHz
•
Sweeps across 90 points linearly
•
Dwells for 20 ms for each point
•
Repeats sweep continuously
•
Triggers immediately and continuously over all points
******************************************************
/* Setup N9310A to generate an continuous RF
output.
*/
int main(void)
{
status = viOpenDefaultRM (&defaultRM);
if (status != VI_SUCCESS) return
–
1;
status = viOpen (defaultRM,
“USB0::2391::8216::0115000001::0::INSTR”, VI_NULL,
VI_NULL, &INST_N9310A);
if (status != VI_SUCCESS) return
–
1;
/* Configure an RF sweep. */
status = viWrite (inst_N9310A, “*RST\n”,
StringLength(“*RST\n”), &rcount);
status = viWrite (inst_N9310A, “SWE:RF:STAR 1 GHz\
n”, StringLength(“SWE:RF:STAR 1 GHz\n”), &rcount);
status = viWrite (inst_N9310A, “SWE:RF:STOP 2 GHz\
n”, StringLength(“SWE:RF:STOP 2 GHz\n”), &rcount);
status = viWrite (inst_N9310A, “SWE:STEP:POIN 90\
n”, StringLength(“SWE:STEP:POIN 90\n”), &rcount);
status = viWrite (inst_N9310A, “SWE:STEP:DWEL 20
ms\n”, StringLength(“SWE:STEP:DWEL 20 ms\n”),
&rcount);
/* Enable RF sweep & initiate the RF sweep. */
status = viWrite (inst_N9310A, “RFO:STAT ON\n”,
StringLength(“RFO:STAT ON\n”), &rcount);
Summary of Contents for Keysight N9310A
Page 34: ...28 N9310A User s Guide 2 Getting Started ...
Page 58: ...52 N9310A User s Guide 3 Using Functions ...
Page 94: ...88 N9310A User s Guide 5 Programming Fundamentals 5 Select Display a list ...
Page 106: ...100 N9310A User s Guide 5 Programming Fundamentals ...
Page 168: ...162 N9310A User s Guide 6 Subsystem Command Reference ...
Page 188: ... Agilent Technologies Inc 2006 Printed in China June 2006 N9310 90001 N9310 90001 ...