Store and recall WCS offsets?



  • Happy new year everyone,

    over the holidays I've managed to do some CNC work and I realized I was missing a feature on my Duet-controlled Shapeoko-clone. My usual routine is

    • home the machine
    • jog to the desired stock origin in XY and set the WCS XY origin
    • probe the Z height, set WCS Z origin
    • (missing step here, see below)
    • start the program
    • realize that some of the cutting parameters were wrong

    If I then use DWC to interrupt the program, everything is fine - I can correct the program, reupload and try again. If, however, things go south so rapidly that I have to hit the emergency shutdown, I lose the offsets of the WCS in relation to the machine coordinate system. That's where the missing step comes in - I should probably write down the coordinate system offsets every time, but in reality, I don't. This is what started me thinking:

    Would it be possible to have a command / macro file that reads the current WCS offsets and stores them in a file on the SD card - preferably as a set of G-Codes so that executing that file re-establishes the coordinate system offsets?

    Going through the list of supported G-Codes, I have not found anything to achieve this functionality... yet 🙂

    Thanks
    Volker



  • M500 saves work offsets. You can look in config_override.g to see how this works.

    Be sure you have an M501 near the end of config.g to reload them at next boot.

    Note: This does not appear to be working (yet) in RRF3.


  • administrators

    @Danal said in Store and recall WCS offsets?:

    Note: This does not appear to be working (yet) in RRF3.

    I presume you mean RRF3 on Duet 3 with attached RPi? It should be working in standalone mode and on Duet 2.



  • @dc42 said in Store and recall WCS offsets?:

    @Danal said in Store and recall WCS offsets?:

    Note: This does not appear to be working (yet) in RRF3.

    I presume you mean RRF3 on Duet 3 with attached RPi? It should be working in standalone mode and on Duet 2.

    Good clarification. Yes, RRF3 on D3+Pi was the test environment where it puts in a comment but no actual G commands. I'm presuming from the comment that the rest of the code will come to that environment soon.


Log in to reply