CHAPTER 4: Controller Operation
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 interface converter
20 ' This program allows direct interaction between 30 ' the IBM PC and an IEEE plotter through the
40 ' interface converter. The interface converter must have
50 ' on Timeout 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 interface converter’s operation with a
Type the following
OI;
The plotter (HP® 7470A) should immediately respond with.....
7470A
When you type the following
SP1;PA1000,1000;PD;PA1000,6000;PU;SP0;
37