Dedication

This tutorial is about building a custom GUI for LinuxCNC using Glade3, Gtk2, GladeVCP, Python and some magic I think sometimes. This is the only from scratch tutorial for building a custom GUI for LinuxCNC.

Note
If your using an OS newer than Ubuntu 10.04 you need to install Glade 3.8

In a terminal:

sudo apt-get install glade-gtk2

While the GUI’s supplied with LinuxCNC cover most applications many times you might want the GUI layout different or some unneeded things removed to give you more room for larger back plot for example. Or in my case I want the GUI to fit the specific needs of my plasma table. I want a tab where I can make three mouse clicks on material, thickness, and nozzle then have my feed rate, cut height, pierce delay, pierce height, voltage, amp setting etc pulled from a table and inserted into my subroutine. Something like this is not possible to add on to a stock GUI without going nuts.

This is an almost never seen on the web, tutorials without any ads… I hate tutorials written or stolen solely for profit!

Custom LinuxCNC GUI

The following tutorials will progress from the simplest thing I can come up with to more advanced. But if your like me you need to understand the basic foundation first. I do recommend viewing my Glade3 Tutorials first.

These first tutorial will show how to create a super basic GUI that does nothing but exit properly. I hope to progress from there to some kind of working application.

The Scope of Tutorial 1 is:
  • How to add objects to the main window in Glade3.

  • How to create signals in Glade3 for objects.

  • How to link them up in your Python code.

  • How to build your GUI using the GtkBuilder

The Scope of Tutorial 2 is:
  • Adding some Action Widgets

  • Changing how the screen looks

The Scope of Tutorial 3 is:
  • Running the GUI from an ini file

  • Updating status using the linuxcnc stat() function

The Scope of Tutorial 4 is:
  • Polling the Error Channel

  • Sending the Error to the Status Bar

  • Testing the Periodic code for Errors

The Scope of Tutorial 5 is:
  • Getting ready to issue a command

  • Homing the machine

The Scope of Tutorial 6 is huge:
  • Build a New GUI to maximize screen usage

  • Create HAL and INI files

  • Adding Show Hal program to the menu

  • Checking for and Running a Post GUI HAL file

  • Enabling parts of the GUI based on conditions

  • Creating Jog Buttons

  • Checking for and reading values from the INI file

  • Setting the default value of a Slider

  • Reading the value of a Slider

  • Jogging an Axis

Tutorial 7
  • In the works

The Scope of Tutorial 8:
  • Using the Gremlin back plotter in your GUI

  • Changing Options in Gremlin

  • Showing an Error in the G code file

  • Putting Errors in the Status Bar.