Flexible NC programming
1.25 Subprogram technique
Job planning
172 Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
Significance
PREPRO: Keyword for identifying all files (of the NC programs stored in the cycle
directories) prepared during power up
Read subprogram with preparation and subprogram call
The cycle directories are processed in the same order both for subprograms preprocessed
with parameters during power up and during subprogram call.
1. _N_CUS_DIR user cycles
2. _N_CMA_DIR manufacturer cycles
3. _N_CST_DIR standard cycles
In the case of NC programs sharing the same name but having different characteristics, the
first
PROC operation found is activated and the other PROC operation is overlooked without an
alarm message.
1.25.2.8 Subprogram return M17
Function
The return command M17 (or the part program end command M30) appears at the end of a
subprogram. It prompts the return to the calling program at the part program block following
the subprogram call.
Note
M17 and M30 are treated as equivalents in the NC language.
Syntax
PROC <program name>
...
M17/M30
General conditions
Effect of the subprogram return on continuous-path mode
If
M17 (or M30) appears on its own in the part program block, active continuous-path mode in
the channel will be interrupted.
To avoid continuous-path mode being interrupted,
M17 (or M30) has to be included in the last
traversing block. Furthermore, the following machine data must be set to "0":
MD20800 $MC_SPF_END_TO_VDI = 0 (no M30/M17 output to the NC/PLC interface)