Layer tracking with variable layer heights
-
@tmreith
I have never noticed such a miscalculation.
Maybe that's because I pay more attention to the height in mm, if it's necessary.It will certainly not be long before someone can say something about it or has suspicions.
A little patienceGoogle Translate
--- Original Text ---Mir ist so eine Fehlberechnung noch nicht aufgefallen.
Das liegt vielleicht daran das ich eher auf die Höhe in mm achte, wenn es denn mal notwendig ist.Es wird sicher nicht lange dauern bis jemand etwas dazu sagen kann oder Vermutungen hat.
Etwas Gedult -
R = (1-4) : 4 layers - raft mix
A = (5-19) : 15 layers at 0.100mm
B= (20-76) : 57 layers at 0.150mmTotal 76 layers
I have uploaded a sample file for the above cube with variable layer heights to show the effect.
-
@tmreith
This is what the Prusa GCode Viewer shows me...
The first layer is an incredible 0.5mm thick... it certainly won't be a 0.4mm nozzle.
The number of 76 layers is displayed on the right edge.
I have colored the heights of the layers (see screenshot on the left).Have you ever tried another slicer to see if it shows the correct number of layers?
Google Translate
--- Original Text ---Das zeigt mir der Prusa GCode Viewer an...
(Screenshot siehe oben)
Die erste Schicht ist unglaubliche 0,5mm dick... eine 0,4mm Düse wird es bestimmt nicht sein.
Die Anzahl von 76 Layern wird am rechten Rand angezeigt.
Ich habe die Höhen der Schichten farblich anzeigen lassen (siehe links auf dem Screenshot).Hast Du schon einmal einen anderen Slicer ausprobiert ob der eine korrekte Layeranzahl anzeigt ?
-
I simulated the GCode on my printer and the following values came out.
The layer heights are only correct from layer 29, before that they deviate extremely from 0.1mm.
Google Translate
--- Original Text ---Ich habe den GCode mal auf meinem Drucker simuliert und dabei sind folgende Werte heraus gekommen.
Erst ab Layer 29 sind die Schichthöhen korrekt, vorher weichen sie doch schon extrem von der 0,1mm ab. -
@tmreith said in Layer tracking with variable layer heights:
However DWC seems to be calculating layers from a perceived Z height and layer heights.
Yes this may be the case.
What version of firmware and DWC are you running?
-
@phaedrux
Board: Duet 3 MB6HC (MB6HC)
DSF Version: 3.3.0
Firmware: RepRapFirmware for Duet 3 MB6HC 3.3 (2021-06-15)
Duet Web Control 3.3.0I thought there was a keyword like "layer count" or "num_layers" that was being read in past before DWC would try to calculate based on a layer_height value and the max Z value.
The mixed layer heights are definitely messing with the layer calculation.
I have full control over the gcode, so I can add in the required commented value to drive the DWC.
-
Can you update to 3.4.1?
-
@phaedrux
unfortunately not. The machines are validated to 3.3 and would require a re-validation effort if I updated the firmware.Is there a layer count keyword that is still being used in the g-code? I can insert what ever DWC needs to establish a value vs trying to calculate from a Z height and the layer height value.
-
See if you can add num_layers=## to the end of the file.
https://forum.duet3d.com/topic/27471/num_layers-in-g-code/4?_=1662052426372
-
@phaedrux
I added the following to the end of the gcode file, and there was no effect.; num_layers=64
I looked at the source code for FileInfoParser.cpp and it definitely has a routine to parse "num_layers" keyword. I am not sure why the DWC doesn't seem to see the value.
I have another machine running 3.4.1, so I'll give it a try on that machine over the weekend.
-
@tmreith
Works on a Duet 2 Wifi running 3.4.1.Added the following to the last line in gcode file.
; num_layers: 64
-
Maybe a limitation or bug in the DuetPi version?
-
@tmreith @Phaedrux Parsing the number of layers (aka
num_layers
) isn't supported in DSF or RRF v3.3. In order to use this feature you must be on v3.4 or newer.PS: Until v3.4 RRF/DSF attempt to compute the number of layers from the object height (last absolute G0/G1 Z command in the print file) and the layer height. If you have an extra G1 Z lift command in there, the reported object height and the number of layers are probably wrong.
-
@chrishamm said in Layer tracking with variable layer heights:
If you have an extra G1 Z lift command in there, the reported object height and the number of layers are probably wrong.
His end code Z lift has ; E on the line.
-
@phaedrux It is correctly processed by DSF 3.4.1, I just checked (object height = 11.05mm). The number of layers was not present in the original file but once added that is parsed correctly, too.