5-116 Example Program
SR780 Network Signal Analyzer
// ****** print a few points from the spectrum
for (i=37; i<44; i++) {printf ("bin %d = %f dBVpk\n", i, rxBuff[i]);}
printf ("\n");
/* ***************************************************** */
/* ****** Turn on limit testing ****** */
TxSr780 ("LCLR 0");
//first clear any existing limits for DisplayA
TxSr780 ("LMAX 0,2");
//initialize 2 segments
TxSr780 ("LSEG 0,0,0,12.032E3,-90.0,102.4E3,-90.0");
//upper segment
TxSr780 ("LSEG 0,1,0,1.28E3,-90.0,8.96E3,-90.0");
//upper segment
TxSr780 ("LTST 0,1");
//turn on testing
// ****** take a new measurement
printf ("Avg start...");
WaitAvg ();
printf ("done\n");
GetSr780 ("LFAL?0");
//read limit test result
printf ("Limit test = ");
if (atoi(recv)==0) printf ("pass"); else printf ("fail");
printf ("\n\n");
// ****** clean up
TxSr780 ("LCLR 0");
//clear limits, turn off testing
TxSr780 ("FAVG 2,0");
//turn avg off
/* ***************************************************** */
/* ****** Load the arbitrary waveform buffer ****** */
// construct a normalized ramp of 2048 points
// each point is a 4 byte IEEE float between -1.0 and +1.0
for (i=0; i<2048; i++) { txBuff[i] = ((float) i)/2048.F; }
//This section needs to be modified for your GPIB interface
printf ("Loading Arb buffer...");
TxGpib (sr780,"ALOD? 2048");
//use TxGpib so we don't wait for IFC
//SR780 will return a binary 1 to acknowledge
transmit("mla talk 10",&status);
//make SR780 a talker, pc a listener
rarray (&ack, 4, &length, &status);
//binary read 4 bytes (long int)
//return value should be 1
printf ("%d bytes recvd [val=%ld]...",length,ack);
transmit("mta listen 10",&status);
//make SR780 a listener, pc a talker
tarray(txBuff,8192,1,&status);
//binary transfer of 8192 bytes to SR780
//(2048 points x 4 bytes/point)
//set EOI with last byte
WaitIFC ();
//serial poll until IFC set, ok to continue
printf ("done\n");
TxSr780 ("STYP 3");
//change source type to Arb
TxSr780 ("I1RG 4; I2RG 4");
//increase the input ranges
TxSr780 ("FSPN 2,3.2E3");
//narrow the span to display the spectrum
GetSpace ();
//pause to look
/* ***************************************************** */
/* ****** Switch to Octave Analysis ****** */
TxSr780 ("STYP 2");
//switch to Noise source
TxSr780 ("NTYP 2");
//choose Pink noise
TxSr780 ("MGRP 2,1");
//switch to Octave measurement group
Содержание SR780
Страница 4: ...ii SR780 Network Signal Analyzer ...
Страница 10: ...viii SR780 Network Signal Analyzer ...
Страница 18: ...1 2 Getting Started SR780 Network Signal Analyzer ...
Страница 39: ...Triggering and the Time Record 1 23 SR780 Network Signal Analyzer ...
Страница 40: ...1 24 Triggering and the Time Record SR780 Network Signal Analyzer ...
Страница 58: ...1 42 Waterfall Display SR780 Network Signal Analyzer ...
Страница 70: ...1 54 Saving and Recalling SR780 Network Signal Analyzer ...
Страница 167: ...Status Indicators 3 21 SR780 Network Signal Analyzer ...
Страница 188: ...4 6 Menus SR780 Network Signal Analyzer ...
Страница 193: ...FFT Frequency Menu 4 11 SR780 Network Signal Analyzer Command FEND d f ...
Страница 232: ......
Страница 236: ...4 54 Source Menu SR780 Network Signal Analyzer Command STYP i ...
Страница 266: ...4 84 Playback Input Menu SR780 Network Signal Analyzer ...
Страница 272: ...4 90 Trigger Menu SR780 Network Signal Analyzer ...
Страница 288: ...4 106 Swept Sine Average Menu SR780 Network Signal Analyzer ...
Страница 326: ...144 Exceedance Statistics Menu SR780 Network Signal Analyzer ...
Страница 352: ...4 170 Output Menu SR780 Network Signal Analyzer ...
Страница 478: ......