Skip to main content
CNC.wiki

Configuring Fanuc Custom Macro Enable Parameters (0932 & 8135)

Learn how to configure Fanuc custom macro enable parameters 0932 and 8135, expand common variables, and resolve Alarm 123 on CNC controller boards.

Hakan Gündoğdu
Hakan Gündoğdu

CNC CARE Co-founder

Introduction

An uncommanded coordinate shift during axis interpolation can violently plunge a cutting tool directly into a rigid obstacle such as a vise jaw, a secured workpiece clamp, or the machine chuck. This severe operational hazard occurs when an operator attempts to execute custom macros without enabling the required controller parameters or when tool offset addresses are misconfigured. Because the CNC relies on macro system variables to calculate tool geometry and dynamic positioning, a mismatch between controller models or parameter versions will silently access the wrong register memory. The resulting unchecked over-travel triggers a hard collision of the turret or spindle, leading to major machine damage, broken tools, and an immediate scrap part.

Technical Summary

Specification FieldTechnical Value / Status
Command CodeG65 (Simple Call), G66 (Modal Call), G67 (Modal Call Cancel)
Modal GroupNon-modal (G65) / Modal (G66)
Applicable BrandsFanuc
Critical ParametersParameter 0932#2 (Macro A), Parameter 0932#3 (Macro B), Parameter 8135#5 (Master Toggle)
Main ConstraintCustom Macro A and Custom Macro B cannot be enabled simultaneously (parameter 0932 bits 2 and 3). Custom macro control commands are strictly blocked during DNC operation.

Quick Read

  • Disable Simultaneous Environments: Never set parameter 0932#2 (Custom Macro A) and 0932#3 (Custom Macro B) to 1 at the same time to prevent formatting and system conflicts.
  • Deactivate Master Lock: Ensure parameter 8135#5 (NMC) is set to 0 (Used) to enable the execution of G65 macro calls and variable operations.
  • Expand Variable Registries: Toggle parameter 8135#6 (NCV) to 0 to expand common variables from the standard #100-#149 up to #199 and #500-#999.
  • Validate Controller Homing: Execute a G28 reference point return before invoking macros to ensure axis coordinates align with the program's physical variables.
  • Audit Legacy Variable Mapping: Set parameter 6000#3 (V15) to 1 only if importing legacy Fanuc FS15 macro programs to avoid misinterpreting tool compensation addresses.
  • Prevent DNC Calculation Lockout: Avoid streaming macro logic over a DNC interface; doing so will trigger Alarm 123 (CAN NOT USE MACRO COMMAND IN DNC).
  • Verify Enable Status: Confirm macro enable parameters are active before running G65 code to prevent Alarm 113 or Alarm 114 formatting halts.

Basic Concepts

Fanuc's custom macro enable parameters act as the foundational gateway that transforms a rigid CNC controller into a dynamic, mathematical computing engine. By enabling bits such as parameter 0932#2 (Custom Macro A) or 0932#3 (Custom Macro B), machine tool builders and programmers unlock the ability to utilize variables, logical loops, and automated probing routines directly on the shop floor. Fanuc profoundly distinguishes its macro architecture from other control brands through three specific behaviors. First, Fanuc explicitly forbids the simultaneous enablement of both Custom Macro A and Custom Macro B; the manual strictly notes that parameter 0932 bits 2 and 3 cannot be selected simultaneously, forcing the builder to choose one distinct mathematical environment.

Second, Fanuc provides granular, parameter-driven memory expansion without requiring physical hardware modifications. By simply toggling parameter 8135#6 (NCV) to 0, the CNC instantly unlocks "additional common variables," vastly expanding the controller's capability to track complex spatial data up to variable #999. Finally, Fanuc enforces a strict networking safety lockout; unlike basic controls that will attempt to read any code streamed over a data line, Fanuc restricts dynamic logic processing by actively throwing an alarm if macro control commands are used during DNC operation. For comprehensive variables management, refer to the guides on g65-custom-macro-b and g65-macro-argument-assignment.

Command Structure

The execution of custom macros relies on distinct calling instructions that pass numeric arguments to local variables. The primary method is a simple call, which executes a specified subprogram once while binding parameters like feed rates, coordinates, and tools.

For operations that must repeat at every motion block, the controller supports modal calls. This function remains active until cancelled, executing the macro subprogram immediately after any axis movement.

G65 P_ L_ <arguments>;
G66 P_ L_ <arguments>;
G67;
ParameterDescriptionValue Range / Settings
Parameter 0932#2Enables the Custom Macro A function.0 (Disabled) or 1 (Enabled)
Parameter 0932#3Enables the Custom Macro B function.0 (Disabled) or 1 (Enabled)
Parameter 8135#5 (NMC)Master toggle for custom macros usage.0 (Used) or 1 (Not Used)
Parameter 8135#6 (NCV)Addition of custom macro common variables (expands variables from standard #100-#149 up to #199 and #500-#999).0 (Used) or 1 (Not Used)
Parameter 6003#7 (MUS)Determines if interrupt-type custom macros are used.0 (Not Used) or 1 (Used)
Parameter 6000#3 (V15)Maps tool compensation system variables to legacy FS15 mapping.0 (FS16) or 1 (FS15)

Brand Applications

Fanuc

Fanuc systems manage custom macro functionality at the core processor level. Modifying these system-level parameters requires changing the Parameter Write Enable settings beforehand. For detailed steps on this process, see the guide on fanuc-parameters-and-pwe.

Programs invoke macros using G65 or G66 codes. If the necessary parameters are not enabled, these codes will trigger a syntax fault.

Configuration ItemDetailValue / Description
Parameter 0932#2Custom Macro A activation0: Disabled, 1: Enabled
Parameter 0932#3Custom Macro B activation0: Disabled, 1: Enabled
Parameter 8135#5 (NMC)Master macro toggle0: Used, 1: Not Used
Parameter 8135#6 (NCV)Common variable expansion0: Used, 1: Not Used
Alarm 113Improper CommandTripped if a command or syntax cannot be used within the active macro environment
Alarm 114Format Error in MacroTripped if indefinite H code or mathematical format error is found
Alarm 123Can Not Use Macro Command in DNCTripped if attempting to execute macro control commands during DNC streaming
Version: Series 00-MD, 0-GSD, 0-GCD package controlsMacro A/B explicitly enabled via parameter 0932 bits 2 and 3
Version: Newer vs FS15 LegacyTool compensation variable bridgingParameter 6000#3 (V15) switches system variables between standard FS16 and legacy FS15 layouts

Setting incorrect parameters can disable safety limits or map system variables to the wrong registers, causing uncommanded tool movements and mechanical crashes.

Brand Comparison

Model / SeriesMacro Activation MethodCommon Variables RangeTool Compensation Variable Mapping
Series 0 (0-MD, 0-GSD, 0-GCD)Enabled via parameters 0932#2 (Macro A) and 0932#3 (Macro B)Standard #100-#149, expandable to #199 and #500-#999 via parameter 8135#6Fixed standard register mapping
Series 15 / 15i (Legacy)Enabled via system options or parametersStandard #100-#149, uses legacy FS15 compensation mappingLegacy variable register set
Series 16i / 18i / 21i / 0i / 0i-FMapped via standard parameter blocks 6000+ and 8135Mapped to #199 and #500-#999 using parameter 8135#6Configurable standard FS16 or legacy FS15 mapping via parameter 6000#3 (V15)

Technical Analysis

An analytical review of Fanuc's custom macro parameters reveals a clear division between legacy hardware-bound configurations and modern, flexible parameter structures. In legacy Series 0 and FS15 controllers, custom macro environments were rigidly constrained by hardware packages and specific variable mappings. A major compatibility challenge arose when newer Series 16i, 18i, 21i, and 0i systems were introduced, as their default tool compensation registers differed from the legacy FS15 standard. To bridge this architectural gap, Fanuc implemented parameter 6000#3 (V15). This parameter allows modern controls to emulate the legacy variable layout, ensuring that older macro programs can access tool geometries without requiring extensive rewriting of the variable addresses.

Program Examples

#100 = 10.0 ;         Assign value 10.0 to common variable #100
G65 P9010 A1.0 B2.0 ; Call macro program 9010 with arguments A=1.0, B=2.0
G66 P9100 I5.0 J10.0 ; Initiate modal macro call to 9100 at each motion block
G67 ;                 Cancel the active modal macro call

dry run

During a dry run, the operator executes this sequence with the machine lock active to verify macro execution and argument transmission. The controller assigns 10.0 to variable #100, then calls macro program 9010 using G65, passing local arguments A and B. Next, G66 initiates a modal macro call, executing program 9100 at each subsequent axis motion block. Finally, G67 cancels the modal call. The operator monitors the macro variable screen to verify that values are correctly assigned and that no formatting alarms are generated before running automatic cutting.

Error Analysis

