Programming manual.
CNC 8070
7.
THE SPINDLE. BASIC CONTROL.
M functions with an associated subroutine.
·136·
(REF: 1709)
7.6 M functions with an associated subroutine.
M3, M4, M5, M19 and M41 to M44 may have a subroutine associated with them that the CNC
executes instead of the function. Although a function may affect more than one spindle in
the same block, the CNC only executes the subroutine once per block.
If, within a subroutine associated with an "M" function, the same "M" function is programmed,
The CNC will executed it; but not its associated subroutine. When a spindle M function is
programmed inside the subroutine, it will be applied to the spindles programmed in the
subroutine block itself. If the subroutine block does not indicate which spindles the function
is for, the CNC will assume that it is for the spindles programmed in the subroutine calling
block.
The CNC relates the functions with the spindles according to the following criterion, whether
it is in the calling block or inside the subroutine.
• If the M function is assigned to a spindle (for example, M3, S), the CNC only applies the
function to the indicated spindle.
• If functions M3 and M4 are not assigned to any spindle, the CNC applies them to all the
spindles whose speed has been programmed in the block and have not been assigned
to another M function. If there are no spindles with programmed speed, the CNC applies
them to the master spindle.
• If function M19 is not assigned to any spindle, the CNC applies them to all the spindles
whose speed has been programmed in the block and have not been assigned to another
M function.
• If functions M5 and M41 to M44 are not assigned to any spindle, the CNC applies them
to the master spindle.
Inside the subroutine, the CNC applies this criterion to all the programmed spindle M
functions, not only to the M functions that correspond to the calling block.