13. Program Support Functions
13.5 User Macro Specifications
314
Undefined variables
Variables applying with the user macro specifications such as variables which have not been used
even once after the power was switched on or local variables not quoted by the G65, G66 or G66.1
commands can be used as <vacant>. Also, variables can forcibly be set to <vacant>. Variable #0 is
always used as the <vacant> variable and cannot be defined in the left-side member.
(1) Arithmetic
expressions
#1 = #0 ; ................... #1 = <vacant>
#2 = #0 + 1 ; ............. #2 = 1
#3 = 1 + #0 ; ............. #3 = 1
#4 = #0
∗
10 ; ............. #4 = 0
#5 = #0 + #0 ; ........... #5 = 0
It should be borne in mind that <vacant> in an arithmetic expression is
handled in the same way as 0.
<Vacant> + <Vacant> = 0
<Vacant> + <Constant> = Constant
<Constant> + <Vacant> = Constant
(2) Variable
quotations
When undefined variables only are quoted, they are ignored up to the address.
When #1 = <Vacant>
G0 X#1 Y1000 ;................Equivalent to G0 Y1000 ;
G0 X#1 + 10 Y1000 ; .......Equivalent to G0 X10 Y1000 ;
(3) Conditional
expressions
<Vacant> and 0 are not equivalent for EQ and NE only. (#0 means <vacant>.)
When #101 = <Vacant>
When #101 = 0
#101 EQ #0
<Vacant> = <Vacant> established
#101 EQ #0
0 = <Vacant> not established
#101 NE 0
<Vacant>
≠
0 established
#101 NE 0
0
≠
0 not established
#101 GE #0
<Vacant>
≥
<Vacant> established
#101 GE #0
0
≥
<Vacant> established
#101 GT 0
<Vacant> > 0 not established
#101 GT 0
0 > 0 not established
#101 LE #0
<Vacant>
≤
<Vacant> established
#101 LE #0
0
≤
<Vacant> established
#101 LT 0
<Vacant> < 0 not established
#101 LT 0
0 < 0 not established
(Note 1)
EQ and NE should be used only for integers. For comparison of numeric values with
decimals, GE, GT, LE, and LT should be used.