How to use params in @execute ?

i'm searching and searching, but i found no solution for using params in the @execute command.

In the manual is descrpted "@execute cmd param1 param2" but no following information.
My quesrions are:
- how must i declare the params in the extCommands.xml
- which kind of params can i use ? Only constants, or params like layerno, temperatures ans so on ?


@excecute info [temp]                            ; send actual temperature from hotbed
or another @excecute info2 Layer1           ; send text "Layer1" 

<execute name="info" allowParams="true">/home/pi/  ??????</execute>
<execute name="info1" allowParams="true">/home/pi/  ??????</execute>
echo "Temp:" $1
echo "Layer:" $1 

i hope someone has a solution
thx & cu


  • Just set allowParams="true" as you already do. The params will then be added after a space to the command you have written already. Just remove the ???????. And also consider that commands are executed as user repetierserver and not pi, so that user must have permissions to start script.

    Dynamic variables are not supported. They are copied exactly as written.

    echo as test is a bad test since you do not see that (or not? not usre?). Maybe pipe into a file for testing.

  • Thx,
    now i understand it and it works. It is a pity that dynamic variables are not possible. Is this perhaps already being considered in development so that it will be available with a future update?
    thx and cu
  • Yes, I'm thinking about it. But it also has the penalty of slowing down command sending abit resp. adding more load. Guess it is neglectible since most commands need only a test that no vars are included. But it will not come with next release, there we have some other big changes.
  • Well, I can understand that. Then I immediately come up with another question: Does that mean that the Gcode will not be executed until the command after the @execute has been completed? So a "sleep 5" in the script would delay the execution of the GCodes by 5 seconds.
    thx and cu
  • No, execute commands are run as independent threads. So delay will only the time to call the script, but it will not wait for it to finish.
  • Ok thank you, that ist good to know.
Sign In or Register to comment.