Hello Guest it is March 28, 2024, 05:03:39 AM

Author Topic: How to do protected moves for homemade probe?  (Read 4114 times)

0 Members and 1 Guest are viewing this topic.

How to do protected moves for homemade probe?
« on: October 24, 2010, 09:14:22 PM »
My apologies if this question has been addressed elsewhere. I have attempted due diligence both here and on CNC Zone but have not found an answer. I might
have missed it because of the sheer volume of information and posts. The closest data I found related to commercial probes with vendor supplied software.

I have just completed a homemade contact probe. In an effort to avoid crashing it through dumb setup errors, I wish to incorporate protected moves in my
routines. To do this, I envision using G31 for all moves, then testing the results to see if either I got to where I was supposed to and didn't hit something when I wasn't supposed to or I got to the end of a probe move and didn't hit something when I was supposed to.  I have empirically determined that a G31 move with no probe contact acts like a G31 with a probe contact at the end of the programmed move. In others words, there is no error detected and, at least for slow feed rates, the probe is sitting at the end of the move.

However, this creates a problem. If the probe does make contact, the next move will start with the probe activated, causing Mach3 to object saying the probe is
already activated. Mach3 then proceeds to start moving all three axis in small steps, about 1 full step, 5 times a second. This won't stop until E stop is
activated.

What's going on here? I suppose I could do a small G0 to get the probe off the piece before doing the next G31 but I think something is wrong here.

Thank you for your patience and help.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How to do protected moves for homemade probe?
« Reply #1 on: October 24, 2010, 09:49:59 PM »
You cannot use ALL g31 moves in a probing routine.Once the G31 trips you MUST back off the trip point (G0,G1) until the switch resets. THEN you can proceed with a new  move to the next postion.

AS to protected move the G31 already does that by stopping at the designated stop point. As to a protected trip move, that is imposible because you never KNOW where it is suppose to trip. THat is the reason you probed it to FIND the trip point(;-)

Hope that helps, (;-) TP
Re: How to do protected moves for homemade probe?
« Reply #2 on: October 24, 2010, 10:08:17 PM »
Okay, I anticipated the need to move off the trip point but why does Mach 3 go into 'hiccup mode' if the probe is already activated when the G31 is executed?  It knows there is a fault because it tells me in the message window.  I would have anticipated a simple exit from the script.  Instead it starts moving all three axis.

The whole reason I'm using G31 is for the protected move.  I don't want to have to rebuild my probe because of a setup error.  I know I can't prevent a crash into the side of the probe but at least I can avert disaster from ramming the tip into something.

I don't know what you mean by a protected trip move.  Some protected moves are just to reposition the probe and no trip is expected.  I can detect an error if the actual travel distance does no equal the expected.  For moves that expect a trip, one just measures the actual distance and makes sure it is less than the programmed distance.

Thank for the fast response.

 :)

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How to do protected moves for homemade probe?
« Reply #3 on: October 24, 2010, 10:34:16 PM »
If you need a simple exit from the script on a fault you have to program it into your macro. Mach does not issue general fault codes that will auto cancell a macro.

Your jitter? Can't say I have every seen that one.  It does not do that here.

(;-) TP

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How to do protected moves for homemade probe?
« Reply #4 on: October 24, 2010, 11:04:02 PM »
The only protected move MACH has is the G31(probe) and G28.1(ref/Home) moves.

How is mach to know that the trip is in error? All it knows to do is stop and record the point then wait.  AND IF the next move is a backoff move then it will just continue on with the routine.

This is NOT to say it can't be done, I would be interested in your work on this (;-)

(;-)TP
Re: How to do protected moves for homemade probe?
« Reply #5 on: October 24, 2010, 11:46:47 PM »
I have read (and I apologize, I cannot remember the source) that a G31 move that goes to the end of the programmed distance without a trip is considered a fault.  However, I haven't found any error flag/register in Mach3 so I guess I'll have to craft my own as I described.

I also read that a G31 usually results in some overrun but I haven't seen that.  It could just be that my feed rate is very low.

At least software changes are easy to do.  The only costs are time and any collateral damages from mistakes.   :-[

Either way, the probe is working great and I'm having a ball.  Repeatability to .0001" and I've got it centered to about .0003".  I suspect my spindle bearing isn't much better if at all.  The screen set has everything I want in it and it's a snap to add/modify.

Regards

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How to do protected moves for homemade probe?
« Reply #6 on: October 25, 2010, 12:10:42 AM »
NO the end move is NOT a fault and it will record the endpoint same as a trip. It is JUST a safety built into the G31mode to stop a runaway situation. THe function is acutally USED in some probing routines.

Yes the G31 has overun. It is the amount of movement that mach requires to bring the axis to a controlled stop AND the amount of overtravel in your probe.(distance from tip contact until switch trips).

THe problem you will find IS that MACH does not have a protected move MODE.(;-) Like other commercial controllers have.

You could do it with a brain to monitor the trip led and do a STOP BUT you would have to switch it off with a Mcode before any G31 call then switch it back on with a Mcode before the next go/g1moves.  AND then there is NO garranty that you could stop the move before it damaged the tip/probe. It would depend on how much over travel your probe could take before it damaged something.

(;-)TP