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".
-
@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 switchHOMEY
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 -
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" -
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 forwardsM584 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.
-
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 -
@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.
-
@3DPrintingWorld, please post your complete config.g file and homing files mso that I can replicate your configuration on my bench test system.
-
@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.
-
PS - if you want to square up the Y axis, I think you will need to use a procedure something like this:
- Course home X, U and Y, allowing Y homing to complete when either switch triggers.
- 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.
- Back off Y from the endstops a small amount.
- Fine home one Y motor and endstop by itself, by issuing M574 Y and M584 Y commands that use just one motor and endstop.
- Repeat step 4 for the other motor.
- Restore Y to using both motors and endstops.
- Back off Y away from the endstops.
- 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.
-
@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.