Object Model for Previous Layer Time
-
I have a e3d motion system and I want to write a daemon to try and guess when to warmup the next tool. So this has several factors I need to solve.
- I need to know the next_extruder id, maybe I can somehow get this from PrusaSlicer, and set some variable which the Duet will know about?
- I need a daemon or some way of getting the previous layer layer time, as these will generally be similar always, and then I just basically want to start warmup for next_tool when that layer time is coming to a close.
- I also need to know how long the current and previous tool has been used for this probably.
Is this at all possible or am I being crazy? I think we might need a tweak to store the layer-time for each layer in the model?
/Kegan
-
@marzubus RRF doesn't attempt to track layers, because the whole concept of layers is problematic now that some slicers support variable layer height. DWC does still track layers, so it might be possible to add a previous layer time variable when in SBC mode.
Some slicers already provide a facility to start heating tools some time before a tool change is due to happen.
-
@dc42 the problem I have is that the estimated time is thrown way off when using PA with 800mm bowdens. Or does Simplify3D cater to that? I have been using PrusaSlicer for ages, but wonder if I should dust off my Simplify3D install.
/K
-
@marzubus one effect of using large amounts of PA is that in printing moves the extruder acceleration is limited to the configured extruder jerk divided by the configured PA. So to get more accurate timing from PrusaSlicer you can do one of the following:
- Increase extruder jerk in M566. This will speed up printing but could result in skipped extruder steps.
- Reduce extruder acceleration in PrusaSlicer.
- Reduce printing acceleration in PrusaSlicer. If you get it right, this will match the reduced acceleration that is already happening because of PA.
-
@dc42 I have increased my extrusion acceleration as far as I can, but its titans, and they are slow to wind up, so I think I will try replace them with Hemera's instead.
In PrusaSlicer, only the max feed rates seem to affect the print time estimations, No difference with accel, or jerk.
-
@marzubus said in Object Model for Previous Layer Time:
@dc42 I have increased my extrusion acceleration as far as I can, but its titans, and they are slow to wind up, so I think I will try replace them with Hemera's instead.
It's not the extruder acceleration that's limiting here, it's extruder jerk.
In PrusaSlicer, only the max feed rates seem to affect the print time estimations, No difference with accel, or jerk.
Check your settings in PrusaSlicer. It has an explicit option to use the machine acceleration etc. settings for time estimation but not to write them to the GCode file.
-
@dc42 Yes I mean jerk no acceleration, sorry. Its at the max I can go without it grinding apart.
I see if I set it all the way down to the single digits for jerk and acceleration, it has some affect on the time, but the complication is that I have both Hemera direct and bowdens in my setup, so a job that uses a hemera or a bowden more will be very innacurate if I want to get the timing right down to a couple of seconds.
Even if I average the accel, jerk and max feed rates, the prusaslicer acceleration data is going to be just too inaccurate to be of any real value. Hence why I am looking for a way to keep track of current tool and previous tool usage times, and current and previous one layer time so I can pre-empt and calculate when I need to warm up a tool. It obviously wont work for every layer, but at least it should help a lot.
A long print might spend hours in warm-up time, and almost just as much in print time. I use a zero-purge setup so the tools need to be cooled to exact temperatures to prevent the need to prime.
I will see if this is something I can proof of concept using a daemon.g, and some variables created for keeping track of these values.
-
@dc42 I get errors trying to access the layers array in the job, not sure if im doing this wrong. I am simulating a print, pausing it, then trying to query things.
echo job.layer
24echo job.layers[job.layer-1].duration
Error: line 28 column 12: meta command: unknown value 'layers^.duration'echo job.layers[2].duration
Error: line 37 column 6: meta command: unknown value 'layers^.duration'Is there something restricting me accessing the nested array/object?
-
@marzubus As David said, RRF does not track layer data - DSF and DWC do. So your statement is probably possible in SBC mode but not in standalone mode.
-
@chrishamm @dc42 im confused, the data is in the model I can see in the webui. I can access heaters, and all sorts of other elements in the tree, but not the layers? They are shown in the UI, so I am confused why just those cannot be accessed.
-
-
@chrishamm Ah ok thanks, Yeah I did not understand the lingo before. thanks anyway. I will see if I can work around this limitation then somehow.