Mario,

My approach is to pre-process the G-Code file to insert the necessary head
lifts. For G0 commands, nothing need be done since the head will always be
in the up position for a G0 move. For G1 commands use arctan2(Y2 - Y1, X2 -
X1) to calculate the angle between two vectors, where Y1 and X1 are the X
and Y values of the previous G1 command and Y2 and X2 are the X and Y values
of the current G1 command. If the abs(LastAngle - CurrentAngle) is greater
than the maximum angle without a head lift, then insert the head lift code,
i.e.:

M5
G0 A<New Angle>
M3

For G2 and G3 commands, set the end angle of the rotational axis as part of
the G2 or G3 command. It should already be at the start angle at the time
the G2 or G3 command is processed. Unless I missed something, I don't think
calculations for this angle apply to any other G commands.

To calculate the angle on the fly, as part of a custom component for
example, do as Sebastian suggested, use the velocities of X and Y. Of
course, even though you can calculate that on the fly, I am not sure what
meaningful action you can do with it.

Regards,
Eric


I'll sum the requirement:
Basically, all we want is to hook planner internal variable into axis
output.
planner_heading_in_XY_plane > axis_A | filter possible angle limits

The main obstacle here:
Is the "heading angle at current point" tappable at current EMC2 version?


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to