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 #42 background imageLoading...
Page #42 background image
// Reset counter to known state ibwrite(counter,
“*rst;*cls”);
// Setup for period measurement ibwrite(counter, “FUNC
‘PER 1’”);
// Some settings...
ibwrite(counter, “INP:LEV:AUTO OFF;:INP:LEV 0;COUP DC”);
ibwrite(counter, “TRIG:COUNT 1000;:ARM:COUNT 1");
ibwrite(counter, ”DISP:ENAB ON"); ibwrite(counter,
“FORMAT ASCII;:FORMAT:TINF OFF”);
ibwrite(counter, “*ESE 1;*SRE 32");
// On the safe side: Check that setup was OK, all commands
correctly spelled etc
ibwrite(counter, ”syst:err?");
ibrd(counter, buf, 100L); buf[ibcnt]=0; printf(“Setup
error: %s\n”, buf);
// Measure 1000 samples
Start = clock();
ibwrite(counter, “INIT;*OPC”);
// Wait for completion
ibwait(counter, RQS);
/* Read status and event registers to clear them */
ibrsp(counter, &Status);
ibwrite(counter, “*ESR?”);
ibrd(counter, buf, 100L);
ibwrite(counter, “FETC:ARR? 1000");
ibrd(counter, bigbuf, 30000L);
if (ibcnt >0) {
pbuf = bigbuf;
for (i=0; i<1000; i++) {
for (j=0; pbuf[j]!=’,’ && pbuf[j]!=’\0’; j++);
pbuf[j]=’\0’;
if (i%50 == 0) printf(”Result %d: %s\n", i,
pbuf);
pbuf+=j+1;
}
}
Stop = clock();
Programming Examples
4-6 Block Measurements (Ex. #2)

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