17 Feb

Your (Cutting) Plotter and Inkscape

I own a Cutting Plotter from Helo, which is bundled with HeloCut, a proprietary software which connects to CorelDraw or Inkscape.

This software has many disadvantages:

  • It is expensive
  • It can only drive a Helo Plotter
  • On install it is bundled with your Computer hardware and cannot be installed on 2 Computers or a fresh install of the same Computer!!!
  • It is buggy as hell
  • The only thing it does (as i found out) is converting the SVG data to HPGL which is an open data format for Plotters (Dating back to the 90’s)

To summarize it: Every time you re-install windows you have to spend 70 Euros (or 50 Euros for an update) for the same software again.

All this points made me search for alternatives. There are a few ones, but none of them are really “good software”. Most are very expensive, and then there is InkCut.

InkCut COULD be a good and usable alternative, but it is also buggy and difficult to understand. And the knockout argument against InkCut is that it does not run under Windows. Or to be precise: It only runs under Windows after installing tons of Python Software in an specific fashion. This is simply much too complicated for normal users. And even if some users manage to do so it is missing some major features that are not compatible with windows.

After doing a ton of research i realized two important points: First, Windows is automatically installing a Serial Interface when the USB cable is connected (The chip the Plotter uses is a standard, widely used Serial-to-USB bridge), and second, Inkscape already has a HPGL export (Since 2008), which outputs data that can be sent directly to the Plotter via a serial connection.

Now i could export a drawing to an HPGL file, open that file, copy the HPGL data and send it via a serial console program directly to the Plotter. That worked.

The existing HPGL export of Inkscape is very basic, and i found that it is missing two important features: Overcut and Tool Offset correction. Both features are vital when plotting on a Swivel Knife Plotter (That is the most common type of Plotter). Without those features the drawing will look like Comic Sans because the knife is dragged around, also the plot will most of the time not be closed and stick to the rest of the foil.

This demonstrates the path to plot with and without the Tool Offset correction. Since the knife is dragged behind, the path on the right will result in sharp edges on the plot:


After some bickering with myself i decided to expand the existing HPGL export in Inkscape. I added all the features i found missing and even added a nice little feature which raises the convenience a lot: It can now send the Data to the serial interface by itself.

This is the new Interface:


On first glance it is a bit intimidating, but every feature has a Tool Tip to help you understand what it does:


Now the HPGL export is full featured, easy to use, and does (nearly) the same things that very expensive software does.

New features:

  • Selectable offset
  • Selectable alignment
  • Overcut
  • Tool offset correction
  • Automatically chosen zero point
  • Send HPGL data via serial port
  • Help texts on all options
  • Changed all units from Pixels to mm (Pixels are not a real world unit)

This new export will be officially included in Inkscape 0.49, or if you are impatient you can download a “Development Version” from the same download page further down.

If you want to use the serial communication you need to install pySerial also (Open Source):

  1. Download pySerial here: http://pypi.python.org/pypi/pyserial
  2. Extract the “serial” subfolder from the zip to the following folder: “C:\Program Files (x86)\inkscape\python\Lib\” (Or wherever your Inkscape is installed to)
  3. Restart Inkscape

How to Use the HPGL export:

  1. Ungroup all your drawings
  2. Convert all your drawings to paths
  3. Union all paths (Not necessary, but the Plot order will be better if you do so)
  4. Click “File” -> “Save As”
  5. Choose “HP Graphics Language file (*.hpgl)” as type
  6. Click “Save”
  7. Choose the Parameters as they fit your Plotter
  8. If you want to plot right away, choose the serial port and baud rate fitting your plotter
  9. Click “OK”

I hope it is as useful to you as it is to me.

Please let me know how it works with your Plotter and if you have any problems in the comments!

