G-code .txt files

Hi, I got a g-code from etsy and when I downloaded it, it is a txt file. I can open it in notepad and it looks all good, but carbide create won’t open it. How do I change it to .nc so I can try it?

Change the .txt extension to .nc

1 Like

Well also shouldn’t this be opened in Carbide Motion instead? Create won’t display or work with exported G-Code to my knowledge.

2 Likes

yes, I meant carbide motion, It wont open .txt files and I wasn’t surewhat would happen if I just changed the extension.

No problem. It’s one of the cool things about G-Code actually, that you can hand edit it so easily if you want to.

Thanks, I’ll try it tomorrow

Hi @Haroldj1,

I will note that if you are going to be using someone else’s gcode file (not the best idea in general, but still doable), you’d better inspect it closely before running the cut. Did it come with any info on how to setup the machine to use it ? Specifically, did it say

  • where the zero point was to set on the stock?
  • what stock thickness to use ?
  • what endmill type and geometry to use ?
    You need that info to have a chance of a successful cut.

I would highly recommend previewing that G-code in a G-code viewer, to visually determine where they set the zero, and that the dimensions of the piece are what you expect.

ncviewer.com is a pretty cool online viewer, you can just upload your G-code file there and it will show you the toolpath in 3D, you can then click on parts of it and it will show you in the G-code the corresponding X/Y/Z coordinates it is at.

4 Likes

YES, zero point ,thickness, and bits were all included and well documented in the gcode files first few lines. I paid for it, or I would have just posted it. It is a 2.5d angel carve 8 x 8 x3/4 stock with 90degree v cutter from cncpatterns on etsy. He stated it was a good choice for beginners to show what their machine can do. I will let you know how it goes.

1 Like

That’s awesome! I’ve been wary of using files from unknown sources, but at least this gives an idea of the cut. What a great little viewer!

1 Like

Allright then.
I checked CNCPatterns on Etsy and thought I would mention that he says the files are “MACH3 G-code”, apparently generated from Aspire, which means he used a MACH3 post-processor to generate them, and…I don’t know to what extent that is compatible with what the Shapeoko’s GRBL controller expects/supports, but we’ll know soon! :slight_smile:

Well, the lines all are numbered with an N in front of it and apparently carbide motion doesn’t like it. I keep getting unknown gcode message when trying to open it,

Can you post the file here?
It’s probably more than that.

It is a purchased file and I would not want to cheat the designer. Is there a way I can send it just to you instead of post it to everybody?

I sent you a message. You should see a little geen number by your “H” in the top right corner of the forum page.
(Does that make sense?)

1 Like

Thank You neilferreri! It worked and carved great. drag n drop doesn’t work here or I would send a pic.
Can you tell me what you did to make it work so I have the info for future use?

1 Like

Hey @Haroldj1,
No problem. I’m glad that worked for you!

Basically, as @Julien found by looking up the seller, the gcode was for a Mach 3. I just removed the commands that are not grbl compatible. I’m sorry, I don’t remember the specifics now, but I’ve looked at enough gcode to know what had to be removed and what really wasn’t necessary.
Pretty much all of what I changed was before the first move. You could compare the two files to see what I changed.
Oh, and I removed the line numbers. Grbl would be ok with them, but I have no idea if Motion accepts them.
I did all of that in a text editor (Notepad++).
The gcode used one tool, so there’s not much to it.

2 Likes

I have looked at both and seen pretty much what you did. I was just wondering if you used a program to import it, then export it changed.
Someday I will be able to do that. After inspecting the 2 files, I could probably get pretty close now.
THANKS

1 Like

Here’s a sample of gcode for 2 small holes (in the [negative x, negative y] quadrant):
1B00_ZFB_CP_Base2Hole_T476_AA101.nc (3.1 KB)

Basically you can compare the format and headers for this code to the Mach3 code you have, that should help you determine what needs to be edited or changed with an editor (“notepad++” if on windows or “bbedit” if on a mac). If you need/want a larger or different example, feel free to let me know…

As far as loading g-code post-processed for a specific CNC machine into an application for the purpose of being converted/post-processed for a different CNC, I don’t know of anything that will do that automatically, but that is because I haven’t looked for one. I make my own models in Fusion 360 and use their post-processor (with carbide 3d setting, generic has worked too) for outputting my CAM g-code, so I haven’t had to convert any g-code yet, but it is entirely possible this capability exists in some application…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.