Tech Support: 888-223-3334

CADD Edge Engineering & Design Blog
Tips, Tricks & News from CADD Edge

The Language of CAM G-Code Tutorial Part 1

Posted by Gabe Enright on August 10, 2012 at 2:12 PM

A G what?

One of the problems with using CAM is that people either forget or never knew how to read the program running their machine. While it’s not a bad thing to trust your CAM, when you’re trying to figure out why something isn’t working as planned at the machine it can be quite helpful to understand the instructions it's being feed. So I have decided to do a blog series on G-Code.

There are bout as many different languages as there are controls. In an effort to keep this as simple and clear as possible, I will be using the most commonly used one and that’s G-Code. In an effort to standardize even more I will be using the base of just about every G-code standard and that’s the FANUC 6M.  By the time I am done any one reading these blogs should be able to program the part below by hand.

That’s my goal anyway.

Simple machined block

There are a few different letters used in G-Code ranging from A-Z, and the meanings of some of them change depending on where it’s used. Don’t worry I will be covering most of them.  So to start here are the G-codes I will be covering.

G00 - Rapid Positioning
G01 - Linear Interpolation
G02 - Arc Clockwise
G03 - Arc Counterclockwise


G04 - Feeding Dwell for some time


G17 - X - Y Plane selection
G18 - X - Z Plane selection
G19 - Y - Z Plane selection


G20 (G70) - Inch Units
G21 (G71)- Metric Units


G28 - Automatic Zero Return


G40 - Tool Compensation Cancel
G41 - Tool Compensation Left
G42 - Tool Compensation Right


G53 - Machine Coordinate System Setting
G54 – Work piece Coordinate Setting #1
G55 – Work piece Coordinate Setting #2
G56 – Work piece Coordinate Setting #3
G57 – Work piece Coordinate Setting #4
G58 – Work piece Coordinate Setting #5
G59 – Work piece Coordinate Setting #6
G73_ High Speed Peck Drilling Cycle

 

G74_ Left Hand Tapping Cycle

G76_ Fine Boring Cycle

G80_ Canned Cycle Cancel

G81_ Drilling Cycle (Canned)

G82_ Counter Boring Cycle (Canned)

G83_ Peck Drilling Cycle (Canned)

G84_ Right Hand Tapping Cycle (Canned)

G85_ Boring Cycle (Canned)

G87_ Back Boring Cycle (Canned)

 

G90 - Absolute Positioning
G91 - Incremental Positioning


G98 - Feedrate Per minute
G99 - Feedrate Per Revolution

 

The top of the list is G00. The format is the G followed by 2 digits. That is the standard but with all standards there are exceptions. You may also see the G00 written as G0. Not all controls require the leading 0. In this case the 00 means to position the tool at a rapid traverse. In other words move as fast as the machine can. Simple right?

Well there is a little more to understand and that’s how the machines actually move. There dogleg rapid traverseare three different ways a machine will position in rapid. The first one is it will move directly from point A to point B. the other two are referred to as doing a dogleg move. But what some machines do is move both axes at the same rate making a 45° move, then finish the longest leg move. The third will move just the opposite as method two. It will make a straight line move and when the distance left is equal it will move both axes. Why is this important? Well Cam systems don’t know how YOUR machine moves so it is up to you to understand it.

 

The next code I will talk about is G01 along with G40-42 and the F command. So until my next blog happy programming.

-Jeff-

CAM

Subscribe to Blog