Main.cpp Application Code Using VXI Plug&Play
Example Code
Agilent 81250 Parallel Bit Error Ratio Tester, Programming Reference, March 2006
349
// Save segments under a different name to the local setting
lStatus = hp81200_segmentSave(hInstrument, lCaptureInspector,
"LocalSegments\\prog_sample_capture");
errHandling(lStatus, "hp81200_segmentSave");
lStatus = hp81200_segmentSave(hInstrument, lErrMemInspector,
"LocalSegments\\prog_sample_errmem");
errHandling(lStatus, "hp81200_segmentSave");
// Export segments
// This is down now before the segments are closed, because
// they are now still in memory
lStatus = hp81200_segmentSaveToFile(hInstrument,
"c:\\temp\\prog_sample_capture.txt", SETTING_NAME,
"prog_sample_capture");
errHandling(lStatus, "hp81200_segmentSaveToFile");
lStatus = hp81200_segmentSaveToFile(hInstrument,
"c:\\temp\\prog_sample_errmem.txt", SETTING_NAME,
"prog_sample_errmem");
errHandling(lStatus, "hp81200_segmentSaveToFile");
// Close the segments!
lStatus = hp81200_segmentClose(hInstrument, lCaptureInspector);
errHandling(lStatus, "hp81200_segmentClose");
lStatus = hp81200_segmentClose(hInstrument, lErrMemInspector);
errHandling(lStatus, "hp81200_segmentClose");
}
return true;
}
int main()
{
ViStatus lStatus = 0;
ViBoolean bIDQuery = VI_FALSE;
ViBoolean bResetDevice = VI_FALSE;
ViString szSystemNameHp81200 = SYSTEM_NAME1;
ViString szApplicationName = "DSR";
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com