16. CUSTOM MACRO
Local and common variables can have value 0 or a value in the following
If the result of calculation turns out to be invalid, an P/S alarm No. 111
When a variable value is defined in a program, the decimal point can be
When #1=123; is defined, the actual value of variable #1 is 123.000.
To reference the value of a variable in a program, specify a word address
followed by the variable number. When an expression is used to specify
a variable, enclose the expression in brackets.
A referenced variable value is automatically rounded according to the
least input increment of the address.
When G00X#1; is executed on a 1/1000–mm CNC with 12.3456
assigned to variable #1, the actual command is interpreted as
To reverse the sign of a referenced variable value, prefix a minus sign (–)
When an undefined variable is referenced, the variable is ignored up to an
When the value of variable #1 is 0, and the value of variable #2 is null,
execution of G00X#1Y#2; results in G00X0;.
For two–path control, macro variables are provided for each path. Some
common variables, however, can be used for both paths, by setting
parameters No. 6036 and 6037 accordingly.
When the value of a variable is not defined, such a variable is referred to
as a “null” variable. Variable #0 is always a null variable. It cannot be
written to, but it can be read.
When an undefined variable is quotated, the address itself is also
[Example] When #1 is 0 and #2 is null, the result of executing G00
X#1 Y#2; will be the same as when G00 X0; is executed.
D Range of variable values
D Omission of the decimal
D Referencing variables
D Common custom macro
variables for tow paths
D Undefined variable