Machinekit lathe gcode not working as expected

47 views
Skip to first unread message

Gediminas Dirma

unread,
May 30, 2019, 2:40:12 PM5/30/19
to Machinekit
Hello,

I am running CNC lathe with beaglebone and machinekit.  Lets say that i turn down cylinder from 45mm to 40mm. In my CAM i generate gcode and it seems fine. 
But then i upload it to machinekit, it changes turning diameter it then starts turning not from 45mm but from 90mm and it turns down 5mm. It seemes that something
is with X axis, since Z is working fine. What could cause this problem? Maybe I do something wrong with tool table but i followed procedures writen here http://linuxcnc.org/docs/html/lathe/lathe-user.html

Thanks for help.

Chris Albertson

unread,
May 30, 2019, 3:49:12 PM5/30/19
to Gediminas Dirma, Machinekit
Two numbers stand out 45mm and 90mm.     Notice that 90mm is exactly twice 45.    A common mistake is to forget that moving the tool 1mm reduces the diameter by 2mm.  Diameter is twice the tool movement. g-code specified tool movement, not part size   Getting this backward might explain the 45 and 90 error.

--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
To view this discussion on the web visit https://groups.google.com/d/msgid/machinekit/30e422e8-c824-4f50-9636-f1a2c6681967%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Chris Albertson
Redondo Beach, California

Gediminas Dirma

unread,
May 30, 2019, 3:56:12 PM5/30/19
to Chris Albertson, Machinekit
I understand what you said, but in CAM i set the stock diameter to 45mm and after generating gcode I inspect it and i can see that X axis is maximum position is around 48mm ( for return passes it retracts from work). But still somehow in machinekit it thinks that it has to go twice the set X distance in the gcode. I found something about G8 and lathe radius mode. Maybe this has something to do with it.

markus

unread,
May 30, 2019, 4:10:33 PM5/30/19
to Gediminas Dirma, Chris Albertson, Machinekit
But that's wrong, if stock is diameter 45mm then it should retract to
22.5mm. X=0 is the rotation axis.
> >> <https://groups.google.com/d/msgid/machinekit/30e422e8-c824-4f50-9636-f1a2c6681967%40googlegroups.com?utm_medium=email&utm_source=footer>
> >> .

schoo...@gmail.com

unread,
May 31, 2019, 3:29:13 AM5/31/19
to machi...@googlegroups.com
G7 and G8

Either the cam output is in the wrong mode (not what you intended)
or you are in the wrong mode.

Because arcs use radii, what you tell your CAM the diameter is
does not mean it will use diameter mode for the code.

A lathe is not just something you can feed CAM code to unchecked.
It will crash badly if you do not understand the gcode and touch off
properly etc.

It is a very good idea to do a dry run with no stock in the chuck, or
offset the X position so that it runs
above the stock to check first.
Reply all
Reply to author
Forward
0 new messages