
axismd.ai
FANUC Controller
Program/G-code · Basic · 10-20 minutes
Fanuc Alarm 313 - ILLEGAL LEAD COMMAND
Alarm 313 occurs during variable-lead threading (G34/G35) when the K address value specifying the thread lead increment per spindle revolution exceeds the maximum allowable value set in Parameter 5130, or when a negative lead value is commanded. This is a program data validation error that prevents execution of an invalid threading cycle.
Fanuc Alarm 313 - ILLEGAL LEAD COMMAND
MACRO ALARM 313
The variable-lead threading increment specified in address K exceeds the specified maximum value, or a negative lead value was specified.
Root Cause Summary
Alarm 313 occurs during variable-lead threading (G34/G35) when the K address value specifying the thread lead increment per spindle revolution exceeds the maximum allowable value set in Parameter 5130, or when a negative lead value is commanded. This is a program data validation error that prevents execution of an invalid threading cycle.
Causes and Fixes
Navigate to SYSTEM > PARAM and locate Parameter 5130 (maximum thread lead increment for variable-lead threading). Note the current value in millimeters or inches depending on system units (G20/G21).
Review the program line causing alarm 313 and verify the K address value. For G34 (variable-lead threading increasing), check that K value does not exceed Parameter 5130. Calculate total lead change: initial lead (F) + (K × number of spindle revolutions).
Either reduce the K value in the program to stay within Parameter 5130 limits, or increase Parameter 5130 if the application requires larger lead increments and machine mechanics support it.
Increasing Parameter 5130 requires understanding of machine mechanical limits, spindle synchronization capabilities, and maximum axis feed rates. Consult machine builder specifications before modification.
After correction, reset alarm with RESET key, return to program start or safe line, and test threading cycle in single block mode with feedrate override at 50% to verify proper execution.
Call a technician if:
Prevention
Common Mistakes
Seeing Multiple Alarms?
Seeing another alarm with this one? Enter the code.
AxisMD logs alarms against your actual machines, tracks patterns, and gives AI context your manual doesn't have.
Start freeWas this guide helpful?
Always verify with your machine manual or a certified technician before performing service procedures.