Jump to content

The Brunsfield Center/Manufacturing Technologies/CNC

From CEED Wiki

What is CNC?

CNC stands for Computer Numerical Control. It is a manufacturing method that involves controlling a machine tool by feeding it computer codes for certain operations. There are many different machines that operate using CNC technology, most commonly mills, lathes, and routers. However, many people don't realize that other machines like 3D printers, laser, plasma, and water jet cutters, wire EDM (electric discharge machining), grinders, pick & place machines and more operate on the same principles, often even using some of the same codes.

All these machines and more use G-Code. G-code is the language we use to talk to the machine, it uses codes like words to tell the machine where to go and what to do. Once the code is uploaded to the machine, the controller turns code into electrical signals which control different parts of the machine like motors, coolant pumps, heaters, and so on. Think of the controller like a translator that translates the code we know to signals the machine understands​. Keep in mind that mills will have different codes from routers, lathes and so on (they speak different dialects of the same coding language)​, and there are even different codes for machines that have 3, 4 or 5 axes or that are made by different brands (like regional accents)​.

CNC manufacturing can be incredibly useful, but only in the right situation. It is more precise and can produce more complex parts than manual machining, and the time spent actually machining is faster​. This is ideal for production runs, complex parts, tight tolerances, or surface finish requirements​. On the other hand, it takes much longer to setup (CAD, CAM program, tool setup, machine setup). It also requires in-depth knowledge of programming and CAM software​. As such, it is not useful for simple parts, low-scale production, or prototyping​.

For more information on CNC machining, including G-code, CAM, and speeds and feeds, visit the following YouTube channels:

Haas Automation

NYC CNC

Our CNC Machines

The Brunsfield Center and MTC are home to several different CNC machines with a variety of capabilities.

  • Haas Mini Mill 2
  • Haas TL1 lathe
  • Tormach PCNC 1100 mill
  • two Larken Automation Camtool 24/36 routers
  • Larken Automation System 100 router
  • FoxAlien Desktop router

The two Haas machines are our newest and most powerful machines. They are reserved for JMTS teams making custom parts and are operated by the manager of JMTS, Jason Demers. All other CNC machines are available for use by students upon completion of both parts of the CNC training and with approval from the Brunsfield manager, Alex Vendette.

G-Code

G-Code is the language used to communicate with CNC machines. Invented in the 1950's at MIT, it used to be punched onto rolls of tapes that were fed into the machine on a wheel. In learning G-Code, you will notice that some codes have become less useful in modern times as technology advances. For example, the code M30 calls the machine to rewind the code as if it were still on a physical tape, even though computers have been in use for three decades.

Nowadays, the power of computers and CAM (computer-aided manufacturing) software has made CNC machining significantly more accessible. Once you have a model of your part, you can simply load it into the CAM software, define the desired tool paths, and adjust a few parameters, and the software will output dozens or even hundreds of pages of code in an instant.

An example of G-Code syntax

As a coding language, G-Code is relatively simple. A single code will always follow the format of a letter followed by several numbers; this is called a word. A string of words together on the same line is called a block, you can think of this like a sentence. Every code can be sorted into one of three categories: Preparatory codes, Miscellaneous codes, and Address codes. Preparatory codes, or G-codes for short, are the codes that control the machine's movement and geometry. Miscellaneous codes, or M-codes, control auxillary functions of the machine, such as coolant or tool changers. All other codes fall under Address codes.

There is a generally accepted format to organize any G-code program to make sure it runs smoothly, and more important safely.

  1. Safe start-up codes: this section will includes codes to do things like switching between imperial and metric units, initializing the part origin, selecting a motion mode, and more. The idea is to reset any odd settings that might still be active from the last program and make sure everything is operation as it should.
  2. Tool loading: this is usually a very small section. It takes care of loading the tool into the spindle of the machine, calling up all the offsets for that tool, and turning the spindle on. It will also turn on cool pumps or other auxillary functions of the machine.
  3. Rapid to part: this is when the machine will position the tool above the part to start machining. Up until this point, you should run the program in single-block mode, meaning one line of code at a time, to check that everything is working properly.
  4. Machining operation: from here on, turn off single-block mode and run the program normally. This section is where the fun happens.
  5. Shut-down sequence: once the machining is done, the tool will move away and the spindle, coolant, and auxillaries will turn off. If you have a multi-tool program, then the next section will restart at step 2 and continue in a loop for however many tools are needed.
  6. Program end: once all machining passes are done, there should be another line of codes similar to the safe start-up codes to make sure the machine doesn't do anything weird when it comes back online. Finally, you'll see the code to terminate the program and you can grab the part.

Computer-Aided Manufacturing (CAM)

For all CAM work, CEED recommends Fusion 360 by Autodesk. Fusion 360 is free for students, easy to learn with hours of tutorials across the internet, and can even work in conjunction with Solidworks by uploading Solidworks file types to your Autodesk account.

The following video provides a brief but relatively detailed tutorial on making a part and CAM program in Fusion 360. If you're only interested in the CAM portion of the tutorial because you prefer Solidworks for modelling, you can skip to 5:30.

Fusion 360 tutorial

You can also find more detailed tutorials and additional resources on the Autodesk website, here.

Feeds & Speeds

The most important part of programming a part to be machined is feeds and speeds, meaning how fast is the tool spinning, moving across the part, and removing material. Although it may seem daunting at first and can take years of experience to truly master, there are a handful of simple equations that can provide a good starting point.

The goal of these calculations is to find the values for the S code (spindle speed) and the F code (feed rate) in the NC program. However, these values will be different depending on the material of the workpiece, the material of the tool, the size of the tool, the power output of the machine and more. Therefore, we must derive the S and F values from these material and geometry properties.

The first and simplest equation helps us calculate the S value for spindle speed. In this equation, D is the diameter of the tool in inches and SFM is surface feet per minute which is a property of the material. SFM refers to the optimal linear speed of the cutting edge across the surface of the material. Consider cutting a piece of wood with a hacksaw, the SFM value would correspond the speed you push and pull the saw blade through the wood.

To calculate the feed rate, we must first have the spindle speed. The equation that follows also uses the number of flutes or cutting edges on the tool, and a value called Chip Load, also known as IPT, CPT, or FPT (Inch/Chip/Feed per tooth). Chip load refers to the thickness of the chip, or more specifically how much material each flute removes each revolution.

Find more information on calculating feeds and speeds in the Sandvik Coromant blog, here.

Other Condiserations

Chip Thinning

Chip thinning[1] is a phenomenon caused by the circular geometry of a milling tool. As radial engagement decreases, the actual thickness of the chips being cut will end up smaller than what the programmed S & F values should produce. At a radial depth of cut (RDOC) of 50% of the tool diameter, the actual and programmed chip load will be exactly equal, but as the RDOC decreases, the cutting edge of the tool will start to enter the material at an angle. Illustration from Harvey Performance[2].

For most operations, chip thinning won't be an issue. Where it becomes a problem is in situations where a big tool has a small RDOC, for example a half inch tool taking a .001” finishing pass at a programmed FPT of .005” results in an actual FPT of only 0.0004”[1]. It's important to realize that no cutting edge is ever perfectly sharp. The flutes of most endmills have a radius on the edge of about 0.0001-0.0003", so the operation mentioned above would create chips barely wider than the sharp edge. This will cause the tool to rub more and drastically decrease its useable life.

To avoid rubbing, there is a formula to convert the programmed chip load into the actual chip load, based on RDOC and tool diameter. NYC CNC understands that this equation is not very nice to deal with, so they've made a wonderful excel sheet that can do almost any S&F calculation you may need. Once you've calculated the optimal chip load for your material, you can adjust the spindle speed, feed rate, and RDOC to achieve it. Keep it mind, however, that changing one of these to the ideal window may bring another outside of that window.

Machine Limitations

An important and often overlooked part of dialing in your speeds and feeds is the capability of the machine itself. Some machines have weaker spindles or slower axes than others, and settings that work on one machine may not on another. To find the power requirement of a certain operation, first we need to determine the Material Removal Rate (MRR) which typically has units of cu in/min. Once the MRR is known, divide it by the material's K factor, which represents the MRR that can be acheived by 1HP and is a function of the material hardness.

Another factor of the machine that's less understood is rigiditiy. This refers to how stiff all the joints and connections in the machine are, as well as how much backlash the motors have and the integrity of the work holding method. Any part of the machine or setup that's less rigid than it should be is a potential source of vibration, which can lead to tool chatter, higher wear on the tool and internal parts, poor surface finishes and low tolerances. Therefore, it's important to make your setup as rigid as possible and adjust your feeds and speeds as needed. Although it may seem counter-intuitive, generally it actually helps to go faster to mitigate vibration[3].

Tool Geometry, Materials, and Coatings

While most of the above calculations have been based on solely the work material, it is also important to consider the tool itself. Choosing the right cutting tool material is essential for machining efficiency, requiring a balance of hardness, toughness, and resistance to wear and heat. Materials like High-Speed Steel (HSS), carbide, ceramics, and silicon nitride each offer advantages based on machining conditions. Tool geometry and coatings such as CVD and PVD also play key roles in performance by affecting chip flow, wear resistance, and toughness. While premium tooling may slightly increase costs, it enables higher feeds and speeds, significantly boosting material removal rates and reducing cycle times—often far outweighing the added expense.[4]

  1. 1.0 1.1 NYC CNC. (n.d.). Getting started: Feeds & speeds. Retrieved June 16, 2025, from https://nyccnc.com/getting-started-feeds-speeds/
  2. Harvey Performance Company. (n.d.). How to combat chip thinning. In The Loupe. Retrieved June 16, 2025, from https://www.harveyperformance.com/in-the-loupe/combat-chip-thinning/
  3. Sandvik Coromant. (n.d.). Milling vibration. https://www.sandvik.coromant.com/en-us/knowledge/milling/vibration
  4. Hess, E. (2024, May). Easy guide to cutting tool material selection. CNC Cookbook. https://www.cnccookbook.com/cutting-tool-materials/