G code out of range" message

More
20 May 2016 14:16 #74880 by webmanoffesto
I'm working on a beginner project for the CNC training program I'm in. Why do I get a "Near line 6" ... "G code out of range" message?
%
(O00001 Mill Program Format Sample) ;

N01 (Tool Entry Safety Block) ;
G00 G17 G20 G40 G49 G54 G80 G90 G98 G64 G94 G100
(G00 Rapid)
(G17 Select XY Plane)
(G20 Select Inches)
(G40 Cancel Cutter Radius Compensation)
(G49 Cancel Tool Length Compensation Cancel)
(G54 Cancel Work Coordinates)
(G80 Cancel Canned Cycle)
(G90 Set Absolute, Cancels G91 incremental)
(G98 Cancels the G99 R plane return)
(G64 Cancels the exact stop G61)
(G94 Cancels G93 "Inverse Time Feed Mode" and returns the control to "Feed Per Minute" mode.)
(G94 G-code is a modal G-code. G94 instructs the control to interpret feed commands as 
(- inches/minute or mm/minute for linear moves.)
(- degrees/minute for rotary moves.)
(- inches/minute or mm/minute for a combination of linear and rotary moves.)
(G100 Cancel Mirror Image)

(Z-Axis Home Safety Block) ;
G53 Z1.0 ;

(Tool Change & Spindle Speed) ;
T02 M06 H02 (M06 Tool Change) ;
X0.0 Y0.0 S4000 M03 (Spindle ON Clockwise) ;

(Our Endmill Diameter is 0.50")

(Tool Approach Part & Tool Lenght Offset Calling Block) ;
G00 X-1.0 Y0.0 ; 
G43 M08 ; 

(Begin Tool Body) ;
G01 Z-0.5 ; (Spindle down to Z-0.5)
G01 F36.0 (Feed Speed)
G41 (Cutter Compensation Left)

G01 Y4.0 (First Cut, goes from X-1.0 Y0.0 TO X4.0 Y0.0 ) 
G01 X4.0 Y-4.0 (Second cut) 
G01 X0.0 Y-4.0 (Third cut)
G01 X0.0 Y1.0 (Fourth program)

(End Tool Body) ;

(Tool Exit Safety Block);
G00 G80 Z1.0 M09 ;

(Z-Axis Home and Cancel Tool Lenght Offset) ;
G49 G53 Z0.0 ;

(Optional Stop) ;
M01 ;

N02 (Tool Entry Safety Block);
G00 G17 G20 G40 G49 G54 G80 G90 G98 G64 G94 G100



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

More
20 May 2016 14:56 #74882 by geoffs
Replied by geoffs on topic G code out of range" message
This line?

X0.0 Y0.0 S4000 M03 (Spindle ON Clockwise) ;

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

More
20 May 2016 15:31 #74888 by Alicee
Replied by Alicee on topic G code out of range" message
So, you had (I added extra line numbers like {n} just for illustrate post here) :
%
(O00001 Mill Program Format Sample) ;

N01 (Tool Entry Safety Block) ;
{n2} G00 G17 G20 G40 G49 G54 G80 G90 G98 G64 G94 G100
(G00 Rapid)
(G17 Select XY Plane)
(G20 Select Inches)
(G40 Cancel Cutter Radius Compensation)
(G49 Cancel Tool Length Compensation Cancel)
(G54 Cancel Work Coordinates)
(G80 Cancel Canned Cycle)
(G90 Set Absolute, Cancels G91 incremental)
(G98 Cancels the G99 R plane return)
(G64 Cancels the exact stop G61)
(G94 Cancels G93 "Inverse Time Feed Mode" and returns the control to "Feed Per Minute" mode.)
(G94 G-code is a modal G-code. G94 instructs the control to interpret feed commands as
(- inches/minute or mm/minute for linear moves.)
(- degrees/minute for rotary moves.)
(- inches/minute or mm/minute for a combination of linear and rotary moves.)
(G100 Cancel Mirror Image)

(Z-Axis Home Safety Block) ;
{3} G53 Z1.0 ;

(Tool Change & Spindle Speed) ;
{4} T02 M06 H02 (M06 Tool Change) ;
{5} X0.0 Y0.0 S4000 M03 (Spindle ON Clockwise) ;

(Our Endmill Diameter is 0.50")

(Tool Approach Part & Tool Lenght Offset Calling Block) ;
{6} G00 X-1.0 Y0.0 ;
G43 M08 ;

(Begin Tool Body) ;
;

So if I count correct, then bad line is: "G00 X-1.0 Y0.0 ;" (ignor comments)

So maybe your machine cannot go left (minus) of zero therefore X-1.0 is beyond soft limit (assume 0.0) and makes message.
Its just my guess.

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

More
21 May 2016 07:07 - 21 May 2016 07:18 #74905 by Rick G
Replied by Rick G on topic G code out of range" message
When you load the program you will see the line numbers in Axis in the bottom box. The error will be near the listed number.
Where did the code come from as it is not really a g code that will run in linuxcnc?

Line 5 ...
G00 G17 G20 G40 G49 G54 G80 G90 G98 G64 G94 G100
There is no G100 in linuxcnc, so edit it out with
G00 G17 G20 G40 G49 G54 G80 G90 G98 G64 G94; G100

and you will go to the next error...
T02 M06 H02 (M06 Tool Change) ;
Which will also cause an error in this code and the reason for it.

etc.

If a program starts with a % it should end with one.

Rick G
Last edit: 21 May 2016 07:18 by Rick G.

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

Time to create page: 0.074 seconds
Powered by Kunena Forum