• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Method to read Trig. Height returned from G30 S-1?

Scheduled Pinned Locked Moved
Gcode meta commands
4
8
397
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    JayT
    last edited by 7 Dec 2021, 12:10

    Hi,

    Does anyone know how to save trigger height returned by "G30 S-1" in a variable ? or does it get saved in some object model parameter that can be read in a variable ?

    undefined undefined 2 Replies Last reply 7 Dec 2021, 13:13 Reply Quote 0
    • undefined
      PCR @JayT
      last edited by 7 Dec 2021, 13:13

      @jayt you can save it via M500 i think

      1 Reply Last reply Reply Quote 0
      • undefined
        Phaedrux Moderator
        last edited by 7 Dec 2021, 18:31

        Using G30 S-3 and M500 P31 would measure the trigger height and then save it to config-override.g

        https://duet3d.dozuki.com/Wiki/G30
        https://duet3d.dozuki.com/Wiki/M500

        Z-Bot CoreXY Build | Thingiverse Profile

        1 Reply Last reply Reply Quote 1
        • undefined
          OwenD @JayT
          last edited by 7 Dec 2021, 20:04

          @jayt

          You probably want to read sensors.probes[].lastStopHeight if you want to use it in a macro or something
          Or you might want trigger height depending on your use case

          The full list is here
          https://github.com/Duet3D/RepRapFirmware/wiki/Object-Model-Documentation

          undefined 1 Reply Last reply 8 Dec 2021, 05:48 Reply Quote 2
          • undefined
            JayT @OwenD
            last edited by JayT 12 Aug 2021, 12:20 8 Dec 2021, 05:48

            @owend :
            @Phaedrux :
            thank you for quick responses.

            with G30 S-3 and M500 P31 would measure, save and is perfect.

            If not, then I can try taking 4-5 points , save in variables, take average and set that avg value as trigger height to minimize the error?
            How to save object-model data into a variable?

            undefined undefined 2 Replies Last reply 8 Dec 2021, 16:31 Reply Quote 0
            • undefined
              Phaedrux Moderator @JayT
              last edited by 8 Dec 2021, 16:31

              @jayt said in Method to read Trig. Height returned from G30 S-1?:

              How to save object-model data into a variable?

              https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands#Section_Variables

              have you seen this?

              Z-Bot CoreXY Build | Thingiverse Profile

              1 Reply Last reply Reply Quote 1
              • undefined
                OwenD @JayT
                last edited by 8 Dec 2021, 18:55

                @jayt
                Sounds like you're trying to do something like this

                https://forum.duet3d.com/topic/22139/macro-for-automatic-calibration-of-bl-touch

                You may have to modify to suit your machine and requirements

                undefined 1 Reply Last reply 9 Dec 2021, 07:13 Reply Quote 1
                • undefined
                  JayT @OwenD
                  last edited by JayT 12 Sept 2021, 07:14 9 Dec 2021, 07:13

                  @owend :
                  Thank you for the reference. looks like a good base for me.

                  @Phaedrux : thanks, I missed the global var example earlier. Now I see how its read.
                  You can close the thread as solved, As I understand how to read object model variables and where to look for the available variables.

                  1 Reply Last reply Reply Quote 0
                  7 out of 8
                  • First post
                    7/8
                    Last post
                  Unless otherwise noted, all forum content is licensed under CC-BY-SA