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

mesh.g parameter handling

Scheduled Pinned Locked Moved
Beta Firmware
5
15
436
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
    Gixxerfast @GeneRisi
    last edited by Gixxerfast 29 Oct 2021, 19:48

    @generisi I havent't tested all options but as far as I see it. If called without an S parameter mesh.g is called. Any other parameters are sent to the macro.

    If called with a S parameter mesh.g isn't called.

    Have you found it to work differently?

    In my mesh.g I call G29 S0; If it would call mesh.g I would have an endless recursive loop.

    Voron V2.4 (#1317) with Duet 3 Mini5+ Wifi and 1LC v1.1 Toolboard
    Voron V0.1 (#637) with Duet 3 Mini 5+ Wifi and 1LC v1.2 Toolboard
    Ender 3 Pro with BTT SKR-2 + RRF

    undefined 1 Reply Last reply 29 Oct 2021, 19:52 Reply Quote 0
    • undefined
      fcwilt @GeneRisi
      last edited by 29 Oct 2021, 19:49

      @generisi said in mesh.g parameter handling:

      @gixxerfast "and in RRF3.3 and later parameters present are passed to mesh.g". I don't think that sentence explains the behavior I see because I expected all parameters to be passed in RRF3.3 and later.

      I have not encountered the need to have any parameters when using G29 or G32.

      They just are easy ways to invoke different chunks of code. Rather like G28 invokes homeall.g, G28 X invokes homex.g, etc.

      Frederick

      Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

      undefined 1 Reply Last reply 29 Oct 2021, 19:58 Reply Quote 0
      • undefined
        GeneRisi @Gixxerfast
        last edited by 29 Oct 2021, 19:52

        @gixxerfast Yes, what I saw is that a G29 that includes an "S" parameter does not call mesh.g, even if other parameters are included that G29 doesn't interpret.

        So, G29 T2 call mesh.g
        G29 S2 does not call mesh.g
        G29 T2 S2 does not call mesh.g

        undefined undefined 2 Replies Last reply 29 Oct 2021, 19:53 Reply Quote 0
        • undefined
          Gixxerfast @GeneRisi
          last edited by Gixxerfast 29 Oct 2021, 19:53

          @generisi OK, I cannot find the T parameter in the G29 documentation. What does it do?

          Aha, now I see. If you add your own parameters you mean ? Or?

          I don't think you can add your own parameters to existing and defined gcodes. I can't test myself right now since my printer is occupied printing.

          Voron V2.4 (#1317) with Duet 3 Mini5+ Wifi and 1LC v1.1 Toolboard
          Voron V0.1 (#637) with Duet 3 Mini 5+ Wifi and 1LC v1.2 Toolboard
          Ender 3 Pro with BTT SKR-2 + RRF

          undefined 1 Reply Last reply 29 Oct 2021, 20:00 Reply Quote 0
          • undefined
            GeneRisi @fcwilt
            last edited by GeneRisi 29 Oct 2021, 19:58

            @fcwilt I have a use case with a tool changer. The z probe is not physically associated with any tool. All tools are offsets from the tool-less z probe home position. When a tool is picked up, mesh compensation is turned on. When the tool is put back, mesh compensation is turned of. This way, the z home position doesn't change when no tool is mounted. Give this scenario, it is possible, with G29 S1, to use an height map that is not current. I want to create a height map that is current and only use it if it is current. Current means that the machine hasn't been reset or z rehomed. So, G29 S1 can be issued ( by mistake or a bug) when I don't want to use the stored (on SDCARD) height map file.

            With my new found understanding, I will use "T" as a substitute for "S" for the S0, S1 and S2 use cases. In the mesh.g macro, I can check if the height map is current and if it is, create the correct G29 "S" gcode.

            Is this clear?

            1 Reply Last reply Reply Quote 0
            • undefined
              GeneRisi @Gixxerfast
              last edited by 29 Oct 2021, 20:00

              @gixxerfast Yes, if you add parameters that are not defined AND don't use "S", then those parameters are passed to mesh.g A use case is in my response to @fcwilt .

              undefined 1 Reply Last reply 29 Oct 2021, 20:04 Reply Quote 0
              • undefined
                Gixxerfast @GeneRisi
                last edited by Gixxerfast 29 Oct 2021, 20:04

                @generisi Yes, thanks, I understand now what you want to do.
                Here, I think, we have to wait for a response from the officials. I don't know if you're allowed to add your own paraneters to existing gcodes in this case and what is suppose to happen if you do.

                Still, as you explain it, it behaves as I expect it to do reading the documentation: With S parameter --> no call of mesh.g, Without --> call of mesh.g

                Cheers

                Voron V2.4 (#1317) with Duet 3 Mini5+ Wifi and 1LC v1.1 Toolboard
                Voron V0.1 (#637) with Duet 3 Mini 5+ Wifi and 1LC v1.2 Toolboard
                Ender 3 Pro with BTT SKR-2 + RRF

                1 Reply Last reply Reply Quote 0
                • undefined
                  T3P3Tony administrators @GeneRisi
                  last edited by 30 Oct 2021, 10:39

                  @generisi

                  This line from the documentation;

                  If G29 is commanded with no S parameter, then file sys/mesh.g is run if it exists, and in RRF 3.3 and later any parameters present are passed to mesh.g.

                  Reads to me like:
                  If
                  G29 is sent with no S parameters

                  and
                  mesh.g exists

                  then
                  run mesh.g
                  __and
                  ___if running RRF 3.3
                  _____pass any other parameters to mesh.g

                  else
                  run G29 S0

                  So the only way to pass your own parameters with G29 is to not have any S parameters in the command as you have found out. replacing the S parameter with another one and then creating custom logic to do what you want in mesh.g sounds like the way forward for your usecase.

                  www.duet3d.com

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    JoergS5 @GeneRisi
                    last edited by 30 Oct 2021, 11:36

                    @generisi IMHO, I would avoid any FST parameters ( S is an exeception here, as it is an official parameter of G29), because they have high order and T is interpreted as new tool command in a multi-command-line.
                    In https://forum.duet3d.com/topic/25562/params-not-working-consistently-rrf3-3-0/10 David said "there are no standard G commands that have a T parameter. So RRF treats T after a G command as a new T command."

                    undefined 1 Reply Last reply 30 Oct 2021, 16:52 Reply Quote 1
                    • undefined
                      GeneRisi @JoergS5
                      last edited by 30 Oct 2021, 16:52

                      @joergs5 Thank you; that is good to know. Maybe Q ?

                      undefined 1 Reply Last reply 30 Oct 2021, 16:58 Reply Quote 0
                      • undefined
                        JoergS5 @GeneRisi
                        last edited by 30 Oct 2021, 16:58

                        @generisi Nist doesn't mention Q, this seems to be a good letter.

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