Tag Archives: CNC

Letter Codes List For CNC Machine Programming

If you’ve already learned all of the Preparatory and Miscellaneous function codes, it’s time to move on to the Letter codes for CNC programming. Most of the letters of the alphabet are used on milling machines.

Just like the G and M codes, not every machine uses the same Letter codes. Also, there are several letters that are used in more than one function, but that depends on the input units.

Below is a list of the most commonly used letter codes when programming on a milling center. However, I recommend reading through your machine’s manual to confirm that they have the same function, or if your machine uses different letters/codes.

  • A – Rotary or indexing axis around the X-axis (unit in degrees)
  • B – Rotary or indexing axis around the Y-axis (unit in degrees)
  • D – Cutter radius compensation offset number
  • F – Feedrate function (may vary)
  • G – Preparatory command (G-code)
  • H – Tool length offset number
  • I – Arc center modifier for X-axis (radius)
  • J – Arc center modifier for Y-axis (radius)
  • K – Arc center modifier for Z-axis
  • L – Repetition count for subprogram/fixed cycle
  • M – Miscellaneous function (M-code)
  • N – Block or sequence number
  • O – Program number
  • P – Subprogram number call; Work offset number (used with G10); Dwell time in milliseconds; Block number in main program when used with M99
  • Q – Depth of peck in fixed cycles G73 & G83; Shift amount in fixed cycle G76 & G87
  • R – Retract point in fixed cycles
  • S – Spindle speed in Rotations per minute (RPM)
  • T – Tool function
  • X – X-axis coordinate value designation
  • Y – Y-axis coordinate value designation
  • Z – Z-axis coordinate value designation

Letter Codes List For CNC Machine ProgrammingMost of these letters you will be using over and over again in your programs. A and B are used if you have a four or five axis machine, otherwise you won’t need to use them.

Some letters have multiple uses that you may have to incorporate in your program. “P”, for example, can call out the time that you want to dwell (pause) with a tool, or it can call up a subprogram number.

It’s up to you to learn these if you want to know how to create and edit programs. A lot of the letters are easy to remember, so if you already memorized all of most of the G/M codes then this is a piece of cake.

M-Codes List For CNC Machine Programming

Miscellaneous Functions is another name for M-Codes. How are they different from the G-codes in my previous post? The G-code is a preparatory command for CNC programming, which presets, or prepares, the machine to use a certain cycle or mode. An M-code is an actual machine function.

A machine function is something that the actual machine does, whether it’s turning on the spindle or ending your program. Not every machine is the same because there are many different CNC machine manufacturers, as well as different controllers, so I recommend reading through your machine’s manual to see what M-codes you can use.

  • M00 – Compulsory program stop
  • M01 – Optional stop
  • M02 – End of program (no rewind, usually with reset)
  • M03 – Spindle on (rotate CW for R/H tools)
  • M04 – Spindle on reverse (CCW for R/H tools)
  • M05 – Spindle stop
  • M06 – Automatic tool change (ATC)
  • M07 – Coolant mist ON (optional)
  • M08 – Coolant ON
  • M09 – Coolant OFF
  • M19 – Spindle orientation
  • M30 – Program end (always resets & rewinds)
  • M48 – Feedrate override cancel OFF (deactivated)
  • M49 – Feedrate override cancel ON (activated)
  • M60 – Automatic pallet change (APC)
  • M78 – B axis clamp (nonstandard)
  • M79 – B axis unclamp (nonstandard)
  • M98 – Subprogram call
  • M99 – Subprogram end

M-Codes List For CNC Machine ProgrammingUnlike a G-code, you can only use one M-code per line/block of code. Using an M03 and M04 is not possible because they do two opposite functions.

The more M-codes you try out, the more efficient you can become. M98 can significantly decrease programming and possibly cycle time because it calls up a sub-program that can be repeated over and over any given number of times.

There are more Miscellaneous functions than listed above, which are referred to as ‘machine specific codes’. You will have to learn the codes used by your individual machine and controller to get the most out of your CNC machine, whether it’s a milling or turning center.

Absolute Vs. Incremental – CNC Programming

To be able to write and edit programs, you must know when and how to use Absolute and Incremental modes effectively. More programs are in absolute, but there are times when it’s easier to use incremental.

