Page 1 of 1

Move axis to dest and at speed

Posted: Sat May 29, 2021 1:57 pm
by GabrielR922
Hi Tom

I'm trying to move my axis to a home position with a C code.

The home position will be always relative to machine G53 0.

So I need a way to script in C a G1 G53 X100 Y100 F10000.

Tried MoveXYZ but it won't work. Also it would be nice to use Machine coordinate, not units. (like Move command).

Thanks.

Re: Move axis to dest and at speed

Posted: Sat May 29, 2021 3:44 pm
by TomKerekes
Hi Gabriel,

The simplest method is to make 2 MoveAtVel() calls. The motion of X and Y will be simultaneous but independent and not necessarily on a straight line. A trick to make it on a straight line is to scale the Velocities, Accelerations, and Jerks proportional to the distance each axis is to move relative to the combined vector distance.

Or you might perform a G53 MDI command to KMotionCNC.

Otherwise to do a coordinated motion see the CoordMotion C examples.