Shared Flashcard Set

Details

CNC Lathe M-Codes
Haas SL series, often used M-Codes
11
Language - Other
Undergraduate 1
03/11/2011

Additional Language - Other Flashcards

 


 

Cards

Term
M00
Definition

 

M00 STOP PROGRAM (SETTING 42)

 

The M00 code is used to stop a program. It also stops the spindle and turns off the coolant and stops interpretation look-ahead processing. The program pointer will advance to the next block and stop. A cycle start will continue program operation from the next block.

 

Term
M01
Definition

 

M01 OPTIONAL PROGRAM STOP (SETTING 17)

 

The M01 code is identical to M00 except that it only stops if OPTIONAL STOP is turned on from the front panel. A cycle start will continue program operation from the next block.

 

Term
M03
Definition

M03 SPINDLE FORWARD (S) (SETTING 144)

 

The M03 code will start the spindle in a clockwise direction at whatever speed was previously set. The block will delay until the spindle reaches about 90% of commanded speed. If bit 31 of parameter 209 (CNCR SPINDLE) is set to 1, then this command is executed at the beginning of the block execution rather than the end as most M codes are. 

Term
M04
Definition

 

M04 SPINDLE REVERSE (S) (SETTING 144)

 

The M04 code will start the spindle in a counterclockwise direction at whatever speed was previously set. The block will delay until the spindle reaches about 90% of commanded speed. If bit 31 of parameter 209 (CNCR SPINDLE) is set to 1, then this command is executed at the beginning of the block execution rather than the end as most M codes are. 

 

Term
M05
Definition

 

M05 SPINDLE STOP

 

The M05 code stops the spindle. The program is delayed until spindle slows below 10 RPM.

 

Term
M08
Definition

M08 COOLANT ON (SETTING 32)

 

The M08 code will turn the coolant on. Note that M codes are performed at the end of a block; so that if a motion command is in the same block, the coolant is turned on after the motion. The low coolant status is only checked at the start of a program so a low coolant condition will not stop a program that is already running.

 

Term
M09
Definition

M09 COOLANT OFF

 

The M09 code will turn off the coolant supply.

 

Term
M30
Definition

 

M30 PROGRAM END AND RESET (SETTING 2, 39, 56, 83)

 

The M30 code is used to stop a program. It also stops the spindle and turns off the coolant. The program pointer will be reset to the first block of the program and stop. The parts counters displayed on the current commands display are also added to. M30 will also cancel tool length offsets.

 

Term
M97
Definition

M97 LOCAL SUB-ROUTINE CALL

 

This code is used to call a sub-routine, referenced by a line number N within the same program. A Pnnnnn code is required and must match the N line number. This is used for simple sub-routines within a program and does not require the complication of having a separate program. A local sub-routine must still end with an M99. If there is an L count on the M97 line, the sub-routine will be repeated that number of times. 

 

Main program: 

O04321 (Start of main program) 

...

... (Part program)

...

M97 P123 (Jumps to line N123, after the M30, to execute a local sub-routine.) 

... (The M99 at the end of the sub-routine will cause it to jump back here.) 

...

... (Finish part program)

...

M30 (End of main program)

N123 (Identifies the start of the Local Sub-Routine called up by M97 P123)

...

... (Local sub-routine portion of part)

...

M99 (Jumps back to the line after the local sub-routine call in the main program)

Term
M98
Definition

 

M98 SUB-PROGRAM CALL

 

This M98 code is used to call a sub-program. The Pnnnn code is the sub-program number being called; it must be in the same block as the M98. The subprogram number being called must already be loaded into the control, and it must contain an M99 at the end in order to return to the next line in the main program. An L count can also be included on the line containing the M98, which will cause the subroutine to be repeated L times before continuing to the next block.

 

Main program:

O05432 (Start of main program)

...

... (Part program)

...

M98 P234 (Jumps to program O00234 to execute sub-program)

... (The M99 at the end of the sub-program will jump back here)

...

... (Finish part program)

...

M30 (End of main program)

Sub-program:

O00234 (Identifies the start of a separate sub-program)

...

... (Sub-program portion of part)

...

M99 (Jumps back to the line after the sub-program call in the main program)

 

Term
M99
Definition

M99 SUB-PROGRAM RETURN OR LOOP (SETTING 118)

 

In the main program, an M99 will cause the program to loop back to the beginning and repeat over and over again without stopping. 

 

Main program:

O06543

...

... (Complete part program)

...

...

M99 (This will cause the program to jump back to the beginning and repeat itself)

 

An M99 without a P code at the end of a sub-program will return to the main program after executing the sub-Routine or macro called.

 

Main program:

O07654

...

... (Part program)

...

M98 P345 (Jumps to program O00345 to run)

... (The M99 at the end of the sub-program will jump back here)

...

... (Finish part)

...

M30 (End of main program)

Sub-program:

O00345 (Identifies sub-program)

...

... (Sub-program portion of part)

...

M99 (Jumps back to the line after the sub-program call)

Supporting users have an ad free experience!