Skip to content

Request - Axislabeling, Homing, infinite rotational C, AC-Kinematics, switching between mcs and g54 #965

Description

@NicoDetzler

Hi everyone!

First of all, thank you for developing grblHAL and making this open source.

Information on my build:
-T41u5xbb Breakoutboard by Phil Barrett
-Teensy 4.1
-Closed loop stepper hybrid
-Ballscrews, 4mm pitch for linear axes
-Harmonic drive 30:1 for rotational axes
-Machine Zero is front,upper left corner

Image

AXIS LABELING: So I built a 5 axis machine with a table-table A-C configuartion, where A rotates around X-Axis and C around the rotated Z'-axis.
My problem is, that the breakoutboard demands for a B axis instead of C. Is there any way to rename the B-axis to C?

HOMING: Further I got some issues with homing. Homing for X,Y and Z is perfectly working and sets the values of the machinecoordinatesystem to X0,Y0 and Z0. My Problem here is the A-Axis triggers the Switch at a value (-45,02) degrees and sets 0. But the real 0 position should be 0 degrees not -45,02 degrees. Is there a possibility to set the homing values for the machine coordinate system (mcs) via $ parameters for each axis ?
x_h_mcs = 0, y_h_mcs = 0, z_h_mcs = 0, a_h_mcs = -45.02, c_h_mcs = 0

INFINITE ROTATIONAL C: In my setup, the C axis is able to turn infinite roatations. Therfore I would like to set the angles between 0 and 360. Every higher or lower angle coming from the gcode, should be converted to that interval.

AC-KINMATICS: For the kinematics I wanted a variable Kinematic_enable. When a M-code (M850/M851 or #TRAFO_ON/#TRAFO_OFF) or a switch in ioSender is triggered, Kinematic_enable should be toggled. For the kinematics definition I would like to have the machinecoordinatesystem (mcs) properly homed, so X0,Y0,Z0,A0,C0 is the real machine position. Because with that I am able to use transformation matrizes to calculate new X,Y and Z values for when Transformation is activated.
What the Transformation should do: When activated and there is no change in angle A or C, it directly calculates the new X,Y and Z values.
When there is an angle change eg A0° to A30° or B34° to B129°, the kinematics should calculate, and interpolate the curve. The segmentlength of interpolation should also be settable through the $ Parameters.

In my Case G54 sits on the Table and rotates with A and C. So my G54 is not directly vectorially added to MCS, it sits on the Table.
The vector chain is:
MCS(0,0,0) -> Sway-axis-center-A(A_X,A_Y,A_Z) -> Turn-axis-center-C(C_X,C_Y,C_Z) -> G54(G54_X,G54_Y,G54_Z)->target

With those vector values, and the given angles A (alpha) and C(theta) and the target vectors added to G54 out of CAM, the transformed values for X Y and Z should be:

X_trans = A_X + (G54_X+target_x)⋅cos(theta) - (G54_Y+target_y)⋅sin(theta)+C_X
Y_trans = A_Y + ((G54_X+target_x)⋅sin(theta) + (G54_Y+target_y)⋅cos(theta)+C_Y)⋅cos(apha) - ((G54_Z+target_z) +C_Z)⋅sin(alpha)
Z_trans = A_Z + ((G54_X+target_x)⋅sin(theta) + (G54_Y+target_y)⋅cos(theta)+C_Y)⋅sin(alpha) + ((G54_Z+target_z) + C_Z)⋅cos(alpha) + Tool_length

I managed to calculate and manipulate GCode for a simultaneous movement with excel.
The gcode with transformation on should have the same effect as in the video:
G54 (sits 3mm above screw)
G0 X0Y0
G0Z0
M851 or #TRAFO_ON (switching on transformation kinematic)
G0 A90C180
G0 A-45C360
G0 A0C540
G0 C0
M850 or #TRAFO_OFF (switching off transformation kinematic)
#MCS_ON
G0 Z0
G0 X0Y0
#MCS_OFF

20260614_173148.mp4

SWITCHING BETWEEN MCS AND G54: Is there a way to switch between machine coordinate system (mcs) and the active coordinate system. So for a easy way to get the z-axis out of the way i woould like to use a gcode like #MCS_ON G0 Z0

I tried to study the grblHAL code. Sadly I'm at the end of my knowledge to manipulate the code myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions