Example
Program code Comment
EXAMPLE.MPF
…
N3000 START_CYC(parm1, param2, …)
N3010 TECH_CYC1(param1, param2, …)
N3020 TECH_CYC2(param1, param2, …)
N3030 TECH_CYC3(param1, param2, …)
N3040 END_CYC(param1, param2, …)
N3040 END_CYC(param1, param2, …)
N3050 …
N4500 START_CYC(param11, param12, …)
N4510 …
N4590 END_CYC(param11, param12, ..)
N5000 …
…
N6000 M30
Program code Comment
PROC END_CYC(…) ; Call in the main program, line N3040
N10000 …
N15000 if status == 1
N15010 RETB(“START_CYC”) ; Return jump to the calling program EXAMPLE.MPF
; Search for character string "START_CYC"
; Search direction: backward in the program start
direction
; Program processing is continued with line N3000
N15020 endif
N15030 if status == 0
N15040 RET ; Return jump to the calling program EXAMPLE.MPF
; Program processing is continued with line N3050
N15050 endif
N16000 RET(“START_CYC”) ; Return jump to the calling program EXAMPLE.MPF
; Search for character string "START_CYC"
; Search direction: forward in the program end di-
rection
; Program processing is continued with line N4500
N17060 RETB ; Return jump to the calling program EXAMPLE.MPF
; Program processing is continued with line N3050
; RETB without parameter is identical to RET
Work preparation
3.2 Subprogram technique
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0 521