Subroutines, Macros
2.11 Calling subroutine with path specification and parameters (PCALL)
Job planning
2-24 Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
2.11 2.11 Calling subroutine with path specification and parameters (PCALL)
Function
With PCALL you can call subroutines with the absolute path and parameter transfer.
Programming
PCALL <path/program_name>(parameter 1, …, parameter n)
Parameters
PCALL Keyword for subroutine call with absolute path name
<path_name> Absolute path name beginning with "/", including subroutine
names
If no absolute path name is specified, PCALL behaves like a
standard subroutine call with a program identifier.
The program identifier is written without the leading _N_ and
without an extension.
If you want the program name to be programmed with the
leading _N_ and the extension, you must declare it explicitly
with the leading _N_ and the extension as Extern.
Parameters 1 to n Current parameters in accordance with the PROC statement of
the subroutine.
Example
PCALL/_N_WKS_DIR/_N_SHAFT_WPD/SHAFT(parameter1, parameter2, ...)
2.12 2.12 Extend search path for subroutine calls with CALLPATH
Function
The CALLPATH command is used to extend the search path for subroutine calls. That
allows you to call subroutines from a non-selected workpiece directory without specifying the
complete absolute path name of the subroutine.
Search path extension precedes the user cycle entry (_N_CUS-DIR).
Deselection of the search path extension
The search path extension is deselected with the following events:
• CALLPATH with empty string
• CALLPATH without parameters
• End of parts program
• Reset