Using Grbl - paulusjacobus/grbl GitHub Wiki

This wiki page is intended to provide various instructions on how to use Grbl. Please feel free to contribute and help keep this page up-to-date!

NOTE: Check out ShapeOko's Wiki. It has the most up-to-date and comprehensive list of Grbl GUIs.

How to Stream G-Code Programs to Grbl

[cncjs] (https://github.com/cncjs/cncjs)

cncjs Screenshot

Cncjs is the easiest to work with program. There are desktop deployable binairies which makes installation very simple, just download and click open. See https://github.com/cncjs/cncjs/releases

The other option is to install nodejs which is complex but gives you the option to set the engraving file size which is handy when loading big a4 engravings. Current cncjs is set to max 10Mb but they might have increased it after writing this. Latest version is 1.9.9.

Connect via cncjs via list com port, select a comport and connect with 115200 baud rate. Hit unlock to clear the alarm which tells you that gerbil does not know its position. Home it via the homing button so it knows where its laser head is. Load a gcode file but set the 3d rendering to a list to preserve memory and speed up loading.

Stored config Type $$ in the command line interface (click in the black input field area to enable input and type $$) and hit the send button. Inspect the $ settings so you know everything is right. See the page with Gerbils default settings (configuring Gerbil 1.1.e).

Offsets Click on the clog wheel within the jog controls called 'Axes' (x and y axis) and set the max speed for travel to a value between 1000 to 1500) for smooth jogging of the laser head. If necessarily you can set up an offset to position the head at the edge of the laser workable area by clicking on the 0.000 work coordinates which allows you to configure this. For example enter -1.000 for the x axis to move the x xero position 1 mm to the right. Configuring the laser operation and calibrate the laser greyscales is done within the black console field. It's the same field where you typed $$ to read Gerbils current configuration.

laser settings You can alter settings like $30 to calibrate the laser power range (strength), $31 for minimum lasering and $28 for the laser pwm mode (0 is default, best for k40). Examples are $30=2000 sets the max value of the laser to 2000 (=18mA), so engraving values i.e. 300 (black approx. 2mA) becomes about 7th of the laser range. $28=0 sets the pwm frequency to 244Hz and $28=1 to 61 Hz (dither effect). The slow frequency reflects the slow response rate characteristic of a laser tube. Solid state laser diodes are much faster so you can use higher frequencies (i.e. $28=2 equals 1.9kHz) if you happen to deploy a laser diode.

