Zmove = 1.5 'amount the tool will move down to hit the probe
Zpos = GetDRO(2)
Tool = GetDRO (24)
ZOffset = .5 'enter height of probe here
I'm trying to set up the Auto Tool Zero button in my Mach 3. I got the VB Script from the Auto Tool Zero thread and use the "Edit Button" from the operator drop down menu just liek the thread says, but get a "Driver Watchdog Triggered" message as soon as I'm done entering the script lines. Dumb question, but once I get all the lines entered, what do I do next; save the file, save the file as something specific, run it, HELP??? I've never used scripts before so I'm a NEWBIE at it!!!!
OldZpos = Zpos
ZPos = Zpos - ZMove
Code "G31 Z" & ZPos & " F20.0"
While IsMoving()
Wend
Zpos = GetVar (2002)
If Zpos = OldZpos - ZMove Then
responce = MsgBox ("ERROR! The tool did not hit the probe and DRO was not set" , 4 , "Probe ERROR!" )
Else
SetDRO (2,ZOffset)
End If
Code "G00 G53 Z-.1"