NC programming | smart.Turn and DIN/ISO programming
1
46
HEIDENHAIN | User's Manual smart.Turn and DIN Programming | 12/2017
Elements of the NC program
An NC program consists of the following elements:
Program name
Program section codes
Units
NC blocks
Commands for program structuring
Comment blocks
The program name begins with % followed by up to 40 characters
(numbers, uppercase letters or underscore; no diacritics) and the
extension .nc for main programs or .ncs for subprograms. The first
character must be a number or a letter.
Program section codes: When you create a new NC program,
certain program section codes are already entered. You can
add new codes or delete existing ones, depending on your
program requirements. An NC program must contain at least the
MACHINING and END section codes.
The UNIT begins with this keyword followed by the identification
of the unit (ID"G..."). The following lines contain the G, M
and T functions of this machining block. The unit ends with
END_OF_UNIT followed by a check digit.
NC blocks begin with an N followed by a block number (with up
to five digits). The block numbers do not affect the sequence in
which the program blocks are executed. They are only intended
for identifying the individual NC blocks. The NC blocks of the
PROGRAM HEAD and TURRET or MAGAZINE sections are not
included in the block number organization of the editor.
You can use program branches, repeats and subprograms to
structure a program (example: machining the front/back of a bar,
etc.).
Input and output: With inputs you influence the flow of the NC
program. With outputs you can communicate with the machinist.
Example: The machinist is required to check measuring points and
update compensation values.
The skip level influences the execution of individual NC blocks.
Comments are enclosed in brackets [...]. They are located at
the end of an NC block or in a separate NC block. Press the key
combination CTRL + K to convert an existing block into a comment
(and vice versa). You can also enclose more than one program line
in square brackets to mark them as a comment. To do this, enter
a comment containing the character [ and conclude the section by
entering another comment containing the character ].