Auto squaring workbee Y-axis on Duet3D 2 v3.3.0
-
Hello. I installed a second Y home switch on my workbee. I use this firmware v3.3.0 ->
https://ooznest.co.uk/2021/11/15/workbee-control-v3-3-0-is-out-g-code-viewer-included/
config.g
; Configuration file for Duet ; executed by the firmware on start-up ; WorkBee Firmware Version 1.1 global systemSettingsVersion={1.2} ; Configuration files M98 P"config-network.g" M98 P"config-drives.g" M98 P"config-axes.g" M98 P"config-axes-limits.g" M98 P"config-axes-calibration.g" M98 P"config-axes-endstops.g" M98 P"config-probe.g" M98 P"config-spindle.g" M98 P"config-laser.g" ; Other Settings M453 ; Put the machine into CNC Modes G90 ; Set absolute coordinates M140 H-1 ; Disable heated bed M564 S1 H1 ; Disable jog commands when not homed M911 S21.0 R23 P"G91 G1 Z3 F1000" ; Configure power loss resume ; User Configuration files M98 P"config-user-settings.g" M501 ; Load Stored Parameters
config-axes.g
; Axes configuration executed by config.g M584 X0 Y1 Z2 U3 ; Apply drive mapping to axes M584 P3 M906 X2400 Y2400 Z2400 U2400 I100 ; Set motor currents (mA) M92 X400 Y400 Z400 U400 ; Set steps per mm M350 X16 Y16 Z16 U16 I1 ; Configure microstepping M203 X2500 Y2500 Z2500 U2500 ; Set maximum speeds (mm/min) M201 X150 Y150 Z150 U150 ; Set accelerations (mm/s^2) M566 X500 Y500 Z500 U500 ; Set maximum instantaneous speed changes (mm/min) M669 K0 X1:0:0:0 Y0:1:0:1 Z0:0:1:0
homey.g
; homey.g ; called to home the Y axis G91 ; relative positioning G21 ; Set units to mm G1 H1 Z{move.axes[2].max*2} F900 ; move quickly to Z axis endstop and stop there (first pass) G1 H1 Y{move.axes[1].max*2} F2400 ; move quickly to Y axis endstops and stop there (first pass) G92 Y{move.axes[1].max} Z{move.axes[2].max} ; Set Home Position G1 Y-3 Z-3 F2400 ; go back a few mm G1 H1 Y{move.axes[1].max*2} F300 ; move slowly to Y axis endstops once more (second pass) G1 H1 Z{move.axes[2].max*2} F300 ; move slowly to Z axis endstop once more (second pass) G92 Y{move.axes[1].max} Z{move.axes[2].max} ; Set Home Position G90 ; absolute positioning
What can I change to have auto squaring of the Y axis using 2 motors ?
Thank you.
I followed a guide from the wiki I know I need to start with :
M584 X0 Y1:3 Z2 U3
-
You can follow this guide to setup double axis motor homing.
If you are unable to adjust the endstop positions to make them even, and need to apply an offset to one of the motors, you would need to modify your homing routine. You could use the combined motor axis to home initially, and then split the axis and apply your offset to one of the motors with a G1 move and then recombine the axis again.
-
config-axes-endstops.g (STOCK)
; Endstop configuration executed by config.g M574 X2 P"xstop" S1 ; Set active low X endstop M574 Y2 P"ystop" S1 ; Set active low Y endstop M574 Z2 P"zstop" S1 ; Set active low Z endstop
I modified it to look like this :
; Endstop configuration executed by config.g M574 X2 P"xstop" S1 ; Set active low X endstop M574 Y2 P"ystop+e0stop" S1 ; Set active low Y endstop M574 Z2 P"zstop" S1 ; Set active low Z endstop
Ok now both limit switches trigger the Y end stop ! Thank you.
Can you help me with the homing gcode ? I don't know how to modify it.
I know how to split the axes :
M584 Y1 U3
M584 P4 -
@facardi You're using RRF 3.x firmware, so you don't need to split the axes. All you needed to do was add the extra endstop pin to the M574 command.
Or do you need to split the axes to correct for the endstop position? Generally it is easier to have an adjustable endstop on one side, to account for the endstop position. If you still want to adjust the axes, probably the easiest thing to do is to add a U axis adjustment after homing. Ideally move the Y axis (so both Y motors) away from the endstops, then send a relative movement command of the U axis to account for the skew in the X axis, eg:
G91 ; relative positioning G1 Y-3 F300 ; move axes away from endstops G1 U1.0 F300 ; adjust Y2/U axis position G90 ; absolute positioning
Adjust the U value as necessary. Add the line to homeall.g and homey.g. I don't think you need to split the axes to do this, because you don't need to home this axis.
Did you add U axis limits to 'config-axes-limits.g'?
Ian
-
@facardi
as a side note, using a end stop for each motor, i ran into an issue while homing. i had a faulty endstop one time (shorted) and because i use nema 32 steppers the one side drove so hard i bent my y axis. the guys here helped me by writing a script that checks for shorts before it homes. it triggers a error message and stops homing routine. it works great! i don’t know how to give a link but just look for “dual axis woes”