Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rockwell Firmware Upgrade Tool

A Python-based automation tool for upgrading firmware on Rockwell Automation PLCs across an EtherNet/IP network. Built using the Logix Designer SDK and ControlFLASH Plus API, this tool streamlines the firmware upgrade process with a guided UI, automated backups, and full logging support.


Features

  • Connect to multiple controllers simultaneously via EtherNet/IP using a JSON-defined device list
  • Upload the latest program from connected controllers
  • Convert and upgrade firmware from v30 through v38 (30+)
  • Automated backup of both the pre-update and post-update program files for disaster recovery
  • Simple guided UI to walk through each process step by step
  • Experimental fully automated mode that runs all processes in sequence
  • Log file generation during the conversion process for traceability

Architecture

This tool has a split virtual environment architecture due to API compatibility constraints:

64-bit Environment (Primary)

Used for communication with controllers via the Logix Designer SDK, which requires a 64-bit Python environment.

32-bit Environment (CFP Flasher)

The ControlFLASH Plus API is a native C# DLL that only operates in 32-bit mode. A Python wrapper was written to interface with it, running inside a dedicated 32-bit Python virtual environment. This environment is invoked from the primary environment via subprocess.

┌─────────────────────────────────┐
│        Main Application         │
│     (64-bit Python venv)        │
│     Logix Designer SDK          │
│                                 │
│  subprocess.call()              │
│         │                       │
│         ▼                       │
│  ┌──────────────────────────┐   │
│  │   CFP Flasher Wrapper    │   │
│  │  (32-bit Python venv)    │   │
│  │  ControlFLASH Plus API   │   │
│  │  (Native C# DLL)         │   │
│  └──────────────────────────┘   │
└─────────────────────────────────┘

Requirements

Software

  • Rockwell Automation Logix Designer SDK
  • Rockwell Automation ControlFLASH Plus (CFP)
  • Python 3.x (64-bit) — primary environment
  • Python 3.x (32-bit) — CFP flasher environment
  • Studio 5000 Logix Designer (for SDK dependencies)

Hardware

  • EtherNet/IP network connection to target controllers
  • Rockwell Automation PLCs (firmware v30–v38 supported)

Device Configuration

Controllers are defined in system_mapping.json using the EtherNet/IP backplane path as the key and a friendly system name as the value:

{
  "Local Ethernet\\192.168.2.1\\Backplane\\0": "System_01",
  "Local Ethernet\\192.168.2.1\\Backplane\\6": "System_02"
}

The key follows the format: <Network>\\<IP>\\Backplane\\<Slot>


Tools

On launch the tool prompts for a workstation name and target firmware major revision (31–38), then presents the following menu:

========================================================================
| FIRMWARE UPGRADE TOOL - v1.2.0                                       |
========================================================================
|                               MENU                                   |
|                                                                      |
| 1. Start v3X Firmware Upload Conversion                              |
| 2. Download v3X Firmware                                             |
| 3. Change Revision                                                   |
| 4. Run Legacy Control Flash Utility                                  |
| 5. Exit                                                              |
|                                                                      |
| 6. Auto-mode [EXPERIMENTAL]                                          |
========================================================================

Option 1 — Start Firmware Upload Conversion

Uploads the current program from each controller defined in system_mapping.json, converts it to the selected firmware revision, and saves the converted .ACD files to MyPLC/Converted_Backup/. Prompts a warning to set the controller to Program mode and delete the safety signature before proceeding (required for safety controllers such as L73S). A 5-second countdown is given before the operation starts.

Option 2 — Download Firmware

Downloads the converted firmware program to the target controllers. Files are sourced from MyPLC/Converted_Backup/ and pushed to the controllers via the Logix Designer SDK.

Option 3 — Change Revision

Allows the user to change the target firmware major revision (31–38) mid-session without restarting the tool.

Option 4 — Run Legacy Control Flash Utility

Launches the legacy ControlFLASH Plus flashing utility via the 32-bit Python wrapper (cf_helper.py), invoked through subprocess. Used for direct firmware flashing on controllers that require it.

Option 5 — Exit

Cleanly exits the application.

Option 6 — Auto-mode (Experimental)

Automatically runs all operations in sequence without manual intervention:

  1. Upload program from each controller
  2. Save pre-update backup to MyPLC/Upload_Backup/
  3. Convert program to target firmware revision
  4. Save converted backup to MyPLC/Converted_Backup/
  5. Download converted firmware to controllers

A 5-second countdown is displayed before the automated sequence begins.

Note: Auto-mode is experimental. It is recommended to run each option manually first to verify your environment before using this mode in production.


Logging

A log file is automatically generated during the conversion process and saved to MyPLC/Logs/ with a timestamp in the filename. Logs capture:

  • Controller connection status
  • Upload and conversion events
  • Firmware version changes
  • Errors and warnings

Project Structure

Rockwell-Firmware-Upgrade-Tool/
├── firmware_upgrade_2026.py     # Entry point and UI
├── system_mapping.json          # Controller device list (path → name)
├── lib/
│   ├── cf_helper.py             # ControlFLASH Plus 32-bit wrapper
│   ├── logging_helper.py        # Logging utility
│   └── ui_helper.py             # UI helper functions
├── MyPLC/
│   ├── Upload_Backup/           # Pre-update program backups (.ACD)
│   ├── Converted_Backup/        # Post-conversion program backups (.ACD)
│   ├── SDcard_Initialized/      # SD card initialized program files (.ACD)
│   └── Logs/                    # Generated log files
├── resources/
│   ├── controlflash_SDK.pdf     # ControlFLASH Plus SDK reference
│   ├── logixdesigner_SDK.pdf    # Logix Designer SDK reference
│   └── rockwell_vcs_git.pdf     # Rockwell version control reference
└── support/                     # Dev/testing utilities
    ├── arch_check.py            # Architecture verification script
    ├── cf_test.py               # ControlFLASH connection test
    └── fw_controlflash.py       # Standalone firmware flash script

Disclaimer

This tool interfaces directly with production PLC controllers. Always:

  • Test in a non-production environment first
  • Verify backups before performing firmware upgrades
  • Follow your organization's change management procedures
  • Ensure compatibility between firmware versions and your application code before upgrading

Author

JO — Electrical Engineer / PLC Obsolescence Supervisor


License

MIT License

About

Python-based firmware upgrade tool for Rockwell PLCs using the Logix Designer SDK and ControlFLASH Plus API over EtherNet/IP.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages