FANUC codes
FANUCProgram/G-codeIntermediate30-60 minutes

312

Fanuc Alarm 312 - ILLEGAL COMMAND IN DIRECT DRAWING DIMENSIONS PROGRAMMING

ILLEGAL FORMAT IN DRAWING DIMENSION

Direct input of drawing dimensions was commanded in an invalid format, or an invalid G code was specified.

Root Cause Summary

Alarm 312 occurs when the CNC detects an improper G-code or format during direct drawing dimension programming (DDD), typically using G50.1/G51.1 programming. This alarm is triggered when incompatible G-codes are specified within a DDD block, incorrect syntax is used for direct dimension input, or the drawing dimension coordinate system is improperly defined.

Causes and Fixes

  1. 1

    Review the program block causing the alarm. Check for G-codes that are incompatible with G50.1/G51.1 DDD programming, particularly G68, G43/G44/G49, and canned cycle commands G73-G89.

  2. 2

    Verify parameter 5400-5404 (Direct Drawing Dimension settings) are correctly set for your machine configuration. Access via SYSTEM > PARAM and check bit settings for DDD function enable.

  3. 3

    Ensure G50.1 (DDD cancel) is commanded before any incompatible G-code. Restructure the program to execute coordinate transformations or compensation commands outside the G51.1 active block.

  4. 4

    Check the program syntax: G51.1 format should be G51.1 X__ Y__ I__ J__ where X,Y define corner position and I,J define diagonal corner. Verify all four coordinates are specified when required.

DIY Feasiblehigh confidence

Call a technician if:

  • ·DDD option not installed
  • ·Parameter corruption suspected
  • ·Control software issues

Prevention

  • Always verify DDD mode is active before using dimensional commands
  • Use proper dimension symbol formatting
  • Test DDD programs in single block mode first

Common Mistakes

  • Using circular interpolation in DDD blocks
  • Mixing standard and dimensional programming without mode changes
  • Incorrect dimension symbol character encoding

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.