EasyManua.ls Logo

Fagor 8055 M - Local Subroutines Within a Program

Fagor 8055 M
482 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Programming manual
CNC 8055
CNC 8055i
CREATING A PROGRAM
2.
·M· & ·EN· MODELS
SOFT: V02.2X
·37·
Local subroutines within a program
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

Table of Contents

Related product manuals