Look at the program only as the objective states

Sep 04
2017

N1 G21


N2 G90 G00 G54 X1000 Y500 S800 M03


N3 G43 Z50 H01 M08


N4 G99 G81 R25 Z-#3 F1500


(DISTANCE-TO-GO IS Z-215)


N5 G80 Z50 M09


N6 G28 X1000 Y500 Z50 M05


N7 M30


H beam high-speed Drilling


%


Copyright 2005, Industrial Press Inc, New York, NY –


FANUC CNC Custom Macros


130


Chapter 9


Look at the program only as the objective states – was the ob jec tive achieved? The ex am ple


shows yes, it was The to tal Z-axis tool travel will be Z-215 (this is in di cated at the con trol as


Dis tance -To-Go) Re mem ber, the ‘dis tance to go’ is mea sured from the start point punch machine for Head (R-level) to the


Z-depth What is the re turned value of Busway Press Clamp Machine vari able #3? Once the pro gram is com pleted (M30 func –


tion), or the re set but ton is pressed, all lo cal vari ables are cleared The screen dis play of macro


vari ables will show no val ues There are no vari able data shown, be cause there are no vari able


data stored – all were flushed out of the mem ory, be cause they were de fined as lo cal vari ables


There is no need to keep a value al ready used in the mem ory, once the job is done If the same


pro gram is applied for a dif fer ent drill di am e ter and/or plate thick ness, just change the #1 and/or


#2 vari ables, and the new val ues of the Z-depth will be cal cu lated au to mat i cally and cor rectly for


any 118掳 tool point an gle (within the macro framework)!


There are other parts of the pro gram that could ben e fit from vari able data, but the fo cus of the


examples is on the Z-depth cal cu la tion only As an im prove ment, for ex am ple, the spin dle speed


and the feedrate would have to change with each drill di am e ter and a few other data as well


2 Example 2


In the sec ond ver sion of the ex am ple, only a mi nor change will be drilling tools made Look at the cal cu la tion


of the Z-#3 in block N4 above? The cal cu la tion of vari able #3 al ways pro duces a pos i tive re sult, but in the pro gram, the Z-depth must be neg a tive By making two changes in the pro gram, the re –


sult of the #3 cal cu la tion will be neg a tive a

Leave a Reply

Visit Our Friends!

A few highly recommended friends...

Pages List

General info about this blog...