EasyManuals Logo
Home>Siemens>Control Unit>SINUMERIK

Siemens SINUMERIK User Manual

Siemens SINUMERIK
300 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #132 background imageLoading...
Page #132 background image
Programming and Operating Manual (Turning)
132 01/2017
Subroutine call
Subroutines are called in a program (main or subprogram) with their names. To do this, a separate block is required.
Example:
N10 L785
; Subprogram call L785
N20 SHAFT7
; Subprogram call SHAFT7
Program repetition P...
If a subroutine is to be executed several times in succession, write the number of times it is to be executed in the block of
the call after the subroutine name under the
address P
. A maximum of
9,999 cycles
are possible (P1 ... P9999).
Example:
N10 L785 P3
; Subprogram call L785, 3 cycles
Nesting depth
Subroutines can also be called from a subroutine, not only from a main program. In total, up to
8 program levels
are
available for this type of nested call, including the main program level.
See the following illustration for execution with 8 program levels:
Information
Modal G functions can be changed in the subroutine, e.g. G90 -> G91. When returning to the calling program, ensure that all
modal functions are set the way you need them to be.
Please make sure that the values of your arithmetic parameters used in upper program levels are not inadvertently changed
in lower program levels.
When working with SIEMENS cycles, up to 7 program levels are needed.
11.16.2
Calling machining cycles (turning)
Functionality
Cycles are technology subroutines that realize a certain machining process. Adaptation to the particular problem is
performed directly via supplying parameters/values when calling the respective cycle.
Programming example
N10 DEF REAL RTP, RFP, SDIS, DP, DTB
N20 G18 X100 Z100
N30 M3 S100 F0.1
N40 G17 X0
N50 CYCLE83(110, 90, 0, -80, 0, -10, 0,
0, 0, 0, 1, 0)
;Call of cycle 83, transfer values directly,
separate block
N60 G0 X100 Z100
N70 RTP=100 RFP= 95.5 SDIS=2.4, DP=-20,
DTB=3
;Set transfer parameters for cycle 82
N80 CYCLE82(RTP, RFP,SDIS, DP, , DTB)
;Call of cycle 82, separate block
N90 M30

Table of Contents

Other manuals for Siemens SINUMERIK

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SINUMERIK and is the answer not in the manual?

Siemens SINUMERIK Specifications

General IconGeneral
BrandSiemens
ModelSINUMERIK
CategoryControl Unit
LanguageEnglish

Related product manuals