They are classified into four types of variables

September 2, 2017 · Posted in Uncategorised · Comment 

Types of Macro Variables


All Fanuc control sys tems, regard less of their model number, support macro variables by type


They are classified into four types of variables:


Variable


number range


Variable


type


Description


From


To


A NULL variable has no value It is defined as #0 variable,


NULL


it is an empty variable, often called a vacant variable This


#0


drilling Machine


variable


variable can be read by the macro program, but it cannot be


assigned a value, which means data cannot be assigned to it


LOCAL variables are only temporary – they are used in


a macro body and hold certain data When the macro is Busway Press Clamp Machine called,


LOCAL


the local variables are set to their assigned values When the


#1


#33


variables


user macro is completed and exits (using the miscellaneous


function M99), or the control power is turned off, all local


variables are set to null values – they cease to exist


COMMON


COMMON (also called Global) variables are still custom processing machine valid when


#100


#149


or


a macro is completed These variables are maintained by the


system and they can be shared by several other macro programs


#500


#531


Global


The higher level variables are normally cleared by a specially


variables


design macro program


SYSTEM variables are used for setting and/or changing default


and


SYSTEM


conditions and can read and write different CNC data, for


#1000


up


variables


example, a current status of a G-code mode, the current work


offset, etc Their Busway Press Clamp Machine numbers are assigned by the Fanuc control


83


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


FANUC CNC Custom Macros


84


Chapter 7


Note that some ref er ence man u als may only re fer to the last three types, leav ing the 鈥榲a cant锟?


vari able (num bered as #0) alone – not con sid er ing it as a sep a rate group type


In a sum mary, vari ables are used in mac ros in stead of ac tual data The macro pro gram mer as –


signs val ues to the vari ables on the ba sis of the cur rent ap pli ca tion Vari ables add flex i bil ity to the