FANUC codes
FANUCProgram/G-codeIntermediate15-30 minutes

1125

Fanuc Alarm 1125 - ILLEGAL EXPRESSION FORMAT

SYSTEM ALARM 1125

Fanuc alarm 1125: SYSTEM ALARM 1125. 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

Alarm 1125 ILLEGAL EXPRESSION FORMAT occurs when the CNC detects a syntax error in a custom macro (G65/G66) variable expression or mathematical statement. This is typically caused by incorrect operators, mismatched brackets, undefined variables, or improper function usage within the macro program block.

Causes and Fixes

  1. 1

    Navigate to EDIT mode and display the macro program where the alarm occurred. Note the specific O-number and block number shown on the alarm screen.

  2. 2

    Examine the expression format in the flagged block. Check for: consecutive operators (#1=5++3), missing * between variable and bracket (#1=5(#2+3) instead of #1=5*[#2+3]), improper decimal usage (#1=5..3), or division by zero.

  3. 3

    Verify parameter 6000-6009 series (macro variable settings) are properly configured. Check parameter 6004#0 (macro expression format setting) is set correctly for your machine configuration.

  4. 4

    Correct the expression using proper syntax: use brackets [ ] for calculations, ensure * for multiplication, single operators only, and verify all variables are defined before use. Example: #1=[5*[#2+3]]

DIY Feasiblehigh confidence

Call a technician if:

  • ·Multiple macro programs affected simultaneously
  • ·System parameters may be corrupted
  • ·Alarm persists after correcting obvious syntax errors

Prevention

  • Use consistent macro variable naming conventions
  • Test macro expressions in simple programs first
  • Keep backup copies of working macro programs
  • Use proper text editors that show bracket matching

Common Mistakes

  • Mixing parentheses and brackets incorrectly
  • Forgetting # symbol before variable numbers
  • Using programming language operators instead of Fanuc macro operators
  • Missing ENDIF statements in conditional blocks

Related Alarms

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.