From the course: Learning Mastercam for SOLIDWORKS

Generating a G-code file

From the course: Learning Mastercam for SOLIDWORKS

Start my 1-month free trial

Generating a G-code file

- [Instructor] We are now ready to post out our program to a G-Code file that we can run in a CNC machine. The button to do that is right over here. It's just labeled G1. So first thing you want to do, though, is select which of these tool paths would you like to post out. We choose the tool path group on the top, they all get selected, and then come over here and click on G1. Alright? Now notice it says Active Post, and it says it's a generic Haas Mill, and that's the machine that I have selected when I created this job. If you want to switch that, I'll show you that in a second. But we are trying to get an NC file here, and it's pretty straightforward. Literally, it's already pre-selected, so all you have to do is click on the green check mark, and it's going to go ahead and post that out for you. So, where do I want to post these things to? I want to put it on the desktop in Exercise files, Chapter five, and we're in Chapter 5.4, go ahead and click on Save, and there's our program. So if I expand that out to a full screen, you can see I can actually scroll through here, and I could then see exactly what's going on, and which G-Codes are actually been produced in my program. Pretty cool. You can also use some of these other tools here, to, you know, jump to the next operations. You can look at the configuration file of how it's set up and so on. But basically this file here is where you can take over to the CNC machine, and input this in the machine, and then go ahead and run it, and that what's going to actually build your part. So, this is very important, right? If we don't have the right codes here, or not posting out the right values for the type of machine that we want to use, you're going to get the wrong results or an error, so make sure. I'm posting out to a Haas machine here, 'cause I'm using a Haas post. If you try to take this same program and run it in a different style of machine or different manufacturer machine, it probably is not going to work. Now, the codes are mostly the same between machines but there are some subtle differences. So we have to make sure we choosing the right one. Let's go ahead and back over here to Mastercam. If I wanted to switch to a different machine, notice this a generic Haas three axis VMC, click on Stock Setup here, and come over here to Files, and notice it says, Machine. I can say, Replace, and these are the machines that I have. Alright? So I have Generic Fadal, I got a Haas, and I got Generic Mill Default, whatever that is. Okay? So, if you wanted to choose a different one, just go ahead and choose, maybe a Fadal, click on Open. That switches over to this, I've got this little dialog box that pops up here, and it says Replace Machine Groups, say, Yes. Click OK, and now when I go to post this out, it's going to pull up the generic Fadal, Format one, instead of the Haas. Now if you just installed Mastercam, and you haven't been posting anything out, Mastercam, nowadays, does not come with a lot of posts. In fact, I think it only comes with one default post. So you need to go over to the Mastercam website or to the forums or to your reseller, or wherever you can and get a post for the machine you're actually going to be using. So let me show that website real quick. Alright, over here is Mastercam, and notice it's community.mastercam.com/techexchange and I believe that's right over here under Support, Tech Exchange. Now take a look at these different tabs. You can look at sample files. You can look at tool libraries, which I definitely recommend downloading the tool libraries. They've got some great partnerships with Helical, and Harvey Tool, and you can download their entire tool library so you know the exact part number for each tool. It's a great benefit to bringing these into Mastercam 'cause it saves you a huge amount of time. But if you want to grab posts, head over here to Posts, and scroll down here and you can see all different posts that are available for you to download for the machine you might have. Of course, there's lots of pages here, so go through there, grab the one you want, and then head back over here to Mastercam. Save it into the file where it's supposed to go, which is generally under the user's directory. Anyways, those are the basics for posting your program to G-Code.

Contents