Purpose
Insert a G4 P8 dwell (8-second delay) immediately after the spindle starts (M3 or M4), allowing time for speed stabilization.
Location of Change
Function: onSection()
Original Line:
writeBlock(sOutput.format(spindleSpeed), mFormat.format(tool.clockwise ? 3 : 4));
Modified Version:
writeBlock(sOutput.format(spindleSpeed), mFormat.format(tool.clockwise ? 3 : 4));
writeBlock(gFormat.format(4), "P8"); // G4 P8 dwell for 8 seconds
Resulting NC Output
S12000 M3
G4 P8