If you insert a G0 before the Z0.25 it will work
Hi,
Any idea why this code won't run in NCPlot? I can get either the linear holes or the bolt circle, but not both. If I comment out the G72 line (4th line in the code below), the bolt circle code works.
(DRILL SET OF LINEAR HOLES HERE)
G90 (ABS POSITIONING FOR FIRST HOLE)
G81 X1.25 Y.4 Z-.5 R0.1 F10.0 L0 (POSITION DONT DRILL)
G72 I0.4 J90 L4
G80 (CANCEL CYCLE)
Z0.25 (MOVE OFF PART)
(DRILL BOLT HOLE CIRCLE)
G90 (ABS POSITIONING)
G81 X2.0 Y1.0 Z-.5 R0.1 F10.0 L0 (POSITION BUT DONT DRILL)
G70 I0.5 J-0.0 L8 (DRILL 8 HOLES)
G80 (END OF DRILL CYCLE)
I am pretty new to CNC programming but am taking a class at a local Community College.
Thank you...
Similar Threads:
If you insert a G0 before the Z0.25 it will work
mcode,
You are correct! Thank you!!!!!
I removed the Z0.25 command since it wasn't necessary. I still had to add the G0 though, which is fine but doesn't make sense to me.
I have another program that drills 10 bolt circles. I had to add G0 to each move statement in order for them to display. I ran the same program on a school computer and the G0 wasn't necessary. Is my installation somehow messed up?
I have found that checking "G00, G02, G03 are non modal" in the control settings will show all the tool path without inserting a G0
Once I found the command in the Setup menu and checked it, that helped A LOT! Adding the G0 command cancelled the the drill cycle so even though my tool path looked OK from a top view, there was no depth to any of the holes. It shows the drilling correctly now. Thank you very much.....
The tool path still has a couple things that aren't quite right, but now I can work on them since I can see the tool path.
Glad I can help. As far as I can tell NCPlot updates and improvements are not being made, It's too bad because It's a great programming tool.
Mactec54,
Thank you for the assistance...
I would agree, which is why I posted on this site. Here is a set of screen shots showing the difference between adding G0 (which does not cancel the drill cycle now for some reason). It also shows how the machine settings change the program behavior.
Mactec,
Thank you... I added the G80G0 after the linear holes also and it worked for this program, which is pretty much the same as the first suggestion of adding G0. However, it isn't a solution that works for my "real" programs. I have attached a program that does three bolt hole circles showing the NCPlot output without the G0 command, and with it. I also show the difference with the non-modal setting specified.
Last edited by johntlarson; 04-19-2021 at 11:11 AM.
Mactec,
I updated the previous post! Sorry for the confusion. I am working with NC Plot software on my computer.
Thanks again!
Mactec54
Also a G72 is not a bolt hole pattern for Haas control only G71
Mactec54
Mactec,
Thank you again....
This thread has drifted a little and the commands I am running in the later examples are not just G70 and G72. In the last example, I am running pretty much using just G70, inside a G82 canned cycle to produce several bolt circles. As you can see in the attachment, without G0, the commands are pretty much ignored. With G0, the hole placement shows up but the holes are not drilled.
The initial program had a series of holes in a line (G72) and then a bolt circle (G70). The Haas manual shows G70 as a "Bolt Hole Circle", G71 is a "Bolt Hole Arc", and the G72 code "Bolt Holes Along an Angle". I apologize if my terminology isn't quite correct. I am still pretty green at this!
You are of course correct that the L0 doesn't drill the hole, which is intentional. The command puts the mill at the center of the pattern prior to drilling the bolt circle which is one of the requirements for issuing the G70 command.
Haas has a good diagram in their manual comparing G70, G71, and G72 here: https://www.haascnc.com/service/code...value=G72.html I don't know what is commonly used, but I would think that G72 is more commonly used than G71 since it drills a full circle of holes.
When it gets down to what do most people use, is there Cam software and would not use any of these G70 G71 or a G72 to do there Hole patterns they are there for hand coders but is very inefficient way to program, it is 2021 I have not used any of these codes in the last 15 years, so in reality this is a worthless exercise, unless you don't have any type of cam software, which some you can get for free not very good, but get the job done for anything like this
Mactec54
Mactec,
Unfortunately, I agree with you are am sure you are correct. It has been interesting to learn though. I started "making things" on a manual mill and lathe so CNC and G code is a huge step up, but writing G code is certainly not anywhere near the top of the mountain. My class is manual G code programming, so that is what I am doing. It's over in a few weeks though and after that. I am taking the class for "fun" so I don't know how much of this I will ever use. I have thought about getting a CNC Lathe which would be more useful to me than a Mill.
I talked with a friend who runs a machine shop which has a couple CNC Mills (not Haas) so my programs wouldn't run there and he said that he had not written a G code program in a bunch of years, if ever. He uses AutorCad (I think) and something else.
Thank you again for your help....
G-Code is a standard that will work for almost all machines, so the machines your friend has will use the same codes as a Haas, the only differences are some have a different format but the same codes don't change the way the machine will run all you need is to look at the format he is using and you will see the same codes being used it is only ( text ) and you can write it using Notepad save it and run it in a machine control
Lathes use different programing format and some different G-Codes, the basic G-Codes a lathe use's is the same, so if you interest is in Lathes then you should learn Lathe Programing
Anything you learn in classes programing by hand is good for understanding what each code does, and can help when looking at a program made in Cam Software, learning Cam software also can be very beneficial if you want to work with CNC machines Programing is a must
Mactec54
Mactec,
Thank you... I am taking a CNC lathe programming class this semester also. I haven't had issues with NCPlot and the lathe programs which is why I haven't posted on here about it.
From what he told me, the differences between Haas and the machines my friend has are related to the home positions (G54-G59 on Haas) and some of the canned cycles. I will ask him what he is using and see if I can configure NCPlot to use that type of machine. He sends the program to the mill through his software also so that may be a slight difference. He viewed it as quicker and easier to just use his programs to create the part than it was to modify my code. Since it was his time and machine, I said OK!
I did download AutoCAD so that will be the next adventure!
Just get one of his programs and paste it here, I will tell you what is different Machine Home is not related to a G54 Etc. a G54 is your work offset X0Y0 position this is the same on all machines here is an example very basic, Machine Home can be any where in a machine travel envelope, left right front back, it is where ever the machine manufacture places it
I put a G43 here as well as I did not see you using it in your other example's
Mactec54