Flexible NC programming
1.25 Subprogram technique
Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
193
Example: Calling a contour with cycle programming from ISO mode
Program code Comments
0122_SPF ; Contour description in the ISO mode
N1010 G1 X10 Z20
N1020 X30 R5
N1030 Z50 C10
N1040 X50
N1050 M99
N0010 DEF STRING[5] PROGNAME = “0122“ ; Siemens part program
(cycle)
...
N2000 R11 = $AA_IW[X]
N2010 ISOCALL PROGNAME
N2020 R10 = R10+1 ; Execute program 0122.spf in the ISO
mode
...
N2400 M30
1.25.3.8 Calling subroutine with path specification and parameters (PCALL)
Function
With PCALL you can call subprograms with the absolute path and parameter transfer.
Syntax
PCALL <path/program name>(<parameter 1>,…,<parameter n>)
Significance
PCALL: Keyword for subprogram call with absolute path name
<path/program name>: Absolute path name beginning with "/", including
subprogram names
If no absolute path name is specified,
PCALL behaves like
a standard subprogram call with a program identifier.
The program identifier is written without the leading _N_
and without an extension.
If the program name is to be programmed with leading
character and extension, then it must be explicitly
declared with leading character and extension using the
EXTERN command.
<parameter 1>, etc.: Actual parameters in accordance with the PROC operation
of the subprogram.