There are major differences between to the two, so if you don’t know how each one works, don’t start programming until you read this. Mixing the two up can and will cause a disaster

What Is Absolute?

When programming in absolute, all of your coordinates and movement values will come from the origin (0,0) point. If you want to be in Absolute, the G-code that defines this is G90, which is a modal code.

Absolute Programming
Absolute Dimensioning

Most CNC programs are written in absolute because it is easier to understand. Why is it easier, you ask? Because if you have a lot of coordinates to move, you always know where the center of the tool is in relation to the work offset.

What Is Incremental?

How is Incremental different from Absolute? Well, instead of all of your coordinates/numbers coming from one location (0,0 offset), each move is the distance from your current location. That means if you want 2 holes that are 4.000″ apart and start 4.000″ from your start location, you would use X4.0 twice, as opposed to using X4.0 and then X8.0 for the second hole if you were to use Absolute. G91 is the G-code that puts you in Incremental mode, and it is modal as well.

Incremental Programming
Incremental Dimensioning

Which one is better? That depends on what you’re doing, but 99% of the time Absolute programming will be easier. If you’re hand-programming, it may require a little more math, depending on how the blueprint is laid out, but it will be much easier to go back and read or edit the program if there is a mistake.

In G90 (absolute), no matter where your tool is, you can always go move to a certain location by inputting those coordinates, such as X1.625Y-.875. However, if you’re in G91, you can’t just punch those numbers in if your tool is somewhere other than the origin. If you put in those coordinates, your tool will move a positive 1.625 in the X direction, and a negative .875 in the Y direction from where it currently is.

So, how do you get to that location in G91? You have to know where you tool is, then add or subtract the distance of the location from where it is relative to the origin. You see now why incremental can be very confusing? If you’re in G91 and have dozens, or even hundreds of moves, one mistake in the middle of the program and all of the following numbers will be skewed because they all come from the previous location.

On the flip side, you can alternate between G90 and G91. If it’s easier to use incremental for a few moves, use G91, then when you want to go back to absolute, just put a G90 on the line of the next move.

CNC Machine Shop – What Is In It?

While every machine shop is different, you’ll see similar set-ups when you walk through them. There will usually be the main area where all of the CNC milling or turning centers are, as well as a section to deburr parts. Sometimes there will be deburring tools/machines next to the machine you’re running if the operator does all of the deburring.

Usually in a different area there will be a stock room with all of the raw materials needed for upcoming jobs. These few rooms or areas make up a CNC Machine Shop, which is usually a large industrial or steel building, as well as a small pole barn or garage, depending on how big the company is.

Stock Room

Round stock, square stock, and tubing are the most common, and they are usually 8 or 12 foot bars in length. There should also be a band saw in this same room so that someone can cut up the right size stock for each job. Most shops have an automatic horizontal band-saws so that they can cut a large quantity of parts in a short period of time with relatively close tolerances.

Machines

Machine Shop
Machine Shop

Depending on what kind of a machine shop you’re in, there’s a lot of milling machines that could be running. While milling and turning centers are the most common, there’s many more machines, as well as different variations of each.

A shop can have vertical or horizontal milling centers, depending on how complex their parts on, and if they’re a job shop or a production shop. Vertical mills are the most common because they’re cheaper and easier to use and set up.

Lathes are pretty similar, but they can be a flat-bed, slant-bed, multi-axis, or have live tooling for special jobs.

Other machines include, but not limited to: Wire EDM, waterjet, press brake, turret punch, CNC laser, as well as miscellaneous deburring machines (tumbler, straightliner, grinders).

Deburring

Like mentioned above, there will be some deburring tools/machines if the company wants to save money by doing all or most of it themselves. Often times there will be a drill press and grinder next to each mill so the operator can do most of the deburring right there in between cycle times.

The higher quality and quantity the parts, the bigger and better the deburring equipment will be. Giant tumblers/vibratory tubs are often used in large production shops for basic deburring. Media blasting is also common for parts if they are to be plated or coating with something. Zinc, chromate, anodizing, hardcoat/powdercoat, and nickel are just a few coatings that are done to machined parts to give them a better look, last longer, and/or function different.

Inspection Room

Clean Inspection Room
Clean Inspection Room

