R&S NRP18S Series User Manual page 124

High-power three-path diode power sensors
Hide thumbs Also See for NRP18S Series:
Table of Contents

Advertisement

®
R&S
NRP18S-xx
// Buffer size is randomly selected to 17
SENSOR.write( "SENS:BUFF:SIZE 17" );
SENSOR.write( "SENS:BUFF:STAT ON" );
SENSOR.write( "TRIG:COUN 17" );
// Read out all errors / Clear error queue
SENSOR.query( "SYST:ERR:ALL?", szBuf, sizeof( szBuf ) );
printf( szBuf );
// Start a 'single' buffered measurement
// Since 17 trigger-counts have been configured,
// the 'single' buffered measurement, which becomes
// initiated by INIT:IMM, is not over until
// 17 physical measurements have been triggered
SENSOR.write( "INIT:IMM" );
// The end of a physical measurement can be recognized
// by a transistion to 'NOT MEASURING' which is a
// negative transistion on bit 1
SENSOR.write( "STAT:OPER:MEAS:NTR 2" );
SENSOR.write( "STAT:OPER:MEAS:PTR 0" );
// Collect 17 physical measurements
for ( int i = 0; i < 17; i++ )
{
// As a pre-condition: clear the event register by reading it
int iDummy;
SENSOR.query( "STAT:OPER:MEAS:EVEN?", &iDummy );
// Trigger a single physical measurement; either by '*TRG'
// command or by an externally supplied pulse on the SMB-type connector
if ( bUseBUSTrigger )
SENSOR.write( "*TRG" );
// Wait until the measurement is done
int iMeasEvent = 0;
while ( iMeasEvent != 2 )
{
SENSOR.query( "STAT:OPER:MEAS:EVEN?", &iMeasEvent );
iMeasEvent &= 2;
}
printf( "Triggered!\n" );
}
// All 17 physical measurement have been executed.
// That means, buffer is full and can be read
SENSOR.query( "FETCH?", szBuf, sizeof( szBuf ) );
printf( szBuf );
User Manual 1178.3686.02 ─ 05
Performing Measurement Tasks - Programming Examples
Performing a Buffered Continuous Average Measurement
124

Advertisement

Table of Contents
loading

Table of Contents