Resetting the origin of a delta
-
So, back to the printer today. Here are the files requested.
config.g
[c]; Configuration file for Duet Ethernet (firmware version 1.20 or newer)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool on Fri Jan 19 2018 14:23:09 GMT+0000 (GMT Standard Time); General preferences
M111 S0 ; Debugging off
G21 ; Work in millimetres
G90 ; Send absolute coordinates…
M83 ; ...but relative extruder moves
M555 P2 ; Set firmware compatibility to look like Marlin
; Automatic saving after power loss is not enabled;*** The homed height is deliberately set too high in the following - you will adjust it during calibration.
M665 R100 L265 B70 H280 ; Set delta radius, diagonal rod length, printable radius and homed height
M666 X0 Y0 Z0 ; Put your endstop adjustments here, or let auto calibration find them
M208 Z0 S1 ; Set minimum Z; Endstops
M574 X2 Y2 Z2 S1 ; Set active high endstops
M558 P4 H5 F120 T6000 ; Set Z probe type to switch and the dive height + speeds
G31 P600 X30 Y-20 Z0.1 ; Set Z probe trigger value, offset and trigger height
M557 R50 S20 ; Define mesh grid; Drives
M569 P0 S1 ; Drive 0 goes forwards
M569 P1 S1 ; Drive 1 goes forwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S1 ; Drive 3 goes forwards
M350 X16 Y16 Z16 E16 I0 ; Configure microstepping without interpolation
M92 X80 Y80 Z80 E96 ; Set steps per mm
M566 X1200 Y1200 Z1200 E1200 ; Set maximum instantaneous speed changes (mm/min)
M203 X18000 Y18000 Z18000 E1200 ; Set maximum speeds (mm/min)
M201 X1000 Y1000 Z1000 E1000 ; Set accelerations (mm/s^2)
M906 X500 Y500 Z500 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Heaters
M305 P0 T100000 B4267 C0 R4700 ; Set thermistor + ADC parameters for heater 0
M143 H0 S120 ; Set temperature limit for heater 0 to 120C
M305 P1 T100000 B4267 C0 R4700 ; Set thermistor + ADC parameters for heater 1
M143 H1 S275 ; Set temperature limit for heater 1 to 275C; Tools
M563 P0 D0 H1 ; Define tool 0
G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C; Network
M550 PUoY CS 3D Delta Printer ; Set machine name
M540 PBE:EF:DE:AD:FE:ED ; Set MAC address
M552 P192.168.0.10 S1 ; Enable network and set IP address
M553 P255.255.255.0 ; Set netmask
M554 P192.168.0.1 ; Set gateway
M586 P0 S1 ; Enable HTTP
M586 P1 S0 ; Disable FTP
M586 P2 S0 ; Disable Telnet; Fans
M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
M106 P1 S1 I0 F500 H T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
M106 P2 S1 I0 F500 H T45 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on; Custom settings
M558 I1
M501[/c]config-override.g
[c]; This is a system-generated file - do not edit
; Delta parameters
M665 L265.000 R221.376 H300.087 B70.0 X34.407 Y32.756 Z0.000
M666 X-12.264 Y21.770 Z-9.506 A0.00 B0.00
; Heater model parameters
M307 H0 A90.0 C700.0 D10.0 S1.00 V0.0 B1
M307 H1 A340.0 C140.0 D5.5 S1.00 V0.0 B0
M307 H2 A340.0 C140.0 D5.5 S1.00 V0.0 B0
M307 H3 A340.0 C140.0 D5.5 S1.00 V0.0 B0
M307 H4 A340.0 C140.0 D5.5 S1.00 V0.0 B0
M307 H5 A340.0 C140.0 D5.5 S1.00 V0.0 B0
M307 H6 A340.0 C140.0 D5.5 S1.00 V0.0 B0
M307 H7 A340.0 C140.0 D5.5 S1.00 V0.0 B0
[/c]bed.g
[c]; bed.g
; called to perform automatic delta calibration via G32
;
; generated by RepRapFirmware Configuration Tool on Fri Jan 19 2018 14:23:09 GMT+0000 (GMT Standard Time)
M561 ; clear any bed transform
; Probe the bed at 6 peripheral and 0 halfway points, and perform 6-factor auto compensation
; Before running this, you should have set up your Z-probe trigger height to suit your build, in the G31 command in config.g.
G30 P0 X0 Y50 H0 Z-99999
G30 P1 X29.43 Y16.99 H0 Z-99999
G30 P2 X25.14 Y-14.52 H0 Z-99999
G30 P3 X0 Y-32.78 H0 Z-99999
G30 P4 X-43.3 Y-25 H0 Z-99999
G30 P5 X-43.3 Y25 H0 Z-99999
G30 P6 X0 Y0 H0 Z-99999 S6
; Use S-1 for measurements only, without calculations. Use S4 for endstop heights and Z-height only. Use S6 for full 6 factors
; If your Z probe has significantly different trigger heights depending on XY position, adjust the H parameters in the G30 commands accordingly. The value of each H parameter should be (trigger height at that XY position) - (trigger height at centre of bed)[/c]homedelta.g
[c]; homedelta.g
; called to home all towers on a delta printer
;
; generated by RepRapFirmware Configuration Tool on Fri Jan 19 2018 14:23:09 GMT+0000 (GMT Standard Time)
G91 ; relative positioning
G1 S1 X245 Y245 Z245 F1800 ; move all towers to the high end stopping at the endstops (first pass)
G1 X-5 Y-5 Z-5 F1800 S2 ; go down a few mm
G1 S1 X10 Y10 Z10 F360 ; move all towers up once more (second pass)
G1 Z-5 F6000 ; move down a few mm so that the nozzle can be centred
G90 ; absolute positioning
G1 X0 Y0 F6000 ; move X+Y to the centre[/c]As you can see, there are some 0 values where you say there shouldn't be, so that's a place for me to start working from. I will also increase the travel allowed for homing in the homedelta file and see what happens. Are there any other problems you can see?
EDIT: Miraculously, just getting rid of the override and increasing the homing distance has fixed the homing behavior. It still seems to be moving in arcs though…
EDIT 2: Nevermind, the homing behavior has gone back to what it was in the videos I posted.. It did this after I tried to do an auto calibrate, but I aborted it because I found some play in a couple of the screws. I restart and home and it is doing it again. Is there somewhere that it saves the intermediate results of a calibration attempt? I can't see a config override file?
EDIT 3: My best "fix" thus far is to move the arms as close to the endstops as possible. It doing so, the offset it applies to the origin after homing seems to be minimal. Not really a fix, but I don't yet understand why the offset is applied. Anyway, in better news, it has been able to print successfully!
-
The R value in your config-override file is still out of whack. The X, Y and Z in your Homedelta.g G1 S1 X245 Y245 Z245 F1800 ; move all towers to the high end stopping at the endstops (first pass) can be raised up a lot.
-
What would an acceptable range for the R value be? I have raised the X, Y, and Z values to 280, and reaching the endstops hasn't been a problem since.
As I said in my last post, I was actually able to get it to print a couple of things with pretty good results. This was done using manual Z calibration before each print started.
The main problem now is the homing behaviour (I have a smart effector and parts on order, so hopefully that will arrive soon). I've worked with it enough to have come up with a rough workaround (which I detailed in edit 3 above), but I have still yet to work out why I need to do what I'm doing to get it to home to the origin…
-
The R value is "delta radius" in the diagram in this post: https://www.duet3d.com/forum/thread.php?pid=36186#p36186. The value of 100mm that you have in the M665 command in config.g is probably a good starting point. The one in config.g is way too high, probably because you ran M500 after a failed calibration.
Until you have calibration working, I suggest you delete or comment out the M501 command at the end of config.g, so that config-override.g will not be used.
-
I see! I measured that distance whilst I had the effector positioned as close to the centre of the bed as I could judge by eye, and I got a value of more like 160mm (can't remember the exact value right now). I'm using that value and it seems to be fine/nothing has changed for the worse beyond what is already happening.
As I mentioned before, the homing behaviour is the only thing causing me problems. I have printed a couple of pieces now (using manual Z calibration) and I'm quite happy with the results… (it is ~0.05mm out in Y, 0.2mm out in X, and ~0.02mm out in Z)
I've found my homing procedure to be highly repeatable. Would you be able to tell me what G28 does internally from a cold boot of the printer? It seems like successive homings "narrow in" on the true origin. It's a behaviour I'm having real trouble understanding and therefore solving. As far as I understand, homing doesn't make any change to any parameter that would be written to config-override.g by calling M500?
-
On a delta printer, sending G28 flags all towers as not homed and then executes the homedelta.g file. So the behaviour is determined by the commands in that file.
-
Maybe this will help for reference. A copy of my M665 and M666 from my config-override.
M665 L453.482 R216.578 H592.250 B390.0 X0.163 Y0.145 Z0.000
M666 X0.019 Y-0.088 Z0.069 A-0.02 B-0.02Without a proper calibration, your numbers in the X, Y and Z for both lines are very skewed.
-
also the first G1 line in your home delta has 245 for the X Y & Z values increase it to 450 or so to make sure that home works on a single pass
-
Ok, home delta has been increased and is no longer a problem.
By this point, I have a working printer, and its results are pretty good… I feel like I'm just going to live with this homing issue for now, since I know how to get around it. If I ever solve it I'll post what I did back here.Thanks all for your help!
-
What homing issue are you still having?
-
Here's a video of it. Not sure how much better I can describe it!
Not sure if it's related, but I was looking through the settings, and I found that my drive configuration reads so that the max values on the drive are significantly different. Couldn't find a way to change it, but maybe it's relevant?
-
I have the Anycubic Kossel Linear (non-plus) and have done quite a bit of configuration around the M665 equivalent in its original Marlin firmware (primarily because I changed the rods out for magnetic, right about the same time Marlin changed their configuration for Deltas. Yikes!!). I also have a Duet (on a different printer) so I understand its configuration. Maybe I can help:
For an Anycubic Kossel Linear Plus the M665 will be within a few millimeters of:
M665 L271 R134 H300 B85 X___ Y___ Z___The blanks will be small values (less than 0.2) that are entirely dependent on the individual machine. The H parameter may be in the range of 280 to 320 (I have a non-plus, so I'm not as certain about height as I am about the other parameters).
The L, R and B will be within +/- a couple of mm of what's shown. If they are not, something is drastically wrong. The values you showed in the last M665 you posted L453.482 R216.578 H592.250 B390.0 are way off. These values are "compensating for each other" to some extent, and that's why you are able to sort of home and sort of print, etc… but... they are very, very, very wrong and that's why other issues are cropping up.
Don't continue until you straighten this out, you will just get more and more frustrated.
As stated by other folks above, remove the M501 at the end of your config.g, and leave it out until things are working better. Also, remove the config-override.g completely. Do these two things before you change anything else. Once these two things are done, you can be certain the M665 in config.g is one place to change.
Then set the M665 in config.g to the values above. This SHOULD result in correct homing behavior. If you want to adjust them slightly to fit your printer, be sure you stay close to the values above.
The next step will be probing... but... let's just get the homing working for now. Please make the above changes and report back.
I don't monitor this board very closely... so please do post homing results back here, and also feel free email me at danal (dot) estes (at) gmail (dot) com to let me know more quickly.
-
Excellent! Thanks very much for your tips Danal, I'll be sure to try those things out (hopefully tomorrow) and report back!
-
Ok, this is my current config.g and homedelta.g
; Configuration file for Duet Ethernet (firmware version 1.20 or newer) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool on Thu Jan 25 2018 11:22:03 GMT+0000 (GMT Standard Time) ; General preferences M111 S0 ; Debugging off G21 ; Work in millimetres G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves M555 P2 ; Set firmware compatibility to look like Marlin ; Automatic saving after power loss is not enabled ;*** The homed height is deliberately set too high in the following - you will adjust it during calibration. ;M665 R130 L265 B100 H280 ; Set delta radius, diagonal rod length, printable radius and homed height M665 R134 L271 B100 H280 M666 X0 Y0 Z0 ; Put your endstop adjustments here, or let auto calibration find them M208 Z0 S1 ; Set minimum Z ; Endstops M574 X2 Y2 S1 ; Set active high endstops M558 P0 H5 F120 T6000 ; Disable Z probe but set dive height, probe speed and travel speed M557 R80 S20 ; Define mesh grid ; Drives M569 P0 S1 ; Drive 0 goes forwards M569 P1 S1 ; Drive 1 goes forwards M569 P2 S1 ; Drive 2 goes forwards M569 P3 S1 ; Drive 3 goes forwards M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation M92 X80 Y80 Z80 E96 ; Set steps per mm M566 X1200 Y1200 Z1200 E1200 ; Set maximum instantaneous speed changes (mm/min) M203 X18000 Y18000 Z18000 E1200 ; Set maximum speeds (mm/min) M201 X1000 Y1000 Z1000 E1000 ; Set accelerations (mm/s^2) M906 X1000 Y1000 Z1000 E1300 I30 ; Set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Heaters M305 P0 T100000 B4267 C0 R4700 ; Set thermistor + ADC parameters for heater 0 M143 H0 S120 ; Set temperature limit for heater 0 to 120C M305 P1 T100000 B4267 C0 R4700 ; Set thermistor + ADC parameters for heater 1 M143 H1 S275 ; Set temperature limit for heater 1 to 275C ; Tools M563 P0 D0 H1 ; Define tool 0 G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C ; Network M550 PUoY CS JB 3D Delta Printer ; Set machine name M540 PBE:EF:DE:AD:FE:ED ; Set MAC address M552 P192.168.0.10 S1 ; Enable network and set IP address M553 P255.255.255.0 ; Set netmask M554 P192.168.0.1 ; Set gateway M586 P0 S1 ; Enable HTTP M586 P1 S0 ; Disable FTP M586 P2 S0 ; Disable Telnet ; Fans M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off M106 P1 S1 I0 F500 H T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on M106 P2 S1 I0 F500 H T45 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on ; Custom settings ;M558 I1 ; Invert the inductive Z probe ; Miscellaneous ;M501 ; Load saved parameters from non-volatile memory
; homedelta.g ; called to home all towers on a delta printer ; ; generated by RepRapFirmware Configuration Tool on Thu Jan 25 2018 11:22:03 GMT+0000 (GMT Standard Time) G91 ; relative positioning G1 S1 X405 Y405 Z405 F1800 ; move all towers to the high end stopping at the endstops (first pass) G1 X-5 Y-5 Z-5 F1800 S2 ; go down a few mm G1 S1 X10 Y10 Z10 F360 ; move all towers up once more (second pass) G1 Z-5 F6000 ; move down a few mm so that the nozzle can be centred G90 ; absolute positioning G1 X0 Y0 F6000 ; move X+Y to the centre
Restarted and homed, and sadly the homing behaviour is still the same as in the last video I posted. Additionally, I had previously said that I'd live with it, but I've since realised that the application I have in mind for the printer will require the origin to be consistent, so I really need to get this sorted
The parameters you gave me were not significantly different to the ones I was already using (I changed bed radius, and I've been adjusting H just to try and find some consistency in the homing behaviour with different values. The ones I was using up to now are commented in the file above.) But so far, it is doing exactly what happens in the video.
I'm still a tad confused by the screenshot I posted above of my endstop maximums being different, so I'm currently doing my first dive into the source to look for clues. My reasoning is that on a delta, the endstops at the top of each pillar would be assumed to be at the same level, and then of course adjusted in config.g to compensation for their mm differences in height? Other than that I'm at a loss as to what is causing it.
-
You can ignore the drive 0 and 1 minimum and maximum figures, and the drive 2 maximum figure. They come from M208 default settings and are not relevant for delta printers. The drive 2 minimum is the minimum allowed Z value.
Your M574 command needs parameter Z2 added to it.
-
Yes, your actual L, R, etc were pretty close. I'd seen an old post with some very different values. I'm pretty confident that your M665 is now quite close. So let's think about other things.
I think what I'd do next is enter the commands in homedelta.g one at a time, by hand, and watch. Which command is it that causes the printer to move so far off axis?
Just from the video, it would SEEM that it is one of the last commands, because we see the first up, then a down, then another up, so it seems logical that the first several commands are working.
Still, I'm very curious why the G90 and G1 X0Y0 would do what we see… so, if you can, enter them one at a time and report back which one moves the effector so far off.
,
.
Oh, and be sure you either cut and paste, or "make your eye and brain aware" that the G1 commands have an extra parameter, namely "S1" or "S2" in a few spots. These are the parameters that make Delta homing work.Some of us (cough,,, me,,, cough) are so accustomed to CNC G-Code that we might have MISSED those pesky little S parameters when checking this out on our own printer. Nah... that'd never happen.
-
And… have you used either M119 and/or the "Settings">"Machine Control" page to verify that all your endstops are working as expected?
Play with them numerous times, make sure they show as triggered, or not, as you click and unclick each switch with your finger.
-
You can ignore the drive 0 and 1 minimum and maximum figures, and the drive 2 maximum figure. They come from M208 default settings and are not relevant for delta printers. The drive 2 minimum is the minimum allowed Z value.
Your M574 command needs parameter Z2 added to it.
Thanks dc42, that saves me some digging! I shall add Z2 to my M574.
Yes, your actual L, R, etc were pretty close. I'd seen an old post with some very different values. I'm pretty confident that your M665 is now quite close. So let's think about other things.
I think what I'd do next is enter the commands in homedelta.g one at a time, by hand, and watch. Which command is it that causes the printer to move so far off axis?
Just from the video, it would SEEM that it is one of the last commands, because we see the first up, then a down, then another up, so it seems logical that the first several commands are working.
Still, I'm very curious why the G90 and G1 X0Y0 would do what we see… so, if you can, enter them one at a time and report back which one moves the effector so far off.
Oh, and be sure you either cut and paste, or "make your eye and brain aware" that the G1 commands have an extra parameter, namely "S1" or "S2" in a few spots. These are the parameters that make Delta homing work.
Some of us (cough,,, me,,, cough) are so accustomed to CNC G-Code that we might have MISSED those pesky little S parameters when checking this out on our own printer. Nah... that'd never happen.
Great! At least I was on the right track!
I have observed the homing routine many times, though I've never tried keying in the homedelta.g sequence myself. My assumption was always that it was the last G1 command that was causing the behaviour, but somehow somewhere along the line the printer became convinced the origin was way out, and all the G1 does is move it to that way out position. I too was not aware of the significance of the Snnn parameters to homing deltas until now! I'll be sure to copy them in their entirety!I have done my endstop checks, and I'm happy they are all triggered as expected!
Shall report back tomorrow!
-
WOULD YOU BELIEVE!?! The simple addition of Z2 to M574 fixed it! I'm so happy right now, thanks so much guys!
Backtracking to see why this might have happened to me, it seems that in the configurator, selecting "No Z probe" causes the "Z endstop type" settings above it to be disabled (and so I guess it assumes that one isn't present and omits it when writing M574, which is of course incorrect)? Just a theory really, but either way, grouping the high-end Z endstop and Z probe together seems a little inconsistent from a UI point of view?
Thanks again!
-
Without the Z2 parameter, M574 assumes an endstop at the low end of the "axis", which of course doesn't make sense for a delta.