Machsupport Forum
G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: equack on January 13, 2010, 03:59:24 PM
-
(I posted a similar question on the NC Plot forum.)
There are syntax differences between different flavors of G-code. Programs which plot correctly in NC Plot generate errors in Mach 3. Is the G-code standard poorly defined? Are there bugs in one or the other? Is there anything I can do in Mach 3 to make it accept programs which it currently chokes on? Some compilers have different error and warning levels. Could I tell Mach 3 to ignore certain errors (like incomplete comments)?
Here are examples which work in NC Plot but not in Mach 3:
1. "#110=#110+40.0"
This line is OK in NCPlot but generates an error in Mach3. In Mach 3 I have to enclose the right side with brackets "#110=[#110+40.0]"
2. "(*********x" NCPlot allows comment lines with only an opening parenthesis. Mach3 gives an error unless there is a matching closing parenthesis.
3. "[-#110]" works fine in NC plot but not in Mach3. In Mach 3 I use "[0-#110]".
4. NCPlot by default treats "10" as ".010". Mach3 treats it as "10.0". I was able to fix this one in NC Plot by changing the machine configuration.
Any ideas?
-
When you are playing with macro language commands most g-code systems are different, # is not part of the standard, Mach3 follows the Fanuc standard.
The only way round it is search and replace.
Graham
-
NC Plot also claims to follow the "Fanuc standard".
The Mach 3 manual mentioned the NIST NGC (EIA-274-D?) which defines "#".
http://www.isd.mel.nist.gov/personnel/kramer/pubs/RS274NGC_3.web/RS274NGC_33a.html (http://www.isd.mel.nist.gov/personnel/kramer/pubs/RS274NGC_3.web/RS274NGC_33a.html)
Mach3 follows this standard more strictly than NC Plot.
Search and replace is certainly one approach. A script using regular expressions could automate things.
The NC Plot folks have indicated their willingness to help.
-Erik