
axismd.ai
FANUC Controller
Program/G-code · Intermediate · 15-45 minutes
Fanuc Alarm 120 - Custom Macro Error
Alarm 120 is triggered when the custom macro program (G65/G66 or macro variables) contains a syntax error, undefined variable operation, mathematical error, or illegal macro statement. This is a programmatic issue rather than a hardware fault, indicating the control detected an instruction it cannot process within the macro code.
Fanuc Alarm 120 - Custom Macro Error
Macro Alarm
Fanuc program alarm 120: Macro Alarm. The part program contains an error or illegal condition that the Fanuc control cannot execute. Correct the program to clear this alarm.
Root Cause Summary
Alarm 120 is triggered when the custom macro program (G65/G66 or macro variables) contains a syntax error, undefined variable operation, mathematical error, or illegal macro statement. This is a programmatic issue rather than a hardware fault, indicating the control detected an instruction it cannot process within the macro code.
Safety
Causes and Fixes
Review the program line number shown with the alarm. Examine all macro variable calculations (#i=#j+#k, #i=#j/#k, etc.) near this line.
Check for division operations where the divisor variable could equal zero. Verify conditional logic prevents this condition.
Verify SQRT operations have non-negative inputs and that all referenced macro variables (#100-#999, #1-#33) have been assigned values before use.
Use MDI mode to manually check suspect variable values. Execute #3000=100 (common variable display) to verify current values before re-running program.
Avoid modifying macro variables used by machine builder or probe cycles (#500-#699 range often reserved).
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.