![Rohde & Schwarz NRPM OTA Power Measurement Solution Manual Download Page 198](http://html.mh-extra.com/html/rohde-and-schwarz/nrpm-ota-power-measurement-solution/nrpm-ota-power-measurement-solution_manual_1477859198.webp)
Programming examples
R&S
®
NRPM
198
Mannual 1425.8663.02 ─ 08
print(Query(session, "SYST:ERR?");
// Check for static errors
print(Query(session, "SYST:SERR?");
//===================================================================
// Execute the list mode measurement
//
// resetting the event information by an initial readout
Query(session, "STAT:OPER:MEAS:EVEN?");
Query(session, "STAT:OPER:EVEN?");
// Start a measurement
WriteCmd(session, "INIT:IMM");
// Synchronize with end of measurement...
// (We will prematurely end this function if we do not get a trigger
// within approx. 30 seconds)
bool bMeasReady = FALSE;
unsigned int uiSleep = 10; // 10 ms
unsigned int uiWaitForTriggerTimeoutCount = 5000 / uiSleep;
unsigned short usEvent = 0;
while (!bMeasReady)
{
Query(pSensor->session, "STAT:OPER:MEAS:EVEN?", szReadBuff,
sizeof(szReadBuff));
usEvent = atoi(Query(session, "STAT:OPER:MEAS:EVEN?"));
bMeasReady = ((usEvent & 0x02) != 0);
if (bMeasReady)
break;
if (uiWaitForTriggerTimeoutCount > 0)
{
--uiWaitForTriggerTimeoutCount;
_sleep(10);
}
else
break;
}
// If no trigger burst has been recognized, we prematurely end here!
if (!bMeasReady)
return 0; // No results
// Fetch AVERAGE results
Performing measurements in list mode