Double motor axis homing question
-
Hi, I'm configuring a duet 3 6hc with raspi4 as my cnc controller.
The cnc is cartesian with 1 X, 2 Y and 1 Z.
Everything seams good but I think I forgot something in my config or/and home y file.
Actually, I can home all together or individually.
My question is about homing procedure.
I've got switch with active high for each motor, when homing if a switch or his wire is broken, the machine think it's at endstop and then revese for doing second pass, wich is normal. But what about my double Y, the motor with switch broken stop and wait for the second switch to be eaten. How can I tell the duet to travel to the next switch within 20mm max, is there a way to do that?config.g
; Display initial welcome message ;M291 P"Please go to <a href=""https://www.duet3d.com/StartHere"" target=""_blank"">this</a> page for further instructions on how to set it up." R"Welcome to your new Duet 3!" S1 T0 ; Configuration file for Duet 3 MB 6HC (firmware version 3.3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.3.16 on Fri May 19 2023 16:27:45 GMT+0200 (Central European Summer Time) ; General preferences G90 ; send absolute coordinates... M550 P"cnc" ; set printer name ; Drives M569 P0.0 S1 ; physical drive 0.0 goes forwards M569 P0.1 S1 ; physical drive 0.1 goes forwards M569 P0.2 S1 ; physical drive 0.2 goes forwards M569 P0.3 S1 ; physical drive 0.3 goes forwards M584 X0.0 Y0.1:0.2 Z0.3 ; set drive mapping M350 X16 Y16 Z16 I1 ; configure microstepping with interpolation M92 X400.00 Y400.00 Z400.00 ; set steps per mm M566 X900.00 Y900.00 Z60.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z180.00 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z20.00 ; set accelerations (mm/s^2) M906 X800 Y800 Z800 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 X500 Y1000 Z100 S0 ; set axis maxima ; Endstops M574 X1 S1 P"io0.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin io0.in M574 Y1 S1 P"io1.in+io2.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin io1.in and pin io2.in M574 Z2 S1 P"io3.in" ; configure switch-type (e.g. microswitch) endstop for high end on Z via pin io3.in ; Z-Probe M558 P5 C"^!io4.in" F120:20 ; set Z probe type to switch and the dive height + speeds ;G31 P500 X0 Y0 Z0 ; set Z probe trigger value, offset and trigger height ;M557 X15:215 Y15:195 S20 ; define mesh grid ; Heaters ; Fans M950 F1 C"!out6" Q250 ; create fan 0 on pin out6 and set its frequency M106 P1 S0.8 H-1 c"IN fan" ; set fan 0 value. Thermostatic control is turned off M950 F2 C"!out5" Q250 ; create fan 1 on pin out5 and set its frequency M106 P2 S1 H-1 C"RASPI fan" ; set fan 1 value. Thermostatic control is turned off M950 F3 C"!out4" Q250 ; create fan 2 on pin out4 and set its frequency M106 P3 S0.8 H-1 C"OUT fan" ; set fan 2 value. Thermostatic control is turned off ; Tools M950 R0 C"out9" L0:24000 ; set spindle on out 9 with pwm 0 t 24000 M563 P0 S"Broche" R0 ; define tool 0 as broche from spindle 0 M453 ; CNC mode G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets ; Custom settings are not defined ; Miscellaneous T0 ; select first tool
homey.g
; homey.g ; called to home the Y axis ; ; generated by RepRapFirmware Configuration Tool v3.3.16 on Fri May 19 2023 16:27:45 GMT+0200 (Central European Summer Time) G91 ; relative positioning G1 H1 Y-1005 F900 ; move quickly to Y axis endstop and stop there (first pass) G1 H2 Y5 F100 ; go back a few mm G1 H1 Y-10 F100 ; move slowly to Y axis endstop once more (second pass) G90 ; absolute positioning G92 Y0 ; set Y position to axis minimum (you may want to adjust this)
Please, don't hesitate if my poor english is misunderstood
-
-
The endstop move will be as long as you tell it to be. Best to have a functional endstop setup in the first place.
-
OK. Maybe I should post a request on firmware github. In my opinion, it's a real issue with 2 motors axis.
-
@JuL You could probably do this with conditional Gcode, for example:
- check before homing if either endstop switch is triggered, but not both or neither
- if so try homing the axis but only 20mm.
- If that doesn't succeed, notify the operator.
- Otherwise, home normally.
Would that work?
Ian
- check before homing if either endstop switch is triggered, but not both or neither
-
I should give it à try. Thx
-
So I manage to check with conditionnal and it works. But, there is a major issue in firmware I discovered during my test. Its a critical safety bug in my opinion. Firmware check during homing move if sensor is hit, but doesn't care if not. If you don't hit sensor, the move continue to distance you specify, stop and do the second pass as well without controlling after complete distance. Ok, I can test it with conditionnal, but I really don't understand this kind of homing procedure inside a so good board.
-
@JuL Your homing move should be longer than your axis, that way it should always hit and endstop. If it doesn't hit, it just goes as far as you tell it. If it hasn't hit an endstop, I don't think the axis is marked as homed. How is this a critical safety bug?
Ian
-
@droftarts said in Double motor axis homing question:
I don't think the axis is marked as homed.
Here is the problem, it's homed. I'tried again with my Z axis (1 motor, short stroke), the same
-
@JuL I'm not sure that I understand what you say is happening. At the start of any homing move, the first thing that happens is that the axis is flagged as not homed. Then when the homing move proceeds, the axis will remain flagged as not homed until the end stop triggers. As soon as the end stop triggers, the axis will be marked as homed but if the homing switch never triggers, then the axis will never be flagged as homed. That's what normally happens so can you explain in detail what you observe is happening in your case. Is it possible that you have a wiring issue such that you get false triggers from the end stop switch?
-
I notice that you have G92 Y0 in your homey.g file, I think that this will set the axis as being homed (someone please confirm), which may be contributing to the problems you are seeing.
-
@gloomyandy said in Double motor axis homing question:
G92 Y0 in your homey.g file,
This will indeed force the position of the axis and mark it as homed.
-
@JuL said in Double motor axis homing question:
So I manage to check with conditionnal and it works. But, there is a major issue in firmware I discovered during my test. Its a critical safety bug in my opinion. Firmware check during homing move if sensor is hit, but doesn't care if not. If you don't hit sensor, the move continue to distance you specify, stop and do the second pass as well without controlling after complete distance. Ok, I can test it with conditionnal, but I really don't understand this kind of homing procedure inside a so good board.
To avoid this:
-
Always use normally closed endstop switches. That way, if an endstop switch becomes disconnected, it will appear to be triggered to RRF.
-
Never use a G92 command to set the homed position in the homing files, because that will flag the axis as homed even if the endstop switch has not been triggered. Set the M208 limits correctly instead.
-
If you want to handle the case of the endstop switch becoming disconnected, read the state of the switch near the start of the corresponding homing file(s). If you find the switch is already triggered, use a suitable G1 H2 move to back off a few mm from the switch. If that fails to change the homing switch state to not triggered, report an error using M591 and abort the homing file.
-
-
My bad, I didn't expect g92 set position AND flag as homed. Thx for pointing me my mistake
-