Gcode went wrong

More
23 Dec 2018 15:49 #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
23 Dec 2018 20:52 #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:

...
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
23 Dec 2018 22:47 #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
24 Dec 2018 02:40 - 24 Dec 2018 02:45 #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: 24 Dec 2018 02:45 by curtisa.

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

More
24 Dec 2018 03:48 #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
24 Dec 2018 08:46 #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.

More
24 Dec 2018 09:32 #122818 by MaHa
Replied by MaHa on topic Gcode went wrong
If you look at the sketch, there must have been a crash at X-2 Y-2 with the G0 Z-10 move, without cutter compensation. There was no report about. Probably touch off was done with the tool to sides of the block. T without M6 only prepares tool.
Since cutter compensation in linuxcnc is kind of ¿?¿ ,it`s good advice to read this part of the manual.
Attachments:

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

More
24 Dec 2018 11:34 #122822 by mane
Replied by mane on topic Gcode went wrong
Thanks to all your comments. I thought it´s easier to run a simple program. I will check all suggestions in the next days.
Merry Christmas.
Mane

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

More
24 Dec 2018 18:56 #122833 by jbraun
Replied by jbraun on topic Gcode went wrong
Here's an attached png to clarify what I posted earlier.
The red is your file with no tool loaded and no D in the G41 line. You need one or the other for linuxcnc to read the tool table.
The white is a compensated path with a lead-in, notice how it rolls around corners.

It's not hard programming if you follow the rules.
Merry Christmas to you as well.
Attachments:

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

More
26 Dec 2018 19:23 - 26 Dec 2018 19:29 #122920 by mane
Replied by mane on topic Gcode went wrong
I changed line 5 to G41 D10 and did not use the tool table. Homed the machine and touched left lower corner of the workpiece with G54. Then i loaded the program below with error "Length of cutter compensation entry move is not greater than the tool radius".
To have no problem with tool cutter entry i added line 4 to be far away from the corner. But this does not help.
The error comes right after loading the program, in the status line bottom i have no tool loaded. And G54 DRO view does not change the values when i jog around the axis by keyboard.
1. G21 G17 G40 G49 G61 G90 G54
2. F56
3. G0 Z5
4. G0 X-20 Y-20

5. G41 D10
6. G1 Z1
7. G1 X0.5 Y0.5
8. G1 X0.5 Y24.5
9. G1 X56.5 Y24.5
10. G1 X56.5 Y0.5
11. G1 X0.5 Y0.5
12. M30
Last edit: 26 Dec 2018 19:29 by mane. Reason: additional info added

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

Time to create page: 0.237 seconds
Powered by Kunena Forum