Using int() in 'Before layer change G-code ?
 
Notifications
Clear all

Using int() in 'Before layer change G-code ?  

  RSS
tcalp
(@tcalp)
New Member
Using int() in 'Before layer change G-code ?

I'm trying to use the following gcode in 'Before Layer Change' Printer Settings, but when I slice it will error out, but only when I have the int() function present, is there a reason why this would be ?

 

{if layer_z>1}M104 S{int(layer_z/11*5 + 180)} {endif};

Posted : 28/04/2020 11:57 pm
Area51
(@area51)
RE: Using int() in 'Before layer change G-code ?

That is because the function int() is not defined in Conditional G-Codes

The interpreter is not full C language style but a limited subset.

Have a look at my models on Printables.com 😉

Posted : 30/04/2020 12:03 pm
bobstro liked
Share: