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

Why Can Z Height Be Set in Multiple Locations?

Scheduled Pinned Locked Moved
General Discussion
5
6
260
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
    gbartsch
    last edited by 16 Aug 2020, 17:44

    I'm new to RepRap firmware so am confused about how it handles z height.

    In config.g is this line which sets the machine z maximum:

    M208 X203.5 Y200 Z215 S0		; set axis maxima
    

    And in homall.g is this line:

    G92 Z215 ; set Z position to axis maximum (you may want to adjust this)

    And in homez.g is the same line:

    G92 Z215 ; set Z position to axis maximum (you may want to adjust this)

    I have some questions.

    1. Why must/can z be specified in three places?
    2. Must z be the same in each gcode file?
    3. What will happen if the z were different in one or more files?

    It would seem better to me to set z in only place. Why not set it in one place like Marlin?

    Custom cartesian dinosaur machine; it's a tank but just works so I just keep tweaking it. / Duet Ethernet 1.02 or later / RepRapFirmware for Duet 2 WiFi/Ethernet: 3.4.5 / SuperSlicer

    1 Reply Last reply Reply Quote 0
    • undefined
      jens55
      last edited by 16 Aug 2020, 17:55

      1
      M208 sets the machine maximum, G92 sets the current position ... two different animals.
      Any new gcode overrides any previous gcodes so you can change anything on the fly (unlike Marlin)

      2
      No, they do not have to be the same if you have a good reason for them to be different. Note that if you change an setting, it will override the previous setting once it executes.
      As an example, if you set G92 z215 in your config.g file and hen you have a macro that includes the line G92 Z0 then the z position has been redefined throughout. If you never execute the macro then z would not be redefined.
      If you do redefine z in a macro, you want to be certain that you reverse that change before you exit the macro unless you specifically want to reassign the z position globally.

      3
      see 2

      The whole idea of RRF is that values can be assigned on the fly unlike Marlin. It is a fundamentally different (and better) approach

      1 Reply Last reply Reply Quote 0
      • undefined
        Joel
        last edited by 16 Aug 2020, 17:59

        In config.g you are setting the maximum limits for your printer.

        In homeall.g the position is being set for all axis, you probably see similar things for X and Y.

        In homez.g you are only doing the z axis. you will see a similar thing in homex.g and homey.g

        The reason it looks this way is homeall.g did not call homex, homey, homez. It contains the commands from each of those.

        To get an overview of what each command does, look here,

        https://duet3d.dozuki.com/Wiki/Gcode

        undefined 1 Reply Last reply 16 Aug 2020, 20:54 Reply Quote 0
        • undefined
          dc42 administrators @Joel
          last edited by 16 Aug 2020, 20:54

          I assume you are using a Z min endstop switch, not a Z probe. If the minimum allowed Z is the same as the point where the endstop triggers, then you can specify that position in the M208 command only and leave out the G92 commands.

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          1 Reply Last reply Reply Quote 0
          • undefined
            fcwilt
            last edited by 16 Aug 2020, 21:15

            Hi,

            When homing an axis using an end stop sensor, a G1 command is used with the H1 parameter, as you likely know.

            The result is when the end stop sensor is activated the current position for the axis is set to the axis min/max (as set in M208) depending on the end stop sensor being at the min/max end of the axis.

            For the set position to be correct the end stop sensor must trigger exactly at the min/max position - which often is not the case.

            Thus the use of G92 to set the actual position.


            Now I personally don't like having code spread around requiring me to keep multiple files in sync.

            So my homeall.g file is simply this:

            M98 P"homeZ.g"
            M98 P"homeY.g"
            M98 P"homeX.g"

            Each of the axis homing files contains the code needed to home the axis AND to insure the actual "post-home" position is set correctly.

            Some folks home Z using a Z probe which is a different issue.

            I home Z using an end stop sensor and use a Z probe for setting the Z=0 datum and creating the mesh compensation height map.

            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

            1 Reply Last reply Reply Quote 0
            • undefined
              gbartsch
              last edited by 18 Aug 2020, 18:33

              Thank you everyone for the comments. I'll need to digest everything and get it into my head. Take care.

              Custom cartesian dinosaur machine; it's a tank but just works so I just keep tweaking it. / Duet Ethernet 1.02 or later / RepRapFirmware for Duet 2 WiFi/Ethernet: 3.4.5 / SuperSlicer

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