Hi James, others,
Thanks for your great looking software; I'm trying it but have a problem.
For the first time I took a simple rectangle of 30 by 40 mm:
(Generated by ColiCAM Version: 3.54 Revision: 2013/01/20)
(TOOL LIST:)
(T3 3.000mm Id=81 Flat end mill ø 3,00 mm)
G94
G00 Z20.000
G00 X0.000 Y0.000
(Id=81 Flat end mill ø 3,00 mm 3.000mm)
T03
G97 M03 S24000
G00 Z20.000
G00 X0.000 Y0.000
G00 Z0.500
G01 Z-1.000 F15.000
G01 X40.000 Y0.000 F96.000
G01 X40.000 Y30.000
G01 X0.000 Y30.000
G01 X0.000 Y0.000
G00 Z20.000
M05
G00 Z20.000
G00 X0.000 Y0.000
M02
M30
1. I did put in Autoleveler and could not set there the metric units (the rectangle there on top of the list is blanc and refuses any settinsg as mm's etc.
2. Nevertheless I generated/created the probing code, goes well.
Go to the mach3 mill and it stops early in the code because it's FULL of "NaN' which MACH3 does (of course) not understand.
What am I doing wrong. Thanks for your help in advance,
Hessel Oosten , The Netherlands
Below the converted code after autoleveler, see all "NaN'.
I did cut some lines because the max lines in this message.
(AutoLeveller, Version: 0.7.7, http://autoleveller.co.uk)
(Copyright 2013 James Hawthorne PhD)
(Original file: 3040.gcd)
(Creation date: 12/10/2013 time: 21:55)
(This program and any of its output is licensed under GPLv2 and as such...)
(AutoLeveller comes with ABSOLUTELY NO WARRANTY; for details, see sections 11 and 12 of the GPLv2)
(prerequisites)
(1. need a working probe)
(2. tool needs to be within 3/8" of copper board for the 1st probe, )
(i.e. Z0.000 should be no more than 3/8" above the board initially)
(Note: The first probe will touch off Z to 0.000 when it first touches to copper, )
(all other probe values are relative to this first point)
G21 (metric)
G90 (absolute distance mode, not incremental)
(begin initial probe and set Z to 0)
G0 XNaN Y0 Z0
G31 Z-0.375 F100
G92 Z0
G0 Z2
G31 Z-1 F50
G92 Z0
G0 Z2
G0 XNaN Y0
G31 Z-1 F100
#500=#2002
G0 Z2
G0 XNaN Y11.20267
G31 Z-1 F100
#501=#2002
G0 Z2
G0 XNaN Y22.40533
G31 Z-1 F100
#502=#2002
G0 Z2
G0 XNaN Y33.608
G31 Z-1 F100
#503=#2002
G0 Z2
G0 XNaN Y0 Z20
(Set S value to ensure Speed has a value otherwise the spindle will not start on an M3 command)
S20000
(The program will pause to allow the probe to be detached)
(press cycle start to resume from current line)
M0
(The original mill file is now rewritten with z depth replaced with a)
(bilinear interpolated value based on the initial probing)
(Generated by ColiCAM Version: 3.54 Revision: 2013/01/20)
(TOOL LIST:)
(T3 3.000mm Id=81 Flat end mill ø 3,00 mm)
G94
G0 Z20
G0 X0 Y0
(Id=81 Flat end mill ø 3,00 mm 3.000mm)
T3
G97 M3 S24000
G0 Z20
G0 X0 Y0
G0 Z0.5
#102=#500
#101=#500
#100=[#102+NaN*#101-NaN*#102]
G1 Z[#100 + -1] F15
#102=#500
#101=#500
#100=[#102+NaN*#101-NaN*#102]
G1 X0.187 Y0 Z[#100 + -1] F96
#102=#500
#101=#500
#100=[#102+NaN*#101-NaN*#102]
G1 X0.374 Y0 Z[#100 + -1] F96
#102=#500
#101=#500
#100=[#102+NaN*#101-NaN*#102]
G1 X0.561 Y0 Z[#100 + -1] F96
#102=#500
#101=#500
#100=[#102+NaN*#101-NaN*#102]
G1 X0.748 Y0 Z[#100 + -1] F96
#102=#500
#101=#500
#100=[#102+NaN*#101-NaN*#102]
G1 X0.935 Y0 Z[#100 + -1] F96
#102=#500
#101=#500
#100=[#102+NaN*#101-NaN*#102]
G1 X1.122 Y0 Z[#100 + -1] F96
#102=#500
#101=#500
#100=[#102+NaN*#101-NaN*#102]
G1 X1.309 Y0 Z[#100 + -1] F96
#102=#500
#101=#500
#100=[#102+NaN*#101-NaN*#102]
G1 X1.496 Y0 Z[#100 + -1] F96
#102=#500
#101=#500
#100=[#102+NaN*#101-NaN*#102]
G1 X1.683 Y0 Z[#100 + -1] F96
#102=#500
#101=#500
#100=[#102+NaN*#101-NaN*#102]
G1 X1.87 Y0 Z[#100 + -1] F96
#102=#500
#101=#500
#100=[#102+NaN*#101-NaN*#102]
G1 X2.057 Y0 Z[#100 + -1] F96
#102=#500
#101=#500
#100=[#102+NaN*#101-NaN*#102]
G1 X2.244 Y0 Z[#100 + -1] F96
#102=#500
#101=#500
#100=[#102+NaN*#101-NaN*#102]
NaN in G code
- Country_Bubba
- Posts: 124
- Joined: Wed Oct 02, 2013 3:07 pm
- Location: LaGrange, GA USA
- Contact:
Re: NaN in G code
Greetings,
I just tried to apply 0.7.7 to an existing file and also got similar results:{(
However, when I told the system which g-code file to use, it filled in the proper units. I had not previously run this version so I was surprised to find the results as you were.
If you have it, I would suggest running a previous version such as V0.7.4 which I have used previously. I know James was working you using variables and this may have instituted the problems.
He appears to be out of touch the past couple of days so hopefully he will find this.
Regards,
I just tried to apply 0.7.7 to an existing file and also got similar results:{(
However, when I told the system which g-code file to use, it filled in the proper units. I had not previously run this version so I was surprised to find the results as you were.
If you have it, I would suggest running a previous version such as V0.7.4 which I have used previously. I know James was working you using variables and this may have instituted the problems.
He appears to be out of touch the past couple of days so hopefully he will find this.
Regards,
Art
Country Bubba
Country Bubba
-
- Posts: 24
- Joined: Sat Oct 12, 2013 8:36 pm
Re: NaN in G code
Thanks Art (is that your name ?),
I tried version 0.74 but here another problem which I -also- encountered in 0.77.
It seems roulette when loading a file if the lines with parameters to the left in the AL-screen are filled in.
Sometimes I had succes with .tap, sometimes no succes and all remained blanc.
The same with my format .gcd (which is mach compatible).
Of course the choise-window was set to mach3 in stead of linux.
Hessel
I tried version 0.74 but here another problem which I -also- encountered in 0.77.
It seems roulette when loading a file if the lines with parameters to the left in the AL-screen are filled in.
Sometimes I had succes with .tap, sometimes no succes and all remained blanc.
The same with my format .gcd (which is mach compatible).
Of course the choise-window was set to mach3 in stead of linux.
Hessel
- Country_Bubba
- Posts: 124
- Joined: Wed Oct 02, 2013 3:07 pm
- Location: LaGrange, GA USA
- Contact:
Re: NaN in G code
Hessel
Yes, Art is my real first name, the Country Bubba is a nickname I picked up many years ago and it has kind of "stuck"
Reading a post on the Yahoo group, mentioned that the original Gcode file needs to include the appropriate G21 (in your case) to indicate the metric system. Going back, I did not see that in your original post! (Maybe I missed it?)
Try putting a G21 either before or after the G94 in your file and try again
Yes, Art is my real first name, the Country Bubba is a nickname I picked up many years ago and it has kind of "stuck"
Reading a post on the Yahoo group, mentioned that the original Gcode file needs to include the appropriate G21 (in your case) to indicate the metric system. Going back, I did not see that in your original post! (Maybe I missed it?)
Try putting a G21 either before or after the G94 in your file and try again
Art
Country Bubba
Country Bubba
-
- Posts: 24
- Joined: Sat Oct 12, 2013 8:36 pm
Re: NaN in G code
Art,
I encountered that too and put G21 in the codee AFTER reworking by AL.
But I will do that now before.
Will try tomorrow.
Thanks a lot for your QUICK help !
Hessel
I encountered that too and put G21 in the codee AFTER reworking by AL.
But I will do that now before.
Will try tomorrow.
Thanks a lot for your QUICK help !
Hessel
- Country_Bubba
- Posts: 124
- Joined: Wed Oct 02, 2013 3:07 pm
- Location: LaGrange, GA USA
- Contact:
-
- Posts: 24
- Joined: Sat Oct 12, 2013 8:36 pm
Re: NaN in G code
Art,
It ALL works now !!!
V 0.74 as you advised for the time being.
Did put in the missing G20/G21 before the rework by autoleveler and the menu was immediately filled with the data.
And more important..., a trial run on the mill also did what it should do !!
Happy and thanks to you and James,
Hessel
p.s.
Wishlist: Remembering by AutoLeveler of the user made working folder with his (sometimes ! her) milling files. I think not many people have them stored in MyDocuments.
It ALL works now !!!
V 0.74 as you advised for the time being.
Did put in the missing G20/G21 before the rework by autoleveler and the menu was immediately filled with the data.
And more important..., a trial run on the mill also did what it should do !!
Happy and thanks to you and James,
Hessel
p.s.
Wishlist: Remembering by AutoLeveler of the user made working folder with his (sometimes ! her) milling files. I think not many people have them stored in MyDocuments.
- Country_Bubba
- Posts: 124
- Joined: Wed Oct 02, 2013 3:07 pm
- Location: LaGrange, GA USA
- Contact:
Re: NaN in G code
Hessel,
Glad you got it to work! It is fantastic to see a simple fix make the solution work.
As to storing the code in a place other than "My Documents", I NEVER use that folder and manually tell it to store it in the folder that contains all my other material for that particular project. For Instance, it might be in "I:\PCBprojects\whatever\gcodes\". That way all associated files for the project are in one place and may have the same names as gcodes in other projects and not get overwritten.
Have a good day
Glad you got it to work! It is fantastic to see a simple fix make the solution work.

As to storing the code in a place other than "My Documents", I NEVER use that folder and manually tell it to store it in the folder that contains all my other material for that particular project. For Instance, it might be in "I:\PCBprojects\whatever\gcodes\". That way all associated files for the project are in one place and may have the same names as gcodes in other projects and not get overwritten.
Have a good day
Art
Country Bubba
Country Bubba
-
- Posts: 24
- Joined: Sat Oct 12, 2013 8:36 pm
Re: NaN in G code
Art,
Mis-understanding:
I do the same, a dedicated folder, BUT AutoLeveler always goes after the start to MyDocuments, so I have to browse every time the long way... to my dedicated folder.
Hessel
Mis-understanding:
I do the same, a dedicated folder, BUT AutoLeveler always goes after the start to MyDocuments, so I have to browse every time the long way... to my dedicated folder.
Hessel
Re: NaN in G code
Hi guys, the Autoleveller assumes that a G20/G21 does exists in the GCode file. My thinking was that this must exist somewhere because otherwise how does the PP know whether the units used for the axis is inches or metric. Anyway, it appears like this is omitted by some programs which is obviously causing problems with the AutoLeveller in some cases so this is a priority fix now.
With regards to the directory to use for the gcode output... I do plan a feature to save settings such as the last folder used so that it does not go back to my docs everytime. Hang in there, its coming.
With regards to the directory to use for the gcode output... I do plan a feature to save settings such as the last folder used so that it does not go back to my docs everytime. Hang in there, its coming.

http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.
http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.
-James
http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.
-James