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

    configuring motor direction and endstops

    Scheduled Pinned Locked Moved
    Gcode meta commands
    2
    5
    258
    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.
    • 57buickundefined
      57buick
      last edited by

      Im building a ratrig with duet3 6hc.

      1. first question ive tried swapping motor directions and such but when i hit negative direction on Y it goes back instead of forward, X drives correctly negative to left, if I try changing the S1 or S0 on drives 3 and 4 I cant get them both moving towards front and left like normal on my other printeres?

      2. is the endstops(which might have something to do with it. The X endstop is setup to trigger minimum when it moves to left, the Y endstop is going to be mounted at rear of printer so that would be maximum at rear not minimum.

      my config files is below what am I getting wrong or not understanding?

      ; Drives
      M569 P0.0 S0 ; physical drive 0.0 goes backwards
      M569 P0.1 S0 ; physical drive 0.1 goes backwards
      M569 P0.2 S0 ; physical drive 0.2 goes backwards
      M569 P3 S1 ; physical drive 0.3 goes forwards
      M569 P4 S1 ; physical drive 0.4 goes backwards
      M584 X3 Y4 Z0:1:2 E5 ; set drive mapping
      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 X24000.00 Y24000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min)
      M201 X10000.00 Y10000.00 Z20.00 E250.00 ; set accelerations (mm/s^2)
      M906 X900 Y900 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 X500 Y500 Z500 S0 ; set axis maxima

      ; Endstops
      M574 X1 S1 P"121.io1.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin 121.io1.in
      M574 Y1 S1 P"io0.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin io0.in

      ; Z-Probe
      M558 P1 C"121.io0.in" H5 F120 T6000 ; set Z probe type to unmodulated and the dive height + speeds
      G31 P500 X-20 Y-10 Z2.5 ; set Z probe trigger value, offset and trigger height
      M557 X15:400 Y15:400 S20 ; define mesh grid

      ; Heaters
      M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0
      M950 H0 C"out1" T0 ; create bed heater output on out1 and map it to sensor 0
      M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit
      M140 H0 ; map heated bed to heater 0
      M143 H0 S150 ; set temperature limit for heater 0 to 150C
      M308 S1 P"121.temp0" Y"pt1000" ; configure sensor 1 as PT1000 on pin 121.temp0
      M950 H1 C"121.out0" T1 ; create nozzle heater output on 121.out0 and map it to sensor 1
      M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
      M143 H1 S280 ; set temperature limit for heater 1 to 280C

      ; Fans
      M950 F0 C"121.out2" Q500 ; create fan 0 on pin 121.out2 and set its frequency
      M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
      M950 F1 C"121.out1" Q500 ; create fan 1 on pin 121.out1 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
      T0 ; select first tool

      Phaedruxundefined 1 Reply Last reply Reply Quote 0
      • 57buickundefined
        57buick
        last edited by

        I guess maybe that just means my home point would be back left of machine? is that gonna cause any issues when it comes to slicing or anything like that? Ive just always had my previous printers home at the front left

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

          @57buick said in configuring motor direction and endstops:

          M574 Y1 S1 P"io0.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin io0.in

          If the endstop is at the rear and the maxima, the endstop must be configured as M574 Y2 S1 P"io0.in"

          0,0 will stay as the front left.

          Also see the motor direction testing here: https://docs.duet3d.com/en/User_manual/Machine_configuration/Configuration_coreXY

          Z-Bot CoreXY Build | Thingiverse Profile

          1 Reply Last reply Reply Quote 0
          • 57buickundefined
            57buick
            last edited by

            @phaedrux said in configuring motor direction and endstops:

            @57buick said in configuring motor direction and endstops:

            M574 Y1 S1 P"io0.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin io0.in

            If the endstop is at the rear and the maxima, the endstop must be configured as M574 Y2 S1 P"io0.in"

            0,0 will stay as the front left.

            Also see the motor direction testing here: https://docs.duet3d.com/en/User_manual/Machine_configuration/Configuration_coreXY

            ok got it, so now I hit Y home to test it and it triggered the switch and the LED turned on switch but motor did not stop. Also instructions say to go to the machine specific page to see the state of the switches but I cant find the switches anywhere in the duet web control that I can see?
            I also tried adding the ! infront of pin to invert it but that doesnt work.
            Does it have anything to do with my X switch not being hooked up yet?

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

              You can use M119 to test the state of the endstops.

              https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_endstops

              Z-Bot CoreXY Build | Thingiverse Profile

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