![R&S 1424.6721.02 Скачать руководство пользователя страница 121](http://html1.mh-extra.com/html/rands/1424-6721-02/1424-6721-02_user-manual_774880121.webp)
Performing Measurement Tasks - Programming Examples
R&S
®
NRP18S-xx
121
User Manual 1178.3686.02 ─ 05
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