M Codes
1 7 2
96-8000 rev R June 2007
M95 (12:30)
The line(s) following the M95 should be axis moves and spindle warm-up commands.
M96 Jump If No Input
P
Program block to go to when conditional test is met
Q
Discrete input variable to test (0 to 63)
This code is used to test a discrete input for 0 (off) status. This is useful for checking the status of automatic work
holding or other accessories that will generate a signal for the control. The Q value must be in the range 0 to 63,
which corresponds to the inputs found on the diagnostic display (The upper left input is 0 and the lower right is
input 63. When this program block is executed and the input signal specified by Q has a value of 0, the program
block Pnnnn is performed (the Pnnnn line must be in the same program).
M96 Example:
N05 M96 P10 Q8
(Test input #8, Door Switch, until closed);
N10
(Start of program loop);
.
.
(Program that machines part);
.
N85 M21
(Execute an external user function)
N90 M96 P10 Q27
(Loop to N10 if spare input [#27] is 0);
N95 M30
(If spare input is 1 then end program);
M97 Local Sub-Program Call
This code is used to call a subroutine referenced by a line number (N) within the same program. A code is required
and must match a line number within the same program. This is useful for simple subroutines within a program;
does not require a separate program. The subroutine must end with an M99. An Lnn code in the M97 block will
repeat the subroutine call that nn times.
M97 Example:
O0001
M97 P1000 L2
(L2 command will cause the program to run the N1000 line twice)
M30
N1000 G00 G90 G55 X0 Y0
(N line that will run after M97 P1000 is run)
S500 M03
G43 H01 Z1.
Z-.5
G01 G41 X.5 F100.
G03 YI-.5
G01 X0 G40
Z1. F50.
G91 G28 Z0
G90
M99
M98 Sub Program Call
This code is used to call a subroutine, the format is M98 Pnnnn (Pnnnn is the number of the program being called).
The subprogram must be in the program list, and it must contain an M99 to return to the main program. An Lnn
count can be put on the line containing the M98 and will cause the subroutine to be called nn times before continu-
ing to the next block.
O0001
(Main Program number)
M98 P100 L4;
(Call Sub-program, Sub-program Number, Loop 4 Times)
M30
(End of program)
Содержание Mill
Страница 12: ...96 8000 rev R June 2007 Safety 5 ...
Страница 14: ...96 8000 rev R June 2007 Safety 7 LATHE WARNING DECALS ...
Страница 15: ...8 Safety 96 8000 rev R June 2007 ...
Страница 17: ...10 Introduction 96 8000 rev R June 2007 ...
Страница 117: ...110 4 5 Axis Programming 96 8000 rev R June 2007 ...
Страница 199: ...Settings 192 96 8000 rev R June 2007 ...
Страница 213: ...206 Maintenance 96 8000 rev R June 2007 ...