PROGRAMMING16. 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;.
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
When #1 = <vacant > When #1 = 0
G90 X100 Y#1
G90 X100 Y#1
G90 X100 Y0
D Range of variable values
D Omission of the decimal
D Referencing variables
D Undefined variable