![background image](http://html1.mh-extra.com/html/rands/nrpm/nrpm_user-manual_3219371176.webp)
Programming examples
R&S
®
NRPM
176
User Manual 1425.8663.02 ─ 07
double dMeasurementPeriod = 2.0e-3; // 2 ms
double arFreqList[] = { 24.0e9, 24.5e9, 25.0e9,
25.5e9, 26.0e9, 26.5e9,
27.0e9, 27.5e9, 28.0e9 };
session = OpenfirstNRPM3onUSBorNetwork();
//===================================================================
// *RST and *IDN?
WriteCmd(session, "*RST");
printf( Query(session, "*IDN?");
//===================================================================
// Use only those antennas which are physically connected
for (size_t nAntenna = 0; nAntenna < 3; n+)
{
strCmd = "SENS:CHAN" + str(1+nAntenna) + ":PRES?";
strRead = Query(session, strCmd);
if ( atoi(strRead) != 0 )
strCmd = "SENS:CHAN" + str(1+nAntenna) + ":ENAB ON";
else
strCmd = "SENS:CHAN" + str(1+nAntenna) + ":ENAB OFF";
WriteCmd(session, szCmd);
}
//===================================================================
// Prepare Event Registers to recognize a finished measurement
//
// We want to detect the End of a Measurement;
// This is reflected by a negative transition of the
// 'Sensor Measuring' bit (bit value = 2)
WriteCmd(session, "STAT:OPER:MEAS:PTR 0");
WriteCmd(session, "STAT:OPER:MEAS:NTR 2");
WriteCmd(session, "STAT:OPER:MEAS:ENAB 2");
// We want to detect the MEAS summary bit (as a
// results of the finished measurement as defined
// above). This is reflected by a positive transition
// 'MEAS summary' bit in the Operation Status Register
// (bit value = 16)
WriteCmd(session, "STAT:OPER:PTR 16");
WriteCmd(session, "STAT:OPER:NTR 0");
Performing measurements in list mode