Programming manual
CNC 8055
CNC 8055i
PROGRAM CONTROL INSTRUCTIONS
14.
·M· & ·EN· MODELS
SOFT: V02.2X
·405·
Subroutine instructions
14.5.1 Calls to subroutines using G functions
Subroutine calls are made using the CALL and PCALL instructions. In addition to using these
statements, it is also possible to make subroutine calls using specific G functions. This way, the calls
to subroutines are more similar to machine tool language.
Functions G180-G189 and G380-G399 can call the associated OEM and user subroutine as long
as they are global subroutines. G functions cannot be used to call local subroutines.
Up to 30 subroutines may be defined and associated with functions G180-G189 and G380-G399,
and it is also possible to initialize local parameters for each subroutine.
When executing one of these functions, its associated subroutine will be executed.
Functions G180-G189 and G380-G399 are not modal.
Programming format
The programming format is the following:
G180 <P0..Pn>
<P0..Pn> Optional. Initializing parameters.
Example:
G183 P1=12.3 P2=6
G187 A12.3 B45.3 P10=6
Defining local parameters.
The values of the parameters are defined after the call function and they may be defined using the
name of the parameter (P0-P25) or using letters (A-Z) so "A" is the same as P0 and "Z" is the same
as P25.
Plus, parameters may also be programmed as follows:
• S=P100
•SP100
In either case, local parameter P18(S) would assume the established global parameter value P100.
The definitions described here may be combined in the same block.
Nesting levels
If the functions initialize local parameters, this instruction generates a new nesting level .
The maximum parameter nesting level is 6, within the 15 nesting level of the subroutines, just like
PCALL instructions.
Identification via PLC
All the G functions are identified through GGS* read-only variables . GGSH and GGSP read-only
variables are used to identify the new G functions via PLC; these variables return the status of the
G functions.
Executing a call
Each function G180-G189 and G380-G399, has its corresponding subroutine associated with it.
Calling a G function means calling the subroutine of the same name.