Fanuc Parameter 3402 G-Code Clear and Reset Configuration Guide
Master Fanuc Parameter 3402 G-code clear and reset configuration. Avoid crashes by retaining absolute positioning and feedrates to prevent PS0011 alarms.
Introduction
An uncommanded axis movement during a cycle start can plunge a lathe tool turret or milling spindle directly into a vise jaw, a mechanical workpiece clamp, or the chuck, causing a severe hard collision and scrapping the workpiece. This critical failure is often the direct consequence of a misconfigured Fanuc Parameter 3402, which governs the machine's initial and reset modal states. When the control's reset behavior is set to clear all modal data without proper safety retention, an operator pressing the RESET key mid-program to clear chips or inspect a tool can cause the absolute positioning mode to silently revert to incremental positioning, leading to catastrophic over-travel when the program is resumed.
Technical Summary
| Specification Field | Technical Value / Status |
|---|---|
| Command Code | Parameter 3402 |
| Modal Group | Initial / Reset State Configuration |
| Brands | Fanuc |
| Critical Parameters | 3402#6 (CLR), 3409#7 (CFH), 3406 to 3409 (C01 to C30) |
| Main Constraint | Must be initialized correctly at power-on to prevent axes from moving under incorrect defaults; resetting can purge modal feedrates and coordinates. |
Quick Read
- Toggling Parameter 3402#6 (CLR) to 1 changes reset behavior to a clear state, reverting G-code modal groups to their default values.
- Setting Parameter 3402#3 (G91) to 1 makes the system default to incremental commands, posing a crash risk if absolute mode is cleared on reset.
- Enabling Parameter 3409#7 (CFH) preserves critical feedrates (F), tool offsets (H/D), and tool codes (T) on reset even when CLR is active.
- Parameter 3402#0 (G01) sets the default Group 01 interpolation mode to G01 (linear) instead of G00 (rapid positioning) upon power-up or clear.
- Decouple specific G-code groups from reset clearing by configuring parameters 3406 to 3409 (C01 through C30).
- Executing a linear or circular interpolation command without re-declaring an F-code after a modal clear triggers Alarm PS0011.
Basic Concepts
The practical programming effect of Fanuc Parameter 3402 is the establishment of a totally predictable baseline environment whenever the machine is powered on or interrupted. Instead of forcing programmers to pad the top of every single subprogram with a massive "safety block" (e.g., G00 G90 G17 G22) to guarantee the machine's current mode, machine tool builders configure Parameter 3402 so the CNC wakes up in a known, safe state. This baseline provides consistent G-code modality across different production cycles. Operators can rely on the system initializing standard coordinate systems, default feedrate modes, and tool checking options without requiring manual setup blocks for each execution.
However, operators and programmers must be extremely cautious regarding the CLR bit (3402#6). This bit fundamentally alters how the machine handles interruptions. If an operator presses the RESET key mid-program to clear chips or inspect a tool, and CLR is set to 1, the machine's active absolute positioning mode (G90) will be instantly wiped out and reverted to the default defined by parameter 3402#3. Managing these startup behaviors is as critical as managing write permissions via fanuc-parameters-and-pwe.
Command Structure
The configuration of Parameter 3402 is defined using an 8-bit register format where each bit from 0 to 7 operates as an independent toggle. Operators can modify these bits manually via the MDI panel on the SYSTEM screen after enabling the Parameter Write Enable switch. Alternatively, these settings can be adjusted programmatically using G10 commands to ensure consistent setups.
The syntax for programmatic adjustments utilizes the G10 L50 format. This command sequence targets specific parameter registers and assigns values to individual bits. Programmers executing G10 parameter changes can also pass parameters using g65-macro-argument-assignment and resolve status bits using macro-logical-operators to control flow dynamically.
G10 L50; (Start parameter entry mode)
N3402 P1 R01001000; (Set parameter 3402 bits)
G11; (End parameter entry mode)
dry run
Before executing the G10 L50 parameter entry program, retract all axes to home position and verify that no workpiece is loaded. Execute the block in single-block mode and immediately check that the SYSTEM screen shows the updated bit settings for Parameter 3402. Press the RESET key to return to normal operations and verify that no alarms are active before resuming production.
| Parameter / Bit | Description | Value Range / Settings |
|---|---|---|
| 3402#0 (G01) | Default Group 01 interpolation mode at power-on or clear | 0 = G00 (rapid positioning), 1 = G01 (linear interpolation) |
| 3402#1 (G18) & 3402#2 (G19) | Default plane selection at power-on or clear | Both 0 = G17 (XY plane), #1 = 1 = G18 (ZX plane), #2 = 1 = G19 (YZ plane) |
| 3402#3 (G91) | Default coordinate system at power-on or clear | 0 = G90 (absolute command), 1 = G91 (incremental command) |
| 3402#4 (FPM) | Default feedrate mode at power-on or clear | 0 = Feed per revolution (G95/G99), 1 = Feed per minute (G94/G98) |
| 3402#5 (G70) | Inch/metric conversion commands (M-series milling) | 0 = G20 / G21, 1 = G70 / G71 |
| 3402#6 (CLR) | Global reset behavior selection | 0 = Reset state (retains modal data), 1 = Clear state (wipes modals to defaults) |
| 3402#7 (G23) | Default stored stroke check state at power-on | 0 = G22 (stored stroke check on), 1 = G23 (stored stroke check off) |
| 3406 to 3409 (C01 to C30) | Reset G-code clear settings for individual groups (when 3402#6=1) | 0 = Place group in clear state, 1 = Retain group modal state |
| 3409#7 (CFH) | Reset clearance control for F, H, D, and T codes (when 3402#6=1) | 0 = Clear codes on reset, 1 = Retain codes on reset |
Brand Applications
Fanuc
On Fanuc systems, Parameter 3402 controls the default system environment and reset clear behaviors. The control's bit settings allow operators to define initial G-code modes. Safe operation relies on setting the CLR bit (3402#6) and using the CFH bit (3409#7) to protect secondary registers. Specific G-code groups are customized using parameters 3406 to 3409 (C01 through C30) to prevent unexpected modal resets during emergency stops.
Brand Comparison
| Fanuc Series / Version | Reset Behavior | Parameter Characteristics |
|---|---|---|
| Series 0i / 0i-F | Standard reset clearing configured via 3402#6 and group parameters 3406 to 3409. | Supports G70/G71 inch/metric conversion on M-series. Basic clear settings. |
| Series 16i / 18i / 21i | Granular group clearing (C01-C30) and CFH (3409#7) code preservation. | CFH protects F/T on Lathes, F/H/D on Mills. Stable restarting capabilities. |
| Series 15i / 30i / 31i / 32i | Advanced multi-path reset coordination and full bit-level group protection. | Sophisticated diagnostics with safety integrated memory. Custom clear states. |
Technical Analysis
Fanuc uniquely distinguishes its modal-clearing architecture from other control brands through highly granular, customizable retention logic. Rather than offering a binary choice where a reset either wipes all codes or saves all codes, Fanuc allows builders to explicitly decouple individual G-code groups from the 3402#6 clear command via parameters 3406 to 3409 (C01 through C30). This means a facility can configure the machine to aggressively clear its interpolation modes (wiping G01 back to G00) while intentionally saving its work coordinate systems (Group 14) and canned cycle planes (Group 02) during an emergency stop.
To protect non-G-code addresses, Fanuc features the dedicated CFH parameter (3409#7), which acts as an explicit override. Even if 3402#6 completely wipes the CNC's geometry modes, enabling CFH ensures that critical F (feedrate), H/D (milling tool offsets), and T (lathe tool codes) remain safely locked in memory, guaranteeing stable restarts after operator intervention. The implementation of inch/metric toggling via 3402#5 (G70) is specific to M-series (milling) systems. When configuring which secondary codes are protected during a 3402#6 reset, T-series (lathes) utilize the CFH parameter to protect F and T codes, whereas M-series machines use the exact same bit to protect F, H, and D codes.
Program Examples
; Fanuc: G90 G00 X0 Y0; (Default state if 3402#0=0 and 3402#3=0)
; Fanuc: G91 G01 Z-10.0 F100; (Default state if 3402#0=1 and 3402#3=1)
; Fanuc: G17 G22; (Default planes and stroke limits if 3402#1=0, 3402#2=0, and 3402#7=0)
dry run
Before executing programs that rely on default modal states defined by Parameter 3402, a dry run must be performed. The operator must retract the tool turret or spindle to a safe position and verify that no workpiece is clamped. Running the program in single-block mode allows the operator to observe the active modal display on the CNC screen. If the reset state has cleared the feedrate or coordinate system, the control will either throw an alarm or show an incorrect motion path. The operator must verify the active G-codes and feedrates on the screen before feeding the tool into any material.
Error Analysis
| Alarm Code | Trigger Condition | Operator Symptom | Root Cause / Fix |
|---|---|---|---|
| PS0011 | FEED ZERO (COMMAND) / NO FEEDRATE COMMANDED: Cutting feed (G01/G02/G03) executed without F-code after modal feedrate was cleared by reset. | System halts immediately and axis motion is blocked. | The feedrate modal was wiped due to 3402#6=1 and group 05 C05=0. Program an F-code in the block or enable protection via CFH (3409#7). |
| PS1202 | NO F COMMAND AT G93: Operating in inverse time feed (G93) and the feedrate modal is cleared by reset. | The CNC displays alarm PS1202 and halts motion. | Inverse time feed strictly requires an F command in every moving block. Program an F command in the moving block. |
| SV0414 | Digital servo system alarm detected on an axis. | The CNC triggers an emergency stop and axis movement is disabled. | Abnormal current, short circuit, or encoder communication fault. Inspect diagnostic parameters 200 and 204 to identify the sub-fault, check servo amplifier LED, and verify cable connections. |
| SV0401 | Vready-off servo alarm (servo amplifier ready signal is off). | Emergency stop is triggered and servos are de-energized. | Servo amplifier did not turn on. Check the magnetic contactor, emergency stop circuit, and the flat cable connecting the CNC and the amplifier. |
Application Note
Wiping the feedrate modal during a reset when the parameter 3402#6 (CLR) is set to 1 causes the CNC safety logic to halt the axes and throw alarm PS0011 when resuming a cutting block without re-specifying an F-code. If the reset also wipes absolute positioning (G90) to incremental positioning (G91) due to parameter 3402#3, the machine will interpret absolute coordinates as incremental travel distances. Upon pressing Cycle Start, this uncommanded spatial shift plunges the tool turret or spindle directly into a vise jaw, a mechanical workpiece clamp, or the chuck, causing a hard collision and scrapping the workpiece. To avoid these severe outcomes, operators must ensure that parameters 3406 to 3409 (C01 through C30) are configured to retain critical G-code groups during interruptions.
Related Command Network
- G10 L50: Initiates programmable parameter input to write Parameter 3402 and safety group selections directly from an active program.
- G00: Serves as the rapid positioning command that can be established as the Group 01 default at power-up by setting Parameter 3402#0 to 0.
- G01: Serves as the linear interpolation command that can be established as the Group 01 default at power-up by setting Parameter 3402#0 to 1.
- G90: Absolute coordinate command that is retained or cleared on reset depending on the state of Parameter 3402#6 and 3402#3.
- G93: Inverse time feedrate mode that triggers Alarm PS1202 if the modal feedrate is cleared by the Parameter 3402 reset logic.
Conclusion
Maintaining control over CNC startup and reset environments requires auditing Parameter 3402 settings to match the shop's programming standards. Restoring modal values on reset using specific group settings prevents unexpected incremental motion and feedrate alarms, ensuring safe machine restarts after an interruption.
Frequently Asked Questions
How does Parameter 3402#6 (CLR) affect the modal feedrate after pressing reset?
Setting Parameter 3402#6 to 1 wipes the modal feedrate (F-code) on reset. To prevent this, program an F-code in the next block or set Parameter 3409#7 (CFH) to 1 to protect feedrate data in memory.
What happens if Parameter 3402#3 (G91) is set to 1 and the control is cleared?
The coordinate system defaults to incremental mode (G91) on power-on or reset. The operator must program a G90 command at restart to prevent the machine from translating absolute positions as incremental movements.
How can I protect specific G-code groups from being cleared by a reset?
Configure parameters 3406 to 3409 (C01 to C30) to specify which G-code groups remain active. Setting a group bit to 1 prevents the reset from clearing that specific group back to its default state.
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 - 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
Fanuc PMC Ladder Loading Baud Rate (PCLDB): Setup & Alarms
Configure the Fanuc PMC Ladder Loading Baud Rate using parameter 0060#1 (PCLDB) and G10 L50. Troubleshoot ER17 and ER18 alarms to prevent machine crashes.
Fanuc Auto Backup Parameter (10340): Setup and Troubleshooting
Learn to configure Fanuc automatic data backup using parameter 10340. Prevent SRAM data loss, monitor ATBK signals, and resolve PS0519 alarms on Fanuc CNCs.
Enabling Fanuc 3D Interference Check: Parameters and Setup
Configure Fanuc 3D Interference Check parameters. Learn how to set parameter 10930#0, troubleshoot Alarm PS0492, and prevent crashes with iHMI solid models.
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.