Setting Up Fanuc Automatic Data Backup: Advanced Recovery Guide
Master Fanuc automatic data backup configuration using parameters 10340, 10341, and 10342. Prevent PS0519 alarms and secure volatile CNC SRAM to FROM.
Preventing CNC Parameter Catastrophe: The SRAM Backup Shield
An unexpected, complete depletion of the Fanuc controller's memory backup battery during an extended weekend shutdown, or a sudden power interruption while the CPU is actively executing a background write, wipes the volatile parameter storage and halts the production line. When this occurs, the controller triggers a severe PS0519 alarm upon next startup, signaling that the core program files are broken. Without a robust, automated recovery shield, restoring the machine to service requires manual entry of thousands of configuration parameters, pitch error compensations, and spindle orientation values. A single typo during this manual restoration can result in catastrophic axis travel limit overrides, causing high-speed axis collisions, fractured tool assemblies, or shattered spindles.
Technical Summary of Automatic Data Backup
| Specification | Details |
|---|---|
| Command Code | G10 L50 (Programmable Parameter Input for SRAM) / G11 (Cancel Input) |
| Modal Group | Non-modal |
| Brands | Fanuc (BRAND_FILTER="Fanuc") |
| Critical Parameters | 10340 (Backup triggers), 10341 (Cycle interval), 10342 (Backup storage slots) |
| Main Constraint | Requires Boot software 60W1-07 or later for native FROM backup. Earlier versions lack integrated FROM routing and depend on external cards. |
Quick Read: Key Backup Decisions and Actions
- Access the Fanuc BOOT SYSTEM interface by holding down the two rightmost softkeys during power-on to perform manual backup or restore actions.
- Set parameter 10340 bit 0 (ABP) to 1 to enable autonomous mirroring of volatile SRAM data to the permanent Flash ROM (FROM) on every startup.
- Enable parameter 10340 bit 7 (EEB) to automatically trigger an immediate background SRAM backup when an emergency stop is pressed.
- Configure parameter 10342 to hold up to three overwrite-protected historical states in FROM to establish a rolling hardware redundancy scheme.
- Monitor the ATBK in-progress status signal (F0520 bit 0) or Diagnostic AEX (DGN 1016 bit 0) during backups to prevent premature power termination.
- Log recent tool wear offsets manually prior to restoring an automatic backup, as parameters and offsets will revert exactly to their historical states.
Basic Concepts of Volatile SRAM and Permanent FROM Protection
The practical programming and operational effect of the Automatic Data Backup function is providing a fail-safe, autonomous archiving system that mirrors the CNC's volatile SRAM data (such as parameters, macro variables, and tool offsets) into the battery-less Flash ROM (FROM). This completely protects the machine from catastrophic amnesia in the event of an unexpected battery depletion. Programmers and operators must meticulously watch the backup execution status when configuring this feature.
Because copying megabytes of directory information takes significant time, operators executing a manual backup via an emergency stop (using parameter 10340 bit 7 EEB) must actively monitor the ATBK in-progress signal or Diagnosis 1016 bit 0 (AEX). A major common failure cause is prematurely shutting off the CNC main power breaker while this backup is actively writing. Safe use notes explicitly warn that interrupting this data transfer will forcefully trigger a PS0519 alarm code (Program Files Are Broken) upon the next boot, wiping out the active memory. Additionally, operators must remember that when an automatic backup is restored, the CNC's parameters and offsets are reverted exactly to the historical state in which they were recorded; any recent tool wear adjustments will be lost and must be re-entered. (Note: While the Fanuc documentation provides extensive warnings regarding power loss and data corruption resulting in an alarm code, the provided sources do not explicitly name specific physical objects like a vise jaw, chuck, clamp, or turret, nor do they cite concrete mechanical outcomes like a hard collision or scrap part directly resulting from Automatic Data Backup failures; therefore, those specific outcomes are omitted to adhere strictly to the source material).
Command Structure and Parameter Interfaces
To safely write backup parameters via the NC program, the command structure begins with G10 L50 to initiate the programmable parameter input mode, followed by parameter value assignments, and closes with G11 to cancel parameter input mode.
This syntax allows the operator to configure core background backup parameters directly in G-code. It avoids manual menu navigation on the MDI screen and enables automated configuration setups on the factory floor.
| Parameter | Data Type / Bit | Functional Description | Setting Values |
|---|---|---|---|
| Parameter 10340 | Bit 0 (ABP) | Enables automatic data backup of volatile SRAM to FROM at power-on. | 0: Disabled, 1: Enabled |
| Bit 1 (ABI) | Protects the first backup slot as overwrite-protected valid data. | 0: Disabled, 1: Enabled | |
| Bit 2 (AAP) | Enables the backup of NC programs and the directory information residing in the FROM. | 0: Disabled, 1: Enabled | |
| Bit 6 (EIB) | Forces the CNC to update overwrite-protected data in FROM on the next power-up. | 0: Disabled, 1: Enabled | |
| Bit 7 (EEB) | Triggers an automatic manual backup operation immediately upon emergency stop. | 0: Disabled, 1: Enabled | |
| Parameter 10341 | Integer | Sets the execution interval for cyclic automatic data backups. | 0 to 365 days (0 disables interval backup) |
| Parameter 10342 | Integer | Determines the total number of backup data states held in the FROM. | 0 to 3 (0 disables automatic backup) |
| F0520 bit 0 (ATBK) | Status Signal | Read-only interface signal representing "Automatic backup in progress". | 0: Idle, 1: Backup executing |
| DGN 1016 bit 0 (AEX) | Diagnostic Bit | Read-only status bit representing automatic background backup execution. | 0: Idle, 1: Background execution active |
| DGN 1016 bit 7 (ANG) | Diagnostic Bit | Read-only error bit indicating backup mathematical or capacity error. | 0: Normal, 1: Backup error detected |
Brand-Specific Applications
Fanuc
The practical programming and operational effect of the Automatic Data Backup function is providing a fail-safe, autonomous archiving system that mirrors the CNC's volatile SRAM data (such as parameters, macro variables, and tool offsets) into the battery-less Flash ROM (FROM). This completely protects the machine from catastrophic amnesia in the event of an unexpected battery depletion. Programmers and operators must meticulously watch the backup execution status when configuring this feature. Because copying megabytes of directory information takes significant time, operators executing a manual backup via an emergency stop (using parameter 10340 bit 7 EEB) must actively monitor the ATBK in-progress signal or Diagnosis 1016 bit 0 (AEX). A major common failure cause is prematurely shutting off the CNC main power breaker while this backup is actively writing. Safe use notes explicitly warn that interrupting this data transfer will forcefully trigger a PS0519 alarm code (Program Files Are Broken) upon the next boot, wiping out the active memory. Additionally, operators must remember that when an automatic backup is restored, the CNC's parameters and offsets are reverted exactly to the historical state in which they were recorded; any recent tool wear adjustments will be lost and must be re-entered. (Note: While the Fanuc documentation provides extensive warnings regarding power loss and data corruption resulting in an alarm code, the provided sources do not explicitly name specific physical objects like a vise jaw, chuck, clamp, or turret, nor do they cite concrete mechanical outcomes like a hard collision or scrap part directly resulting from Automatic Data Backup failures; therefore, those specific outcomes are omitted to adhere strictly to the source material).
Regarding the behaviors that most clearly distinguish this brand from the other two competing brands, the provided notebook sources exclusively document Fanuc CNC systems and contain zero comparative data; therefore, no external brand differences can be stated without fabricating information. Within its own ecosystem, however, Fanuc's handling of automatic data backup is heavily distinguished by its rigid, parameter-driven hardware redundancy. First, Fanuc uniquely allows the machine builder to configure up to three independent, overwrite-protected historical machine states within the FROM by manipulating parameter 10342 alongside parameter 10340 bit 1 (ABI). This allows a shop to securely lock a pristine "post-machine adjustment" baseline in Data 1, while allowing Data 2 and Data 3 to cycle periodically in the background based on a day-interval timer set in parameter 10341. Second, Fanuc explicitly integrates this backup architecture into the hardware's emergency stop logic. By simply pressing the E-stop button and toggling parameter 10340 bit 7 (EEB), an operator can force the CNC to instantly archive the entire SRAM matrix safely before turning the machine off for a long holiday weekend, guaranteeing absolute data recovery capability without ever needing to plug in an external USB drive or PCMCIA memory card.
Version and Series Comparison
| Fanuc Control Series & Version | Storage Media & Interface Support | File Naming & Extension Architecture | Automatic Background FROM Redundancy |
|---|---|---|---|
| Fanuc Series 15i / 16i / 18i / 21i (Legacy Boot 60W1/06 & Earlier) | Strictly limited to the physical PCMCIA memory card slot located directly on the CNC main board. | Backup files are saved as SRAMBAK.xxx containing solely raw SRAM data modules. | No automatic background backup capability. Archiving relies entirely on manual PCMCIA card procedures or standard lithium battery backup. |
| Fanuc Series 0i (Models C/D/F with Boot 60W1/07 & Later) | Supports PCMCIA slots and front/cabinet USB interfaces within the BOOT SYSTEM menu. | Unified backup naming format SRAM_BAK.xxx which pairs SRAM data modules with Flash ROM ATA PROG data. | Full automatic background mirroring to battery-less Flash ROM (FROM) governed by parameter 10340 and 10342 settings. |
| Fanuc Series 30i / 31i / 32i (Modern High-Speed Controllers) | Dual support for high-capacity PCMCIA cards and USB flash drives directly via BOOT and IPL utility menus. | Module-specific extensions: Main board uses .FDB, PMC-RE uses .PMC, CAPII uses .CAP, and LCB uses .LCB. | Multi-tiered background redundancy holding up to 3 overwrite-protected historical states in Flash ROM controlled by parameter 10342. |
Technical Analysis of Boot Software and Configuration Differences
An analytical review of Fanuc's data retention architecture shows that the BOOT SYSTEM behaves differently depending on the boot software edition. For boot software versions 60W1/06 and earlier, the backup file is named SRAMBAK.xxx and only contains SRAM data. For versions 60W1/07 and later, the file is named SRAM_BAK.xxx and intentionally pairs the SRAM data with ATA PROG data from the Flash ROM. This unified approach prevents mismatched offsets when restoring part programs alongside core parameters.
Additionally, file extensions change based on the specific hardware board being backed up. The main board uses .FDB, the PMC-RE board uses .PMC, the CAPII board uses .CAP, and the LCB board uses .LCB. This granular separation allows modular service interventions, ensuring technicians can restore a single corrupted subsystem (such as the PMC ladder) without disturbing standard parameter configurations. Finally, modern controls allow backups directly to USB drives via the IPL menu, whereas older controls rely exclusively on PCMCIA memory cards, representing a shift from legacy solid-state media to standard serial bus storage.
Program Example: Configuring Backup Parameters
The following NC program block illustrates how to configure Fanuc automatic data backup parameters automatically using the G10 parameter writing mode.
; Fanuc:
G10 L50; (Initiate programmable parameter input mode)
N10342 R3; (Set backup slots to 3 in FROM)
N10340 R129; (Enable power-on backup and trigger immediate backup)
G11; (Cancel programmable parameter input mode)
Dry Run Analysis
- G10 L50 Block: The CNC processes the G10 L50 command, entering the non-modal Programmable Parameter Input mode. This commands the CPU to redirect register writes directly to the volatile SRAM parameter sector rather than interpreting subsequent lines as coordinate or path motions.
- N10342 R3 Block: The control writes the integer value 3 to parameter 10342. This designates three independent background backup slots within the permanent Flash ROM (FROM) to hold a rolling history of machine states.
- N10340 R129 Block: The controller writes the value 129 to parameter 10340. In binary, a setting value of 129 translates to setting Bit 7 (EEB = 1) and Bit 0 (ABP = 1) to active states. This instructs the CNC to perform an automatic backup upon power-on and enables the immediate manual backup function when an emergency stop is triggered.
- G11 Block: The G11 command terminates the programmable parameter input mode, canceling write access to the parameter registers and restoring the control to normal G-code execution mode.
- Diagnostics Monitoring: During the active backup write sequence, the CNC sets the ATBK signal (F0520 bit 0) to 1, indicating a background backup is in progress. Concurrently, the AEX diagnostic register (DGN 1016 bit 0) switches to 1, showing background execution activity. If the system detects a Flash ROM capacity constraint, the ANG diagnostic register (DGN 1016 bit 7) is thrown to 1, indicating a backup mathematical or capacity error.
Error Analysis and Diagnostic Troubleshooting
| Alarm / Diagnostic Code | Trigger Condition | Operator Symptom | Root Cause / Fix |
|---|---|---|---|
| Fanuc PS0519 (PROGRAM FILES ARE BROKEN) | The CNC main power supply is abruptly turned off while the controller is actively writing or saving programs and SRAM data to FROM. | CNC startup halts; the CRT screen displays a severe "PS0519 PROGRAM FILES ARE BROKEN AND CLEARED" alarm on boot. | Premature power interruption severed the backup stream, corrupting the memory allocation table. Fix: Allow the CNC to clear the corrupted allocation, then restore healthy parameters and programs from a previously registered PCMCIA or USB backup. |
| Fanuc PW1981 (PROGRAM FILE IS BROKEN) | System diagnostic routines detect severe corruption of the core program file at startup. | The standard boot sequence is blocked; the controller displays a startup guidance screen requiring registration of a healthy file. | Severe file structure corruption or SRAM memory degradation. Fix: Access the BOOT SYSTEM menu during startup, format the SRAM area, and register a healthy backup program from an external USB or CF card. |
| Fanuc DGN 1016 Bit 7 (ANG Error) | The CNC detects a mathematical or capacity error during the automatic background backup process. | The background backup fails silently in the background; the AEX status bit remains inactive and DGN 1016 bit 7 switches to 1. | Attempting to set parameter 10342 to hold up to three backup states when the active NC program size exceeds the remaining available Flash ROM storage. Fix: Clear unnecessary files from the FROM directory, verify parameter 10342 value limits, or adjust parameter 10340 bit 2 to exclude larger NC program files. |
Application Note: Safeguarding Absolute Coordinates and Parameter Integrity
Catastrophic machining dimensional errors and severe tool breakage occur if an operator restores an old automatic backup from the Flash ROM (FROM) without first logging and manually re-entering all recent tool wear offset adjustments. Because restoring an automatic data backup reverts the CNC's volatile SRAM parameters and offset registers exactly to the historical state in which they were archived, any micro-adjustments made to compensate for tool wear since that backup will be completely erased. If the machine is run under automatic cycle immediately after restoration, the tool path will execute based on outdated offsets, causing the tool to cut deeper than expected, which can destroy the workpiece or cause a high-speed collision. Furthermore, operators must monitor the ATBK in-progress signal (F0520 bit 0) or Diagnostic 1016 bit 0 (AEX) during manual backups triggered via an emergency stop (parameter 10340 bit 7 EEB). If the main power breaker is turned off prematurely while the background backup is actively writing, the data stream is severed. This corrupts the memory allocation table, forcing the controller to trigger a severe PS0519 alarm upon next boot and wiping the active SRAM memory. To prevent these mechanical and data recovery failures, all offset adjustments must be logged externally before restoring files, and the main power must remain active until the ATBK status signal fully clears.
Related Command Network and Reference Guides
To establish a fully secure operating environment, programmers should understand how these backup protocols interface with auxiliary codes and system utilities:
- G10 (Programmable Parameter Input): Utilized via
G10 L50;to enter programmable parameter writing mode, enabling automated background configuration of backup parameters via NC program blocks. - G11 (Cancel Programmable Parameter Input): Terminates the parameter editing sequence, closing active SRAM write channels and restoring the control to standard path execution.
- BOOT SYSTEM Menu: A bare-metal, low-level screen accessed by holding down screen softkeys during power-on. It allows manual recovery operations using the SRAM DATA UTILITY. For a detailed guide on manual memory card operations, consult the Fanuc SRAM Backup and Restore procedure.
- FOCAS2 Upload/Download Commands: Direct Ethernet API functions that allow diagnostic systems to read or write the SRAM parameters remotely, bypassing manual PCMCIA or USB physical transfers.
- Reference Calibration: Since restoring a parameters backup clears the absolute pulse coder reference, operators must review CNC Zero Points Explained to understand how to recalibrate machine and part zero datums.
- Auxiliary Spindle Controls: Spindle rotations governed by M03, M04, and M05 spindle commands must be fully halted and at a complete standstill before executing parameter writes to avoid critical control conflicts.
Conclusion: The Ultimate Parameter Redundancy Strategy
A robust parameter redundancy strategy is the ultimate defense against unexpected controller failures and downtime. By configuring parameter 10340 to enable power-on and emergency stop backups, and setting parameter 10342 to maintain multiple historical backup states, machine shops can safeguard their physical setup configurations directly within the battery-less Flash ROM. Technicians must enforce a strict policy of verifying the ATBK signal before turning off the main breaker, ensuring that every background write completes safely. This simple operational discipline prevents file corruption and guarantees that the CNC can be restored to full production readiness within minutes.
Frequently Asked Questions
Why does the Fanuc controller trigger a PS0519 alarm after a manual or emergency stop backup is executed?
This alarm occurs because the operator prematurely turned off the CNC main power breaker while the automatic background backup was actively writing data from the volatile SRAM to the nonvolatile FROM memory. Copying directories and programs takes several seconds, during which the system sets the ATBK signal (F0520 bit 0) or Diagnostic 1016 bit 0 (AEX) to active states. Severing power during this process corrupts the memory allocation table. To resolve this, keep the control powered until the ATBK signal clears, and restore healthy parameters from a valid SRAM backup if files are corrupted.
How do you troubleshoot a DGN 1016 bit 7 (ANG) error during background data backups?
An active ANG diagnostic bit indicates that the CNC has encountered a mathematical or capacity limit error while trying to execute the background backup. This typically happens when the active NC program size exceeds the remaining free space in the designated FROM storage sector, or when parameter 10342 is configured to hold too many backup slots for the current memory capacity. To fix this, delete obsolete files from the Flash ROM directory to free up memory, or adjust parameter 10340 bit 2 to disable large NC program directory backups, allowing the system to archive only core parameters.
What physical steps must be taken to safely restore parameter 10340 backup states after a battery depletion?
When a complete battery failure causes parameter loss, the controller must remain powered ON while you replace the main board battery to retain any temporary registers. Next, reboot the control while holding the two rightmost softkeys to enter the low-level BOOT SYSTEM menu. Navigate to the SRAM DATA UTILITY or AUTO BKUP RESTORE utility to select the desired backup state from the permanent FROM. After restoration, remember that absolute kinematic reference zero points must be physically recalibrated because restoring older backup files resets parameter 1815 bit 4 (APZ) to 0.
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
G73 and G83 Peck Drilling Cycles: High-Speed and Deep-Hole Milling
Program G73 and G83 peck drilling cycles on Fanuc, Siemens, and Mitsubishi CNCs. Learn parameters, clear alarms, and optimize high-speed deep-hole milling.
G50.2 and G51.2 Polygon Turning: Synchronized Lathe Machining
Learn how to program G50.2 and G51.2 polygon turning on Fanuc, Siemens, and Mitsubishi CNC controls. Master spindle synchronization parameters, alarms, and G-code examples.
G31 Skip Function and CNC Probe Programming: Fanuc, Siemens, Mitsubishi
Master G31 skip function and probe programming on Fanuc, Siemens, and Mitsubishi CNCs. Prevent crashes, resolve alarms, and configure servo lag parameters.
G07.1 Cylindrical Interpolation: Guide for Fanuc, Siemens, Mitsubishi
Master G07.1 cylindrical interpolation on Fanuc, Siemens, and Mitsubishi CNCs. Learn axis mapping parameters, alarm fixes, and syntax rules to prevent crashes.