Dual Y-axis endstop homing



  • I still have not found a solution to home my y-axis powered by two different steppers to two different endstops.

    FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 3.1.1 ELECTRONICS: Duet WiFi 1.02 or later + DueX5 FIRMWARE_DATE: 2020-05-19b2

    Currently this is what I have in my config. The y-axis stops if either the Ystop or the Zstop is triggered, the endstops are not paired to each stepper. Does someone see the issue.

    M584 X0 U2 Y1:9 Z5:6:7 E3:4 ; set drive mapping

    M574 X2 S1 P"xstop"
    M574 U1 S1 P"e0stop"
    M574 Y2 S1 P"ystop+zstop"

    On a side note, I had this exact configuration when RRF3 just came out and the switches acted totally different then they do now with the latest firmware....



  • I think (I dont use firmware 3.x, so maybe wrong), you have to split Y for homing and after homing you can join them together again. Like this for homing:
    M584 Y1 V9
    M574 Y2 S1 P"ystop"
    M574 V2 S1 P"Zstop"
    After homing you join them again with config you have in your post.



  • Yep, that is for RRF2. With 3 you are supposed to be able to home them without spiting them up. Its why I switched to 3 when it just came out but I have gotten it to work yet.



  • @aidar From what I read this does not need to be done in RRF3 but I tired anyways to see what happends. Axis's finally separated but the "V" drive does not stop with the "zstop". They both motors stop with the "ystop".


  • Moderator

    @3DPrintingWorld said in Dual Y-axis endstop homing:

    Axis's finally separated but the "V" drive does not stop with the "zstop". They both motors stop with the "ystop".

    Did you define the Zstop as the endstop for the V axis in an M574?



  • Here is what I tried, but according to to the wiki for RRF3 both endstops can be called on on the same line like this "M574 Y2 S1 P"ystop+zstop". Then it matches with the drives you call out for the Y axis " Y1:9".

    CONFIG
    ; Endstops
    M574 X2 S1 P"xstop" ;X axis active high endstop switch
    M574 U1 S1 P"e0stop" ;U axis active high endstop switch
    M574 Y2 S1 P"Ystop" ;Y axis active high endstop switch
    M574 V2 S1 P"zstop" ;V axis active high endstop switch

    HOMEY
    G91 ; relative positioning
    G1 H2 Z5 F6000 ; lift Z relative to current position
    M584 Y1 V9 ; Split Y axis motors
    G1 H1 Y500 V500 F1800 ; move quickly to Y axis endstop and stop there (first pass)
    G1 Y-5 V-5 F6000 ; go back a few mm
    G1 H1 Y25 V25 F360 ; move slowly to Y axis endstop once more (second pass)
    G1 H2 Z-5 F6000 ; lower Z again
    G90 ; absolute positioning
    M584 Y1:9 ; Combine Y-Axis


  • Moderator

    Does your endstop order match the motor order as described here?

    https://duet3d.dozuki.com/Wiki/Gcode#Section_M574_RepRapFirmware_Num_3

    To use two Z motors using independent homing switches, declare two Z motors in M584, then declare two pins for Z endstops in a single M574 command. Example
    M584 X0 Y1 Z2:3 E4
    M574 Z1 S1 P"io2.in+io3.in" ; Z axis with two motors, individual min endstops, active high
    The order of endstop switch pin names in M574 must match the order of Z motor driver numbers in M584. When homing Z, RRF_3 homes the motors of the axis at the same time, independently to their defined endstops.



  • In the case below, I think they are. X, U, Y(1), Y(2).

    Do they need to be mapped in a certain order? Should "U" come after "E"?

    Do I have to call out a M574 E0, if there is no endstops for the z axis or extruders?

    M584 X0 U2 Y1:9 Z5:6:7 E3:4 ; set drive mapping

    M574 X2 S1 P"xstop"
    M574 U1 S1 P"e0stop"
    M574 Y2 S1 P"ystop+zstop"



  • It all looks in order now but same result. The y axis is split with one motor on the duex and one on the wifi. Does that matter?

    ; Drives
    M569 P0 S1 ; X physical drive 0 goes backwards
    M569 P1 S1 ; Y right physical drive 1 goes forwards
    M569 P2 S0 ; U physical drive 2 goes backwards
    M569 P3 S1 ; E1 physical drive 3 goes forwards
    M569 P4 S1 ; E2 physical drive 4 goes forwards
    M569 P5 S0 ; Z left physical drive 5 goes backwards
    M569 P6 S0 ; Z center physical drive 6 goes backwards
    M569 P7 S1 ; Z right physical drive 7 goes forwards
    M569 P9 S0 ; Y left physical drive 8 goes backwards
    M584 X0 Y1:9 U2 Z5:6:7 E3:4 ; set drive mapping

    ; Endstops
    M574 X2 S1 P"xstop" ;X axis active high endstop switch
    M574 Y2 S1 P"ystop+zstop" ; Y Double max active high endstop switch
    M574 U1 S1 P"e0stop"


  • administrators

    Your configuration looks Ok to me so I don't know why it isn't working. I'll re-test that feature tomorrow.



  • Let me know what you find out. I rearranged it so the both y axis steppers were on the same card but no good. It also cleans up the order a little too.

    ; Drives
    M569 P0 S1 ; X physical drive 0 goes backwards
    M569 P1 S1 ; Y right physical drive 1 goes forwards
    M569 P2 S0 ; Y left physical drive 8 goes backwards
    M569 P3 S0 ; U physical drive 2 goes backwards
    M569 P4 S1 ; E1 physical drive 3 goes forwards
    M569 P5 S0 ; Z left physical drive 5 goes backwards
    M569 P6 S0 ; Z center physical drive 6 goes backwards
    M569 P7 S1 ; Z right physical drive 7 goes forwards
    M569 P8 S1 ; E2 physical drive 4 goes forwards

    M584 X0 Y1:2 U3 Z5:6:7 E4:8 ; set drive mapping

    ; Endstops
    M574 X2 S1 P"xstop" ;X axis active high endstop switch
    M574 Y2 S1 P"ystop+zstop" ; Y Double max active high endstop switch
    M574 U1 S1 P"e0stop" ;U axis active high endstop switch



  • Under "mach spec's, endstops" it shows 1 thru 4. 0 is X, 1 is Y, 2 is N/A, and 3 is U. There are two endstops on Y. If I press either endstop it changes to triggered and both motors stop. Shouldn't it show another endstop for the second Y? The second Y endstop is connected to pin 2 which says N/A.


  • Moderator

    Does the LED change at the board when you press the endstop.



  • Yep, all four led's change status on the board when the switch is triggered.

    0 X-axis
    1 Y-axis right & Y-axis left
    2 n/a
    3 U-axis

    endstop.jpg



  • @dc42 said in Dual Y-axis endstop homing:

    Your configuration looks Ok to me so I don't know why it isn't working. I'll re-test that feature tomorrow.

    DC, this is a IDEX printer that uses the dual Mark kinematics. Would this have something to do with the issue? Logically, I could not think of a reason why it would matter but I thought I would bring it up just in case.


  • administrators

    @3DPrintingWorld, please post your complete config.g file and homing files mso that I can replicate your configuration on my bench test system.


  • administrators

    @3DPrintingWorld said in Dual Y-axis endstop homing:

    @dc42 said in Dual Y-axis endstop homing:

    Your configuration looks Ok to me so I don't know why it isn't working. I'll re-test that feature tomorrow.

    DC, this is a IDEX printer that uses the dual Mark kinematics. Would this have something to do with the issue? Logically, I could not think of a reason why it would matter but I thought I would bring it up just in case.

    Yes, that probably explains it. On a CoreXY printer, if either the X or the Y endstop switch triggers, all motors must be stopped. Your printer isn't CoreXY, but it has a matrix for which some motors affect more than one axis. If I remember correctly, on MarkForged kinematics, movement of the Y motor causes X (and U) movement too. So when one Y endstop switch triggers, if the other Y motor were to continue moving, it's not clear whether the X and U motors should continue to move if the firmware moves just the other one. That's why the firmware stops all motors when an endstop switch is triggered.


  • administrators

    PS - if you want to square up the Y axis, I think you will need to use a procedure something like this:

    1. Course home X, U and Y, allowing Y homing to complete when either switch triggers.
    2. Back off X and U away from the edges, so that a small amount of subsequent movement of them won't hit a hard stop.
    3. Back off Y from the endstops a small amount.
    4. Fine home one Y motor and endstop by itself, by issuing M574 Y and M584 Y commands that use just one motor and endstop.
    5. Repeat step 4 for the other motor.
    6. Restore Y to using both motors and endstops.
    7. Back off Y away from the endstops.
    8. Fine home X and U.


  • Ok, thank for looking into it for me, that makes sense. Do you plan on incorporating the functionality of the dual markforged kinematics into this feature in the future.


  • administrators

    @3DPrintingWorld said in Dual Y-axis endstop homing:

    Ok, thank for looking into it for me, that makes sense. Do you plan on incorporating the functionality of the dual markforged kinematics into this feature in the future.

    Unlikely, for three reasons:

    • It's undefined whether the X and/or U motors should also be moved when moving just one of the Y motors.
    • The code that decides whether to stop all motors or just one in this instance is the same code that decides whether to stop all motors or just one when you are homing several axes simultaneously. If you were to home e.g. X, U and Y all at the same time, it would still be necessary to stop all motors when any endstop switch is triggered.
    • The workaround I suggested in my previous post should suffice for this unusual machine configuration.


  • @dc42 Sorry but I will have to disagree with you on your points.

    I don't think it's undefined what you should do if only one endstop is triggered. If the y axis is stopped on one side of the gantry, then the corresponding X or U carriage on the opposite end can not move as result of the belt arrangement. The belt can is only pivoting at this point.

    As a result if Y(1) is triggered then Y(1) motor and the U axis motor should stop. If Y(2) is triggered then Y(2) and the X axis motor should stop. I will send a video when I get a second so you can better understand, it may not be clear to you if you don't have this arrangement.

    In regards to your second point I will have to put more thought into this but why are you homing all the axis's at the same time? Would you not home X and U at the same time, then home Y ?


  • administrators

    @3DPrintingWorld said in Dual Y-axis endstop homing:

    I don't think it's undefined what you should do if only one endstop is triggered. If the y axis is stopped on one side of the gantry, then the corresponding X or U carriage on the opposite end can not move as result of the belt arrangement. The belt can is only pivoting at this point.

    The X and U axes could be anywhere (and in unknown positions, because they haven't been homed yet) when you home Y.

    In regards to your second point I will have to put more thought into this but why are you homing all the axis's at the same time? Would you not home X and U at the same time, then home Y ?

    It's common to home multiple axes concurrently to save time. See https://duet3d.dozuki.com/Wiki/ConfiguringRepRapFirmwareCoreXYPrinter#Section_homeall_g_file for how this is done on a CoreXY machine, which is also relevant to your configuration.



  • Currently I am homing X, U, and Y all at the same time like on the link your provided but after your last comment I realized that this is a mistake. The Y-axis must be homed before the X and U like in your previous instructions. Since the X and U carriage move in the X-axis with the position of the Y axis, the Y axis must be homed first to square it up before the X and U are homed.



  • It works perfectly, and is very slick looking while in action!

    Here is my homey.g if anyone else is doing something similar. You can also find the entire configuration on my github, if it helps anyone out. Just give me some time to get it updated.

    Up next, giving ends topless homing another try. But first, some multi-material prints as now my nozzles will now stay perfectly aligned.

    Thanks for the help but I'll be back....

    ; homey.g

    G91 ; relative positioning
    G1 H2 Z5 F6000 ; lift Z relative to current position
    G1 H1 X475 U-475 F1800 ;Rough home X and U axis
    G1 H1 X475 ; home X axis
    G1 H1 U-475 ; home U axis
    G1 X-15 U15 F6000 ; go back a few mm
    G1 H1 Y500 F1800 ; move quickly to Y axis endstop and stop there (first pass)
    G1 Y-5 F6000 ; go back a few mm
    M584 Y1 ; Y-axis right side
    M574 Y2 S1 P"ystop" ; Y-axis right side endstop Active
    G1 H1 Y15 F360 ; move slowly to Y axis endstop once more (second pass)
    M584 Y2 ; Y-axis Left side
    M574 Y2 S1 P"e1stop" ; Y-axis left side endstop Active
    G1 H1 Y15 F360 ; move slowly to Y axis endstop once more (second pass)
    M584 Y1:2 ; Combine Y-Axis
    M574 Y2 S1 P"ystop+e1stop" ; Y Double max active high endstop switch
    G1 Y-5 F6000 ; go back a few mm
    G1 H2 Z-5 F6000 ; lower Z again
    G90 ; absolute positioning


  • Moderator

    @3DPrintingWorld said in Dual Y-axis endstop homing:

    It works perfectly, and is very slick looking while in action!

    Well let's see it then!


Log in to reply