Programming manual
CNC 8055
CNC 8055i
PROGR
A
M CONTR
O
L
INSTRUCTIONS
14.
·M· & ·EN· M
ODELS
S
OFT
: V02.2
X
·401·
Sub
routine
i
n
stru
ctio
ns
14.5
Subroutine instructions
A subroutine is a part of a program which, being properly identified, can be called from any position
of a program to be executed.
A subroutine can be kept in the memory of the CNC as an independent part of a program and be
called one or several times, from different positions of a program or different programs.
Only subroutines stored in the CNC's RAM memory can be executed. Therefore, to execute a
subroutine stored in the hard disk (KeyCF) or in a PC connected through the serial line, copy it first
into the CNC's RAM memory.
If the subroutine is too large to be copied into RAM, it must be converted into a program and then
the EXEC instruction must be used.
(SUB integer)
The SUB instruction defines as subroutine the set of program blocks programmed next until reaching
the RET subroutine. The subroutine is identified with an integer which also defines the type of
subroutine; either general or OEM.
The OEM subroutines are treated like the general ones, but with the following restrictions:
• They can only be defined in OEM programs, having the [O] attribute. Otherwise, the CNC will
display the corresponding error.
Error 63: Program subroutine number 1 thru 9999.
• To execute an OEM subroutine using CALL, PCALL or MCALL, it must be inside an OEM
program. Otherwise, the CNC will display the corresponding error.
Error 1255: Subroutine restricted to an OEM program.
There can not be two subroutines with the same identification number in the CNC memory, even
when they belong to different programs.
( RET )
The mnemonic RET indicates that the subroutine which was defined by the mnemonic SUB, finishes
in this block.
Range of general subroutines
SUB 0000 - SUB 9999
Range of OEM (manufacturer's) subroutines
SUB 10000 - SUB 20000
(SUB 12)
G91 G01 XP0 F5000
YP1
X-P0
Y-P1
(RET)
; Definition of subroutine 12
; End of subroutine
Содержание 8055 M
Страница 1: ...CNC 8055 M EN Programming manual Ref 1711 Soft V02 2x...
Страница 8: ...8 Programming manual CNC 8055 CNC 8055i SOFT V02 2X...
Страница 12: ...12 CNC 8055 CNC 8055i Declaration of conformity and Warranty conditions...
Страница 16: ...16 CNC 8055 CNC 8055i Version history...
Страница 22: ...22 CNC 8055 CNC 8055i Returning conditions...
Страница 24: ...24 CNC 8055 CNC 8055i Additional notes...
Страница 26: ...26 CNC 8055 CNC 8055i Fagor documentation...
Страница 238: ...238 Programming manual CNC 8055 CNC 8055i 11 IRREGULAR POCKET CANNED CYCLE M EN MODELS SOFT V02 2X 2D pockets...
Страница 284: ...284 Programming manual CNC 8055 CNC 8055i 11 IRREGULAR POCKET CANNED CYCLE M EN MODELS SOFT V02 2X 3D pockets...
Страница 336: ...336 Programming manual CNC 8055 CNC 8055i 12 PROBING M EN MODELS SOFT V02 2X PROBE 12 Tabletop probe calibration...
Страница 394: ...394 Programming manual CNC 8055 CNC 8055i 13 HIGH LEVEL LANGUAGE PROGRAMMING M EN MODELS SOFT V02 2X Expressions...
Страница 442: ...442 Programming manual CNC 8055 CNC 8055i 15 COORDINATE TRANSFORMATION M EN MODELS SOFT V02 2X TCP Transformation G48...
Страница 448: ......
Страница 454: ...454 Programming manual CNC 8055 CNC 8055i B M EN MODELS SOFT V02 2X Program control instructions...
Страница 462: ...462 Programming manual CNC 8055 CNC 8055i C M EN MODELS SOFT V02 2X Summary of internal CNC variables...
Страница 463: ...Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X 463 Key code KEY CODE Alpha numeric keyboard and monitor...
Страница 464: ...464 Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X Key code...
Страница 465: ...Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X 465 Key code Alphanumeric operator panel...
Страница 466: ...466 Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X Key code MC operator panel...
Страница 467: ...Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X 467 Key code...
Страница 468: ...468 Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X Key code...
Страница 469: ...Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X 469 Key code MCO TCO operator panel...
Страница 470: ...470 Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X Key code Alphanumeric keyboard...
Страница 471: ...Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X 471 Key code 11 LCD Monitor...
Страница 472: ...472 Programming manual CNC 8055 CNC 8055i D M EN MODELS SOFT V02 2X Key code...
Страница 478: ...478 Programming manual CNC 8055 CNC 8055i F M EN MODELS SOFT V02 2X Maintenance...
Страница 479: ...Programming manual CNC 8055 CNC 8055i F SOFT V02 2X 479...
Страница 480: ...480 Programming manual CNC 8055 CNC 8055i F SOFT V02 2X...
Страница 481: ......