Dockable Probe Configurator Macro
-
@OwenD Thanks. It seems though that this was somehow auto-formated already. They all look like you said. Once you copy it here it changes the format?!
-
Reconfigured the probe now - seems it was wrong somehow.
Now I get:
M292 Error: in file macro line 270 column 7: meta command: expected string expression
-
@izeman
The first warning is a it says.
Review Klicky.g with a text editor set to show spaces and tabs.
You can see tabs before the M564 and spaces everywhere else
The second error is in a much bigger file.
Either your print file, or maybe daemon.g
Shouldn't be many files longer than 270 lines.
It'll be something like an echo or other command that doesn't have a quoted string after it. -
@OwenD I will check the file with another editor. Thanks!
But for the error in macro line 270: There is no daemon.g anywhere on the SD-card, and I'm not printing anything. I'm just calling the macro to generate deployprobe.g and retractprobe.g.
This must be some internal file that's called?!Got all the tabs removed now, and RRF doesn't complain anymore. Now everything runs fine, and in the end it throws this error:
M292 Error: in file macro line 490 column 7: meta command: expected string expression
Same error, different location ... If I knew where to search for it ...
-
@izeman
I'm guessing the version of RRF and/or DWC you're using is miscounting the line feeds or carriage returns that your editor is using.I think the actual error is caused because there were spaces in the file between "echo >" and the filename
echo > {var.deployFile} "; The deploy command for Z when using a dockable probe" ; Let's create the probe loading code file for dockable probes echo >> {var.deployFile} "if sensors.probes[0].value[0] != 0"
Should be
echo >{var.deployFile} "; The deploy command for Z when using a dockable probe" ; Let's create the probe loading code file for dockable probes echo >>{var.deployFile} "if sensors.probes[0].value[0] != 0"
See the documentation here
There must be no spaces between the > or >> symbol and <filename>. The default folder for the file is /sys.Try the attached file without editing it.
Rename it to whatever you wish
klicky_setup.g -
@OwenD Thanks for your tremendous effort, but the problem still exists.
-
I now just went to the code, and I guess I could see what it's meant to do, and basically it's not needed to be run as a macro. I can just determine the positions per hand, and then c&p the to be generated code (the last two blocks) into the .g files. I will try that.
-
Just in case someone else is looking for a deployprobe.g and retractprobe.g for a klicky probe, and got the same issues as I got. Just use the tool to determine the values, or do it manually, and c&p it into those two files:
; The deploy command for Z when using a dockable probe" ; Let's create the probe loading code file for dockable probes if sensors.probes[0].value[0] != 0 var originX = {move.axes[0].userPosition} ; Store the X position before grabbing the probe. var originY = {move.axes[1].userPosition} ; Store the Y position before grabbing the probe. G1 X238.6 Y55 F999999 ; Move tool in front of dock G1 X238.6 Y25 F999999 ; Move tool in position where probe is mounted G1 X238.6 Y55 F999999 ; Move tool in front of dock if var.originX > 238.6 || var.originY > 55 ; Move the toolhead back to the position we came from G1 X{var.originX} Y{var.originY} F999999 M400 if sensors.probes[0].value[0] != 0 abort ""Error probe not attached - aborting""
; The retract command for Z when using a dockable probe ; Let's create the docking code file for dockable probes if sensors.probes[0].value[0] != 1000 G90 G1 X238.6 Y55 F999999 ; Move tool in front of dock M400 G1 X238.6 Y25 F999999 ; Move tool in position where probe is mounted G1 X188.6 Y25 F999999 ; Move tool to detach probe G1 X238.6 Y55 F999999 ; Move tool in front of dock M400 if sensors.probes[0].value[0] != 1000 abort ""Error probe not docked - aborting""
-
@izeman
I'm afraid that error is my fault. (control character in string)
In my haste, I did a search and replace to change all the spaces to tabs to fix the first error you were having.
I did not notice that it also put tabs in the echo command (which must have only spaces)
I do not have a klicky probe, so cannot fully test this, but I have tested everything except checking the probe status and it should now work as the OP intended.
Amended file attached
klicky_setup.gBTW, you also appear to have some errors in config.g
You should runM98 P"config.g"
and investigate -
@OwenD WORKS GREAT now!! Thanks a lot!!!
-