As shown by the following examples you can do some interesting things with the DIGITIZE statement by mixing the possible PLOTTER IS and GRAPHICS INPUT IS devices. The first example uses the default PLOTTER and GRAPHICS devices. Use the mouse to move the tracking cross around. Press the ENTER key or one of the mouse buttons to read the current tracking cross location.
10 GINIT
20 PLOTTER IS CRT,"INTERNAL"
30 GRAPHICS INPUT IS KBD,"KBD"
40 TRACK CRT IS ON
50 FRAME
60 DIGITIZE X,Y,S$
70 PRINT X,Y,S$
80 END
If you have an HPGL plotter hooked up to your computer then you can try the following example. Change line 30 in the above program to setup the plotter as the input device. Chose one of the following lines for the type of communication that your plotter uses. If you are using the serial interface, make sure that the baud rate, parity, stop bits, and handshaking are setup correctly. For an IEEE-488 plotter, the device address needs to be set correctly.
30 GRAPHICS INPUT IS 9,"HPGL" !Serial Interface
30 GRAPHICS INPUT IS 705,"HPGL" !IEEE-488 Address 5
When this program is run, the tracking cross will appear on the CRT display. By moving the pen around on the plotter, you will see the tracking cross on the screen follow the plotter movement.
You can also experiment with the other alternatives by setting the PLOTTER device to the HPGL plotter, and then varying the GRAPHICS device between the keyboard and the HPGL plotter.