![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| General CNC (Mill and Lathe) Control Software (NC) General Discussion of CNC (Mill and Lathe) control software here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
hey all, my partner and i are building audio devices and until now we always sent work with cnc to contractors but this might change as i am getting a small emco f1 mill from a friend as a gift. this could be perfect to dill our small boxes for potentiometrs and switches. the machine is old and you have to program it using it's keyboard in gcode. i have no idea where to start learning this. any suggestions? thanks! |
|
#2
| |||
| |||
| A couple of places on the web list G and M codes as a reference; one can be found here: http://www.machinetoolhelp.com/Appli...G-M-codes.html Learning how to use these codes isn't very difficult in itself. Machines can be different though, so I strongly suggest patience and plenty of scrap material. Basically, you begin with the code "command" and follow with coordinates. The code "G20" should set you to inch units, and "G21" to metric. Assuming you're set up for inch units on the machine and to absolute coordinates: ---------------------- Example: G00 Z1.000 The G00 indicates a rapid move to the absolute position where Z = 1.000inches. ---------------------- Example: a rapid move (not doing any cutting, but just getting from point A to point B quickly) can be entered as: G00 X0.500 Y0.800 The G00 indicates a rapid move to the absolute position where X = 0.5 and Y = 0.800 inches. ---------------- Example: G01 X0.500 Y1.606 F2.5 The G01 specifies a linear feed from your current position to the absolute coordinates of X = 0.500 and Y = 1.606, with a feed rate of 2.5 units/minute. -------------- Example: G04 #12 The G04 indicates a pause is needed for 12 ("#12") seconds. For safety concerns, never use this pause to change out tools or otherwise stick your fingers near the machine. It's only human to get your fingers in the wrong place at the wrong time, and it's only machine-like for the mill to not care and maul them anyway. For a definite hold in the cycle, use M00 (hold until key is pressed) or M06 (the wait-for-tool-change) codes instead. -------------- Example: G81 X1.000 Y2.000 Z-1.500 F2.25 R0.500 (Assumes absolute coordinates and inch units used for this example) G81 indicates a drill cycle, which is what I think you're looking for in your project as well. The X and Y indicate where the hole will be drilled. But, if the tool is currently positioned below the release plane (R0.500) at absolute 0.5 inches, the Z axis will be moved to 0.5 first. Safety consideration. The hole will be drilled down to the absolute position of -1.5 inches (Z-1.500); note the negative sign. It's a good idea as habit to put G80 on the next line, which clears the drill cycle from the memory. --------------- Example: G28 Return to "home" coordinates (0, 0, 0). --------------- Example: M02 End of program... this is the last line in your code. So, a quick program using some of the examples above: G20 G90 M00 G00 Z0.500 G00 X0.626 Y1.125 M08 G04 #2 G01 Z-0.250 F1.2 G01 X2.000 Y1.125 F2.2 G01 Z0.005 M09 G00 Z0.500 M02 This isn't the most efficient way of doing it, but just wanted to illustrate an easy-to-see example. At first, inch units and absolute coordinates are specified using the G20 and G90 codes. The, the machine waits for you to press a key to begin from the M00 code, and when received, it rapidly moves the Z axis to absolute 0.5 inches. It moves quickly to coordinates (0.626, 1.125 inches), then turns on the flood coolant. The machine pauses for 2 seconds. The operation is then set for a feed rate of 1.2 ipm, drilling to an absolute depth of -0.25 inches. Since the Z is not raised in the next line of code, you are milling a slot from your current position and depth to coodinates (2.000, 1.125) at a new feed rate of 2.2 ipm. The tool is raised to just above the part (in this case, the top of the part was Z=0.000) and the coolant turned off. The tool was then quickly raised to 0.500 inches (absolute) to clear the part a good amount more. Everyone's machine is different though, and the code listed above is not necessarily the most efficent way to do things nor encompasses all the setting to be made. Just illustrative. ![]() Hope it helps answer your questions a bit. |
|
#4
| |||
| |||
| Why learn to write g-code by hand? There are some inexspensive CNC programs that do all the g-code stuff for you. Check out this site. www.simplecnc.com |
|
#5
| |||
| |||
| True, there are programs out there that make life so much easier. There's also buggy programs out there as well. ![]() I have not tried the simplecnc you are selling, so please don't consider the above as my opinion of it. But, I've just tried some other demos that have kicked out *strange things* before, lol! Having at least a basic understanding of G and M codes is important, IMHO. If a program spits out a code that is off, you can at least go in there and fix it if needed. You're not trusting your machine and your tools to a "black box", per se. Just my opinion. |
| Sponsored Links |
|
#6
| |||
| |||
I know software can have bugs. After all it is writen by people. I always use a backplot tool to validate tool path before running it on the machine. Even if you are programming by hand it is possible to make costly mistakes. Thanks Jeff |
|
#8
| |||
| |||
I understand that there is alot of programs that can DO IT for you. But why not use 000.1 percent of your brain to learn somthing new. I am a beginner, Learning from G-CODE, rather a piece of software, I then would understand what the g-code does. Just my two cents..... |
|
#11
| |||
| |||
| Hi varmint, I am just curious who you are addressing the remark to. Since I just posted here I assume you are directing it to me. But I really don't get why you said what you said. To me it sounded a bit personal. But I could be wrong. Peace! |
|
#12
| |||
| |||
NOOOOO!!! Nothing personal. Im a newbie. Just another view Excited about learning. I have a CNC on its way. I dont even know how to spell my name in g-code let alone tell someone else what to do. But I apologize for coming accross aggressive. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |