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: Definition operation at the beginning of a program
<program name>: Name of the program
Example
Example 1: Subprogram with PROC operation
Program code Comment
PROC SUB_PROG ; Definition line
N10 G01 G90 G64 F1000
N20 X10 Y20
...
N100 RET ; Subprogram return
Example 2: Subprogram without PROC operation
Program code Comment
N10 G01 G90 G64 F1000
N20 X10 Y20
...
N100 RET ; Subprogram return
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.
Work preparation
3.2 Subprogram technique
NC programming
496 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0