Performing Measurement Tasks - Programming Examples
R&S
®
NRPxxTWG
97
User Manual 1178.8371.02 ─ 04
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
Chapter 5.1, "R&S NRP Toolkit"
Under Windows, these examples are installed under:
C:\ProgramData\Rohde-Schwarz\NRP-Toolkit-SDK\examples
Programming example for performing measurement tasks with the series power sen-
sors are given in the following chapter.
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
*RST
, the trigger system is set to
TRIGger:SOURce IMMediate
so that the
trigger system state changes to the measuring state via the waiting for trigger state.
After the measurement has been completed,
FETCh?
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 setup 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