EasyManua.ls Logo

R&S NRP P Series - Page 124

R&S NRP P Series
152 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Performing measurement tasks - programming examples
R&S
®
NRPxxP
124User Manual 1179.5760.02 ─ 02
write( "TRIG:HYST 0.1" );
write( "TRIG:LEV 30e-6" );
write( "SENS:TRAC:AVER:COUN 8" );
write( "SENS:TRAC:AVER:STAT ON" );
// configuring the event system to recognize the
// end of measurement (i.e. a negative transition
// of bit 1 in the meas operation register)
write( "STAT:OPER:MEAS:NTR 2" );
write( "STAT:OPER:MEAS:PTR 0" );
// resetting the event information by an initial readout
int iEvent = 0;
query( "STAT:OPER:MEAS:EVEN?", &iEvent );
// Now starting the measurement
write( "INIT:IMM" );
bool bMeasReady = false;
// poll until measurement is ready...
// (this loop could also check for cancel-requests
// from the user or other break conditions)
while ( ! bMeasReady )
{
query( "STAT:OPER:MEAS:EVEN?", &iEvent );
bMeasReady = ((iEvent & 0x02) != 0);
if ( ! bMeasReady )
sleep( 1 );
}
if ( bMeasReady )
{
query( "SENS:TRAC:DATA?", bufResult );
// further process the result in 'bufResult'...
// ::
// ::
}
Trace measurement with synchronization to measurement complete

Table of Contents

Related product manuals