Canned cycles relative - G91 G81 doing two times

More
29 Jul 2012 18:09 #22592 by juergen-home
I'm using linuxcnc2.5 with Axis. I read a lot but I'm still a very beginner.
When I tried to make relative caned cycles I do not really understand the result.
I make the same call 2 times a get 2 different results.

The gcode is:

G90 g80 G0 Z1 (coordinate home)
X0 Y0 f1000
g91 G98 G81 X5 Y0 Z-5 R3 L3
g91 G98 G81 X5 Y0 Z-5 R3 L3
G90 g80 G0 Z1
X0 Y0
M2 (program end)

With the first time of calling g81 I have a kind of triangle trajectory.
The second (and any other) call(s) the move is (from my sight) as it should be.

1. So what I'm doing wrong?
2. When I change G98 to G99 see no change of the trajectory

Attachments:

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

More
30 Jul 2012 10:54 #22602 by Rick G
Not sure why you would have

g91 G98 G81 X5 Y0 Z-5 R3 L3
g91 G98 G81 X5 Y0 Z-5 R3 L3

together, but I would recomend a G80 after each canned cycle.

www.linuxcnc.org/docs/html/gcode/gcode.h...c_g80_cancel_modal_a

Rick G

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

More
30 Jul 2012 11:32 #22603 by BigJohnT
It's a little difficult to understand but if you read the examples in the manual for G81 it should become clearer why your R value did not give you what you expected when using relative mode. The following code will give you what you expect. I assume but do not know as I don't see it specified in your example code that your using millimetres and not inches. It is a good idea to always put a preamble like shown in this G code tutorial .
G21 G17 G40 G49 G64 P0.005 G80 G90 G94
G0 Z1
X0 Y0
G91 G98 F1000
G81 X5 Y0 Z-5 R-1 L3
X5 Y0 L3
G80
M2

John

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

More
30 Jul 2012 17:50 #22610 by juergen-home
True. Exactly that was I intend to do. I will read the manual once more.
Thanks
Juergen

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

More
30 Jul 2012 17:56 #22611 by BigJohnT
BTW, the screen shot was a nice addition to your original post as it made it much easier to understand your problem exactly.

John

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

Time to create page: 0.074 seconds
Powered by Kunena Forum