Support for G38 for CNC users?



  • Are there any plans or work-in-progress to add support to G38.x command?
    It seems to be an important feature for CNC users. e.g. to zero tools and more importantly, stock.
    I saw some discussion but not sure if there were any update.



  • I recently asked the same and was refered to

    Look up M585 in the GCodes page of the wiki.

    Which might get the job done, my CNC is still under linuxcnc control and I haven't put a probe on the printer just to try it yet


  • administrators

    I can look into providing G38 as well as M585 in RRF 3.



  • that would be fantastic!



  • @plusphenol said in Support for G38 for CNC users?:

    Are there any plans or work-in-progress to add support to G38.x command?
    It seems to be an important feature for CNC users. e.g. to zero tools and more importantly, stock.
    I saw some discussion but not sure if there were any update.

    Hi,
    for learning: Can you elaborate on your use-case for G38? (Could you also just make a macro for an additional csys that you zero out somewhere and call that?) Just for info, if you find time, would be greatful! Cheers!



  • Thank you all for your responses.
    Yes, I found that reply of M585 as well.
    However, the definition and usage of M585 is slightly different from that of G38.
    To my understanding, G83 is more like "zero this coordinate system to this point" and M585 being "confirm the tool is at this coordinate."
    It should be possible to write a macro to use M585 to zero a work piece.

    @dc42
    I skimmed through the implementation of G32 and guess I can [try] implement G38.*.
    I was wondering if there are any active work in progress, so I would like to open a discussion here first in case it is almost done.

    @LB
    I'm still learning as well 🙂
    if you are cutting a feature on an existing piece, you will need to set the machine origin to match the origin of the piece in your CAD, say the bottom left corner of a block aluminum. By using G38, the machine can probe the edges of the aluminum block, and locate exactly where that bottom-left corner is. One can also do this by hand by jogging tool slowly towards an edge, but having the machine do it automatically is easier.



  • @plusphenol said in Support for G38 for CNC users?:

    To my understanding, G83 is more like "zero this coordinate system to this point" and M585 being "confirm the tool is at this coordinate."
    It should be possible to write a macro to use M585 to zero a work piece.

    There is an open Pull Request from me that extends M585 to do workpiece probing. It will then move a probe towards the workpiece and simply stop there. Afterwards you can set the current coordinate of the direction you were probing as the desired coordinate system's zero. Still not fully automated but rather close because you only need to send G10 L20 Pxxx N0 where xxx is the desired coordinate system number and N is the axis to be zeroed.


  • administrators

    @plusphenol said in Support for G38 for CNC users?:

    I skimmed through the implementation of G32 and guess I can [try] implement G38.*.
    I was wondering if there are any active work in progress, so I would like to open a discussion here first in case it is almost done.

    The way M585 operates is already changed in RRF3 because it uses a separately-defined probe instead of an endstop input. G38 would work in the same way.



  • @dc42 Only issue with M585 without my amendments is that it sets tool offsets at the end. It did you also include my flag that prevents this?



  • @dc42
    Is there anywhere to find documentation/discussion on RRF3 specs? and status of implementation on Duet firmware?


  • administrators

    @plusphenol said in Support for G38 for CNC users?:

    @dc42
    Is there anywhere to find documentation/discussion on RRF3 specs? and status of implementation on Duet firmware?

    See the GCodes page on the wiki.


  • administrators

    @wilriker said in Support for G38 for CNC users?:

    @dc42 Only issue with M585 without my amendments is that it sets tool offsets at the end. It did you also include my flag that prevents this?

    I will review this for RRF 3.


Log in to reply