Why Layer on mainsail does not correspond to that in OrcaSlicer?

Basic Information:

Printer Model: Prusa i3MK3S+
MCU / Printerboard: Einsy
Host / SBC RPi 5

Describe your issue:

From the live stream of the printer, I see that the extruder is moving differently from what the virtual extruder is moving in the Preview of OrcaSlicer. For example, the extruder is drawing a curve in real life but when I moved to the same layer in the Preview of OrcaSlicer, this motion is not in that particular layer. Rather, it happens two layers below or one layer above that particular layer. Another strange thing is that OrcaSlicer indicates that there are 188 layers but Klipper shows that there are 189 layers. How come? In OrcaSlicer, the lowest layer is layer 1.

do you really use gcode layer counts and klipper really knows the layer, or do you only use calculated layers by mainsail?

best would be to upload a gcode file for debugging.

Sorry I don’t quite understand what you meant. On the Mainsail GUI, there is a field called Layer. That is the one I am referring to.

Can you post a screenshot of this?

I am not with my machine right now but there is a good screenshot of this:

Welcome to Mainsail | Mainsail

On the left, you see a MainSail_Cube.gcode preview.
Under it, there are Speed, Flow, Filament and Layer. This Layer.

We’d prefer actual images from your system.

Actually, it is this way:

  • 0 is displayed before the first layer is put down. So during bed mesh etc, the layer is 0.
  • 1 appears when the first layer ist printed.
  • The layer is recalculated from the Z-height.
  • The last layer is identical to the one in OcraSlicer (in my setup).

Maybe relevant: Best practise G-codes

ok. Per default Klipper doesn’t know any layer numbers. It just know the current position (in mm) and the byte position in the gcode. Layers itself, only exists in the Slicer. So Mainsail can just calculate a layer number with the metadata from a gcode file (first layer height and other layer height). if you use variable layer height, this function cannot work very well anymore. So thats we added the gcode SET_PRINT_STATS_INFO to write Slicer data into the gcode to be able to display these (these are only information values). So pls look at the link from @Sineos and try to add these gcodes into your Slicer. This will give you better layer numbers while printing.

1 Like