nd a positive entry of Z#3 will be used in block N4: O0012 (MAIN PROGRAM 2)

nd a pos i tive en try of Z#3 will be used in block N4: O0012 (MAIN PROGRAM 2)


#1 = 150


(DRILL DIAMETER)


#2 = 130


(PLATE THICKNESS)


 


cnc drilling Machine


#3 = -[#1*03+#2+15] (Z-DEPTH CALCULATION – NEGATIVE VALUE OF -190)


 


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


%


Which ver sion is better? In this case, it is not a ques tion of better or worse – it is a ques tion of


per sonal pref Drilling Machine for Plate er ence Many pro gram mers would prob a bly pre cnc machining center fer the Ex am ple 1 (pro gram O0011),


be cause it shows the neg a tive value in block N4, where it log i cally be longs (at least in my opin –


ion) Based on the method of de vel op ing stan dard man ual pro grams, it seems a copper bending machine better choice


2 Example 3


There is yet an other way to get the neg a tive re sult of the depth cal cu la tion – just re de fine the


orig i nal def i ni tion of the #3 vari able Sub sti tu tion (re def i ni tion) will take the old value of a vari –


able and re places it with the new value


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


FANUC CNC Custom Macros


MACRO FUNCTIONS


131


O0013 (MAIN PROGRAM 3)


#1 = 150


(DRILL DIAMETER)


#2 = 130


(PLATE THICKNESS)


 


#3 = #1*03+#2+15


(Z-DEPTH CALCULATION – POSITIVE VALUE OF 190)


#3 = -#3


(POSITIVE #3 BECOMES NEGATIVE #3 OF -190)


 

tags: , ,
posted in Uncategorised by admin

Follow comments via the RSS Feed | Leave a comment | Trackback URL

Leave Your Comment

 
Powered by cnc machine tools | drilling machine. Design by CNC punching machine . Edit by drill machine | punching machine