Haas codes
HaasProgram/G-codeBasic10-15 minutes

311

Haas 311 - UNKNOWN CODE | Haas CNC Alarm

UNKNOWN CODE

This alarm is triggered when the control parser encounters an address code letter or command format it cannot interpret at all, typically a letter-number combination that does not exist in the Haas programming language. Unlike alarm 310 which is specific to invalid G-codes, this alarm covers M-codes, other address letters, or completely unrecognized syntax that the control cannot process. The control stops execution to prevent unpredictable machine behavior from undefined commands.

Root Cause Summary

This alarm occurs when the CNC control encounters an unrecognized or invalid code in the program. SAFETY: Before making any program changes, ensure the machine is in a safe state with spindle stopped and all axes at safe positions. Correct the syntax or remove unsupported codes to resolve it.

Safety

  • Program will stop

Causes and Fixes

  1. 1

    Safety first - secure machine

    SAFETY: Ensure machine is in Emergency Stop, spindle is stopped, and all motion has ceased before proceeding.

  2. 2

    Locate the error

    Check the line number in the alarm message and review the program at that block.

  3. 3

    Fix the code

    Correct any typos, invalid codes, or improper syntax in the block.

  4. 4

    Test the program safely

    SAFETY: Clear the alarm, verify all safety systems are active, run in single block mode or dry run first to confirm the fix.

DIY Feasiblehigh confidence

Call a technician if:

  • ·If the alarm persists after program correction
  • ·If the required option cannot be identified or enabled

Prevention

  • Always validate programs with simulation before running on the machine
  • Ensure G/M codes match the control's capabilities and installed options
  • Use single block or dry run mode when testing modified programs

Common Mistakes

  • Overlooking the specific line number in the alarm
  • Misidentifying subprogram errors

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.