What's new
What's new

Z probe and change work offset to lowest point

Programmer3259

Plastic
Joined
Mar 17, 2020
Hey guys new to the forum, and have a question for you. Hope this is where this belongs. I have a weldment that we need to probe lets say 4 points, then of those points I need the lowest point so I can set my work offset and cut and get minimum cleanup. We have Renishaw probes and this will be run on a Mazak horizontal. I have no problem with the Z probing and use a macro to set #501=#187, measure next point and set #502=#187 and so on. My issue is how to go through those numbers and have it use the lowest point and set the work offset.
 
You can IF and LT (less than) to only write to your #501 variable if the point is lower than a previous point.
Start with:
#501=99. (sets your variable to something higher than the probe will ever give you)

PROBE FIRST POINT
IF[#187LT#501]#501=#187 (if the probed value is less than #501, then make #501 = probed value)

Repeat for each point (do not reset the value to 99 except at the start of a new part). This way, #501 only gets changed when the probed value is less than what was there already.
 
Hey guys new to the forum, and have a question for you. Hope this is where this belongs. I have a weldment that we need to probe lets say 4 points, then of those points I need the lowest point so I can set my work offset and cut and get minimum cleanup. We have Renishaw probes and this will be run on a Mazak horizontal. I have no problem with the Z probing and use a macro to set #501=#187, measure next point and set #502=#187 and so on. My issue is how to go through those numbers and have it use the lowest point and set the work offset.

I assume that you are using Renishaw's Inspection Plus for Mazak.
First of all, in this program the measured Z position is stored in #137 (Haas uses #187 for this task).
Here is a short macro program, finding the maximum and minimum Z position coordinates from 1 to 9 measured points.
It is assumed, then prior to execution of this macro the tool has been changed to probe, probe has been switched on and G43 block positioning the Z above the surface has been executed. Of course all those can be paced at the beginning of this macro.

O1234
(G65P1234C***.***I**J**I**J**......)
(C- Z SURFACE NOMINAL POSITION)
(I - X POSITION)
(J - Y POSITION)
G40G80
G90
#1=0 (COUNTER)
#110=0
#111=0
N10
IF[#[4+#1]EQ#0] GOTO99
G65P9810 X#[4+#1]Y#[5+#1]F5000
G65P9811Z#3F500
IF[#1GE1.]GOTO20
#110=#137(MAXIMUM REGISTER)
#111=#137(MINIMUM REGISTER)
GOTO50
N20
IF[#137GT#110]GOTO30
IF[#137LT#111]GOTO40
GOTO50
N30
#110=#137
GOTO50
N40
#111=#137
N50
#1=#1+3
IF[#1GT31]GOTO999
GOTO10
N999
#3000=91 (TOO MANY POINTS)
N99
M99
%
 
Thank you guys for the fast response. I will give these a try. We are on partially furlough due to this virus, so might be a few weeks till we can test but I'll let you know if it works.

Yes you are correct it should be #137, when I grabbed the Renishaw programming manual didn't realize I grabbed the Haas one. We have Haas, Mazak, Heidenhain and Makino so it can get a little hectic.
 
Thank you guys for the fast response. I will give these a try. We are on partially furlough due to this virus, so might be a few weeks till we can test but I'll let you know if it works.

Yes you are correct it should be #137, when I grabbed the Renishaw programming manual didn't realize I grabbed the Haas one. We have Haas, Mazak, Heidenhain and Makino so it can get a little hectic.

If so do not touch variables #500-#503 and #506, probe calibration data is stored there.
 








 
Back
Top