G1 Issues
-
Thanks for that. That has fixed the final part of the Homeall routine.
But still don't know why nothing moves until I give the M564 SO HO command.
You've got this line in your homeALL.g file...
G1 Z5 F1200 ; Lower bed 5mm
At that point if Z has not been homed you should get a un-homed axis error.
Try this instead...
G1 H2 Z5 F1200
You also have this...
G1 X5 Y5 ; move away from home
;;;;;;;;; X or Y is homed at this point, now home the other axis
If only X or Y is homed then that G1 command should cause a un-homed axis error.
Frederick
-
@fcwilt thanks for the input. I'll give that a try.
Still looking to resolve the no move without M564 tho
-
-
Yep pretty much instantly
-
Tune your sensitivity?
-
@fcwilt thanks for the input. I'll give that a try.
Still looking to resolve the no move without M564 tho
Well in the code I commented about you were twice attempting to move un-homed axes.
The M564 allows you to do this but you really should not have to use M564.
Did you try the changes I mentioned?
Frederick
-
@Phaedrux "Tune your sensitivity" Sorry but you have just exceeded my level of expertise.
-
@fcwilt Apologies Frederick but I was tied up with a bunch of other stuff yesterday.
I added H2 to the G1 command (what does H2 actually do as it doesn't feature in the RepRap decode?).
With H2 added the Home All command now starts the sequence but when the closest of x or y is reached the procedure stops at the end of this line in Homeall:
G1 H1 X-325 Y-325 F3600 ; move right/back 325mm, stopping at the endstopMore confusing, If Y is closest to home then the procedure stops as above with Y homed but the Dashboard shows X is homed but Y isn't.
-
@fcwilt Apologies Frederick but I was tied up with a bunch of other stuff yesterday.
I added H2 to the G1 command (what does H2 actually do as it doesn't feature in the RepRap decode?).
With H2 added the Home All command now starts the sequence but when the closest of x or y is reached the procedure stops at the end of this line in Homeall:
G1 H1 X-325 Y-325 F3600 ; move right/back 325mm, stopping at the endstopMore confusing, If Y is closest to home then the procedure stops as above with Y homed but the Dashboard shows X is homed but Y isn't.
Something is wrong.
I don't normally home X and Y at the same time but to be sure I understood the behavior I modified by homeALL.g file to do so
This is what I did (the numbers are for my printer)...
G91 ; relative moves G1 H1 X210 Y-210 F1200; 1st pass - this moved until BOTH endstops were triggered G1 X-20 Y+20 ; back off a bit G1 H1 X30 Y-30 F300 ; 2nd pass - this also moved until BOTH endstops were triggered
If your are endstops are configured correctly and are working that is all you should need to do to home X AND Y.
I did not show any code to move Z - just wanted to focus on X and Y.
HOWEVER you are using stalling to home - I don't know if that works the same.
I liken homing with stalling to stopping your car by running into the car in front of you - I prefer using the brakes.
Frederic
-
M915 X Y S2 R0 F0 ; set X and Y to sensitivity 2, do nothing when stall, unfiltered
You've got a command to configure stallguard, but you'll need to tune the sensitivity and motor current to get reliable movement and stalls.
https://duet3d.dozuki.com/Wiki/Stall_detection_and_sensorless_homing
-
@fcwilt and @Phaedrux apologies for not responding sooner but I have been away for several days.
I have tried all of your suggestions but seem no closer to solving this. In fact I have been experimenting like crazy will all of the homing files to see if I could even get one of them to work.The weirdest thing is that I am currently getting perfect homing on X Y and Z with this Home All file below but using M564.
Even though I have the same M915, and M574 in Config.G, If I comment them out in this file nothing happens.
Even more weirdly, Z is homing in the center of the bed even though it is commented out in this version of Home All. I can only presume that the Home Z file is run after this one.
It also seems that a G91 line after the probe has been triggered stops any further movement command from being executed. I have put the Home Z file below the Home G
Homeall.g
M400 ; make sure everything has stopped before we make changesM564 S0 H0
M915 X Y S2 R0 F0 ; set X and Y to sensitivity 2, do nothing when stall, unfiltered
M574 X1 Y1 S3 ; set endstops to use motor stall
G91 ; use relative positioning
G1 Z5 F1200 ; Lower bed 5mmG1 H1 X-325 F3600 ; Move X to Home
G1 X5 ; move away from home Left end stopG1 H1 Y-325 F3600 ; move Y to home
G1 Y5 ; move away from home
G90;homez.g
; called to home the Z axis
;
; generated by RepRapFirmware Configuration Tool v3.2.2 on Fri Jan 22 2021 13:39:52 GMT+1300 (New Zealand Daylight Time)M400 ; make sure everything has stopped before we make changes
M402 ; Retract BL TouchG91 ; use relative positioning
G1 Z5 F1200 ; Lower bed 5mm to enure clear of Z Probe
G90 ; absolute positioning
G1 X150 Y150 F4000 ; move head to bed center
G30 ; Lower head, stop when probe triggered and set Z to trigger height
G91 ; relative positioningG1 X0 Y0 F4000 ; Return head to home position
M400 ; make sure everything has stopped before we reset the motor currents
G90 ; back to absolute position
-
Even though I have the same M915, and M574 in Config.G, If I comment them out in this file nothing happens.
That simply makes no sense at all. If the appear in config.g and they have to be duplicated somewhere else then something else you are doing is canceling them out.
Even more weirdly, Z is homing in the center of the bed even though it is commented out in this version of Home All. I can only presume that the Home Z file is run after this one.
homeall.g all will not call homeZ.g unless you are doing something in homeall.g that makes that happen - it does not happen on it's own.
About homing in general:
There are movement commands specifically designed to be used to home the axes in your machine. You need to learn to use them and not just use M564 to allow everything to happen.
You can use relative G1 H1 commands to move an un-homed axis towards it's endstop and stop when the endstop is triggered. The endstop can be of any type including "stalling".
You can use relative G1 H2 commands to move an un-homed axis as needed to home another axis - such as making sure Z is clear of the bed before homing X or Y.
Your homeall.g file:
M400 ; make sure everything has stopped before we make changes M564 S0 H0 M915 X Y S2 R0 F0 ; set X and Y to sensitivity 2, do nothing when stall, unfiltered M574 X1 Y1 S3 ; set endstops to use motor stall G91 ; use relative positioning G1 Z5 F1200 ; Lower bed 5mm G1 H1 X-325 F3600 ; Move X to Home G1 X5 ; move away from home Left end stop G1 H1 Y-325 F3600 ; move Y to home G1 Y5 ; move away from home G90
OK let us discuss your homeall.g file line by line:
line 1 is fine
line 2 should not be needed if the rest of the file is correct
line 3 should be fine if you have the command parameters correct
line 4 should be fine if you have the command parameters correct
line 5 is fine
line 6 is will not work without the M564 above. Use G1 H2 as mentioned.
line 7 is fine
line 8 is fine but I don't know why you have it
line 9 is fine
line 10 is fine but I don't know why you have it
line 11 is fineNow nowhere in that file did you home Z and it's supposed to be homed in your homeall.g file. Why did you not home Z?
Your homez.g file:
M400 ; make sure everything has stopped before we make changes M402 ; Retract BL Touch G91 ; use relative positioning G1 Z5 F1200 ; lower bed 5mm to enure clear of Z Probe G90 ; absolute positioning G1 X150 Y150 F4000 ; move head to bed center G30 ; Lower head, stop when probe triggered and set Z to trigger height G91 ; relative positioning G1 X0 Y0 F4000 ; Return head to home position M400 ; make sure everything has stopped before we reset the motor currents G90 ; back to absolute position
OK let us discuss your homez.g file line by line:
line 1 makes no sense you since don't actually change anything that might need it
line 2 is not needed as BLTouch probes are deployed/retracted automatically as needed
line 3 is fine
line 4 will not work as Z may not be homed at this point. Use G1 H2 as mentioned.
line 5 is fine
line 6 may not work as X or Y may not be homed at this point use G1 H2 as mentioned.
line 7 should work - the probe should move toward the bed and stop when activated
line 8 is fine
line 9 may not work as X or Y may not be homed at this point use G1 H2 as mentioned.
line 10 makes no sense you since don't actually change anything that might need it
line 11 is fine
If you find yourself wanting to use M564 that should be a warning to you that you are very likely doing something wrong.
When in doubt - ask us.
Frederick
-
@fcwilt . Than you Frederick I have finally got an explanation of what H2 does in the G90 command. I have been searching for this for ages and your explanations of H1 and H2 above finally made sense of everything. I was also having some fun getting my head around where and when if should be using G90 vs G91.
I have now rebuilt my Home all file and everything now works exactly as it should. No need for M594 any more.
The working Home all looks like this:
M400 ; make sure everything has stopped before we make changes
M915 X Y S2 R0 F0 ; set X and Y to sensitivity 2, do nothing when stall, unfiltered
M574 X1 Y1 S3 ; set end stops to use motor stall
G91 ; use relative positioning
G1 H2 Z5 F1200 ; Lower bed 5mmG1 H1 X-325 F3600 ; Move X to Home
G1 H1 Y-325 F3600 ; move Y to homeG90 ; Use Absolute positioning
G1 X150 Y150 F4000 ; Move head to center of bed
G30 ; Lower Head, Stop when probe triggered and set Z to trigger heightG1 X0 Y0 F4000 ; Return Head to Home
-
Glad to hear you finally got it sorted.
You know of course that you are supposed to have separate .g files to home X, Y and Z.
- homeX.g
- homeY.g
- homeZ.g
You want to see my homeALL.g file?
M98 P"homeZ.g" M98 P"homeX.g" M98 P"homeY.g"
Yes it doesn't "optimize" homing as some folks do, such as homing X and Y at the same time but it does keep it simpler for my aging mind - the code to home a given axis exists in only one file.
Frederick
-
@fcwilt Hi Frederick. Yes I did cut the relevant parts into X Y and Z homing files. Your input has also significantly reduced the number of lines in each. Thanks again for all your help.
Cheers
Peter -
@fcwilt Hi Frederick. Yes I did cut the relevant parts into X Y and Z homing files. Your input has also significantly reduced the number of lines in each. Thanks again for all your help.
Cheers
PeterAlways glad to help when I can - and if I cannot help I will try to not make things worse.
Frederick