Figure C-1. Example Of Print Spooler Setup - National Instruments GPIB-232CV-A User Manual

Ieee 488 rs-232 converter
Table of Contents

Advertisement

Appendix C
Application Examples
GPIB-232CV-A User Manual
assigned to the device plotter or printer in
port parameters to match those of the printer or plotter.
3.
Connect the GPIB cable from the PC to the GPIB-232CV-A, and
connect the serial cable from the GPIB-232CV-A to the printer or
plotter. The system should resemble the diagram in Figure C-1.
Serial Cable
Printer

Figure C-1. Example of Print Spooler Setup

4.
Provide a means to transfer data to the printer or plotter easily via the
GPIB port on your PC. You can simply redirect the serial output to the
GPIB device as explained in the NI-488.2 Software Reference Manual
for MS-DOS, but the overhead associated with the DOS calls makes
this method inherently slow. The fastest way to transfer data to the
GPIB port is to write a small program that executes a GPIB file write.
The following program is an example of how to do a GPIB file write
in the C programming language. You can use other languages in the
same way.
/* 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);
GPIB Cable
FUSE
GPIB-232CV-A
C-2
. Configure the serial
ibconf
PC
www.ni.com

Advertisement

Table of Contents
loading

Table of Contents