
Programming Examples
printf(“Setup error: %s\n”, buf);
// Measure 20 samples
for (i=0; i<20; i++) {
ibwrite(instrument, “READ?”);
ibrd(instrument, reading, 49L); reading[ibcnt]=0;
printf(“Result %d:%s”, i, reading);
}
do {
ibwrite(instrument, “syst:err?”);
ibrd(instrument, buf, 100L); buf[ibcnt]=0;
printf(“End error: %s\n”, buf);
} while (atoi(buf)!=0);
ibonl(instrument, 0);
}
/********************
* Support functions *
********************/
void ibwrite(int instrument, const char *string) {
ibwrt(instrument, (char*) string, strlen(string));
}
void sleep (long mswait) {
time_t EndWait = clock() + mswait * (CLOCKS_PER_SEC/1000);
while (clock() < EndWait);
}
FCA3000, FCA3100, MCA3000 Series Programmer Manual
4-3
Содержание FCA3000 Series
Страница 2: ......
Страница 8: ...Preface iv FCA3000 FCA3100 MCA3000 Series Programmer Manual ...
Страница 9: ...Getting Started ...
Страница 10: ......
Страница 14: ...Using the USB Interface 1 4 FCA3000 FCA3100 MCA3000 Series Programmer Manual ...
Страница 15: ...Syntax and Commands ...
Страница 16: ......
Страница 26: ...Command Syntax 2 10 FCA3000 FCA3100 MCA3000 Series Programmer Manual ...
Страница 135: ...Status and Events ...
Страница 136: ......
Страница 156: ...Status and Events 3 20 FCA3000 FCA3100 MCA3000 Series Programmer Manual ...
Страница 157: ...Programming Examples ...
Страница 158: ......
Страница 179: ...Appendices ...
Страница 180: ......
Страница 181: ...Appendix A Character Set FCA3000 FCA3100 MCA3000 Series Programmer Manual A 1 ...
Страница 182: ...Appendix A Character Set A 2 FCA3000 FCA3100 MCA3000 Series Programmer Manual ...
Страница 188: ...Appendix D Reserved Words D 2 FCA3000 FCA3100 MCA3000 Series Programmer Manual ...