|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
G Code with a Mill
Hi-
Our mill has arrived, but before we start to use it, I figured id try and learn the code for it. I was able to make some cool triangle things in the software for the mill (http://microkinetics.com/mmpfw/), but I am having a HUGE difficulty with circles. I have been trying for about 2 days, searched Google, and CD, but the program is always giving me a straight line, or a very sharp curve... I am trying to learn to make simple circles, or even half circles. I attached a photo with what is going on, any help is appreciated? (The green is what the software is doing, the red is a crude sketch of what I want to happen) And the code...(and what I think it should do?) G90 //Set it to absolute mode, X+Y begin at 0, Z at 1. G01 X5 Y5 //Put to center of circle, 5,5 G01 X1 Y5 //Go to starting point of circle, 4 away from center. G01 Z-1 //lower the cutter G02 X9 Y5 I5 J5 //Should make a semi-circle going out to 9,5 with a center of 5,5? Note: In case someone says it... No, I am NOT doing this on any material, only the software, so I'm not breaking things. ![]() Last edited by nighterfighter : 20-12-2009 at 22:51. Reason: Added the note |
|
#2
|
|||
|
|||
|
Re: G Code with a Mill
First, welcome to the world of CNC! It is SO much fun. There are a few problems in your code; let me try to help.
There is no need to move to the center of the circle before making the circular interpolation. The line that reads "G01 X5 Y5 //Put to center of circle, 5,5" can be eliminated. Your next line to position the machine at the start of the arc is fine, however usually this would be a "rapid" G0 (or G00) move through air rather than a G01 "feed" move that is usually used for cutting the material. Your G02 (clockwise circular interpolation) line should read: G02 X9. Y5. I4. J0 The I and J coordinates are the incremental distances from the starting point to the center of the arc, not the coordinates of the center itself. The coordinates of the center itself never actually appear in the code. So if you are starting at 1,5 the center (at 5,5) is located at an incremental/additional 4 in the X (I), and 0 in the Y (J) directions (since you are sitting directly to the left of your intended center). The code revised as listed above will yield a semi-circle (half circle). If you wanted a full circle, you would leave out the X and Y coordinates, and the end point would be the same as the start point, resulting in a full circle. Also, not sure about yours, but many machines are very particular about leaving decimal points off of a number. For example, on a HAAS machine, "F4" does not mean the same thing as "F4." Oh, and that's the the other thing. You are missing feed rates all around. The units of feed rates are in inches per minute. To start out, I'd keep the feeds under 10 IPM. Also, in your first line (the G90 absolute line) I would add G0 X0 Y0 Z1 to make it do what you say in the comment. Finally, many CAM programs such as MasterCAM really make coding for the CNC a piece of cake. You should investigate these. If you wish to improve your understanding of G-code and the machine's interpretation of it, you will find this manual very helpful: http://coestudentshop.engr.wisc.edu/...llWorkbook.pdf Last edited by sanddrag : 21-12-2009 at 11:47. |
|
#3
|
|||
|
|||
|
Re: G Code with a Mill
Thanks!
I was actually talking with chris L, and he was helping me out! Thanks for your post also, it also clears things up. So if I am going to use I and J (which chris has taught me how to use R, seems easier) I need to do incremental mode? |
|
#4
|
|||||
|
|||||
|
Re: G Code with a Mill
Quote:
Do you have any idea as to what would cause this? Also. The feed rates depend entirely on what you are cutting. I cut butter board around F15 and plunge at F5 just to be safe. I could probably cut faster. But as a side note. Just as with driving you slow down for turns. Slow your feed rate down when you are cutting arcs. -Rion |
|
#5
|
|||
|
|||
|
Re: G Code with a Mill
Quote:
Also, it should be noted that an "R" word in the G02 line is not capable of producing a 360 degree arc. For a full circle, I and J coordinates must be used. |
|
#6
|
|||||
|
|||||
|
Re: G Code with a Mill
Quote:
Quote:
It can be found here: http://www.haascnc.com/pdf/96-8000.pdf Last edited by Cory : 21-12-2009 at 04:30. |
|
#7
|
|||||
|
|||||
|
Re: G Code with a Mill
Quote:
Here is a program I have written the does indeed work. Quote:
It cut this out of butter board. http://picasaweb.google.com/lh/photo...eat=directlink |
|
#8
|
|||
|
|||
|
Re: G Code with a Mill
I got bored, so I decided to write this up, hopefully once our mill gets working, I can try it on a wax block.
http://img707.imageshack.us/img707/3061/diamonds.jpg You can't see it in the picture, but the cuts are different depths...The inner-most circle is the highest, and then each one outside it descends by .25". ![]() I have a quick question about it, will the cuts be too close, and overlap each other? |
|
#9
|
|||||
|
|||||
|
Re: G Code with a Mill
Quote:
|
|
#10
|
|||
|
|||
|
Re: G Code with a Mill
I'm not sure what size we have. I used the smallest one the software had, which is 0.1000"
|
|
#11
|
|||||
|
|||||
|
Re: G Code with a Mill
Ok. Well. If that is the width of the bit you can use then the picture shows exactly how it will turn out.
|
|
#12
|
|||||
|
|||||
|
Re: G Code with a Mill
If the lines are more than 0.100 apart, you'll end up with grooves and not a surface.
One might use a 0.250 bit, separate the lines by .250 (maybe .249) and drop down .250. Just remember that you need to consider what the bit can cut: At that outermost line, you've dropped down by an inch, right? Can your bit cut a whole inch at a time? If not, how might you address that issue? This is one reason it is often better to learn how to use a manual mill before getting into a CNC mill. Understanding the milling process is critical. |
|
#13
|
||||
|
||||
|
Re: G Code with a Mill
Look at the following site. http://www.machsupport.com/
Their wizards are very helpful for standard routines. They may offer a break to FIRST teams. This is the control package team 1189 uses. Our CAD program, Key Creator includes a built in NC function that creates cutter paths and posts them to a wide choice of post processors. |
|
#14
|
||||
|
||||
|
Re: G Code with a Mill
This (free) software may be helpful. It doesn't have a lot of features, but is very simple to use, so you can try it with different-sized endmills... http://www.cncsimulator.com/
Cheers, -Neil. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Drill/Mill or Lathe/Mill attachment for small shop area | Coach Norm | General Forum | 22 | 16-09-2009 15:59 |
| [FTC]: Problem with Code or Problem with Bluetooth? | VeedotJaydot | FIRST Tech Challenge | 3 | 27-01-2009 18:22 |
| pic: Me with our mill | Lowfategg | Extra Discussion | 1 | 10-01-2009 15:49 |
| problems using gyro/adc code with camera default code | tanstaafl | Programming | 7 | 22-01-2006 23:09 |