Black Box IC026AE-R2, IC026A-R2 manual 7470A, SP1PA1000,1000PDPA1000,6000PUSP0

Models: IC026AE-R2 IC026A-R2

1 71
Download 71 pages 56.13 Kb
Page 37
Image 37

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 Talk-Back

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 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 interface converter’s front-panel LEDs as you type the plotter commands.

Type the following HP-GL®output-identify command on the keyboard...

OI;

The plotter (HP® 7470A) should immediately respond with.....

7470A

When you type the following HP-GL 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;

37

Page 37
Image 37
Black Box IC026AE-R2, IC026A-R2 manual 7470A, SP1PA1000,1000PDPA1000,6000PUSP0