Performing measurement tasks - programming examples
R&S
®
NRPxxTWG
91
User Manual 1178.8371.02 ─ 08
8
Performing measurement tasks - program-
ming examples
If you install the optional software development kit (SDK) of the R&S
NRP Toolkit, pro-
gramming examples are provided. See
Under Windows, these examples are installed under:
C:\ProgramData\Rohde-Schwarz\NRP-Toolkit-SDK\examples
This chapter gives programming examples for measurement tasks performed with the
series power sensors.
8.1
Performing the simplest measurement
The simplest way to obtain a result is to use the following sequence of commands:
*RST
INITiate
FETCh?
The
*RST
sets the continuous average mode.
INITiate
initiates the measurement.
After
, the trigger system is set to
IMMediate
. That means
the power sensor starts measuring when the measurement is started without waiting
for a trigger condition.
After the measurement has been completed,
delivers the result to the output queue from which it can be fetched.
8.2
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" );
Performing a buffered continuous average measurement