CNC Machinist Made Easy: Intro to G codes
2 Video Views·Sep 19, 2024
This video demonstrates the essential G codes that begin most programs and what they mean
Welcome to CNC machinists made easy
Today introducing g-codes video number 14 today is an essential video
Very very essential you either take snapshots of a screen. I'm about to show you
Or you can put it on pause whatever
Introducing g-codes now g-codes are codes that machine CNC machines
Run on now when I say that there are such things as conversational machines
And and different types of programming, but when you talk about softwares, they have softwares out there. That'll generate g-codes
From images a CAD slash cam software such as Mastercam virtual jib
Bobcat cam feature cam edge cam they have several softwares out there. They're called CAD cam software these
CAD cam softwares the CAD side
Draws the images or imports the images these engineers make or you create and the cam side
Will generate that image. It's a digital file like a DXF or a DWG will generate g-codes
Off them images. That's why g-codes are so essential. You can get into your Mazak's and your Hercules on
Awesome awesome programming
Abilities well you get into these softwares in the old days
They started with g-codes and
When CNC started they started with tape readers, but them things are very rarely used today
They went to g-code g-code programming. They call it that because
It is a ton of G's and each G has representations
There's also M codes sometimes some people refer to machine M codes
There's multiple codes, but overall we call them g-codes now
It is essential what I'm going to share with you right now because I don't want you to get overwhelmed
So I am going to tell you something that often most of you won't believe
But this is how I teach all my guys g-codes. I am going to show you an introduction right here
right here
Right you are looking at right now
If nobody's ever run g-codes before you're probably looking at this thinking what does this mean?
This is an introduction of any and every program almost under the Sun that you will ever write in
Advanced g-code machining. There's four lines right here, and this is the only four lines
I am going to cover at this introduction. We'll do multiple g-code
Videos, but in this this is an essential video
How some people might rearrange them this and some people might say this and that or but I?
Want you to take a look at these four lines?
I want you to memorize these four lines
Because if you're a machinist now or you're a machinist in 30 years from now
And if they're still doing g-codes you are going to be using this
Strategy for the introduction of most every program you'll ever have now you're thinking what does this all mean?
I'm never gonna be able to yes, you will I'm gonna break this down for you. You see that right there
It's the same thing except they put spaces there a little unique thing that I learned okay now what I'm gonna
Do is pull them apart
See they're still looking at the same numbers. It's just now. There's a space between them and now there's a
Separated in bigger spacing why did I do that?
Yeah
You focus on this take a screenshot of this write it down do whatever you have to do this
Gcode these first four lines are g-codes that I've learned g-codes in the early 90s
And I'm still using these four lines for every operation. I ever start
99.9% of the time and when you learn these four you will be able to begin and introduce a program on every level
Let's take a look at this. I don't have to talk long today because you can screenshot this and you can learn this
This is my method of doing it and it's for Phenox. It's for Fidel's or not for that's Phenox. It's for houses
It's for a lot of your basic
G-code programming one of the most basic styles out there
Now we have n1 and 1 and in the definition. I have is above it everything you see look right above it
This is almost a paragraph if I were to write this which I'll go through in a minute and 1 I always put in there
For any operation it was the second operation. I would put an n2 in there, okay?
And this is operation number one leave it alone leave it in its own line
It's easy to search for easy to find now the second one m6 now. There's an M code for you
M6 means you want the machine to change change the tool you're saying hey machine CNC
I want you to change a tool was saying great, but what tool do you want?
I want you to change it to tool one, so you'll have n1 operation number one
Change the tool to tool one right here
The next line and it will do that it will read this in order
Our CNC will always read an entire line at the same time
It'll read entire so oftentimes you can rearrange these however you want to it will read the code
simultaneously for the most part
Here we have a rapid rapid g0 means rapid
I don't know if I've ever gone through that possibly in early videos rapid means the fastest that machine will go
When someone you want to buy a machining center or run a machining center, so what's the rapids rapid traverse?
They call it. What's the rapids some of the machines now will go over a thousand inches a minute
That's just when they're moving from
To the next hole to drop the fastest they can move them aren't feed rates
Them are the maximum machine that speed will move so what you're saying is here rapid
G90 you'll know is a is what they call an absolute
Remember when it went on the video the incrementals and absolutes where this is where this comes in you are saying
You're telling this machine a few things before we start telling you precisely what to do you're saying
I want you to rapid. I want you to do it absolutely in other words any number
I give you I want it from the absolute zero
Not an incremental zero not from the previous hole. I gave you but absolutely to the g54 offset
That's our zero we talked about you could have a zero anywhere you want you could have multiple zeros
But the default zero for G code machining is g54
G55 you can have another zero over on a different vice you'd call that g55
G56 they go up depending on how new or old the machine is you'll have more of them
They're your offset g54 and them in the most all G code machines g54 is your standard default first one zero
So you're an arm every time I say this I'm gonna say just like a sentence. You're saying hey machine
I want you to rapid to the absolute points using this zero to
X0 y0 you can put anything you want in there
I'm just doing it to be easy if you knew you were gonna drill a hole at
X1 y1 you would have x1 point a machine always needs a point after the whole number even if it's a one point
You put one point, but one point if you put one it's gonna point zero zero zero one default to that one point
Why one point?
M3 meaning okay, we're to that position turn that baby spindle on clockwise, okay great
But you got to identify how fast s s is how fast twelve hundred twelve hundred RPMs
Now I'm gonna read this like a sentence to you. This is operation number one machine
I want you to turn this change the tool the tool one then I want you to rapid
Absolutely referring to this zero to X zero Y zero
I want you to turn the spindle on at twelve hundred RPMs. I'm gonna in the next video
I'm gonna possibly I'm not gonna promise
But I'm gonna show take this program, and I will write that that same program in the thing
I could make a small MDI program or I can write a small program
And you will see that this machine will do that line for
G43
G43 in the best terms I can come up with easiest and user is friendly to understand is you're saying I am going I want
You to activate a height
Remember when we talked about each tool has a different length each tool has a different
Length and offset you're saying okay. I'm gonna introduce the height
I'm activating a certain height a height of what h1
H1 is the height of H is a tool one
It doesn't have to be but to make it easy back some of the newer machines
We'll say hey, do you know t1 and h1 don't match up?
They don't need to match up
But it's very customary to do that until you start getting into more advanced machining where you would like to use a different height
I always like to keep my T's and H's
Matched up doesn't mean tool one
It just means the hot you want to use height one to make everything easy keep them numbers the same
At least in the beginning you'll know you can use height and tools differently if you choose to do so
But that's way more advanced
So activate your height the height of two of this case two one and
Remember you're still wrapping now. You've got it now
You have an XY you had an XY move up there it went to that position now
You've got a Z move three inches above your part and m8 means you turn your coolant on okay?
Now these are the first four lines. I don't care what you do
I don't care how you do it go to bed at night memorize them. I'll close my eyes right now
I'll close my eyes now, and I'll read this n 1 m 6 2 1 g 0 g 90 g 54 x 0 y 0 m
3 1200 g 43 h 1 z 3 point m8
I read that in my head just now learn it learn what each one of these means
I don't care if you're machining for five days or 20 years this
Are the four lines that are critical and essential if I did not put an m8 in here the equivalent will not come on
if I did not
Put a g0 in here
It may not know that it wants you to wrap it if I did not identify these things
These are the things you want to identify. I will say it now. I'll read this
in a program
Just like you're talking to the machine machine. This is operation number one
I want you to change the tool one
Wrap it to the absolute point of this offset to go to that position want you to turn the spindle on at 1200 RPMs
Activate a height of 2 1 or h 1 and I want you to fly down 3 inches above that part
How do we know that's that tools 3 inches above that part watch my videos of touching tools off
Now because it knows that h 1 where the top of the part is so if I say 3 point
It's going to stop 300 thou or 3 inches before excuse me 3 inches before that part m8 turn your coolant on
every program
Every program that you run
99% of the time these four lines will get you on the run with that program
You have no idea how much you will learn just memorizing learning and understanding
take a screenshot of that of
This right here write it down in a notebook and study it and don't move on to the next videos until you know
what not only
How they're used but in in what they're what they're used for use the definitions above so you're aware of what you're commanding that machine
to do
My name is Matt. I am here with introducing g-code CNC machining made easy. I want to thank you for watching
And this and just practice this. Thank you