The inspection room should be separate and enclosed from the shop. If parts have close tolerances, there will be expensive inspection equipment, and the room will be temperature controlled so all of the readings are accurate and consistent.

Tools will include: a granite surface plate, height gage, CMM, bore gage, go/no-go gages for specific jobs, optical comparator, profilometer, thread gages, and gage pins. Not every job will have all of these tools, but some will have more.

Depending on how big the shop is, you (the Machinist), may or may not be inspecting your own parts. The more machines and tools you learn how to use, the better off you will be, so try to get in on how to use the equipment if there is an inspector at your shop.

Well, that’s the jist of what a CNC Shop has on the inside of it! Check out my other articles for tips on becoming a CNC Machinist. Stay tuned for more…

G-Codes List For CNC Machine Programming

To be able to program CNC code, you must know most, if not all, of the G-codes and what they do. A CNC machinist will know how and when to use each code so that that part will run the most efficient. The program address “G” is a preparatory command. It prepares or presets the control system to use a certain mode or operation. Below is the list of G-codes that are used in most modern CNC Milling machines:

  • G00 – Rapid positioning
  • G01 – Linear interpolation
  • G02 – Circular interpolation clockwise (CW)
  • G03 – Circular interpolation counterclockwise (CCW)
  • G04 – Dwell – as a separate block only
  • G05 – High-speed machining on Fanuc control (Look ahead)
  • G09 – Exact stop check – one block only
  • G10 – Programmable data input – Data Setting
  • G11 – Data Setting mode cancel
  • G15 – Polar Coordinate Command cancel
  • G16 – Polar Coordinate Command
  • G17 – XY-plane designation
  • G18 – ZX-plane designation
  • G19 – YZ-plane designation
  • G20 – Imperial units of input (Inches)
  • G21 – Metric units of unput
  • G22 – Stored stroke check ON
  • G23 – Stored stroke check OFF
  • G25 – Spindle speed fluctuation detection ON
  • G26 – Spindle speed fluctuation detection OFF
  • G27 – Machine zero position check
  • G28 – Machine zero return (reference point 1)
  • G29 – Return from machine zero
  • G30 – Machine zero return (reference point 2)
  • G31 – Skip function
  • G40 – Cutter radius compensation cancel
  • G41 – Cutter radius compensation – left
  • G42 – Cutter radius compensation – right
  • G43 – Tool length compensation – positive
  • G44 – Tool length compensation – negative
  • G45 – Position compensation – single increase
  • G46 – Position compensation – single increase
  • G47 – Position compensation – double increase
  • G48 – Position compensation – double increase
  • G49 – Tool length offset cancel
  • G50 – Scaling function cancel
  • G51 – Scaling function
  • G52 – Local coordinate system setting
  • G53 – Machine coordinate system
  • G54 – Work coordinate offset 1
  • G55 – Work coordinate offset 2
  • G56 – Work coordinate offset 3
  • G57 – Work coordinate offset 4
  • G58 – Work coordinate offset 5
  • G59 – Work coordinate offset 6
  • G60 – Single direction positioning
  • G61 – Exact stop mode
  • G62 – Automatic corner override mode
  • G63 – Tapping mode
  • G64 – Cutting mode
  • G65 – Custom macro call
  • G66 – Custom macro modal call
  • G67 – Custom macro modal call cancel
  • G68 – Coordinate system rotation
  • G69 – Coordinate system rotation cancel
  • G73 – High speed peck drilling cycle (deep hole)
  • G74 – Left hand threading cycle
  • G76 – Fine boring cycle
  • G80 – Fixed cycle cancel
  • G81 – Drilling cycle
  • G82 – Spot-drilling cycle
  • G83 – Peck-drilling cycle (deep hole drilling cycle)
  • G84 – Right hand threading cycle
  • G85 – Boring cycle
  • G86 – Boring cycle
  • G87 – Back boring cycle
  • G88 – Boring cycle
  • G89 – Boring cycle
  • G90 – Absolute dimensioning mode
  • G91 – Incremental dimensioning mode
  • G92 – Tool position register
  • G98 – Return to initial level in a fixed cycle
  • G99 – Return to R-level in a fixed cycle
3rd Edition
3rd Edition

