National Instruments GPIB-MAC User Manual page 134

Table of Contents

Advertisement

November 1985
bits, 1 ston bit. and no
Then, connect the serial cable to the serial port of your Macintosh
and to the GPIB-MAC. Connect the GPIB cable to your device and
the GPIB-MAC. Turn the power switch of the GPIB-MAC to On.
Programming
stat
In BASIC, before reading or writing to the serial port, a device must
be "opened" Place the following BASIC statement at the beginning
of your program to open and configure the serial port (COMl) and
name it device #l.
Note that you will now use PRINT #l to redirect strings to the serial
port. Now, send the
returned after every progr amming message. To do this, include the
following code in your program:
After you send this programming message, you can expect four
lines of data at the serial port (each line is terminated by
can write this later. For now, add the line:
124
APPENDIX H - SAMPLE PROGRAM
Set the back Dane1 switches on the
Steps
OPEN "COM1:9600,n,8,1" as #l
stat
function if you want status information
PRINT # 1, "stat c n"

Advertisement

Table of Contents
loading

Table of Contents