EasyManuals Logo

Pendulum CNT-90 Series Programmer's Handbook

Pendulum CNT-90 Series
264 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 #51 background imageLoading...
Page #51 background image
(void)WriteDev("syst:pres");
(void)viClose(Instr);
(void)viClose(defaultRM);
_exit(0);
}
// command line arguments
struct CmdArgs
{
bool bUSB; // GPIB if false
unsigned int nAddr; // GPIB address. Not used for USB
double Pacing;
char Func[64]; // measurement function
bool bPeriod; // is Meas Func one of Period functions
// or one of Freq functions
double RefVal, Delta;// reference value and acceptable error
// (used to check meas results)
double RefFreq; // reference freq
};
// check if string is one of the given set. returns
// the number of matched string or -1 if no matches are found
inline int CheckStr(char const *s, int nSLen, char const *Set[],
int nSetSize)
{
for(inti=0;i<nSetSize; i++ )
if(0==strncmp(s, Set[i], nSLen) && nSLen ==
strlen(Set[i]) )
return i;
return -1;
}
// Parse command line. Format:
// <Executable> USB|GPIB[:<Address>] [<Pacing>] [<Meas Func>]
// [<RefFreq>] [<Delta>]
bool ParseCmdArgs(CmdArgs *pArgs, int argc, char* argv[])
{
static char const *StrInterfaces[] = { "USB", "GPIB" };
static char const *StrMeasFuncs[] =
{
"PER",
"PER:BTB",
"FREQ:BTB"// <-nFirstFreq
};
static int const nFirstFreq = 2;
Programming Examples
Error Code 4-15

Table of Contents

Other manuals for Pendulum CNT-90 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Pendulum CNT-90 Series and is the answer not in the manual?

Pendulum CNT-90 Series Specifications

General IconGeneral
BrandPendulum
ModelCNT-90 Series
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals