![background image](http://html1.mh-extra.com/html/national-instruments/gpib-422cv/gpib-422cv_user-manual_4533454051.webp)
Appendix C
Application Examples
© National Instruments Corp.
C-3
GPIB-232CV User Manual
/* FASTPRINT - dumps specified data file out GPIB
to device named printer */
#include "decl.h"
#include <stdio.h>
main (argc, argv)
char **argv;
{
char fname [16],*filename;
int f;
/* prompt for file name if not provided */
if (argc <=1) {
printf ("Enter filename: ");
gets (fname);
filename = fname;
}
else
filename = argv[1]
/* find device printer */
if ((f = ibfind ("printer"))<0) {
fprintf(stderr, "Can't find printer\n");
exit(1);
}
/* write file */
if (ibwrtf(f, filename) & ERR) {
fprintf(stderr, "Can't open %s\n", argv[1]);
exit(1);
}
}
After the program is compiled and linked, you can run it just like the DOS
print routine. Then, as long as you are not sending an amount of data
greater than the buffer size of the GPIB-232CV, the data transfer should
complete in a few seconds.
Содержание GPIB-422CV
Страница 1: ...GPIB 422CV...
Страница 56: ......