the macro programming tools

the macro programming tools


Copyright 2005, Industrial Press Inc, New York, NY – FANUC CNC Custom Macros


MACRO FUNCTIONS


135


u


The spindle speed (r/min = rpm) formula – Metric:


m min 1000


r min =


cnc drill Machine


p D


u


The spindle speed (r/min) formula – English:


ft min 12


r min =


p D


u


The metric feedrate (mm/min) formula:


mm min = r min mm tooth N


u


The English feedrate (IPM – in/min – inches per minute) formula:


in min = r min in tooth N


+


where


r/min


=


Revolutions per minute (spindle speed) – also ‘rpm’


m/min or ft/min


=


Peripheral speed in meters or feet per minute


p


=


Constant pi (314159265359)


D


=


Drill diameter (Metric or English)


mm/min


=


Millimeters per minute feedrate (Metric only)


mm/tooth or in/tooth =


Chipload per cutting edge rating in mm/tooth or inches/tooth


N


=


Number of teeth in a cutter (number of cutting flutes)


2 Example 7


O0017 (MAIN PROGRAM)


N1 G21


N2 G65 P8006 D120 F500 C015 T2


(MACRO CALL WITH DEFINITIONS)


N3 G90 G00 G54 X1000 Y500 S#101 M03 (SPINDLE SPEED CALCULATED BY notching machine MACRO)


N4 G43 Z50 H01 M08


N5 G99 G81 R25 Z-190 F#102


(FEEDRATE CALCULATED BY MACRO)


N6 G80 Z50 M09


N7 G28 Z50 M05


N8 M01


O8006 (MACRO FOR EXAMPLE O0017)


#101 = FIX[[#9*1000]/[3141593*#7]]


(SPINDLE SPEED CALCULATION)


#102 = #101*#3*#20


(FEEDRATE CALCULATION)


M99


%


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


FANUC CNC Custom Macros


136


Chapter 9


In the G65 macro call, the val ues that are rel e vant to the cur rent pro gram ming job have to be


sup plied to the macro In the ex am ple, D120 def i ni tion means that the vari able #7 will store the


value of 120 mm drill di am e ter, F500 means that the vari able Angle Punching #9 will store 50 m/min pe riph eral


speed value, C015 CNC Angle Line means that the vari able #3 will store 015 mm/rev chip load value, and T2


means that the vari able #20 will store 2 cut ting edges (flutes)


No tice the FIX func tion used for the r/min def i ni tion If the for mula is taken ex actly

You can leave a response, or trackback from your own site.

Leave a Reply