Flexible NC programming
1.25 Subprogram technique
Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
169
Examples
Example 1: Suppress current block display in the cycle
Program code Comments
PROC CYCLE (AXIS TOMOV, REAL POSITION) SAVE DISPLOF ; Suppress current block display
Instead, the cycle call should be
displayed, e.g.: CYCLE(X,100.0)
DEF REAL DIFF ; Cycle contents
G01 ...
...
RET ; Subprogram return jump. The block
following the cycle call is
displayed in the block display.
Example 2: Block display for alarm output
Subprogram SUBPROG1 (with
ACTBLOCNO):
Program code Comments
PROC SUBPROG1 DISPLOF ACTBLOCNO
N8000 R10 = R33 + R44
...
N9040 R10 = 66 X100 ; Output Alarm 12080
...
N10000 M17
Subprogram SUBPROG2 (without
ACTBLOCNO):
Program code Comments
PROC SUBPROG2 DISPLOF
N5000 R10 = R33 + R44
...
N6040 R10 = 66 X100 ; Output Alarm 12080
...
N7000 M17