Transfer files nc to ngc

More
10 years 3 months ago #76938 by Irritant
I am now running lcnc with a Probotix controller and motors and a 5i25 board from and with the help of J Thornton. I have had this router for about fifteen years and it is running better than it ever has.

I have a number of nc files that were created for Mach3 and I would like to make them work with lcnc. The cad drawings have been lost so if I can make them work it will save me a load of time. Any idea what I need to do to make them run?

Ian

Please Log in to join the conversation.

More
10 years 3 months ago #76943 by Todd Zuercher
I am not to familiar with the G-code formats used with Mach3, but if it is mostly basic G-code it shouldn't be too hard to make it work with either minor editing, or by making a script to auto convert it as it loads into Linuxcnc.
If you could share an example file, we might be able to give some suggestions.

Please Log in to join the conversation.

More
10 years 3 months ago #76968 by andypugh
Replied by andypugh on topic Transfer files nc to ngc

Irritant wrote: I have a number of nc files that were created for Mach3 and I would like to make them work with lcnc


They will probably just run. The Mach3 interpreter and the LinuxCNC interpreter are both based on the EMC interpreter.

You can make things a little easier by telling LinuxCNC to also accept .nc files.
linuxcnc.org/docs/2.7/html/config/ini-co...html#_filter_section

Add PROGRAM_EXTENSION = .nc
And I think that LinuxCNC will just run the files.

Please Log in to join the conversation.

More
10 years 3 months ago #77050 by Irritant
Replied by Irritant on topic Transfer files nc to ngc
Here is a typical file. I looked at the code but it is beyond me unless I spend a lot of time on it. Help is appreciated.

Please Log in to join the conversation.

More
10 years 3 months ago #77051 by Todd Zuercher
Yes, that should run almost as is.
What do some of the codes in your preamble do such as G40.1 and G50 in Mach?
I would simply set up a script that automatically replaces those 2 codes with the appropriate equivalent when opening a .nc file.
Otherwise it should run as is.

Please Log in to join the conversation.

More
10 years 3 months ago #77078 by Todd Zuercher
Here is a script to fix the 2 Mach3 G-codes, save it in your nc_files directory and change the permission to executable.

Attachment not found



Then add these 2 lines to the [FILTER] section of your .ini file.
Code:
PROGRAM_EXTENSION = .nc Mach3 G-code nc = ~/linuxcnc/nc_files/nc.sh

Please Log in to join the conversation.

More
10 years 3 months ago #77096 by Irritant
Replied by Irritant on topic Transfer files nc to ngc
I will try it as soon as I get to the shop, Thanks!

Please Log in to join the conversation.

More
10 years 3 months ago #77099 by Todd Zuercher
Now that script may not work on every file, if there are other unrecognized codes or codes interpreted differently, they will need to be added to the script as well.

Please Log in to join the conversation.

Time to create page: 0.162 seconds
Powered by Kunena Forum