First 60 Minutes: Recovery Playbook for an Undocumented B&R CP1584
Scenario: You just walked up to a machine with a B&R X20CP1584 PLC. The OEM is gone. There are no project files, no documentation, and the previous engineer left no notes. The machine is down (or behaving erratically). This is your step-by-step guide for the first hour.
Audience: An automation engineer who has never worked with B&R before but needs to get this machine running — or at least diagnosed — fast.
Phase 1: Visual Assessment (0-5 minutes)
1.1 Read the CPU Label
Locate the physical label on the X20CP1584. You need:
| What to Record | Where to Find It | Why It Matters |
|---|---|---|
Order number (e.g., X20CP1584) | Label on CPU housing | Confirms CPU model and capabilities |
| Serial number | Label on CPU | Unique identifier for B&R support, spare parts tracking |
Hardware revision (e.g., J0) | Label on CPU | Determines firmware compatibility |
B&R ID code (0xC370 for CP1584) | Not on label — from SDM or software | Used in network protocols |
See cp1584-hardware-ref.md for full hardware specifications.
1.2 Read the LED States
The CPU has 5 status LEDs on the front panel. Document what you see before touching anything:
| LED | Location | What to Note |
|---|---|---|
| R/E (Run/Error) | CPU function LED | Green=running, Red=BOOT/SERVICE, blinking patterns indicate startup/error |
| RDY/F (Ready/Fault) | CPU function LED | Yellow=license violation (when R/E blinks red) |
| S/E (Status/Error) | POWERLINK interface | Green=PLK active, Red=error, blinking patterns indicate PLK state |
| PLK | POWERLINK link | Green=link established, blinking=activity |
| ETH | Ethernet link | Green=link established, blinking=activity |
| CF | CompactFlash | Green=card detected, Yellow=read/write access |
| DC | Battery status | Red=battery empty |
Quick LED decode for common states:
| What You See | What It Means | Immediate Action |
|---|---|---|
| R/E green steady, ETH green, CF green | Normal running — machine has other issues | Proceed to Phase 3 |
| R/E red steady | BOOT or SERVICE mode — program not running | See Phase 2 |
| R/E red blink + RDY/F yellow blink | License violation | See license-mgmt.md |
| R/E off, CF blinking, DC blinking | Intermittent hardware failure — possibly dying CPU | May need hardware replacement (see spare-parts.md) |
| All IO modules: ‘r’ blinking | X2X bus lost | Check X2X cables, terminator, CPU state |
| DC red | Battery dead | Replace CR2477N within 1 minute if power off (see retentive-data.md) |
| S/E red blinking (pattern) | POWERLINK error code | Count blinks, decode per cp1584-hardware-ref.md |
See troubleshooting-index.md Scenario 15 for the complete LED decode table.
1.3 Read the Mode Switch
The operating mode switch has 3 positions:
| Position | Mode | Meaning |
|---|---|---|
| BOOT | Boot mode | CPU runs Boot AR — used for initial programming/firmware update |
| RUN | Run mode | Normal operation — loads and runs the application from CF card |
| DIAG | Diagnose | Diagnostic mode — boots without initializing program memory |
If the switch is in BOOT, the PLC will NOT run the application. Switch to RUN and power-cycle. If it was intentionally left in BOOT (e.g., by a service technician), someone may have been working on it.
Phase 2: Get Connected (5-20 minutes)
2.1 Find the PLC’s IP Address
Try these methods in order of speed:
Method A: Default IP from DIP switches
The two hex rotary switches on the front panel set the INA2000 station number. The default IP for CP1584 is derived from this:
- INA station 1 →
192.168.1.1 - INA station 2 →
192.168.1.2 - etc.
Set your PC to the same subnet (e.g., 192.168.1.x) and try pinging.
Method B: BOOT mode default IP
If the mode switch is in BOOT position, the default IP is:
192.168.1.250(common BOOT mode default)
Method C: Network scan with brsnmp
python -m brsnmp scan 192.168.1.0/24
Install from github.com/hilch/brsnmp. This uses SNMP to discover B&R devices.
Method D: Serial console
Connect to IF1 (RS232) with a null-modem cable:
- Baud: 57600 (factory default)
- Parity: Even
- Data bits: 8
- Stop bits: 1
- Flow control: None
The serial console shows boot messages including the IP address.
Pinout on X20TB12 terminal block:
- TX (PLC transmit) → PC RX
- RX (PLC receive) → PC TX
- GND → PC GND
See access-recovery.md for complete network discovery procedures.
2.2 Open SDM (System Diagnostics Manager)
Once you have the IP, open a browser and navigate to:
http://<PLC_IP>/sdm
SDM requires no authentication on AR 4.x. It provides:
- Hardware tree — all connected modules, their status, firmware versions, serial numbers
- CPU information — AR version, CPU temperature, memory usage, battery status
- Logger — recent error messages and events
- Diagnostic buffer — last errors with timestamps
Screenshot every SDM page immediately. This is your baseline.
Security warning: SDM on AR 4.x has unpatchable vulnerabilities (CVE-2025-3450, CVE-2025-3449). Do not leave SDM accessible on the network long-term. See cybersecurity-hardening.md.
2.3 Establish Automation Studio Connection (If Available)
If you have Automation Studio installed:
- Open AS → Online → Settings
- Enter the PLC’s IP address
- Browse for target — the PLC should appear
- Right-click → Connect
- Do NOT download anything yet — you might overwrite the running program
If you do NOT have Automation Studio, use these alternatives:
- brwatch (github.com/hilch/brwatch) — GUI tool for watching/changing variables (Windows, requires PVI)
- Pvi.py (github.com/hilch/Pvi.py) — Python wrapper for PVI API
- UaExpert (free from Unified Automation) — OPC-UA client for browsing variables
2.4 Quick-Start: Browse Variables via OPC-UA (No AS Required)
If the PLC has OPC-UA enabled (common on AR >= 4.50), you can browse the entire variable namespace without Automation Studio:
- Download and install UaExpert from unified-automation.com (free)
- Add a server:
opc.tcp://<PLC_IP>:4840 - If the PLC uses a self-signed certificate (AR 4.x default), UaExpert will warn — click “Continue” to connect
- In the Address Space panel, expand the nodes:
Objects→Server→ browse for system variables- Look for a node named after the project or application (e.g.,
MyMachine) — this contains all global variables
- You can now read any variable by double-clicking it, and write values by selecting a variable and using the Data Access View
What this gives you: The complete variable list (names + data types), current values, and the namespace structure. This is critical intelligence for project-reconstruction.md.
See opcua.md for full OPC-UA details and cybersecurity-hardening.md for certificate management.
2.5 Quick-Start: Connect via PVI.py (No AS Required)
PVI (Process Visualization Interface) is B&R’s native protocol for variable access. Using the Python wrapper:
pip install Pvi
from pvi import *
with PviConnection() as plc:
plc.login("192.168.1.10")
# List all variables
vars = plc.list_variables()
for v in vars:
print(f"{v.name}: {v.type} = {v.value}")
# Read a specific variable
speed_setpoint = plc.read_variable("gMainApp.nSpeedSetpoint")
print(f"Speed setpoint: {speed_setpoint}")
# Write a variable (to change a setpoint or force an output)
plc.write_variable("gMainApp.nSpeedSetpoint", 1500)
Prerequisites: PVI.py requires the B&R PVI Development Setup (or at minimum the PVI DLLs) on the connecting PC. See pvi-api.md for installation and advanced usage.
2.6 Quick-Start: brsnmp Network Discovery
If you don’t know the PLC’s IP address, scan the subnet:
pip install brsnmp
brsnmp scan 192.168.1.0/24
This uses SNMP (port 161) to discover all B&R devices. Returns target type, serial number, AR version, and IP address. Works on any machine on the network without Automation Studio.
Phase 3: Diagnose the Problem (20-45 minutes)
3.1 Check the Logger
In SDM or Automation Studio, open the Logger (check ALL boxes). Look for:
Critical errors that stop the program:
| Error ID | Name | What It Means | Immediate Action |
|---|---|---|---|
| 25314 | EXCEPTION Page fault | CPU tried to access invalid/protected memory. Caused by null pointers, corrupted string buffers, or shifted memory after online change | Read the Logger entry for the task name and address. If after an online change, cold restart. If recurring, investigate pointer logic |
| 9204 | Temperature shutdown | CPU die exceeded 110°C (board: 95°C) | Check cabinet ventilation, fans, ambient temperature. Do not restart until cooled |
| 9210 | Watchdog | Task cycle time exceeded watchdog limit | Check for infinite loop, blocked IO, or network timeout in the named task. Temporary: increase cycle time |
| 6803 | Stack underflow | Task stack corrupted — usually from recursion or corrupted stack pointer | Cold restart. If recurring, check for recursive function calls or stack-heavy operations |
| 3039 | AVT reference not available | nc154man (motion) library missing or internal reference table corrupted | Re-transfer the project. Check if ACOPOS drive configuration is intact |
| 8234 | IO module not found | Hardware mismatch — expected IO module not detected on X2X bus | Check X2X cables, module seating, power supply. Compare hardware tree to physical modules |
Warning-level errors (program may still run):
| Error ID | Name | What It Means |
|---|---|---|
| 25313 | Warning (non-critical) | Non-fatal warning — check context for details |
| 41216 | Motion error | ACOPOS/stepper drive reported a fault — check drive fault code |
| -1070584042 | OPC UA connection failed | OPC UA server lost connection to a client or had a cert issue |
Tip: In SDM, check the Diagnostic Buffer tab in addition to the Logger. The Diagnostic Buffer shows the last N errors with timestamps, task context, and the full error description — more readable than the raw Logger output.
See diagnostics-sdm.md for detailed SDM usage and ar-rtos.md for AR error internals.
3.2 Check the CF Card via FTP
ftp <PLC_IP>
Username: (try empty, "br", "admin")
Password: (try empty, "br", "admin")
Key directories on the CF card:
C:\— System partition (AR OS files, do not modify)F:\— User partition (your program, configuration, logs)F:\AS\— Automation Studio project filesF:\AS\System\— System configurationF:\Log\— Log files (AR log, alarm history)C:\System\Log\— Boot logs
Backup the entire CF card via FTP before changing anything:
wget -r ftp://<PLC_IP>/ --mirror
See cf-card-boot.md for complete CF card file layout and ftp-web-interface.md for FTP access details.
3.3 Common Failure Patterns
| Symptoms | Most Likely Cause | Quick Test | Fix |
|---|---|---|---|
| PLC in SERVICE mode after power-up | Dead battery, corrupted memory, program error | Check DC LED; read Logger error | Replace battery (see retentive-data.md); warm restart |
| PLC in BOOT mode, won’t go to RUN | CF card not recognized, missing/invalid program | Check CF LED; try different CF card | Reseat CF card; re-image from backup (see cf-card-boot.md) |
| Machine runs but outputs wrong | IO module failure, wiring issue, program logic error | Force outputs from AS or PVI; check IO module LEDs | See io-card-hardware.md, io-sniffing.md |
| Intermittent communication drops | POWERLINK timing, cable/connector issues, EMI | Check S/E LED pattern; capture EPL traffic with Wireshark | See powerlink-internals.md, grounding-emc.md |
| Servo drives faulting | Encoder issue, drive parameter, POWERLINK CN lost | Check drive LED fault code; monitor drive status via PVI/OPC-UA | See acopos-drives.md, encoder-diagnostics.md |
| All IO modules showing errors | X2X bus failure, CPU not in RUN, power supply issue | Check CPU R/E LED; check power supply module LEDs | See x2x-protocol.md, io-card-hardware.md |
| HMI not communicating | POWERLINK/OPC-UA connection lost, VNC session dropped | Ping HMI panel IP; check VNC port 5900 | See hmi-integration.md, network-architecture.md |
| Temperature-related shutdowns | Cabinet ventilation failed, fan dead, thermal degradation | Read CPU temperature via SDM; check cabinet airflow | See hardware-monitoring.md |
Phase 4: Get It Running (45-60 minutes)
4.1 If PLC Is in SERVICE Mode
- Read the error from the Logger
- If the error is transient (e.g., watchdog timeout from a one-time condition):
- In AS: Online → Cold Start
- Or via brwatch: CPU → Coldstart
- If the error is persistent (e.g., hardware mismatch, missing module):
- Check the Hardware tree in SDM for missing/faulty modules
- If a module was replaced, its firmware may need updating (see firmware-version-mgmt.md)
- If the error is a program error (e.g., divide by zero):
- Use brwatch or PVI to find the offending variable
- Change the variable via brwatch’s watch window or Pvi.py
- Warm restart
4.2 If PLC Is Stuck in BOOT Mode
- Verify the mode switch is in RUN
- Check CF card is inserted and detected (CF LED should be green)
- If CF card is not detected:
- Remove and reinsert the CF card
- Try a known-good CF card with a basic AS project
- See bootloader-recovery.md for full recovery
- If CF card is detected but still in BOOT:
- The program on the card may be invalid
- Connect via AS in BOOT mode and download a new project
- See cf-card-boot.md for CF card file requirements
4.3 If No CF Card Exists
You need to create a minimal CF card to get the PLC to RUN mode:
- Obtain a compatible CompactFlash card (B&R extended temperature recommended, see spare-parts.md)
- In Automation Studio:
- Create a new project with the X20CP1584 hardware
- Configure the IP address
- Create a minimal program (even just a single empty task)
- Build the project
- Use Tools → Runtime Utility Center to create the CF card (Offline Installation)
- Insert the CF card and switch to RUN
- The PLC should boot into RUN mode with your minimal program
- See project-reconstruction.md for rebuilding the full application
4.4 If the CPU Is Physically Dead
Symptoms: No LEDs, no response to serial, no network discovery.
- Verify 24V power supply to the CPU (check terminal block: +24V on pins 5-6, GND on pins 1, 4)
- Check the integrated fuse (non-replaceable — if blown, the CPU module must be replaced)
- If power is good and still no LEDs, the CPU is likely dead
- Do not attempt to repair the CPU module — it is not field-repairable
- Source a replacement (see spare-parts.md for part numbers and compatible replacements)
- The CF card from the dead CPU will work in a replacement CPU (same model), preserving the program
- See remanufacturing.md for upgrade options
Emergency Quick Reference Card
Print this and tape it inside the cabinet door:
B&R X20CP1584 EMERGENCY REFERENCE
====================================
MODE SWITCH: BOOT / RUN / DIAG
DEFAULT IP: 192.168.1.<INA station#>
BOOT IP: 192.168.1.250
SERIAL: 57600, 8, E, 1
SDM URL: http://<IP>/sdm
FTP: ftp://<IP> (user: br, pass: br)
BATTERY: CR2477N, 3V/950mAh (Renata only!)
REPLACE IN: 1 minute (power off) or hot-swap
CPU TEMP: Shutdown at 110C / board 95C
LED R/E RED: BOOT/SERVICE mode
LED DC RED: Battery dead
LED CF: Green=OK, Yellow=accessing
LED S/E: PLK state (blink pattern)
====================================
DO NOT:
- Remove CF card while running
- Use non-Renata battery (fire risk!)
- Connect to internet without VPN/firewall
- Leave SDM/FTP open on production network
====================================
TOOLS:
brwatch - github.com/hilch/brwatch (watch/force vars)
brsnmp - github.com/hilch/brsnmp (network discovery)
Pvi.py - github.com/hilch/Pvi.py (Python PVI)
systemdump.py- github.com/hilch/systemdump.py (system dumps)
UaExpert - OPC-UA client (free from Unified Automation)
Wireshark - Network capture (install POWERLINK dissector)
====================================
Key Findings
- The first 5 minutes are LED and label reading. Do not touch anything until you have documented the current state. The LEDs tell you 80% of what you need to know.
- SDM is your best friend when you have no project files. It requires no authentication (AR 4.x) and gives you hardware tree, CPU info, temperature, memory, battery status, and error logs.
- FTP gives you access to the CF card contents without removing the card. Back up everything via FTP before making any changes.
- The mode switch matters. If it is in BOOT, the PLC will never run the application. Switch to RUN.
- Battery death causes retentive data loss. If the DC LED is red, replace the CR2477N battery within 1 minute (power off) or hot-swap it.
- The CP1584 overtemperature threshold is 110°C (CPU) / 95°C (board) per the official B&R datasheet. The CPU enters reset state at these temperatures.
- brwatch is a GUI-only Windows tool. It cannot be pip-installed and has no CLI/JSON output mode. It requires PVI Development Setup to be installed.
- If the CPU is physically dead (no LEDs, no serial response), the module must be replaced. It is not field-repairable. The CF card is transferable to a replacement CPU of the same model.
- OPC-UA browsing (UaExpert) and PVI (Pvi.py) can replace most Automation Studio functions for diagnostic purposes — variable reading/writing, namespace browsing, and monitoring.
- The Logger error 25314 (page fault) is the most common cause of SERVICE mode. It indicates the program tried to access invalid memory. A cold restart often clears it if the cause was transient (e.g., after an online change). If it recurs immediately, there is a deeper program logic issue.
Phase 5: What to Document Before You Leave
Even if the machine is running again, spend 10 minutes documenting what you found. Future-you (or the next engineer) will thank you.
5.1 Minimum Documentation Checklist
| Item | How to Capture | Store In |
|---|---|---|
| CPU order number, serial number, hardware revision | Photograph label | Maintenance log |
| AR firmware version | SDM → CPU Information or serial console | Maintenance log |
| IP address, subnet, gateway | SDM or serial console | Network diagram |
| INA station number (DIP switch position) | Read rotary switches | Maintenance log |
| Battery status | DC LED + SDM | Maintenance log (replace by date) |
| CF card contents listing | ls -R via FTP, or wget -r --spider ftp://IP/ | Backup + text file |
| Hardware tree (all modules in X2X chain) | SDM → Hardware tree (screenshot every page) | Backup + folder |
| Logger output (last 50 errors) | SDM → Logger (screenshot) | Backup + folder |
| Task configuration (names, cycle times) | SDM → Task Monitor or AS → Online → Task Configuration | Backup + folder |
| Network topology (all IPs) | brsnmp scan output, or SDM for each device | Network diagram |
| OPC-UA namespace structure (if enabled) | UaExpert → File → Export Address Space | Backup + XML |
| Variable list with types and current values | UaExpert Data Access View, or Pvi.py script | CSV file |
5.2 Critical Backups to Take
- Full CF card image via FTP:
wget -r ftp://<PLC_IP>/ --mirror -o backup.log - System dump (if AS is available): AS → Online → Create System Dump → saves
.sysfile - SDM screenshots of every page
- Serial console boot log: Connect serial console, power-cycle the PLC, capture all boot output
See documentation-reconstruction.md for the full documentation methodology and cf-card-boot.md for CF card imaging best practices.
Cross-References
- cp1584-hardware-ref.md — Complete hardware specifications, LED decode tables, pinouts
- troubleshooting-index.md — Scenario-based troubleshooting index
- access-recovery.md — Network discovery, credential recovery
- bootloader-recovery.md — Full recovery from corrupted/missing CF card
- cf-card-boot.md — CF card file layout and boot sequence
- diagnostics-sdm.md — SDM detailed usage and diagnostic buffer interpretation
- retentive-data.md — Battery replacement and data recovery
- firmware-version-mgmt.md — Firmware identification and updates
- ftp-web-interface.md — FTP and web server access
- cybersecurity-hardening.md — Security hardening for production
- spare-parts.md — Part number identification and sourcing
- remanufacturing.md — CPU replacement and migration options
- documentation-reconstruction.md — Systematic documentation methodology
- opcua.md — OPC-UA server configuration and certificate management
- pvi-api.md — PVI API for programmatic variable access
- ar-rtos.md — AR OS internals and error code interpretation
- execution-model.md — Task classes, cycle times, and watchdog behavior
- io-card-hardware.md — IO module LED codes and signal troubleshooting
- io-sniffing.md — Fieldbus traffic analysis for sensor diagnostics
- project-reconstruction.md — Rebuilding an AS project from an undocumented system