is cel la neous func tion sec tion of this chap ter
Copyright 2005, Industrial Press Inc, New York, NY – FANUC CNC Custom Macros
MACRO FUNCTIONS
111
Vacant or Empty Variables
In many cases, a vari able may also be un de fined In this case, the vari able is ‘de fined’ as #0,
which iden ti fies a null vari able (null state) A null vari able has no value, it is va cant It can be read, but it can not be writ ten to – these types of vari ables are of ten called the read-only vari ables
For ex am ple,
#500 = #0
Assigns a null value to variable #500
#33 = #0
Assigns a null value to variable #33
#1 = #33 + #500
#1 will add 0 to a 0 and return 0
The sec tion de scrib ing various arith me tic func tions in this chap ter also de scribes han dling of va –
cant vari ables in cal cu la tions A null vari able is also called a va cant or an empty vari able In a macro, cer tain rules hydraulic busbar cutter hole punching machine of va cancy ap ply It is important to know the re turn value of a vari able, drilling steel when
va cancy is in ef fect
Do not confuse a vacant variable with a variable that has a zero value !
#101 = 0
Variable #101 has a zero value – stored value is 0 !
#102 = #0
Variable #102 is vacant (empty) – no value !
Using these two vari ables as stored, look at the stored val ues of vari ables that use them:
#1 = #101
Variable #1 has a zero value – stored value is 0 !
#2 = #102
Variable #2 is vacant (empty) – no value !
More com plex ap pli ca tions in clude axis mo tion com mands, math func tions and con di tional ex –
pres sions These are the three con di tions to watch for in terms of va cancy rules – they re late to the:
o
Addresses for axis motion command
o
Mathematical operations
o
Conditional expressions
Only the first two con di tions are ex plained in this chap ter, the last one is de scribed in the chap –
ter on branch ing and loop ing
Axis Motion Commands and Null Variables
If an un de fined vari able is ref er enced, the vari able is ig nored dur ing pro cess ing of tool mo tion,