Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Gerber Baby on April 23, 2015, 07:14:37 PM

Title: Probing with G31
Post by: Gerber Baby on April 23, 2015, 07:14:37 PM
Hey guys.  I'm having real trouble with probing. 

I'm using the simulator, and I have the probe input mapped to the ~ key.  The LED lights beside "Probe" in the Machine Diagnostics tab when I push it.  I am also able to write a short script using ISIG_PROBE which also returns true/false properly. 

When I enter "G90 G01 G31 Z-4 F15" in the MDI panel or a lua script, it simply moves to Z-4 without stopping when I press the probe button.  The probe LED is lighting properly during the move, and if I hold down the probe button before executing the Gcode, I get an error that says "Probing signal active!  Cannot Continue!"

Why won't G31 stop my Z axis?

I'm not sure where I am going wrong.  I am new to both G Code and Mach 4, but have experience with programming in general.

Thanks in advance!
Title: Re: Probing with G31
Post by: ger21 on April 23, 2015, 07:30:33 PM
It could be that the simulator plugin doesn't support probing.

If you try to do the same thing in Mach3 without the parallel port driver, it won't work there either.
Title: Re: Probing with G31
Post by: Gerber Baby on April 23, 2015, 07:52:58 PM
Ok, I'll stop going crazy then and build a small interface.  Thanks!
Title: Re: Probing with G31
Post by: ger21 on April 23, 2015, 07:54:52 PM
Does it do the same thing if you type this:

G90 G31 Z-4 F15
Title: Re: Probing with G31
Post by: dude1 on April 23, 2015, 09:21:01 PM
you can use a macro b to do probeing

Code: [Select]
G49 (Cancel TLO)

G58 (Switch to work offset G58)

G0 X0 Y0 (move the tool over the toolsetter)

G31 Z-10 F150 (probe tool down till it touches the toolsetter)

G10 L1 P1 Z#2002 (set the tool length offset value to the G58 Z position where the probe tripped)

G0 Z5 (move up to safe distance)

G54 (reapply old work offset coordinate system)

G43 H1 (apply new TLO for tool 1)

I have run it 10 times in a row and it worked fine for me.

use it at your own risk

a lua code would be better but I cant get it to work hopefully brain will relies a tool high lua code