
axismd.ai
FANUC Controller
Program/G-code · Basic · 10-20 minutes
Fanuc Alarm 1013 - ILLEGAL POS. OF PROGRAM NO.
Fanuc alarm 1013 occurs when a program number (O-code) or sequence number (N-code) is specified in an invalid location within the NC program. This most commonly happens after macro statements (G65, G66), within macro variable assignments, or after certain preparatory functions where these addresses are not permitted according to Fanuc macro executor rules.
Fanuc Alarm 1013 - ILLEGAL POS. OF PROGRAM NO.
SYSTEM ALARM 1013
Fanuc alarm 1013: SYSTEM ALARM 1013. 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
Fanuc alarm 1013 occurs when a program number (O-code) or sequence number (N-code) is specified in an invalid location within the NC program. This most commonly happens after macro statements (G65, G66), within macro variable assignments, or after certain preparatory functions where these addresses are not permitted according to Fanuc macro executor rules.
Causes and Fixes
Display the NC program on the CNC and identify the exact line triggering the alarm. Press RESET, then navigate to EDIT mode, cursor to the program block shown in the alarm history (ALARM > HISTORY). Look for O or N codes following G65, G66, or #variable statements.
Check if an N-code (sequence number) appears on the same line as a macro call statement. Example: 'G65 P9010 N100 A10.0' is illegal. Move the N-code to a separate line or remove it entirely from macro call blocks.
Verify parameter 3202 (macro statement specification) is set correctly. Navigate to SYSTEM > PARAM > search for 3202. Standard setting is 0 for conventional macro format. Incorrect settings may cause parser conflicts with O/N address interpretation.
Changing parameter 3202 requires parameter write enable (PWE) and may affect all macro programs. Consult machine builder documentation before modification.
Correct the program by removing the O or N address from the invalid location, or insert an EOB (end of block) before the O/N code. Re-run the program in single block mode (SBL button) to verify resolution.
Call a technician if:
Prevention
Common Mistakes
Seeing Multiple Alarms?
Seeing another alarm with this one? Enter the code.
AxisMD logs alarms against your actual machines, tracks patterns, and gives AI context your manual doesn't have.
Start freeWas this guide helpful?
Always verify with your machine manual or a certified technician before performing service procedures.