Flexible NC programming
1.25 Subprogram technique
Job planning
170 Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
Main program:
Program code Comments
N1000 G0 X0 Y0 Z0
N1010 ...
...
N2050 SUBPROG1 ; Alarm output = "12080 channel K1 block N9040 syntax
error for text R10="
N2060 ...
N2350 SUBPROG2 ; Alarm output = "12080 channel K1 block N2350 syntax
error for text R10="
...
N3000 M30
Example 3: Revoking suppression of the current block display
Subprogram SUB1 with suppression:
Program code Comment
PROC SUB1 DISPLOF ; Suppress current block display in SUB1 subprogram.
Instead, the block is to be displayed with the SUB1
call.
...
N300 SUB2 ; Call subprogram SUB2.
...
N500 M17
Subprogram SUB2 without suppression:
Program code Comment
PROC SUB2 DISPLON ; Revoke suppression of the current block display in
subprogram SUB2.
...
N200 M17 ; Return to subprogram SUB1. Suppression of the
current block display is restored in SUB1.