used variable assign ments in ternally, in the main program

used variable assign ments in ternally, in the main pro gram This final example Drilling Machine for Plate busbar bending machine will ad vance ahead an other sig nif i cant step, and de fines the Z-depth as a true Fanuc Custom Macro Macro has been de fined as spe cial a pro gram that con tains com mon but vari able data


In this case, the com mon data is the cal cu la tion of the Z-depth it self Both, the main pro gram and


the macro pro gram will be needed The main pro gram, O0017 will be call macro O8005, con –


CNC H-Beam Drilling


tain ing the depth cal cu la tion Be cause the re sult – the re turned value – cal cu lated in the macro


O8005 has to be trans ferred to the main pro gram, where it is ac tu ally used, some stron ger pro –


gram ming tools will be needed These tools in volve the Com mon Vari ables (rather than just Lo cal


Vari ables), and the ex am cnc equipment ple is com pleted in the next sec tion


Using Common Variables


The basic con cept of com mon vari ables has been al ready introduced Based on a dic tio nary def –


i ni tion, the word ‘com mon’ means ‘shared’ Com mon vari ables in a macro are shared by at least


one other pro gram, and usu ally more than one Com mon vari ables cre ate a shared bond be tween


the main pro gram, subprograms, and all mac ros that are to be con nected by an other pro gram


Vari ables de signed as com mon are used to store pro gram data Within the group of com mon


vari ables, and de pend ing on the type of the stored data, there are two mini-groups One cov ers the


Sys tem Vari ables, the other cov ers the I/O (In put/Out put) In ter face


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


FANUC CNC Custom Macros


134


Chapter 9


Vari ables that are al lowed in the ‘com mon’ group, be long to the vari ables range of #100 to


#149 or, op tion ally, #100 to #199 – this group is called the ‘non-hold ing’ group, and #500 to


#599 or, op


tion


ally, #500 to #999 – this group is called the ‘hold


ing’ group The terms


non-hold ing and hold ing re fer to the abil ity of the con trol sys tem to keep the stored v

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