Sample Programs
Appendix H
GPIB-232CT User Manual
H-8
© National Instruments Corp.
Programming a Tektronix 2445 Oscilloscope from
an Apple IIc
This example shows how to use an Apple IIc to control a Tektronix 2445
oscilloscope. The Apple IIc's serial port is configured with a utility
program. In Applesoft BASIC, there is no need to use the OPEN statement
to open the serial port for communications. You direct output to the serial
port with the statement
PR#1
, and direct input to the serial port with the
statement
IN#1
. A <CTRL>D (
CHR$(4)
) must be sent before each of
these commands. Refer to your Applesoft manual for more information.
Getting Ready to Program
Before you start programming, determine what serial port settings you
require. The default settings for the GPIB-232CT as given below are fine
for this application.
•
baud rate: 9600
• parity: none
• data
bits:
8
• stop
bits:
1
1
2
3
4
5
6
7
8
O
F
F
U22
O
N
!
Figure H-3. S mode, 8 data bits, 1 stop bit, no parity, 9600 baud
Connect the serial cable to the serial port of your computer and to the
GPIB-232CT. Power-on the GPIB-232CT.