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

Inverting Z Stop Switch

Scheduled Pinned Locked Moved Solved
Firmware developers
3
4
997
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
    BlueCurtain
    last edited by BlueCurtain 20 Dec 2018, 05:21

    Hey everyone. I'm working with the Duet Maestro board and had to replace the Z switch on my printer. My new switch is inverted from the stock one and I need to swap that in the firmware...but I'm not really sure how to go about that. I've done it in Marlin on another printer but am stuck here.

    From what I can see it is something to do with this section, but I don't know what I would need to change, or if I even have the right line. If anyone could point me in the right direction that would be amazing!

    // Endstops
    // RepRapFirmware only has a single endstop per axis.
    // Gcode defines if it is a max ("high end") or min ("low end") endstop and sets if it is active HIGH or LOW.
    constexpr Pin END_STOP_PINS[NumEndstops] = { 24, 32, 46, 25, 43 };

    1 Reply Last reply Reply Quote 0
    • undefined
      Phaedrux Moderator
      last edited by 20 Dec 2018, 05:36

      Where exactly are you getting that from? The source code? That's unnecessary, you can change the function of the endstops with normal gcode commands in the config.g.

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

      https://duet3d.dozuki.com/Wiki/GCode#Section_M574_Set_endstop_configuration

      Z-Bot CoreXY Build | Thingiverse Profile

      1 Reply Last reply Reply Quote 2
      • undefined
        Danal
        last edited by Danal 20 Dec 2018, 16:49

        What @Phaedrux said.

        Coming from other firmwares wherein you change the source and recompile/upload... Duet-RepRap doesn't work that way. EVERYTHING is configurable in real time. Just issue the appropriate command, and/or change your config.g and reboot. It is extremely rare, if ever, that an "end user" would re-build (compile) the source.

        In fact, just to cement the concept: There is nothing special about config.g except that it gets "run" at boot time. You can issue any of those commands at any time. (Of course, there is a tiny bit of sequencing. For example, you really can't set the limit of heater before you define that heater. All common sense.)

        In your specific case, you might need to change:

        M574 X1 Y1 Z1 S1  
        

        to

        M574 X1 Y1 S1
        M574 Z1 S0

        Or vice versa... see: https://duet3d.dozuki.com/Wiki/Gcode#Section_M574_Set_endstop_configuration

        Delta / Kossel printer fanatic

        1 Reply Last reply Reply Quote 0
        • undefined
          BlueCurtain
          last edited by 20 Dec 2018, 20:53

          Thank you!

          I was looking through the config.g file but wasn't sure what I might need in there. I was hoping there was a GCode command I could use, that makes life much easier 🙂

          Thanks again, have an awesome holidays!

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