EasyManua.ls Logo

R&S NRP Series - Page 144

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
Loading...
Performing measurement tasks - programming examples
R&S
®
NRPxxS(N)
144User Manual 1177.5079.02 ─ 15
write( '*RST' )
# Enable fast unchopped continuous average measurement
write( 'SENS:POW:AVG:FAST ON' )
# Define output format (float)
write( 'FORM:DATA REAL,32' )
# Select the trigger condition. Immediate means, that the sensor
# starts measuring when the measurement is started.
write( 'TRIG:SOUR IMM' )
# Select the maximum possible buffer size
BUFFER_SIZE_MAX = query( 'BUFF:SIZE? MAX' )
write( 'BUFF:SIZE ' + BUFFER_SIZE_MAX )
write( 'BUFF:STAT ON' )
# In this setting, trigger count needs to be the same as buffer size
write( 'TRIG:COUN ' + BUFFER_SIZE_MAX )
# Smallest aperture window is 10 us, resulting in 100000 meas/sec
write( 'SENS:POW:AVG:APER 10e-6' )
# Any errors occurred?
query( 'SYST:ERR:ALL?' )
# Start the configured (= untriggered) continuous measurement
write( 'INIT:CONT ON' )
# Let the sensor measure for 5 seconds
timeEnd = time.now() + 5.0
numData = 0
while (time.now() < timeEnd )
{
# If there is any result in the buffer --> read it
if ( query( 'BUFF:COUN?') > 0 )
{
result = queryBinary( 'BUFF:DATA?' )
numData = numData + result.size
}
}
# Stop the continuous measurement
utilDeviceIO.DeviceWrite( instrument, 'INIT:CONT OFF' )
Performing the fastest measurement in continuous average mode

Table of Contents

Other manuals for R&S NRP Series

Related product manuals