|
||||||||||||
|
|
||||||||||||
|
First G-Code and OneCNC XR2 Lathe Express Walkthrough October 5, 2006 I posted my first g-code tonight using OneCNC, my CAM program. Let's walk through the process and take a look at the code. I'm working on a design for a pen, which I think will be a cool CNC project for my lathe. Step 1: Design the Pen I'm not going to spend any time telling you how I did it, I'll just show the finished design. The program I'm using is Rhino3D, which I highly recommend.
The pen as a 3D model in Rhino3D. Pretty cool, eh? Step 2: Import Profile into OneCNC OneCNC will like working with a profile best as it doesn't care about the fancy 3D model. So, I took the model back apart in another file (sigh, remember to keep the curve next time!) until I had a 2D profile of the pen. I saved that from Rhino, fired up OneCNC, and loaded it in:
Simple profile loaded into OneCNC... Step 3: Tell OneCNC to Create a Toolpath On the side of the screen the yellow area is the NC Manager, which is where your toolpaths are created and managed. You tell OneCNC to create a new toolpath and you'll get the following dialog box asking what kind of toolpath is desired:
A number of different toolpath possibilities exist for the lathe... I chose Turn / face roughing, and the next step is to show OneCNC what part of the profile to cut. Begin by showing it where to start:
Toolpath started on far right, initial segment marked in red, direction of cut shown by arrow... Left click the starting point and then drag the mouse until the arrow points in the direction you want to cut. Next you have to tell it where to quit cutting:
The toolpath is now marked in red... The path is now marked in red. We're going to cut the whole profile in one shot. Given that you mark the beginning and end, you could use several different tools or other operations if you wanted to. Step 4: Fill in the Remaining Options Now that it knows what toolpath you'd like, it's time to fill in the rest of the options. These come up as a series of dialog boxes, much like "Wizards" in other programs. The first thing to do is decide what lathe tool you'll be using:
Select which tool to use... There is a tool table that you can add to and modify. Tools not in the library that comes with OneCNC may be specified by creating a drawing of the tool so OneCNC knows its shape and dimensions, and filling in the rest of the data. You can see from this dialog that we're going to cut without any coolant at a feed rate of 0.02" per revolution, at a surface speed of 120 SFM in Constant Surface Speed Mode (meaning the spindle will vary speed as you move closer or further from the axis). Next up is determining the toolpath boundary. You can control where the tool moves as its cutting in terms of its retraction. I just left the defaults:
Determine toolpath boundary when retracting between passes... And the last dialog is called "Turn and Face Options". It's used to specify the style of roughing, allowances to leave for finish pass, cut direction, and cut control. I selected a "Cycle w/ finish" style, which builds the finish pass right into this run so I don't have to go back and do a separate finish pass. I'd have more control with the latter, but I don't need it just fooling around here:
Turn and Face Options Dialog... I hope you can tell that this is really easy. You drag out a toolpath on the drawing, select a few parameters in a dialog, and you are done. That's the magic of CAM versus manual programming! Step 5: Backplot and Simulate the Cut Having created this toolpath, you can now backplot and simulate. Backplotting draws lines on your drawing that show the successive cutter passes:
Backplot of the toolpath. Green are cutting passes, dotted red are the retract passes to line up for the next cut... A simulation is an animated movie that lets you see what your program will do. Last Step: Post and Look at the G-Code A post is the command used to cause OneCNC to generate the G-Code. It comes with a slick editor for viewing that code. Posts are typically customized for the particular machine controller you're using. Mine's not setup yet, so this is just generic g-code. I'll want to revisit this before I cut for real, but it is certainly interesting to look at: % Cheers! |
||||||||||||
|
All material © 2001-2009, Robert
W. Warfield.
|
||||||||||||