Solved Layer change detection job.layer
-
Hi,
I have been editing daemon.g to save several values during printing in a .csv file.
I have managed to get it to work correctly and it saves them according to the time I set with the G4 command.
What I want to do now is to save the variables once per layer. I have been testing with the object "job.layer" but I have not been able to do it.
Could you give me a solution?
I have thought to create a macro that is executed in each layer change calling it from the laminator, but I would like more to execute it from daemon.gThanks
-
All of the slicers I have used have a place to put user code to be called on layer changes.
This is a screen shot from Prusa showing where the code can go:
Frederick
-
@amimafe the job.layer value should work provided that the GCode file has layer number comments within it. This is a configurable option in some slicers. However, some slicers use variable layer height and in this case the concept of layer number rather breaks down.
-
Hi @fcwilt ,
Yes, that's the other option I had thought of, but I preferred to do it by daemon.g and if a third party manages the machine, everything is integrated with the firmware.
Thank you.
-
Hi @dc42 ,
I read the postRe: Job.Layer not working anymore with 3.3rc2 and wanted to do something similar. Execute a command at each layer change. Entering the layer change comment with the laminator would not be a problem.
Is there still an option? I tried to do it with creating a variable and assigning it the job.layer value to compare with its current values but it doesn't work.
The idea was to make everything more compact with the duet firmware.Thanks again
-
@amimafe said in Layer change detection job.layer:
Yes, that's the other option I had thought of, but I preferred to do it by daemon.g and if a third party manages the machine, everything is integrated with the firmware.
Thank you.
Understood - but the slicer knows what is going on. How would the firmware identify a layer change?
Frederick
-
The slicers we use add a comment on the layer changes that DUET2 recognizes.
-
-
undefined amimafe marked this topic as a question
-
undefined amimafe has marked this topic as solved