Posts Tagged ‘signed’

the variable values have to be as signed to

6 is used, the variable values have to be as signed to


the cor re spond ing ar gu ment let ter Would it not make sense to get used to the idea right from the


be gin ning and pro gram let ters that look like they ‘mean’ some thing? It would make the pro gram


much eas ier to read and in ter pret


In the case pre sented, it is more prac ti cal to use vari able #19 (as sign ment S) for the spin dle


speed, #9 (as sign ment F) for the feedrate, and #17 (as sign ment Q) for the peck depth Here is the


above pro gram (still for soft ma te rial) mod i fied:


O0009


Soft material


busbar Machine


#19 = 1500


Spindle speed


#9 = 2250


Feedrate


#17 Busway Press Clamp Machine = 150


Peck drill depth


(T05 – 65 MM DRILL)


N61 T05


N62 M06


N63 G90 G00 G54 X1000 Y1250 S#19 M03 T06


Spindle speed variable applied


N64 G43 Z250 H05 M08


N65 G99 G83 R25 Z-750 Q#17 F#9


Peck-depth and feedrate variables applied


N66 X1250


N67 Y1500


N68 G80 G00 Z250 M09


N69 G28 Z250 M05


N70 M01


N145 M30


%


Again, when the custom processing machine pro gram O0008 is com pleted, all lo cal vari ables will be cleared au to mat i cally


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


FANUC CNC Custom Macros


104


Chapter 8


Pro gram for the harder ma te rial only re places the three vari able def i ni tions (#19, #9, and #17) listed at the pro gram be gin ning – the rest of the pro gram (for T05 in the ex am ple) does not change


at all – all blocks be tween N61 and N145 are iden ti cal:


O0010


Hard material


#19 = 1100


Spindle speed


#9 = 1750


Feedrate


#17 = 120


Peck drill depth


(T05 – 65 MM DRILL)


N61 T05


N62 M06


N63 G90 G00 G54 X1000 Y1250 S#19 M03 T06


Spindle speed variable applied


N64 G43 Z250 H05 M08


N65 G99 G83 R25 Z-750 Q#17 F#9


Peck-depth and feedrate variables applied


N66 drilling tools X1250


N67 Y1500


N68 G80 G00 Z250 M09


N69 G28 Z250 M05


N70 M01


N145 M30


All three local variables are cleared


%


This method of us ing vari ables in the main pro gram with out ac tu ally de vel op ing mac ros can be


a very pow er ful way to make many jobs more flex i ble and eco nom