Hello Guest it is December 11, 2019, 03:09:45 AM

Author Topic: Verified Auto Tool Zero for Ver .032, SmoothStepper, G540  (Read 3728 times)

0 Members and 1 Guest are viewing this topic.

Verified Auto Tool Zero for Ver .032, SmoothStepper, G540
« on: November 23, 2009, 04:32:30 PM »
I've been harping about the "lack" of a usable Auto Tool Zero for the newer versions of Mach 3 for some time now.  I'm thinking I'm the only one who was having issues!!!  HEHE Well, I finally found a VB script that works. Three notes on setting this up: 1) Add your Z plate/probe height to the distance you want to retract and enter that value in the "Change the Z retract heght here..." line; 2) This works with the standard Mach screen - I don't know if it will work with other screens; 3) input signal High/Low for the probe input must be correct or you won't get past the "Z plate is grounded" message

CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness =2.040

If GetOemLed (825)=0 Then
DoOEMButton (1010)
Code "G4 P3" 'Time to get to the z-plate, 3 seconds
Code "G90 G31 Z-2 F4" ' probing move, can set the feed rate here as well as how far to move
While IsMoving()
Wend
ZProbePos = GetVar(2002)
Code "G1 Z" &ZProbePos
While IsMoving ()
Wend
Call SetDro (2, PlateThickness)
Sleep(120)
Code "G0 Z2.785" 'Change the Z retract height here to what you want, must be higher than touch plate
Code "(Z axis is now zeroed)"
Code "F" &CurrentFeed 'returns to prior feedrate
Else
Code "(Z-Plate is grounded, check connection and try again)"
End If
Exit Sub