You are not logged in.
Pages: 1
Hello, I have the following GCode inside before each layer:
G90
G1 Z{([[CurrentPosition]] + [[LayerThickness]])*([[LayerNumber]] > 1)} F[[ZSpeed]]
[[WaitForDoneMessage]]
M114
[[Delay {((( ([[LayerNumber]] >= 2) * ([[LayerNumber]] <= 2)) * 5)+
(( ([[LayerNumber]] >= 3) * ([[LayerNumber]] <= 3)) *4)+
(( ([[LayerNumber]] >= 4) * ([[LayerNumber]] <= 9)) * 3)+
(( ([[LayerNumber]] >= 10) * ([[LayerNumber]] <= 20)) * 2)+
(( ([[LayerNumber]] >= 21) * ([[LayerNumber]] <= 50)) * 1)+
(( ([[LayerNumber]] >= 51) * ([[LayerNumber]] <= 80)) *0)+
(( ([[LayerNumber]] > 80) * 0))}]]
And I'm getting echo:Unknown command: "[[Delay 4.0000]] in terminal.
I tried executing the delay command manually in the terminal and it worked fine. But executing [[Delay {4}]] in the terminal doesn't work
Is it a bug or am I doing something wrong?
Offline
Could you share screenshot of the mentioned error?
Offline
Hello Shahin,
Here's a screenshot of the error:
I have assumed that the error is caused by the zeroes followed by the number, but executing the command manually from the terminal functions properly
Offline
Do you paste exact gcode or evaluated one on terminal?
Offline
I have done both, one where I have literally written the following
[[Delay 10.0000]]
M114
Where I had to wait for 10 seconds for M114 to be executed.
and the other test I have done was executing
[[Delay {10}]]
M114
Where the delay was neglected.
Excuse my random assumption, but might it be that the number returned from between the braces "{}" is of type long and the numbers I literally type are of type float? Where this might be the issue.
Last edited by Rocky (2018-12-04 14:56:46)
Offline
I cannot reproduce the issue. Please, make sure you are on the latest beta vesion. And see if the issue still persists.
Offline
You're right! It worked on the new beta version 1928.
The issue was occuring on version 1919
I have also executed
tail -f /var/log/printer.log
and found that the error was: 2018/12/05 09:54:24.127629 {"Layer":"1","module":"Gcode","level":"Error","msg":"Delay Value Problem strconv.ParseFloat: parsing '{0.05}': invalid syntax"}
which no longer exists.
Thanks for the help!
Last edited by Rocky (2018-12-05 11:02:59)
Offline
Hello Shahin,
I just want to clarify that this worked for me on the newer version while executing manually in the terminal and not from the "AfterEachLayer" GCode
Offline
Pages: 1