EasyManuals Logo

R&S NRP Series User Manual

R&S NRP Series
185 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 #149 background imageLoading...
Page #149 background image
Performing measurement tasks - programming examples
R&S
®
NRPxxS(N)
149User Manual 1177.5079.02 ─ 15
10.5 Trace measurement with synchronization to measure-
ment complete
This example, written in pseudo code, shows how to set up and execute a trace mea-
surement using a non-blocking technique.
The advantage of using the FETCH? command (as shown in the previous example) is,
that FETCH? waits (blocks) until a measurement result is available. However, this
behavior can lead to situations where an application blocks for a longer time (until time-
out). For example, if a trigger is missing and thus no results are ever becoming availa-
ble.
For certain applications, especially interactive ones, it is not the desired behavior that
you have to wait until a (probably long) timeout occurs. In these cases, start a mea-
surement and then enter a loop to poll the sensor until the measurement is ready and
the results can safely be retrieved. For such applications, it is recommended to use the
status system of the sensor to find out whether the measurement is ready. The advant-
age of this approach is that the polling loop can be exited/canceled at any time and the
application stays operable (i. e. does not block).
// basic setup, similar to the previous example
write( "*RST" );
write( "SENS:FUNC \"XTIM:POW\"" );
write( "SENS:FREQ 1.8e9" );
write( "SENS:TRAC:POIN 500" );
write( "SENS:TRAC:TIME 20e-3" );
write( "TRIG:SOUR INT" );
write( "TRIG:SLOP POS" );
write( "TRIG:DTIM 0.001" );
write( "TRIG:HYST 0.1" );
write( "TRIG:LEV 30e-6" );
write( "SENS:TRAC:AVER:COUN 8" );
write( "SENS:TRAC:AVER:STAT ON" );
// configuring the event system to recognize the
// end of measurement (i.e. a negative transition
// of bit 1 in the meas operation register)
write( "STAT:OPER:MEAS:NTR 2" );
write( "STAT:OPER:MEAS:PTR 0" );
// resetting the event information by an initial readout
int iEvent = 0;
query( "STAT:OPER:MEAS:EVEN?", &iEvent );
// Now starting the measurement
write( "INIT:IMM" );
bool bMeasReady = false;
// poll until measurement is ready...
Trace measurement with synchronization to measurement complete

Table of Contents

Other manuals for R&S NRP Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the R&S NRP Series and is the answer not in the manual?

R&S NRP Series Specifications

General IconGeneral
Product TypePower Sensor
Connector TypeSMA, 3.5 mm, 2.4 mm
InterfaceUSB, LAN
Storage Temperature-40°C to +70 °C
DimensionsDependent on model
WeightDependent on model
CompatibilityR&S Instruments
TypeDiode

Related product manuals