|
Register | Options | Profile | Last 1 | 3 | 7 Days | Search | Today's Posts | Mark Forums Read |
|
Thread Tools |
#1
|
|||
|
|||
Surfacing GCode
Hi folks, the first cut I ever made was using the surfacing wizard in Mach3. Once I had my axes calibrated and tuned and had tested limits and e'stops and other functionality I fired up the wizard set my parameters, loaded the Gcode and hit GO. I then watched my spindle bit dive 25mm into the corner of my baseboard and carve a big chunk out, It was quite happily chewing up MDF at 200IPM before I could reach the e'stop. Why? mainly because I didn't understand the X and Y coordinates, or a whole pile of other stuff about Gcode.
So, to help me learn all those things that I need to know I have been hand writing my own Spoilboard Surfacing code. It's attached. It's also late and I haven't tested it so use at your own risk. Or, better yet, mark up some edits to improve it and post it back to the thread. Thanks. GP001 Surfacing.txt |
#2
|
|||
|
|||
What CAM software are you using? It is easy to create a file using your CAM software.
Then try some thing small before you take on the task of resurfacing. There is a lot to learn and it is easy to take small steps first. We all have made some cutting error when we first start out, don't feel bad. |
#3
|
|||
|
|||
Hi Nils, I'm not sad. I love breaking stuff. Then I get to pull it apart and put it back together again
I'm not using CAM yet. I wrote this in notepad. I wanted to learn how to code my own tools. I'm pretty sure I'm going to need a lot of little utility snippets of code. I don't even know what yet. I have been using the MDI screen a lot too, to recover from crashes as I test and practice. |
#4
|
|||
|
|||
Use notepad ++ and a g-code language highlighter, makes coding easier.
|
#5
|
|||
|
|||
Dale
Download Cambam, you'll have 40 free uses to try out before you have to buy. Create a pocket the size of your table and set the depth to of cut to zero. When you load that into Mach, zero your Z, then change the Z value in mach to the depth you want to cut. After that away you go. This way you can change the depth to anything you want and still use the same gcode to surface your table anytime. |
#6
|
|||
|
|||
Bruce that's no fun! I won't learn how to use iterative subroutines like that.
And I just wrote in 20 something lines what CAM wizards use 300 lines for. Fox, thanks good tip. Does anyone use TextExpander, or similar, to create their own gcode shorthand? |
#7
|
|||
|
|||
I hope you don't intend on doing any vcarving and writing your own gcode, if you do you may get one or 2 done in a year
IMO you would be better off using cam software to get you going and THEN learning the ins and outs of the gcode. Why reinvent the wheel? |
#8
|
|||
|
|||
I'm with Bruce's "get-you-going-ASAP" school of thought.
|
#9
|
|||
|
|||
My personal favorite - cheap and awesome is Cut2d by vectric.
|
#10
|
|||
|
|||
If interested in a low end but good package, check out www.cambam.info - cheap ($100 USD if I remember right, but I got it a long time ago), but really a low end cad package. Quite a few tutorials on their site, and if you get it, join their forums. I have it on a Windows machine, but also use it under Linux (linux install is not as easy as windows, but it does work).
|
#11
|
|||
|
|||
Vote for cut2d, love that. But I like your learn first act later approach. Wish I had the patience and time.
|
#12
|
|||
|
|||
...I used the Lazy cam license on Mach for 2 years before I bought a fully functioning CAM program and was truly happy with almost all the results all of the time.
|
#13
|
|||
|
|||
Software is great but for something so little, write it by hand, then you will understand it better. IMHO. For those who need help http://www.cnccookbook.com/CCCNCGCodeCourse.htm
|
#14
|
|||
|
|||
Basics for Understanding
Quote:
Nothing against GUI and CAD users, but it helps folks understand the WHY things work rather just THAT they work. It would be interesting to see a small hand-coded CNC smoothing routine that is parametrically driven. (driven by dimensions entered once and not needed to be coded in again and again). Anyone have a good small example? |
#15
|
|||
|
|||
I've been playing with an excel sheet that does what your after and I would be surprised if there's not more excel sheets out there that are very extensive. I'll post it up after I cleanup and get it working properly without some of the fudges I'm using.
Btw I agree that hand coding provides contextual knowledge that can't be understood from using wizards and gui interfaces. This is especially useful when you have a job fail and need to recover. It's always when something goes wrong that you need to know what's going on under the hood. Aside from the benefit of understanding what's going on under the hood. Every single wizard code I have used so far has needed some tweaking. |
#16
|
|||
|
|||
CNCzone has a small program in VB to generate code to flatten a surface.
I was really looking for a short looping piece of G-Code to loop through. on CNCzone a user Geof said something like: This is the style of program I use for facing various size one offs on a vertical cnc. I have omitted all the stuff about tool selection, rpm, etc., this is just the tool path for a 3/4" dia. tool facing 18 inches by 14 inches. N100 G54 X0. Y0. N101 Z0. N102 G91 G01 Y-0.74 F100. M97 P1000 L10 N103 G28 M30 N1000 G90 X-19.5 N1001 G91 Y-0.74 N1002 G90 X0. M99 Comments: Line N100; Put the work zero slightly more than one tool diameter positive from the corner of the workpiece nearest machine zero. N101 Set tool offset at the finished surface. N102 This increments the Y slightly less than one tool diameter and calls the subroutine starting at N1000 ten times. N1000 The uses absolute positioning to face across the X distance. N1001 This increments the Y again. N1002 This returns in absolute back to X 0. and returns from the subroutine. The Y travel for each call of the subroutine is 1.48" and the total Y travel is 14.8". For different size cutters and different size parts it is only necessary to change the Y increment, the X travel and the L count. ... Yes, some adjustments are needed for your configuration and setup, but this is the basics. Under a dozen lines of code can do a lot of simple things! |
#17
|
|||
|
|||
Good find Jack. It should also be noted that there are a lot of things that can be done with custom macros and calling them from G-code
|
#18
|
|||
|
|||
Thanks for adding providing that code its a great example to learn from.
|
#19
|
|||
|
|||
I use pocketing function available in Aspire to do surfacing. Actually, all CAM software will have this function.
|
#20
|
|||
|
|||
Attached is what you might be looking for.
I wrote it for Linux CNC so i don't know how it ports over to Mach. I do use this on a regular basis. P.S. Use at own risk. |
#21
|
|||
|
|||
Thanks Anthony!
|
Register | Options | Profile | Last 1 | 3 | 7 Days | Search | Today's Posts | Mark Forums Read |
Thread Tools | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to run a Gcode X amount of times | Helsingtwelve | Construction started, but not cutting yet | 6 | Thu 15 May 2014 11:27 |
Gcode for spiral circles. | rocky2889 | CNC motion control software | 6 | Sun 10 October 2010 19:43 |
surfacing a table in EMC | lumberjack_jeff | CNC motion control software | 4 | Tue 01 September 2009 04:46 |
Surfacing the table | gixi | 10. Base Table | 1 | Mon 10 August 2009 06:17 |
Gcode for surfacing table | DMS | CNC motion control software | 2 | Sun 12 October 2008 10:09 |