Definition Of A Subprogram; Subprogram Without Parameter Transfer; Subprogram With Call-By-Value Parameter Transfer (Proc) - Siemens SINUMERIK 840D sl Programming Manual

Nc programming
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Work preparation
3.2 Subprogram technique
3.2.2

Definition of a subprogram

3.2.2.1

Subprogram without parameter transfer

When defining subprograms without parameter transfer, the definition line at the beginning of
the program can be omitted.
Syntax
[PROC <program name>]
...
Meaning
PROC:
<program name>:
Example
Example 1: Subprogram with PROC operation
Program code
PROC SUB_PROG
N10 G01 G90 G64 F1000
N20 X10 Y20
...
N100 RET
Example 2: Subprogram without PROC operation
Program code
N10 G01 G90 G64 F1000
N20 X10 Y20
...
N100 RET
See also
Subprogram call without parameter transfer (Page 522)
3.2.2.2

Subprogram with call-by-value parameter transfer (PROC)

A subprogram with call-by-value parameter transfer is defined using the PROC keyword
followed by the name of the program and a complete list of all the parameters with their type and
name. The definition operation must appear in the first program line.
496
Definition operation at the beginning of a program
Name of the program
Comment
; Definition line
; Subprogram return
Comment
; Subprogram return
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents