![Ronde & Schwarz 1424.6721K02 Скачать руководство пользователя страница 111](http://html1.mh-extra.com/html/ronde-and-schwarz/1424-6721k02/1424-6721k02_user-manual_1484980111.webp)
Performing measurement tasks - programming examples
R&S
®
NRP18S-xx
111
User Manual 1178.3686.02 ─ 07
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 = n result.size
}
}
# Stop the continuous measurement
utilDeviceIO.DeviceWrite( instrument, 'INIT:CONT OFF' )
Performing the fastest measurement in continuous average mode