I, too, am trying to get ChangeAtZ (currently 5.1.1) to change speed at a specific layer for one layer. Finding out that the gcode layer numbering is zero-based while the layer view in Cura is one-based was mind blowing! I read through the github code and see it was originally TweakAtZ. After so many updates, bug fixes, name change, supported Cura changes, no one thought to have the plugin automatically subtract 1 from each layer. Thank you for the clarification gr5.
While looking through my saved gcode, the M220 commands are almost at the end of each layer. Aren't the commands read from the file sequentially? If so, wouldn't the speed change happen right at the end of the layer instead of the beginning? Or does the gcode get read in layer by layer, analyzed by the machine, and then executed sequentially?
Here, you can see the ChangeAtZ M220 command, setting the speed to 20% just before the start of layer 22. Each layer takes approximately 1-1/2 minutes to complete, so there are plenty of head movement commands before those M220s are found.
;ChangeAtZ V5.1.1: executed at Layer 21
M117 Printing... ch@L 21
M220 S20.000000
G0 F18000 X46.393 Y137.572
G0 X46.166 Y141.396
G0 X46.037 Y145.207
G0 X46.002 Y149.016
G0 X46.064 Y152.826
G0 X46.22 Y156.616
G0 X46.47 Y160.419
G0 X46.816 Y164.215
G0 X47.261 Y168.032
G0 X47.966 Y170.22
G0 X48.903 Y171.554
G0 X50.149 Y172.617
G0 X61.29 Y177.478
G0 X64.765 Y185.875
G0 X64.721 Y187.866
G0 X64.976 Y189.419
G0 X65.624 Y190.91
G0 X66.619 Y192.189
G0 X67.909 Y193.19
G0 X159.666 Y194.545
;TIME_ELAPSED:2658.809868
;LAYER:22
Recommended Posts
Erik_Es 3
OK thanks gr5. I was expecting it to be like that. So I will use layer number (which is much easier in most cases) and keep in mind to subtract 1 from the layer shown in the layer view.
Thought it would be good to get this clear, as it will be helpful as well to other people using this plugin and not getting why changes happen one layer later than expected.
BTW: I understand gcode reasonably well, but I try to avoid fiddling around in it myself. I'm quite wary of introducing errors that might cause damage to my printers...
If you would be so kind to check another topic I started, called "plugins not saved", that would be most helpful. Although I like 3.6 very much so far, it seems such a pity that these useful plugins can not be saved/loaded as part of the profile anymore. Hopefully this can be put right in Cura 4 ?
Edited by Erik_EsLink to post
Share on other sites