I have been successful at loading Tweakie's script for auto tool height setting; and also turned it into a macro so it can be called from within a program. Turning it into a macro was easy, I just copied the button script and saved it as "M900.m1s" in the macro folder.
However, I have now hit a strange problem which I wonder if anyone can help with?
I have added a feature to the macro that inserts an extra probing pass. So, first it lowers the tool at a reasonably high speed (100mm/min for example) until the probe triggers; then raises the tool by .25mm; then lowers it at a slow speed (20mm/min) until it again triggers. This I did because I found, as have others, that the accuracy of setting seems to depend on speed, presumably because of delays between the probe signal being asserted and the software actually seeing it. This works very well as a macro, being quicker to reach a more accurate setting from a higher starting position which is desirable if you are changing a tool.
However, copying the modified macro back into the button script doesn't work! When I press the button, the tool lowers to the probe as before, but when it reaches it it stops, then after a few seconds starts to randomly and very slightly "jiggle" up and down, whilst the following message appears in the status window:
"Probe Ignore, activated at call for probe"
I'm baffled, can anyone help please?
A subsidiary question: having written a macro, is it not possible to just call it from within the button script? It isn't obvious why not, since for example the original script contained various calls to built-in macros (for spindle stop for example).
TIA,
John.