Dialog Tutorial
I've been using the Quick Commands and so long as I put the complete GCODE along with the associated @dialogButton it works just fine. However if I try to call a defined "replacement" that contains both a dialog and GCODE (GCODE is the first lines of the replacement) the dialog in the replacement never gets executed.
I put in the example for "levelling" on https://www.repetier-server.com/dialog-tutorial/ just to see if any of the dialogs would work and I couldn't get any of them to show. So from the quick command I got the G28 but from that point the logic never continued on to level1.
Is there some special syntax required because it certainly doesn't like the ^level1$ styled routine tags. Just use level1 at least gets something to partially work.
My goal is to have have a filament loading and unloading, with looped selectable purging and then exit. I have the load and unload working but thats it.
Mel
I put in the example for "levelling" on https://www.repetier-server.com/dialog-tutorial/ just to see if any of the dialogs would work and I couldn't get any of them to show. So from the quick command I got the G28 but from that point the logic never continued on to level1.
Is there some special syntax required because it certainly doesn't like the ^level1$ styled routine tags. Just use level1 at least gets something to partially work.
My goal is to have have a filament loading and unloading, with looped selectable purging and then exit. I have the load and unload working but thats it.
Mel
Comments
We got a new way to define functions by our new Language starting with version 1.2.0
you don't have to define replacements anymoe if you want to trigger a function.
What you want is a script like like this:
This script does give you plenty of options to level your Bed correctly.
Thank you for reminding us to update our tutorial, we will add this code with some explanation soon to our docs.
Going to take me a bit to wade through all that syntax...
I assume you're getting a lot of those variables from the items configuration that have been defined.
Hence I assume there's a master list of those someplace?
So something that references config.bed_radius, "config." points to the current printer configuration and "bed_radius" is the variable within that configuration...?
However, since I don't see a global defined anywhere, where exactly is "perm.manBedLevOffset" getting the data from?
Lastly once the subroutine "@func MBLDelta" is started, am I safe to assume it will stay in that function until the "Finished" option is selected? So I could select TowerA, TowerC, TowerA, TowerB and keep going between the towers until I selected the "Finished" option?
Sorry for all the questions, just trying to wrap my head around the concept...
Mel
Hello,
"Hence I assume there's a master list of those someplace?"
Yes, you can find all available instructions, variable typs and functions in the manual.
"So something that references config.bed_radius, "config." points to the current printer configuration and "bed_radius" is the variable within that configuration...?"
Yes. config variables are values from the current printer configuration in the server. You can find a list in the manual.
"However, since I don't see a global defined anywhere, where exactly is "perm.manBedLevOffset" getting the data from?"
The first time this variable will show up in the code is in the line :
@dialogInputDouble "Measure Z at [mm]" perm.manBedLevZoffset default({{get("perm","manBedLevZoffset","0")}}) min(0) max({{config.move_z_max}})
Dialog components will define a variable if its not defined jet.
Lastly once the subroutine "@func MBLDelta" is started, am I safe to assume it will stay in that function until the "Finished" option is selected? So I could select TowerA, TowerC, TowerA, TowerB and keep going between the towers until I selected the "Finished" option?
Yes, this is a recursive call and the Finished Button is for determination.
Mel