output probe data to a new program file
im trying to output the probed hole positions to a new program file.
lets imagine that that i have 10 parts in a program with 4 predrilled holes per part that need to be tapped.
my tapping cycle for tapping the holes would look like this:
G71 Z0.2
G95
G84 X0.5 Y4.7879 Z-0.25 R0.2 F0.0179 S1568 M53
X1.8911
Y3.5
X0.5
X1.8911 Y1.7879
X0.5
Y0.5
X1.8911
X4.8911
X3.5
Y1.7879
X4.8911
ETC......
G00 Z0.2
but those hole positions are out by max 0.025 due to fixture imperfections.
so what i would to do is rewrite the program using the position data and have to probe find the center of the hole and output the x and y coordinate data to a new file on our okuma MB56va machine with a p100m control.
mostly what im looking for is a method for outputting probe data and append it to the end of a .MIN file so i can copy and paste the new location data to the tapping cycle. i don't have any renishaw probing software, all i
use is the software okuma ships with their machines. i use the following gcode line to do a hole search: (G114 PD=0.4 PW=1) where PD = approximate hole diameter and PW=work offset.
and here is what the hole finding program could look like....
G40 G80 G90 G94 G17
G20
M09
G116 T32 (probe)
G15 H01 (work offset)
G00 X0.5 Y4.7879 (rapid to first hole)
G56 Z0.85 H32 (Tool offset, rapid to Z position) (is there a way to make protected rapid moves with okuma's built-in software? even though i will try to run this in maybe 1or5% mode)
Z-0.2 (rapid into hole)
G114 PD=0.4 PW=2 (probe hole and send offset to currently unused work offset)
G15 H01 (reselect work offset 1)
(now i need something to save this XY location from workoffset 1 to a new .MIN file.
G00 Z0.85 (rapid out of hole)
G00 X1.8911 Y4.7879 (rapid to second hole)
Z-0.2 (rapid into second hole)
G114 PD=0.4 PW=2 (probe second hole)
G15 h01 (reselect work offset 1)
(update or append second hole data to the .MIN file)
G00 Z0.85 (rapid out of hole)
M09
G90
M02
thanks!
Re: output probe data to a new program file
First and foremost, I think we need to see some different code to understand exactly what your program is doing.
G114 is not a probing cycle per se, it is a G code macro call. Your probe cycle would actually look something like:
CALL OO16
CALL OO10 PMOD=7 PDI=8
CALL OO20 PHN=(X)(WORK OFFSET LOCATION GETTING SAVED TO A WORK OFFSET NUMBER) PX=(X) PY=(X)
CALL OO19
The program is probably saved in a .LIB program of some sort. Some people name theirs more literally something like OG114.
That will tell us what your G114 code is actually doing.with the probed positions.
Second, why do you need the data to be saved to a .MIN file?
I can push local variables to a .SSB file, but i've never tried to do it to a . MIN through a schedule program, but i'm 99% sure you cannot do this.
I CAN save the values to a common variable which I can reference from a different .MIN altogether, but I wouldn't be actually populating an X/Y position so much as storing one as VC1=VAPAX or some such thing. If your probe cycle is sending to a tool offset it'll probably be sent to VTOFH[offset number] so you'd see VC1=VTOFH[56] or whatever that value is.
Now, if there is a varying number of holes, you can have something like
G71 Z0.2 (You can remove this as well as the M53 since your R value is the same)
G95
G84 Z-0.25 R0.2 F0.0179 S1568 M53
IF HO1 NHO1
NHD1
IF HO1 NHO2
NHD2
IF HO1 NHO3
NHD3
IF HO1 NHO4
NHD4
GOTO NEND
NHO1
X=VC1 Y=VC2
GOTO NHD1
NHO1
X=VC1 Y=VC2
GOTO NHD2
NHO3
X=VC1 Y=VC2
GOTO NHD3
NHO4
X=VC1 Y=VC2
GOTO NHD4
etc...
NEND
G0Z100
I cannot recall if you can do a logical statement inside the Tapping cycle, you can during a lathe LAP cycle, but mills are different in some things,, but that's what modin and custom sub programs are for.
Moral of the story, I need more data to help, and there's always a way.