
axismd.ai
FANUC Controller
Program/G-code · Intermediate · 20-45 minutes
Fanuc Alarm 113 - IMPROPER COMMAND
Fanuc Alarm 113 occurs when a G-code or M-code function that is prohibited within a custom macro (user macro or macro executor program) is commanded. This typically happens when attempting to use external I/O instructions, certain program control commands, or machine-specific functions inside macro variables O9000-O9999 series programs that are restricted by the CNC system architecture.
Fanuc Alarm 113 - IMPROPER COMMAND
Zero Division
Fanuc alarm 113: Zero Division. This alarm indicates a fault condition detected by the Fanuc control. Refer to the alarm number and name to identify the specific system or function involved.
Root Cause Summary
Fanuc Alarm 113 occurs when a G-code or M-code function that is prohibited within a custom macro (user macro or macro executor program) is commanded. This typically happens when attempting to use external I/O instructions, certain program control commands, or machine-specific functions inside macro variables O9000-O9999 series programs that are restricted by the CNC system architecture.
Safety
Causes and Fixes
Identify the exact line number in the custom macro program (O9xxx series) where alarm triggered by reviewing alarm history screen (ALARM > HISTORY) to see NC program name and sequence number.
Check if G04 (dwell), G10 (programmable data setting), G65/G66/G67 (macro call nesting beyond 4 levels), or external device commands (DPRNT, POPEN) are used in the macro program at the flagged line.
Verify parameter 6071 (macro call nesting level) and parameter 6005 bit settings which control allowable macro functions - access via SYSTEM > PARAM > search 6005 or 6071.
Remove or relocate the prohibited command outside the macro body into the main program, or replace with macro-compatible alternatives (use #3003 timer instead of multiple G04, use SETVN instead of G10 where applicable).
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.