Thanks so much for the help, TPS. You will probably have some great suggestions, can you comment on the following? (helpful suggestions from anyone are welcome!)
This is a little use-case document I threw together to think through what I'm trying to do:
Set toolheight use cases -
Use case:
User hits Auto Tool Zero button in Mach-3 GUI
Assumptions:
* Machine is stopped & user has or wants to change tool
* User wants to zero Z at an arbitrary location
* Tool change will manually initiate jogged on top of GaugeBlock to prevent probe crashes
Steps:
* If tool is not currently touching, display message and wait for touching=yes
1) change tool if necessary 2) place TouchPlate & GaugeBlock on TouchPlate
3) ground tool 4) jog tool to just touch TouchPlate
* Now assume tool has been jogged down to touch GaugeBlock resting on TouchPlate
* Display request to remove GaugeBlock message and wait for touching=no for safe interval
* Issue warning beep
* Wait for safety interval
* Move (optional rapid?) down to just above TouchPlate (GaugeBlock - clearance)
* Begin Automated probing use case
Use case:
Script executes Tn M6 gcode tool change request
Assumptions:
* Minimize assumptions in this case
* Toolchange location (xyz) are properly set in Mach-3
Steps:
* Rapid move tool up to safe-z (if set) or z=0 position (if no safe-z)
* Rapid move tool to toolchange.x, toolchange.y position
* Message user indicating tool change request with instructions to:
1) change tool 2) ground tool 3) place TouchPlate (no GaugeBlock)
* Wait for user to change tool and request continue (click or M0 stop?)
* Issue warning beep, wait a short interval
* Rapid move tool down to toolchange.z position
* Begin Automated probing use case
Use case:
Automated probing (& set tool z=0)
Assumptions:
* Tool is changed
* Tool is reliably (offset distance) above touchplate in correct tool change position
* Tool grouned, everything is checked and ready to go
Steps:
* Store current & reset all operating assumptions
* Reduce feedrate
* G31 probe to TouchPlate, limiting Z travel to prevent crashes
* Detect and safely exit on abort (e-stop, etc)
* If probe is not successful, abort.
* If probe is successful, touch again (optional)
* Set true z=0, ofsetting by TouchPlate thickness
* return tool to safe-z height
* restore all operating assumptions (as in all cases)
Notes:
* All messages issue a corresponding sound
* All waits timeout and exit
* All exits return the machine to prior state
* All moves are as safe as possible
* All moves can detect abort requests and exit