19 thoughts on “Your (Cutting) Plotter and Inkscape

  1. Hi Juliane,

    yeah, i have an Helo plotter also, they are the cheapest china crap.

    usually the Helo cutters start cutting lines over the drawings when it contains too many nodes. it is a pain in the arse, but i haven’t found any solution for that problem. i even had it with HeloCut.

    you could try reducing the amount of nodes per inch. the overall node amount doesn’t seem to make any problems, and it is not a software or transmission problem, it is a problem of the plotter itself.

    what version of inkscape (the revision number, something like “r12832”) do you use?

    if it is lower than r12816 you should update to r12832 and try again. i changed many things in the software, and r12832 is the most current version.

    About the settings: On a Helo cutter you should activate software flow control with 9600 baud. you can leave the other settings mostly as is. The Helo cutters work with HPGL and DPML as well.

    if that all doesn’t help feel free to contact me again, i will send you an email right now.

  2. Hi,

    first, let me thank you for your great work. I just checked the most recent Inkscape version with our Helo 720 cutter. I can also confirm the problem with random cuts through the drawing, making it impossible to finish even a single piece.

    The generated HPGL output from Inkscape (via save as…) appeared to be clean. Could you add a “dump code” button?

    After thinking about the problem for a while, I found there may be some other possible sources for the erroneous behaviour (besides a completely faulty firmware inside of the Helo):

    a) the built-in serial-USB-converter is cheap and faulty -> test with a direct serial connection/an external serial-USB-converter
    b) there is still a problem with the connection caused by wrong transmission parameters (9600 baud still too fast? other flow control, stop bits??)

    I will also try it again with Linux instead of Windows, and by sending the code directly through a serial connection.

    Maybe I will find some time tomorrow to look into it again.


  3. hi roberto,

    this extensions is already used by many people with a big variety of plotters without problems, only the helo plotters react funny sometimes.

    i always use the following file for testing:
    because it has a good combination of sharp edges, circles, 90° edges and so on. this file is always correctly plotted with my Helo HSP 360 NG.
    please try to plot this file and tell me if it plotted

    a “debug” feature that dumps the code also is a good idea, i will add it to the code.

    i think the usb-to-serial bridge is not the problem, it is a standard chip used a million times.

    about the connection: i looked into the manuals for the helo plotters, and the connection settings are correct. you can’t actually go lower or higher than 9600 baud, the plotter needs this speed.
    the data bits and stop bits are standard, no need to set them.

    there is no difference in windows vs. linux. before i wrote this extension i tried to use inkcut on linux and got the same results with lines through the plot. i even got it with inkcut sometimes.

    the only thing i found influencing this bug is the amount of nodes in a drwaing. if the number gets to high i get destroyed drawings.
    and this is not a connection or memory problem, my cutter has 6MB of cache, which is enough for very big drawings.

    if you find something else causing this bug please let me know!


  4. Hi TimeWaster,

    I do not think this is the real problem, as it appears with my Helo already with a relatively simple snowflake (maybe 200? cuts if exported to HPGL). I will try your file and report back.

    Of course it is a standard chip, but maybe the implementation or connection to the rest inside of the Helo is faulty. I also tried to disable the FIFO-Buffer for the USB-serial interface in Windows.

    I think the total amount of nodes should be no problem at all, as long as the cutter processes every command on a one-by-one basis.
    And 6MB of cache cannot be filled so quickly with 9600 baud. 😉

    What happens if you send your testfile continously, as if it was a drawing with three, four or fifty times the nodes? If that is really the cause of our problem you should be able to provoke the faulty behaviour that way.

    In my (short) experience the error always appears exactly in the same place of the drawing, which hints at either a code generation problem, or a special combination of characters, that gets misinterpreted by the Helo.

    Regarding too many nodes at once (and maybe a progress bar): Why not try sending complex drawings in parts of maybe 10, 100 or 1000 lines instead of all at once? Maybe the Helo needs a pause, or a reconnect every x lines?

    just my 2¢,
    best regards,

  5. hi,

    well i am able to reproduce it, i have a document with many nodes and a simpler version with a reduced amount of nodes but everything else is the same, and the “big” version produces lines, the “small” one not.

    you are right, the total amount of nodes is not the crashing factor, but the amount of nodes per inch is.

    if your problem appears always at the same place, check the amount of nodes in that place please. try to reduce it.

    sending the drawing in parts would have no effect, thats what actually the flow control is for, when the plotter is not able to receive any more data it sends a flag that signals the computer to stop sending data, and when enough buffer is available again the flag gets removed.


  6. Hi,
    I notice in the most recent versions of inkscape 0.9x in the repository the ‘Send to plotter’ functionality no longer appears?

    Appears to have gone between these revisions:
    — share/extensions/hpgl_output.inx 2013-04-28 11:16:17 +0000
    +++ share/extensions/hpgl_output.inx 2013-12-20 19:27:50 +0000

    Is there an alternative way of getting this functionality intended?

    Looking to add support for Zing plotters, which basically boils down to ‘ZG’ instead of ‘IN’ for initialisation, and away to specify cutting force to be passed to a FSXX command.

  7. Answering my own question – send to plotter functionality has moved to the ‘Plotter->Plot’ extension, which makes sense.

Comments are closed.