Measurement Computing Serial488A User Manual
Page 40

3.6
The following is an example of how this feature can be used to
communicate with an IEEE plotter. The program example is written in
Basic on an IBM PC or compatible. It turns the PC into a dumb serial
terminal. When a key is pressed on the keyboard, the character is
transmitted out of the serial (COM1) port. Any serial data which is
received from the port is printed on the display.
10 ' Dumb Terminal Program for the Serial488A
20 ' This Program allows direct interaction
between
30 ' the IBM-PC and an IEEE plotter through the
40 ' Serial488A. The Serial488A must have talk
back
50 ' on time out enabled.
60 'Open the serial communications port
70 OPEN "COM1: 9600,n,8,2,cs,ds" AS 1
80 ' Display any data received from the COM1 port
90 IF LOC(1) THEN PRINT INPUT$(LOC(1),1);: GOTO 90
100 ' Transmit key presses to the COM1 port and
screen
110 K$=INKEY$
120 PRINT #1,K$; : PRINT K$;
130 GOTO 90 ' Do it again
Enter the program into the computer and run it. The example below shows
how to test the Serial488A's operation with a Hewlett Packard 7470A
plotter. Other IEEE plotters are similar but you should refer to the plotter's
programming manual for the proper command syntax. Notice the
Serial488's front panel LEDs as you type the plotter commands.
Type the following HPGL output identify command on the keyboard.....
OI;
The plotter (HP 7470A) should immediately respond with.....
7470A
By typing the following HPGL command on the keyboard, the plotter
should respond by retrieving its pen, drawing a line and returning the pen.
SP1;PA1000,1000;PD;PA1000,6000;PU;SP0;