FANUC codes
FANUCProgram/G-codeIntermediate10-30 minutes

PS112

Fanuc Alarm PS112 - Division by Zero

ZERO DIVIDE

Fanuc alarm PS112: ZERO DIVIDE. The part program or machine configuration has an error related to this alarm condition. Review the block indicated in the alarm screen and correct the command per the Fanuc programming manual.

Root Cause Summary

PS112 alarm occurs when a macro program attempts to divide a value by zero or by a variable containing zero. This is a runtime macro execution error that halts program execution when the control detects an invalid mathematical operation during macro variable calculation or expression evaluation.

Safety

  • Always validate divisors

Causes and Fixes

  1. 1

    Press RESET to clear the alarm, then navigate to the program screen to identify the exact line number where PS112 occurred. Note the O-number and sequence number displayed in the alarm history.

  2. 2

    Review the macro program line containing division operations (e.g., #100=#101/#102 or IF[#10/#11 GT 5]). Check the CURRENT PROGRAM screen or MDI to examine macro variable values at time of alarm.

  3. 3

    Navigate to SYSTEM > MACRO > VARIABLE to display current macro variable values. Verify the divisor variable (#xxx) is not zero or <null>. Check if the variable was properly initialized earlier in the program.

  4. 4

    Add conditional logic before division operations (e.g., IF[#102 NE 0]THEN #100=#101/#102) or initialize variables at program start (#102=1.0) to prevent division by zero conditions.

    Ensure the initialized value makes sense for the application to avoid incorrect calculations.

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.