Transfer files nc to ngc

More
03 Jul 2016 14:34 #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 or Create an account to join the conversation.

More
03 Jul 2016 17:27 #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 or Create an account to join the conversation.

More
04 Jul 2016 15:38 #76968 by andypugh
Replied by andypugh on topic Transfer files nc to ngc

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 or Create an account to join the conversation.

More
05 Jul 2016 21:22 #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.
Attachments:

Please Log in or Create an account to join the conversation.

More
05 Jul 2016 21:49 #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 or Create an account to join the conversation.

More
06 Jul 2016 13:05 #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.

File Attachment:

File Name: nc.zip
File Size:0 KB


Then add these 2 lines to the [FILTER] section of your .ini file.
PROGRAM_EXTENSION = .nc Mach3 G-code
nc = ~/linuxcnc/nc_files/nc.sh
Attachments:
The following user(s) said Thank You: Irritant

Please Log in or Create an account to join the conversation.

More
06 Jul 2016 18:40 #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 or Create an account to join the conversation.

More
06 Jul 2016 19:16 #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 or Create an account to join the conversation.

Time to create page: 0.220 seconds
Powered by Kunena Forum