EasyManuals Logo

Pendulum CNT-91R Programmer's Handbook

Default Icon
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 #48 background imageLoading...
Page #48 background image
Status = viWrite(Instr, “*IDN?\n”, 6, &RetCount);
Status = viRead(Instr, Buffer, MAX_CNT, &RetCount);
Buffer[RetCount]=0;
printf(“%s\n”,Buffer);
Status = viWrite(Instr, “INIT:CONT OFF;:func ‘per’\n”, 25,
&RetCount);
while( i++<10){
Status = viWrite(Instr, “init;fetc?\n”, 11, &RetCount);
if (Status != VI_SUCCESS) {
printf(“Write: status = %x, i = %d\n”, Status, i);
/* Close down the system */
Status = viClose(Instr);
Status = viClose(defaultRM);
return 0;
}
Sleep(200);
Status = viRead(Instr, Buffer, MAX_CNT, &RetCount);
if (Status != VI_SUCCESS) {
printf(“Read: status = %x, i = %d\n”, Status, i);
/* Close down the system */
Status = viClose(Instr);
Status = viClose(defaultRM);
return 0;
}
Buffer[RetCount]=0;
printf(“%s\n”,Buffer);
Sleep(25);
}
Status = viWrite(Instr, “syst:err?\n”, 10, &RetCount);
Sleep(25);
Status = viRead(Instr, Buffer, MAX_CNT, &RetCount);
Buffer[RetCount]=0;
printf(“%s\n”,Buffer);
/* Close down the system */
Status = viClose(Instr);
Status = viClose(defaultRM);
return 0;
}
void Sleep( clock_t Wait )
{ clock_t Goal;
Goal = Wait + clock();
while( Goal > clock() )
;
}
Programming Examples
4-12 USB Communication (Ex. #4)

Table of Contents

Other manuals for Pendulum CNT-91R

Questions and Answers:

Question and Answer IconNeed help?

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

Pendulum CNT-91R Specifications

General IconGeneral
BrandPendulum
ModelCNT-91R
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals