Ifyour work or hobby correlates with CNC machines or 3D printers, then understanding what G-code is and how it works is essential for you. So, in this tutorial we will learn the basics of the G-code language, what are the most important or common G-code commands and we will explain how they work.
CAM software (Computer Aided Manufacturing Software) is used to convert CAD models to gcode. It works by having the user identify features in the CAD model and then they create tool paths for the feature. It is perhaps the most powerful type of CNC programming software. Conversational Programming Software dispenses with the CAD model. It generates gcode based on a series of wizard-like questions the user answers. Lastly GCode Editing software is like a word processor that has been optimized for manual cnc programming.
Learning Conversational Programming is a start. Picking up Conversational Programming along with some MDI work will soon make you as productive if not more productive than a manual machinist on a manual machine.
G-Code dialects differ in a variety of ways. Most manufacturers have added their own little bells and whistles to make their dialect better for competitive and marketing reasons. For example, Haas has a series of special g-codes for pocket milling, as well as some special parameters and capabilities on some standard G-Codes. It pays to understand the special capabilities of your machine because they were probably put there to save time based on feedback the manufacturer got from its customers.
You can tell at a glance from a backplot exactly what moves the tool will make when the program is run. A very high quality simulator (like the one in our G-Wizard Editor), has a more capabilities than just a backplot:
Forget CAD and CAM. What if you just want to make a simple rectangular bracket with 4 holes? What if you need to turn a little spacer on your lathe? Do you really need the full power and complexity of those things to get those simple jobs done?
Machine Zero is the origin of the coordinate system that corresponds to the machines axis travels. Work Zero and Part Zero are the same thing, and they are the origin of the Work Coordinate System. Put another way, Work Zero/Part Zero establish a WCS by defining its origin. Your CAM program will have a way of specifying the WCS or Part Zero. When you setup the job, you will use edge finders or other sensors to tell the machine exactly where Part Zero is.
It's not hard at all to pick up the basics. Full proficiency with the ability to program complex macros will take longer. If you have some proficiency with programming of other languages, then g-code is a simple language that is not hard to master at all.
This is a tutorial on how I create my svg files from any image. I also show how to create g code that utilizes the cnc to draw and cut. I use Inkscape to trace the image in a diferent layer and I use makercam to create the g code. Settings are in the video.
My suggestion right now whould be: but the router, build the frame and a temporary sled, learn Inkscape, learn makercam, and learn a cad program (I use Inkscape). You can also download the files from the garden and play with the svg files as well.
Hi Can we please have a tutorial on Threadmilling using G41 instead or the software offset.
we are struggling to threadmill a M20 x 2.5 thread using a solid threadmill tool is 14mm dia, 3 fluted, with 14 threads.
The issues we have is that the cutter move out into the hole wall before it starts to raduis to thraed tooth depth, (if would be helpful to use side roughing and do spring cuts).
Hi AnnetWang,
Not sure what you are going on about, nothing you say is in anyway relavent to THREAD MILLING.
I have thread milled on load sof different CNC machines over the years, using either basic ISO programming, (G-Code), or using inbuilt thread milling cycles on the machine.
The issue that I am having with BobCad is that when the tool first move out, before it starts to arc into the start of the thread, it clashes with the side wall of the hole, thus sometimes leaving a dent in the thread.
see the pictures
M20 Thread issue13591146 340 KB
M20 Thread issue13591146 340 KB
So I am new to the longmill machine. I have been having good luck working with easel and carving right out of the software. I have purchased a couple stl files and I am trying to carve them. I use cam lab to convert to g code and then run the file in g sender. So far I have not been able to make this work. I am sure the issue is camlab but I cannot find a good video that shows me how to do what I am trying.
I produce a fair amount of stuff using Carveco Maker (their 3D option is very easy to use) but note that Carveco Maker has a subscription model. (about $18 per month) It is quite easy to master and there is whole boat-load of tutorial material from Carveco.
I have tried to use the software from many other manufacturers of CAM software. My take is this: Unless you are paying for their pro version (Vectric V Carve Desktop, Easel, Shapr3D, Carbide Create, MeshCAM, Sketchup) or stepping up to professional level software, Vectric Aspire, Carveco, Fusion and Siemens NX for example. (not an exhaustive list) then you will not have the facility to carve in true 3D.
I have linked to two 3D carves, from STL files, which I carved recently. You will also find anything with Carveco Maker name in the title on other videos in this channel will demonstrate other 3D STL file carves, I have completed.
Note that for this to seamlessly work, we highly recommend using the M-Codes to control two-way solenoids, and avoiding hydraulic vises or other solutions that don't offer consistent clamping repeatability.
As machinists, Work Coordinate Offsets (WCS) are at the core of everything we do. The key to starting to easily implement Spindle Grippers is to stop thinking in absolute coordinates, and start thinking in relative ones. In order to approach gripper loading effectively, it's critical that we establish a offsets for the following:
We'll start with the easiest of the offsets: The Tool Length Offset of your gripper. Of course, your Gripper will have a piece of stock in it, so it's best to think of your Gripper's length offset as the total length of the Gripper loaded with the stock material before any machining has been carried out. We'll call this, Total Gripper Length from here on out.
Finding and setting your Total Gripper Length is easy: just call up the Tool Pocket that your gripper is loaded in, and insert a piece of your stock manually into the Gripper. Be sure that the stock is in full contact with your Gripper's rubber compression pads. In order to hold the stock in the gripper, we usually use an F-Clamp across the Gripper Plates to hold the stock in place during tool probing.
Now that you have your Gripper loaded with your stock, simply move it over to your Tool Setting Probe and run the Macro for a manual Tool Length. This should be the same (non-rotating) macro that you would use for picking up a single insert of a Shell Mill.
The next step is also easy: finding your machine position of your stock; we'll call this spot the Machining Position. In most first operations, you won't be using softjaws. The easiest way to do this is to insert your material into your Gimbel Automation Air Vise, and use the M-code required to clamp the part. Then, you can find the XY Center of the component and set it to your G54 X and Y coordinates.
Remember how we set the Total Gripper Length to the bottom of our stock material? Be careful here -- the Z coordinate of your Machining Position work offset needs to be the bottom of the material in its clamped position in the vise for this to work properly. When using hard jaws, we usually probe the stepped feature that the bottom of the material rests against.
The last position of concern is that of our gripper tray pockets. There is two approaches to this: The Tray First Pocket Approach and the Tray Center Pocket. For this tutorial, we're going to show you how to set WCS's for the Tray First Pocket approach.
So what does "First Pocket" mean exactly? The First Pocket is simply the bottom left pocket of your gripper tray. To set the Tray First Pocket Position, simply probe the XY Center and Z Bottom of the first pocket in your machined gripper tray. We usually set the Tray First Pocket Position as G55 by probing the XY center and bottom face of our Tray First Pocket and setting those as G55 X0 Y0 Z0.
The trick to doing this all relatively cleanly is to have Macros so the instruction code for your machine only has to be present once, even if it's used several times over the course of executing the full program. For this tutorial specifically, we'll focus on Haas machines, but other machines, such as Fanuc, should have very similar Macros and code structure.
There are two approaches for getting code to jump around and repeat: M97 and M98. M97 jumps to a part of your program by line number, and M98 will jump to an entirely different program. M98 is more flexible and powerful, but far easier to mess up and isn't self-contained. If you are new to Gripper programming, please become comfortable with M97 programs before ever touching M98.
In g-code M97 is followed by PXXX, where the "XXX" is the line number you'd like to jump to. For instance, M97 P100 will jump to line number N100, and continue until it hits an M99 that jumps the code back to the main program (jumps to the line after the M97 code).
I know this all looks like a lot right now, but I promise once you've made a single template and achieved this one time, it goes seamlessly every time after that. If you've purchased a Spindle Gripper from us, reach out to us and we likely have a template for your type of machine ready to go for an easy out-of-the-box coding experience.
3a8082e126