gcode syntiax for a command M117 LAYER [layer_num] Z [layer_z] plus 1
 
Notifications
Clear all

gcode syntiax for a command M117 LAYER [layer_num] Z [layer_z] plus 1  

  RSS
marcottt
(@marcottt)
Trusted Member
gcode syntiax for a command M117 LAYER [layer_num] Z [layer_z] plus 1

Hi all, 

i'm again with this problem, i use the command M117 LAYER [layer_num] Z [layer_z] in tha "after layer change GCODE" and it work but the layer is wrong, for example, when printing layer 2, on a 0.3 print,  the line is LAYER 1 Z 0.6

There is a way to add a 1 to the layer number ? i tried

M117 LAYER [layer_num+1] Z [layer_z] but tell error on gcode creating 

M117 LAYER ([layer_num]+1)  Z [layer_z] as above  and other test.  

There is some way to have correct layer number ?

thanks

Best Answer by Neophyl:

If you use the correct brackets you wont get errors when creating gcode

M117 LAYER {layer_num+1}  < note the type of brackets used.
displays as the correct numbered layer on my printer.  I generated a simple 9 layer print to test it and on the first layer it displayed "LAYER 1" and on the last layer it was showing "LAYER 9"

 

Posted : 26/12/2019 9:39 pm
Neophyl
(@neophyl)
Illustrious Member
RE: gcode syntiax for a command M117 LAYER [layer_num] Z [layer_z] plus 1

If you use the correct brackets you wont get errors when creating gcode

M117 LAYER {layer_num+1}  < note the type of brackets used.
displays as the correct numbered layer on my printer.  I generated a simple 9 layer print to test it and on the first layer it displayed "LAYER 1" and on the last layer it was showing "LAYER 9"

 

Posted : 26/12/2019 11:21 pm
marcottt
(@marcottt)
Trusted Member
Topic starter answered:
RE: gcode syntiax for a command M117 LAYER [layer_num] Z [layer_z] plus 1

now it works, thanks.

i do not know about {} 

Posted : 27/12/2019 6:55 am
Sembazuru
(@sembazuru)
Prominent Member
RE: gcode syntiax for a command M117 LAYER [layer_num] Z [layer_z] plus 1

You may want to move your gcode to "before layer change". I think these two fields are named confusingly. From what I can tell, the "after layer change" is actually "after printing the current layer but before changing to the next layer", and conversely the "before layer change" seems to be "after changing to the next layer but before printing on the new layer".

Or, my interpretation is wrong... 😉 I guess some experimentation should be done with a simple object using identifiable tags in both the before and after layer change gcode and then looking at the resulting code to see what the result is. I'm just too lazy to do this at the moment. 🙃 

See my (limited) designs on:
Printables - https://www.printables.com/@Sembazuru
Thingiverse - https://www.thingiverse.com/Sembazuru/designs

Posted : 28/12/2019 5:05 am
marcottt
(@marcottt)
Trusted Member
Topic starter answered:
RE: gcode syntiax for a command M117 LAYER [layer_num] Z [layer_z] plus 1

i'll try. because i have still some problem. Now (m117+1 in "before" section) the layer is correct, start with 1 and same level as preview. 
But sometimes i have a strange issue, i have different layer height value between preview and display printed. 

for example:

M117 LAYER 1 Z 0.375

M117 LAYER 2 Z 0.675

M117 LAYER 3 Z 0.975

 

but in preview i see:

why ?

 

Posted : 29/12/2019 1:28 pm
marcottt
(@marcottt)
Trusted Member
Topic starter answered:
RE: gcode syntiax for a command M117 LAYER [layer_num] Z [layer_z] plus 1

@sembazuru

i tried. no change value are the same (before was simple. after was+1), between there is only a single  row

 

This post was modified 4 years ago by marcottt
Posted : 29/12/2019 1:31 pm
Share: