Siemens SINUMERIK 840DE Programming Manual page 397

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

Advertisement

Example of R parameter transfer
N10 G0 X0 Y0 G90 T1
N20 R10=10 R11=20
N30 RECTANGLE
N40 G0 X50 Y50 G90
N50 RECTANGLE
N60 M30
Calling main program as subprogram
A main program can also be called as a subprogram. The end of program set in the main
program M30 is evaluated as M17 in this case (end of program with return to calling
program). You program the call specifying the program name. Example: N10 MPF739 or
N10 WELLE3
A subprogram can also be started as a main program.
Fundamentals
Programming Manual, 10.2004 Edition, 6FC5 298-7AB00-0BP1
Subprograms and Repetition of Program Sections
;Tool T1 in rapid traverse to the
first ;position, absolute dimension
;Describe ;arithmetic parameters R10
and R11
;Call the rectangle subprogram
;"RECTANGLE.SPF" with
;transfer of R parameters:
N15 G1 X=R10 G91 F500
N25 Y=R11
N35 X=-R10
N45 Y=-R11
N55 M17 ;End of subprogram
;Position tool at the next
;machining position
;Call the rectangle subprogram
;"RECTANGLE.SPF" with
;transfer of R parameters
;End of main program
11.2 Subprogram call
11-5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents