DIY-CNC

Do It Yourself – Computer Numeric Control

NC Code Overview

No Comments »

If you are interested in knowing where G-Code comes from, a quick look at the Wikipedia page will tell you that it was first conceived in a lab at MIT way back in the 1950′s.  While its proper name is NC code, short for numerical control , over the years the language has become commonly known as “G” code.  This name comes from the usage of the script itself.  Nearly every command that can be issued to a C.N.C. Machine starts with the letter G followed by a number that indicates what the machine should do.

The basic premise for numerical control is very similar to how we direct work through speech.  If you direct a worker to move a box from one place to another you would indicate the process you want them to perform, a starting location, and an ending location. It takes the worker thousands or even millions of steps going all the way from interpreting your direction to firing the neurons in their brain to move the muscles that eventually lift the box.  In the same sense it takes a vast amount of steps for a machine to perform even the simplest of tasks.  G-Code or NC control code fills the gap between low level machine instructions and mid level communication.

We still have a fair way to go before the machines can understand high level language where we could issue a command  like “carve me a sign that says welcome.”  With the mid level  commands offered by the G-code system we can ask the machine to do things like move in an arc or line, or stop and start a spindle motor.  It takes a lot of coding work or a good high level software program to create a list of commands the machine can follow to create the sign.

Its important to note that not unlike human workers, not all machines understand or can perform every command given it.  In most hobby level equipment a computer running software like Mach3 or EMC2 handles the conversion from mid level commands to low level machine commands that actually control the motors.  At the professional level CNC machinery typically has a control built into the machine that interprets the G-Code.  How the mill/lathe/router handles the commands given is ultimately a result of the controller.  In the 60 or so years the G-code has been evolving we have come to a point where the commands are mostly standardized.  However there still exists some variation in interpretation between CNC controller makers.

G-Code exists as a method for the creator to get their vision into a form that can be produced.  Ultimately there comes a point where design software can do a better job allowing the artist to create than the programming language will ever be able to do.  As you progress you will likely reach a point where its more efficient to let a software package like Mastercam or Vectric Aspire create the G-code.   For simple jobs writing the code by hand is faster.

G00 and G01 Move at Rapid / Feed Speed

Comments Off

G00 moves at rapid

G01 moves at feed speed

Lithophane of Rakka from the anime series Haibane Renmei

Rakka Lithophane