Programming manual
CNC 8055
CNC 8055i
CREATIN
G A PR
OGRAM
2.
·M· & ·EN· M
ODELS
S
OFT
: V02.2
X
·37·
Lo
cal subrou
ti
nes within
a pro
g
ram
2.2
Local subroutines within a program
A subroutine is a part of a program which, being properly identified, can be called from any position
of a program to be executed.
Local subroutines may be defined within a program. These subroutines are executed from RAM or
hard disk memory.
The local subroutines are defined as part of a program. These subroutines may only be called upon
from the program where it has been defined.
Programming
The local subroutines are located at the beginning of the program, before the actual beginning of
the program. Local subroutines are defined by programming (LSUB n), where n indicates the
subroutine number. Followed by the contents of the subroutine.
The range of local subroutines is from 0 to 9999.
(LSUB 0)
(LSUB 9999)
The actual beginning of the program is identified with the % sign. Any text may follow this character.
A local subroutine may be called upon using the commands CALL, PCALL or MCALL. When
executing the calls, it first looks for the subroutines defined as local in that program and having
matching names. If there aren't any, it will look among the global subroutines.
To execute a local subroutine directly, program (LL n). This way, only the local subroutine will be
executed. If this subroutine does not exist, it will not execute anything and it will issue an error
message indicating undefined subroutine.
Up to 100 local subroutines may be defined in a program. The maximum local subroutine nesting
level is 15.
Examples:
Example 1:
(LSUB9505)
X100
(RET)
%**** ; beginning of program
(CALL 9505)
M30
Example 2:
(LSUB9505)
X100
(RET)
%**** ; beginning of program
(LL9505)
M30
Summary of Contents for 8055 EN
Page 1: ...CNC 8055 M EN Programming manual Ref 1711 Soft V02 2x...
Page 8: ...8 Programming manual CNC 8055 CNC 8055i SOFT V02 2X...
Page 12: ...12 CNC 8055 CNC 8055i Declaration of conformity and Warranty conditions...
Page 16: ...16 CNC 8055 CNC 8055i Version history...
Page 22: ...22 CNC 8055 CNC 8055i Returning conditions...
Page 24: ...24 CNC 8055 CNC 8055i Additional notes...
Page 26: ...26 CNC 8055 CNC 8055i Fagor documentation...
Page 448: ......
Page 464: ...464 Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X Key code...
Page 466: ...466 Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X Key code MC operator panel...
Page 467: ...Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X 467 Key code...
Page 468: ...468 Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X Key code...
Page 471: ...Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X 471 Key code 11 LCD Monitor...
Page 472: ...472 Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X Key code...
Page 478: ...478 Programming manual CNC 8055 CNC 8055i F M EN MODELS SOFT V02 2X Maintenance...
Page 479: ...Programming manual CNC 8055 CNC 8055i F SOFT V02 2X 479...
Page 480: ...480 Programming manual CNC 8055 CNC 8055i F SOFT V02 2X...
Page 481: ......