Move axis to dest and at speed

Moderators: TomKerekes, dynomotion

Post Reply
GabrielR922
Posts: 79
Joined: Thu Aug 13, 2020 10:07 pm

Move axis to dest and at speed

Post by GabrielR922 » Sat May 29, 2021 1:57 pm

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.

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: Move axis to dest and at speed

Post by TomKerekes » Sat May 29, 2021 3:44 pm

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.
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply