Guide to CNC Parameter Management: Fanuc, Siemens, and Mitsubishi
Master dynamic parameter management on Fanuc, Siemens, and Mitsubishi CNCs. Learn to write parameters via G10, avoid SW0100 alarms, and prevent tool crashes.
Introduction
Executing a poorly written parameter-setting macro that silently overwrites critical machine definitions, such as the parameters defining the chuck and tailstock barrier, poses a severe risk in automatic machining cycles. If an active G-code program bypasses safety protections and injects corrupted boundary data, the CNC will fail to predict an overtravel condition. This uncommanded geometric shift guarantees a severe hard collision upon the next axis movement, driving the turret or spindle directly into a vise jaw, a secured workpiece clamp, or the chuck, resulting in a ruined, scrap part.
To mitigate these risks, modern controllers employ strict administrative gateways and buffering locks. Understanding how to dynamically write, read, and protect system parameters via programming instructions is crucial for establishing reliable, crash-free automated setups.
Technical Summary
| Field | Technical Specification |
|---|---|
| Command Code | G10 L50 / G10 L70 / G11 / System Variables / R-parameters |
| Modal Group / Modality | Data Input / Macro / Parameter Management |
| Supported Brands | Fanuc, Siemens, Mitsubishi |
| Critical Parameters | Fanuc 8900#0 (PWE), Fanuc 11502#2 (WPP), Siemens $TC_DP16, Mitsubishi #1037 (cmdtyp) |
| Main Constraint | Pre-decoding buffer synchronization (STOPRE in Siemens), high-speed buffering restrictions (Mitsubishi G05 P2 blocks G10), PWE alarm lockout (Fanuc SW0100) |
Quick Read
- Setting Fanuc parameter 8900#0 (PWE) to 1 unlocks parameter access but instantly triggers an SW0100 alarm, disabling automatic operation.
- You must enable Fanuc parameter 11502#2 (WPP) to allow dynamic G10 parameter changes for parameters that normally require a power-off.
- For Siemens controls, always command a
STOPREpreprocessing stop before reading a live coordinate or coordinate-shifting variable to synchronize look-ahead buffer with physical kinematics. - Ensure Siemens
G290mode is active before passing ISO dialect arguments, avoiding macro failures and Alarm 4050 errors. - Avoid executing Mitsubishi
G10 L50orG10 L70parameter inputs while advanced high-speed machining (G05 P2) is active, otherwise a P421 program error will halt the cutter. - Changing the command type parameter #1037 on Mitsubishi systems requires a hard power reboot and SRAM format to rebuild the file structure.
Basic Concepts
Fanuc’s parameter management architecture acts as a highly rigid administrative gateway that prevents unauthorized or accidental modifications to the CNC’s foundational logic. The practical programming effect of utilizing G10 L50 is that programmers can dynamically reconfigure the machine during a cycle—altering servo loop gains, shifting pitch error compensation, or redefining stroke limits—without manual intervention. For more information on manual setting screen overrides, refer to the Fanuc parameters and PWE guide.
The practical programming effect of Siemens' advanced parameter management gives developers the power to write highly flexible, self-adapting macro routines rather than relying entirely on rigid, hardcoded Cartesian coordinates. By utilizing R parameters alongside explicitly declared system variables (such as capturing transfer arguments with $C_X or dynamically evaluating tool lengths via $TC_DP3), programmers can mathematically scale part programs, shift coordinate frames, and evaluate real-time machine states on the fly. To understand how the SINUMERIK system organizes its internal machine variables, consult the documentation on MD machine data structure.
In Mitsubishi and Mazak Smooth systems, parameter management fundamentally controls machine kinematics, tool offsets, and secure macro execution. For instance, parameters #1122 (Program display lock C) and #1121 (Edit lock C) hide and protect custom MTB macros from accidental edits. If an operator inadvertently alters unprotected custom macros that govern tool exchange sequences or pallet changes, the turret could index at an incorrect coordinate, resulting in a severe hard collision with the chuck, clamp, or vise jaw. To unlock custom macro permissions on modern controls, check the G65 custom macro enable parameters tutorial.
Command Structure
The G10 command serves as the primary gateway for programmable data input across major CNC controls, allowing the system to update internal registry settings without manual operator intervention. By pairing G10 with specific L-codes, the programmer defines the target data type—such as L50 for general parameter input on Fanuc and Mitsubishi, or L70 on Mitsubishi for specific compensation and register modifications. The data is entered using parameter address numbers specified under the N-word and their corresponding values under the R-word.
Once G10 is executed, the control switches its interpreter into parameter input mode, processing all subsequent blocks as parameter updates. To resume standard machining interpolation, the programmer must explicitly command G11 to cancel this input state. In Siemens controls, rather than using G10, variables and R-parameters are directly reassigned using standard assignment operators, providing a PC-like development experience that can be embedded directly in the G-code editor.
Command Syntax
; Fanuc and Mitsubishi Syntax G10 L50 ; Open parameter input mode N11502 R20 ; Assign value to specified parameter G11 ; Close parameter input mode
; Siemens Syntax R10 = 15.0 ; Assign value to predefined R parameter $TC_DP16[1, 1] = 0.05 ; Assign wear value to system variable
System Parameters and Addresses
| Parameter | Description | Value Range |
|---|---|---|
| 8900#0 (PWE) (Fanuc) | Parameter Write Enable state; setting to 1 unlocks parameters and triggers SW0100 alarm | 0 or 1 |
| 11502#2 (WPP) (Fanuc) | Programmable parameter input behavior for power-off parameters | 0 (disabled), 1 (enabled) |
| 11502#4 (PSU) (Fanuc) | Execution speed of programmable parameter input | 0 (normal), 1 (high speed) |
| 3116#2 (PWR) (Fanuc) | Clear condition for SW0100 alarm | 0 (CAN + RESET), 1 (RESET or external signal) |
| 3210 (PSW) / 3211 (KEY) (Fanuc) | Password and keyword for program protection (9000-9999 macros) | String / Numeric |
| $TC_DP16 [t, d] (Siemens) | System variable for tool wear on corner radius | -1.8E+308 to 1.8E+308 mm |
| $P_MAGN (Siemens) | System variable for total magazines in channel | 1 to 32000 |
| R Parameters (Siemens) | Predefined floating-point variables for loop math | ±(10^-300 ... 10^+300) |
| MD20150 $MC_GCODE_RESET_VALUES (Siemens) | G-code reset value initialization settings | BYTE array |
| #1037 cmdtyp (Mitsubishi) | Command type; program G-code series and compensation type | 1 to 8 |
| #1121 edik_c (Mitsubishi) | Edit lock C for macro programs 9000 to 9999 | 0 (possible), 1 (prohibited) |
| #1122 pglk_c (Mitsubishi) | Program display lock C for macro programs 9000 to 9999 | 0 (display ok), 1 (hide details), 2 (hide details & disable search) |
| #1124 ofsfix (Mitsubishi) | Cursor behavior on input key at tool compensation screen | 0 (auto-increment offset), 1 (lock cursor) |
Brand Applications
Fanuc
In Fanuc systems, parameter management is a rigid gateway. Manually, operators toggle parameter 8900#0 (PWE) to unlock settings, which triggers an SW0100 alarm. Programmatically, parameter 11502#2 (WPP) must be configured to permit G10 modifications for parameters requiring power-off.
The G-code sequence to modify parameters programmatically opens with G10 L50, defines the target parameter number and value (e.g., N11502 R20), and terminates with G11 to restore standard execution.
- Parameter 8900#0 (PWE): Parameter Write Enable state; setting to 1 unlocks parameters and triggers SW0100 alarm. Value range: 0 or 1.
- Parameter 11502#2 (WPP): Programmable parameter input behavior for power-off parameters. Value range: 0 (disabled), 1 (enabled).
- Parameter 11502#4 (PSU): Execution speed of programmable parameter input. Value range: 0 (normal), 1 (high speed).
- Parameter 3116#2 (PWR): Clear condition for SW0100 alarm. Value range: 0 (CAN + RESET), 1 (RESET or external signal).
- Parameter 3210 (PSW) / 3211 (KEY): Password and keyword for program protection (9000-9999 macros). Value range: String / Numeric.
- Alarm SW0100 (PARAMETER ENABLE SWITCH ON): Triggered immediately when PWE is set to 1. The control locks out automatic operation until PWE is returned to 0 and the alarm is cleared.
- PW Alarm: Triggered when a parameter is changed that requires a control power cycle. Fix: Reboot the CNC control.
- Alarm PS0525: Cycle start in MEM/RMT without reset during MDI macro call. Fix: Perform a reset before cycle start.
- Version difference: Series 0 vs 10/11/15 address mapping shifts (e.g., parameter FCBLCM moves from No.8X06 Bit 5 to No.1884 Bit 5). Modern controls feature parameter 0002#0 (FCV) to switch reading format.
Warning: Bypassing safety limits via G10 can result in severe axis overtravel, leading to a hard collision where the turret crashes into a vise jaw or chuck.
Siemens
Siemens controls utilize R-parameters and system variables prefixed with the $ sign. For instance, tool wear on corner radius is stored in system variable $TC_DP16, and total magazines in channel is stored in system variable $P_MAGN.
Siemens G-code programs declare user variables using commands like DEF INT or assign values directly (e.g., R10=15), allowing dynamic logic evaluations using jumps like GOTOF or GOTOB.
- R Parameters: Predefined floating-point variables for loop math. Value range: ±(10^-300 ... 10^+300).
- System Variable $TC_DP16 [t, d]: System variable for tool wear on corner radius. Value range: -1.8E+308 to 1.8E+308 mm.
- System Variable $P_MAGN: System variable for total magazines in channel. Value range: 1 to 32000.
- Parameter MD20150 $MC_GCODE_RESET_VALUES: G-code reset value initialization settings. Value range: BYTE array.
- Alarm 4050 ("NC code identifier %1 cannot be reconfigured to %2"): Triggered if renaming an NC parameter, variable, or keyword fails type range checks. Fix: Correct the machine data configuration.
- Alarm 16748: Triggered during tapping (G331) if no spindle speed is programmed and inherited speed is out of active gearbox thresholds. Fix: Explicitly program an in-range spindle speed.
- Version difference: Entry-level SINUMERIK 808D/ADV restricts parameter subprogram calls to a max of 11 levels. Reset values in MD20150 differ between 828D turning (te42) and milling (me42) interfaces.
Warning: Reading live variables without a STOPRE command will evaluate obsolete look-ahead buffer data, causing incorrect positioning and tool crashes.
Mitsubishi
Mitsubishi and Mazak Smooth systems support hardware screen edits (Data I/O) or programmable updates. Parameters like #1122 (pglk_c) and #1121 (edik_c) secure macro files.
Programming relies on the G10 L50 block, mapping values through the N address (e.g., N1037 R1), followed by G11.
- Parameter #1037 cmdtyp: Specifies G-code series and compensation type. Value range: 1 to 8.
- Parameter #1121 edik_c: Edit lock C for macro programs 9000 to 9999. Value range: 0 (possible), 1 (prohibited).
- Parameter #1122 pglk_c: Program display lock C for macro programs 9000 to 9999. Value range: 0 (display ok), 1 (hide details), 2 (hide details & disable search).
- Parameter #1124 ofsfix: Cursor behavior on input key at tool compensation screen. Value range: 0 (auto-increment offset), 1 (lock cursor).
- Alarm P421 (Program Error): Triggered if G10 L70 or G10 L100 is commanded while High-speed machining mode II (G05 P2) is enabled. Fix: Cancel high-speed mode (G05 P0) before parameter write.
- Alarm PS1079: Auto operation without selecting main program when #9035 is enabled. Fix: Select a main program.
- Alarm PS5073: Decimal point omitted in G-code command when parameter 3404#2 is configured to enforce errors. Fix: Add decimal point to values in the block.
- Version difference: SmoothEz uses a 15" vertical touchscreen; SmoothC has a 10.4" display-separated non-touchscreen. SmoothC backups require Maintenance Tool; SmoothG/Ez support internal SD cards and Data I/O screen.
Warning: Writing parameter changes while advanced look-ahead buffers are active triggers a P421 alarm, stopping the spindle instantly and spoiling the workpiece.
Brand Comparison
| Topic | Fanuc | Siemens | Mitsubishi |
|---|---|---|---|
| Parameter Write Access | Screen PWE bit with SW0100 alarm lock | Keyswitch / multi-level protection system | Data I/O / Maintenance Screen or hardware key |
| Programmable Syntax | G10 L50 / L52 ... G11 | High-level DEF user variables, $, R parameters | G10 L50 / L70 / L100 ... G11 |
| Advanced Lookahead | Speed set via 11502#4 (PSU) | Controlled via STOPRE preprocessing stop | Prohibited during G05 P2 (P421 Program Error) |
| User Variables | Numbered macro registers (#100-#999) | Custom names / arrays (DEF REAL X_AXIS) | Numbered macro variables (#100-#999) |
Technical Analysis
Fanuc distinguishes its parameter management architecture from other control brands through aggressive alarm-based access locking, dual-speed input processing, and robust legacy emulation. First, Fanuc treats an unlocked parameter state as a severe, system-halting condition. The moment PWE is enabled, the controller instantly throws an active alarm code (SW0100), completely immobilizing the axes to ensure the machine absolutely cannot be run in automatic mode while core logic is exposed. Second, Fanuc provides explicit parameter-driven control over the processing speed of G-code parameter changes. By configuring parameter 11502#4 (PSU), the machine builder can dictate whether massive blocks of G10 L50 data are executed at standard conventional speeds or processed via a high-speed parsing engine to reduce cycle hesitation. Finally, Fanuc integrates deep downward-compatibility structures directly into its parameter tables. By configuring parameters like 0002#0 (FCV), programmers can force a brand-new control to flawlessly emulate the program formats and parameter calculation logic of decades-old Series 15 or Series 10/11 controls, eliminating the need to rewrite thousands of lines of legacy macros.
Siemens exhibits several distinct parameter management behaviors that clearly distinguish this brand from basic ISO control systems. First, Siemens natively embeds a high-level, PC-style programming language directly into the G-code editor. This allows developers to define their own custom variable names and arrays (using DEF REAL X_AXIS for Local/Global User Data) rather than forcing them to rely exclusively on obscure, numbered macro registers (like #100), making the resulting code highly self-documenting. Second, Siemens provides seamless cross-compilation parameter sharing between legacy ISO dialect code and its native high-level language. By utilizing the G290 (Siemens mode) and G291 (ISO mode) commands, programmers can dynamically toggle the language context within the exact same macro file, capture arguments passed via ISO mode, perform complex mathematical calculations on them using Siemens syntax, and effortlessly pass the evaluated results back into the legacy ISO environment. Third, Siemens protects its parameter ecosystem through a rigorous, multi-tier keyswitch protection level hierarchy. System variables and Machine Data (such as MD20150) are strictly partitioned by access level, allowing operators to safely manipulate their own R parameters without ever risking the accidental corruption of manufacturer-level kinematics.
Mazatrol Smooth parameter architecture exhibits behaviors that clearly distinguish this brand from other CNC platforms. First, Mitsubishi strictly segregates its hardware parameter interfaces across the Smooth lineup; the SmoothEz mandates touchscreen navigation for parameter edits on a 15-inch vertical display, whereas the SmoothC relies entirely on a keyboard unit and soft keys, fundamentally changing how an operator physically interacts with the Data I/O menus on the shop floor. Second, Mitsubishi features a highly specific quality-of-life parameter (#1124 ofsfix) that alters the hard-coded behavior of the "INPUT" key on the tool compensation screen. By setting this parameter to 1, programmers lock the cursor in place rather than allowing it to auto-increment to the next offset number, vastly accelerating the repetitive fine-tuning of a single tool's wear data. Third, Mitsubishi strictly enforces a hard reboot requirement for foundational parameter changes. If a technician alters parameter #1037 to change the active G-code series, the controller will not dynamically adopt the change; it strictly requires a power cycle and an SRAM format to rebuild the file system, ensuring absolute data integrity before the spindle is allowed to rotate again.
Program Examples
Fanuc Example
O9001 (DYNAMIC PARAMETER WRITE)
G00 X100.0 Z50.0 ; Move to safe position
G10 L50 ; Open parameter input mode
N11502 R20 ; Set parameter 11502#2 (WPP) to 1
G11 ; Close parameter input mode
M30 ;
dry run: Run the program with Machine Lock enabled. Verify that the G10 and G11 block sequence executes without raising syntax faults or triggering the SW0100 alarm prematurely.
Siemens Example
N10 DEF REAL X_AXIS, Y_AXIS
N15 DEF INT NUM_MAG
N20 STOPRE ; Force preprocessing stop to synchronize
N25 X_AXIS = $C_X ; Capture ISO X argument
N30 Y_AXIS = $C_Y ; Capture ISO Y argument
N35 R10 = 15.0 ; Assign value to R-parameter
N40 IF R10 > 5.0 GOTOF LABEL3 ; Conditional jump
N45 M30
N50 LABEL3:
N55 G00 X=X_AXIS Y=Y_AXIS
N60 M30
dry run: Use the internal Sinumerik simulator to test the program. Verify that the conditional jump branches correctly and that the STOPRE command halts lookahead parsing to resolve variables accurately.
Mitsubishi Example
(MITSUBISHI PROGRAMMABLE INPUT)
G00 X50.0 Y50.0 ; Safe retract
G05 P0 ; Cancel high-speed mode II to avoid P421 alarm
G10 L50 ; Open parameter input mode
N1037 R1 ; Modify cmdtyp parameter #1037
G11 ; Cancel parameter input
M30 ;
dry run: Execute the block step-by-step. Ensure the tool path is completely stopped and the G05 P0 code has canceled advanced lookahead buffering prior to parsing the G10 parameter update.
Error Analysis
| Brand | Alarm Code | Trigger Condition | Operator Symptom | Root Cause / Fix |
|---|---|---|---|---|
| Fanuc | SW0100 | Parameter Write Enable (PWE) set to 1 | System throws active alarm; automatic operation is disabled | PWE is left enabled. Return PWE to 0 and reset according to parameter 3116#2. |
| Fanuc | PW Alarm | Changed parameter requiring control power cycle | Reboot warning appears on screen; change is staged but not applied | Foundational parameter modified. Perform a complete CNC control power cycle. |
| Fanuc | PS0525 | Cycle start in MEM/RMT without reset during MDI macro call | Axis motion locks; cycle start is rejected | Governed by parameter 11502#3. Perform a reset before cycle start. |
| Siemens | Alarm 4050 | Rename NC code identifier fails type range checks | Program halts with alphanumeric identifier error | Machine data $MN_NC_USER_CODE_CONF_NAME_TAB configured incorrectly. Correct the type range. |
| Siemens | Alarm 16748 | Tapping (G331) without programmed speed | Tapping cycle fails to start; spindle does not rotate | Inherited speed falls outside thresholds of active gearbox. Program an in-range spindle speed. |
| Mitsubishi | P421 | Command G10 L70 or G10 L100 parameter input during G05 P2 | Program stops immediately mid-cut | High-speed machining mode II is active during parameter write. Cancel high-speed mode (G05 P0) first. |
| Mitsubishi | PS1079 | Auto operation without selecting main program when #9035 is enabled | Automatic operation fails to initiate | Workpiece number search (#9035) enabled without selecting main program. Select a main program. |
| Mitsubishi | PS5073 | Decimal point omitted in G-code command | Cycle halts on block with syntax error | Parameter 3404#2 is configured to throw errors for omitted decimals. Add decimal points to values. |
Application Note
An uncommanded axis travel caused by an unsynchronized kinematic read or corrupted parameter entry will drive the turret or spindle directly into a vise jaw, a secured workpiece clamp, or the chuck, resulting in a ruined, scrap part. When utilizing programmable parameter updates, programmers must verify that all look-ahead buffers are explicitly flushed. In Fanuc systems, parameter changes through G10 L50 require toggling parameter 11502#2 (WPP) to bypass manual protection barriers, but executing this without verifying boundary parameters risks silent spatial displacement. In Siemens SINUMERIK systems, omitting the STOPRE stop before evaluating system variables like $TC_DP3 or $TC_DP16 means the interpreter queries outdated values from the look-ahead buffer. Similarly, Mitsubishi systems command an immediate P421 program error halting the spindle if G10 is initiated during active G05 P2 high-speed machining. Programmers must enforce strict mode isolation—using STOPRE for Siemens and G05 P0 for Mitsubishi—to ensure machine motion remains synchronized with logical parameters.
Related Command Network
- G10: Programmable data input used to modify registers, offsets, and parameters within an active NC program.
- G11: Cancels the G10 data input mode and restores normal G-code execution.
- G290 / G291: Toggles the interpreter language between Siemens native mode and standard ISO dialect mode.
- STOPRE: Stops block lookahead to synchronize variable calculations with real-time axis coordinates.
- G05 P2: Activates advanced lookahead and high-speed machining, which must be canceled via G05 P0 before executing parameter modifications.
Conclusion
Managing CNC system parameters dynamically requires strict synchronization between the interpreter's lookahead logic and the machine's physical state. Safely executing programmable inputs demands that programmers explicitly flush buffering modes, protect macro directories using parameters like #1121 or 3210, and always verify parameter changes via mock simulations prior to actual workpiece execution.
FAQ
How can I modify a parameter requiring a power-off programmatically?
On Fanuc controls, you must set parameter 11502#2 (WPP) to 1. This permits the G10 L50 command sequence to modify parameters that normally require a manual power cycle, but you must still execute a physical reboot of the controller afterwards to finalize and sync the system's database.
Why does my Siemens program read outdated variable values?
This occurs because the SINUMERIK lookahead buffer pre-decodes blocks in advance of physical axis motion. To prevent this, program a STOPRE command on a dedicated line immediately prior to reading any live system variable or tool offset to force the interpreter to pause and synchronize with the real-time machine state.
What causes the Mitsubishi P421 program error during parameter writing?
The Mitsubishi controller prohibits parameter writes via G10 L50 or G10 L70 while High-speed Machining Mode II (G05 P2) is active because the buffering conflicts with parameter caching. To resolve this, insert a G05 P0 block to deactivate high-speed buffering before calling any G10 parameter updates.
Still not resolved?
Ask our AI assistant about this topic in natural language. Grounded in verified sources, no hallucinations.

- CNC CARE Co-Founder (May 2025 - Present)
- Mitsubishi Electric NC Sales & Service Section Manager (2008 - 2025)
- Reis CNC Service Engineer (2003 - 2008)
- Ö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
G27 Reference Position Return Check: CNC Guide for Multi-Brand Systems
Master the CNC G27 reference position return check on Fanuc, Siemens, and Mitsubishi controls. Learn parameters like MD 34100 and fix Alarm 61816.
Siemens SINUMERIK G26 Upper Working Area & Spindle Speed Limit
Master the Siemens SINUMERIK G26 command for upper working area and spindle speed limits. Learn syntax, parameters like SD 43420, and alarms to avoid crashes.
G26 Spindle Speed Fluctuation Detection ON: CNC Programming Guide
Learn how to configure G26 on Fanuc, Siemens, and Mitsubishi CNC controls to prevent spindle speed fluctuations, set travel limits, and avoid tool crashes.
G25 Lower Working Area and Spindle Speed Limit: Siemens CNC
Master G25 lower working area and spindle speed limits on Siemens SINUMERIK controls. Avoid chuck collisions and configure safety parameter SD 43430.