How to use params in @execute ?
Sorry,
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 ?
e.g
gcode
@excecute info [temp] ; send actual temperature from hotbed
or another @excecute info2 Layer1 ; send text "Layer1"
extCommands:
<execute name="info" allowParams="true">/home/pi/info.sh ??????</execute>
<execute name="info1" allowParams="true">/home/pi/info.sh ??????</execute>
info.sh
echo "Temp:" $1
info1.sh
echo "Layer:" $1
i hope someone has a solution
thx & cu
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 ?
e.g
gcode
@excecute info [temp] ; send actual temperature from hotbed
or another @excecute info2 Layer1 ; send text "Layer1"
extCommands:
<execute name="info" allowParams="true">/home/pi/info.sh ??????</execute>
<execute name="info1" allowParams="true">/home/pi/info.sh ??????</execute>
info.sh
echo "Temp:" $1
info1.sh
echo "Layer:" $1
i hope someone has a solution
thx & cu
Comments
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.
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
thx and cu