Download Print this page

Siemens Sinumerik 840D Operating Turning page 111

Hide thumbs Also See for Sinumerik 840D:

Advertisement

Usage of subprograms
2.1 Need of subprogram
Certain sections of a program that are to be executed repeatedly are just
programmed once in a seperate NC program called "subprogram file". This
can then be called at any point in the main program file.
The subprogram technique can be used to its advantages if there exists
already a turned part and the programmer needs to complete this work-
piece.
The Sequence of contours of this turned part is written in a subprogram
and then can be called repeatedly for roughing and finishing operations
with two different tools, one for each roughing and finishing.
2.2 The principle of the subprogram technique
The name of the subprogram (here "CONTOUR") acts as an instruction to
jump from the main program to the subprogram.
From now on all the instructions of the subprogram will be executed by the
control unit.
The jump back to the main program, which called up the routine, is initiated
with the instruction "M17".
Main program
SHAFT.MPF
....
N30 T1; roughing
....
N60 G00 X.. Z...
N70 SUBR1
N80 G00 X200 Z300
N90 T2; finishing
....
N120 G00 G42 X... Z...
N130 SUBR1
N140 G00 G40 X200 Z300
N150 M30
If the contour is to be used at various locations of the work piece (e.g. for
special grooves), the contour sequence must be programmed with incre-
mental coordinate values.
For the selection of the name of the subprogram the following must be ob-
served:
The first two characters must be letters.
The name can consist of a maximum of 31 characters, consisting of let-
ters, numbers or underlines.
840D/828D SINUMERIK Operate
Subprogram
Call-up
SUBR1.SPF
N10 G01 X0 Z0
N20 G01 X...
Jump back
N30 G03 X... Z... I... K...
follows after
N40 G01 Z...
M17
N50 G02 X... Z... I...K...
N60 G01 X...
....
N150 G01 X...
N160 M17
Page 3
Section 2
Notes
B508
B508

Advertisement

loading

This manual is also suitable for:

Sinumerik 828d