
axismd.ai
FANUC Controller
Program/G-code · Intermediate · 10-20 minutes
Fanuc Alarm PS115 - Invalid Macro Variable
PS115 alarm occurs when a custom macro program attempts to access a macro variable outside the valid range or attempts to use a variable number that is not supported by the current control configuration. This typically happens when the macro variable number exceeds system limits, uses invalid syntax, or references variables disabled by parameter settings.
Fanuc Alarm PS115 - Invalid Macro Variable
VARIABLE NO. OUT OF RANGE
Fanuc PS115: VARIABLE NO. OUT OF RANGE. A custom macro variable number is outside the valid range for the variable type. Variable numbers must be within the defined range for local, common, or system variables.
Root Cause Summary
PS115 alarm occurs when a custom macro program attempts to access a macro variable outside the valid range or attempts to use a variable number that is not supported by the current control configuration. This typically happens when the macro variable number exceeds system limits, uses invalid syntax, or references variables disabled by parameter settings.
Safety
Causes and Fixes
Review the active macro program at the alarm line. Note the exact macro variable number being referenced (e.g., #50000, #-5, or improperly formatted variable).
Navigate to SYSTEM > PARAM and check parameter 6001 (number of common variables for #100-#199 range) and parameter 6002 (number of common variables for #500-#549 range). Verify the referenced variable is within the allocated range.
For system variables (#1000+), verify the variable number matches the control series documentation. Check parameter 6008 (macro executor type) to confirm custom macro B option is enabled if using advanced variables.
Correct the macro program to use valid variable numbers within allocated ranges, or increase parameter 6001/6002 values if more common variables are needed (requires control restart after parameter write-enable).
Changing parameters 6001/6002 requires parameter write bit 0 in parameter 8000 to be set. Backup all parameters before modification.
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.