Skip to main content
CNC.wiki

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.

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

CNC CARE Co-founder

Introduction

Shutting off a CNC machine's main power supply while the automatic background data backup is active will corrupt the system's nonvolatile storage directories, wiping all part programs and triggering a critical reboot failure. Alternatively, restoring volatile SRAM parameters from an outdated backup without verifying tool wear offsets causes the turret to miscalculate its approach path. This uncorrected spatial shift can drive the spindle directly into a rigid vise jaw, a secured workpiece clamp, or a spinning machine chuck, resulting in a violent mechanical collision, cracked tooling, and a ruined work part. In Fanuc CNC controls, parameter 10340 governs the automatic duplication of SRAM data, providing a robust recovery mechanism to prevent these catastrophic losses when configured correctly.

Technical Summary

Technical SpecificationDetails
Command CodeG10 L50 (Open) / G11 (Close)
Modal GroupNon-modal parameter entry
BrandsFanuc
Critical ParametersParameter 10340 (ABP, ABI, AAP, EIB, EEB), Parameter 10342
Main ConstraintOnly enabled on primary CNC program storage memory (CNC_MEM device); must set 10340#2 (AAP) to 0 if saving all programs to nonvolatile memory is active.

Quick Read: Key Operational Rules

  • Enable Feature: Activate automatic data backup at power-on by setting parameter 10340#0 (ABP) to 1.
  • Protect Overwrites: Determine if overwrite-protected backup data is treated as valid by configuring parameter 10340#1 (ABI).
  • Configure Emergency Stops: Set parameter 10340#7 (EEB) to 1 to trigger an automatic data backup on every emergency stop.
  • Define Backup Intervals: Specify the periodic backup interval in days (0 to 365) via parameter 10341.
  • Limit History Count: Define the number of historical backup copies stored in memory (0 to 3) using parameter 10342.
  • Monitor PMC Signals: Check the PMC output signal ATBK (F0520.0) and never power off the CNC while a backup operation is active.

Basic Concepts of Automatic Data Backup

The practical programming effect of Fanuc's Automatic Data Backup is the creation of an invisible, highly resilient safety net against unexpected data loss caused by dead batteries or operational contingencies. By configuring Parameter 10340, programmers and maintenance engineers instruct the CNC to autonomously duplicate its volatile SRAM data (such as tool offsets, workpiece coordinates, and system parameters) and FROM data (such as NC programs and directory information) into a dedicated, battery-independent flash memory area.

Fanuc clearly distinguishes its data protection architecture from other CNC brands through its multi-tiered retention logic, its emergency-stop synchronization, and its direct PMC feedback. First, instead of only holding a single overwriteable backup, Fanuc allows parameter 10342 to retain up to three distinct historical occurrences. This empowers a facility to lock "Backup Data 1" as a pristine, write-protected, post-machine-adjustment baseline, while continuously cycling "Backup Data 2" and "Data 3" with daily production updates.

Second, Fanuc uniquely allows a backup to be triggered manually via a physical hardware state. By enabling parameter 10340#7 (EEB), an operator can simply press the machine's emergency stop button, and the CNC will instantly start archiving its current state without requiring a power cycle, making it ideal for backing up after a complex setup. Finally, Fanuc integrates an active PMC hardware signal (ATBK), which explicitly broadcasts the "backup-in-progress" status to the outside world, ensuring external robotic cell controllers do not disrupt the machine while data is actively transferring.

Command Structure & Addressing

Fanuc controls allow parameters to be modified dynamically during a machining cycle rather than requiring manual MDI entry. This program-controlled editing is initiated using the programmable parameter data input command G10 L50, which opens the control's internal registers to external values. Once opened, parameters are target-written using specific address codes that designate the parameter number and the configuration data.

To finalize any parameter changes made via the G10 L50 command block, the program must execute a close parameter input command G11. This closes the write session and prevents subsequent G-code blocks from being misinterpreted as parameter inputs. This method is highly effective for updating system settings, such as backup intervals or protection flags, dynamically before starting a critical production run.

Syntax & Address Format

G10 L50 ;
N10340 R_ ;
G11 ;

