Fanuc 366 Alarm -

Prevent recurrence with this monthly checklist:


The FANUC 366 Alarm (often displayed as ALARM 366 or SYS ALARM 366) is a serial spindle software error. It indicates a communication or data integrity problem between the CNC control and the spindle amplifier over the serial spindle link.

In simpler terms: the CNC sent a command or data packet to the spindle drive, but the drive received corrupted or unexpected information—or the CNC couldn’t confirm the drive received it correctly. fanuc 366 alarm

| Aspect | Details | |--------|---------| | Alarm Type | Servo serial communication error | | Primary Signal Affected | Serial pulse data (encoder to amplifier) | | Most Likely Cause | Damaged feedback cable or poor connection | | Second Most Likely | Electrical noise or faulty encoder | | Repair Cost Range | Cable: $50–200; Encoder: $300–800; Amplifier: $1000–4000 (OEM pricing) | | Downtime Impact | Usually 1–4 hours for diagnosis and cable replacement |


FANUC Alarm 366 = Syntax error in Custom Macro B. Fix: Place the control in EDIT mode after the alarm, press the alarm history or program check key, locate the highlighted block, and correct the macro format (brackets, operators, conditional structure, or illegal characters). Prevent recurrence with this monthly checklist:

If the alarm persists after obvious corrections, check for nested macro definitions or incompatible NC code inside a macro block (e.g., using G04 with P#1 where #1 is not an integer).


This alarm is almost always triggered by one of the following syntax violations: The FANUC 366 Alarm (often displayed as ALARM

| Cause | Example (Error) | Explanation | | :--- | :--- | :--- | | 1. Missing or Extra Brackets | #101 = #102 + [ #103 * #104 | Mismatched square brackets [ and ]. Parentheses ( ) are not allowed for math grouping (only for comments). | | 2. Illegal Character in Expression | #101 = #102 + #103*#104@ | Using invalid characters like @, &, $, ^, or unescaped symbols. | | 3. Incorrect Conditional Format | IF #101 EQ #102 GOTO100 | Missing space before GOTO? More likely: using a GOTO number that is not defined, or missing a THEN for multi-line IF. Incorrect: IF [#1 EQ 2] GOTO 10 (Correct: IF [#1 EQ 2] GOTO10 - no space after GOTO) | | 4. Wrong THEN usage | IF #1=5 THEN #2=10 ELSE #2=20 | The THEN in a single-line IF cannot contain ELSE. That requires a multi-line IFELSEENDIF. | | 5. Missing operator | #101 = #102 #103 | Two variables side by side without an operator (+, -, *, /). | | 6. Invalid M/C/G code in macro | M98 P#1 Q#2 | Using Q in M98 is illegal. Some macro calls require specific formats (e.g., G65). | | 7. Unbalanced macro calls | Nested macro calls without proper M99 returns, causing parser confusion. | Indirectly results in 366 because the control expects an expression but sees junk. | | 8. Decimal point issue | #101 = 1.2.3 | Multiple decimal points in a numeric literal. |

To confirm it's NOT a hardware failure:


If the above steps fail, the spindle amplifier itself may be faulty. Swap with a known working unit (ensure same model).

Even if it looks fine, replace the cable as a cheap and fast diagnostic step.