Mach3 Zero Probe Tool
Intro: Mach3 Zero Probe Tool
This is a Simple Guide on how to use a Probe Tool in Mach 3 to find the exact top of a material.
You can use an input on your CNC Controller, but if you don’t have free inputs because they are used for Limit Switches like in my case. You can just get another CNC Controller when you have an Additional LPT Port, and if not they are very cheap.
I have attached a LED on my Probe, but it has no function other than a visual indication. So the Resistor and LED it not needed. Just a wire and a Metal block will work as well.
What I used is :
A very CNC Controller from eBay for 12$ (5 Axis CNC Breakout Board For Stepper Driver)
You just need a free Input Port on your Controller.
This VB Source code for the Probing Tool.
'VB Code Start
'-------------------
CurrentFeed = GetOemDRO(818)
DoSpinStop()
ZMove = 20.00 'Total lenght of Probe to move before Stop or no Contact Made.
ZOffset = 1.60 ' Plate Hight
ZSal = ZOffset + 2.00 '+ Free Hight, Will possition the Proble 2 MM over the Material.
StopZmove = 0
If GetOemLed (825)=0 Then
DoOEMButton (1010)
Code "G4 P2.5"
Code "G31 Z-"& ZMove & "F25"
While IsMoving()
Sleep(200)
Wend
Probepos = GetVar(2002)
If Probepos = - ZMove Then
responce = MsgBox ("**ERROR** " , 4 , "Probe **ERROR**" )
Code "G0 Z10"
StopZmove = 1
Code "F" &CurrentFeed
End If
If StopZmove = 0 Then
Code "G0 Z" & Probepos
While IsMoving ()
Sleep (200)
Wend
Call SetDro (2, ZOffset)
Code "G4 P1"
Code "G0 Z" & ZSal
Code "(Z zeroed)"
Code "F" &CurrentFeed
End If
Else
Code "(Check Ground Probe)"
End If
Exit Sub
'-------------------
'VB Code Stop
You can use an input on your CNC Controller, but if you don’t have free inputs because they are used for Limit Switches like in my case. You can just get another CNC Controller when you have an Additional LPT Port, and if not they are very cheap.
I have attached a LED on my Probe, but it has no function other than a visual indication. So the Resistor and LED it not needed. Just a wire and a Metal block will work as well.
What I used is :
A very CNC Controller from eBay for 12$ (5 Axis CNC Breakout Board For Stepper Driver)
You just need a free Input Port on your Controller.
This VB Source code for the Probing Tool.
'VB Code Start
'-------------------
CurrentFeed = GetOemDRO(818)
DoSpinStop()
ZMove = 20.00 'Total lenght of Probe to move before Stop or no Contact Made.
ZOffset = 1.60 ' Plate Hight
ZSal = ZOffset + 2.00 '+ Free Hight, Will possition the Proble 2 MM over the Material.
StopZmove = 0
If GetOemLed (825)=0 Then
DoOEMButton (1010)
Code "G4 P2.5"
Code "G31 Z-"& ZMove & "F25"
While IsMoving()
Sleep(200)
Wend
Probepos = GetVar(2002)
If Probepos = - ZMove Then
responce = MsgBox ("**ERROR** " , 4 , "Probe **ERROR**" )
Code "G0 Z10"
StopZmove = 1
Code "F" &CurrentFeed
End If
If StopZmove = 0 Then
Code "G0 Z" & Probepos
While IsMoving ()
Sleep (200)
Wend
Call SetDro (2, ZOffset)
Code "G4 P1"
Code "G0 Z" & ZSal
Code "(Z zeroed)"
Code "F" &CurrentFeed
End If
Else
Code "(Check Ground Probe)"
End If
Exit Sub
'-------------------
'VB Code Stop
21 Comments
RomanP7 8 years ago
Could you please post the compete schematics including the probe. It is probably just a lack of my education. From what I can see you connected +5v from usb to the ground of the inputs... which i thought was connected to -5v. What am i missing?
sany 2 years ago
sany 2 years ago
Duffy28 3 years ago
horsepower2012 4 years ago
(Actuary I am not good at English well, So do you understand my English?)
KhangL8 6 years ago
Dear Sir.
I have an error "Error on line: 10 - type mismatch! Please help me! :(((
EnricoS20 6 years ago
...yesterdy the script work fine but toady the Z motor don't go down
SedinM 6 years ago
hvala
KevinK136 6 years ago
When I try to run the script I get check ground probe and nothing else. It worked fine yesterday. Any ideas on what could be going wrong?
samcxpro 7 years ago
thanks for this
bumpshoveit 7 years ago
Hi kiark ! I get the same issue ! It append often in a middle of job when i
have a tool change. But at the beginning everything work fine !
My solution was to delete (or comment with ' ) line : Code "G0 Z" & ZSal
(from the bottom)
But with this your drill will stay blocked on your probe until you move it up with your keyboard.
So add this line under the one you commented : Code "G0 Z5"
With this line added your drill go up to 5 units !
NB : I'm aware that answer a 1 year old question is strange but this could help anyone else.
pollynorsk 8 years ago
Thank you, this is brilliant and so easy to do.
GygC 8 years ago
Muchas gracias!!!!
Stargaze 8 years ago
hi.
Thanks for the nice tutorial..pls be kind enough to tell how to connect two breakout boards to mach3 using 2 lpt .. Won't it get confused since the PIN numbers are the same..
I am new to cnc and sport about my bad English
Thanks
ZsoltB3 8 years ago
You can enable the second port in the 'Ports&Pins' configuration menu. Then on the Input Signals page you can set for each input pin which port to use (1 or 2 in your case).
pistib 8 years ago
good ,working
xaverius 8 years ago
good jobs, thanks for script. so may i know about driver mach 3 ?
kiark 9 years ago
Thanks for the script, everything works fine, but when the drill touches the probe the Z-Axis moves down (into the probe) before it moves back up... i fortunately tried it all holding the probe in my hand ;)
diystuffandfun 9 years ago
Thanks for the script, very helpful.
suli25an 10 years ago
Thank you for this good explanation, but even more, how to connect, Mach3 Zero Probe Tool, in the control box.