1 endstop for 2 axis
-
Hello,
New to Duet and Reprap firmware, so hoping for some guidance please!
Currently running my CNC on a GRBL board that does dual axis homing, but the dual axis homing uses one Y endstop and a second endstop connected in series to the Z endstop which is a bit different to what I've seen people using so far.
The idea is that on a CNC your Z axis will move out the way first and then the X and Y axis will move meaning the Z endstop is available for use when homing X and Y axis.
My question is this: Can I use this current setup in the reprap firmware to achieve the same thing? Like this I think:
M584 X0 Y1:3 Z2 U3 P3 ; Map drives
M574 X1 S1 P"!xstop" ; Configure endstops using Makerbot endstops with NC config
M574 Y1 S1 P"!ystop+!zstop"
M574 Z2 S1 P"!zstop"In the prep phase of moving over from GRBL to Reprap with a Duet2, so not able to test this physically yet.
Thanks for any help and suggestions!
-
@armandleo you can't define the same pin twice
you could define them within the homing files.
so in homey have something likeM574 Z2 S1 P"nil" M574 Y1 S1 P"!ystop+!zstop"
and in homez
M574 Y1 S1 P"nil" M574 Z2 S1 P"!zstop"
then just call the individual homing files in homeall
-
@jay_s_uk thanks for the quick response!
That makes good sense! I'll write that in and let you know how it goes when everything is up and running!
-
@jay_s_uk does the following make sense for the homey file:
G91 ; relative positioning M574 Z2 S1 P"nil" ; un-assign zstop from z axis M574 Y1 S1 P"!ystop+!zstop" ; assign ystop and z stop to Y and U G1 H1 Y-533 U-533 F1800 ; move quickly to Y axis endstop and stop there (first pass) G1 H2 Y5 U5 F6000 ; go back a few mm G90 ; absolute positioning G92 Y0 ; reset the Y coordinate
Thanks again!
-
@armandleo assuming you're using M584 to map both drivers to Y e.g.
M584 Y2:4
(and you're on RRF 3+), then you shouldn't be homing the U axis.
Can you post your config.g? -
@jay_s_uk is that because the axis don't need to be split like in 2.x?
Sure thing:
; Configuration file for Duet WiFi (firmware version 3.3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.3.10 on Fri Jun 10 2022 23:32:09 GMT+0100 (BST) ; General preferences M453 ; CNC Mode G21 ; Work in millimetres G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Armand CNC" ; set printer name ; Network M551 ; set password M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Define axis X on drive 0, axis Y on drives 1 and 3, axis Z on drive 2 and dummy axis U on drive 3 ; Show only axis X, Y and Z ; Drives M569 P0 S1 ; physical drive 0 goes forwards M569 P1 S1 ; physical drive 1 goes forwards M569 P2 S1 ; physical drive 2 goes forwards M569 P3 S1 ; physical drive 3 goes forwards M584 X0 Y1:3 Z2 U3 P3 ; set drive mapping DUAL Y ; Define axis X on drive 0, axis Y on drives 1 and 3, axis Z on drive 2 and dummy axis U on drive 9 ; Show only axis X, Y and Z M350 X16 Y16 Z16 U16 I1 ; configure microstepping with interpolation M92 X400.00 Y400.00 Z400.00 U400.00 ; set steps per mm M566 X300.00 Y300.00 Z12.00 U300.00 ; set maximum instantaneous speed changes (mm/min) M203 X15000.00 Y15000.00 Z2700.00 E15000.00 ; set maximum speeds (mm/min) M201 X800.00 Y800.00 Z20.00 E800.00 ; set accelerations (mm/s^2) M906 X1900 Y1900 Z1900 E1900 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 U0 S1 ; set axis minima M208 X610 Y528 Z120 U528 S0 ; set axis maxima ; Endstops M574 X1 S1 P"!xstop" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin xstop M574 Y1 S1 P"!ystop" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin ystop M574 Z2 S1 P"!zstop" ; configure switch-type (e.g. microswitch) endstop for high end on Z via pin zstop M581 X Y Z S1 T0 C0 ; Enable endstop triggers while machining ; Z-Probe M558 P0 H5 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed M557 X15:600 Y15:500 S20 ; define mesh grid ; Heaters M140 H-1 ; Disable heated bed ; Fans M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 S1 H-1 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 S1 H-1 ; set fan 1 value. Thermostatic control is turned off ; Tools M950 R0 C"fan2" Q100 ; set PWM on fan2 M563 P0 S"Spindle" R0 ; define tool 0 M453 P0 R24000 Q100 ; define max spindle speed G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C ; Miscellaneous M501 ; load saved parameters from non-volatile memory ; Change to workplace coordinates set 1 G54 M950 J1 C"e1stop" ; Emergency stop M581 P1 T0 S0 R0 ; M582 T0 S1 ; Check if estop active M564 S1 H1 ; Force homing
Thanks!
-
@armandleo yes, the axis don't need to be split unless you need to make adjustments to square up your gantry.
if you're happy its square etc and just want to use the endstops, remove any reference to the U axis.
If you want to keep splitting them, then you need to remap the axis during the homing of Y based on the instructions for RRF 2 https://docs.duet3d.com/en/User_manual/Connecting_hardware/Z_probe_auto_levelling
you'll also need to map the corresponding endstop to U rather than mapping both of them to Y -
@jay_s_uk okay thanks.
So I'll remove U from drive mapping, step setting and all of that kind of stuff.
I hope I'm understanding this correctly, but could you just confirm the logic please.
During the homey, without splitting the axis but defining the endstops as you've suggested in the first instance, the y axis should self square, right?
Y1 and Y2 move towards the endstops and Y1 only stops when it triggers ystop (the endstop assigned to it) and Y2 only stops when it triggers zstop. When both have stopped (whether they've travelled the same distance or not, just both triggering their respective endstops) they will then both move a defined amount back off the triggers and then set that as Y0. Now provided the endstops are in the "square position" the axis should now be squared?
Hope that makes sense!
-
@armandleo yes that makes sense and your description is correct
-
@jay_s_uk great thanks!
Appreciate all your efforts!
-
I'm not sure what board you're using, but this is what I've set up for a similar function on my RatRig 1075 with a Duet MB6HC board:
; Endstops M574 X2 S1 P"io8.in" ; configure switch-type (e.g. microswitch) endstop for high end on X via pin io8.in M574 Y2 S1 P"io6.in+io5.in" ; configure switch-type (e.g. microswitch) and dual self-squaring high ends on Y1 via pin io6.in and on Y2 via pin io5.in M574 Z2 S1 P"io2.in" ; configure switch-type (e.g. microswitch) endstop for high end on Z via pin io2.in
...and my homing file looks like this (I haven't yet changed this to call the individual homing files for each axis):
; homeall.g G91 ; relative positioning G1 H1 Z100 F2400 ; move quickly to the Z axis endstop G1 H2 Z-3 F240 ; go back 3mm G1 H1 X550 Y787 F2400 ; move quickly to X and Y axis endstops (first pass) G1 H2 X-3 Y-3 F240 ; go back 3mm G90
Is this what you're looking for?