Driver numbers?
-
; bed.g
; called to perform automatic bed compensation via G32
; M584 X0 Y1 Z5:6:7:8 E3 ; Apply custom drive mapping Drives 5,6,7,8 are driven as one
; generated by RepRapFirmware Configuration Tool on Wed Nov 08 2017 23:58:37 GMT+0100; Clear any bed transform
M561; Home all axes
G28; Probe the bed at 4 points and autolevel all four afterwards
G30 P0 X10 Y10 H0 Z-99999 ; probe near motor 5
G30 P1 X220 Y10 H0 Z-99999 ; probe near motor 6
G30 P2 X220 Y300 H0 Z-99999 ; probe near motor 7
G30 P3 X10 Y300 H0 Z-99999 S4 ; probe near motor 8 and correct all four z positions -
That should work if you press the bed compensation button before each print. But I recommend you use mesh bed compensation instead of 4-point compensation. See https://duet3d.com/wiki/Using_mesh_bed_compensation.
-
Hi, thanks for the fast reply but Iam looking for auto levelling/calibration before and even without printing. I thought there was already a command for that like G30/32 or G29 which does it but i always get the same heightmap in the end with no corretions made, you see?
First run
[/file:///C:/Users/Hoschie/Desktop/1st.jpg]
Second run
[/file:///C:/Users/Hoschie/Desktop/2nd.jpg]
Gcode Console:12:54:24
G29
12 points probed, mean error 0.014, deviation 0.024
Height map saved to file heightmap.csv
12:53:47
G32
Leadscrew adjustments made: 0.829 0.834 0.832 0.827, points used 4, deviation before 0.856 after 0.000
12:50:12
G29
12 points probed, mean error 0.015, deviation 0.025
Height map saved to file heightmap.csv
12:49:34
G32
Leadscrew adjustments made: 0.829 0.824 0.822 0.827, points used 4, deviation before 0.854 after 0.000 -
Doh - unfortuntately I am obviously so bad in text based code that i cant even upload an image
-
Well its still saying it did do leadscrew adjustments but it doesnt..
Plus i do not seem to be able to individually define mesh grid points instead of a pattern with a predefined spacing. If i would like to scan and display the heightmap with only 4 points for bed levelling before compensation during print, that it not possible if a have a non symmertric bed (like 200x300 as i do).thx
-
1. Your bed probing for leadscrew adjustment and your G29 bed probing appear to differ in their idea of where Z=0 is by about 0.8mm. Are you homing during the sequence at all, e.g. in the bed.g file ?
2. What happens if you run leadscrew adjustment multiple times, without homing or doing G29 in between? Does the adjustment converts to near zero?
3. The M557 mesh bed compensation allows you to specify different X and Y spacings for the grid. So you can do 4 point probing on a rectangular bed.
-
Hi, M557 worked, using two different s parameters for each axis is doing the trick - thanks!
I dont get leadscrew adjustments yet, with or without homing. It still says leadscrew adjustments are made when they are not - e.g. leadscrew 4 at motor 8 offset is constantly 50 µm off and not being adjusted automatically, when manualy adjustment is working by splitting the z motor definition to individual ones using M584 (meaning that i can move individual z motors so they are not under defined when only defining one z motor in config.g, correct?)
thx
-
That sounds odd. If the firmware says that leadscrew adjustments have been made, then it should have sent step pulses to the motors. Are you certain it isn't adjusting them? The movements may be too small to see easily. One test you can do is to run G31 repeatedly to see if the reported corrections change.
-
My z-motors are arranged counterclockwise, if that matters?
-
It doesn't matter, as long as you list the leadscrew coordinates of the Z motors in the same order that you list the corresponding drivers numbers.
-
Hi again, so I crosschecked individual z-axes movements using a borrowed mitutoyo scale. Each axes can be adressed individually and moves exactly the given amount e.g 0.13 mm and so does the concerto when joined back together (within the total travel and error of the scale
When I try to correct for the offsets given by the heighmap though, I have to move them axes approximately twice as much as indicated in the offsets (doing it manually). Does that indicate some possible source of error in my settings (since the steps per millimeter are defined for Z, its not necessary to define the pitch anywhere e.g., right)?
-
Ok, changing configuration to clockwise now (since i found it to be noted in fat letters at reprap.org), the axes do seem to be automatically corrected by performing G30 via G32 - only the wrong way round, so the error is getting bigger but at least it is changing now
I will keep you posted hopefully tomorrowgn8
-
It's quite common to need to correct more than the calculated amount. I think this is because the connections between the leadscrews and the bed are not the perfect ball joints that the model assumes.
-
After rewiring stuff to have the four axis table motors hardwired in clockwise fashion too (increasing clock time = increasing motor channel numbers) and changing the absolute endstop positions to where they are (at the maximum positions) I cant get them to be respected by the software anymore (They were working fine before when that position was programmed to be X0 Y0). The endstops are flagged when hit so activity is still correct, of course, the maxima are displayed correctly and the direction of the motors is correct but the motors dont stop when the endstops are hit during homing, poor me - and poor machine
The endstops immediatly take effect again when I say they were at the low end by M574 X1 Y1 S1. But then, of course, my coordinate system and motor direction is the wrong way round again (elswise homeall.g would not work anymore, funny enough).
This is the code that i thought that should work but doesnt:
M555 P1 ; Set firmware compatibility to look like RepRapFirmare
M208 X311 Y231 Z225 ; set axis maxima
M208 X0 Y0 Z-1 S1 ; Set axis minima
M574 Z0 ; Define unused microswitches
M574 X2 Y2 S1 ; Define active high S1 microswitches at high XY2 or low XY1 end
M558 P5 X0 Y0 Z1 H3 R0.2 F7000 T7000 I1 ; Set Z probe type to switch and the axes for which it is used, the dive height H
G31 P600 Z0 ; Set Z probe trigger value, offset and trigger height
M557 X0:310 S310 Y0:230 S230 ; Define mesh grid X limits and S spacingM569 P0 S0 ; Drive 0 (X) goes backwards
M569 P1 S0 ; Drive 1 (Y) goes backwards
M569 P2 S0 ; Drive 2 (Z) goes backwards
M569 P3 S1 ; Drive 3 (E0) goes forward
M569 P4 S1 ; Drive 4 (E1) goes forward
M569 P5 S0 ; Drive 5 (Z1) goes backwards
M569 P6 S0 ; Drive 6 (Z2) goes backwards
M569 P7 S0 ; Drive 7 (Z3) goes backwards
M569 P8 S0 ; Drive 8 (Z4) goes backwards
M584 X0 Y1 Z5:6:7:8 E3 ; Apply custom drive mapping Drives 5,6,7,8 are driven as one
M671 X0:310:310:0 Y0:0:230:230 S2 ; Z motors are at coordinates 5:X0Y0 6:X310Y0 7:X310Y230 8:X310Y230; homeall.g
G91
G1 Z3 F3000G1 X320 Y240 F7000 S1
G1 X-5 Y-5 F1000
G1 X320 Y240 F300 S1G1 X-115 Y-155 F7000
G1 Z-230 F3000 S1
G1 Z3 F3000
G1 Z-230 F100 S1G90
G92 Z0
G1 Z3 F3000 -
Your M574 command says there is no Z endstop (M574 Z0), but your homing file is set up to use a Z endstop, not a Z probe. So of course it doesn't stop. Do you have a Z endstop switch, or do you intend to use a Z probe for Z homing?
-
Hej, the x and y endstops dont take effect, z-probe as been working fine
-
Are you saying that changing which outputs the Z motors are connected to has stopped the X and Y endstops from terminating a G1 S1 X or G1 S1 Y homing move?
If so, is this a Cartesian or a CoreXY machine, and are you using Duet WiFi or Duet Ethernet?
-
Clockwise reconfiguration worked, 4 axis autolevelling of the bed is now working (i also upgraded to 1.20)! thx!!
Just one more question for the night:I was using M557 X0:310 S310 Y0:230 S230 before and that did a nice asymmetric 4 point scan of the bed for the heightmap.
After upgrading it stopped after the second point and said too few point for cheightmap… so i tried a smaller spacing like this:
M557 X0:310 S155 Y0:230 S115 which did the trick, only that I get a six point mesh instead of the expected 9 point now.Should be nine points right at positions X0:155:310:155:0:155:310 Y0:0:0:115:115:115:230:230:230 right?
Limits are
M208 X310 Y230 Z225 ; set axis maxima
M208 X0 Y0 Z-1 S1 ; Set axis minima -
Your Z probe X and Y offsets also affect how many points will be probed, because they may indicate that some of the extremeties of the grid defined by M557 are not reachable by the probe.
-
X, Y and Z offsets are set to zero for the time being, doesnt help. I also played with the limits settings, doesnt help either.
Am i missing a typo here: M557 X0:310 S155 Y0:230 S115? It is probing both directions with a 155mm spacing.
If i say M557 X0:310 S100 Y0:230 S50, it is probing both directions with a 100mm spacing, obviously its ignoring the second S parameter when i run the "mesh grid compensation" function of the Duet web interface (initiating the G29 command).