Main.cpp Application Code Using VXI Plug&Play
Example Code
Agilent 81250 Parallel Bit Error Ratio Tester, Programming Reference, March 2006
341
// Determine number of modules within this clock group
lStatus = hp81200_nrOfModules_Q(hInstrument, c,
&lModuleCount);
errHandling(lStatus, "hp81200_nrOfModules_Q");
// Loop over all modules
for (ViInt32 m = 1; m <= lModuleCount; m++)
{
ViInt32 lConnectorCount;
lStatus = hp81200_nrOfConnectors_Q(hInstrument, c, m,
&lConnectorCount);
errHandling(lStatus, "hp81200_nrOfConnectors_Q");
// Loop over all connectors
for (ViInt32 co = 1; co <= lConnectorCount; co++)
{
ViChar szConnectorType[16];
lStatus = hp81200_typeOfConnector_Q(hInstrument, c, m,
co,szConnectorType);
errHandling(lStatus, "hp81200_typeOfConnector_Q");
// Put in analyzer or generator list
sprintf(szParam, "%02d%02d%03d", c, m, co);
if (strcmp(szConnectorType, "ANALYZER") == 0)
{
// Analyzer
if (strcmp(szAnalyzers, "") != 0)
strcat(szAnalyzers, ",");
strcat(szAnalyzers, szParam);
lAnalyze+;
}
else
{
// Generator
if (strcmp(szGenerators, "") != 0)
strcat(szGenerators, ",");
strcat(szGenerators, szParam);
lGenerat+;
}
}
}
}
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com