Chapter 9 NC Control Function
9.2 Configuration of the Program
9.2.1 NC Program
The NC program is a file consisting of the commands with control information about the axis. NC program can be
added to 'Motion data - NC program' in XG5000. The NC program is used in the form of „program name.extension‟
when saving the NC program as a file, and the file name extension of the NC program used is „nc‟. The NC program is
divided into two types, "main program" and "sub program", depending on the nature of the file.
The name of the "main program" can be assigned by a user with any name. For example, such as "main.nc" or "main
control .nc", any name can be applied in English or Korean. The "subprogram" can be named using the four-digit
numbers. (Eg: 1234) The "subprogram" can be disabled as needed, and the nested call is allowed up to 9 levels.
(1) Main program
The main program is the program that controls the whole flow of the motion program. The name of the main
program can be written in any name and in the case of the nested call, there are 10 levels based on the main.
(2) Subprogram
The subprogram is executed by the main program‟s call, and the only 4-digit numbers can be applied to the program
file name. (0000 to 9999) The extension is the "nc" which is the same as the main program. The subprogram can be
called directly from the main program so it must be written in numeric names only and distinguished by them.
9.2.2 Configuration of the NC Program
(1) Basic configuration of the program
The NC program is created with various instructions (G / M codes and instructions) that can be recognized by the
motion controller and it consists of a set of blocks with the information for each operation command.
The NC program is written in the ST language. If the character that is not specified by the NC command (G / M
codes and instructions) is used, an error occurs. The program starts with the first block one by one.
Program
Block
Block
Block
Block
.
.
.
Block
Block
Program direction