franke Master Poster
Joined: 26 Jun 2004 Posts: 161 Location: Indiana, USA
|
Posted: Fri Jul 02, 2004 12:42 pm Post subject: How To Verif the Second Offset of a Grooving tool on an OSP |
|
|
Have you ever wanted to use two offsets for a grooving tool or turning tool but were afraid the operator would forget to set the second offset and crash the machine? Or worse, you did program for a second offset and the machine did get crashed.
This macro shows how to read the offset of each tool and determine if the second tool is set correctly.
Notice that Okuma allows variables to have alphanumeric names. In this example, IDOF is set to the X offset of tool 7 and DOF is set to the X offset of tool 17. The variable names are arbitrary. The statement VTOFZ[17]=VTOFZ[7] sets the Z offset of tool 17 equal to the Z offset of tool 7. This is done because we are allowing for a small adjustment in the X axis but Z should be the same so this eliminates one more error source for the operator.
The statement IF[DIF LT .015] NEND compares the X offset of tool 7 to tool 17 and exits if the difference is less than .015". In this example, the machining program was written on a CAM system that compensated for the width of the grooving too. That's why the difference between offsets is set at .015. If you don't compensate for the width of the tool in the machining program you will have to add the width of the tool to the .015. This makes the code less generic because you have to change it for each different width of insert but it still works.
You can also use the same concept for turning tools and boring bars. For example, if a part has a close diameter with a relief in the middle you might want to have two offsets to compensate for taper in the machine. Use this type of macro to be sure the operator doesn't forget to set the second offset.
Code: | (FACE GROOVE TOOL)
(SET THE TOOL OFF OF THE O.D.)
(OFFSET #7 WILL CONTROL THE HUB DIA.)
(OFFSET #17 WILL CONTROL THE ID)
G14
IDOF=VTOFX[7]
DOF=VTOFX[17]
VTOFZ[17]=VTOFZ[7]
DIF=ABS[IDOF-DOF]
IF[DIF LT .015] NEND
NALA1 VUACM[1]='GRV TOOL NOT SET'
VDOUT[992]=999
NEND |
Hope you like it. |
|