Hello Guest it is March 28, 2024, 04:14:25 PM

Author Topic: How does G31 Behave?  (Read 2421 times)

0 Members and 1 Guest are viewing this topic.

How does G31 Behave?
« on: March 03, 2017, 05:38:12 PM »
Just completed a Hurco VMC using Mach4.  Everything we needed to work has worked excellent so far except for this Probe command.  I have used G31 in Mach 3 and from my experience motion stops when the probe is touched.  Is that the case in Mach 4?
What I was hoping to do was Create a Macro do run before a tool change that does the following:
I'm checking to see if our drills are broken before it starts the tapping cycle.
G91 G31 Z -#
if probe is triggered:  Continue to tool change
else:  message box (tool is broken)

Here is the code I tested and the result:  
G91 G31 Z -2.00 F10  --> Result (During the move I manually triggered the Probe switch):  It fed down 2in and did not stop when the probe was triggered.  

On other machines I use a macro that rapids down to an absolute position, this position is an input by the operator in a DRO that the Macro reads.  However, sometimes operators will change tool lengths and not update the DRO so we end up with a lot of broken switches.  This is why I want to use G31 so it will stop if the probe is triggered and not keep feeding down to break stuff.    
Is G31 the way to accomplish this or is there a simpler way?
Chad Byrd

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: How does G31 Behave?
« Reply #1 on: March 03, 2017, 06:57:04 PM »
Probing is a motion controller function.  All it is to Mach is a regular feed move.  So the first thing I would check is to make sure that the motion controller supports probing and if it does, how to set it up.  For instance, on a Galil, the probe has to be wired to inputs 1, 2, 3, and 4.  Then we map one of those inputs to the Probe signal in Mach.  The probe signal is there just for diagnostics purposes.  Just so the user can jiggle the probe and see the LED flash.  

But back to your question of solving the problem.  Yes, a G31 would be a good way to do it.  It is called a "protected move".  

Steve
Re: How does G31 Behave?
« Reply #2 on: March 03, 2017, 07:40:40 PM »
Hi Chad,
there is quite a good description of how probing works in the Mach4 Help Docs, probing.txt.

As Smurph pointed out probing is largely a motion controller function. probing.txt is really a description of how the motion
controller must operate.

When Mach encounters a G31 move it issues a straight linear co-ordinated move with exact stop. It is the motion controller
which detects the probe event, aborts the remainder of the move by flushing the motion planner and reports its stopped
position back to Mach.

If you open Machs log and pin in to 'always on top' and run some probe cycles you can see the handoff points. Worthy to
look at for an understanding.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: How does G31 Behave?
« Reply #3 on: March 03, 2017, 07:47:26 PM »
Okay,  I didn't realize that probing was in the controller.  I'm using the Hicon Intefra controller, So I'll check with the Hicon forum and see what I can find on the probing.  As well as the manual.
And a "Protected Move" sounds exactly like what I'm looking for.   I'm gonna check out the log and see what's going on behind the scenes.   Always good to understand how things work!   
 Thanks for the input!
Chad Byrd
Re: How does G31 Behave?
« Reply #4 on: March 23, 2017, 08:56:56 AM »
I should have posted on here sooner.  I found my problem.
I'm using the Hicon Integra motion controller.  I was running my Probe input through the Click PLC I'm using for I/O.  I switched it over to a Hicon input and now it works wonderfully.
Chad Byrd