Archive

Archive for November, 2009

Scavenged pen-plotter Roland DG DXY-990

November 20th, 2009 admin No comments

Yes! I've managed to scavenge an old pen-plotter that was obviously gathering dust down in the basement of our institute. Last time i've seen such a plotter was in the 1980s at the institute where my father used to work. Back then, it was a paper-feed pen plotter that was used to plot various measured data online.

The DXY-990 plotter shown below can hold eight pen at the higher left part and moves on an xy-plane using two stepper motors which control a ribbon each. Each initialization process involves finding the lower-left corner which seems to be offset from the x-position of the pen. The plotter can be loaded with a paper size slightly bigger than DIN A3. The paper is held by a controllable static charge (wow! when did this technology disappear?) so that it doesn't move when the pen is hovering or scratching on it.

Roland DG DXY-990

The plotter has a manual dial to control it. The pen can be moved in 8 directions and two velocities. A number dial is used to change the pen. Then there are the buttons for "paper hold", "pen up/down" which simply controls a electric magnet and "pause" which can pause a loaded program. To test the plotter, one can hold the "Enter" button while turning it on (back side). It will then plot a test page.

As i expected, the control of the plotter with a pc wasn't so complicated, but finding a documentation about how to do it using standard windows/linux commands took some time. First one has to know about the HPGL-language which seems to have been a standard for plotting machines by hp which was adopted in large parts by other manufacturers. Roland DG adopted the language as RD-GL1 which is compatible to HPGL. A HPGL-command to initialize and print a line from (10,10) to (1000,1000) would look somewhat like this:

CODE:
  1. IN;SP1;PU10,10;PD1000,1000;

IN stands for "initialize". It sets back all the parameters (scaling, rotation, pen status etc..). SP stands for "select pen" and the first parameter "1" means, that the first pen should be selected. Interestingly, the dxy-990 remembers at every state, which pen it's holding and which actualy coordinates it should be at. So SP2 while holding the first pen means actually "bring back pen1, pick up pen2, go back to coordinates". To move the pen without drawing we can use the PU or "pen up" command. It takes two parameters as in x and y coordinate. I'm not quite sure about the delimetation codex. i think it's o.k. to write PU 10,10; or even P U 10,10;. To set the pen down, the command PD is used - equally with way points. PD can take as many waypoints as need be. Printing a polygon is much better using the compact notation PD1000,1000,50,50,10,40....

The easiest way to send the commands to the plotter is to write them down into a text file and then (using windows) type the following command into a shell

CODE:
  1. copy "file.hpgl" lpt1:

This is assuming the plotter is connected to the (still existing) parallel port. I didn't do serial port connection yet. The equivalent linux command should be

CODE:
  1. cat file.hpgl> /dev/lp0

With linux you can also write online commands:

CODE:
  1. cat> /dev/lp0
  2. <commands>

After each "return", the commands are sent to the plotter and it immediately performs that command.

By the way, HPGL-files can also be generated by Inkscape. The problem is that right now, the export-plugin doesn't consider changing the pen for differently colored figures and rectangles arent't exported at all. I hope this changes in the near future (maybe i will find time to work on it). I will end with a small video of the Roland DG DXY-990 plotter in action (plotting the test page). The ogg-video can be viewed with current browsers with the html5-standard and the ogg-vorbis codec implemented . Otherwise download the video and watch it offline (vlc).

Categories: CAD, Hardware, Programming Tags:

Why computers suck at maths

November 1st, 2009 admin No comments

Here is a nice article describing the problems that rise due to the methods used in nowadays computers to calculate simple mathematics. Interesting read.