Turning Part 2: Programming (Siemens instructions)
Programming and Operating Manual, 05/2012, 6FC5398-5DP10-0BA0
7
Programming principles
1
1.1 Fundamentals of programming
1.1.1 Program names
Each program must have a program name. The program name must follow the conventions
below:
● Use only English letters or numbers for a program name, if the user interface language is
English; use only Chinese letters or numbers for a program name, if the user interface
language is Chinese.
● Separate the file extension of a subprogram name only with a decimal point
● Use a maximum of 24 English characters or of 12 Chinese characters for a program
name
NOTICE
It is not recommended that you use a special character for the first character of a
program name.
When you create a new main program, it is not necessary to enter the file extension
".MPF". When you desire to create a subprogram, you must enter the file extension
".SPF".
Examples
WORKPIECE527
1.1.2 Program structure
Structure and content
The NC program consists of a sequence of blocks (see the table below). Each block
represents a machining step. Instructions are written in the blocks in the form of words. The
last block in the execution sequence contains a special word for the end of the program, for
example, M2.
The table below shows you an example of the NC program structure.
Block Word Word Word ... ; Comment
Block N10 G0 X20 ... ; First block
Block N20 G2 Z37 ... ; Second block
Block N30 G91 ... ... ; ...
Block N40 ... ... ...
Block N50 M2 ; End of program