What's new
What's new

Writing an in process probing cycle to keep the higher of two points

Joined
Jun 30, 2022
Hello everyone! First post so take it easy on me lol
I have a new Haas with a renishaw probe. The goal is to create a cycle to probe two locations in Z, keeping the higher of the two and loading it in G54. I'm trying to prevent gouging the surface near a hole on either side of a key that is being notched out for clearance for a washer and nut. I have already proved out the portion for the XY locations and reprobing for Z next to the hole just a little lost on this one. This is on UHMW and its higher in some places so I have to be careful but really did not want to be stuck at the machine constantly manually probing 500+ times for a part that takes 20 minutes to run with the probing cycle the way it is.

Any suggestions would be great!
 
Last edited:

dandrummerman21

Stainless
Joined
Feb 5, 2008
Location
MI, USA
Personally I use #138 "size" for stuff like that, combined with G10.


T20M6(PROBE)
G90G80G40G17
G0G54X-1Y0
G43H20Z10.

G65P9810X-1Y0Z.1F200

G65P9811Z0(MEASURE FIRST POINT AT X-1)
#600=#138 (SET #600 TO WHAT THE PROBE MEASURED)

G65P9810X1.Y0

G65P9811Z0(MEASURE AT 2ND POINT AT X+1)
#601=#138(SET #601 TO WHAT THE PROBE MEASURED)

G65P9810Z10.

