![R&S NRP Series Скачать руководство пользователя страница 127](http://html1.mh-extra.com/html/rands/nrp-series/nrp-series_user-manual_774882127.webp)
Performing measurement tasks - programming examples
R&S
®
NRPxxA(N)
127
User Manual 1177.6017.02 ─ 08
{
# 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' )
10.3
Performing a buffered continuous average measure-
ment
This example, written in pseudo code, shows how to set up and execute a buffered
continuous average measurement.
//Select whether using
// 'BUS Trigger' --> true
// or 'EXT Trigger' --> false
bool bUseBUSTrigger = true;
// Use the first NRP series sensor which is found
if ( VI_SUCCESS == SENSOR.openFirstNrpSensor( "USB?::0X0AAD::?*::INSTR" ) )
{
//Start with a clean state
SENSOR.write( "*RST" );
// Auto Averaging OFF and set Average Count = 4
SENSOR.write( "SENS:AVER:COUN:AUTO OFF" );
SENSOR.write( "SENS:AVER:COUN 4" );
// Select the trigger source
if ( bUseBUSTrigger )
{
// We want to use '*TRG' to trigger a single physical measurement
SENSOR.write( "TRIG:SOUR BUS" );
}
else
{
// We get trigger pulses on the external input (SMB-type connector)
SENSOR.write( "TRIG:SOUR EXT2" );
}
// Auto-Trigger OFF
SENSOR.write( "TRIG:ATR:STAT OFF" );
// Configure a buffered measurement
Performing a buffered continuous average measurement