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

    Duex5 drive and endstop mapping

    Scheduled Pinned Locked Moved Solved
    Duet Hardware and wiring
    2
    19
    569
    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.
    • Phaedruxundefined
      Phaedrux Moderator
      last edited by Phaedrux

      How bout this one? M98 P"config.g" That might give us some syntax errors from your config.g.

      3.3RC3

      Firmware 3.3 final is available now, so good idea to update.

      Upload this zip file to the system tab in DWC.

      https://github.com/Duet3D/RepRapFirmware/releases/download/3.3/Duet2and3Firmware-3.3.zip

      Y: no endstop

      Can you repost your current config.g after any changes you've made? Looks like the Y endstop config isn't correct.

      Z-Bot CoreXY Build | Thingiverse Profile

      reshundefined 2 Replies Last reply Reply Quote 0
      • reshundefined
        resh @Phaedrux
        last edited by

        @phaedrux How do I get the M98 P"config.g" information?

        Phaedruxundefined 1 Reply Last reply Reply Quote 0
        • reshundefined
          resh @Phaedrux
          last edited by

          @phaedrux Ok I've got it homing now after the update but I've got a new problem. When I press HomeY on the panel due the gantry moves away from endstops. I thought I could just switch the S0 in the mapping of P5,P6 but it's not switching. Do I have to wire it backwards? The steppers don't seem to be fighting each other.

          reshundefined 1 Reply Last reply Reply Quote 0
          • reshundefined
            resh @resh
            last edited by

            The Y steppers are facing away from each other. I switched P5 S0 to be opposite P6 S1 and they fight when I press homeY.

            ; Configuration file for Duet WiFi (firmware version 3)
            ; executed by the firmware on start-up
            ;
            ; generated by RepRapFirmware Configuration Tool v3.2.3 on Fri Feb 26 2021 10:46:02 GMT-0500 (Eastern Standard Time)
            
            ; General preferences
            G90                                            ; send absolute coordinates...
            M83                                            ; ...but relative extruder moves
            M550 P"My Printer"                             ; set printer name
            
            ; Network
            M552 S1                                        ; enable network
            M586 P0 S1                                     ; enable HTTP
            M586 P1 S0                                     ; disable FTP
            M586 P2 S0                                     ; disable Telnet
            
            ; Drives
            M569 P0 S1                                     ; physical drive 0 goes forwards s1 is forward s0 backwards
            M569 P5 S0
            M569 P6 S1                                     ; physical drive 1 goes forwards
            M569 P2 S1                                     ; physical drive 2 goes forwards
            M569 P3 S1
            M569 P4 S1 
            ; physical drive 3 goes forwards
            M584 X0 Y5:6 Z2:4						   ; set drive mapping
            M671 X-20:290 Y0:0 S5 							;leadscrews at left (connected to Z) and right (connected to E1) of X axis
            M208 X10:300 Y0:180								;X carriage moves from -5 to 270, Y bed goes from 0 to 130
            M350 X16 Y16 Z16 E16 I1                        ; configure microstepping with interpolation
            M92 X80.00 Y80.00 Z400.00 E420.00              ; set steps per mm
            M566 X900.00 Y900.00 Z60.00 E120.00            ; set maximum instantaneous speed changes (mm/min)
            M203 X6000.00 Y6000.00 Z180.00 E1200.00        ; set maximum speeds (mm/min)
            M201 X500.00 Y500.00 Z20.00 E250.00            ; set accelerations (mm/s^2)
            M906 X800 Y800 Z800 E800 I30                   ; set motor currents (mA) and motor idle factor in per cent
            M84 S30                                        ; Set idle timeout
            
            ; Axis Limits
            M208 X0 Y0 Z0 S1                               ; set axis minima
            M208 X310 Y310 Z180 S0                         ; set axis maxima
            
            ; Endstops
            M574 X2 S1 P"!xstop"                           ; configure active-high endstop for high end on X via pin !xstop
            M574 Y1 S1 P"!ystop+!e0stop"                           ; configure active-high endstop for high end on Y via pin !ystop
            M574 Z2 S2                                     ; configure Z-probe endstop for high end on Z
            
            ; Z-Probe                        ; create servo pin 0 for BLTouch
            M558 P9 C"^zprobe.in" H5 F120 T6000  ; set Z probe type to bltouch and the dive height + speeds
            M950 S0 C"duex.pwm1" 
            G31 P500 X27 Y0 Z1.28                            ; set Z probe trigger value, offset and trigger height
            M557 X15:215 Y15:195 S20                       ; define mesh grid
            
            ; Heaters
            M308 S0 P"bedtemp" Y"thermistor" T100000 B3950 ; configure sensor 0 as thermistor on pin bedtemp
            M950 H0 C"bedheat" T0                          ; create bed heater output on bedheat and map it to sensor 0
            M307 H0 R0.135 C738.7 D1.34 S1.00 V23.5     ; enable bang-bang mode for the bed heater and set PWM limit
            M140 H0                                        ; map heated bed to heater 0
            M143 H0 S120                                   ; set temperature limit for heater 0 to 120C
            M308 S1 P"e0temp" Y"thermistor" T100000 B4725 C7.060000e-8  ; configure sensor 1 as thermistor on pin e0temp
            M950 H1 C"e0heat" T1                           ; create nozzle heater output on e0heat and map it to sensor 1
            M307 H1 B0 R2.039 C177.8 D6.23 S1.00 V24.0     ; disable bang-bang mode for heater  and set PWM limit
            M143 H1 S285                                   ; set temperature limit for heater 1 to 280C
            
            ; Fans
            M950 F0 C"fan0" Q500                           ; create fan 0 on pin fan0 and set its frequency
            M106 P0 S0 H-1                                 ; set fan 0 value. Thermostatic control is turned off
            M950 F1 C"fan1" Q500                           ; create fan 1 on pin fan1 and set its frequency
            M106 P1 S1 H1 T45                              ; set fan 1 value. Thermostatic control is turned on
            
            ; Tools
            M563 P0 D0 H1 F0                               ; define tool 0
            G10 P0 X0 Y0 Z0                                ; set tool 0 axis offsets
            G10 P0 R0 S0                                   ; set initial tool 0 active and standby temperatures to 0C
            
            ; Custom settings are not defined
            
            ; Miscellaneous
            M575 P1 S1 B57600 ;enable support for PanelDue
            T0						; Select first tool 
            
            ; homeall.g
            ; called to home all axes
            ;
            ; generated by RepRapFirmware Configuration Tool v3.2.3 on Fri Feb 26 2021 10:46:02 GMT-0500 (Eastern Standard Time)
            G91                   ; relative positioning
            G1 H2 Z5 F6000        ; lift Z relative to current position
            G1 H1 X315 Y315 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
            G1 H2 X-5 Y-5 F6000   ; go back a few mm
            G1 H1 X315 Y315 F360  ; move slowly to X and Y axis endstops once more (second pass)
            G90                   ; absolute positioning
            G1 X155 Y155 F6000      ; go to first bed probe point and home Z
            G30                   ; home Z by probing the bed
            
            ; Uncomment the following lines to lift Z after probing
            ;G91                  ; relative positioning
            ;G1 Z5 F100           ; lift Z relative to current position
            ;G90                  ; absolute positioning
            
            
            
            ; homey.g
            ; called to home the Y axis
            ;
            ; generated by RepRapFirmware Configuration Tool v3.2.3 on Fri Feb 26 2021 10:46:02 GMT-0500 (Eastern Standard Time)
            G91              ; relative positioning
            G1 H2 Z5 F6000   ; lift Z relative to current position
            G1 H1 Y315 F1800 ; move quickly to Y axis endstop and stop there (first pass)
            G1 H2 Y-5 F6000  ; go back a few mm
            G1 H1 Y315 F360  ; move slowly to Y axis endstop once more (second pass)
            G1 H2 Z-5 F6000  ; lower Z again
            G90              ; absolute positioning
            
            
            reshundefined 1 Reply Last reply Reply Quote 0
            • reshundefined
              resh @resh
              last edited by resh

              Update:

              When I send M564 S0 H0

              X moves correctly
              Y moves correctly
              Z moves correctly (a negative number should move bed downwards?)

              I can home X and Y individually via paneldue with no problems. I can home X individually and move it afterwords via paneldue. Homeing Y individually works but after it's homed I can't move it individually.

              When I press home all or try and home Z individually all hell breaks loose. It sounds like all the steppers are fighting each other but individually they seem correct. I'm making headway, thanks for all the help.

              EDIT: When I home Z the Y axis goes all the way to the back, hits the endstops and tries to continue moving backwards (crashing). It seems like it doesn't recognize endstops when Z is homed.

              Phaedruxundefined 1 Reply Last reply Reply Quote 0
              • Phaedruxundefined
                Phaedrux Moderator @resh
                last edited by

                @resh said in Duex5 drive and endstop mapping:

                @phaedrux How do I get the M98 P"config.g" information?

                You send M98 P"config.g" as a command in the gcode console and it will execute your config.g as a macro. Any syntax errors will get reported to the console.

                Z-Bot CoreXY Build | Thingiverse Profile

                1 Reply Last reply Reply Quote 0
                • Phaedruxundefined
                  Phaedrux Moderator @resh
                  last edited by

                  @resh said in Duex5 drive and endstop mapping:

                  Z moves correctly (a negative number should move bed downwards?)

                  Negative Z should bring the nozzle and bed closer together. Positive moves them farther apart.

                  Let's take a step back for a second and get some things sorted out.

                  First you need to set your mind to the correct coordinate system and everything else will flow from there.

                  When looking at the printer from the front:
                  -X moves to the left, +X moves to the right
                  -Y moves to the front, +Y moves to the back

                  That's just the way it is.

                  The endstop location defined in M574 will follow this. If the endstop is at the low end of travel or high end of travel. If it's at the low end it will be X1 or Y1, if it's at the high end of travel, it's X2 or Y2.

                  That's just the way it is.

                  The homing direction is set in the homing macros. If the endstop is at the low end of travel, the homing move needs to be negative. If it's at the high end, the homing move needs to be positive.

                  That's just the way it is.

                  Now with all those things set in stone, the motor direction of rotation will need to be changed to allow the rest to be true. So if a -X move actually makes it move to the right, then you need to change the direction of rotation on X. Same for Y and Z axis.

                  Once that rotation direction is correct everything should fall into place provided the other details of endstop position and homing move direction are correct from the start.

                  Z-Bot CoreXY Build | Thingiverse Profile

                  1 Reply Last reply Reply Quote 0
                  • Phaedruxundefined
                    Phaedrux Moderator
                    last edited by

                    M574 X2 S1 P"!xstop"                           ; configure active-high endstop for high end on X via pin !xstop
                    M574 Y1 S1 P"!ystop+!e0stop"                           ; configure active-high endstop for high end on Y via pin !ystop
                    M574 Z2 S2                                     ; configure Z-probe endstop for high end on Z
                    

                    So your endstop definition says that X is at the high end of travel, so the homing move should be positive.

                    It says Y is at the low end so the Y homing direction should be negative, but your homeall has a positive Y move.

                    It says your Z axis is at the high end of travel, so when the bed and nozzle are farthest away.

                    So where are the endstops actually located? That's the first question.

                    Z-Bot CoreXY Build | Thingiverse Profile

                    1 Reply Last reply Reply Quote 0
                    • reshundefined
                      resh
                      last edited by

                      @phaedrux Thank you for all the thought out responses. My Y endstop is at the high end. I changed to M574 Y2 S1 and everything is working properly now. I also changed the Z direction. Thanks again

                      1 Reply Last reply Reply Quote 0
                      • Phaedruxundefined
                        Phaedrux Moderator
                        last edited by

                        Glad you got it sorted out.

                        Z-Bot CoreXY Build | Thingiverse Profile

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