Study the G Code interpolation of Linux CNC

More
24 Apr 2017 04:11 #91933 by andre
Hello, i don't know if this is a suitable category to post this so please fix me if i'm wrong.

I'm new to CNC and as far as i know, Linux CNC has one of the best interpolations behind those G-Code. I have been searching for documents about linear, circular interpolation.. but they are so fragile and moreover, most of them are about G-Codes definition but not the math behind them.

So there are some keywords i have known until now: DDA, NURBS, XY linear interpolation...

Could you please help where i should start learning about this problem in Linux CNC (documentations, source code...) because i want to make my own simple CNC Machine.

This example to show my purpose:
_ I have 2 points: A(x0,y0), B(x,y).
_ I want my 2 X/Y motors to move with a suitable set of points (interpolation) from A to B quickly, stably.
_ After that i will send pulses to my motors.

So following the idea, my G-Code will look like: G01 A B feedrate... (just an example)

In general, i want to get the set of points for my motors to move following my G-Code

Thank you in advanced !

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

More
24 Apr 2017 13:34 #91959 by Todd Zuercher
I think you may be over thinking this.

If you want your machine to move to point A(x,y coordinates) at feed rate n, your G-code would be

G1 A Fn

Then to move from point A to point B at the same feed rate, you would simply issue

G1 B

To make a program out of it, you could do a G0 positioning move (which will move at the machines maximum rate) to move to point a then use a G1 move to move to point B.

G0 A
G1 B Fn

You don't have to do any math (Linuxcnc is doing all that) all G-code is, is specifying points, and what to do between those points (G1 and G0=move in a straight line)

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

More
24 Apr 2017 16:19 #91974 by andre
Yeah, i know Linux CNC already has that stuff done. However, i also want to know what the mathematics that our developers use :) About the linear interpolation, circular interpolation... I cannot find it in the documentations though..

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

More
24 Apr 2017 17:08 #91981 by Todd Zuercher
As far as that goes what I think you're asking for is what the trajectory planner does. That should be reasonably documented somewhere as it was mostly rewritten a couple of years ago. Try asking on the developers mailing list
The following user(s) said Thank You: andre

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

More
24 Apr 2017 22:59 #92010 by andre
thank you Sir! I will try asking them. Have a nice day :laugh:

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

More
25 Apr 2017 16:35 #92076 by andypugh
Were you on IRC last night?

If not, this video might help.

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

Time to create page: 0.108 seconds
Powered by Kunena Forum