EasyManua.ls Logo

Siemens SINUMERIK 840D

Siemens SINUMERIK 840D
598 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
Loading...
2
Subprograms, Macros 12.98
2.4 Callin
g
sub
p
ro
g
rams
2
840D
NCU 571
840D
NCU 572
NCU 573
FM-NC 810D 840Di
Siemens AG 2000. All rights reserved
2-102
SINUMERIK 840D/840Di/810D/FM-NC Programming Guide Advanced (PGA)
04.00 Edition
Example:
Subprogram
PROC SUB1 (INT VAR1, DOUBLE VAR2)
IF $P_SUBPAR[1]==TRUE
;Parameter VAR1 was not
;in the subprogram call
ELSE
;Parameter VAR1 was not
;programmed in the subprogram call
;and was preset by the system
;with default value 0
ENDIF
IF $P_SUBPAR[2]==TRUE
;Parameter VAR2 was not
;in the subprogram call
ELSE
;Parameter VAR2 was not
;programmed in the subprogram call
;and was preset by the system
;with default value 0.0
ENDIF
;Parameter 3 is not defined
IF $P_SUBPAR[3]==TRUE -> Alarm 17020
M17
Calling the main program as a subprogram
A main program can also be called as subprogram.
The end of program M2 or M30 set in the main
program is evaluated as M17 in this case (end of
program with return to the calling program).
Program the call by specifying the program name.
Example:
N10 MPF739
or
N10 SHAFT3
Main program
N10 MPF739
or
N10SHAFT3
Additional main
program
N10...
.
.
.
N50 M30
A subprogram can also be started as a main
program.

Table of Contents

Other manuals for Siemens SINUMERIK 840D

Related product manuals