
axismd.ai
FANUC Controller
Program/G-code · Intermediate · 5-30 minutes
Fanuc 108 - Divided by zero in macro
Alarm 108 occurs when a macro program attempts to divide a value by zero, which is mathematically undefined. This typically happens due to a variable being unintentionally set to zero before being used as a divisor, or when a calculation within the macro results in a zero divisor. The alarm protects the control from executing an invalid mathematical operation.
Fanuc 108 - Divided by zero in macro
DIVIDED BY ZERO IN MACRO
Fanuc PS program alarm 108: DIVIDED BY ZERO IN MACRO. This alarm is triggered by an illegal or incorrectly formatted command in the part program, or a programming condition that the Fanuc control cannot execute.
Root Cause Summary
Alarm 108 occurs when a macro program attempts to divide a value by zero, which is mathematically undefined. This typically happens due to a variable being unintentionally set to zero before being used as a divisor, or when a calculation within the macro results in a zero divisor. The alarm protects the control from executing an invalid mathematical operation.
Safety
Causes and Fixes
Identify the exact line number where alarm 108 occurred by checking the control display or alarm history.
Examine the macro program at that line for division operations (/ symbol) or formulas containing division, noting which variable is the divisor.
Trace backward through the program to find where the divisor variable is assigned or calculated, checking for conditions that could result in zero.
Add conditional logic (IF statements) to check if the divisor is zero before division, or initialize the variable with a non-zero default value if appropriate for the application.
Verify that changing the variable initialization does not affect other calculations or tool offsets in the macro program.
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.