Two G-codes may be used in the same block (line), such as G00 and G90, if you want to Rapid to a position in the Absolute mode.

Not all of the listed G-codes are applicable to every CNC machine, so please refer your machine’s manual for confirmation.

For more info on programming, check out the CNC Programming Handbook. It is the most informative and accurate book that I have come across for for programming.

CNC – Computer Numeric Control

CNC Stands for Computer Numeric Controlled in the Machining industry. It is the only way to go, as it is the easiest and fastest way to machine parts. Manual machining is virtually extinct in the industry today, and NC is too outdated by today’s competitive standards. CNC is better because you can write and edit programs in the machine’s controller, giving you complete control of how it runs. If part of the program is wrong, just go into edit mode and change a few numbers/codes.

Instead of taking a drill press and drilling out holes in your part, a CNC program can be written to save save if you have many holes or parts, especially if they are close tolerance. Just punch in the drilling cycle code, the coordinates of the holes, and you have yourself a simple drilling program. Of course there’s more to it than that, such as machine and tool set-up, but if you have hundreds or thousands of holes to drill, you’re going to want a CNC machine.

CNC Machine Operator Training

A CNC Machine Operator is someone that runs production parts in a machine shop. They load and sort parts on a CNC machine, whether it be a milling center, turning center, or other computer-controlled machine.

There are many jobs available for cnc operators because schooling is not necessarily required. A machine operator can get trained in by the CNC Machinist or shop foreman on how to do the required tasks. Any school that has a Machine manufacturing program will teach you how to run machines, make and inspect parts, and how to do well in the industry.

CNC Machinist Jobs

CNC Machinist Jobs are in demand. Manufacturing is starting to pick up again here in the States. Don’t miss out, as there are already job openings, and many more to come, as the “baby boomers” will soon be retiring… Check your local classifieds and listings for jobs in your area. Currently, the Houston, Minneapolis, and Ohio areas in the the highest demand for CNC Machinists.

For local jobs, check out our page, “Job Listings“.

CNC Machinist Salary

CNC Machinist salaries can vary greatly, depending on what your job role is, who you’re working for, and how many hours you’re working. A lot of companies require overtime, so you may be working 50, 60, and possibly 70 hours a week at certain jobs. Not all of them are this way, but you will be making a considerably higher amount by working overtime (time and a half)

New CNC Machinists start out around 30,000-40,000 a year. While this is pretty good pay after finishing school, it can be rather difficult to support a family with just this job.

A more experienced machinist with a higher role will make more due to the fact that they know how to do more, and can often run a shift as a shop foreman. A typical experienced CNC machinist will make about 50-60,000 a year, with a possibility of more with more overtime hours.

Machinist Calc Pro – The CNC Machinists Calculator

Are you looking for the latest technology in manufacturing? Tools, parts, and machines are advancing rapidly, and the speed of things have multiply in a matter of years. The Machinist Calc Pro is a perfect addition to your tool lineup, whether you’re an engineer, programmer, or CNC Machinist.

Trigonometry Math?

Struggle with right triangle math? Basic trig is a must in the Machining industry for calculating angles and part lengths. Fortunately, the Calc Pro can solve the equations for you. Uses trig functions, and you can operate with U.S. standard and metric units, saving you time and headaches.

Speeds & Feeds

If you want to succeed in Machining, efficiency is key. And to be efficient, you must have the best possible feeds and speeds set in every part program. If you don’t, you’re either wasting time, or you’re breaking tools too often (which is also wasting time). The Machinist Calculator automatically calculates the RPM speeds, cutting speeds, feed rate, and chip load. All you have to do is plug in the material, tool, machine info.

Advanced Drill And Thread Size Tables

No more need to look for your drill and thread charts. They’re right on the calculator, saving even more time.

Bolt Pattern Layouts

Have a hard time with bolt patterns? If you need to quickly trig out a bolt circle, just punch in the start angle, diameter, offsets, and number of bolts. It gives you all the x and y coordinates you need!

If you’re programming parts and want to save time, which equates to money, this calculator should be the next thing on your list of tools to buy. It’s very affordable, and you won’t need to dig through pages and pages of the machinist handbook to find drill sizes.

Click Here To Buy The Machinist Calc Pro!