Hello Guest it is March 28, 2024, 08:59:27 AM

Author Topic: G31 probing - can Z travel be limited  (Read 4975 times)

0 Members and 1 Guest are viewing this topic.

G31 probing - can Z travel be limited
« on: February 01, 2017, 05:26:19 PM »
Is there a way to limit the Z travel when G31 probing with the Z axis.
I have tried:-
positive Z position as the end point
negative Z position as the endpoint
Z=zero as the end point
but if the probe does not hit, the axis just keeps going and going and going.
Hopefully there is a parameter somewhere to set this up.
Thank you

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: G31 probing - can Z travel be limited
« Reply #1 on: February 02, 2017, 01:58:56 AM »
I use a move such as...

DoOemButton (1010)
Code “G90 G31 Z -20 F”

using mm units this will stop my Z axis after -20 mm of travel if Probe has not been detected (remembering to reset Moves to Incremental (G91) if necessary).

Tweakie.

« Last Edit: February 02, 2017, 03:04:39 AM by Tweakie.CNC »
PEACE
Re: G31 probing - can Z travel be limited
« Reply #2 on: February 02, 2017, 05:03:54 AM »
Thanks
Can I avoid using a macro and just use Gcode.

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: G31 probing - can Z travel be limited
« Reply #3 on: February 02, 2017, 05:44:30 AM »
No, I don't think you can.
Because the axis decelerates to a stop after the touching point it overruns and the exact point of touch is obtained from reading Var(2002) and I am not aware of any way to do this within Gcode - thus the use of a macro.

Tweakie.
PEACE

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: G31 probing - can Z travel be limited
« Reply #4 on: February 02, 2017, 07:22:04 AM »
Quote
but if the probe does not hit, the axis just keeps going and going and going.

You should ALWAYS confirm that the probe works before probing.In my screen
an LED confirms it's working. YOu could also add some scritpting to a macro
to get a message.

Attached file from my lathe screen write up should be read for understanding the overtravel when probing.

In addition to Tweakie's reply, it not only about the probing value, but what you want to do with it and the actions you want to do after probing.
A macro, that you write to suite your needs and how you want it all to work, accomplishes the task.

My preference in probing is to move close to the reference surface and just probe at at a slow feedrate. When setting tools i find the repaeatability and accuracy to with +- 0.0002" and at the slow probe rate their is no damage to the carbide probe that i use or the surface being probed.

 

RICH
« Last Edit: February 02, 2017, 07:23:54 AM by RICH »
Re: G31 probing - can Z travel be limited
« Reply #5 on: February 02, 2017, 04:51:01 PM »
Thanks for the information.
I have the probing working in Gcode using:-
M40 open text file to store XYZ coordinates,
G0 Zrr (safe rapid height)
G0 Xn1 Yn1
G0 Zss (start position for probe)
G31 Z0 Fnn
G0 Zrr (safe rapid height)
G0 Xn2 Yn2
G0 Zss
G31 Z0 Fnn
............Etc
M41 close the text file.
M30 (end and rewind)
(Thanks to Les at Sheetcam for tweaking my Mach3 post processor to replace drilling op with probing op. it works a treat)

The issue is the unrestrained, disasterous, expensive overtravel on a probe fault.

I will probably add a movable limit switch on the Z axis to protect the probe and workpiece.
It will be quicker than learning macroese then writing and debugging a macro.

My workshop is not temperature controlled so achieving 0.0002 repeatability would be down to luck and some fine emery:)
Re: G31 probing - can Z travel be limited
« Reply #6 on: February 05, 2017, 09:23:17 AM »
Is there a way to limit the Z travel when G31 probing with the Z axis.
I have tried:-
positive Z position as the end point
negative Z position as the endpoint
Z=zero as the end point
but if the probe does not hit, the axis just keeps going and going and going.
Hopefully there is a parameter somewhere to set this up.
Thank you


The Znn in G31 Znnn Fn is what limits the probing move it you program in correctly.  Let's say that you are probing a surface and the surface is about Z0 and you have .5 of overtravel. Programing G31 Z-.25 Fn should give you .25 of room to spare.

To clarify. if you program G31 Z0 Fnn it should travel no farther than Z0. if it goes farther it is an error. If you probe a hole in the part which is all Z.1 except the hole which is Z-nn it will go to Z0 and then go back up. The difference between G31 and G01 is that when the probe signal is recieved the machine automatically skips the rest of the motion and reverses direction and then continues with the next line of code.

HTH

 The problem with Mach3 as far as I am concerned is that it doesn't always probe honor the G31 command especially in Macros. It woks flawlessly on Mach4 so far for me. Of course YMMV. It also may be Mach3 version dependent and controller dependent.
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.
Re: G31 probing - can Z travel be limited
« Reply #7 on: February 06, 2017, 10:15:54 AM »
Thanks.
Perhaps I should have said that I am using Mach3.
I have tried the probing Mach3 V1.84, V2.48 and V3.43
It fulfills all my requirements and has done for the last 12 or more years.
Stability and reliability are more important to me than features I dont use.
It is just a pity that the G31 is not quite right.

IDUAA