Use system variables in scripts

  • I don't think I've ever seen this capability but am curious if it's possible and I just missed it.

    I'd like to be able to capture current height and use it in a macro. Good examples of this would be:

    • list itemA check corner script where I could dump the Z-height out the console so I could run the script without having to pause at each corner and write things down.
    • A Z-Probe height offset where I could perform the machinations of jogging to the nozzle, setting Z0 and then doing a G30. At that point, I'd love to be able to automatically capture that value and store it in the config-override.

    I don't mind scripting the functionality I just need to have access to the functions to let me do it.

    Am I missing something that exists? Is this something on the roadmap?

  • I just realized that G30 S-1 reports the trigger height in the console. It isn't perfectly reliable but it seems to work making my first use case moot.

  • Are you trying to do this: manual bed leveling assistant?

Log in to reply