28

2025.9

administrator

author

116

Reading volume

What do these CNC programming function codes mean? Do you know?
F/S/T/M function code meaning

F function

The F function command is used to control the cutting feed. In the program, there are two ways to use it.

 

1. Feed per revolution

Programming format G95 F~

The number after F represents the feed per revolution of the spindle in mm/r.

Example: G95 F0.2 indicates a feed rate of 0.2mm/r.

 

2. Feed per minute

Programming format G94 F~

The number after F represents the feed per minute in mm/min.

Example: G94 F100 indicates a feed of 100mm/min.

 

S function

The S function command is used to control the spindle speed.

Programming format S~

 

The number after S indicates the spindle speed in r/min. On machine tools with constant line speed function, the S function command also has the following functions.

 

1. Maximum speed limit

Programming format G50 S~

The number after S indicates the maximum speed: r/min.

Example: G50 S3000 indicates a maximum speed limit of 3000r/min.

 

2. Constant line speed control

Programming formatG96S~

The number after S indicates the constant linear velocity: m/min.

Example: G96 S150 means that the cutting point line speed is controlled at 150 m/min.


3. Constant line speed cancellation

weaveProgram formatG97S~

The number after S indicates the spindle speed after the constant speed control is canceled, and if S is not specified, the final value of G96 will be retained.

Example: G97 S3000 indicates that the spindle speed is 3000 r/min after the constant line speed control is canceled.

 

T function

The T function command is used to select the tool used for machining.

Programming format T~

 

T is usually followed by a two-digit number indicating the tool number selected. However, there are also four digits after T, the first two digits are the tool number, the last two digits are the tool length compensation number, and the tip arc radius compensation number.

 

Example: T0303 indicates the compensation value of the length of tool No. 3 and tool No. 3 and the compensation value of the arc radius of the tip. T0300 indicates the cancellation of tool compensation.

 

M generationyardmeaning

M00 program stopped

M01 Optional stop

M02 Procedure Ends

M03 Working Spindle Start (Forward Rotation)

M04 Working Spindle Start (Reverse)

M05 spindle stop

M06 Tool Exchange

M07

M08 Coolant On

M09 Coolant off

M10 spindle jog off

The M11 spindle is jog-opened

M12 live tool shaft stops

M13The live tool shaft rotates positively

M14 live tool shaft reversal

M15Caxis forward positioning

M16C axis reverse positioning

M17 External measurement data is requested via RS232C

M18 Spindle Orientation Cancels M19 Spindle Orientation

M20 Tailstock Interference Zone or Spindle Tamper Monitoring Valve (Opposite Twin Spindle Specification)

M21 Tailstock Interference Zone or Spindle Interference Monitoring Open (Opposite Twin Spindle Specification)

M22 chamfer passM23The chamfer opens the M24 chuck interference zone and the tool interference zone closes

The M25 chuck interference zone is open, and the cutter interference zone is open

M26 thread lead effective axis Z-axis specified

M27 Thread Lead Active Axis X-Axis Specified

M28 Tool Interference Check Function Off

M29 Tool Interference Check function is on

The M30 program ends

M31

M32 thread turning single-sided cutting mode

Cross cutting mode during M33 thread turning

M34 thread turning reverse single-sided cutting mode

M35 Loader Gripper Z Slides Backward

M36 Loader Gripper Z slides forward

M37 loader arm retracted

The M38 loader arm advances to the unloading position

The M39 loader arm advances to the chuck position

M40 spindle gear neutral

M41 spindle gear 1st gear or bottom speed coil

M42 spindle gear 2nd gear or high-speed coil

M43 Spindle Gear 3rd Gear

M44 spindle gear 4 gears

M45

M46

M47

The M48 spindle speed ratio is invalid and canceled

The M49 spindle speed multiplier is invalid

M50 Additional Air Blowing Port 1 Level

M51 Additional air outlet 1 open

M52

M53

M54 indexing chuck automatic indexing

M55 tailstock retracted

M56 tailstock advances

M57

M58 chuck underpress

M59 chuck high pressure

M60 cancelled

When cutting at constant circumferential velocity of the M61, the constant rotation response is ignored

M62 Cancelled

M63 spindle rotation

M64 Cancelled

M64 M-code response outside of spindle rotation is ignored

The M65T code responds to ignore

The M66 tool holder has a free rotation position

Synchronous operation mode is canceled during the M67 cam turning cycle

M68 Synchronous Mode A is running

M69 Synchronous Mode B runs on

M70 manually shifted to command M71

The M72 ATC unit is positioned in the approach position

M73 Thread Turning Type 1

M74 Thread Turning Type 2

M75 Thread Turning Type 3

M76 workpiece catcher backs off

M77 Workpiece Catcher advances

M78 center frame loosened

M79 center frame clamping

M80 overcuts forward

M81 overcut backward

M82

M83 chuck clamping

M84 chuck released

The M85LAP does not return to the starting position after the rough cycle is complete

M86 tool holder right turn designation

M87 Cancelled

M88 Blowing Valve

M89 blows on

M90 closes

M91 opens

M92 bar feeder retracted

M93 bar feeder advances

M94 Loader Charge

M95 Loader Discharge

M96 countershaft workpiece catcher back

M97 countershaft advances with a workpiece catcher

M98 tailstock low pressure

M99 tailstock high pressure

M100 waits for the synchronization instruction

M101 External M size

M102 External M code

M103 External M code

M104 External M size