System Parameters

ParameterNameDescriptionSettings / Range
10340#0ABPAutomatic data backup at power-on0: Disabled, 1: Enabled
10340#1ABIOverwrite-protected backup data validity0: Regarded as invalid, 1: Regarded as valid
10340#2AAPBackup of NC programs and directory info residing in FROM0: Disabled, 1: Enabled
10340#6EIBUpdate overwrite-protected backup data on next CNC power-on0: Not updated, 1: Updated (resets to 0 automatically)
10340#7EEBAutomatic data backup on emergency stop0: Not performed, 1: Performed
10341Periodic automatic data backup interval0 to 365 days (0 disables periodic backup)
10342Number of backup data histories held in memory0 to 3 histories (0 disables backup)
10343#0BWPAutomatic backup to backup data 1 inhibition0: Not inhibited, 1: Inhibited

Brand Applications

Fanuc

On Fanuc controls, automatic data archiving secures vital machining parameters, workpiece origins, and custom macros. By setting parameter 10340#0 (ABP) to 1, the control performs a backup during the system boot sequence. When parameter 10340#7 (EEB) is enabled, the machine archives the memory state instantly when an operator hits the physical emergency stop button.

A G-code part program can dynamically alter the backup configuration. For example, a program can use G10 L50 to write to parameter 10342 to define the backup history count or adjust parameter 10341 to define periodic intervals. This programmable override enables maintenance technicians to automate backups before running complex custom macros or structural code changes. Programmers can learn more about general parameter administration in the Fanuc parameters and PWE guide.

If the global "saving all programs to nonvolatile memory" function is enabled, parameter 10340#2 (AAP) must be set to 0. Additionally, when registered as an embedded macro program, parameter 11354#7 (HPM) must be set to 0 to prevent conflicts during automated backup execution. This function is restricted to the primary CNC_MEM device storage. Refer to the G65 custom macro enable parameters documentation for configuration specifics.

Warning: Always check the active PMC state of output signal ATBK (F0520.0). Powering down the control during backup execution corrupts program memory and flags alarm PS0519 on reboot, wiping all files.

Brand Comparison

Fanuc Series / OptionBackup Device TargetKey Parameter ConfigurationFunctional Limitation / Conflict
Series 16i / 18i / 21iPrimary CNC_MEM storage device only.Set parameter 10340#0 (ABP) to 1 to enable automatic power-on backup.None; standard backup operation applies.
Series 0i (with Save All Programs Option)Primary CNC_MEM storage device only.Forced setting of parameter 10340#2 (AAP) to 0.MANUAL GUIDE i cannot be used when this global function is active. Similar to setting G-code defaults via Fanuc parameter 3402.
Series 15i (with Embedded Macro Option)Primary CNC_MEM storage device only.Parameter 11354#7 (HPM) must be set to 0.Embedded macro program must be configured to prevent backup conflicts.

Technical Analysis of Fanuc Features

The technical distinction between Fanuc configurations lies in how they manage memory conflicts and background data transfer times. Under standard operation (such as on Series 16i/18i/21i controls), the Automatic Data Backup system writes the contents of SRAM and FROM into nonvolatile memory in the background. However, when the global 'save all programs to nonvolatile memory' function is enabled (often configured on Series 0i models), the system must force the NC program backup parameter 10340#2 (AAP) to 0. This constraint is required because having both background backup and global nonvolatile saving active simultaneously would create severe file directory conflicts, and it renders MANUAL GUIDE i completely unavailable.

Similarly, if an embedded macro program is registered (commonly seen in custom Series 15i applications), parameter 11354#7 (HPM) must be set to 0. Without this setting, the high-speed macro execution would conflict with the automatic background data backup process, leading to backup failures. When a backup is initiated—whether automatically at power-on via parameter 10340#0 (ABP) or via emergency stop via parameter 10340#7 (EEB)—the CNC sets the PMC output signal ATBK (F0520.0) to 1. Programmers must monitor this signal because interrupting the power supply while ATBK is active corrupts the storage directories, triggering alarm PS0519 on the next reboot and forcing a complete wipe of all program files.