[bCNC] (https://github.com/vlachoudis/bCNC)

bCNC Screenshot

An advanced fully featured g-code sender for GRBL. bCNC is a cross platform program (Windows, Linux, Mac) written in python with minimal external dependencies. The sender is robust and fast able to work nicely with old or slow hardware like Rasperry PI (As it was validated by the GRBL mainter on heavy testing).

Features:

  • simple and intuitive interface for small screens
  • importing g-code and dxf files
  • fast g-code sender (works nicely on RPi and old hardware)
  • workspace configuration (dialog for G54..G59 commands)
  • user configurable buttons
  • g-code function evaluation with run time expansion
  • Easy probing:
    • simple probing
    • center finder with a probing ring
    • auto leveling, Z-probing and auto leveling by altering the g-code during sending.
    • height color map display
    • manual tool change expansion and automatic tool length probing
  • Various Tools:
    • user configurable database of materials, endmills, stock
    • properties database of materials, stock, end mills etc..
    • basic CAM features (profiling, pocketing, drilling)
    • User g-code plugins:
      • bowl generator
      • finger joint box generator
      • simple spur gear generator
      • spirograph generator
      • surface flatten
      • ...
  • G-Code editor and display
    • graphical display of the g-code, and workspace
    • graphically moving and editing g-code
    • reordering code and rapid motion optimization
    • moving, rotating, mirroring the g-code
  • web pendant to be used via smart phones

Universal G-code Sender (UGS) [Java Cross-Platform]

UGS main window UGS visualizer

A full-featured GUI, developed by @wwinder, that streams, visualizes G-code, and has complete control and feedback functionality for Grbl's higher level features. It's written in Java, which means it can be run on any Java-capable machine including the RaspberryPi! The Grbl group works closely with this project and highly recommend using this GUI. If you find any issues or would like to request more GUI features, @wwinder has done a wonderful job in completing many of the requests.


Easel [Browser-based CAD + CAM + Grbl controller]

Easel Screenshot

Easel is a web based project developed by Inventables specifically for use with X-Carve, Carvey + Grbl. It is an all-in-one package for design (including SVG imports), toolpath generation, and machine control. It also has an app store where 3rd party developers can make apps that can import into Easel. Documentation for how to make an app is here (https://discuss.inventables.com/c/easel/app-development). In addition to 2D design tools, Easel lets you preview your toolpaths in 3D before sending them to your machine. You can also import G-Code into Easel and use it as a sender. Easel is in constant development by the Inventables team. You can request features or report issues through the feedback button in the app or on the Inventables forum www.inventables.com/forum.


GRBLweb [Web Browser]

GRBLweb ui

GRBLweb is a web based GCODE sender and controller for GRBL. Multiple serial devices can be connected to control multiple machines.

There is also a pre-built Raspberry Pi image based on Raspbian running GRBLweb available here.


GrblPanel [Windows]

GrblPanel

Maintained by retired computer professional @gerritv, GrblPanel is a GUI that implements more advanced features and functionality commonly found in production machines like Haas, Fanuc, etc. All of the required tools for setting up and running a milling job are neatly arranged and designed to be easily accessible based on decades-old accepted workflows in machine shops. GrblPanel currently only works in Windows via .Net v4.5, but will eventually be updated for cross-platform use through Mono.


grblControl [Windows/Linux]

screenshot_heightmap_original

GUI application for GRBL-based CNC-machines with G-Code visualizer.

Supported functions:

  • Controlling GRBL-based cnc-machine via console commands, buttons on form, numpad.
  • Monitoring cnc-machine state.
  • Loading, editing, saving and sending of G-code files to cnc-machine.
  • Visualizing G-code files.
  • Autoleveling Z-axis for PCB milling.

Python Streaming Scripts (Officially Supported by Grbl) [Cross-Platform]

NOTE: If you are having difficulties with streaming to Grbl, we will ask you to use this Python streaming script to eliminate the GUI you are using as the source of the issue. Before posting to the issues thread, please use this script to run your G-code program.

Included with the source code and officially supported by Grbl, two Python streaming scripts are supplied to illustrate simple and more complex streaming methods that work well cross-platform. These scripts don't fully support all of the Grbl's features, but are intended more as a way to compare or troubleshoot other garden variety or newly-written GUIs out there. These are located in the 'script' folder on the main repository. Note: The streaming scripts require the pySerial module installed.

  • Install the pySerial module.
  • Download simple_stream.py Python script.
  • Open the script in a plain text editor and change the following line to reflect your system:

s = serial.Serial('/dev/tty.usbmodem1811',9600)

  • In place of /dev/tty.usbmodem1811(Mac), you should put the serial port device name of your Arduino. This will be different for each machine and OS. For example, on a Linux system this would look like /dev/ttyACM0. Or on a Windows machine, this may look like COM3.
  • The script looks for and reads gcode from a file named grbl.gcode, you should create this file and put the gcode you want to execute in it. Or simply change this name in the script to your needs.
  • Open a terminal/command window and change directories to the location of the Python script and execute the Python script with the following command:

./simple_stream.py (Mac/Linux) python simple_stream.py (Windows)

  • You should now see the gcode being streamed to grbl along with 'ok' messages and your machine should begin moving.

The other, more advanced streaming script stream.py has command line arguments and does not require modifying the script itself, unlike simple_stream.py. The main difference is that stream.py uses a character counting scheme to ensure that Grbl's serial read buffer is full, which effectively creates another buffer layer on top of Grbl's internal motion queue. This allows for Grbl to access and parse the next G-code block immediately from the serial read buffer, rather than wait for the 'ok' send and response in the simple_stream.py script. This is very useful for motions, like curves, that have very rapid, short line segments in succession that may cause buffer starvation, which can lead to strange motion hiccups. In other words, it ensures a smoother motion. Use this script, if you are not afraid of command line or are experiencing weird motions.


Other GUIs

grblUI

A simple graphical user interface: https://github.com/jgeisler0303/grblUI. Programmed in Java, using rxtx for serial communication. Should theoretically run on Linux, Mac and Windows alike. Apparently some problems on Mac. Any feedback, tips and tricks appreciated (Issues or Wiki in grblUI). Check out the ready to use jar in the Downloads.

grblgui

A graphical G-Code Streamer: https://github.com/cody82/grblgui. Programmed in Java, using rxtx for serial communication and OpenGL 2.0 for rendering.

Notable features:

  • It displays the job duration and remaining time to complete in minutes.
  • It displays current speed.
  • You can toggle feed hold and enter G-Code commands.
  • It displays the buffer status graphically on the toolpath!

In development:

  • Simulate the milling process and display the resulting model.

CNCinfusion [Windows]

Currently under development in C# https://github.com/nm156/CNCInfusion

Gcode Sender [Windows]

https://github.com/downloads/OttoHermansson/GcodeSender/gcodesender.exe http://www.contraptor.org/forum/t-287260/gcode-sender-program


Serial Emulators:

Other than CoolTerm or PuTTY, Linux and Mac systems have a great lightweight serial emulator called screen that's either built in or easily installable (apt-get install screen) through the terminal interface.

If your device is connected on /dev/ttyACM0 (for Mac, /dev/tty.usbxxxx), type screen /dev/ttyACM0 115200 to connect to the device at 115200 baud. There you'll be connected to Grbl. To exit

To get out of the screen interface, simply press Ctrl-a followed by a k.