Up
Go up to Technical and research notes

CalComp digitising tablets under Linux

The DrawingBoard III and the DrawingSlate II are digitising tablets manufactured by CalComp. If you don't know what a digitising tablet is, you probably don't need it either. Nonetheless, a typical application is to convert hardcopy maps into electronic format by tracing the contour lines, roads, hydrography, settlements and other features and saving them electronically in machine-readable form. There are basically two components of such a thing: the tablet itself (available in various sizes) and a pointer, which can be a several-button mouse or a pen.

As you would expect, a digitising tablet would send information to the computer about where the pointing device is over it in terms of x and y coordinates, and about the state of the pointer: any button pressed, pressure and tilting, if applicable, etc.

To our knowledge and to our surprise, not many vendors in this category offer their product with Linux support. This page is to tell you how you could use the DrawingSlate II (serial version) for map digitising under Linux. So far no differing behaviour of the DrawingBoard III has been reported. Eg, GRASS users or others involved in GIS work might benefit from this page, as well as digital artists, modellers, etc.

I use a 18"x12" DrawingSlate II board with a 4-button mouse.

What follows now will be updated as soon as I get cleverer and more experienced. All feedback is welcome.

I really hope this very paragraph you are just reading will change too. It's about how miserable CalComp's customer service is: after several unanswered e-mails, faxes and phone calls, what I received was a somewhat ouldish-looking brochure called CalComp Digitizer Interface Development Guide never mentioning the DrawingSlate II. Nevertheless it documents 2 of the supported 32 output formats, great indeed, eh? Listen CalComp, help me to develop a device driver and then cash in on the Linux GIS-ers.

The primary observation (courtesy to Szakony László) is that Linux echoes to the serial TXD (transmit) line what it is sent from the tablet on the RXD (receive) line, which screws up the DrawingSlate II board after the first couple of lines of data. As the TXD line is only needed in case you want to configure the board from software, for as simple an operation as digitising a map you can do very well without it.

The easiest way to get rid of the TXD line is to prepare a cable that misses this connection. In the D-shape, 9-pin serial connector that comes with the DrawingSlate II you should only connect pin 2 (RXD) and pin 5 (GND) to the computer, and leave pin 3 (the TXD line) disconnected (pin 3 (RXD), 7 (GND) and 2 (TXD) for 25-pin connectors, respectively).

With some serial programming wizardry we could probably manipulate termios (see the manpage) so that it switches the echo off. Preparing a cable was a matter of an hour, though - dwelling into serial programming will be more of an undertaking.

So far so good. Now we are able to use the DrawingSlate II for digitising. This would involve registering two points with known real-world coordinates over the map, reading the board's output (possibly changing the contour levels here and there upon pressing this or that mouse button), saving it into a file, and then transforming all the digitiser-sent data into real-world coordinates.

Configure the board the following way:

Operating (line, point, track, run) and increment modes of your choice. Prompt mode off (it won't be prompted by the computer with TXD disconnected anyway). Data rate about 100 pps (A6-on, A7-on, A8-on). Resolution of your choice, at least 1000 lpi recommended. The only documented format I know is the CalComp 9100-1 (#4 on page 4-8 of the User's Guide: A12-off, A13-off, A14-on, A15-off, A16-off). Add line feed after each record (A17-on). Set baud rate to 9600 (B1-off, B2-off, B3-on), parity none (B4-on, B5-off, B6-off). Mouse mode off (B15-off, B16-off). Disable CTS line (B18-off).

With a bit of luck, this setup will provide you with ASCII sequences of:

T M C XXXXX YYYYY <CR>

where

A sample output

ARU1000007000

would thus indicate the active tablet (A) is in Run mode (R), no cursor keys are being pressed (U), and at the resolution of 1000 lpi the pointer is 10 inches to the right and 7 inches below the origin. This also means that the origin is at the upper-left corner of the board.

For someone interested to see sections, open and closed polygons with or without elevation, circles, marker triangles and text digitised in DXF format, some simple, character-based utilities I've written in FORTRAN77 are available with source and a binaries compiled for Linux. These utilities take commands from the keyboard, as well as coordinates from the digitiser or the keyboard and thus it's fairly easy to save topography, hydrography, infrastructure, grid etc data in DXF format -- usually not much more is needed to build a simple GRASS database or in certain modelling software.

Another set of observation is about using the DrawingSlate II as a mouse under Linux.

The User's Guide says (page 4-12) the board supports the Mouse Systems and the Microsoft protocols. There appears an error in the Users Guide about the configuration of the Mouse Systems: instead of B15-on and B16-off you might want to try B15-off and B16-on.

With the following configuration the Microsoft protocol is reported to work on both the DrawingSlate II (both gpm and X) and the DrawingBoard III (no gpm - X only with a 3-button cordless pen, courtesy to Rich) tablets:

Rich reports also:

Ok a newer better setup:
   (my drawing tablet on cua0, PS/2 mouse on psaux)
		ln -s /dev/psaux /dev/mouse
		ln -s /dev/cua0 /dev/mouse2
		
In my /etc/XF86Config , in addition to the regular mouse (pointer)
section I've put

		Section "Xinput"
    			SubSection "Mouse"
        			Port "/dev/mouse2"
        			DeviceName "Drawingboard"
        			Protocol "Microsoft"
        			SampleRate      50
        			ChordMiddle
    			EndSubSection
		EndSection

now I can switch the system pointer between the board and the mouse using:

	(to switch to the board)
		xinput set-pointer Drawingboard
	(to switch to the mouse)
		xinput set-pointer 1
		
	"xxinput set-ptr-feedback <device name> <threshold> <num> <denom>"
	
sets the sensitivity so you can crank the "lpi" on the board right up
to the top and still have the mouse move nice and slow and accurate.
I'm using 
	
	" xinput set-ptr-feedback Drawingboard .01 1 5"
	
I dont think I'm going to get any kind of absolute mode cursor control
but it makes mousing nice and civilized.

What's really tough here, though, is that if after reboot any mouse server was launched, I couldn't get the DrawingSlate II work in no-mouse (ie digitiser) mode. As a matter of course, the board can be connected to another serial port, using a "real" mouse for mousing, leaving the DrawingSlate II for digitising only.

We're on these problems, but we can only do what we can do. Happy DrawingSlating and DrawingBoarding, folks.


Last updated on June 29, 1999

Up