Chapter 9 NC Control Function
(3) Other Operation instructions of the NC program
Other instructions of the motion controller are the commands that control the progress of the program that is not
supported by G code, M code, or logical / numerical operation function. Using the variables and instructions, it can
program flexible and complicated forms of operations synchronized with the G / M code.
These operation functions used in the NC program are similar to those used in the motion program but since they
are operated directly in the NC program, it is possible to develop programs that can operate the machine more
flexibly. In terms of the difference from the operation processed in the motion program, the motion program
operates in the fixed cycle mode, while the operation of the NC program is executed through one flow only except
that it is specified as the iteration statement.
The motion controller supports the variables available in the NC program as the macro variables. The macro
variable replaces the part where the variable is used with its own value. By using the macro variable, you can give
flexibility to the machine control through a controller.
1) Variable (#)
1-1) Local variable
#Ni (N = X, D, W, L; i= 1, 2, 3, …)
#N[Expression]
For the variables, # followed by a variable type and a number. Multiple variables are separated by a number
after the #. The constraints on using variables are as follows.
- It is possible to use the variable instead of the value following the address.
Ex.) F[#L103] F100 (when, #L103 = 100)
Z-[#L110] Z-250 (when, #L110 = 250).
- When the variable number is used as the variable
Ex.) #L100 = 105
#L105 = -500
##L100 ; False expression
#[#L100] ; Expressed using brackets.