2-235MACHINE OPERATIONS OPERACIONES DE MECANIZADO
9-22 M98/198 Sub-Program Call M99 Return from Sub-Program End
M98/198 Llamada al subprograma M99 Finalización del subprograma
When carrying out machining on a machine
equipped with the bar feeder or the loader, for exam-
ple, the same machining cycle is repeated to
machine the workpieces. When performing such
operations, the portion of the program executed
repeatedly can be stored in the NC memory as a
sub-program and the sub-program program number
and the number of times the sub-program should be
called can be specified in the main program.
Cuando realice el mecanizado en una máquina equipada con
alimentador de barras o cargador, por ejemplo, el mismo ciclo
de mecanizado se repetirá para mecanizar las piezas. Al lle-
var a cabo esta operación, la parte del programa ejecutado
repetidamente podrá almacenarse en la memoria del CN
como subprograma y el número de programa del subpro-
grama así como el número de veces que se llamará al subpro-
grama se especifican en un programa principal.
Specify M98 in the format below. Especifique M98 en el siguiente formato.
1. It is possible to specify sub-program call
from one sub-program to the other as illus-
trated below. This is called nesting and
allowable nesting level is eight. If sub-pro-
gram call exceeds this limit, alarm number
(P230) is displayed.
2. If the main program is stored in a data
server, specify the M98 command in the
TAPE mode. If the main program is stored
in NC memory, specify the M98 or M198
command in the MEMORY mode.
NOT A
1. Es posible especificar la llamada al subprograma
de un subprograma a otro tal y como se muestra
a continuación. Este proceso se denomina jerar-
quización y el número máximo de niveles jerar-
quizados es ocho. Si la llamada al subprograma
excede dicho límite, aparecerá en pantalla el
número de alarma (P230).
2. Si el programa principal se guarda en un servidor
de datos, especifique el comando M98 en el
modo CINTA. Por otra parte, cuando el programa
principal se guarda en la memoria CN, especifi-
que los comandos M98, o bien M198 en el modo
MEMORIA.
Main
Program
Programa
principal
Sub-
Program 1
Subprograma
1
Sub-Program 2 to 6
Subprogramas 2 a 6
Sub-
Program 7
Subprograma
7
Sub-
Program 8
Subprograma
8
1st Call
1a llamada
2nd Call
2a llamada
7th Call
Septimo llamada
8th Call
Octavo llamada
By storing the portion of the program to be
executed repeatedly as a sub-program,
required memory capacity can be reduced and
programming errors can be reduced
accordingly.
Al almacenar la parte del programa que se ejecutará
repetidamente como subprograma, la capacidad de
memoria requerida podrá reducirse y los errores de
programación podrán reducirse consecuentemente.
M98 P_ H_ L_ ;
• P . . . . . . . . . . . Specifies sub-program number. Especifica el número de subprograma.
• H . . . . . . . . . . . Specifies the sequence number in the
sub-program.
Especifica el número de secuencia del
subprograma.
• L . . . . . . . . . . . Specifies the number of sub-program
calls.
Especifica el número de llamadas de
subprograma.
1. If the sub-program number specified by
address P is not found, an alarm message
(P232) is displayed on the screen.
2. If the sequence number specified by
address H is not found, an alarm message
(P231) is displayed on the screen.
3. If "L0" is specified, the M98 block contain-
ing such L command is not executed and
the execution of program jumps to the next
block.
NOT A
1. Si no puede encontrar el número de subpro-
grama especificado por la dirección P, se visua-
liza en pantalla un mensaje de alarma (P232).
2. Si no se encuentra el número de secuencia espe-
cificado por la dirección H, aparece en la pantalla
el mensaje de alarma (P231).
3. Si se especifica "L0", el bloque M98 que contiene
esta instrucción L no se ejecuta y la ejecución del
programa salta hasta el bloque siguiente.