EasyManuals Logo

Copper Mountain Technologies S2 Series User Manual

Copper Mountain Technologies S2 Series
428 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #424 background imageLoading...
Page #424 background image
424
}
status = viOpenDefaultRM(&defaultRM);
if (status < VI_SUCCESS)
{
printf("Can't initialize VISA\n");
return –1;
}
status = viOpen(defaultRM, argv[1], VI_NULL, VI_NULL, &instr);
if (status < VI_SUCCESS)
{
printf("Can't open VISA address: %s\n", argv[1]);
return –1;
}
//
// Set the answer timeout
//
viSetAttribute(instr, VI_ATTR_TMO_VALUE, 5000);
//
// Enable the terminal character
//
viSetAttribute(instr, VI_ATTR_TERMCHAR_EN, VI_TRUE);
viSetAttribute(instr, VI_ATTR_TERMCHAR, '\n');
//
// Read ID string from Analyzer
//
viPrintf(instr, "*IDN?\n");
viRead(instr, buffer, sizeof(buffer), &retCount);
printf("*IDN? Returned %d bytes: %.*s\n\n", retCount, retCount, buffer);
//
// Set up the Analyzer
//
viPrintf(instr, "SYST:PRES\n");
viPrintf(instr, "SENS:SWE:POIN %d\n", NOP);
viPrintf(instr, "CALC:PAR1:DEF S21\n");
viPrintf(instr, "CALC:PAR1:SEL\n");
viPrintf(instr, "CALC:FORM MLOG\n");
viPrintf(instr, "SENS:BAND 10\n");
//
// Trigger measurement and wait for completion
//
viPrintf(instr, ":TRIG:SOUR BUS\n");
viPrintf(instr, ":TRIG:SING\n");
viQueryf(instr, "*OPC?\n", "%d", &temp);
//
// Read out measurement data
//
retCount = maxCnt * 2;
viQueryf(instr, "CALC:DATA:FDAT?\n", "%,#lf", &retCount, Data);
retCount = maxCnt;
viQueryf(instr, "SENS:FREQ:DATA?\n", "%,#lf", &retCount, Freq);
//
// Display measurement data
//

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Copper Mountain Technologies S2 Series and is the answer not in the manual?

Copper Mountain Technologies S2 Series Specifications

General IconGeneral
BrandCopper Mountain Technologies
ModelS2 Series
CategoryMeasuring Instruments
LanguageEnglish