Alarm CodeTrigger ConditionOperator SymptomRoot Cause / Fix
Alarm 113
IMPROPER COMMAND
Programmer commands a function or syntax which cannot be used within the active custom macro environment.CNC halts operation immediately and blocks axis movement; alarm message displayed on screen.Verify macro parameters like 0932#3 or 8135#5 are active, or correct illegal command syntax.
Alarm 114
FORMAT ERROR IN MACRO
Custom Macro A commands an indefinite/undefined H code in a G65 block, or Custom Macro B encounters an error in format other than mathematical expression.CNC halts operation; format error warning is shown on the display.Check the format of mathematical formulas and ensure all H codes in Custom Macro A are defined.
Alarm 123
CAN NOT USE MACRO COMMAND IN DNC
The machine attempts to execute a macro control command while operating in DNC (Direct Numerical Control) mode.Operation stops instantly with DNC macro error message.Do not stream macro calculations or control logic over the DNC interface.

Application Note

Safe use of these enablement parameters requires programmers and operators to meticulously verify the controller's configuration before transferring parametric G-code to an unfamiliar machine. A primary common failure cause is loading a complex Custom Macro B program into a machine where the macro functionality is completely disabled or where only the legacy Custom Macro A is active. If the CNC attempts to read an un-enabled macro formula or variable, it will immediately halt the cycle and throw an alarm code (such as 113 IMPROPER COMMAND or 114 FORMAT ERROR IN MACRO).

Operators must carefully manage tool compensation variables when executing macros across different controller generations. If parameter 6000#3 (V15) is incorrectly configured on a modern machine, a macro attempting to evaluate tool geometry might blindly access the wrong system variable address. If the macro uses this corrupted mathematical data to calculate a dynamic Z-axis plunge depth or an X-axis shift, the machine will unexpectedly drive the tool entirely off its intended path. This uncommanded spatial shift can rapidly force the spindle or turret to plunge directly into a rigid obstacle such as a vise jaw, a secured workpiece clamp, or the machine chuck. Such an unchecked over-travel guarantees a severe hard collision and an immediate scrap part.

Related Command Network

  • G65 (Simple Macro Call): Invokes a custom macro subprogram once, passing local variables to the macro environment.
  • G66 (Modal Macro Call): Automatically calls a custom macro subprogram after every motion block until cancelled.
  • G67 (Modal Macro Call Cancel): Cancels the active G66 modal macro call mode.
  • G10 (Data Setting): Allows programmatic modification of system parameters and offsets within G-code programs.
  • M96 (Interrupt Macro Enable): Enables interruption of part programs by external signals to run specific macro routines.
  • M97 (Interrupt Macro Disable): Disables the interrupt macro mode to prevent unplanned program halts.

Conclusion

Calibrating and enabling custom macro parameters provides the controller with the necessary mathematical capabilities to run advanced probing and loops. Maintenance teams must carefully check variables configuration and parameter write status during controller commissioning to ensure error-free macro execution.

Frequently Asked Questions

Can Custom Macro A and Custom Macro B be enabled simultaneously?

No. Parameter 0932 bit 2 (Macro A) and bit 3 (Macro B) cannot be active at the same time. To run B-type macros, ensure parameter 0932#3 is set to 1 and parameter 0932#2 is set to 0, and verify this change via the system parameters page.

Why does running a custom macro in DNC mode trigger Alarm 123?

Fanuc controls restrict dynamic logic streaming over network interfaces to prevent buffer timing errors. To run parametric G-code, upload the macro files directly to the CNC's internal memory instead of streaming them via DNC.

How does parameter 6000#3 affect tool compensation variables?

Parameter 6000#3 (V15) dictates whether compensation variables use standard FS16 or legacy FS15 registers. If migrating macros from an older machine, verify the V15 setting to prevent the tool from accessing the wrong offset register and crashing into a fixture.

Still not resolved?

Ask our AI assistant about this topic in natural language. Grounded in verified sources, no hallucinations.

Ask AI Assistant
Hakan Gündoğdu
Hakan Gündoğdu
  • CNC CARE Co-Founder (May 2025 - Present)
  • Mitsubishi Electric NC Sales & Service Section Manager (2008 - 2025)
  • Reis CNC Service Engineer (2003 - 2005)
  • Ören Kalıp CNC Mold Line Team Leader (1999 - 2002)

With over 25 years of experience working in all areas of the CNC machine industry, I continue my activities as a co-founder of CNC CARE, where we offer brand-independent consulting, engineering, and original spare parts services.

Related Articles

Other articles on this topic