fra589 / grbl-Mega-5X

5/6 Axis version of Grbl, the open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on an Arduino Mega2560
https://github.com/fra589/grbl-Mega-5X/wiki
Other
341 stars 159 forks source link

G2/G3 Arcs with an XYUV Machine? #190

Closed hexagon5un closed 2 years ago

hexagon5un commented 3 years ago

I have four-axis (2x2) hotwire cutter, and would like to know if it's possible to run arcs in both the XY and UV planes.

I've tried with like G2 X0 Y0 U0 V0 I10 F200, for instance, and the XY does a circle, but the UV stays still.

Is this implemented, and if so, what's the right Gcode incantation? If not, I can keep on approximating by straight lines. :)

fra589 commented 3 years ago

Hi @hexagon5un,

Unfortunately for you, it's not implemented...
As you can read in the file gcode.c (line 919 to 1141), the arc calculation is made only in the XY, ZX or YZ planes...
Planes mode 17.1 (UV), 18.1 (WU), and 19.1(VW) are not supported by Grbl.

@++;
Gauthier.

hexagon5un commented 3 years ago

Thanks Gauthier!

And thanks for the pointer to where it is in the code. I may just have to have a hack at it and see what happens.

Do you know if there's a standard way to implement something like this? I,J,K are taken by the XY G2 command. Do I just keep going with L,M,N?

fra589 commented 3 years ago

Hi @hexagon5un,

As I am retired, I unfortunately no longer have access to the standards defining the ISO GCode, and therefore, I cannot say which letters can be used to define the circular interpolation elements in UVW planes.
In LinuxCNC which I use as a reference today, these features are not implemented:
cf. http://linuxcnc.org/docs/2.8/html/gcode/g-code.html#gcode:g2-g3

'Planes 17.1, 18.1, and 19.1 are not currently supported.'

If you choose to use your own letters for these parameters (be careful, L and N are already used), you will also have to implement their use in the decoding part of the GCode sentence (between lines 302 and 403 of the gcode.c file)

@++;
Gauthier.