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

Extrude Until Limit Switch Hit with Fake U Axis Doesn't Work

Scheduled Pinned Locked Moved Solved
Tuning and tweaking
5
8
841
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
    frank26080115
    last edited by frank26080115 14 Mar 2019, 06:19

    I am following directions from https://forum.duet3d.com/post/74169 where @dc42 said:

    To achieve the effect of extrude until endstop switch triggered, you could create an additional axis (say U) using M584, and assign the extruder motor to both the extruder and U. Then a G1 S1 Uxxx command will drive the motor until the U endstop is triggered. Afterwards, use the M584 P parameter to hide the U axis.

    The first lines in the config.g file I used "M584 U3 P3", directly after the setting up the printer's name. And everywhere else, whenever I configured something (microstepping, jerk, accel, maxspeed, steps/mm, current) for E axis, I also repeated the same line for the U axis.

    Well, we are not even going to get to the limit switch part... because I can't even get the E axis to move at all, or the U axis. Relative mode for both U and E, T0 selected, cold extrude allowed, limit axis off (both distance and homing disabled), etc etc. No movement, but the motor's got current going through it since I can't turn it by hand.

    How come this doesn't work?

    I just spent 2 hours installing this $20 switch, bi-colour LED with safety cover, colours controlled by fan 1 and 2 overridden as GPIOs. Another 5 feet of wire used and 3 more crimped connectors made. All for this one function where I can tell the extruder to stop spinning when the filament change has been completed...

    alt text

    My version:

    M115

    FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 2.02(RTOS) ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2018-12-24b1

    undefined 1 Reply Last reply 14 Mar 2019, 11:19 Reply Quote 0
    • undefined
      gavatron3000
      last edited by 14 Mar 2019, 10:42

      Depending on your setup of course but I configured a seperate axis with its own endstop to achieve this

      1 Reply Last reply Reply Quote 0
      • undefined
        deckingman @frank26080115
        last edited by 14 Mar 2019, 11:19

        @frank26080115 Difficult to tell without seeing the whole of your config.g file but my best guess would be this line quote

        "M584 U3 P3"

        which you say you've you've put at the beginning of config.g. That will will hide the additional U axis before you try to move it. The instructions say to use the P parameter afterwards.

        Suggest you take out the P3 or change it to P4. A better way would be to use a macro that firstly chages P3 to P4, then carries out the extrusion move, then reverts P4 to P3.

        Ian
        https://somei3deas.wordpress.com/
        https://www.youtube.com/@deckingman

        undefined 1 Reply Last reply 14 Mar 2019, 22:33 Reply Quote 0
        • undefined
          frank26080115 @deckingman
          last edited by frank26080115 14 Mar 2019, 22:33

          @deckingman said in Extrude Until Limit Switch Hit with Fake U Axis Doesn't Work:

          That will will hide the additional U axis before you try to move it.

          Wait, when the word "hide" is used, I assumed it meant "this axis exists, but won't show up in the GUI"

          Did I misinterpret the spec?

          From your whole comment, what I am interpreting is: hidden axis technically exist, can be configured, but not moved

          Is that right?

          Thanks

          EDIT: "M584 X0 Y1 Z2 E3 U3 P4" works, my whole plan seems to work (the response to the switch works to stop the spinning), I got some bugs to work out, I can take it from here

          EDIT: Ok so the annoying thing is that the button need to be very quickly reconfigured between active high and active low to get a "wait for release" behaviour, which is very much required if you plan on having multiple button presses in one sequence of events

          undefined 1 Reply Last reply 15 Mar 2019, 08:36 Reply Quote 0
          • undefined
            deckingman @frank26080115
            last edited by 15 Mar 2019, 08:36

            @frank26080115 As you have discovered, hiding an axis does a bit more than visibly hiding it. Think of it as a safety feature, which in your case you may want to disable but I would strongly advise against it, as I'll set out below.

            The normal usage case for additional axes are when you have multiple motors driving multiple gantries or lead screws. These would move in sync when printing, but for homing or bed levelling, they need to be able to move independently. However, once homing is completed, then accidentaly moving one of the additional axes would then throw the gantries or lead screws out of sync which would realy screw things up. Hence the need to hide those axes at all times other than when homing or testing.

            Now from what I can make out, in your case the additional axis is used only for the extruder and therefore won't cause any synchronisation issues. So you might be able to simple use P4 and not use P3 at all. But you'll have to decide if that is a safe thing to do in your usage case. What would happen if you were in the middle of a print and accidentally commanded some movement of the U axis?

            I don't really understand your second edit comment because I still don't have much to go on. Can you elaborate? Posting your config.g might help and also any macros that you are using.

            At a guess, using a G4 command might help https://duet3d.dozuki.com/Wiki/Gcode#Section_G4_Dwell

            But it's hard to say without knowing what exactly it is that are trying to do and what exactly the problem is.

            Ian
            https://somei3deas.wordpress.com/
            https://www.youtube.com/@deckingman

            1 Reply Last reply Reply Quote 0
            • undefined
              frank26080115
              last edited by 15 Mar 2019, 18:02

              Thanks

              There's no more problems. The second edit was to say that the solution for detecting a button release is simply to change "active high" to "active low" in the limit switch configuration.

              Dwell might help with debouncing the button if I encounter that problem

              It all works great.

              My printer now displays a prompt that says "please push the filament up against the extruder gear and press the button" while the extruder is spinning slowly. The user presses the button, and the extruder gear will accelerate and push exactly the distance between the gear and the nozzle. After that, another prompt says "please wait until the new filament exists the nozzle, and press the button". You wait until the colour changes from the old colour to the new colour, and then press the button. Voila, filament change is complete. (M292 is also used to dismiss the dialogs)

              The above is almost exactly how the Ultimaker 2 works.

              For extraction, basically it just spins backwards until you press a button, this will be great if you are trying to yank out a jam, where a fixed retraction distance might not be enough travel, so you just want the gear to just keep spinning while you yank on the filament physically.

              (there is no release latch on the extruder in my design, it's never needed one so far, the the 40:1 gear ratio and good teeth on the gears essentially meant almost zero jams in years)

              undefined undefined 2 Replies Last reply 16 Mar 2019, 11:34 Reply Quote 0
              • undefined
                dc42 administrators @frank26080115
                last edited by 16 Mar 2019, 11:34

                Thanks, I'll mark this as solved then (feel free to mark it unsolved again if you disagree).

                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
                  zerspaner_gerd @frank26080115
                  last edited by 17 Mar 2019, 14:30

                  @frank26080115 said in Extrude Until Limit Switch Hit with Fake U Axis Doesn't Work:

                  The above is almost exactly how the Ultimaker 2 works.

                  Great idea

                  I also have a Ultimaker 2 with Duet and have tried to load and unload the UM2 firmware to build, without success!

                  Just a problem I have two feeders, how can I implement that?
                  I am currently fail in
                  Does somebody has any idea?

                  Board: Duet WiFi 1.03 | Firmware Version: 3.1.1 | WiFi Server Version: 1.23 | Web Interface Version: 3.1.1

                  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