31
When the value of the variable is not defined, such a variable as a "null" variable. Variable # 0 is always
empty variable. It can not be written, only read.
a) references
When an undefined variable is referenced, the address itself is also ignored.
(b) Operational
In addition to using the <empty> assignment, the remaining cases <empty> same as 0.
(c) conditional expression
EQ and NE in the <empty> is different from zero.
Restrictions: program number, sequence number and optional block skip numbers can not use variables.
Do not use a variable in the following ways. For example:
O#1
/#2G00X100.0
N#3Z200.0
12.4.1 System Variables
System variables are used to read and write internal NC data. For example: tool offset values and current
position data. However, some system variables can only be read. System variables is the basis for automatic
control and general machining program development.
12.4.2 Arithmetic and Logic Operations
The following table lists the operation can be performed in a variable. Expression right of the operator can
contain constants and / or variables by a function or operator thereof. Expressions variables #j and #k can be
assigned by a constant. Variables on the left can also be assigned with the expression.
CNC is on rounding when dealing with numerical operations, integer operations generated if the absolute
value is greater than the absolute value after the original number; If less than the absolute value of the original
number is rounded down. For negative numbers should be treated with care.
12.4.3 NC Statements and Macro Statements
The following program segment macro statement:
1. Include the arithmetic or logic operation (=) block.
2. Include control statements (for example, GOTO, DO, END) block.
3. Include macro call instruction (for example, with G65, G66, G67, or other G codes M code that
calls a macro program) segment
4. In addition to the macro block any program statements are NC statements.
12.4.4 Transfer and Recycling
In the process, use the GOTO statement and IF statement can change the flow of control. There are three
transfers and recycling operations are available.
Transfer and circulation: GOTO statement (unconditional)
IF statement (conditional branch IF THEN)
WHILE statement (cycle time)
1. Unconditional Branch (GOTO Statement)
Transferred to a labeled sequence number n block. When specifying the sequence number 1-99999 outside
occurs when P / S alarm. Available expressions specify the order number.
GOTO n n: Sequence number (1-99999)
For example:
GOTO1
GOTO#1O