Javascript Support
You can use Javascript (ES5/ES6) to handle advanced requirements.
Javascript need to start with [JS] and end with [/JS]. The Javascript code inside will be interpreted and any result saved on variable called `output` will be repaced with [JS]...[/JS].
Eg.
M116
[JS]
var distance = [[LayerThickness]]-[[ZLiftDistance]]*[[LayerNumber]];
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", "https://www.nanodlp.com/speed-calculation?distance="+distance,false);
xmlHttp.send(null);
output = "G1 Z"+distance+" F"+xmlHttp.responseText;
[/JS]
M117
Result:
M116
G1 Z22.25 F100
M117