FANUC codes
FANUCProgram/G-codeIntermediate5-30 minutes

108

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

  • Verify corrected program or parameters before resuming machining

Causes and Fixes

  1. 1

    Identify the exact line number where alarm 108 occurred by checking the control display or alarm history.

  2. 2

    Examine the macro program at that line for division operations (/ symbol) or formulas containing division, noting which variable is the divisor.

  3. 3

    Trace backward through the program to find where the divisor variable is assigned or calculated, checking for conditions that could result in zero.

  4. 4

    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.

Service Recommended confidence

Seeing Multiple Alarms?

Seeing another alarm with this one? Enter the code.

Get machine-aware diagnosis

AxisMD logs alarms against your actual machines, tracks patterns, and gives AI context your manual doesn't have.

Start free

Was this guide helpful?

Always verify with your machine manual or a certified technician before performing service procedures.