Tool resets to Z0 when starting program without being told to
22 Aug 2024 00:58 #308355
by RyanB
Having some issues with running some Gcode. I'm using fusion360 and when I single step through the ngc on linuxcnc the Z axis plunges to 0 without being told to in the Gcode.
The origin of the the piece is a known position on the spoil board, its surface being 0. So I raised the tool head to 40ish mm above the work piece. I then single step through the program and before it hits N50 (line 23) the tool head plunges to 0.
I've dissected the G-code as best as I could, but I can't find any portion that moves the head to 0.
What am I missing here?
%
(0000)
(MACHINE)
( VENDOR AUTODESK)
( DESCRIPTION GENERIC 3-AXIS)
(T5 D=6.35 CR=0. - ZMIN=12.69 - FLAT END MILL)
N10 G90 G94 G17 G91.1
N15 G21
(-ATTENTION- PROPERTY SAFE RETRACTS IS SET TO CLEARANCE HEIGHT.)
(ENSURE THE CLEARANCE HEIGHT WILL CLEAR THE PART AND OR FIXTURES.)
(RAISE THE Z-AXIS TO A SAFE HEIGHT BEFORE STARTING THE PROGRAM.)
(WHEN USING FUSION FOR PERSONAL USE, THE FEEDRATE OF RAPID)
(MOVES IS REDUCED TO MATCH THE FEEDRATE OF CUTTING MOVES,)
(WHICH CAN INCREASE MACHINING TIME. UNRESTRICTED RAPID MOVES)
(ARE AVAILABLE WITH A FUSION SUBSCRIPTION.)
(FLAT1)
N20 T5 M6
N25 S5000 M3
N30 G17 G90 G94
N35 G54
N40 G64 P0.001 Q0.001
N45 M8
N50 G0 X68.804 Y-180.895
The origin of the the piece is a known position on the spoil board, its surface being 0. So I raised the tool head to 40ish mm above the work piece. I then single step through the program and before it hits N50 (line 23) the tool head plunges to 0.
I've dissected the G-code as best as I could, but I can't find any portion that moves the head to 0.
(absolute distance mode)
(Units per minute mode)
(XY Plane set)
(incremental distance mode for I, J & K offsets)
G90 G94 G17 G91.1
(Unit Select MM)
G21
(Tool 5)
(Tool Change)
T5 M6
(Spindle Speed set to 5000)
(M3 = Right hand tool select)
S5000 M3
(XY Plane set)
(absolute distance mode)
(Units per minute mode)
G17 G90 G94
(Select Coordinate System 1)
G54
(Path Tollarance)
G64 P0.001 Q0.001
(Coolant Start)
M8
(Rapid Traverse to X68 Y-180)
G0 X68.804 Y-180.895
What am I missing here?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
22 Aug 2024 18:55 - 22 Aug 2024 18:56 #308427
by Todd Zuercher
Replied by Todd Zuercher on topic Tool resets to Z0 when starting program without being told to
Have you remapped any of your G-codes? (specifically M6)
Other than possibly something hidden in the M6 settings or an M6 remap, I don't see anything that could even move the Z axis at all.
Do you have anything configured in the EMCIO section of your ini file for the tool changer settings? Specifically "TOOL_CHANGE_POSITION = 0 0 0" or anything pertaining to M30?
If you don't have anything configured for the tool change position, (assuming your are using manual tool changes.) Linuxcnc may be assuming a manual tool change position of absolute Z0 (same as issuing a G53Z0 command) for the tool change position. And if you don't have the machine Z0 position configured as the top of Z travel, then I think we have found your problem. Otherwise I have no idea what could be going on.
Other than possibly something hidden in the M6 settings or an M6 remap, I don't see anything that could even move the Z axis at all.
Do you have anything configured in the EMCIO section of your ini file for the tool changer settings? Specifically "TOOL_CHANGE_POSITION = 0 0 0" or anything pertaining to M30?
If you don't have anything configured for the tool change position, (assuming your are using manual tool changes.) Linuxcnc may be assuming a manual tool change position of absolute Z0 (same as issuing a G53Z0 command) for the tool change position. And if you don't have the machine Z0 position configured as the top of Z travel, then I think we have found your problem. Otherwise I have no idea what could be going on.
Last edit: 22 Aug 2024 18:56 by Todd Zuercher.
The following user(s) said Thank You: Aciera
Please Log in or Create an account to join the conversation.
22 Aug 2024 20:56 #308431
by RyanB
Replied by RyanB on topic Tool resets to Z0 when starting program without being told to
I removed the tool change portion of the Gcode and didn't see a plunge to 0, so that narrowed the culprit down.
This is the EMCIO portion of my INI
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
TOOL_CHANGE_QUILL_UP = 1
Not sure what the quill up means, but there's no position for the tool change to go to, so I guess it defaults to G53.
I didn't find anything for M30.
I suppose the work around is to generate the Gcode and remove the tool change stuff (fusion restricts multiple operations with tool changes for free users) and then add a bit to raise the spindle above the work piece before starting. Because I needed more reasons to dislike fusion.
Thanks for the answer.
This is the EMCIO portion of my INI
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
TOOL_CHANGE_QUILL_UP = 1
Not sure what the quill up means, but there's no position for the tool change to go to, so I guess it defaults to G53.
I didn't find anything for M30.
I suppose the work around is to generate the Gcode and remove the tool change stuff (fusion restricts multiple operations with tool changes for free users) and then add a bit to raise the spindle above the work piece before starting. Because I needed more reasons to dislike fusion.
Thanks for the answer.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
26 Aug 2024 12:23 - 26 Aug 2024 12:45 #308694
by Todd Zuercher
Replied by Todd Zuercher on topic Tool resets to Z0 when starting program without being told to
How do you have your Z axis configured on your machine? Specifically where do you have the machine Z zero position set up to be? If the command G53 Z0 moves your machine down to the table surface, that would be your problem.
The normal convention for a milling machine setup is to have the machine Z zero to be at the top of the spindle travel (or bottom for a moving table like the knee of a Bridgeport.) In other words the tool as far away from the table as possible.
Not that you can't configure your machine to have Z zero at the table surface. You can, but you will have to be careful of default assumptions often used in most g-code. You will have to watch out for commands such as G53Z0 often used at the beginning or end of files and replace them with something more appropriate for your machine. And for tool changes you will need to set up and configure a safe tool change position for G30 and add the line "TOOL_CHANGE_AT_G30=1" to the [EMCIO] section of your ini file. (And even then Linuxcnc might try to move to G53Z0 before going to the G30 position, so I'm not 100% certain this will even work as I've never tried to do it.)
But it is easier and safer just to configure the machine to the usual convention of machine Z zero at the top of Z travel. Then use work coordinate offsets and or tool offsets to move the Z zero position to wherever you need it to be for your milling file.
(Also, yes the "TOOL_CHANGE_QUILL_UP = 1" means that the machine is going to move to G53Z0 at a tool change command.)
The normal convention for a milling machine setup is to have the machine Z zero to be at the top of the spindle travel (or bottom for a moving table like the knee of a Bridgeport.) In other words the tool as far away from the table as possible.
Not that you can't configure your machine to have Z zero at the table surface. You can, but you will have to be careful of default assumptions often used in most g-code. You will have to watch out for commands such as G53Z0 often used at the beginning or end of files and replace them with something more appropriate for your machine. And for tool changes you will need to set up and configure a safe tool change position for G30 and add the line "TOOL_CHANGE_AT_G30=1" to the [EMCIO] section of your ini file. (And even then Linuxcnc might try to move to G53Z0 before going to the G30 position, so I'm not 100% certain this will even work as I've never tried to do it.)
But it is easier and safer just to configure the machine to the usual convention of machine Z zero at the top of Z travel. Then use work coordinate offsets and or tool offsets to move the Z zero position to wherever you need it to be for your milling file.
(Also, yes the "TOOL_CHANGE_QUILL_UP = 1" means that the machine is going to move to G53Z0 at a tool change command.)
Last edit: 26 Aug 2024 12:45 by Todd Zuercher.
The following user(s) said Thank You: Aciera
Please Log in or Create an account to join the conversation.
Time to create page: 0.085 seconds