GCode .txt to .nc

I’m a newbie.
I ran a program that turns pictures into dot-matrix. The program creates a gcode in .txt and will not run in the onefinity controller. I noticed the gcode generated by carbide create is .nc which the controller will run. Do anyone know how to run .txt or convert the file into something the onefinity controller can recognize.

A gcode file is just a text file, so you can just change the extension from .txt to .nc. But I would be VERY wary of running it without reviewing the gcode created for "compatibility’ with the 1F. I’m no ‘gcoder’ but I’d look to make sure the set up codes are there, offsets, z depth… Then do an air cut. Also check it out online in ncviewer. Others on the forum may be able to help, even check the code.

2 Likes

Thank you. Changing the file name is the problem. I have tried it in notepad with no luck and Google is know help. I know nothing about gcode either but the beginning numbers are the same. But thanks warnings I will start posting code to make sure its correct.

Open in Notepad and use “SaveAs” and rename with the .nc extension

Then you should have this
image

OR

Find it in your file explorer and rename it there.

2 Likes

Just replace the .txt by . gnc and resave it , it will work

Be mindful that by default Windows hides file extensions.
So enable them here,

5 Likes

I would personally not use notepad but instead use a program like “Notepad ++” I’ve had issues with Microsoft Notepad adding a bit of extra love to a txt file upon conversion which make the OF not run as expected. You can get Notepad ++ free online and it does a whole lot more than reg notepad including add lines numbers to code. Might be worth a look.

Just my $.02
-Alex

2 Likes

No need to open the file in an editor to change its extension. Just click on the file in Explorer, hit “F2” on your keyboard, and then type in the new name. Just make sure to edit the extension part of the filename.

3 Likes

You will need an editor if you want to review/edit the code. I personally use VS Code, but the stock “Notepad” is ok too (viewing only). Just be careful with what post processor you use (if any), and like others have recommended, simulate the code before you run it until you get comfortable.

You can use these to simulate the Gcode:

1 Like

OK… had to download the notepad++ it changed file. Thanks for you all help. I got called out, so it will be a few days before I can test it. I will run it in a simulation when I get to hotel

Sorry it took so long… but it works. Using notepad ++. I still need to take time to learn gcode and change a couple of lines. But I’m getting great results … thank you all for your help

Right click on the file, then left click on 'rename" If you are able to see the file extension, you simply arrow over to it and take out the nc and replace it with txt. that’s literally all you have to do. If you are unable to see the file extension, you have to enable it in windows explorer in the view tab at the top of the window.