Program Examples & Dry Run Verification

G10 L50 ;
N10340 R133 ;
N10342 R3 ;
G11 ;

Dry Run Execution & Verification

  • G10 L50: Opens the parameter entry register, allowing the program to dynamically write values to system parameters.
  • N10340 R133: Writes the value 133 to parameter 10340. In binary, 133 is 10000101 (bit 7/EEB = 1, bit 2/AAP = 1, bit 0/ABP = 1). This enables emergency-stop backup, FROM program backup, and power-on backup.
  • N10342 R3: Writes the value 3 to parameter 10342, configuring the CNC to retain up to three historical backup files in its memory.
  • G11: Closes the parameter entry session, returning the CNC control to normal G-code execution mode.

Error Analysis and Fault Codes

Brand / Alarm CodeTrigger ConditionOperator SymptomRoot Cause / Fix
Fanuc PS0519CNC power supply is turned off during program saving to nonvolatile memory."PROGRAM FILES ARE BROKEN AND CLEARED" error on reboot; all part programs are deleted.Do not power off the NC while the ATBK signal is active. Restore programs from backup.
Fanuc SR2097Automounting sequence fails when utilizing extended program memory architecture."Failed to automount program memory" alarm on display; unable to access extended program memory.Avoid storing an excessive number of files and folders in the extended program memory folder.
Fanuc Diagnosis 1016#7 (ANG)Fatal error occurs internally during automatic data backup execution.ANG bit is set to 1 in diagnosis display; background backup fails silently.Verify SRAM and FROM module physical storage capacity; reduce the value of parameter 10342.

Application Note: Preventing Collision Hazards

Driving the spindle or turret directly into a rigid vise jaw, a secured workpiece clamp, or a spinning machine chuck is the immediate physical consequence of running a machining cycle after an SRAM parameter restore without verifying tool wear offsets. When an operator executes a system restore, the CNC overwrites all active offset data with the historical values captured during the archive. Running the subsequent G-code program with these stale mathematical offsets causes the control to miscalculate the tool's rapid traverse approach path, plunging it off-course. This sudden spatial shift results in a violent mechanical collision, shattered tooling, and a scrapped workpiece. Machinists must always verify and manually update active tool wear offsets immediately following any SRAM data restoration, and ensure the PMC output signal ATBK (F0520.0) has fully deactivated before resuming production.

Related Command Network

  • G10 L50 / G11: Initiates and terminates the programmable parameter input session within a part program to dynamically configure backup settings.
  • ATBK <F0520.0>: Serves as the active PMC output signal that broadcasts the backup-in-progress status to external robot controllers.
  • Diagnosis 1016: Provides bit-level execution indicators (such as AEX, ACM, and ANG) to monitor active background backup status and detect internal failures.

Conclusion and Best Practices

Implementing automatic data backup on Fanuc controls provides a resilient safety net, but it requires active maintenance diligence. Operators must verify tool offsets after every system restore to prevent mechanical offset drift, while program designers must monitor the ATBK signal to avoid interrupting active write operations. Combining automated emergency-stop archives with write-protected historical baselines eliminates catastrophic data loss while protecting physical machine components.

Frequently Asked Questions

How do I enable automatic data backup on a Fanuc control?

To enable the backup, set parameter 10340#0 (ABP) to 1. This instructs the CNC to copy volatile SRAM and FROM data to independent flash memory during boot. Additionally, configure parameter 10342 to specify the number of histories (up to 3) to retain in memory.

Can I trigger a data backup manually without a power cycle?

Yes, set parameter 10340#7 (EEB) to 1. This enables emergency-stop backup, allowing an operator to initiate a backup immediately by pressing the physical emergency stop button on the machine panel. Always verify that the PMC signal ATBK deactivates before resetting the stop state.

What causes the Fanuc alarm PS0519 on power-on?

Alarm PS0519 is triggered when the CNC power supply is shut off while the system is saving program files to nonvolatile memory. To resolve this, you must clear the broken files, restore program data from an existing backup, and ensure operators never turn off the power while the ATBK status signal is active.

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