show layer number and height but wrong
Hi all, i use this command:
M117 LAYER [layer_num] Z [layer_z]
in "After layer change gcode" in printer setting -> custom gcode
and it work but print wrong layer, it print the layer before.
How i can have layer and height at display in real time ?
thanks
RE: show layer number and height but wrong
I dont think slicer uses the square brackets does it ? I thought it used "{}" rather than "[]" ?
Isn't the issue that for computers the numbering starts at zero but for us flesh bags we start at 1 ?
Anyway if the count is out by one why not add that to your gcode ?
{layer_z+1} ?
RE: show layer number and height but wrong
It's a jumble. If you just want a fixed value, you use the square brackets:
M140 S[first_layer_bed_temperature] ; set target bed temp
If you're doing any sort of comparison in the slicer logic, you use the curly braces:
M140 S{max(first_layer_bed_temperature[0],75)} ; set bed PINDA warmup temp
Slic3r/PrusaSlicer is a bit ugly that way.
OP needs to be aware that [layer_num] and [layer_z] are not the same thing. [layer_z] is the current height of the nozzle in mm. [layer_num] is the layer currently being printed. Not sure if that's the issue, but mixing them up will definitely yield unexpected results. Not that I ever did this, mind you.
and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan
RE: show layer number and height but wrong
I want to thank both of you for the kind answers, but I did not understand if there is a solution.
For layers I can do [layer_z+1] but for heights how could I do?
The system works (I have screen readings) but there is this anomaly that I don't understand. Anyone else di this in any way ? is useful sometimes...
RE: show layer number and height but wrong
Hi all, i use this command:
M117 LAYER [layer_num] Z [layer_z]in "After layer change gcode" in printer setting -> custom gcode
and it work but print wrong layer, it print the layer before.
How i can have layer and height at display in real time ?thanks
Have you tried putting your M117 message in the "Before layer change G-code"? That is usually where I put my layer dependent code (pauses for inserting objects, temperature towers, etc).
See my (limited) designs on:
Printables - https://www.printables.com/@Sembazuru
Thingiverse - https://www.thingiverse.com/Sembazuru/designs
RE: show layer number and height but wrong
no. in my mind is wrong but i'll try.
RE: show layer number and height but wrong
[...] For layers I can do [layer_z+1] but for heights how could I do?
Just remember that layer heights are going to be the number of printed layers * (layer height -1) plus your 1st layer height. Be sure to use >= or <= in comparisons unless you're certain the current layer height will match exactly.
and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan
RE: show layer number and height but wrong
not true, layer height is not layer*(layer height), i don't need this info because wrong. Layer height depend from previous layer which can be differente height, 1st layer is different also support layer are different. I like to have REAL layer height and is not so difficult (first line on each layer tell it) but not find a good way to have. In cura is very simple to have .
RE: show layer number and height but wrong
i think to have found the issue: the preview did not calculate the use the z-offset value, my bed is a little (-0.25) offset but is in plane so i did not change it for now and use the z-offset value, but the preview di non calculate it so i have different value from preview to real world...