4.11.5.1 M95: Sectional Program Cycle


Format:

M95 P_P_L


In the editor program execution mode, the M95 instruction can repeatedly execute a certain section program in the same program, from N_start (that is, the first P_ value) to N_end (that is, the second P_ value) L_ times. This section program needs to be before the M95 instruction. If the second P_ value is not given, it will regard the previous behavior of the M95 instruction as N_end.


Example:

program SAMPLE95.CNC                explain

___________________________________________________________

;SAMPLE OF M95 CALL    ;

N10 M_                 ;

N20 G_Y_               ;Begin number 1(N20

N30 X_                 ;Begin number 2(N30

N40 G_X_               ;

N50 Y_                 ;

N60 Z_                 ;complete number 2(N60

N70 X_                 ;

N80 M95 P30 P60 L5     ;Call execution from N30 to N60,five times

N90 G_X_Y_             ;complete number 1(N90

M95 P20                ;Call execution from N20 to N90,once

M95 P30 P60 L2         ;Call execution from N30 to N60,twice

M02                    ;program complete