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

    calculate the positions of switch, low and high

    Scheduled Pinned Locked Moved
    General Discussion
    5
    32
    1.4k
    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.
    • Danalundefined
      Danal
      last edited by

      Prior to moving a machine that's had endstop configuration changes, verify switches by pressing with your finger and looking at the "Machine Specific" tab of the Web interface. You can see their triggered status go "Yes" or "No" in real time.

      The lights help you know the switch is wired, and changing. The lights to NOT tell you if the firmware considers the switch triggered or not. The web interface does that.

      Delta / Kossel printer fanatic

      chris4undefined 1 Reply Last reply Reply Quote 0
      • chris4undefined
        chris4 @Danal
        last edited by

        @Danal
        Thanks.
        Have a little hard to understanding how is it with Endstop Location at low end high end. How can explain this to an old man.
        If we take X axis in my case, I have home 0 for printer on left seen from the front.
        X step motor to go right must rotate counterclockwise (backward).
        The switch is to the left of the X axis, and connected to the NC.
        How about the endstop which should i choose, low end or high end.
        has drawn a sketch of it.
        Xaxel.png

        ; Drives
        M569 P0 S0                              ; physical drive 0 goes backwards
        M569 P1 S0                              ; physical drive 1 goes backwards
        M569 P2 S1                              ; physical drive 2 goes forwards
        M569 P3 S0                              ; physical drive 3 goes backwards
        M584 X0 Y1 Z2 E3                        ; set drive mapping
        M350 X16 Y16 Z16 E16 I1                 ; configure microstepping with interpolation
        M92 X160.00 Y160.00 Z1600.00 E873.08    ; set steps per mm
        M566 X900.00 Y900.00 Z12.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 X230 Y210 Z200 S0                  ; set axis maxima
        
        ; Endstops
        M574 X1 Y1 Z1 S1                        ; set active high endstops
        
        
        1 Reply Last reply Reply Quote 0
        • Danalundefined
          Danal
          last edited by

          If moving the axis to bigger (positive) numbers makes it go toward the switch, the switch is at the high end.

          If moving the axis to smaller (negative) numbers makes it go toward the switch, the switch is at the low end.

          To keep from crashing things, do a very small move. This is easiest to do in relative mode, for example (you can enter these one at a time on the console):

          M564 H0   
          G91            
          G1 F1000 X-10
          

          The M564 allows movement without homing. The G91 is relative mode, and the G1 will move X 10 mm. Since it is negative, if X moves toward the homing switch, that switch is at the low end.

          Delta / Kossel printer fanatic

          1 Reply Last reply Reply Quote 0
          • chris4undefined
            chris4
            last edited by

            @Danal said in calculate the positions of switch, low and high:

            f moving the axis to bigger (positive) numbers makes it go toward the switch, the switch is at the high end.
            If moving the axis to smaller (negative) numbers makes it go toward the switch, the switch is at the low end.

            Where is located on an X axis low end and high end.
            On the left or right of the shaft (0 home is on the left together with the switch and the stepper motor is going from left to right on the Xaxel to move the extruder carriage)
            One question, stepmotor motion is against the switch or vice versa when setting stepmotor motion to in drivers.
            very complicated for me. Must learn more about this.

            1 Reply Last reply Reply Quote 0
            • Danalundefined
              Danal
              last edited by Danal

              You've asked about everything EXCEPT the numeric value that moves X. And that value is THE determinant. Yes, it seems complex if you bring in left, right, counterclockwise. But... none of that matters. Push it out of your mind. Make it simple.

              Does M564 H0 G91 G1 F1000 X-10 move the carriage TOWARD the switch? If so, that is the low end. Period. Nothing else enters into it. You can enter all three commands on one line exactly as shown. Please do that and report whether it moves toward the switch.

              P.S. The "negative moves toward = low" is exactly what @deckingman said in the third post in this thread.

              Delta / Kossel printer fanatic

              1 Reply Last reply Reply Quote 0
              • chris4undefined
                chris4
                last edited by

                @Danal said in calculate the positions of switch, low and high:

                negative moves toward = low"

                Thanks so much for the explanation.
                G code M564 H0 G91 G1 F1000 X-10, nothing happens but if you do X positive, 10 moved to the right.
                With a little more experiment , maybe I understand how it works.
                but thanks for the help-

                Danalundefined 1 Reply Last reply Reply Quote 0
                • Danalundefined
                  Danal @chris4
                  last edited by Danal

                  @chris4 said in calculate the positions of switch, low and high:

                  10 moved to the right.

                  Was that toward or away from the switch?

                  Delta / Kossel printer fanatic

                  chris4undefined 1 Reply Last reply Reply Quote 0
                  • A Former User?
                    A Former User
                    last edited by

                    @chris4 said in calculate the positions of switch, low and high:

                    G code M564 H0 G91 G1 F1000 X-10, nothing happens but if you do X positive, 10 moved to the right.

                    The first part of -10 nothting happens is expected ; unless you set x > 0 or allow it to move outside the axis minima it will not move below 0.

                    The second part is correct, +10 should move to the right in a Cartesian coordinate system. The last part of the puzzle is to determine if the switch is on the far left (M574 X1) or far right (M574 X2).

                    1 Reply Last reply Reply Quote 0
                    • chris4undefined
                      chris4
                      last edited by

                      @bearer said in calculate the positions of switch, low and high:

                      The first part of -10 nothting happens is expected ; unless you set x > 0 or allow it to move outside the axis minima it will not move below 0.
                      The second part is correct, +10 should move to the right in a Cartesian coordinate system. The last part of the puzzle is to determine if the switch is on the far left (M574 X1) or far right (M574 X2).

                      The switch is on the far left (M574 X1)
                      and now works properly with home all.
                      step motor goes towards the switch on the left press and x step motor stops. I continue with the calibration now, it will be a challenge for a senior, who is a bit sluggish.
                      PS motion on stepmotor forward and backward is determined by low end and high end, or anything else, or not at all. My clever puzzle that I have to solve

                      A Former User? Danalundefined 2 Replies Last reply Reply Quote 0
                      • chris4undefined
                        chris4 @Danal
                        last edited by

                        @Danal said in calculate the positions of switch, low and high:

                        Was that toward or away from the switch?

                        10 mowed to the right
                        -10 to the left
                        Thanks.

                        Danalundefined 1 Reply Last reply Reply Quote 0
                        • A Former User?
                          A Former User @chris4
                          last edited by A Former User

                          @chris4 said in calculate the positions of switch, low and high:

                          PS motion on stepmotor forward and backward is determined by low end and high end, or anything else, or not at all. My clever puzzle that I have to solve

                          is that a question for y?

                          if you have a printer like in the pictures where the bed moves, the confusing part may be that you're not interested in the movement of the bed, but rather the position of the nozzle on the bed. so a positive Y movement should move the bed towards the front, but the nozzles relative position would be towards the back of the bed.

                          so the y switch at the back of the printer would trigger when the nozzle is at the front of the bed, meaning low end.

                          (i.e. its the nozzle and coordinate system that determine motor direction, and then you set the end stop location after the motor direction is having the desired effect on the nozzle position)

                          1 Reply Last reply Reply Quote 0
                          • chris4undefined
                            chris4
                            last edited by

                            That explains some of what I couldn't. Thanks

                            1 Reply Last reply Reply Quote 0
                            • Danalundefined
                              Danal @chris4
                              last edited by

                              @chris4 said in calculate the positions of switch, low and high:

                              The switch is on the far left (M574 X1)
                              and now works properly with home all.

                              @chris4 said in calculate the positions of switch, low and high:

                              -10 to the left

                              Fantastic! Combining these two answers, the negative move moved TOWARD the switch. That means the switch is on the LOW END.

                              That means your M574 for this switch should specify X1 S1

                              Yay! Progress!

                              Delta / Kossel printer fanatic

                              1 Reply Last reply Reply Quote 1
                              • Danalundefined
                                Danal @chris4
                                last edited by Danal

                                @chris4 said in calculate the positions of switch, low and high:

                                PS motion on stepmotor forward and backward is determined by low end and high end, or anything else, or not at all. My clever puzzle that I have to solve

                                You don't really care how the motor turns. You care how the carriage moves. As we determined in the prior post, -10 moves TOWARD the switch, so the switch is LOW END.

                                And... another answer to a question I think you were asking: If you ever need a carriage to move opposite how it is moving, say when commissioning a new printer, the command is:

                                M569: Set motor driver direction,
                                Pnnn Motor driver number
                                Snnn Direction of movement of the motor(s) attached to this driver: 0 = backwards, 1 = forwards (default 1)

                                Delta / Kossel printer fanatic

                                1 Reply Last reply Reply Quote 0
                                • chris4undefined
                                  chris4
                                  last edited by

                                  Thanks so much.

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