mardi 22 mars 2011

What to send to a plotter?

We have a serial connection to a plotter. Than we can send commands to the plotter using this serial connection. We can send so called Strings, pieces of text.

First of all, what will be send?

First initialize the plotter:
send "IN;"

Then drawing
Pen Up: "PU;"
Pen Down: "PD;"
Draw a line (if Pen Down, otherwise Displace the plotterhead) to position x,y: "PAx,y;"

In fact there are other commands, like "CIr;", draw a circle with radius r, but we can do that also with our own sequence of commands, using coding.

Other commands can be found here:

http://www.tech-diy.com/HP%20Graphics%20Language.htm

But after that basic command to draw a line from the current position to an absolute position (PA stands for Position Absolute) people tend to make libraries. These libraries make life easier, that is the libraries take care of complex sequences of commands.

These more complex commands will be taken care of in the post about Processing.

Aucun commentaire:

Enregistrer un commentaire