Gcode went wrong

More
7 years 10 months ago #122784 by mane
Gcode went wrong was created by mane
Today my first gcode program went wrong. I wanted to mill a simple rectangle contour by using the tool radius compensation.
The raw material dimensions were 57mm x 25mm and i wanted to mill it to 56mm x 24mm.
The path from point 2 to 3 to 4 went wrong, but i do not understand why. In the tool table i added a 10mm tool.
Tanks for any hint.

Gcode:
G21 G17 G64 G90
F56
G0 Z5
G0 X-2 Y-2
G41 T10
Z-10
G1 X0.5 Y0.5
G1 X0.5 Y24.5
G1 X56.5 Y24.5
G1 X56.5 Y0.5
G1 X0.5 Y0.5

Attachments:

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

More
7 years 10 months ago #122797 by curtisa
Replied by curtisa on topic Gcode went wrong
My quick guess would be that you've called the T10 tool load after the G41 compensation has been turned on:

Code:
... G41 T10 ...

Cutter compensation uses the currently loaded tool to determine the correct offset from the intended path. By loading the tool after the compensation has been turned on the compensation may not 'know' what the new tool is and assumes it is whatever diameter was used up to the point it was turned on (in your case no tool was defined beforehand, so tool diameter would be zero).

Try calling tool T10 before calling G41 and see if that corrects the issue. Alternatively it looks like you can use G41 D10 as well. The D variable forces the compensation to use tool number 10 for every subsequent compensated move. More info here;

linuxcnc.org/docs/2.6/html/gcode/gcode.html#sec:G41-G42

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

More
7 years 10 months ago #122806 by andypugh
Replied by andypugh on topic Gcode went wrong
Are you sure you wanted G41 and not G42?

It seems to me that you wanted the cutter to the left of the chosen path?

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

More
7 years 10 months ago - 7 years 10 months ago #122812 by curtisa
Replied by curtisa on topic Gcode went wrong
Isn't that what G41 does? From the manual:

To start cutter compensation to the left of the part profile, use G41. G41 starts cutter compensation to the left of the programmed line as viewed from the positive end of the axis perpendicular to the plane.


Based on the OPs picture it looks like his code started at point 1 and went clockwise around the part, G41 should have placed the cutter to the left as it went around the perimeter.

Edit: not so sure any more. The diagrams on this page make me think G42 might have been required rather than G41.
Last edit: 7 years 10 months ago by curtisa.

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

More
7 years 10 months ago #122813 by Hakan
Replied by Hakan on topic Gcode went wrong
I don' t think cutter compensation is active and that the coordinate system is a bit off. G0 X-2 Y-2 would make a big dent in the corner with a 10mm tool before compensation is switched on. Not sure why compensation didn't activate, maybe lack of M6?

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

More
7 years 10 months ago #122815 by jbraun
Replied by jbraun on topic Gcode went wrong
If a 10MM tool is loaded that program should have failed with an entry move error.
Axis shows the loaded tool at the bottom of the screen, I am not sure how the other interfaces display that information.

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

Time to create page: 3.289 seconds
Powered by Kunena Forum