![Agilent Technologies 81250 Скачать руководство пользователя страница 359](http://html.mh-extra.com/html/agilent-technologies/81250/81250_system-programming-manual-and-scpi-reference_2868601359.webp)
Example Code
Main.cpp Application Code
358
Agilent 81250 Parallel Bit Error Ratio Tester, Programming Reference, March 2006
{
// query for type
sprintf(aCmd, “conf:cgr%d:mod%d:conn%d:type?”, c, m,
co);
h.Call(aCmd, aResult);
// put to analyzer or generator list
sprintf(aBuf, “%02d%02d%03d”, c, m, co);
if (strcmp(aResult, “ANALYZER”) == 0)
{
if (strcmp(aAnalyzers, ““) != 0)
strcat(aAnalyzers, “,”);
strcat(aAnalyzers, aBuf);
a= 1;
}
else
{
if (strcmp(aGenerators, ““) != 0)
strcat(aGenerators, “,”);
strcat(aGenerators, aBuf);
a= 1;
}
}
}
}
// -----------------------------------------------------
// now connect analyzers and generators to one port each
// -----------------------------------------------------
if (aGenCnt > 0)
{
sprintf(aCmd, “sgen:pdat:app ‘INPUT_PORT’,%d,’input’”,
aGenCnt);
h.Call(aCmd);
aGenPort = 1;
sprintf(aCmd, “sgen:conn:pdat%d:term1 (@%s)”, aGenPort,
aGenerators);
h.Call(aCmd);
}
if (aAnaCnt > 0)
{
sprintf(aCmd, “sgen:pdat:app ‘OUTPUT_PORT’,%d,’output’”,
aAnaCnt);
h.Call(aCmd);
aAnaPort = aG 1;
sprintf(aCmd, “sgen:conn:pdat%d:term1 (@%s)”, aAnaPort,
aAnalyzers);
h.Call(aCmd);
}
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com