IF[#600GT#601]GOTO1000( IF #600 IS LARGER GO TO LINE 1000)
G91G10L2P1Z#601(ADJUSTS G54 BY THE VALUE IN #601)
G90
GOTO123(SKIP TO END OF PROBE)

N1000
G91G10L2P1Z#600(ADJUSTS G54 BY THE VALUE IN #600)

N123
G28G91G0Z0M19
G90



I don't know if you can do THEN G91G10L2P1 on the same line as an IF. Maybe you can.

Someone else might have a more efficient manner to do this.
 

PROBE

Hot Rolled
Joined
Jan 23, 2003
Location
Tel Aviv, Israel
Personally I use #138 "size" for stuff like that, combined with G10.


T20M6(PROBE)
G90G80G40G17
G0G54X-1Y0
G43H20Z10.

G65P9810X-1Y0Z.1F200

G65P9811Z0(MEASURE FIRST POINT AT X-1)
#600=#138 (SET #600 TO WHAT THE PROBE MEASURED)

G65P9810X1.Y0

G65P9811Z0(MEASURE AT 2ND POINT AT X+1)
#601=#138(SET #601 TO WHAT THE PROBE MEASURED)

G65P9810Z10.

IF[#600GT#601]GOTO1000( IF #600 IS LARGER GO TO LINE 1000)
G91G10L2P1Z#601(ADJUSTS G54 BY THE VALUE IN #601)
G90
GOTO123(SKIP TO END OF PROBE)

N1000
G91G10L2P1Z#600(ADJUSTS G54 BY THE VALUE IN #600)

N123
G28G91G0Z0M19
G90



I don't know if you can do THEN G91G10L2P1 on the same line as an IF. Maybe you can.

Someone else might have a more efficient manner to do this.
As it is Haas, the measured value of the Z is stored in #187 rather then in#138. This value is in current WCS system, and as such can not be used in G10 line syntax, which demands the axes values to be in machine coordinates. I suggest following:

T20M6(PROBE)
G90G80G40G17
G0G54X-1.Y0
G43H20Z10.
G65P9832 (SWITCH THE PROBE ON)
G65P9810X-1Y0Z.1F200
G65P9811Z0(MEASURE FIRST POINT AT X-1)
#600=#187-#5043+#5023 (SET #600 MACHINE COORDINATES OF THE FIRST POINT)
G65P9810X1.Y0
G65P9811Z0(MEASURE AT 2ND POINT AT X+1)
#601=#187-#5043+#5023 (SET #601 MACHINE COORDINATES OF THE SECOND POINT)
G65P9810Z10.
IF[#600GT#601]GOTO1000( IF #600 IS LARGER GO TO LINE 1000)
#5223=#601(LOAD THE #601 VALUE TO Z REGISTER OF G54)
G90
GOTO123(SKIP TO END OF PROBE)
N1000
#5223=#600 (LOAD THE #600 VALUE TO Z REGISTER OF G54)
N123
G28G91G0Z0M19
G90
G65P9833 (SWITCH THE PROBE OFF)


Stefan
Cogito Ergo Sum
 

dandrummerman21

Stainless
Joined
Feb 5, 2008
Location
MI, USA
As it is Haas, the measured value of the Z is stored in #187 rather then in#138. This value is in current WCS system, and as such can not be used in G10 line syntax, which demands the axes values to be in machine coordinates. I suggest following:

Are you saying that it can't be done because it is a haas? We only have fanuc controls. Works on 15mb, 0mb/c/f, 16mia/b, 21mb

I use G10 with G91 all the time to make small adjustments.

G91G10L2P1Z.001 will move G54 up .001 in Z. I have never had an issue adjusting the currently used offset. However, I would re-call G54 after doing it
 

PROBE

Hot Rolled
Joined
Jan 23, 2003
Location
Tel Aviv, Israel
Are you saying that it can't be done because it is a haas? We only have fanuc controls. Works on 15mb, 0mb/c/f, 16mia/b, 21mb

I use G10 with G91 all the time to make small adjustments.

G91G10L2P1Z.001 will move G54 up .001 in Z. I have never had an issue adjusting the currently used offset. However, I would re-call G54 after doing it
1. Haas 100 variables are higher by 50 then Fanuc's.
2. My mistake, you are correct.
Your syntax
G91G10L2P1Z#600(ADJUSTS G54 BY THE VALUE IN #600)
is just fine. My suggestion:
#600=#187-#5043+#5023 (SET #600 MACHINE COORDINATES OF THE FIRST POINT)
is wrong, as the value in the #187 is not the Z coordinate of just measured point, but the difference between the measured coordinate and stored in WCS coordinate. I mentioned and pinpointed this fact so many times in the past, and hop - I forgot it.
Sorry guys.
ERRARE HUMANUM EST
Stefan,
Cogito Ergo Sum
 
Joined
Jun 30, 2022
How about setting individual offsets at each location instead of going by whichever is the tallest?
That is exactly what I am attempting to do: probe two spots at each location and keep the higher of the two. There are five holes per part evenly spaced over a ten foot span on a 50" machine.
 
Joined
May 26, 2004
Location
Paradise, Ca
That is exactly what I am attempting to do: probe two spots at each location and keep the higher of the two. There are five holes per part evenly spaced over a ten foot span on a 50" machine.
You misunderstood. I'm proposing setting, for example, G54, G55, G56, G57 and G58 and then using each offset in your program so each hole is actually correct instead of being based off the highest one.

No math, nicer part, win win.
 
Joined
Jun 30, 2022
You misunderstood. I'm proposing setting, for example, G54, G55, G56, G57 and G58 and then using each offset in your program so each hole is actually correct instead of being based off the highest one.

No math, nicer part, win win.

I can only reach maximum two holes per setup (31" apart) before I have to unclamp the part and shift it down roughly 40 inches and start all over again, therefore I can only use two offsets at a time in the program anyway...which I'm doing. The "highest point" I am trying to achieve is on two separate surfaces on either side of the positive keyway feature that are supposed to be even but are off enough that I have to select the higher of the two so I don't cut into one of the surfaces.

1657028017778.png
 
Joined
Jun 30, 2022
Personally I use #138 "size" for stuff like that, combined with G10.


T20M6(PROBE)
G90G80G40G17
G0G54X-1Y0
G43H20Z10.

G65P9810X-1Y0Z.1F200

G65P9811Z0(MEASURE FIRST POINT AT X-1)
#600=#138 (SET #600 TO WHAT THE PROBE MEASURED)

G65P9810X1.Y0

G65P9811Z0(MEASURE AT 2ND POINT AT X+1)
#601=#138(SET #601 TO WHAT THE PROBE MEASURED)

G65P9810Z10.

IF[#600GT#601]GOTO1000( IF #600 IS LARGER GO TO LINE 1000)
G91G10L2P1Z#601(ADJUSTS G54 BY THE VALUE IN #601)
G90
GOTO123(SKIP TO END OF PROBE)

N1000
G91G10L2P1Z#600(ADJUSTS G54 BY THE VALUE IN #600)

N123
G28G91G0Z0M19
G90



I don't know if you can do THEN G91G10L2P1 on the same line as an IF. Maybe you can.

Someone else might have a more efficient manner to do this.

This works as far as the machine reading the code but the values arent being stored somehow. When its finished it over writes G54 to 0.
 
Joined
Jun 30, 2022
This is what finally worked. Thank you all for the help

T30M6(PROBE)
G90G80G40G17
G0G54X0.Y-1.
G43H30Z2.
G65P9832 (SWITCH THE PROBE ON)
G65P9810X0.Y-1.Z2.F200
G65P9811Z0.(MEASURE FIRST POINT AT Y-1)
#600= #187 (SET #600 TO WHAT THE PROBE MEASURED)
G65P9810Y1.X0
G65P9811Z0.(MEASURE AT 2ND POINT AT Y+1)
#601= #187 (SET #601 TO WHAT THE PROBE MEASURED)
G65P9810Z10.
IF[#600GT#601]GOTO1000( IF #600 IS LARGER GO TO LINE 1000)
G91G10L2P1Z#601(ADJUSTS G54 BY THE VALUE IN #601)
G90
GOTO123(SKIP TO END OF PROBE)
N1000
G91G10L2P1Z#600(ADJUSTS G54 BY THE VALUE IN #600)
N123
G28G91G0Z0M19
G90
M30
 

angelw

Diamond
Joined
Sep 10, 2010
Location
Victoria Australia
This is what finally worked. Thank you all for the help

T30M6(PROBE)
G90G80G40G17
G0G54X0.Y-1.
G43H30Z2.
G65P9832 (SWITCH THE PROBE ON)
G65P9810X0.Y-1.Z2.F200
G65P9811Z0.(MEASURE FIRST POINT AT Y-1)
#600= #187 (SET #600 TO WHAT THE PROBE MEASURED)
G65P9810Y1.X0
G65P9811Z0.(MEASURE AT 2ND POINT AT Y+1)
#601= #187 (SET #601 TO WHAT THE PROBE MEASURED)
G65P9810Z10.
IF[#600GT#601]GOTO1000( IF #600 IS LARGER GO TO LINE 1000)
G91G10L2P1Z#601(ADJUSTS G54 BY THE VALUE IN #601)
G90
GOTO123(SKIP TO END OF PROBE)
N1000
G91G10L2P1Z#600(ADJUSTS G54 BY THE VALUE IN #600)
N123

G28G91G0Z0M19
G90
M30
Hello IntegrityMachine,
You could tidy up the end of your program by replacing the code shown in Red above with:

IF[#600 GT #601] TH #601 = #600 (IF #600 IS LARGER ASSIGN ITS VALUE TO #601)
G91 G10 L2 P1 Z#601 (ADJUSTS G54 BY THE VALUE IN #601)
G90

Regards,

Bill
 

dandrummerman21

Stainless
Joined
Feb 5, 2008
Location
MI, USA
Hello IntegrityMachine,
You could tidy up the end of your program by replacing the code shown in Red above with:

IF[#600 GT #601] TH #601 = #600 (IF #600 IS LARGER ASSIGN ITS VALUE TO #601)
G91 G10 L2 P1 Z#601 (ADJUSTS G54 BY THE VALUE IN #601)
G90

Regards,

Bill
I like this idea. Thanks.
 








 
Top