CNC Gcode Sender




About: 55+ years in electronics, computers, and teaching ... now retired.

Intro: CNC Gcode Sender

I have discovered that many XON / XOFF terminal programs require a delay between characters when sending gcode data to my plotters. [1]

While a delay ensures reliable communication, any delay slows the rate at which the gcode commands are sent which lengthens the time taken to plot.

My terminal program solves this problem. 100% reliable data communication is now achieved without the need for any delays. Files that took hours to plot now take minutes :)

[1] A list of my plotters follows:

Step 1: Software

This gcode terminal requires that you have "Processing 3" installed on your computer.

"Processing 3" may be obtained from

Step 2: Installing the Gcode Terminal Software

"Processing 3" is very similar to the Arduino IDE (integrated development environment).

Run "Processing 3" and paste the contents of "Processing3_terminal.pde" into a new sketch.

That's it !

Step 3: Testing

The "CNC Drum Plotter" will accept either Bluetooth or USB output from the terminal.

If you choose to use Bluetooth you must enable Bluetooth on your computer and "pair" your computer with the plotter. If you choose to use a USB cable then uplug the HC-06 Bluetooth module from your plotter.

Copy the attached file "Letter_B.ngc" into your "Processing 3" folder. This file tests each of the G00, G01, G02, and G03 functions. The end result should be a large A4 size portrait image of a capital letter 'B'.

With your "Processing 3" sketch running drag the horizontal bar upwards to maximize the visible terminal area.

Now click the "Run" button which is on the top-left corner of the screen and follow the on screen prompts.

If the terminal doesn't connect change "DEBUG_ON = false;" to "DEBUG_ON = true;" and match the terminal's "COM" port setting to that used by the plotter.

Once you have positioned the plotter's pen at the bottom-left corner of your A4 page, "right-click" the instruction box and type "Letter_B.ngc" (without the quotes). Keep in mind that the terminal is "case-sensitive".

All going well gcode commands, echoed back from the plotter, should start streaming down your screen and the plotter should start moving.

  Click here   to view my other instructables.



    • Tiny Home Contest

      Tiny Home Contest
    • Furniture Contest 2018

      Furniture Contest 2018
    • Fix It! Contest

      Fix It! Contest

    4 Discussions


    Answer 6 weeks ago

    In order to help I need further information:

    (1) What operation?

    (2) This terminal program will (unless modified) only work with my plotters. Are you attempting to talk to one of my plotters or are you connected to a 3rd-party plotter?

    (3) All of my plotters respond with a menu. Did a "menu" and a "grey box" appear?

    (4) Your screen indicates that you have something attached to your serial port (as there is no error message). Does your serial baud speed match your plotter?


    Question 4 months ago

    your code in processing 3 software is showing error in line 113 saying Array out of bound exception.

    Please help!

    1 more answer

    Answer 4 months ago

    An error message will appear if the COM port number in line 113 doesn't match your actual COM port number.

    The error message should disappear, and the terminal connect, if you make the following changes to the code:

    Step 1:

    Change line 69 to read "boolean debug_on = true;"

    Step 2:

    Run the code and note your COM port numbers. (Let's assume that your highest COM port number equals 1)

    Step 3:

    Change line 113 from "String arduino_port = Serial.list()[2];" to read "String arduino_port = Serial.list()[1];"

    Step 4:

    Rerun the code ... the error message should disappear. If not try another COM port number.

    Step 5:

    Once the error message disappears change line 69 to read "boolean debug_on = false;"