Siemens SINUMERIK 840DE Programming Manual page 395

Hide thumbs Also See for SINUMERIK 840DE:
Table of Contents

Advertisement

Note
A program header with parameter definitions can also be programmed in the subprogram.
You will find a more detailed description in the Programming Guide "Advanced".
End of subprogram with RET
The instruction RET can also be used in subprograms as a substitute for the backward jump
with M17. RET must be programmed in a separate block. The RET statement is used when
G64 (G641, G642, G643) continuous-path mode is not to be interrupted by a return. This is
only possible if the subprogram has no SAVE attribute.
If M17 is programmed in a separate block, G64 is interrupted and an exact stop generated.
Remedy: Do not write M17 in a subprogram block on its own, instead use it with, for
example, a traverse path: G1 X=YY M17. The following must be set in the machine data: "No
M17 from PLC".
Subprogram name
The subprogram is given a name allowing it to be selected from among the others. The
name can be freely chosen during program creation, taking the following conventions into
account:
• The first two characters must be letters.
• The others can be letters, numerals or underscore characters.
• A maximum of 31 characters can be used.
• No separators are to be used (see the section on "Language elements of the
The same rules apply as to the names of main programs.
Nesting depth
Subprograms can also be called from a subprogram, not only from a main program. In total,
up to 12 program levels are available for this type of nested call, including the main program
level. This means: Up to 11 nested subprogram calls can be issued from the main program.
Fundamentals
Programming Manual, 10.2004 Edition, 6FC5 298-7AB00-0BP1
programming language").
Subprograms and Repetition of Program Sections
11.1 Use of subprograms
11-3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents