Appendix H - Sample Program - National Instruments GPIB-MAC User Manual

Table of Contents

Advertisement

November 1985
Appendix H
Sample Program
This appendix contains general progr amming steps and a sample
program. These are meant to be guides for you as you start writing
your programs for the GPIB-MAC.
General Steps
The steps below are general programming steps. The following
pages contain explanations of these steps and show a sample
program.
Send stat function to have status information returned
Step 1
to you after your programming message.
Send serial port initialization functions if you need to
step 2
change default serial port settings.
Send GPIB initialization functions if you need to
step 3
change default GPIB settings.
Communicate with the device using the rd and
step 4
functions, and check status if you requested it.
After you initialize the GPIB-MAC, the rd and wrt functions may
be the only functions you will need.
Using an HP 7475A Plotter with a Macintosh
This example shows how to write a program on the Macintosh using
Microsoft BASIC to draw a circle using an HP 7475A Plotter.
Getting Ready to Program
Before you start programming, determine the serial port settings you
will use. The settings for this example are: 9600 baud rate, 8 data
123

APPENDIX H - SAMPLE PROGRAM

Advertisement

Table of Contents
loading

Table of Contents