Homeall twice causes problems
On my core XYUV machine running Firmware 1.20RC1, WiFi Server 1.20b10 and Web Interface 1.19.3
I have a problem with a second homeall which produces the wrong actions.
The normal homeall will move the XY and UV carriages quickly until an endstop is triggered and follows the details from Deckingman's blog (Thanks Deckingman) at https://somei3deas.wordpress.com/2017/11/28/5-axis-homing-using-corexyuv
I run auto bed levelling (G32) with 3 Z motors this runs G28 first. What happens is the UV carriage moves slowly and the XY carriage stays still. This then beaks the short bowden tube connections between the hotend and the extruder.
I run G32 at the start of every print in order to make sure the Z motors are in sync and the bed remains level.
Any ideas what could be wrong?
;bed.g file for bed levelling using 3 motors.
G28 ; home
G30 P0 X20 Y10 Z-10000 F200
G30 P1 X150 Y170 Z-10000 F200
G30 P2 X280 Y10 Z-10000 F200 S3
G1 Z10 F200
G1 X10 Y10 F2000
; homeall file for use with Duet firmware on CoreXYUV printers
M584 X0 U3 Y1 V4 P5 ; temporarily map drives to U and V axes
M906 X400 U400 Y400 V400 Z300 ; reduce motor currents
G91 ; set to use relative coordinates
G1 Z5 F300 ; move bed down 5 mm
G1 Y280 V280 X-380 U-380 F4800 S1; move all 4 axes fairly quickly until one or other triggers a switch
G1 X-380 U-380 F4000 S1; now move just X and U fairly quickly left until one or other triggers a switch
G1 X-380 S1; course home X
G1 U-380 S1; course home U
G1 X6 U6 F600 ; Go back a few mm
G1 X-380 U-380 F360 S1; Move slowly to X and U axis end stops once more and stop when one triggers
G1 X-380 F360 S1 ; fine home X
G1 U-380 F360 S1 ; fine home U
M584 X0:3 Y1:4 ; put motor mapping back to normal so that X uses drives 0 and 3, Y uses 1 and 4
G1 Y280 V280 F3000 S1; now move Y and V fairly quickly left until one or other triggers a switch
G1 Y280 S1; course home Y
G1 V280 S1; course home V
G1 Y6 V6 F600; Go back a few mm
G1 Y280 V280 F360 S1; Move slowly to Y and V axis end stops once more and stop when one triggers
G1 Y280 F360 S1 ; fine home Y
G1 V280 F360 S1 ; fine home V
M906 X1000 U1000 Y1000 V1000 Z900 ; set motor currents back to defaults
G90 ; absolute mode
G1 X150 Y100 F3000 ; put head over the centre of the bed to probe
G30 ; home Z
G1 Z5 F300 ; move bed down 5mm
G90 ; back to absolute
M584 X0:3 Y1:4 Z7:8:9 U10 V11 E2:5:6 P3 ; Assign motors to axes and hide U and V
My best guess would be that it's because you are mapping the drives back to "standard" i.e. M584 X0:43 Y1:4 before homing Y and V. Because we use both motors to get linear motion on a CoreXY, that'll screw it up. Take out that M584 line, but keep the one at the beginning with the P5 and the one at the end with the P3 command.
Ian, Thank you for the reply.
That M584 line was in the wrong place due to cut and paste whilst trying to resolve this issue.
I have put it in the correct place so my file is the same as yours.
I tried again and the first instance of G28, everything worked as it should I then invoked G32 and just the UV motors worked.
What happens if you run G28 twice on your machine? Are you running the same firmware version?
Sorry, I didn't fully understand your issue on first reading.
Anyway, multiple G28s run concurrently work fine for me. I don't use G32 so can't test. I guess the first thing to do is to just run G28 followed by another G28 (without the G32 in the middle).
If that works, it must be something to do with G32 that's interfering somehow.
If it doesn't work, (i.e you can't run two G28s consecutively) then we need to see what's different between your config/homing and mine. The only thing that's jumping out at me is that I select and pre-heat a tool because I use the nozzle as a probe. I've no idea why that should matter but if you try it and it cures your problem then we need to ask David to look at it.
Oh, and I'm running the same firmware as you - 1.20RC1 and web interface 1.19.3 (mine's Ethernet so I don't have WiFi server)
I just spotted something else but it's got me confused. It your homeall.g, after homing X and Y, you then put the motor currents back up, the move X and Y to the centre of the bed (G1 X150 Y100 F3000). But this is before you've re-mapped the drives so that ought to move X and Y but leave U and V stationary which would to get messy to say the least. The reason I'm confused is that this isn't the problem you describe. Or is this another one that you tried but have since changed?
I must admit that I have had a lot of problems getting the drives to operate in the correct way. I had the core XYUV working great when it was operating as a normal coreXY machine. As soon as I introduced end stops for U and V and introduced M669 K8 for the geometry, I had some motors going in the wrong direction.
I eventually sorted it and If I set XY and UV to be independent, both carriages travel in the correct direction, so I was really happy that it worked, until I did my first print and the carriages went in opposite directions whist homing.
I just can't see what the problem could be.
I do have the heaters up to temperature prior to homing.
here is my config, perhaps you will spot something stupid that I have done.
; CoreXY config file for Duet firmware on appjawsCoreXY
M111 S0 ; Debug off
M550 PappjawsCoreXY ; Machine name (can be anything you like)
M551 Preprap ; Machine password (used for FTP connections)
M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xED ; MAC Address
M552 S1 ; Enable WiFi
; Machine configuration
M569 P0 S1 ; Drive 0 goes forwards X motor left hotend
M569 P1 S1 ; Drive 1 goes forwards Y motor right hotend
M569 P2 S1 ; Drive 2 goes forwards E1 extruder
M569 P3 S1 ; Drive 3 goes forwards X1 motor left extruders
M569 P4 S1 ; Drive 4 goes forwards Y1 motor right extruders
M569 P5 S1 ; Drive 5 goes forwards E2 extruder
M569 P6 S1 ; Drive 6 goes forwards E3 extruder
M569 P7 S1 ; Drive 7 goes forwards Z1 motor left
M569 P8 S1 ; Drive 8 goes forwards Z2 motor rear
M569 P9 S1 ; Drive 9 goes forwards Z3 motor right
M584 X0:3 Y1:4 Z7:8:9 U10 V11 E2:5:6 ; Assign motors to axes
M574 X1 Y2 U1 V2 Z1 S1 ; set endstop configuration (Y endstop only, at high end, active high)
M669 K8 ; set CoreXYUV mode
M671 X-44:150:344 Y80:300:80 ; Lead screw positions
M581 E2 S1 T0 C0 ; Set Z stop as fail safe for Z zeroing and run /sys/trigger2.g
M92 X80 Y80 U80 V80 Z3200 ; Set axis steps/mm
M92 E430:430:430 ; Set extruder steps per mm (single nozzle ormerod extruder)
;M906 X1000 Y1000 U1000 V1000 Z1000 E1000 I20 ; Set motor currents (mA) with I parameter
M906 X1000 Y1000 U1000 V1000 Z1000 E1000 ; Set motor currents (mA)
M201 X900 Y900 U900 V900 Z50 E1500 ; Accelerations (mm/s^2)
M203 X15000 Y15000 U15000 V15000 Z2000 E4000 ; Maximum speeds (mm/min)
M204 P500 T1000 ; set print accel to 500, non print to 1000
M566 X900 Y900 U900 V900 Z30 E100 ; Maximum jerk speeds mm/minute
M208 X300 Y200 U300 V200 Z220 ; set axis maxima (adjust to suit your machine)
M208 X0 Y0 U0 V0 Z0 S1 ; set axis minima (adjust to make X=0 and Y=0 the edges of the bed)
G21 ; Work in millimetres
G90 ; Send absolute coordinates…
M83 ; relative extruder moves
M572 D1 S0.05 ; pressure advance Dnnn Extruder num,Snnn advance amount(sec) 0.1 - 0.2
M350 X16 Y16 U16 V16 Z16 E16:16:16 ; Set 16x microstepping
;M350 X32 Y32 U32 V32 Z32 E32:32:32 ; Set 32x microstepping
;M350 X64 Y64 U64 V64 Z64 E64:64:64 ; Set 64x microstepping
;M501 ;load saved values
T0 ; select first hot end
; Manual bed levelling assistant
;M671 X-8:308:308:-8 Y-8:-8:212:212 P0.1 ; adjusting screws at rear(-8,-8)(308,-8), front(308,212)(-8,212), thread pitch 0.1mm
; Thermistors and heaters
M305 P0 R4700 B3950 ; bed thermistor R and B values
M305 P1 R4700 B4388 ; nozzle 1 thermistor R and B values
M307 H0 A111.7 C1084.8 D1.5 ;B0 ; Auto tune PID for bed heater
M307 H1 A620 C250 D6.5 ;B0 ; Auto tune PID for extruder 0
;M570 S120 ; Increase to allow extra heating time if needed
; Fan settings
M106 P1 T45 H1 ; Fan 1 to run when H1 is above 45Celsius
M106 P2 H100:101 T45:55 L0.3 ; electronics cooling fan
; Tool definition********** Single nozzle settings **********
M563 P0 D0 H1 ; Define tool 0
G10 P0 S0 R0 ; Set tool 0 operating and standby temperatures
;M92 E175 ; Set extruder steps per mm (single nozzle D-Bot extruder)
;M92 E430 ; Set extruder steps per mm (single nozzle ormerod extruder)
; Z probe E3Dv6 mini
M558 P1 X0 Y0 Z1 ; Analog Z probe, also used for homing the Z axis
G31 X-20 Y-10 Z1.55 P500 ; Set the probe height and threshold;
; ********** Diamond nozzle settings **********
;M201 X1000 Y1000 U1000 V1000 Z30 E2000:E2000:E2000 ; Accelerations (mm/s^2)
;M203 X15000 Y15000 U15000 V15000 Z200 E4000:4000:4000 ; Maximum speeds (mm/min)
;M566 X1000 Y1000 U1000 V1000 Z30 E100100 ; Maximum jerk speeds mm/minute
;M572 D1:D2:D3 S0.03 ; pressure advance Dnnn Extruder num,Snnn advance amount(sec) 0.1 - 0.2
;M563 P0 D0:1:2 H1 ; Define tool 0 extruder 0
;M563 P1 D0:1:2 H1 ; Define tool 1 extruder 1
;M563 P2 D0:1:2 H1 ; Define tool 2 extruder 2
;M567 P0 E1.0:0.0:0.0 ; single colour - extruder 0
;M567 P1 E0.0:1.0:0.0 ; single colour - extruder 1
;M567 P2 E0.0:0.0:1.0 ; single colour - extruder 2
;M92 E430:430:430 ; Set extruder steps/mm (multiple nozzles)
;M568 P0 S1 ; turn on mixing Tool 0
;M568 P1 S1 ; turn on mixing Tool 0
;M568 P2 S1 ; turn on mixing Tool 0
;M207 S5.0 F2400 ; retract all extruders
; Z probe diamond hot end
;M558 P3 X0 Y0 Z1 ; Analog Z probe, also used for homing the Z axis
;G31 X-20 Y10 Z0.99 P500 ; Set the probe height and threshold;
I can't see anything wrong with that.
Comparing yours to mine, I can see some differences but I wouldn't have have thought that they'd be significant. Here they are anyway in case you want to try them:
I have M669 K8 (set CoreXYUV mode) much nearer the top of the file, just under the network section and before any drive mapping.
I have my Y axis stop at the low end but I really can't see that making any difference.
I explicitly put S0 at the end of M208 to denote axis maxima whereas you have have no "S" parameter. The default should be S0 so it ought not make a difference but you never know.
Other than that I can't see anything that could potentially be a reason for yours behaving differently to mine. You have 3 Z motors but I'd have thought that would be irrelevant.
BTW, you can now use M584 with a P3 parameter if you want the U and V to be hidden.
Can you just recap on what issues you have now. Is it just homing and did you try my earlier suggestions?
It is just a second homeall that is the manifestation of the problem.
I will make the changes you suggest but I agree, I don't think that will make any difference.
The very strange thing is that on the second homeall the carriage moves in the Y+ direction but very slowly, almost crawling.
Whilst I was having the problems earlier when introducing XY and UV independent homing I tested each motor separately using the S2 modifier(G1 S2 X20 F2000).
Using this with X moved the XY carriage diagonally in the X+Y+ direction
Using this with U moved the UV carriage diagonally in the X+Y+ direction
Using this with Y moved the XY carriage diagonally in the X+Y- direction (this is correct for firmware 1.19 and later)
Using this with X moved the XY carriage diagonally in the X+Y- direction (this is correct for firmware 1.19 and later)
So I am happy that I have the motors turning in the correct directions and connected to the correct connectors.
If yours works when you do a second G28 and your config and home all are the same as mine I just don't know where to go next
Just moved M669 to the top of the machine section. that has improved the situation somewhat, the UV carriage now moves fast in the Y+ direction and homes, the XY carriage stays still but eventually moves in the X- direction with the UV carriage
So it appears that the XY motors are not getting the signal for the first move to Y+ to home, very strange seeing that on the first instance og G28 it works correctly although the XY carriage seems to move slower than the UV.
Now totally confused (as normal)
Yes I'm confused too but we'll get there. Can you post your latest homeall.g file please. My best guess at the moment is that, if it works first time then config.g must be correct but if is doesn't work on a second time then logic would suggest that there something at the end of the homeall.g that is screwing it up. You could maybe try deleting the final M584 and re-typing it just in case there is a hidden character.
I'll upload my homing files to my google drive and send you a link. Bear with me…...
Hi again Paul,
Here is a link to a folder that contains my homing files as well as my config.g. https://drive.google.com/drive/folders/1CUEhgow949BmTpNS0mssd5gzQY_p34in?usp=sharing
Obviously there are differences between our configs but I'd have thought that my homex, homey and homeall should work on yours.
Well,Well,Well–----IT NOW WORKS-------
I have changed the order of some items in config and checked the home files against yours.
so I moved M669 to the top and included M552
I'm not sure which change solved the problem, on reflection I should have changed one item at a time and retested each time. (isn't hindsight wonderful?)
Anyway, thank you very much Ian for your help
just an observation, I noticed that all your motors go backwards and mine go forwards
I can't see why M552 would make any difference as it's just to do with networking (also mine is Ethernet while yours is WiFi).
Anyway, you got it working so that's the main thing.
Ref the motors - I noticed that too but I guess that's just down to how the motors are wired internally. I'd think that different motors from different manufactures might behave differently. That's a definite "if it ain't broke, don't fix it".
sorry typo should have been M555
sorry typo should have been M555
Ah OK. - (Still doesn't make an sense though). AFAIK, that only affects output via USB. Maybe it was moving the M669 to an earlier place in the file that fixed it ?
Who knows? Hey, it's fixed which is all that really matters.