Chapter 9 NC Control Function
(2) Configuration of Blocks
It consists of the basic NC commands and command information for driving the machine.
One block corresponds to one line of the program. The maximum number of the characters that can be used in a
block is 300, including the space characters. A maximum of 10 NC commands can be used per one block. When the
number of characters available in one block or the limit of the NC command is exceeded, an error occurs.
Preparatory command
(G/M codes and
commands)
Command information
(Command information of the
coordinate)
Auxiliary command
(G/M codes and
commands)
The blocks of the NC program are normally input as shown in the table above. Unless there is a particularly limited
notation in the same block, the order of each motion command does not matter. However, it is executed in the order
of command, and for the Modal command, it continues to run until another NC command is made.
At the head of each block, there is a Statement Number which contains the motion control‟s sequence information.
The Statement Number is often referred in the GOTO and CALL instructions, and does not have to be used unless it
is necessary. The Statement Number can also be written alone in a block.
The command information depends on the preparatory commands (G / M codes and instructions) used earlier.
Although you do not use the command information, no error will occur. However, even if you need the command
information, the preparatory commands that do not use the command information will be ignored.
The auxiliary commands (G / M codes and instructions) are used with the preparatory commands to further refine
the operating information of the preparatory commands.
(3) The main program and the subprogram
Basically, you can configure and control the NC program with the main program only. However, if a series of
identical commands or control intervals are repeated, you can make such parts into the subprogram and call it in
case of necessity. When the subprogram is called, the details of the subprogram will run thereafter. When all
commands of the subprogram have been executed, the details of the main program will run again.
.
.
.
.
.
CALL P1111
.
.
CALL P1111
.
.
CALL P2222
.
.
.
.
.
Sub program '1111'
Sub program '2222'
Main program 'main'