though you may develop a very


so phis ti cated copper busbar bending machine pro gram flow, but you may also be the only one who un der stands it


Subprograms that use the three or four-level nest ing are very rare in practice By care ful plan –


ning, the de sign of a con trol sys tem must al ways be a step ahead of the de sign of ma chine tools


For ex am ple, a 250 000 rev/min spin dle speed may not be avail able on ma chine tools at this time,


but the con trol sys tem can still sup port it, in case a par tic u lar man u fac turer co mes for ward with


ex actly that kind of a spin dle Four-level nest ing has been de signed for the same rea son The three


lev els of subprogram nest ing are il lus trated as sche matic graphics (Fig ures 5 to 7):


START


Figure 5


Two-level subprogram


O0001


O1001


O1002


nesting


Boring Machine hole


(MAIN)


(SUB)


(SUB)


M98P1001


M98P1002


M30


%


M99


M99


%


%


END


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


FANUC CNC Custom Macros


REVIEW OF SUBPROGRAMS


29


START


Figure 6


Three-level subprogram


O0001


O1001


O1002


O1003


nesting


(MAIN)


(SUB)


(SUB)


(SUB)


M98P1001


M98P1003


M98P1002


M30


M99


%


M99


%


M99


%


%


END


START


Figure 7


Four-level subprogram


O0001


O1001


O1002


O1003


O1004


nesting


(MAIN)


(SUB)


(SUB)


(SUB)


(SUB)


M98P1003


M98P1001


M98P1004


M98P1002


M30


M99


%


M99


M99


%


M99


%


%


%


END


Subprogram Documentation


Any com plex part pro gram (subprograms and mac ros in cluded) should al ways be well doc u –


mented Doc u ment ing CNC pro copper bending machine grams has been largely ig nored by many us ers, of ten be cause of


the per ceived need to do a job fast Al though some what for giv able for sim ple and easy pro grams,


the prac tice of not doc u ment ing pro grams is def i nitely not ac cept able for subprograms and is also


not ac cept able for mac ros Good pro gram doc u men ta tion is the key part of any CNC pro gram de –


vel op ment Look at the sche matic drawings of the four lev els of subprogram nest ing and you will


see how com plex the pro gram can be