layer change detection - ideamaker
-
DuetLapse depends on the firmware finding the layer tags.
The firmware is looking for some specific strings prior to starting a print, and then calculates the "current" layer from Z, with appropriate handling for the fact that layer 0 is often different.
The most common reason for all of that not working is having a G1 (or G0) in the end G-code that contains a Z value that throws off the scan & calculate. What do the last two dozen or so lines in the file look like? And/or what does DWC show for total height?
-
@Danal, does the layer detection of the duet relies the file preamble from the slicer? E.g. this
https://github.com/Duet3D/RepRapFirmware/blob/dev/src/Storage/FileInfoParser.cpp#L538
BTW, theoretically you can have in the timelapse program an additional trigger by z.
-
total height is ok, but everything else is blank
here's a sample g-code
ideaMaker.gcodeFileInfoParser.cpp does not know about ideaMaker but that data does not exist in the comment section of ideaMaker ...
start is
;Sliced by ideaMaker 3.5.3.4250, 2020-05-24 01:44:49 UTC+0200 ;Dimension: 236.000 225.000 300.000 0.600 ;Plate Shape: 0 ;Extruder Offset #1: 25.000 0.000 ;Filament Diameter #1: 1.750 ;Filament Diameter #2: 1.750 ;Filament Compensation #1: 92.00 ;Filament Compensation #2: 90.00 ;Filament Density #1: 1270.00 ;Filament Density #2: 1270.00 ;Bounding Box: -31.745 45.744 -39.743 22.745 0.000 6.000 ;Model Gap: 0.000
end is
;Print Time: 1934 ;Material#1 Used: 4296.9 ;Material#2 Used: 0.0 ;Material#1 Cost: 1.38 ;Material#2 Cost: 0.00
so not much useful data in the gcode itself
there is the
; LAYER # ; Z: ##.##
comment for each layer, but looks like RRF is ignoring that one
-
@zapta said in layer change detection - ideamaker:
@Danal, does the layer detection of the duet relies the file preamble from the slicer? E.g. this
https://github.com/Duet3D/RepRapFirmware/blob/dev/src/Storage/FileInfoParser.cpp#L538
BTW, theoretically you can have in the timelapse program an additional trigger by z.
Yes, I read the whole thing as:
- It has to find a tag (a comment) that tells it the layer height.
- It scans the last few K of the G-Code for max Z
- It divides to derive total layers
- During the actual print, it also divides to decide what layer is current.
The thing that gets thrown off the most seems to be (2).
And... that's my reading, I could be off in detail. I've looked at it several times and I'm reasonable certain that is how it works... but we all know that code can do things we are looking right at... and not understanding.
-
@Danal said in layer change detection - ideamaker:
- It has to find a tag (a comment) that tells it the layer height.
Weird that most slicers I tried add this comment but idea maker does not. Would be cool that RRF defines some "standard" for comment info that it recommends that slicers that don't already have that can implement, or that a postprocessor can add to a file.
-
@arhi, can you add the expected tags yourself? E.g. with slicer's gcode settings?
-
@zapta that's why I wrote " Would be cool that RRF defines some "standard" for comment" as I could add it to my postprocessing - upload script. I could try to put codes similar to s3d or slic3r .. we'll play with it more, did not even notice it before this timelapse thing
-
Added to start script
; layer_height={layer_height} ; Layer height={layer_height} ; layerHeight,{layer_height} ; layer_thickness_mm={layer_height} ; layerThickness={layer_height}
and now RRF knows about the layer height
hopefully that's enough
-
works!!!
-
@arhi, very nice!