This covers the basic + if you want to learn about G codes. I will advise to see this training in full screen. Link to the NC Viewer is below ncviewer.com/
Superb G-code tutorial, many thanks, it’s just what I’ve been waiting for. If I have followed correctly, then you have an error in line 18, which will cause a tool crash in line 20. Your tool was already 3mm below the material surface, so your safety height move in line 18 should be G00 Z23 (we are in incremental mode). Similarly line 30 should read G00 Z26. I think you can see the error at time 41:38 where the circle holes are at the wrong depth, and the second pass is also too deep (Z-9 not Z-6). If I am mistaken, please correct me. If I am correct, then you have taught me well 👍. Thank you again!
there is a real problem using incremental mode. The machine has an inbuilt error and that error builds incrementally. Using absolute coding the errors are reduced.
say you want to move 1 inch when you move there will be a small error ( on a K&T model2 of the 1960's the error was typically 0.0001'' per inch) If you then reset your datum as you do in incremental mode, and move another inch you will get another error that adds to the first, and so on. When you work in absolute you are making each move relative to a single datum.
Glad I found this channel. I start a new career next week, and even though I am provided schooling to learn, I wanted to get familiar with the material so it didn’t appear to everyone I was trying to learn the difference between Dorian and Ionian Greek. I mean it’s all Greek to me.
G04 should be mentioned. Followed by a P number adds a pause to your program but not a stop. I have a machine that I don't want to move the x axis off the cutter before returning to y zero so the command G04 P7 pauses the program after M9 shuts off my saw blade via relay control for 7 seconds to allow the blade to spin down prior to executing the next line of code. This command comes in handy in ways you don't realize until you are aware of it.
I've done a few years as a machinist and sometimes had to switch from a Fanuc controller to a system known as "Heidenhain conversational" which was a bit easier on the brain cells IMO. I wonder if any others have used it?
Great tutorial! Kept it very simple and exained everything perfectly. I just started learning G code(literally one hour ago) and stumbled across your video. This video gave me a great understanding of the basic commands and it was very motivating working alongside your video writing my own code for a part I need to cut out. I appreciate you very much! I would love to see another part just like this that goes into other G/M codes. Have you thought about turning this into a series where each new part builds upon the previous one writing more and more difficult programs? I think people would really like to see that including me.
A great illustrated tutorial of G code, worth a subscription of anyone's money. This is probably nit-picking but if I set this set of Gcode to my machine the part would be exactly the same shape but the dimensions would not be correct because we did not account for the 6mm diameter endmill so the part would be 3mm less on all sides. To correct this how do we tell the machine we have a 6mm endmill so it cuts to the line rather than inside the line?
Love the way you take the time to explain. Can I just ask how the machine knows what diameter cutter you are using so that it sets an offset (in this case of 3mm) off x0 y0 meaning that the shape is cut to dimension??
Thanks. there is a way to compensate with the command G41 and G42. But not all systems support that gcode. When you write your code, you can compensate easily by your self. as eg. you have a 10mm end Mill (Radius 5) If your distance is X10 that is center tool you can compensate the radius by adding or substarcting the Radius of the tool X5 and or X15
I get the concept, but there's some practical problems. 1) The tool offset. 2) The hole would never be cut because the part would have went flying off on the second pass of the outline. Liked the tutorial.
Great video! Thanks! Is it possible to 'globally' adjust all speeds proportionally? I'm guessing that's done on the controller with the dial somehow? How would we exclude a particular speed IE spindle speed? Thanks
Great information and stepping thru the process of manually G-coding. Well done. I made up my first simple G-Code program and the replay was so fast I couldn’t see it. My question is about the NC viewer. Is it possible to slow the replay down after coding? I looked at the settings and wasn’t able to find anything that would help. Any ideas? Again, thanks for your effort to educate newbies.
When you carved so when cutting the circle out, you went to z20 and then -19 and then -4 which cut out the circle entirely. Would I be right in assuming that going to z23 would get you to your original z20 start height, then z -22 then z-7 to cut the whole circle out? Since it’s incremental the second return to z 20 only raised the bit 17mm as it was 3mm in the material. Is this correct?
Please! clear my confusion. In the line 19, don't we have to add the diameter of the cutting tool in the x-direction? Though the tool path seems matching to the given drawing.
Hi :) You are right, It will cut at the center line, so the hole will be too big. But later today or tomorrow I will release a video about tool compensation.
@@weitlingD3P thank you.im just curious only thats why i ask that question,but your tutorial is very great for the beginners like me who want to learn the gcodes/m codes.
Question… is there a way or… how do you slow the NC Viewer replay down? After I wrote a simple drill gcode it played so fast I couldn’t see the process. Thanks for the previous reply and your “schooling” Best.
g01 is for straight line milling g02 is for a clockwise curve and G03 is for anticlockwise. So if you look at the demo pieces, the straight edges are done in g01. To determine whether it's g02 or g03 you want to see if the cut is clockwise or counter clockwise to the current position, so the first curve (top left) curves away to the right from the current position which is clockwise so you would use g02. Just imagine a clock face at the end of a straight cut, if the line would go clockwise g02, anti clockwise g03.
I THINK FOR THE SECOND TAKE. WE SHOULD GO BACK TO OUR ORIGIN WHICH WILL BE Z24 SINCE THAT WE WERE ON Z-04. AND WE ARE USING G91. WE SHOUT THEN TAKE Z-23 TO BE JUST ABOVE THE PART THEN Z-7 TO BE 6 MM INTO THE MATERIAL. AM I RIGHT?
But you are on G91 which means whenever an order is completed the position of the spindle is the new zero and you are already-3 millimeters on Z axis which is why the circle in minute 41:34 is lower then the actual piece why didn’t you acount for it and sorry for my bad English and thank you for this amazing educational vid
Its my first time learning about G code. Nice simple and to the point, I love it. Just a question though. At line 18 : the G3 code z20 Wasn’t the center at -3 already. Isn’t that making your G00 at z17, I think that’s why the circle cuts were below the original plane of the edge cuts. Edit: well i see some people have already mentioned it in the comments. Good job.
What an embarrassing error on the Z! You moved from -3 and added 20 mm, which is 17, not safe height 20. When you went back down G0 Z-19 you crashed into the piece. Twice! Also, no compensation for the tool? G41/G42 would do that.
how to control steps movements, like lets say we have 400 circular points to move one by one and i need to move pointer in following example sequence starting from 0->10->240->45->28-> .......... -> 400 . How can we automate this ..
You lost me where you copied the program for the second time and supper impose the first. What is the purpose for doing that? Is the first program only draw an outline of 3mm deep?
Hi I have tried to run the code and everything thing works but I cannot get the machine to run the circle for whatever reason, I'm using open builds control and I have change the code on numerous times but cannot even simulate the circle in preview. what am I doing wrong? I have run it on my home built machine as I said everything works except the 15mm circle.
That is So cool it will be very helpful cause i build this 4 Axis hotwire foam cutter but no Good Gcode software available except and expensive one which is DevFoam so I have to modify myself the file before cutting.