Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

B&R Automation Runtime Firmware Architecture: Program Storage, Boot Sequence, and Firmware Updates

Overview

This document covers the firmware architecture of B&R Automation Runtime (AR) as it applies to the X20CP1584 and related X20 CPU platforms. It details where programs and the operating system are stored, how the boot sequence works, how memory is organized, and how firmware updates are performed — all critical knowledge for maintaining machines built by defunct OEMs with zero documentation.

CP1584 Hardware Specifications

The X20CP1584 (B&R ID code: 0xC370) is based on an Intel Atom E640T processor clocked at 600 MHz with the following key memory resources:

ResourceValue
CPUIntel Atom E640T @ 600 MHz
L1 Cache24 kB data / 32 kB program
L2 Cache512 kB
Main RAM256 MB DDR2 SDRAM
User RAM (SRAM)1 MB (battery-backed)
Remanent VariablesConfigurable, up to 256 kB (reduces available User RAM)
Application MemoryCompactFlash card (separate order, not included with CPU)
Integrated I/O ProcessorDedicated co-processor for background I/O data handling
Shortest Task Class Cycle400 µs
Typical Instruction Cycle0.0075 µs
FPUYes (hardware floating point)

The CPU is fanless, with overtemperature shutdown at 110°C processor / 95°C board temperature. Operating temperature range: -25°C to +60°C (horizontal), -25°C to +50°C (vertical).

Power consumption: 8.6 W (without interface modules/USB).

B&R certifies specific CF cards — using generic consumer cards is a common source of failures. B&R creates 4 partitions on CF cards, and consumer cards often lack the controller needed to maintain separate partitions.

Part NumberSizeType
0CFCRD.0512E.01512 MBExtended temperature
0CFCRD.2048E.012048 MBExtended temperature
5CFCRD.0512-06512 MBSLC
5CFCRD.1024-061 GBSLC
5CFCRD.2048-062 GBSLC
5CFCRD.4096-064 GBSLC
5CFCRD.8192-068 GBSLC

Critical note: Only use B&R-certified CF cards. Off-the-shelf consumer CF cards frequently fail to work in B&R controllers because B&R’s partitioning scheme (4 partitions) is not supported by most consumer card controllers.

The Operating System: VxWorks-Based Automation Runtime

B&R Automation Runtime is based on VxWorks, the Wind River real-time operating system. This was confirmed directly by B&R on their community forum. B&R has developed substantial custom layers on top of VxWorks:

  • Task class scheduling (B&R’s cyclic execution model)
  • IEC 61131-3 runtime (execution of ladder, ST, FBD, etc.)
  • Hardware abstraction layers for all B&R bus systems (X2X, POWERLINK)
  • I/O driver subsystem with the integrated I/O processor
  • Memory management tailored to PLC operation
  • File system for the CompactFlash card
  • Networking stack including POWERLINK, OPC-UA, Ethernet/IP, etc.

For newer B&R industrial PCs, a bare-metal hypervisor allows a GPOS (typically Linux) to run alongside AR on the same hardware. However, the CP1584 is a pure PLC controller and runs AR as its sole operating system.

See also: ar-rtos.md for deeper RTOS internals.

Memory Architecture

The B&R memory model has several distinct regions, each with specific persistence and boot behavior:

System ROM

The Automation Runtime operating system itself is stored in System ROM on the CompactFlash card. This is the firmware/RTOS that gets loaded on boot. It is non-volatile (stored in flash).

User ROM

User ROM is memory on the CompactFlash card where all compiled B&R modules (*.BR files) for the Automation Studio project are stored. This includes:

  • Compiled IEC 61131-3 program code
  • Configuration data
  • Hardware configuration
  • I/O mapping

User ROM is non-volatile. Programs persist across power cycles.

User RAM

User RAM uses the 1 MB battery-backed SRAM on the CPU board. It holds:

  • Runtime variable data
  • Intermediate calculation results
  • Temporary buffers

Size: 1 MB total minus whatever is configured for remanent variables. This is volatile to the extent that it depends on battery backup.

FIX-RAM

FIX-RAM is a configurable portion of User RAM that persists across cold restarts. It behaves like User ROM during a cold restart while still residing in SRAM. Objects in FIX-RAM survive cold restarts, making it ideal for:

  • Process parameters and setpoints
  • Calibration data
  • Recipe data
  • Runtime counters
  • Operator configuration changes

FIX-RAM is configured in Automation Studio under Hardware Configuration > Memory Configuration. The UserRAM size + RemMem size must not exceed available memory.

Remanent Variables

A separate configurable area (up to 256 kB on CP1584) for variables that must survive power loss. Backed by the lithium battery. The battery also buffers:

  • User RAM
  • System RAM
  • Real-time clock

Battery Backup

The CP1584 uses a Renata CR2477N lithium battery (3V, 950 mAh, B&R part number 4A0006.00-000). Battery replacement interval: 4 years. If power is off, battery must be swapped within 1 minute to prevent data loss.

Battery status is available via:

  • The BatteryInfo system library function
  • CPU I/O mapping (status bits)
  • LED indicator: DC LED turns red when backup battery is empty

Memory Persistence Summary

Memory TypeLocationPersistenceCleared on Cold Restart?
System ROMCompactFlashNon-volatileNo
User ROMCompactFlashNon-volatileNo
User RAMSRAM (battery-backed)Volatile (battery)Yes
FIX-RAMSRAM (subset)Survives cold restartNo
Remanent VariablesSRAM (dedicated area)Battery-backedNo
System RAMDDR2 SDRAMVolatileYes

CF Card Partition Layout

B&R CompactFlash cards are divided into 4 partitions created by the B&R file system driver. The partition names and their roles are:

#Partition NameDrive LetterFile SystemPurpose
1SYSTEMA:B&R proprietaryAutomation Runtime OS image (System ROM)
2DATA1C:B&R proprietaryCompiled user modules (*.BR files) — User ROM
3DATA2D:B&R proprietaryApplication configuration and runtime data
4USERF:\FAT16/FAT32User-accessible file system (FTP-visible)

Partition Creation via CFCreatePart

The partitions are created using the CFCreatePart command in the PIL (Program Installation List) file. The community has documented the syntax:

CFCreatePart "HD0", "4",
    "20, 'SYSTEM'",     /* 20% of card → AR OS */
    "30, 'DATA1'",      /* 30% of card → User ROM (compiled .BR modules) */
    "30, 'DATA2'",      /* 30% of card → Config and runtime data */
    "20, 'USER'"        /* 20% of card → FTP-accessible user partition */

The percentages define relative partition sizes. Notably, RUC (Runtime Utility Center) cannot repartition an existing CF card — if a USER partition was never created, RUC cannot add one later. Only Automation Studio or a fresh CF card creation can establish all four partitions.

Source: B&R Community — USER partition not creating thread (2024), confirmed by B&R staff.

What Each Partition Contains

SYSTEM (A:):

  • The complete Automation Runtime OS binary
  • Version-specific system libraries and drivers
  • FPGA bitstream for the X2X bus controller and I/O processor
  • Boot loader and POST (Power-On Self-Test) firmware
  • Not directly browseable by users; accessed via FTP as the “System” volume

DATA1 (C:):

  • All compiled user program modules (*.BR files) generated by Automation Studio
  • Hardware configuration compiled binaries
  • Library modules (AsIO, AsTCP, AsUDP, mapp components, etc.)
  • The module directory structure mirrors the AS project Logical View
  • When AR boots, it loads all .BR files from this partition into DRAM

DATA2 (D:):

  • Runtime configuration data (network settings, task configuration)
  • Persistent and remanent variable storage areas
  • System dump files and diagnostic data
  • Calibration and parameter data

USER (F:\):

  • Standard FAT16/FAT32 file system accessible via FTP
  • Log files from the AR Logger
  • User-created files (from AsFile library operations)
  • System dump exports
  • Occasionally the original Automation Studio project (.apj, .acp) if the OEM stored it here
  • Configuration backups and recipe files
  • This is the most valuable partition for forensic analysis of an undocumented machine

Accessing the CF Card

MethodAccess ScopeNotes
FTPUser partition (F:) onlyRequires IP configuration; cannot see System/User ROM
Runtime Utility Center (RUC)Full CF cardCan create backups as image files (.zp2, .zp3)
CF card reader + PCMay see partitionsConsumer readers often cannot read B&R partitioned cards
Automation StudioFull accessOnline or via CF card reader (for CF creation)
dd raw imageSector-levelMost reliable for forensic imaging; dd if=/dev/sdX of=backup.img bs=512

Important: The user partition is often where you’ll find the most valuable undocumented data — log files, recipes, and sometimes even the original Automation Studio project source files. Always check the user partition via FTP first when working with an unknown machine.

CF Card Imaging Procedure

To create a complete backup of a B&R CF card for forensic analysis or disaster recovery:

# Method 1: Runtime Utility Center (GUI)
# Tools > Back up files from Compact Flash / Image file...
# Produces .zp2 or .zp3 image file

# Method 2: Raw sector copy via Linux (remove CF card from PLC)
dd if=/dev/sdX of=cp1584_backup_YYYYMMDD.img bs=512 status=progress
# Replace /dev/sdX with actual device (check with lsblk first)
# This captures ALL partitions including System ROM

# Method 3: Mount individual partitions after imaging
fdisk -l cp1584_backup_YYYYMMDD.img  # Show partition table
# Mount partition N:
mount -o loop,offset=$((START_SECTOR * 512)) cp1584_backup_YYYYMMDD.img /mnt/partN

Boot Sequence

The CP1584 boot sequence is a multi-stage process. Understanding each stage is critical for diagnosing boot failures.

Stage 0: Power-On and Hardware Init

  1. Power applied to 24 VDC input
  2. Internal power supply initializes (CPU/X2X Link supply + I/O supply, galvanically isolated)
  3. Hardware self-test runs (RAM check, basic FPGA validation)
  4. If a fatal hardware error is detected, the system halt error code is displayed on the S/E LED
  5. The CPU enters BOOT mode if:
    • Operating mode switch is in BOOT position, OR
    • No CF card is inserted, OR
    • CF card is unrecognized/invalid

Stage 1: Bootloader

The CPU contains a factory-programmed bootloader (in internal ROM/FPGA). This bootloader:

  1. Reads the operating mode switch position:
    • BOOT → Launch minimal “Boot AR” runtime
    • RUN → Proceed to load full AR from CF card
    • DIAG → Boot in diagnostic mode (User RAM/Flash not initialized)
  2. In BOOT mode: only the RS232 interface is active, allowing firmware download via INA2000 protocol
  3. The R/E LED behavior during boot:
    • Green blinking → System startup (initializing application, bus systems, I/O)
    • Green double flash → BOOT mode (during firmware update)
    • Green solid → Application running
    • Red solid → SERVICE mode

Stage 2: Automation Runtime Load

When mode switch is in RUN with valid CF card:

  1. AR kernel loads from System ROM partition on CF card
  2. VxWorks kernel initializes:
    • Memory subsystem (DDR2, SRAM)
    • Interrupt controller
    • Timer subsystem
    • Task scheduler
  3. B&R’s custom layers initialize:
    • I/O processor
    • X2X bus enumeration
    • POWERLINK stack
    • Ethernet interface
    • File system
    • OPC-UA server (if configured)
    • System diagnostics (SDM)

This stage can take several minutes depending on the complexity of the configuration (number of I/O modules, bus topology, etc.).

Stage 3: Application Load

  1. Compiled modules (*.BR files) are loaded from User ROM (DATA1 partition) into DRAM
  2. Global variables are initialized from their persistent data (User ROM / FIX-RAM / remanent)
  3. Hardware configuration is applied:
    • I/O module mapping
    • Interface module configuration
    • Network configuration (IP addresses, POWERLINK node assignments)
  4. I/O modules are enumerated and initialized via X2X bus

Stage 4: I/O Enumeration and Initialization

  1. X2X Link master on the CPU discovers all connected X2X bus modules
  2. Each I/O module is identified and its configuration loaded
  3. Analog modules perform calibration checks
  4. I/O data images are mapped into the CPU’s address space
  5. POWERLINK network is established (if configured as MN):
    • PRE_OPERATIONAL_1 → configure CNs
    • PRE_OPERATIONAL_2 → start cyclic communication
    • READY_TO_OPERATE → PDO data active
    • OPERATIONAL → cyclic data evaluated

Stage 5: Task Class Startup

  1. Task classes are started according to their priority and configuration
  2. IEC 61131-3 programs begin cyclic execution
  3. Watchdog timers are armed
  4. PLC transitions to RUN state (R/E LED solid green)

Boot Timing Indicators

Time After Power-OnTypical ActivityLED State
0–2 secondsPower supply initialization, FPGA loadAll LEDs off, then DC green
2–10 secondsRAM test, bootloader executionCF green (if card detected)
10–30 secondsAR kernel load from CF card System partitionR/E green blinking
30–120 secondsDriver init, X2X enumeration, POWERLINKR/E green blinking, S/E cycling
120+ secondsApplication load, I/O init, task startR/E transitions to solid green
2–5 minutesComplex configurations (many I/O stations)R/E may blink for extended period

If the PLC has been running for more than 5 minutes with R/E still blinking green, suspect a hardware problem (bad CF card, failed I/O module, X2X bus fault). See cf-card-boot.md for detailed CF card boot analysis.

See also: execution-model.md for details on task class scheduling.

Operating Modes

The CP1584 has a physical operating mode switch with three positions:

BOOT Mode

  • Switch position: BOOT
  • CPU launches minimal Boot AR runtime
  • Only RS232 interface is active
  • Allows firmware/OS download via INA2000 protocol
  • User Flash is erased when a download begins
  • Used for: initial commissioning, firmware recovery, OS updates

RUN Mode

  • Switch position: RUN
  • Full Automation Runtime loads from CF card
  • Application executes
  • All interfaces active
  • Normal operating mode

DIAG (Diagnostic) Mode

  • Switch position: DIAG
  • CPU boots in diagnostic mode
  • Program sections in User RAM and User FlashPROM are not initialized
  • After DIAG mode, the CPU always boots with a warm restart
  • Used for: diagnosing application issues without running the program

SERVICE Mode

  • Not a switch position — entered automatically on errors or reset
  • No task classes running
  • Application program halted
  • All outputs set to zero
  • Used for: online debugging, firmware upload, error diagnosis

Reset Button Behavior

The reset button (bottom of housing, requires pointed object) triggers:

  1. All application programs stopped
  2. All outputs set to zero
  3. PLC enters SERVICE mode by default
  4. The post-reset startup mode can be configured in Automation Studio

Restart Types

Cold Restart (INIT)

  • Full OS reload
  • All RAM data deleted (except FIX-RAM)
  • Programs reload from flash
  • Equivalent to first-time initialization
  • Triggered by: mode switch changes, firmware updates, explicit cold restart command
  • Use when: RAM corruption suspected, memory config changed, firmware updated

Warm Restart

  • OS continues running
  • All RAM data preserved
  • Programs continue from current state
  • Variables retain their current values
  • Typical power-cycle behavior (with good battery)

Hot Restart

  • Same as warm restart but faster
  • Used when switching between configurations

Firmware Update Mechanism

Method 1: Automation Studio — Transfer Operating System

  1. Insert CF card and power on CPU
  2. Establish online connection (Ethernet, RS232, or POWERLINK)
  3. In Automation Studio: Project > Services > Transfer Operating System…
  4. Select runtime system version (pre-selected from project settings)
  5. Choose whether to download modules with SYSTEM ROM target memory
  6. Download proceeds — User Flash is cleared
  7. When complete, set mode switch to RUN and reset CPU

For initial download (CPU with no OS on CF card):

  • Must use RS232 connection only (INA2000 protocol)
  • CPU must be in BOOT mode

Method 2: PVI Transfer Tool (Automated/Scripted)

  1. In Automation Studio: Tools > Generate Transfer List
  2. Select “Generate complete transfer list”
  3. Activate “Include operating system”
  4. Use Tools > PVI Transfer Tool to execute the transfer
  5. Can create CF card from existing project for mass deployment

Method 3: Runtime Utility Center (RUC)

RUC can:

  • Create CompactFlash cards from Automation Studio projects
  • Back up entire CF cards as image files (.zp2, .zp3)
  • Restore CF cards from image files
  • Create user partitions
  • Cannot repartition an existing CF card — if no User partition exists, it won’t create one

Method 4: CF Card Imaging (for Clone/Fleet Deployment)

# Create CF card from a known-good image
dd if=cp1584_gold_image.img of=/dev/sdX bs=512 status=progress

This is the most practical method when you don’t have Automation Studio:

  1. Image a known-good CF card from a working machine
  2. Write that image to a new B&R-certified CF card
  3. Swap into replacement hardware

Firmware Downgrade Considerations

  • Not all firmware versions support downgrading
  • B&R provides compatibility matrices
  • Some AR versions require minimum hardware revisions for certain interface modules
  • Always verify compatibility before changing firmware versions

INA2000 Protocol: Serial Firmware Transfer

The INA2000 protocol is B&R’s original serial communication protocol, used for firmware transfer via RS232 when no Ethernet connection exists.

When INA2000 Is Required

  1. Initial CPU commissioning — brand new CPU with no OS on CF card must use RS232 + INA2000 for the first firmware transfer
  2. BOOT mode communication — when the mode switch is in BOOT position and no Ethernet is available
  3. Emergency recovery — when the Ethernet interface is misconfigured or the CF card is corrupted
  4. Legacy systems — older B&R controllers that predate Ethernet online interfaces

INA2000 Transfer Parameters

ParameterValue
Serial portRS232 (IF1, pins 1-3 of X20TB12 terminal block)
Baud rate57600 bps (factory default; try 9600/19200/38400/115200 if 57600 fails)
Data bits8
ParityNone
Stop bits1
Flow controlNone
ProtocolINA2000 (B&R proprietary)

INA2000 vs ANSL (Modern) Protocol

FeatureINA2000 (Legacy)ANSL (Modern)
InterfaceRS232 serialEthernet (TCP/IP) or serial
Speed57600 bps max10/100/1000 Mbit/s
Transfer mediumSerial cable (max ~15 m)Ethernet (max 100 m)
Data integrityBasic checksumFull TCP with retransmission
Use caseInitial commissioning, recoveryNormal development and maintenance
Required in BOOT modeYes (sole method)Yes (if Ethernet configured)
Automation Studio supportVia COM port selectionVia IP address / auto-search

The /DA=02 flag in PVI connections selects the INA2000 data access protocol explicitly. B&R’s modern ANSL (Automation Network Service Layer) supersedes INA2000 for all normal operations.

Serial Transfer Procedure

  1. Connect RS232 cable: CPU pin 1 (RX) → PC TX, CPU pin 2 (TX) → PC RX, CPU pin 3 (GND) → PC GND
  2. Use a null-modem cable or cross-wired connections (the CP1584 pinout is DCE-like)
  3. Set terminal/emulation software to 57600, 8-N-1, no flow control
  4. Set the CPU mode switch to BOOT
  5. Power on the CPU — R/E LED shows red, RDY/F shows yellow (BOOT mode)
  6. In Automation Studio: Online > Settings > Transfer Settings, select Serial, COM port, 57600 baud
  7. Online > Settings > Auto Search — the PLC should appear with its INA2000 station address
  8. Transfer Operating System — download AR to the CF card via serial

Source: B&R Community — INA2000 protocol discussions, PLCtalk — serial connection guides

Automation Studio and AR Version Compatibility

The CP1584 has specific version compatibility requirements that must be observed:

Minimum Software Versions for CP1584

SoftwareMinimum VersionNotes
Automation Studio3.0.90.20Earliest version supporting X20CP1584
Automation Runtime3.x (initial), 4.x (recommended)AR 4.x adds OPC-UA support
Automation Runtime EmbeddedLatest: 4.93B&R order number 1SWAREMB493

AR Embedded Version Availability (from B&R Downloads)

Order NumberVersionNotes
1SWAREMB407AR Embedded 4.7
1SWAREMB408AR Embedded 4.8
1SWAREMB490AR Embedded 4.90
1SWAREMB491AR Embedded 4.91
1SWAREMB492AR Embedded 4.92
1SWAREMB493AR Embedded 4.93Latest AR 4.x for CP1584 — recommended
1SWAREMB6AR Embedded 6Not compatible with CP1584 — requires newer hardware

AS Version to AR Version Mapping

Automation Studio VersionAR Versions SupportedNotes
AS 3.0.xAR 3.xInitial support for CP1584
AS 3.5.x – 4.2.xAR 3.x – 4.25AR 4.0 adds OPC-UA, improved diagnostics
AS 4.3.x – 4.6.xAR 4.30 – 4.60
AS 4.7.x – 4.9.xAR 4.70 – 4.93Latest AR 4.x release (4.93)
AS 5.xAR 5.xMay not support all CP1584 features
AS 6.xAR 6.xNot compatible with CP1584 — requires newer CPU

Critical: The CP1584 cannot run AR 6.x. AR 6.x requires Intel Core i processors (APC910, APC3200) or specific newer X20 CPUs. The CP1584 is limited to AR 4.93 as its maximum runtime version.

Interface Module Hardware Upgrades

Some X20 interface modules require a hardware revision upgrade when moving from older CP1484 CPUs to the CP1584. The minimum hardware revision is documented in the data sheet:

ModuleMin HW Rev (CP1584)Notes
X20IF1020 (Ethernet)H0Upgrade required from CP1484
X20IF1030 (Ethernet Switch)I0Upgrade required from CP1484
X20IF1082 (Modbus TCP/RTU)No upgrade needed
X20IF1063 (CAN + X2X hybrid)Requires AR >= 1.1.5.0
X20IF1072 (PROFIBUS DP)Requires AS >= 1.0.5.1

Source: X20CP158x Data Sheet V1.56, B&R Community upgrade discussions

PIL File Format and PVI Transfer

What Is a PIL File?

A PIL (Program Installation List) file is a text-based manifest that describes exactly what gets transferred to the CF card during a firmware or application update. It is generated by Automation Studio and consumed by the PVI Transfer Tool or Runtime Utility Center.

PIL File Structure (Key Commands)

; Example PIL file for CP1584 firmware + application installation

Target="X20CP1584"

; Partition creation (fresh CF card only)
CFCreatePart "HD0", "4",
    "20, 'SYSTEM'",
    "30, 'DATA1'",
    "30, 'DATA2'",
    "20, 'USER'"

; Installation mode
InstallMode=ForceInitialInstallation    ; Wipes existing data
; InstallMode=Update                   ; Preserves user data

; Transfer individual files
CFWrite "A:\System\arcore.bin"          ; AR kernel
CFWrite "C:\Modules\MyProgram.br"       ; Compiled program
CFWrite "C:\Modules\AsIO.br"           ; Library module
CFWrite "C:\Modules\AsArProf.br"       ; Profiler library
CFWrite "D:\Config\System.par"         ; System parameters

PVI Transfer Tool

The PVI Transfer Tool (pvitransfer.exe) automates firmware and application deployment:

  1. Automation Studio → Tools → Generate Transfer List — creates the .pil file
  2. Automation Studio → Tools → PVI Transfer Tool — executes the transfer list against target PLCs
  3. Can target multiple PLCs simultaneously (fleet deployment)
  4. Works over Ethernet (ANSL) or serial (INA2000)
  5. Requires the PLC to be in BOOT mode for initial installations
  6. For updates to existing installations, RUN mode is sufficient (online changes)

Runtime Utility Center (RUC)

RUC is a standalone tool (does not require full Automation Studio installation):

  1. Install from B&R downloads page (free, no AS license required)
  2. Load a .pil file generated by Automation Studio
  3. Connect to target PLC (requires knowing IP address or using serial)
  4. Execute offline installation to CF card or live transfer to PLC

RUC capabilities:

  • Create CF cards from PIL files (offline, requires CF card reader)
  • Transfer firmware and applications over network or serial
  • Cannot repartition existing CF cards — only Automation Studio can do this
  • Can update firmware on PLCs already running AR

RUC limitations:

  • Less capable than full Automation Studio for browsing project structure
  • Cannot change PLC IP address or auto-discover PLCs on network
  • In BOOT mode without DHCP, requires manual IP configuration

Source: B&R Runtime Utility Center documentation, B&R Community RUC discussions

B&R Product Lifecycle and CP1584 Status

The Four Lifecycle Phases

PhaseStatusWhat It Means
ActiveIn series productionFull availability, recommended for new projects
ClassicPhase-out announcedStill orderable; do NOT use for new projects; plan LTB
LimitedLast-Time-Buy completeOnly LTB orders fulfilled; no new orders accepted
ObsoleteMarket exitNo longer available; repair service for 3 years after obsolete

X20CPx58x Discontinuation

B&R announced the discontinuation of the X20CPx58x CPU series (which includes the CP1584) via Service Note SN 2022/54 due to component discontinuation:

  • Last-Time-Buy date: February 28, 2023
  • Reason: Semiconductor component supply chain discontinuation (Intel Atom E6xx series becoming obsolete)
  • The CP1584 has entered the Limited or possibly Obsolete phase as of 2025–2026

Practical Implications for Maintaining CP1584 Machines

  1. No new CP1584 units available from B&R. All spare CPUs must come from secondary market, surplus, or refurbished stock.
  2. CF cards are still available — B&R continues to sell CF cards and software. The 8 GB SLC cards (5CFCRD.8192-06) are current products.
  3. AR 4.93 continues to receive security patches — B&R’s patching policy for AR 4.x (see CVE data in ar-rtos.md) shows ongoing security advisories covering AR 4.93.
  4. Interface modules and I/O modules remain available — the X20 ecosystem (I/O modules, bus couplers, interface modules) continues in Active or Classic status.
  5. Migration path: B&R recommends X20CP1684 (Intel Atom E680T, 1 GHz) as the direct replacement, or X20CP0484-1 for cost-sensitive applications. See remanufacturing.md for full migration analysis.

Source: B&R Lifecycle Policy page, Service Note SN 2022/54, B&R downloads page

Firmware File Types on the CF Card

Files in the SYSTEM Partition (A:)

File/DirectoryDescription
arcore.bin (or similar)AR kernel binary (VxWorks-based)
fpga.bit (or similar)FPGA bitstream for X2X bus controller
bootloader.binSecondary bootloader for CF card access
System library binariesAR core runtime libraries

The exact file names vary between AR versions. These files are not directly human-readable and are loaded by the CP1584’s internal boot ROM.

Files in the DATA1 Partition (C:)

File TypeExtensionDescription
Compiled program modules*.brBinary runtime modules from Automation Studio
Hardware configurationCompiled binaryCPU, I/O, and network configuration
Library modules*.brStandard and third-party libraries

The directory structure on C: mirrors the Automation Studio Logical View. Modules are loaded in a specific order determined by the project configuration.

Files in the USER Partition (F:)

File/DirectoryDescription
LogBook/AR Logger output files (system and user log)
SystemDump/System dump files (XML format)
*.apjAutomation Studio project files (if OEM stored them)
*.acpProject configuration files
*.csvData logging exports, diagnostic reports
*.datConfiguration and recipe data files
*.txtUser-created text files

See config-file-formats.md for detailed format descriptions of .apj, .acp, and other configuration files.

FPGA and the Integrated I/O Processor

The CP1584 contains an FPGA (Field Programmable Gate Array) that handles critical real-time functions independently of the main CPU:

FPGA Functions

FunctionDescription
X2X Bus ControllerManages the X2X Link protocol timing, addressing, and data transfer to all connected I/O stations
I/O Data ProcessorIndependently refreshes the I/O image in background, decoupled from CPU task execution
POWERLINK MACImplements the Ethernet MAC layer for POWERLINK (IF3), including the Precise Timestamp (IEEE 1588 hardware support)
Watchdog TimerHardware-level cycle time monitoring independent of software
Boot ROM InterfaceCF card reading during early boot before AR kernel loads

FPGA Programming

The FPGA bitstream is part of the AR installation in the SYSTEM partition. When AR is updated, the FPGA bitstream is also updated. This is why firmware updates can take several minutes — the FPGA must be reconfigured without disrupting ongoing operations.

If the FPGA fails to program (System Halt error: •−−− •−−−), the CPU module must be replaced. There is no user-accessible mechanism to reprogram the FPGA independently.

Automation Runtime Security Patching on CP1584

See ar-rtos.md Section 14 for a comprehensive list of CVEs affecting AR 4.x on the CP1584. Key points:

Patch Status Summary

VulnerabilityPatched in AR 4.93?Notes
URGENT/11 (VxWorks TCP/IP)Yes (in newer AR 4.x builds)Requires AR R4.90+
NAME-WRECK (DNS)YesRequires AR R4.90+
SA24P011 (Multiple)NoUnpatchable on AR 4.x; CVE-2024-5800 (weak TLS) remains
CVE-2025-11044 (ANSL DoS)Yes (AR R4.93)Must update to 4.93
CVE-2025-3450 (SDM DoS)Yes (AR R4.93)Must update to 4.93
CVE-2024-0323 (FTP weak TLS)NoFTP is insecure on all AR 4.x
CVE-2024-8603 (SSL/TLS broken crypto)NoSSL/TLS uses broken/risky cryptographic algorithm (requires AR >= 6.1)
CVE-2021-22275 (Webserver overflow)No
CVE-2023-1617 (VNC auth bypass)No (but patchable via VC4 update)
SA25P003 CVEs (SDM XSS/session)NoCannot be patched on any AR 4.x

Recommendation: Update to AR 4.93 immediately if not already at this version. It patches the most critical DoS vulnerabilities. Accept that some older CVEs cannot be patched on the CP1584 platform and mitigate via network isolation.

See access-recovery.md Section 14.19 for recommended firewall rules for an AR 4.93 CP1584.

LED Diagnostics During Boot

LEDColorPatternMeaning
R/EGreenBlinkingSystem startup (may take several minutes)
R/EGreenDouble flashBOOT mode, firmware update in progress
R/EGreenSolidApplication running
R/ERedSolidSERVICE mode
R/ERedBlinking (alternating with RDY/F yellow)License violation
RDY/FYellowSolidCPU is active
RDY/FRedSolidOvertemperature
CFGreenSolidCF card inserted and detected
CFYellowSolidCF card read/write access
DCGreenSolidCPU power supply OK
DCRedSolidBackup battery empty
S/EVariousSee powerlink-statesPOWERLINK interface state

System Halt Error Codes (S/E LED Red Blinking)

Error codes are displayed as 4 phases of 150ms (short) or 600ms (long) LED on-times, repeated every 2 seconds:

ErrorCode PatternMeaning
RAM error•••• ••••Device defective, must be replaced
Hardware error•••− •••−Device/system component defective
Stack overflow••−• ••−•Task stack exceeded (software bug)
Undefined address••−− ••−−Access to non-existent address
Instruction fetch abort•−•• •−••Invalid memory access during instruction fetch
Data access abort•−−• •−−•Invalid memory access during data access
FPGA programming error•−−− •−−−FPGA configuration failure

Legend: • = 150ms on, − = 600ms on, 2s pause between repetitions.

Practical Procedures for the No-Documentation Scenario

Determining What Firmware is Running

Without Automation Studio:

  1. FTP to the PLC — check user partition for version info files, log files may contain AR version
  2. OPC-UA browse — some system nodes expose firmware version
  3. AR log analysis — the PLC logbook often records firmware version on boot
  4. Web interface (if enabled) — may show system info
  5. PVI API — connect and query system variables

Backing Up a CF Card Without Automation Studio

## Remove CF card from PLC (power off first!)
## Insert into USB CF reader connected to Linux PC
lsblk  # Identify the CF card device
dd if=/dev/sdX of=cp1584_backup.img bs=512 status=progress conv=noerror,sync
## Verify backup
md5sum cp1584_backup.img
## Mount user partition to inspect
fdisk -l cp1584_backup.img
mount -o loop,offset=$((SECTOR*512)),ro cp1584_backup.img /mnt/cf_user
ls -laR /mnt/cf_user

Creating a Replacement CF Card Without Original Project

  1. Take a raw image backup of a known-good CF card from a working identical machine
  2. Write image to a new B&R-certified CF card of the same or larger capacity
  3. Boot the replacement PLC with this CF card
  4. If hardware differs (different I/O modules), the configuration will need adjustment — see project-reconstruction.md

What to Do When the CF Card Fails

  1. PLC will enter BOOT mode (R/E LED blinking green)
  2. In BOOT mode, only RS232 is active
  3. You need either:
    • A backup CF card image to restore, OR
    • Automation Studio with the correct AR version to transfer a new OS, OR
    • A known-good CF card from an identical machine to clone
  4. If no backup exists and you don’t have AS: this is when you need project-reconstruction.md

Gotchas and Edge Cases

  1. CF card brand matters: B&R-certified cards only. Consumer cards fail silently or during operation. The most common “dead PLC” scenario is a bad CF card.

  2. CF card partitioning: B&R uses 4 partitions. Standard formatting tools will destroy this layout. Only use RUC or raw dd to create/restore CF cards.

  3. User partition may not exist: If the original project was built without configuring a user partition size, there won’t be one. RUC cannot create one on an existing CF card.

  4. Battery drain kills retentive data: If the battery is dead, ALL remanent data, FIX-RAM, and RTC are lost. Check the DC LED (red = battery empty) before powering off a machine.

  5. Overtemperature is logged: The PLC logs error 9204 (temperature-triggered restart) and 9210 (watchdog/manual reset) before shutting down. These are recoverable from the logbook.

  6. SERVICE mode after reset: Pressing the reset button always enters SERVICE mode by default. This stops the program and zeroes all outputs. If you don’t know this, it looks like the PLC “died.”

  7. Firmware version compatibility: X20CPx58x CPUs require Automation Studio V3.0.90.20+. Some X20 IF interface modules require hardware revision upgrades when moving from CPx48x to CPx58x CPUs.

  8. USB is NOT an online interface: USB ports on the CP1584 are for peripherals only, not for programming/debugging connections.

  9. Boot takes time: Initial boot with complex I/O configurations can take several minutes. Don’t assume the PLC is dead if LEDs are still blinking after 30 seconds.

  10. ETHERNET interface is NOT for POWERLINK: The standard Ethernet interface (IF2) must NOT use POWERLINK address range (192.168.100.x). POWERLINK uses its own dedicated interface (IF3).

Automation Runtime Version Landscape (2026)

The AR version landscape has evolved significantly. Understanding what versions exist and their compatibility with the CP1584 is critical for maintenance planning.

Available AR Versions (as of 2026)

Material NumberAR VersionCP1584 CompatibleNotes
1SWAREMB407AR Embedded 4.7YesLegacy — min for X20CP1584
1SWAREMB408AR Embedded 4.8YesMaintenance
1SWAREMB490AR Embedded 4.90YesMaintenance
1SWAREMB491AR Embedded 4.91YesMaintenance
1SWAREMB492AR Embedded 4.92YesMaintenance
1SWAREMB493AR Embedded 4.93 (R4.93)YesLatest/most secure AR 4.x — recommended
1SWAREMB6AR Embedded 6NoRequires newer hardware (X20EM, X20CP3xxx)
1SWARAPI600AR API 6N/AAPI-only runtime for exOS/Linux
1SWARVXW6VxWorks 6 Getting StartedNoMigration toolkit for AR 6 targets
1SWARVXW7VxWorks 7 Getting StartedNoMigration toolkit for newest targets

AR 6.x — The Next Generation (Not for CP1584)

AR 6 represents a major platform shift. Key changes:

  • Base OS migration from VxWorks 5.5 to VxWorks 6.x/7.x — the underlying RTOS is being modernized after decades on the VxWorks 5.5 codebase
  • Security hardening — AR 6 patches many CVEs that cannot be patched on AR 4.x (see ar-rtos.md §14 for full CVE table)
  • New hardware required — AR 6 does not run on X20CP1484/1584/1684. It targets the newer generation:
    • X20EM (Edge Controllers) — ARM/RISC-V based, designed for IIoT edge computing
    • X20CP3xxx series (e.g., X20CP3586 @ 1.6 GHz, 512 MB RAM) — Intel Atom successor
    • APC9xx (Automation PCs) — full industrial PC platform
  • exOS support — AR 6 introduces proper IT/OT integration with Linux running on separate cores alongside the RTOS
  • Automation Studio 6.x required — AS 6 is a separate product line from AS 4.x and requires its own license

What This Means for CP1584 Operators

  1. AR R4.93 is the end of the line for CP1584. No further AR updates will be released for this hardware platform.
  2. Security patching has effectively stopped. The 16+ unpatchable CVEs documented in ar-rtos.md §14 will never be fixed on CP1584.
  3. Migration planning should begin now for machines with >5 years remaining service life. See remanufacturing.md for migration strategies.
  4. The transition to AS 6 + AR 6 is not a simple upgrade — it requires new hardware, new AS licenses, and project porting. Budget accordingly.
  5. B&R’s VxWorks 6/7 migration kits (1SWARVXW6, 1SWARVXW7) suggest they are actively transitioning their entire product line to a modern RTOS base, which will further widen the capability gap between legacy CP1584 and current-generation hardware.

Key Findings

  • The CP1584 runs B&R Automation Runtime, a VxWorks-based RTOS with extensive B&R custom layers for PLC operation
  • All application memory is on CompactFlash — the CPU contains no onboard flash for user programs
  • CF card uses 4 proprietary partitions: System ROM, User ROM, User partition (FTP-accessible), and reserved
  • Memory hierarchy: System ROM (OS) → User ROM (compiled programs) → User RAM (runtime data) → FIX-RAM (persistent parameters)
  • Battery-backed SRAM retains remanent variables, User RAM, and RTC; battery is a Renata CR2477N with 4-year replacement interval
  • Boot sequence: Hardware init → Bootloader → AR kernel load → Application load → I/O enumeration → Task class startup
  • Three operating modes via physical switch: BOOT (firmware download), RUN (normal operation), DIAG (diagnostic)
  • CF card failures are the most common cause of “dead” CP1584s — always image the CF card before doing anything else
  • Raw dd imaging is the most reliable backup method when Automation Studio is unavailable
  • AR R4.93 is the final firmware for CP1584 — no further AR 4.x updates will be released, and 16+ security CVEs remain unpatched on this platform
  • AR 6 requires new hardware (X20EM, X20CP3xxx, APC9xx) — the VxWorks base is migrating from 5.5 to 6.x/7.x, and the CP1584 cannot run AR 6
  • Automation Studio 6 is required for AR 6 targets — AS 6 is a separate product from AS 4.x and needs its own license

Sources

  • B&R X20CP1584 Data Sheet V1.56 — hardware specifications, memory resources, and operating conditions
  • B&R X20 System User’s Manual — boot modes, operating mode switch, and CF card handling
  • B&R Automation Runtime Overview (TM213) — AR architecture, task configuration, and memory management
  • B&R Community Forum (community.br-automation.com) — firmware, CF card, and boot sequence discussions
  • B&R Knowledge Base — firmware update procedures and recovery methods

B&R Execution Model: Cyclic Task Scheduling, IEC 61131-3 Semantics, and Watchdog Behavior

Overview

B&R Automation Runtime uses a deterministic, priority-based preemptive multitasking system built on VxWorks. Programs written in IEC 61131-3 languages (Ladder Diagram, Structured Text, Function Block Diagram, Instruction List, Sequential Function Chart) and ANSI C are executed in cyclically-repeating task classes with configurable priorities and cycle times. Understanding this model is essential for diagnosing timing-related bugs, cycle time violations, and SERVICE mode entries on undocumented machines.

Priority System

Automation Runtime uses a deterministic, priority-based preemptive multitasking system built on a real-time operating system (RTOS) derived from VxWorks. B&R does not publicly document the exact RTOS version or whether it uses a licensed Wind River VxWorks kernel or a B&R-developed RTOS, but the scheduling behavior is consistent with VxWorks’s priority-based preemptive scheduler with a hardware timer tick interrupt driving context switches.

B&R uses a priority range of 0 to 255, where higher numbers have higher priority. When multiple tasks want to run simultaneously, the higher-priority task always runs first. The RTOS tick timer (configurable, typically 1 ms) drives the scheduler’s periodic evaluation of task readiness.

The priority space is divided into four tiers:

Priority RangeTierWhat Runs Here
> 230Hardware/InterruptHW interrupts, I/O scheduling. Higher priority than Cyclic #1.
190–230Cyclic TasksCyclic #1 (highest) through Cyclic #8 (lowest). Motion control, time-critical logic.
4–190System TasksEthernet, ANSL/TCP/UDP, file operations, logger, visualization, webserver, SDM, OPC-UA.
< 4Idle TasksNo-op filler (IDLE at priority 0, TcIdleFiller at priority 3).

Scheduler Internals

The RTOS scheduler uses a tick-driven, priority-based preemptive algorithm:

  1. Timer tick interrupt fires at the configured system tick rate (typically 1 ms on the CP1584, derived from the Intel Atom HPET or LAPIC timer)
  2. The tick ISR runs the scheduler: it checks all ready queues and dispatches the highest-priority ready task
  3. Preemption: If a higher-priority task becomes ready (via interrupt or timeout), the currently running task is immediately preempted — even mid-instruction
  4. Round-robin within priority: Tasks at the same priority level are scheduled round-robin
  5. Time slicing: B&R does NOT use time slicing within a priority level for cyclic tasks. Each cyclic task runs to completion (or until preempted) within its allocated window

The minimum the Task class idle time can be reduced to is your System Tick (base timer for all AR), and the Task class idle time must be a multiple of the system tick. This means on a system with a 1 ms tick, idle time granularity is 1 ms.

Memory Protection

The Intel Atom E640T provides hardware MMU/MPU capabilities, but B&R Automation Runtime uses them with specific scope:

  • Kernel/user protection: The MMU protects the AR kernel and system memory from user task access — user tasks cannot corrupt the OS kernel or system structures
  • Flat task model: All user tasks (cyclic, event, etc.) share a single flat address space with no task-to-task isolation. A buggy cyclic task CAN corrupt another cyclic task’s data. See ar-rtos.md Section 2.3 for details
  • Page faults (accessing unmapped or protected memory) trigger EXCEPTION 7 (address error) or EXCEPTION 25314 (Page Fault) and result in SERVICE mode
  • The Exception task class (EXC) has access to all memory spaces for error handling
  • The integrated I/O processor uses DMA (Direct Memory Access) to update the I/O image in memory without CPU involvement

Interrupt Handling

Interrupts on the CP1584 follow the VxWorks interrupt model:

Interrupt SourcePriorityHandlerLatency
CPU timer tick240+RTOS schedulerDeterministic, typically < 5 us
X2X bus interrupt~235X2X driver< 10 us
POWERLINK interrupt~233EPL driver< 10 us
Ethernet RX interrupt~20Network driverVariable (higher with high traffic)
USB interrupt~15USB driverVariable
Exception (fault)255 (highest)Exception handlerImmediate

When an interrupt fires, the RTOS saves the current task’s context (registers, stack pointer, flags) and jumps to the registered interrupt handler. After the handler completes, the context is restored and the highest-priority ready task resumes.

Task Classes

B&R provides up to 8 cyclic task classes (Cyclic #1 through Cyclic #8), each with:

  • A configurable cycle time
  • A priority (Cyclic #1 = highest, Cyclic #8 = lowest)
  • One or more assigned programs/tasks
  • A configurable watchdog tolerance
  • A configurable jitter tolerance

Default Cycle Times

Task ClassDefault Cycle TimeTypical Use
Cyclic #110 ms (default)Motion control, time-critical I/O, PID loops
Cyclic #220 ms (default)Standard logic, I/O processing
Cyclic #350 ms (configurable)HMI updates, data exchange
Cyclic #4–8100–1000 ms (configurable)Recipe handling, logging, diagnostics

The CP1584 has a shortest achievable task class cycle time of 400 µs (hardware limitation).

Task Class Execution Model

Each task class operates as follows:

  1. The cycle timer for the task class expires
  2. If a higher-priority task class is still running, the current class waits (preemptive priority)
  3. All programs/tasks assigned to the class execute sequentially within the class
  4. After all tasks complete, the class yields and waits for the next cycle
  5. I/O data is updated at specific synchronization points (see I/O Cycle section)
Time →
|---TC#1---|---TC#1---|---TC#1---|---TC#1---|
|   ProgA   |   ProgA   |   ProgA   |   ProgA   |
|----TC#2----|----TC#2----|----TC#2----|
|  ProgB  ProgC |  ProgB  ProgC |  ProgB  ProgC |
|-------TC#3-------|-------TC#3-------|
|   ProgD  ProgE  ProgF  |   ProgD  ProgE  ProgF  |

Jitter Tolerance

Each task class has a configurable jitter tolerance — the allowed deviation from the exact cycle time before an exception is triggered. This is different from the watchdog timeout (which covers total cycle time violations). Jitter tolerance is important for motion control applications where exact timing is critical.

I/O Cycle Synchronization

I/O data exchange is synchronized with the cyclic task system. This is a critical concept that differs from some other PLC platforms:

Synchronizing Tasks with the I/O Cycle

The I/O cycle runs independently and deterministically. Task classes can be configured to:

  1. Read inputs at the start of the task class cycle
  2. Write outputs at the end of the task class cycle
  3. Run synchronized with the I/O bus cycle (X2X, POWERLINK)

When a task class is synchronized to the I/O cycle:

  • Input data is read from the I/O image at the start of the cycle
  • Logic executes using that input data
  • Output data is written to the I/O image at the end of the cycle
  • Multiple task classes reading the same inputs see identical input data within one I/O cycle

The Integrated I/O Processor

The CP1584 has a dedicated I/O processor that processes I/O data points in the background. This means:

  • I/O scanning runs independently of the main CPU task execution
  • The I/O image in memory is continuously updated by the I/O processor
  • Cyclic tasks read from a snapshot of the I/O image, not directly from hardware

This architecture provides excellent I/O performance but means that I/O timing is decoupled from task class timing.

Watchdog Behavior

Cycle Time Violations

A cycle time violation occurs when the sum of runtimes of all tasks in a task class exceeds the configured cycle time. This is the #1 cause of SERVICE mode entries (approximately 80% of all SERVICE mode events).

By default, a cycle time violation triggers:

  1. A system emergency stop
  2. The controller boots in ERROR mode
  3. The PLC then enters SERVICE mode
  4. All outputs are set to zero
  5. The error is logged in the AR logbook

Common Causes of Cycle Time Violations

  • Infinite loops in IEC code (most common)
  • Blocking I/O operations (e.g., waiting for a response in a cyclic task)
  • Excessive computation in a fast task class
  • String operations or memory allocation in cyclic code
  • File I/O performed in a cyclic task
  • Division by zero causing exception handling overhead
  • Page faults from invalid memory access

Configuring Watchdog Tolerance

The watchdog tolerance for each task class can be increased to allow occasional overruns without triggering an emergency stop. However, this does not fix the underlying timing problem.

Task Idle Time and System Task Starvation

The Problem

Because cyclic tasks (priority 190–230) have higher priority than system tasks (priority 4–190), a long-running cyclic task class can starve system tasks of CPU time. This causes:

  • Visualization updates to become sporadic or freeze
  • OPC-UA responses to time out
  • Ethernet communication to fail
  • SDM data to become stale
  • File operations to hang
  • USB device discovery to fail

The Solution: Task Idle Time

The Task Idle Time / Idle Time Task Class mechanism reserves a portion of a cyclic task class’s time for system tasks to execute. This is configured in the CPU’s task class properties.

Default configuration:

  • Idle Time Task Class: Cyclic #2 (20 ms cycle)
  • Task Idle Time: 2 ms (last 2 ms of the 20 ms cycle)

During the idle time window:

  • The affected task class is effectively moved to priority 2
  • System tasks can run at their normal priority (4–190)
  • If no system tasks need to run, TcIdleFiller runs no-ops at priority 3
  • Cyclic #1 (and any higher-priority cyclics) still preempt everything

SDM CPU Usage Reporting

The SDM reports CPU usage as: 100% - time spent at priority 0 (IDLE)

This means:

  • TcIdleFiller no-ops count as “CPU usage” even though the CPU is doing nothing
  • In SERVICE mode with default idle time, CPU usage appears artificially high (~50-60%) when the real usage is near 0%
  • Don’t be alarmed by high SDM CPU readings in SERVICE mode — it’s the TcIdleFiller effect

Tuning the Idle Time

Guidelines for tuning without the original project:

  1. Minimum idle time: System tick (base timer for AR), must be a multiple of system tick
  2. Zero (0 µs) disables idle time entirely (dangerous — can starve all system tasks)
  3. Better to have frequent short windows: 2 ms every 20 ms is better than 200 ms every 2000 ms, even though both reserve 10% for background tasks
  4. Don’t put idle time in a low-priority task class even if it’s fast — use TC#3 at 50 ms rather than TC#8 at 10 ms
  5. The idle time follows the tolerance of its assigned task class — delays cascade if cyclics overrun

Exception Handling

Exception Types

ExceptionTriggerDefault Action
Cycle time violationTask class exceeds cycle timeEmergency stop → SERVICE mode
Page faultInvalid memory accessSERVICE mode, error logged
Stack overflowTask stack exceededSERVICE mode, error logged (S/E LED error code)
Divide by zeroDivision by zero in cyclic codeSERVICE mode
Hardware faultFPGA error, RAM errorSystem halt (non-recoverable)
WatchdogWatchdog timer expiredEmergency stop → SERVICE mode

Exception Handling Configuration

The default behavior (emergency stop on cycle time violation) can be changed:

  • Exception handling can be configured per task class
  • Actions can be: ignore, log only, stop task, or emergency stop
  • For production machines from defunct OEMs, it’s often safer to leave defaults (emergency stop) to prevent dangerous behavior from timing errors

Troubleshooting Execution Issues

Diagnosing Cycle Time Violations

  1. Check the AR logbook for cycle time violation entries (error codes typically in the 9xxx range)
  2. Use the Profiler in Automation Studio to see which task/function block is consuming time
  3. Check task class configuration — are cycle times realistic for the hardware?
  4. Look for blocking operations in cyclic code:
    • File I/O (FileOpen, FileRead)
    • Network operations (TcpOpen, synchronous communication)
    • WAIT statements or delay loops
    • String operations on long strings

Diagnosing System Task Starvation

Symptoms:

  • OPC-UA clients disconnect or time out
  • Visualization freezes or updates erratically
  • Ethernet communication fails intermittently
  • New I/O modules plugged in are not detected
  • Web interface becomes unresponsive

Solution:

  1. Check Task Idle Time configuration — increase if too small
  2. Move idle time to a higher-priority task class
  3. Reduce cycle times of lower-priority task classes
  4. Look for cyclic tasks that consistently overrun their cycle time

Monitoring Task Execution at Runtime

Without Automation Studio:

  1. PVI API — read task cycle time, max cycle time, current load per task class
  2. OPC-UA — if exposed, monitor task cycle time nodes
  3. System variablesRTInfo function block data (see system-variables.md)
  4. AR logbook — check for cycle time warnings/violations
  5. SDM — monitor CPU usage, task class load indicators

Using RTInfo Function Block

The RTInfo function block from the BRSystem library provides runtime information about the current task class:

(* In structured text *)
rtInfo_0(enable := TRUE);

// Available outputs:
// rtInfo_0.cycletime  - Current cycle time of this task class
// rtInfo_0.maxcycletime - Maximum cycle time recorded
// rtInfo_0.taskload    - Current load of this task class
// rtInfo_0.tasknumber  - Current task class number

Cycle Time Tolerance and Watchdog Configuration Details

Cycle Time vs. Maximum Cycle Time vs. Tolerance

B&R distinguishes between three related but distinct timing parameters per task class:

ParameterException CodeWhat It ChecksDefault Behavior
Cycle Time144Total time for all tasks in the class must complete within this windowEmergency stop
Maximum Cycle Time145Peak cycle time must not exceed (cycle time + max tolerance)Emergency stop
Cycle Time Tolerance144 (extended)Extra time allowed beyond cycle time before violation is declaredEmergency stop

The cycle time tolerance is an additional buffer beyond the base cycle time. If the base cycle time is 10 ms and the tolerance is 2 ms, the task class can run up to 12 ms before Exception 144 fires. After the tolerance window expires and the task still hasn’t completed, Exception 145 (maximum cycle time violation) fires.

Critical rule from B&R (AS 4.3.5 SP release notes): If a tolerance is defined that is NOT a multiple of the cycle time, the value is silently ignored — no error is displayed. The tolerance must be a multiple of the cycle time for it to take effect.

Adjusting Tolerance Without the Project

If you have Automation Studio but not the project source, you can still adjust tolerance via online changes:

  1. Connect to the PLC with a minimal project
  2. Login online
  3. Navigate to the target system configuration
  4. Locate the task class properties
  5. Increase the cycle time tolerance value
  6. Apply the online change — this takes effect immediately without stopping the PLC

This is a runtime band-aid only — it does not fix the underlying cause of the cycle time violation. See online-changes.md for the full procedure.

Watchdog Variants

B&R implements two watchdog mechanisms:

  1. Task class watchdog — Per-task-class timer that fires if the class doesn’t complete within (cycle time + tolerance). This is the most common.

  2. System watchdog — A hardware-level watchdog timer that resets the entire CPU if the RTOS kernel stops responding. This is a safety net for kernel-level hangs (e.g., driver deadlock, hardware fault). The system watchdog cannot be configured from Automation Studio.

If the system watchdog fires, the CPU performs a complete hardware reset — this is different from a SERVICE mode entry. The AR logbook will not contain an entry for this event because the logger didn’t get a chance to write it. A system watchdog reset is indicated by the CPU booting up with no log entry for the previous session.

Community-Sourced Troubleshooting Wisdom

PV_lkaddr() Causing Maximum Cycle Time Violation

A known cause of Exception 145 on B&R systems is the PV_lkaddr() function from the SYS_Lib library. This function is used to obtain the address of a variable for use with PV_xget()/PV_xset() direct memory access. The issue occurs when:

  1. An initialization section of a function block calls PV_lkaddr() only once (as intended)
  2. But the function block’s instance data is not properly initialized on first scan
  3. The call to PV_lkaddr() triggers an expensive name resolution operation
  4. This operation exceeds the cycle time tolerance, triggering Exception 145

Fix: If you encounter this pattern in the profiler, check the AR logbook for the specific task class and look for PV_lkaddr references. If you have the source code, add a guard flag to ensure PV_lkaddr() is only called after the task class has completed its first full cycle.

Profiler “Unknown” Cyclic Task

When profiling a PLC with a different version of Automation Studio than what was used to compile the original project, one of the cyclic tasks may appear as “unknown” in the profiler diagram. This is caused by a symbol version mismatch — the profiler cannot resolve function block names from a different AS version. This is not a real problem; it simply means you cannot see the individual function blocks within that task class.

Workaround: Use the same AS version (or the same major version) as the original project to get full profiler resolution. If you don’t know the original AS version, check the AR version on the PLC and install the corresponding AS version.

Tools > Upgrades Stopped Working (July 2026 Known Issue)

As of July 2026, there is an active B&R Community thread titled “Tools - Upgrades stopped working” with 7 responses. The B&R Upgrade Service, which runs as a Windows service and downloads AR firmware packages from B&R’s website, can stop functioning due to:

  • Windows firewall changes blocking the service
  • TLS certificate updates on B&R’s server
  • Antivirus software quarantining downloaded upgrade files
  • The service running under LOCAL_SERVICE account without sufficient rights to write to C:\Temp

Fix steps:

  1. Delete everything in C:\Temp
  2. Restart the PC
  3. Start AS explicitly as Administrator
  4. Check that the B&R Upgrade Service is running (Windows Services)
  5. Try switching the service user from LOCAL_SERVICE to LOCAL_SYSTEM or vice versa
  6. If still failing, check C:\Users\<username>\AppData\Roaming\BR\Logging\Data for error logs

Practical Gotchas for Undocumented Machines

  1. Cycle time violations are the #1 cause of SERVICE mode. If a CP1584 keeps going into SERVICE mode and you don’t have the project, check the AR logbook first — it’s almost certainly a cycle time violation.

  2. Default idle time setup masks problems. If someone moved the idle task class to a very slow cycle (e.g., TC#8 at 100ms), system tasks will respond very slowly, making the PLC appear “sluggish” without any visible error.

  3. Task priorities are fixed — you can’t change the priority number. Only the cycle time, jitter tolerance, and idle time are configurable. If the original programmer put a slow operation in Cyclic #1, there’s no way to lower its priority without access to the project.

  4. I/O synchronization matters for motion. If a task class handling motion control is NOT synchronized to the I/O cycle, the I/O data read by the motion task may be from a different cycle than expected, causing jerky motion or missed position capture events.

  5. SERVICE mode stops ALL tasks. When the PLC enters SERVICE mode, no cyclic tasks run, no I/O is updated, and all outputs are zeroed. The machine literally stops. If outputs must be maintained during debugging, this must be configured in advance (which requires the project).

  6. The reset button always enters SERVICE mode by default. Don’t press it during production.

  7. CPU usage in SDM is not what you think. The SDM calculates CPU usage as 100% - time_at_priority_0. Because TcIdleFiller runs at priority 3 (not 0), its no-op time counts as “CPU usage”. In SERVICE mode, SDM will show ~50-60% CPU usage when the real usage is near 0%. On a running system, this effect is smaller but still present — the SDM always over-reports by the amount of time spent in TcIdleFiller. A community member measured: SDM reported 95.45% while the actual CPU usage (system tasks + I/O) was only ~37.9%.

  8. Don’t put idle time in a low-priority task class even if it’s fast. The idle time follows the tolerance of its assigned task class. Using TC#8 at 10ms means idle time is delayed by any higher-priority cyclic that runs long. Use TC#3 at 50ms instead — the higher priority ensures idle time windows are more predictable.

  9. The profiler recording time must be at least 2× the slowest task class cycle. For intermittent faults, use 10+ seconds. If the profiler shows nothing despite cycle time violations, check the filter settings — the offending task class may be excluded.

  10. System watchdog resets leave no log entry. If the CPU resets and there’s no log entry for the previous session, a system watchdog reset (kernel hang) is the likely cause. This is a hardware-level reset — the RTOS never got a chance to log anything.

Exception Task Classes (EXC)

Exception task classes handle fatal errors that occur while Automation Runtime is running and cannot be corrected by the OS alone. The EXC task class has the highest priority in the entire system — it interrupts all normal tasks, high-speed tasks, and interrupt tasks.

How Exception Handling Works

  1. An exception occurs while a normal task is running
  2. The normal task is immediately interrupted (EXC has absolute highest priority)
  3. The exception task assigned to EXC executes
  4. Processing of normal tasks resumes from the point of interruption

Exception Codes

Exception #DescriptionCommon Cause
2Bus errorMemory bus fault, DMA failure
3Address errorUnaligned memory access
4Illegal instructionCorrupted code, wrong CPU target
5Division by zeroMissing zero-check in cyclic code
6Range overflowArray index out of bounds
7Null pointerDereferencing NULL pointer
8Privilege violationAccessing protected memory region
10Unimplemented instructionCode compiled for wrong CPU
24Spurious interruptInterrupt with no handler
128I/O ExceptionIO module failure, bus communication error
144TC cycle time violationNormal cyclic task exceeded cycle time
145TC maximum cycle time violationPeak cycle time exceeded tolerance
146TC Input cycle time violationInput processing exceeded limit
147TC Output cycle time violationOutput processing exceeded limit
160HSTC maximum cycle time violationHigh-speed task exceeded max cycle
170CAN I/O exceptionCAN bus communication failure

Configuring Exception Tasks

In Automation Studio, exception tasks are configured per CPU:

  1. Right-click CPU → Insert Object → Exception
  2. Select the exception type (e.g., “Division by zero”, “TC cycle time violation”)
  3. Enable/disable execution of the exception task
  4. Assign a program to the exception task class

The EXC task class shares its global data area with Cyclic #1, enabling fast data exchange without PLC-global variables.

Practical note for undocumented machines: If the original project configured custom exception handlers, you won’t know what they do without the source code. The exception codes above are logged in the AR logbook regardless.

Interrupt Task Classes (IRQ)

Interrupt task classes handle asynchronous hardware events (triggered by hardware interrupts). IRQ tasks have higher priority than all normal cyclic tasks, but lower priority than exception tasks.

IRQ Task Characteristics

  • Each interrupt-capable module can be assigned its own IRQ task
  • The IRQ task is processed each time the corresponding hardware interrupt triggers
  • Only available on B&R 2010 systems (X20, X67) — not supported on older B&R 2003/2005 hardware
  • Useful for: hardware encoder triggers, high-speed digital input capture, external sync signals

Typical IRQ Sources

SourceUse Case
Digital input module interruptHigh-speed part detection, emergency stop capture
Encoder module latch signalPosition capture at external trigger event
Timer interruptPrecise timing for specialized applications
Communication moduleCAN bus event-triggered processing

Practical note: IRQ tasks are rarely used in standard machine control. If you find IRQ tasks configured on an undocumented CP1584, they’re likely handling high-speed measurement or encoder capture. The exception codes 170 (CAN I/O) and 128 (I/O Exception) are most relevant for IRQ-related diagnostics.

High-Speed Task Classes (HSTC)

High-speed task classes are activated by hardware interrupts rather than by the system scheduler. This provides lower latency and jitter than normal cyclic tasks.

Types of High-Speed Task Classes

TypeTriggerUse Case
Timer HSTCHardware timer interruptUltra-fast cyclic processing below normal TC limits
RIO HSTCRemote I/O cycle completion interruptImmediate access to fresh remote I/O data
MP HSTCMP_trigger() function callMulti-processor synchronization (legacy)

Timer HSTC

Timer HSTCs use a dedicated hardware timer to trigger execution. The cycle time is configurable in Automation Studio and independent of the system scheduler. All tasks assigned to a Timer HSTC execute exactly once per cycle.

RIO HSTC

Remote I/O HSTCs are triggered by an interrupt generated at the end of each remote I/O cycle. The configured cycle time is the minimum — if the RIO cycle takes longer, the HSTC starts later accordingly.

Practical note for CP1584: The CP1584 supports Timer HSTCs and RIO HSTCs. The minimum Timer HSTC cycle time is lower than the minimum Cyclic #1 time (400 us). HSTCs are typically used only in specialized motion control or high-speed measurement applications.

Startup Behavior

Boot Sequence and Task Initialization

When the CP1584 powers on:

  1. BIOS/Bootloader executes (VxLD loader) — hardware init, memory test
  2. Automation Runtime kernel loads — VxWorks starts, drivers initialize
  3. System configuration is read from CF card — hardware config, network config
  4. INIT phase — all task classes execute their initialization subroutines once
  5. TRANSITION to RUN — I/O modules initialize, POWERLINK starts
  6. Normal cyclic execution begins — task classes cycle per their configuration

Task Structure: Init vs Cyclic

Every task in a task class has two parts:

PartExecutionPurpose
Initialization subroutineExecuted once during INIT phaseSet initial values, one-time setup, calibration
Cyclic partExecuted every cycleMain control logic, I/O processing

In Automation Studio, the initialization part is accessed via View → Init Subroutine.

Startup Modes

ModeBehaviorOutputs
Cold startAll variables initialized to default/initial valuesZeroed
Warm startRetentive variables preserved, non-retentive re-initializedZeroed
INIT startRuns initialization subroutines, then transitions to cyclicZeroed until program sets them

The startup mode is configured in the CPU’s task configuration in Automation Studio. On an undocumented machine, the startup mode is unknown — you can determine it by observing whether retentive values survive a power cycle (warm start) or not (cold start). See retentive-data.md for details.

Task Configuration in Automation Studio

Without access to the original project, you cannot change task class configuration. However, understanding what’s configurable helps with diagnostics:

Configurable Parameters Per Task Class

ParameterDescriptionDefault (Typical)
Cycle timeTime between executions10 ms (TC#1), 20 ms (TC#2)
ToleranceAllowed overrun before exceptionSame as cycle time
Jitter toleranceAllowed deviation from exact timingConfigurable
Idle timeReserved time for system tasks0 µs (explicit)
Exception handlingAction on cycle time violationEmergency stop
I/O synchronizationWhether to sync I/O with this taskConfigurable
Core assignment (multicore)Which CPU core runs this taskCore 0

Creating a Task Class

In Automation Studio:

  1. Right-click CPU → Insert Object → Cyclic
  2. Set name, programming language, priority
  3. Configure cycle time, tolerance, jitter
  4. Assign programs to the task class
  5. Set exception handling behavior

Multicore Task Assignment

On multicore CPUs (CP3586, APC910, etc.), each task class can be assigned to a specific CPU core. The default configuration assigns all cyclic tasks to core 0. For the single-core CP1584, this is the only option.

AR 6.5 hard real-time multicore (released December 2025): Task classes can now be assigned to specific CPU cores via Automation Studio 6.5 — not just system tasks but hard real-time cyclic tasks. This enables deterministic parallel execution of time-critical logic (e.g., motion control on core 0, process logic on core 1). Configuration is available in the task class properties dialog in AS 6.5. AR 6.5 also adds hypervisor repair boot for resolving PCIe interrupt conflicts and extends ARsim to support 4 GB process memory.

See ar-rtos.md §3.6 for the full multicore version progression and firmware-version-mgmt.md §3.2 for AS 6.5 release details.

reACTION Technology

B&R’s reACTION technology provides microsecond-level I/O response by processing logic directly in the I/O module’s FPGA, bypassing the main CPU task cycle entirely.

How reACTION Works

  1. I/O module receives input change
  2. FPGA on the I/O module executes programmed logic immediately
  3. Output response in 1-10 µs (vs. 400 µs minimum on CPU)
  4. Results are also available to CPU tasks for monitoring/coordination

reACTION vs CPU Tasks

AspectreACTIONCPU Cyclic Task
Response time1-10 µs400 µs minimum
ProgrammingLadder Diagram onlyAll IEC 61131-3 languages
ComplexitySimple logic onlyFull programming capability
I/O accessLocal module onlyAll I/O in system
MonitoringLimited (via CPU exchange)Full (via variables, OPC-UA)

Practical Relevance

If an undocumented machine uses reACTION for safety-critical or high-speed responses, you won’t see this logic in the CPU’s cyclic tasks. reACTION programs are stored on the I/O modules themselves. The only way to discover them is through the CF card project files or by connecting with Automation Studio and browsing the hardware configuration.

Key Findings

  • B&R uses deterministic preemptive multitasking with 8 cyclic task classes, priority range 0–255 (higher = more important)
  • Cyclic tasks always preempt system tasks — this is by design but can cause system task starvation
  • Cycle time violations cause emergency stop by default — this is the #1 cause of SERVICE mode entries (~80%)
  • The Task Idle Time mechanism reserves CPU time for system tasks (Ethernet, OPC-UA, visualization, SDM) within a designated cyclic task class
  • SDM CPU usage is misleading — it counts TcIdleFiller no-ops as “usage,” making SERVICE mode appear loaded when it’s actually idle
  • The CP1584’s integrated I/O processor handles I/O scanning independently of cyclic task execution
  • I/O cycle synchronization is configurable per task class and critical for motion control applications

Advanced Diagnostics: Profiling Without the Full Project

Creating a Long Profiler

The Long Profiler is the primary tool for diagnosing cycle time violations and identifying which function blocks are consuming excessive time. It requires Automation Studio but does NOT require the project source code.

Prerequisites:

  • Automation Studio (any version that supports the AR version on the target)
  • Network connectivity to the CP1584
  • The PLC does NOT need to be in SERVICE mode — the profiler can run on a running system

Procedure:

  1. Open Automation Studio (no project needed)
  2. Open → Profiler (or Tools → Profiler in some AS versions)
  3. Connect to the PLC: Settings → Auto Search or enter IP manually
  4. Login to the target (may need online password — see access-recovery.md)
  5. Configure the profiler:
    • Recording time: At least 2× the cycle time of the SLOWEST task class (e.g., if TC#4 runs at 100 ms, record for at least 200 ms minimum)
    • For intermittent faults, use 10,000 ms (10 seconds) or longer
    • Set the number of samples high enough to capture the fault
  6. Start recording — let it run through multiple cycles
  7. Stop recording
  8. Analyze the results as a diagram (View → Diagram):
    • Each task class appears as a colored bar
    • Function blocks within each task class show as sub-bars with width proportional to execution time
    • Look for tasks that span nearly the entire cycle time (approaching the tolerance)
    • Look for spikes or occasional long executions that correlate with cycle time violations
  9. Export the profiler data (File → Export) for future reference

Reading the Diagram:

Time →

|---TC#1 (10ms)---|---TC#1 (10ms)---|---TC#1 (10ms)---|
| ProgA ████      | ProgA ████████  | ProgA ████      |  ← Normal
|                  | ProgA ██████████|                  |  ← VIOLATION: exceeded 10ms

|----TC#2 (20ms)--------|----TC#2 (20ms)--------|
| ProgB ████  ProgC ████| ProgB ████  ProgC █████████|  ← ProgC occasionally slow

|-------TC#3 (50ms)-----------------------|
| [2ms IDLE] ProgD ██ [2ms IDLE] ProgE ██ |  ← Idle time window visible
  • The yellow “Idle tasks” section in the profiler output shows TcIdleFiller time
  • The “unknown” cyclic task that sometimes appears in profiler output is caused by an Automation Studio version mismatch — the profiler cannot resolve symbols from a different AS version. This does NOT indicate a real problem.

Community-sourced tips (from B&R Community forum):

  • The profiler must include at least two (2×) executions of the slowest task class, or the data is insufficient
  • For intermittent faults that happen once per hour, consider recording continuously and saving profiler traces periodically
  • If the profiler shows nothing even though cycle time violations occur, check that the task class executing the long-running code is included in the profiler’s filter settings

Using the Profiler in SERVICE Mode

The profiler works even when the PLC is in SERVICE mode. However, since no cyclic tasks are running in SERVICE mode, the profiler will show only:

  • I/O system tasks
  • System tasks (networking, SDM, visualization)
  • TcIdleFiller no-ops

This is still useful for diagnosing whether a SERVICE mode issue is caused by system task overload (rare) vs. a cycle time violation that happened before SERVICE mode was entered (check the AR logbook).

Alternative Monitoring Without Automation Studio

When Automation Studio is not available, these methods provide cycle time monitoring:

PVI API Method

## Using PVI.py (see pvi-api.md for setup)
from pvi import *

pvi = PviConnection()
line = pvi.add_line('LN1', 'ANSL')
cpu = line.add_device('CP1', 'ANSL', '192.168.1.10')

## Read RTInfo system variables for each task class
## Task class cycle time variables are typically named:
##   gTaskClass[n].CycleTime
##   gTaskClass[n].MaxCycleTime
##   gTaskClass[n].TaskLoad
## Where n is the task class number (0-7)
for i in range(8):
    try:
        ct = cpu.read_variable(f'gTaskClass[{i}].CycleTime')
        mx = cpu.read_variable(f'gTaskClass[{i}].MaxCycleTime')
        ld = cpu.read_variable(f'gTaskClass[{i}].TaskLoad')
        print(f'TC#{i+1}: cycle={ct}ms, max={mx}ms, load={ld}%')
    except:
        break

OPC-UA Method

If OPC-UA is configured, browse the System namespace for task class nodes. Common node paths:

Root → Objects → System → TaskClasses → Cyclic#1 → CycleTime
                                               → MaxCycleTime
                                               → TaskLoad

Trend these values over time to detect gradual performance degradation.

SDM Web Interface Method

The SDM at http://<PLC_IP>/sdm shows:

  • CPU usage percentage (with TcIdleFiller caveat noted above)
  • Task monitor tab showing basic task class status
  • This is the lowest-resolution method but requires zero setup

Automation Runtime 4 vs. 6: Execution Model Changes

If you are upgrading a CP1584 system from AR 4.x to AR 6.x, or migrating to newer hardware (CP1684, CP3686), these execution model changes are relevant:

AspectAR 4.x (CP1584 typical)AR 6.x (newer hardware)
Task classesUp to 8 cyclicUp to 8 cyclic (same)
Priority range0–2550–255 (same)
TcIdleFiller behaviorActive as describedSame behavior, better visibility in profiler
SDM CPU usageMisleading due to TcIdleFillerImproved accuracy in some AR 6 versions
Min cycle time400 µs (CP1584)100 µs (CP3686 with faster CPU)
MulticoreSingle-core onlyMulti-core task assignment available
System tasksSame priority tiersMore background tasks (mapp components, OPC-UA security)
PROFINET/ EtherCATNot available on CP1584Available on newer CPUs

Key migration note: An AS 4.x project targeting AR 4.x cannot be downloaded to an AR 6.x target. The project must be migrated using Automation Studio 6’s built-in migration tool. B&R provides open-source migration scripts at github.com/br-automation-community/as6-migration-tools that detect deprecated libraries, function blocks, and configuration incompatibilities. The community awesome-B-R repository catalogs all available migration resources.

Practical impact for execution model: When migrating, cycle times must be re-evaluated because:

  • AR 6.x has more system tasks running (mapp components, enhanced OPC-UA, security layers)
  • The Task Idle Time may need to be increased to accommodate the additional background load
  • If moving to multi-core hardware, task core assignment should be optimized (motion on one core, logic on another)

Detailed Exception Code Reference

The exception codes below are logged in the AR logbook and can be retrieved via FTP from C:\arlogsys.log, SDM, or OPC-UA. These are distinct from ACOPOS drive fault codes (see acopos-drives.md for those).

CPU/OS Exceptions (Hardware-Level)

Exception #DescriptionCommon CauseSeverity
2Bus errorMemory bus fault, DMA failure, bad RAMFatal → SERVICE
3Address errorUnaligned memory access, pointer arithmetic bugFatal → SERVICE
4Illegal instructionCorrupted code, wrong CPU target compiledFatal → SERVICE
5Division by zeroMissing zero-check before divisionFatal → SERVICE
6Range overflowArray index out of bounds, math overflowFatal → SERVICE
7Null pointer dereferenceNULL pointer access in IEC code or CFatal → SERVICE
8Privilege violationAccessing protected memory regionFatal → SERVICE
10Unimplemented instructionCode compiled for wrong CPU architectureFatal → SERVICE
24Spurious interruptInterrupt with no registered handlerLogged, may continue
25314Page fault (EXCEPTION)Invalid memory access (NULL dereference, corrupted pointer, shifted memory from online change)Common intermittent fault — Fatal → SERVICE

Interpreting Exception 25314 (Page Fault)

Exception 25314 is the most common cause of intermittent SERVICE mode entries (as opposed to the consistent Exception 144 cycle time violations). It indicates the CPU tried to access a memory page that is not mapped or protected.

Common causes on undocumented machines:

  1. Online code changes — When code is downloaded to a running PLC, memory addresses may shift. Pointer-based code (C programs, addresses of global variables) can become invalid. This is documented as “the primary risk of online code changes.”
  2. Corrupted retentive data — If the battery died and retentive data was partially corrupted, reading invalid pointers from retentive memory causes page faults on warm start.
  3. String buffer overflows — IEC 61131-3 STRING operations writing beyond buffer bounds.
  4. Array index out of bounds — Accessing an array element beyond the allocated memory, triggering a page fault at the unmapped page boundary.
  5. mapp component memory corruption — If a mapp component (OPC-UA, mapp View) has a bug, it may write to an invalid address.

Diagnostic approach:

  1. Check the AR logbook for the exact exception address — the faulting memory address is logged
  2. If the address is near zero (0x00000000-0x00001000), it’s a NULL pointer dereference
  3. If the address is in a specific range, it may indicate which library or variable is at fault
  4. The exception log includes the task class where the fault occurred
  5. If the fault is intermittent and correlates with online changes, the code was likely not properly designed for online modification

Community reference: B&R Community thread “Intermittent EXCEPTION Page Fault during startup – mvLoader mvrpctxtfmt threads” documents page faults occurring during PLC startup related to the mvLoader and mvrpctxtfmt threads, which handle module loading and format parsing. If you see these thread names in the exception log, the fault may be caused by a corrupted module on the CF card or an incompatible firmware/library combination.

Task Class Exceptions (Execution-Level)

Exception #DescriptionCommon CauseSeverity
128I/O ExceptionIO module failure, X2X/POWERLINK bus errorFatal → SERVICE
144TC cycle time violationNormal cyclic task exceeded its configured cycle time#1 most common — Fatal → SERVICE
145TC maximum cycle time violationPeak/max cycle time exceeded toleranceFatal → SERVICE
146TC Input cycle time violationInput processing phase exceeded limitFatal → SERVICE
147TC Output cycle time violationOutput processing phase exceeded limitFatal → SERVICE
160HSTC maximum cycle time violationHigh-speed task exceeded max cycleFatal → SERVICE
170CAN I/O exceptionCAN bus communication failureLogged

Interpreting Exception 144 (Cycle Time Violation)

This is the most frequently encountered exception on B&R systems:

  1. Check the AR logbook for the task class number and timestamp
  2. The log entry will include the task class ID and the cycle time that was exceeded
  3. Compare the exceeded time against the configured cycle time:
    • If exceeded by 10-50%: Likely a code path that occasionally takes longer (e.g., conditional logic with extra computation)
    • If exceeded by 2-10x: Likely an infinite loop or blocking operation
    • If exceeded by 100x+: Likely a page fault or hardware fault
  4. Use the Long Profiler to identify the specific function block causing the overrun
  5. If you cannot use Automation Studio, check if the violation correlates with a specific I/O event (via OPC-UA trending of task cycle times)

Critical Section Exceptions

AR 6.x introduced enhanced exception codes for critical section violations:

ExceptionDescription
CS timeoutCritical section wait time exceeded — possible deadlock
CS priority inversionLow-priority task holding a lock needed by high-priority task
CS re-entryRe-entering a critical section that is already held (recursive lock attempt)

These indicate synchronization bugs in the application code. On an undocumented system with no source, these are extremely difficult to fix — the only practical solution is to identify the conditions that trigger them and avoid those operating conditions.


Cross-References

Related FileRelevance
ar-rtos.mdAR RTOS internals — task scheduler, process model, interrupt handling
system-variables.mdSystem variables for monitoring task cycle times, CPU load, and watchdog status
diagnostics-sdm.mdSDM Task Monitor for real-time cycle time observation without Automation Studio
firmware.mdAR firmware architecture and how the execution model is loaded at boot
memory-map.mdCPU memory map for understanding IO data access within task contexts
online-changes.mdHow online code changes affect running tasks and cycle time behavior
safe-io-diagnostics.mdSafety task execution requirements and SIL-rated cycle time constraints
ebpf-telemetry.mdPerformance profiling and task execution monitoring techniques
alarm-logging.mdException and watchdog event logging for cycle time violations
cp1584-hardware-ref.mdCP1584 hardware specs affecting task execution (cycle time limits, FPU)
custom-diagnostic-tools.mdBuilding custom cycle time monitoring tools on the PLC itself
access-recovery.mdbrwatch for no-project variable monitoring and CPU reboot
python-diagnostics.mdPython scripts for automated cycle time logging and alerting
troubleshooting-index.mdScenario-based troubleshooting for cycle time violations (Exception 144)

B&R OPC-UA Integration: Server Configuration, Address Mapping, Security, and Certificate Management

Overview

B&R Automation Runtime includes a built-in OPC-UA server that exposes PLC process variables to any OPC-UA compliant client. This is one of the most important diagnostic access points when working with undocumented B&R machines — OPC-UA allows reading and writing variables without needing the original Automation Studio project. This document covers how the OPC-UA server is configured, how address mapping works, namespace organization, security models, certificate management, and how to use OPC-UA for diagnostics on machines with no OEM documentation.

Architecture

The B&R OPC-UA server runs as a system task within Automation Runtime (priority 4–190 tier). It is integrated into the CPU firmware and requires no additional hardware. Key characteristics:

  • Default port: 4840 (standard OPC-UA port, configurable)
  • Runs on: Ethernet interface (IF2) — NOT on the POWERLINK interface (IF3)
  • Configuration file: OpcUa.Config.xml on the CF card
  • Address configuration: Under ServerConfiguration → BaseAddresses in the config file
  • Part of: mapp Technology framework (specifically mapp OPC-UA component)

Enabling the OPC-UA Server

Via Automation Studio (Normal Method)

  1. Open the project in Automation Studio
  2. Go to Physical View
  3. Right-click on the CPU (e.g., X20CP1584) → Configuration
  4. Expand OPC-UA System
  5. Set “Activate OPC-UA System” to On
  6. Configure server settings (port, endpoint, security policy)
  7. Add an OPC-UA Default View from the Toolbox to the Configuration View
  8. Enable specific variables as OPC-UA tags (right-click → Enable Tag)
  9. Set user role access rights for each tag (read, write, browse)
  10. Build & Transfer to the PLC

Critical: Variables Are NOT Automatically Exposed

Enabling the OPC-UA server does NOT automatically expose all process variables. Each variable must be explicitly enabled as an OPC-UA tag. This means:

  • Grayed-out variables in the Default View = NOT accessible via OPC-UA
  • Black/active variables = enabled and accessible
  • The OEM had to deliberately enable each variable for external access

This is a major consideration for undocumented machines — if the OEM didn’t enable OPC-UA tags, you cannot access them via OPC-UA regardless of whether the server is running.

Without Automation Studio

If you have no project but the OPC-UA server is running:

  1. Scan for the server using UaExpert or any OPC-UA discovery client
  2. Browse the namespace to see what variables are exposed
  3. Read/write through the client

Namespace and Address Structure

B&R OPC-UA Namespace Layout

When connected to a B&R OPC-UA server, the namespace follows this structure:

Objects
└── PLC
    ├── Modules
    │   ├── Default
    │   │   ├── <TaskName1>        (e.g., "Cyclic#1", "HMI_Inputs")
    │   │   │   ├── Variable1
    │   │   │   ├── Variable2
    │   │   │   └── StructName
    │   │   │       ├── Member1
    │   │   │       └── Member2
    │   │   └── <TaskName2>
    │   │       └── ...
    │   └── (additional modules)
    ├── System
    │   └── (system diagnostics, status)
    └── Server
        └── (server configuration, status)

Node IDs

B&R OPC-UA Node IDs typically follow the format:

  • ns=2;s=PLC.Modules.Default.<TaskName>.<VariableName> (string-based)
  • Numeric namespace indices: ns=0 (OPC-UA standard), ns=1 (B&R system), ns=2+ (user application)

Variables are organized by the task class they belong to. Only variables within tasks that have been configured in the OPC-UA Default View are visible.

Custom Namespaces

You can create custom namespaces using a nodeset file (.xml), which provides more flexibility. A nodeset file can:

  • Link OPC-UA nodes to specific PLC variables
  • Create custom data types and structures
  • Organize variables into logical groups (e.g., “Machine1”, “Conveyor”, “Press”)
  • Add metadata (engineering units, descriptions, limits)

Security Model

Authentication Methods

MethodDescriptionDefault Availability
AnonymousNo authentication requiredEnabled by default (role “Everyone”)
Username/PasswordB&R user managementConfigurable
Certificate-basedX.509 certificate validationConfigurable

Important: If the “Anonymous” user is deleted from the user-role system, OPC-UA clients cannot connect without credentials. This is a common issue when OEMs tighten security.

User Roles and Access Rights

B&R implements OPC-UA role-based access control:

  • Everyone — default role, typically browse + read
  • Operator — read + limited write
  • Engineer/Admin — full read/write access
  • Custom roles — can be defined per installation

Each OPC-UA tag can have individual access rights configured:

  • Visible — appears in browse
  • Browse — node info can be read
  • Read — current value can be read
  • Write — value can be modified
  • History — historical data can be accessed

Security Policies

B&R OPC-UA supports the standard OPC-UA security policies:

  • None — no encryption, no signing (common on legacy machines)
  • Basic128Rsa15 — basic encryption
  • Basic256 — stronger encryption
  • Basic256Sha256 — strongest commonly available

Certificate Management

Certificate Location

Certificates are stored on the CF card in the certificate store:

  • Path: Accessible via Automation Studio → Configuration → Access and Security → Certificate Store
  • Own certificates — the PLC’s server certificate
  • Communication partner certificates — trusted client certificates
  • CA certificates — certificate authority chains

Managed Certificate Store (AR 6.5+)

Starting with AR 6.5, B&R introduced the ManagedCertificateStore with the ArMcsRecreateCert function block for programmatic certificate recreation. In AR 6.5, the ManagedCertificateStore is extended to cover ANSL, FTP, HTTP, and SMTP libraries (not just OPC-UA). Additionally, the ArCert library now supports creating, exporting, viewing, and deleting certificate signing requests (CSRs), and the AsHttp httpsClient supports Server Name Indication (SNI). These features are not available on AR 4.x (CP1584 maximum), but are relevant for migration planning to newer B&R hardware.

Creating and Managing Certificates

  1. In Automation Studio: Configuration → Access & Security → Certificate Store → Own certificates
  2. Double-click New OPC UA certificate
  3. Configure: subject, validity, key size
  4. Transfer to PLC

Certificate-Only Access

For secure installations, certificate-based access can be configured:

  1. Create SSL configuration referencing the certificate
  2. Apply to OPC-UA server
  3. Add trusted client certificates to the communication partner store
  4. Disable anonymous access

Replacing Certificates Without Automation Studio

If you need to change certificates on a running PLC without the project:

  1. Access the CF card via FTP (user partition)
  2. The certificate store is typically at F:\System\Certificates\ or similar
  3. Replace the server certificate file
  4. Cold restart the PLC to apply

Caution: Incorrect certificate replacement can lock you out of OPC-UA entirely.

Certificate Management Deep Dive

Certificate Creation Step-by-Step

When creating an OPC-UA certificate for a B&R PLC, the subject fields must be configured correctly for the PLC to accept and serve the certificate properly.

Recommended subject fields:

FieldValueExample
CN (Common Name)PLC hostname or descriptive nameBR-PLC-001 or Line3-Controller
O (Organization)Company or plant nameACME Manufacturing
L (Locality)City or site locationDetroit
S (State)State or provinceMichigan
C (Country)Two-letter country codeUS

Key size: Minimum 2048-bit RSA. 4096-bit is supported on newer firmware but increases handshake latency.

Validity period: Typical production use is 1-3 years. Longer periods reduce renewal overhead but weaken the security boundary if the private key is compromised.

Certificate Renewal Workflow

  1. Generate a new certificate with the same subject fields and new validity period
  2. Replace the server certificate on the CF card (System/Certificates/Own/)
  3. Warm restart — the OPC-UA server reloads the certificate
  4. All connected clients receive BadCertificateUntrusted and must re-accept the new certificate
  5. Update any client certificate stores that pinned the old certificate

SHA1 Deprecation Issue

Older Automation Studio versions generated OPC-UA certificates using SHA1 signatures. Modern clients (UaExpert 1.5+, .NET OPC-UA stack, Python asyncua) reject SHA1 at the security layer.

Symptoms: BadCertificateUntrusted on any sign/encrypt policy; works with security None. Verify: openssl x509 -in cert.der -inform DER -text -noout | grep "Signature Algorithm".

Resolution: Regenerate the certificate with SHA256 via Automation Studio → Certificate Store. Ensure mapp version is 5.x+ (SHA256 native support). On firmware older than AR 4.30, use security None as a workaround.

Self-Signed vs CA-Signed Certificates

AspectSelf-SignedCA-Signed
Trust modelManual trust per clientChain trust via CA root
DeploymentSimple, no external dependencyRequires CA infrastructure
RevocationNot possibleCRL/OCSP supported
ScalabilityPoor for many devicesGood for fleet management
Recommended forSingle-machine setups, developmentProduction lines, multi-PLC systems

For production environments with multiple PLCs, use an internal CA (e.g., Smallstep CA, HashiCorp Vault PKI, or B&R’s own Automation Studio CA feature). This eliminates the need to manually trust each PLC’s certificate on every client.

Certificate Trust Chain Management

The B&R certificate store on the CF card maintains three categories under System/Certificates/:

  • Own/ — server certificate + private key (DER format)
  • Trusted/ — accepted client certificates from connecting clients
  • CA/ — CA root and intermediate certificates

Trust validation order: check Trusted/ folder for direct match, then check CA/ for chain validation (intermediate to root), then verify validity period.

Adding a trusted CA: Export CA root cert in DER format, upload to System/Certificates/CA/ via FTP, warm restart. All certificates signed by that CA are automatically trusted.

SSL Configuration in Automation Studio

To bind a certificate to the OPC-UA server in Automation Studio:

  1. Configuration → Access & Security → SSL Configuration — create a new SSL Configuration object
  2. Set the Certificate Reference to the OPC-UA certificate in the Certificate Store
  3. Under OPC-UA System → Server Configuration, set the SSL Configuration reference
  4. Build and transfer

The SSL Configuration also controls TLS versions (TLS 1.2 minimum recommended), cipher suites, and whether the server requests client certificates.

mappView OPC-UA Client Certificate Configuration

When mappView acts as an OPC-UA client (connecting to another PLC or external server), it needs its own client certificate:

  1. In the mappView configuration, open mapp OPC-UA Client
  2. Set the Certificate reference to a client certificate from the Certificate Store
  3. The target server must trust this certificate (either directly or via CA chain)
  4. Configure the security policy to match what the server offers

Failure to configure the client certificate results in BadSecurityChecksFailed on the server side.

Certificate Backup and Restore Procedure

Backup: FTP to PLC, download the entire System/Certificates/ directory. Optionally convert to PEM: openssl x509 -in cert.der -inform DER -out cert.pem -outform PEM

Restore: Upload backup System/Certificates/ via FTP, cold restart to reload. Verify by connecting with UaExpert and checking the server certificate fingerprint. Always back up before firmware upgrades — upgrades may invalidate certificate bindings.

Connecting with OPC-UA Clients

Using UaExpert (Free OPC-UA Client)

  1. Install UaExpert (Unified Automation)
  2. Server → Add
  3. Enter the PLC IP address
  4. The Discovery URL will be: opc.tcp://<PLC_IP>:4840
  5. Click Connect
  6. A certificate approval dialog appears — check “Trust Server Certificate”
  7. Browse: Objects → PLC → Modules → Default to find variables
  8. Set Authentication to Anonymous if no credentials configured

Python Client (asyncua)

import asyncio
from asyncua import Client

async def read_br_variables():
    url = "opc.tcp://192.168.1.100:4840"
    async with Client(url=url) as client:
        # Browse available variables
        root = client.nodes.root
        objects = await root.get_child(["Objects", "PLC", "Modules", "Default"])
        children = await objects.get_children()
        for child in children:
            name = await child.get_browse_name()
            value = await child.get_value()
            print(f"{name}: {value}")

        # Read a specific variable by node ID
        var = client.get_node("ns=2;s=PLC.Modules.Default.Cyclic#1.MyVariable")
        value = await var.get_value()
        print(f"MyVariable = {value}")

        # Write a variable
        await var.write_value(42.0)

asyncio.run(read_br_variables())

Node-RED Integration

Use the OPCUA-IIoT node in Node-RED:

  1. Configure OPC-UA server endpoint: opc.tcp://<PLC_IP>:4840
  2. Security mode: None (for legacy machines)
  3. Browse to find variable node IDs
  4. Use Read/Write nodes for data exchange

Practical Client Examples

Python Subscription Example (asyncua)

Subscriptions are preferred over polled reads — the server pushes updates only when values change.

import asyncio
from asyncua import Client, ua

url = "opc.tcp://192.168.1.100:4840"

async def data_change_callback(node, val, data):
    name = await node.get_browse_name()
    print(f"[CHANGE] {name.Name} = {val}")

async def subscription_example():
    async with Client(url=url) as client:
        sub = await client.create_subscription(500, data_change_callback)

        nodes = [
            "ns=2;s=PLC.Modules.Default.Cyclic#1.Temperature",
            "ns=2;s=PLC.Modules.Default.Cyclic#1.Pressure",
            "ns=2;s=PLC.Modules.Default.Cyclic#1.Status",
        ]
        for nid in nodes:
            node = client.get_node(nid)
            params = ua.MonitoringParameters(
                ClientHandle=len(sub.monitored_items),
                SamplingInterval=250,
                QueueSize=10,
                DiscardOldest=True
            )
            await sub.subscribe_data_change(node, params)

        print("Subscribed. Press Ctrl+C to exit.")
        try:
            while True:
                await asyncio.sleep(1)
        except KeyboardInterrupt:
            await sub.delete()

asyncio.run(subscription_example())

Python Write Example — B&R Gotcha

When writing to B&R OPC-UA variables, write_value() works for scalars. For complex structures with engineering unit scaling, you may need write_params or write individual members.

import asyncio
from asyncua import Client, ua

url = "opc.tcp://192.168.1.100:4840"

async def write_example():
    async with Client(url=url) as client:
        scalar = client.get_node("ns=2;s=PLC.Modules.Default.Cyclic#1.Setpoint")
        await scalar.write_value(75.5)
        print("Setpoint written: 75.5")

        struct_node = client.get_node("ns=2;s=PLC.Modules.Default.Cyclic#1.RecipeData")
        variant = ua.Variant(
            {"Param1": 100, "Param2": 3.14, "Enable": True},
            ua.VariantType.ExtensionObject
        )
        try:
            await struct_node.write_value(variant)
        except ua.UaError:
            print("Structure write failed — writing individual members:")
            await client.get_node(
                "ns=2;s=PLC.Modules.Default.Cyclic#1.RecipeData.Param1"
            ).write_value(100)
            await client.get_node(
                "ns=2;s=PLC.Modules.Default.Cyclic#1.RecipeData.Param2"
            ).write_value(3.14)
            await client.get_node(
                "ns=2;s=PLC.Modules.Default.Cyclic#1.RecipeData.Enable"
            ).write_value(True)

asyncio.run(write_example())

UaExpert Workflow for Undocumented PLCs

  1. Launch UaExpert, add server: Server → Add → enter PLC IP
  2. Discovery: UaExpert queries opc.tcp://<IP>:4840. If discovery fails, manually enter the endpoint URL
  3. Certificate dialog: Check “Trust server certificate” on first connect
  4. Authentication: Start with Anonymous. If rejected, try common B&R credentials (admin/admin, operator/operator)
  5. Browse: Expand Objects → PLC → Modules → Default. Subfolders = task classes, contents = PLC variables
  6. Export: Right-click “Default” → Create Address Space Snapshot → saves CSV of all nodes
  7. Test: Drag a variable to Data Access View. Double-click value to attempt write
  8. System nodes: Objects → PLC → System shows CPU utilization, memory, task cycle times

Wireshark OPC-UA Capture and Decode

  1. Start Wireshark, set capture filter: port 4840
  2. Connect with the OPC-UA client, then stop capture
  3. Install the OPC-UA dissector (Edit → Preferences → Protocols → OPC UA) if not present
  4. For encrypted traffic, set security to None for debugging — Wireshark cannot decrypt without session keys
  5. Key frames to inspect: Hello/ACK (TCP+OPC-UA handshake), CreateSession, Browse/Read/Write (node IDs visible in plaintext with security None), PublishResponse (subscription data)

C#/.NET OPC-UA Client Example

using Opc.Ua;
using Opc.Ua.Client;

var endpointUrl = "opc.tcp://192.168.1.100:4840";

var config = new ApplicationConfiguration()
{
    ApplicationName = "B&R OPC-UA Client",
    ApplicationUri = new Uri("urn:BROpcUaClient"),
    ApplicationType = ApplicationType.Client,
    SecurityConfiguration = new SecurityConfiguration
    {
        AutoAcceptUntrustedCertificates = true,
        MinimumCertificateKeySize = 1024
    }
};

config.CertificateValidator.CertificateValidation += (s, e) =>
{
    if (e.Error.StatusCode == StatusCodes.BadCertificateUntrusted)
        e.Accept = true;
};

var endpoint = CoreClientUtils.SelectEndpoint(endpointUrl, useSecurity: false);
using var session = Session.Create(config, endpoint, updateBeforeConnect: true,
    "BROpcUaClient", 60000, null, null).Result;

var readNode = new NodeId("PLC.Modules.Default.Cyclic#1.Temperature", 2);
Console.WriteLine($"Temperature: {session.ReadValue(readNode).Value}");

session.WriteValue(
    new NodeId("PLC.Modules.Default.Cyclic#1.Setpoint", 2),
    new DataValue(72.5));

var subscription = new Subscription(session.DefaultSubscription)
{
    PublishingInterval = 500, PublishingEnabled = true,
    LifetimeCount = 1000, KeepAliveCount = 10
};
session.AddSubscription(subscription);

var item = new MonitoredItem(subscription.DefaultItem)
{
    DisplayName = "Pressure",
    StartNodeId = new NodeId("PLC.Modules.Default.Cyclic#1.Pressure", 2),
    SamplingInterval = 250, QueueSize = 10, DiscardOldest = true
};
item.Notification += (_, e) =>
{
    foreach (var c in e.NotificationList)
        Console.WriteLine($"Pressure: {c.Value}");
};
subscription.AddItem(item);
subscription.Create();
Console.WriteLine("Subscribed. Press Enter to exit.");
Console.ReadLine();
session.Close();

Package: OPCFoundation.NetStandard.Opc.Ua (NuGet). Requires .NET Standard 2.0+ or .NET 6+.

Finding an Unknown OPC-UA Server

For machines with no documentation:

Step 1: Find the PLC IP Address

  • Check the SDM (System Diagnostics Manager): http://<IP>/sdm
  • Use Wireshark to capture B&R ANSL discovery packets
  • Check network switch/router ARP table for B&R MAC OUI prefixes
  • Try common B&R default IP ranges (192.168.100.x, 192.168.1.x)

Step 2: Check if OPC-UA is Active

## Scan for OPC-UA port 4840
nmap -p 4840 <PLC_IP>

## Or try connecting with openssl
openssl s_client -connect <PLC_IP>:4840

Step 3: Determine the OPC-UA Configuration

You cannot determine the OPC-UA configuration from the PLC alone without:

  • The original project
  • A system dump analyzed in Automation Studio
  • The ability to browse the server

Key unknowns:

  • Is OPC-UA activated at all?
  • What port is it on? (default 4840, but configurable)
  • What variables are enabled?
  • What authentication is required?
  • What encryption policy is used?

Step 4: Try Connection

Use UaExpert to attempt connection at the default port. If anonymous access is enabled and variables were configured, you’ll see them in the namespace. If not, you need to explore alternative access methods (PVI, FTP, direct I/O monitoring).

Performance Considerations

  • OPC-UA runs as a system task (lower priority than cyclic tasks)
  • Sampling interval is typically 100 ms minimum for standard OPC-UA subscriptions
  • If the task idle time is too low, OPC-UA responses will time out
  • The OPC-UA server can be a significant CPU load if many subscriptions are active
  • For high-speed data collection, POWERLINK or direct I/O access is faster

Configuration File Deep Dive

OpcUa.Config.xml Structure

The OPC-UA server behavior is controlled by OpcUa.Config.xml on the CF card, generated by Automation Studio but editable via FTP.

OpcUa.Config.xml
├── ServerConfiguration
│   ├── ApplicationUri / ApplicationName / ProductUri / ServerName
│   ├── BaseAddresses (list of endpoint URLs)
│   ├── SecurityPolicies (uri + certificate per policy)
│   ├── MaxSessions / MaxSubscriptionsPerSession
│   ├── MaxMonitoredItemsPerSubscription
│   ├── RequestTimeout / ServiceLevel / AuditingEnabled
│   └── MaxResponseMessageSize
├── EndpointConfiguration
│   ├── TransportProfileUri / SecurityMode
│   ├── SecurityPolicyUri / SecurityLevel
├── UserTokenPolicies (anonymous, username, certificate)
├── CertificateConfiguration
│   ├── CertificateStorePath / IssuedCertificatesPath
│   └── TrustedCertificatesPath
└── NodeManager → BaseAddress

Editing the Config File via FTP

When you have no Automation Studio project and need to modify OPC-UA server settings:

  1. Connect to the PLC via FTP (default credentials: user/user or admin/admin depending on configuration)
  2. Navigate to the user partition (typically F:\ or the volume labeled “User”)
  3. Locate OpcUa.Config.xml — it may be at the root or under a project-specific directory
  4. Download the file to your local machine
  5. Edit with a text editor (XML-aware editor recommended — notepad++ with XML plugin, VS Code)
  6. Backup the original file first (OpcUa.Config.xml.bak)
  7. Upload the modified file
  8. Perform a warm restart of the PLC to reload the configuration

Caution: Invalid XML will prevent the OPC-UA server from starting. Validate the XML before uploading. The server does not provide detailed parse error logs — it simply fails to start.

Key Configuration Parameters

ParameterDefaultDescription
MaxSessions100Maximum concurrent OPC-UA sessions (client connections)
MaxSubscriptionsPerSession100Maximum subscriptions per session
MaxMonitoredItemsPerSubscription1000Maximum monitored items (variables) per subscription
MaxBrowseContinuationPoints50Parallel browse operations
MaxHistoryContinuationPoints50Parallel history read operations
RequestTimeout10000 msServer-side request timeout
ServiceLevel100-255Server service level (100 = minimum)
MaxResponseMessageSize0 (unlimited)Maximum response message size in bytes

Endpoint Configuration

Endpoints define how clients connect. Each endpoint specifies:

  • Transport Profile URI: opc.tcp for binary TCP transport (standard), http for SOAP/HTTP (legacy, rarely used)
  • Security Mode: None, Sign, SignAndEncrypt
  • Security Policy URI: Maps to the actual encryption algorithm:
    • http://opcfoundation.org/UA/SecurityPolicy#None
    • http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15
    • http://opcfoundation.org/UA/SecurityPolicy#Basic256
    • http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256

Changing the OPC-UA Port Without Automation Studio

  1. FTP to the PLC, download OpcUa.Config.xml
  2. Locate <BaseAddresses> and change the port in the endpoint URI:
    <BaseAddresses>
      <EndpointUri>opc.tcp://192.168.1.100:4841</EndpointUri>
    </BaseAddresses>
    
  3. Backup the original, upload the modified file, warm restart
  4. After changing the port, clients must use the new endpoint URL directly — auto-discovery will not find the server at the old port

Namespace and Variable Discovery Without Project

Recursive Python Namespace Browser

When working with an undocumented B&R PLC, the first task is discovering what variables are exposed. This script recursively browses the entire OPC-UA namespace and prints a tree of all nodes with their data types and current values.

import asyncio
from asyncua import Client

url = "opc.tcp://192.168.1.100:4840"

async def browse_recursive(client, node, indent=0):
    name = await node.get_browse_name()
    node_class = await node.read_node_class()
    display_name = await node.get_display_name()

    prefix = "  " * indent
    info = f"{prefix}[{node_class.name}] {display_name.Text}"

    try:
        value = await node.get_value()
        data_type = await node.read_data_type()
        info += f" = {value} ({data_type.Identifier})"
    except Exception:
        pass

    try:
        desc = await node.read_description()
        if desc and desc.Text:
            info += f"  -- {desc.Text}"
    except Exception:
        pass

    print(info)

    try:
        children = await node.get_children()
        for child in children:
            await browse_recursive(client, child, indent + 1)
    except Exception:
        pass

async def discover_namespace():
    async with Client(url=url) as client:
        print(f"=== OPC-UA Namespace Discovery: {url} ===")
        root = client.nodes.root
        objects = client.nodes.objects
        await browse_recursive(client, objects, indent=0)

asyncio.run(discover_namespace())

Usage notes:

  • On large namespaces, this can take several minutes — the B&R OPC-UA server has a default browse limit and may require continuation point handling
  • Redirect output to a file: python discover.py > namespace_dump.txt
  • The output can be cross-referenced with any partial documentation or PLC I/O lists

Mapping Discovered Variables to IO Points

After discovering the namespace, map variables back to physical I/O:

  • Task class names in OPC-UA correspond to Automation Studio task classes: Cyclic#1/Cyclic#2 (I/O processing), HMI_Inputs/HMI_Outputs (HMI interface), Alarm/Recipe/DataLogger (mapp components), IO_.../DI_.../DO_.../AI_.../AO_... (digital/analog I/O)
  • Variable naming patterns: gMachine_State (global state), stAxis_<Name> (axis structure), rSensor_<Location> (sensor reading), bSwitch_<Function> (boolean input)
  • Struct members map directly to Automation Studio variable names (bEnable, rActualValue, rSetpoint)

Reconstructing IO Mapping via OPC-UA Browse

For a completely undocumented machine:

  1. Start with System node: CPU diagnostics, firmware version, task cycle times
  2. Browse Modules → Default → <task classes>: application variables by task
  3. Look for variables with engineering units metadata — often correspond to physical sensors
  4. Look for structures named after hardware: Axis_Drive1, IoModule_Terminal1
  5. Compare with physical I/O module count on the hardware to validate coverage

Limitations: What You Cannot Discover via OPC-UA

  • Internal program logic: You cannot see ladder logic, ST code, or function block implementations
  • Communication parameters: POWERLINK node assignments, MODBUS register mappings, or serial port configurations are not exposed
  • Disabled variables: Any variable the OEM did not explicitly enable as an OPC-UA tag is invisible
  • Array dimensions: B&R OPC-UA may expose arrays but with limited dimension metadata
  • User-defined types: Complex user-defined data types may appear as generic structures without meaningful member descriptions
  • Timing information: Task cycle times are visible, but internal timing (delays, timer configurations) is not
  • Hardware configuration: The physical I/O topology (which terminal is in which slot) is not directly exposed — only the logical variable names
  • Alarm/event history: Unless mapp AlarmX was configured to publish through OPC-UA, alarm data is not available via standard variable browsing

OPC-UA Troubleshooting

Common Connection Failures

SymptomLikely CauseResolution
Connection refused (TCP RST)OPC-UA server not runningCheck if OPC-UA is activated in the PLC configuration. Warm restart. Verify port via nmap
Connection timeoutNetwork firewall blocking port 4840Check firewall rules. Open TCP 4840 inbound on the PLC network segment
Certificate rejectionServer cert untrusted by clientTrust the server certificate in the client. In UaExpert: check “Trust Server Certificate” on first connect
BadCertificateUntrustedSHA1-signed certificateRegenerate certificate with SHA256. See Certificate Management Deep Dive
BadSecurityChecksFailedSecurity policy mismatchClient and server must share at least one common security policy. Check server endpoints
BadSessionClosedSession timeoutIncrease client keep-alive interval. Check PLC CPU load — high load causes OPC-UA timeouts
BadUserAccessDeniedInsufficient permissionsVerify user role assignment. Check if anonymous access was disabled
BadNodeIdUnknownVariable node does not existVerify the node ID against a fresh namespace browse. Variable names are case-sensitive
No endpoints discoveredDiscovery service not respondingTry direct connection with the endpoint URL opc.tcp://<IP>:4840
Connection drops intermittentlyNetwork instability or CPU overloadCheck network cabling, switch port errors, and PLC task idle time

Certificate Trust Issues

Scenario: Client connects successfully with security=None but fails with any signing or encryption policy.

  1. Verify the server certificate is not expired: openssl x509 -in cert.der -inform DER -dates -noout
  2. Verify the signature algorithm: openssl x509 -in cert.der -inform DER -text -noout | grep "Signature Algorithm"
  3. Check if the client certificate is in the PLC’s trusted store:
    • FTP to PLC → browse System/Certificates/Trusted/
    • If the client certificate is missing, upload it
  4. For CA-signed certificates, ensure the CA root is in System/Certificates/CA/

Authentication Failures

  • Anonymous rejected: The OEM removed the “Everyone” role. You must authenticate with a configured username/password. Check the B&R User Management for valid accounts.
  • Username/password rejected: Verify credentials against the B&R user management (accessible via Automation Studio or the SDM web interface). Passwords are case-sensitive.
  • Certificate authentication rejected: The client certificate is not in the trusted store, or the SSL Configuration on the PLC requires a specific certificate that was not presented by the client.

Timeout Issues

OPC-UA timeouts on B&R systems are almost always caused by insufficient task idle time:

  • Check CPU utilization: PLC.System.CPU.Utilization and per-task cycle times via OPC-UA System nodes
  • If task idle time is below 10%, the OPC-UA system task cannot respond within the request timeout
  • Reduce active subscriptions, increase sampling intervals, or optimize cyclic task code
  • Increase client-side timeout (UaExpert: Tools → Options → Advanced → Operation Timeout)

Variable Not Found / Namespace Issues

  • Node IDs in B&R OPC-UA are case-sensitive: PLC.Modules.Default.Cyclic#1 is not the same as plc.modules.default.cyclic#1
  • The namespace index (ns=X) can change between firmware upgrades or configuration rebuilds — always verify with a fresh browse
  • If variables disappear after a PLC update, the OEM may have modified the OPC-UA Default View configuration
  • Empty namespaces under Objects → PLC → Modules → Default mean no variables were enabled for that task class

Port Conflicts

  • Another service on the PLC may be using port 4840 (unlikely but possible with custom configurations)
  • A firewall between the client and PLC may be blocking the port
  • If the OPC-UA port was changed from the default, the discovery URL will not match — always try direct endpoint connection
  • Multiple OPC-UA servers on the same network segment with the same ApplicationUri can cause client confusion

Security Policy Mismatch

If the client and server have no overlapping security policies:

  1. Use UaExpert to connect and check the server’s offered endpoints (shown in the connection dialog before connecting)
  2. Ensure the client supports at least one of the server’s offered security policies
  3. If the server only offers Basic256Sha256 and the client only supports None, upgrade the client or reconfigure the server’s security policies in OpcUa.Config.xml
  4. For legacy B&R firmware, the server may only offer None and Basic128Rsa15 — modern clients that reject SHA1 may only have None as an option

OPC-UA Performance Tuning

Subscription vs Polled Reads

ApproachNetwork TrafficServer LoadData FreshnessRecommended Use
SubscriptionLow (push on change)LowerNear real-timeContinuous monitoring, alarming, dashboards
Polled ReadHigh (periodic request)HigherPeriodic (poll interval)One-time reads, data logging, batch processing
Batched ReadMediumMediumPeriodicReading many variables at once

Recommendation: Always prefer subscriptions over polled reads. A single subscription with 100 monitored items generates significantly less network traffic than polling 100 variables every 250 ms.

Dead Band Settings for Analog Values

Dead bands prevent unnecessary notifications for insignificant analog value changes. Set the absolute dead band to match sensor resolution — a temperature sensor with 0.1C resolution does not need notifications for 0.001C changes. Dead bands are not applicable to integers and booleans.

Queue Size and Sampling Rate Optimization

  • QueueSize=1: Only the latest value is kept. Intermediate values are lost. Use for dashboards where only the current value matters.
  • QueueSize=10+: Multiple intermediate values are queued. Use for data logging or trend analysis. Client receives all intermediate values on each publish cycle.
  • SamplingInterval: The minimum practical interval on B&R OPC-UA is typically 50-100 ms. Intervals below 50 ms may be rounded up by the server.
  • PublishingInterval: The server sends queued notifications at this interval. Set to 500-1000 ms for normal operation. Lower values increase CPU and network load.

Impact on Cyclic Task Performance

The OPC-UA server runs as a system task at a priority between 4 and 190. If cyclic tasks are consuming most of the CPU cycle, the OPC-UA server task gets starved:

  1. Monitor task idle time: Via OPC-UA, read PLC.System.Tasks.<TaskName>.IdleTime. If below 10%, expect OPC-UA response degradation
  2. Correlation: When cyclic task cycle time spikes (e.g., from 5 ms to 15 ms), OPC-UA publish intervals will stretch proportionally
  3. Mitigation: Reduce the number of monitored items, increase sampling intervals, or optimize the cyclic task code
  4. Diagnostic: If you notice OPC-UA latency increasing during machine operation, check which cyclic task is consuming CPU and when

Monitoring Task Idle Time with OPC-UA Active

When OPC-UA is active, monitor task idle time to detect performance impact. Key node IDs:

  • PLC.System.Cyclic#1.IdleTime — idle time in microseconds
  • PLC.System.Cyclic#1.CycleTime — total cycle time in microseconds

Health thresholds:

  • Idle > 20% of cycle time: healthy, OPC-UA is not starving
  • Idle 10-20%: warning, reduce subscriptions or increase sampling intervals
  • Idle < 10%: critical, OPC-UA responses will timeout; optimize cyclic tasks first

If idle time drops when OPC-UA subscriptions are active, the OPC-UA system task is competing for CPU time. Reduce the number of monitored items or increase sampling intervals to relieve pressure.

OPC-UA History (Historical Access)

Historical Data Access

If the B&R OEM configured mapp DataLogger or mapp History with OPC-UA historical access enabled, you can read historical variable values from the OPC-UA server:

  1. The historical data is exposed through the OPC-UA Historical Data Access (HDA) service
  2. Not all B&R OPC-UA configurations include HDA — it must be explicitly configured in Automation Studio
  3. Available historical nodes appear in the namespace with the AccessLevelHistoryRead flag set

Reading Historical Data with Python

import asyncio
from asyncua import Client, ua

url = "opc.tcp://192.168.1.100:4840"

async def read_history():
    async with Client(url=url) as client:
        node = client.get_node("ns=2;s=PLC.Modules.Default.DataLogger.Temperature")
        start = ua.DateTime.utcfromisoformat("2025-12-01T00:00:00Z")
        end = ua.DateTime.utcfromisoformat("2025-12-31T23:59:59Z")
        details = ua.ReadRawModifiedDetails(
            IsReadModified=False, StartTime=start, EndTime=end,
            NumValuesPerNode=0, ReturnBounds=True
        )
        result = await node.read_history(
            history_read_details=details,
            timestamps_to_return=ua.TimestampsToReturn.Both
        )
        if result.StatusCode.is_good():
            for item in result.HistoryData.Values:
                print(f"{item.SourceTimestamp}: {item.Value.Value} [{item.Status}]")
        else:
            print(f"Failed: {result.StatusCode}")

asyncio.run(read_history())

Reading Historical Alarms via OPC-UA

If mapp AlarmX is configured to publish through OPC-UA, alarms appear as condition nodes with properties: EnabledState, AckedState, ActiveState, Severity. Query historical alarm events using the Event History service.

import asyncio
from asyncua import Client, ua

url = "opc.tcp://192.168.1.100:4840"

async def read_alarm_history():
    async with Client(url=url) as client:
        alarms = client.get_node("ns=2;s=PLC.Modules.Default.AlarmX")
        start = ua.DateTime.utcfromisoformat("2025-12-01T00:00:00Z")
        end = ua.DateTime.utcfromisoformat("2025-12-31T23:59:59Z")
        event_filter = await alarms.get_event_filter(
            evtype=client.get_node(ua.ObjectIds.AlarmConditionType)
        )
        details = ua.ReadEventDetails(
            StartTime=start, EndTime=end,
            MaxValuesPerNode=1000, Filter=event_filter
        )
        result = await alarms.read_event_history(details)
        if result and result.Events:
            for ev in result.Events:
                msg = ev.Message.Text if ev.Message else "No message"
                sev = ev.Severity if hasattr(ev, "Severity") else "N/A"
                print(f"{ev.Time}: [{sev}] {msg}")
        else:
            print("No alarm history or HDA not configured")

asyncio.run(read_alarm_history())

Time-Based Data Retrieval Constraints

  • Time zone: B&R OPC-UA uses UTC. If the PLC clock is not NTP-synchronized, timestamps may be inaccurate (see time-sync.md)
  • Resolution: Depends on mapp DataLogger config — typically 100 ms to 60 seconds
  • Retention: Stored on CF card or SRAM; old data is overwritten when the buffer fills
  • Aggregate functions: If supported, use ReadProcessedDetails for server-side aggregates (average, min, max, count, stddev) — more efficient than reading all raw values

Security Considerations for OPC-UA on B&R Systems

Known OPC-UA Vulnerabilities

CVEAdvisoryProductCVSSImpactMitigation
CVE-2025-11482SA25P006 (2026-05-26)PPT30 OS < 1.8.0v4.0 8.7 / v3.1 7.5Permanent DoS on OPC-UA server via resource exhaustion from concurrent connectionsUpdate PPT30 OS to 1.8.0; firewall port 4840 if OPC-UA not needed
CVE-2025-11044SA25P005 (2026-01-19)AR < 6.5 / R4.93v4.0 8.9ANSL flooding DoS (impacts OPC-UA indirectly by exhausting AR resources)Patched in R4.93; rate-limit at firewall
CVE-2026-0936SA26P001 (2026-01-29)PVI clientN/APVI logs credentials in plaintext (affects OPC-UA connections made via PVI)Update PVI to 6.5; see pvi-api.md

OPC-UA Hardening Checklist

  1. Disable anonymous access if possible — require username/password or certificate authentication
  2. Use security policy Basic256Sha256 or higher — never run production with security None
  3. Firewall port 4840 to allow only known OPC-UA clients and HMIs
  4. Monitor OPC-UA connection attempts — unexpected clients may indicate scanning
  5. Regenerate self-signed certificates with SHA256 and set reasonable validity (1-3 years)
  6. Replace self-signed certs with CA-signed when possible — see SA25P001 guidance in cybersecurity-hardening.md
  7. PPT30 HMI panels: If OPC-UA is enabled on a PPT30, verify OS version >= 1.8.0 (SA25P006)

CVE-2025-11482: PPT30 OPC-UA Server DoS

The PPT30 OPC-UA server has a resource exhaustion vulnerability (CWE-770). An unauthenticated network attacker can send messages that cause the OPC-UA server to become permanently unresponsive. A reboot is required to restore service. The vulnerability is scored CVSS v4.0 8.7 because:

  • No authentication required
  • Network-based exploitation
  • Permanent availability impact (reboot needed)
  • Affects safety-related HMI interactions when PPT30 is used as the operator interface

If your CP1584 system uses a PPT30 panel with OPC-UA:

  1. Check PPT30 OS version: Settings → System Information → OS Version
  2. Update to PPT30 OS 1.8.0 via B&R Update Tool
  3. If update is not immediately possible, restrict OPC-UA access to trusted IP addresses via firewall
  4. OPC-UA is not enabled by default on PPT30 — if you never explicitly enabled it, you are not affected

Cross-References

Key Findings

  • OPC-UA server is built into AR firmware but must be explicitly activated and variables individually enabled
  • Not all variables are automatically exposed — each must be enabled as an OPC-UA tag by the developer
  • Default port is 4840 on the standard Ethernet interface
  • Namespace structure: Objects → PLC → Modules → Default → <TaskName> → <Variables>
  • Three authentication methods: anonymous (default), username/password, certificate
  • Certificates stored on CF card in the certificate store
  • For undocumented machines: OPC-UA is the best diagnostic access point if it was configured, but useless if the OEM never enabled it
  • The OpcUa.Config.xml file on the CF card contains server configuration
  • OPC-UA runs as a lower-priority system task — it can be starved by long-running cyclic tasks

Community OPC-UA Tools for B&R

ToolURLPurpose
OpcUaSamplesgithub.com/br-automation-community/OpcUaSamples-sample-ASComprehensive OPC-UA configuration and coding samples in Ansi-C and ST, spanning AS4.1 through the newest AS version, with detailed explanations
easyuaclient-as-projectgithub.com/br-automation-community/easyuaclient-as-project-devEasyUaClnt — a simplicity wrapper library based on AsOpcUac for a clear OPC-UA client interface
demo-br-asyncuagithub.com/hilch/demo-br-asyncuaMinimal Python example accessing a B&R PLC via asyncua (asyncio-based OPC-UA stack). Alternative to the Python OPC-UA client examples in python-diagnostics.md
mappRemoteShellgithub.com/br-automation-community/mappRemoteShellSample project executing shell commands on a remote PC via OPC-UA + Python — demonstrates bidirectional OPC-UA communication for remote diagnostics
mappPanelgithub.com/br-automation-community/mappPanelSample for PLC to T-Panel communication over OPC-UA — useful for understanding panel integration patterns

Document updated: July 2026 (added security considerations section §13 with CVE-2025-11482/PPT30 OPC-UA DoS, OPC-UA hardening checklist; added community OPC-UA tools section)

B&R HMI Integration — mapp View & Panel Systems

Audience: Automation engineers maintaining undocumented B&R CP1584 machines with zero OEM documentation.

Scope: mapp View (HTML5), legacy POWER WORX/VNC display paths, OPC UA FX data exchange, Automation Studio project recovery, panel replacement procedures.


Table of Contents

  1. Overview
  2. Architecture
  3. mapp View Deep Dive
  4. Data Exchange: OPC UA FX
  5. Legacy Protocols: POWER WORX & VNC
  6. Alarm Handling: mapp AlarmX
  7. Diagnosing HMI Issues on an Undocumented Machine
  8. Recovering the HMI Project Without OEM Files
  9. Panel Replacement Procedure (CP1584 Context)
  10. Multi-Client / Multi-User Setup
  11. Practical Code Examples
  12. Key Findings
  13. Cross-References

Overview

B&R Automation’s HMI ecosystem has evolved from proprietary serial/ethernet display protocols to a fully web-based architecture built on open standards. On a CP1584 (or any modern B&R controller with mapp View), the HMI is not a separate application — it is an integrated web server running inside the controller’s runtime, rendering HTML5 pages that bind to PLC variables through the OPC UA FX (Field eXchange) data model.

This means:

  • There is no separate “HMI program” to worry about — the HMI is part of the controller project.
  • The display is served over HTTP/HTTPS on the controller’s Ethernet interface.
  • Any device with a web browser can be the HMI panel. Dedicated B&R Panel PCs (Power Panel series, panels with built-in B&R controllers) run a fullscreen Chromium-based runtime that points at the controller’s web server.
  • If you have no OEM documentation, the HMI configuration lives inside the .apj (Automation Studio project) or in files deployed to the controller’s flash filesystem.

Architecture

┌──────────────────────────────────────────────────────────────────────┐
│  B&R Controller (e.g. CP1584)                                        │
│                                                                      │
│  ┌─────────────────┐    ┌──────────────────┐    ┌────────────────┐  │
│  │  PLC Logic       │    │  mapp View        │    │  OPC UA FX     │  │
│  │  (IEC 61131-3)   │◄──►│  Web Server       │◄──►│  Data Broker   │  │
│  │  ST/SFC/CFC/LD   │    │  (Port 80/443)    │    │                │  │
│  └─────────────────┘    └────────┬─────────┘    └────────────────┘  │
│                                  │                                  │
│  ┌────────────────────────────────┼──────────────────────────────┐  │
│  │  Runtime Filesystem            │                               │  │
│  │  /opt/mappView/                │                               │  │
│  │    ├── pages/  (*.page)       │                               │  │
│  │    ├── widgets/ (*.widget)    │                               │  │
│  │    ├── css/                   │                               │  │
│  │    ├── js/                    │                               │  │
│  │    └── config/                │                               │  │
│  └────────────────────────────────┼──────────────────────────────┘  │
└───────────────────────────────────┼──────────────────────────────────┘
                                    │
                    ┌───────────────┼───────────────┐
                    │               │               │
              ┌─────▼─────┐  ┌─────▼──────┐  ┌────▼───────┐
              │  Panel PC  │  │  VNC       │  │  Web Browser│
              │  (local)   │  │  (remote)  │  │  (any dev.) │
              │  Chromium  │  │  port 5900 │  │  HTTP/HTTPS │
              └────────────┘  └────────────┘  └─────────────┘

Key architectural principle: HMI logic and control logic are completely decoupled. The PLC program has no knowledge of the HMI screens. The HMI screens have no knowledge of the PLC program structure. They are connected solely through the OPC UA FX variable namespace.


mapp View Deep Dive

Project Structure in Automation Studio

In Automation Studio, mapp View is a mapp component that you add to the project. Once added, it creates a structured directory tree:

MyProject/
├── Logical/
│   ├── mappView/                    ← mapp View configuration
│   │   ├── Pages/                   ← .page files (screen definitions)
│   │   │   ├── Main.page
│   │   │   ├── Diagnostics.page
│   │   │   └── RecipeEditor.page
│   │   ├── Widgets/                 ← Reusable widget definitions
│   │   │   ├── MotorStatus.widget
│   │   │   └── TemperatureGauge.widget
│   │   ├── Frames/                  ← Frame layouts (.frame)
│   │   ├── Styles/                  ← CSS files
│   │   │   └── Custom.css
│   │   ├── Resources/               ← Images, SVGs
│   │   ├── Data/                    ← Data configuration (.data)
│   │   │   └── mappViewData.data
│   │   ├── Config/                  ← .config files (roles, clients)
│   │   │   ├── Roles.config
│   │   │   └── Clients.config
│   │   └── mappView.config          ← Root configuration
│   │
│   └── Libraries/                   ← Linked widget libraries
│       └── mappViewWidgets/
│
├── Physical/
│   ├── CP1584/                      ← Target hardware configuration
│   └── ...
│
└── MyProject.apj                   ← Project file

File types you will encounter:

ExtensionPurpose
.pageDefines a screen/page with widgets and layout
.widgetReusable UI component definition
.frameContainer for grouping widgets with layout rules
.dataData bindings — maps HMI variables to PLC variables
.configConfiguration files (roles, clients, display settings)
.cssCustom stylesheets

Widget Framework & Pages

mapp View provides a library of drag-and-drop widgets organized by function:

  • Display widgets: Text, Image, LED, Bar, Trend, Gauge, Table
  • Input widgets: Button, Edit, CheckBox, RadioButton, Slider, DatePicker
  • Container widgets: Group, Tab, SplitPanel, ScrollBox, Layer
  • Chart widgets: CurveTracker, XYChart, BarChart
  • Special widgets: AlarmList, RecipeEditor, CameraView, MaintenanceUI

Each widget has properties that fall into categories:

  1. Layout — position, size, anchoring
  2. Style — colors, fonts, borders
  3. Data — variable bindings (the OPC UA FX links)
  4. Behavior — click handlers, visibility conditions, animations

Widget data binding syntax in the .data file uses dot-notation referencing the OPC UA FX namespace:

// Data binding example (mappViewData.data)
Content.Main.StatusText.Value = "gMachineStatus.sCurrentState"
Content.Main.StartButton.Enable = "gMachineStatus.bRunning"
Content.Main.TempDisplay.Value = "gAxis[0].fTemperature"

Content vs. Layout Separation

mapp View enforces a strict three-layer separation:

LayerContainsModified when
ContentText strings, image paths, variable bindingsTranslating UI, changing I/O mapping
LayoutPage structure, widget positions, widget typesRedesigning screens, adding/removing widgets
LogicHMI-side JavaScript actions, visibility rulesChanging interactive behavior

This separation is critical for undocumented machines because:

  • You can change variable bindings in the .data file without touching any page layouts.
  • You can swap language resource files without rebuilding the project.
  • Layout changes don’t affect what data is displayed.

Data Exchange: OPC UA FX

Data Model Mapping

OPC UA FX is B&R’s proprietary extension to the OPC UA information model, optimized for high-performance cyclic data exchange between the PLC and HMI. It runs inside the controller — no external OPC UA server is needed.

The FX model organizes variables into a hierarchical namespace:

Data
├── Global
│   ├── gMachineStatus
│   │   ├── sCurrentState      (STRING)
│   │   ├── bRunning           (BOOL)
│   │   ├── nErrorCode         (UINT)
│   │   └── fCycleTime         (LREAL)
│   ├── gAxes
│   │   └── [0..7]
│   │       ├── fPosition      (LREAL)
│   │       ├── fVelocity      (LREAL)
│   │       ├── bHomed         (BOOL)
│   │       └── bEnabled       (BOOL)
│   └── gRecipe
│       ├── sActiveRecipe      (STRING)
│       └── rParameters
│           ├── fSpeed         (LREAL)
│           ├── fForce         (LREAL)
│           └── nCount         (UDINT)
├── AlarmX
│   ├── nActiveCount           (UDINT)
│   └── aEntries[]
│       ├── sText              (STRING)
│       ├── nCode              (UDINT)
│       ├── eSeverity          (ENUM)
│       └── tTimestamp         (DATE_AND_TIME)
└── mappView
    ├── nClientCount           (USINT)
    └── aClients[]

Variable Binding

Variable bindings in mapp View are not hardcoded in widget definitions. They use a three-part indirection:

  1. PLC declares global variables (in IEC code or mapp component FBK instances).
  2. The .data file maps those PLC variables to symbolic names in the FX namespace.
  3. Widgets reference the FX symbolic names.
PLC side (IEC 61131-3):
  PROGRAM Main
  VAR_GLOBAL
    gMachineStatus : ST_MachineStatus;
  END_VAR

FX data binding (mappViewData.data):
  Data.Global.gMachineStatus → Main.gMachineStatus

Widget property (in page/widget XML):
  Content.Main.StatusText.Value → Data.Global.gMachineStatus.sCurrentState

This indirection is what makes the content/layout/logic separation work.

Diagnostic Reads Without the Project

If you have no Automation Studio project, you can still read the live variable namespace from the controller:

Method 1: OPC UA Client (e.g., UAExpert, Prosys Simulator)

1. Connect OPC UA client to controller IP
   - Endpoint URL: opc.tcp://<CP1584_IP>:4840
   - Security: None (or sign-only, depending on config)
   - No username/password by default

2. Browse the namespace:
   - Root → Objects → Data → Global
   - All PLC global variables are exposed here
   - Root → Objects → Data → AlarmX
   - Active alarms and history

3. Read/scribe individual variables
4. Monitor cyclic changes (subscription)

Method 2: B&R Automation Studio “Upload from Target”

1. Open Automation Studio → File → New → Project from Target
2. Enter controller IP address
3. Select hardware configuration to upload
4. This recovers:
   - Physical hardware configuration (module types, addresses)
   - Software object list (what programs/components are running)
   - Global variable declarations
   - mapp component instances and their configurations
   - File system contents (including mapp View files)
5. Does NOT recover:
   - Source code of PLC programs (only compiled object code)
   - Comments or original variable names (only runtime names)
   - .page/.widget source files IF the OEM disabled source deployment

Method 3: FTP to controller filesystem

# B&R controllers expose file system access via FTP
ftp <CP1584_IP>
# Default credentials: admin / admin (may differ)

# On Automation Runtime (VxWorks), the CF card is mounted as:
#   C:\ — system partition (firmware, OS files)
#   F:\ — user partition (application, mapp View, logs)

# mapp View deployed files are typically at:
#   F:\mappView\
# Check with:
dir F:\mappView
dir F:\UserProject

# Automation Studio project files (if deployed):
#   F:\UserProject\

WARNING: The CP1584 runs Automation Runtime on VxWorks — it does NOT provide SSH access. All filesystem access is via FTP (see ftp-web-interface.md). Filesystem access depends on firmware version and security settings. Some machines have FTP disabled or credentials changed from defaults.


Legacy Protocols: POWER WORX & VNC

POWER WORX (Proprietary HMI Protocol)

Before mapp View, B&R’s HMI systems (Power Panel T-Series, older Panel PCs) communicated with PLCs using the POWER WORX protocol — a B&R-proprietary binary protocol over Ethernet or serial.

Characteristics:

  • Binary protocol, not human-readable
  • Runs on Ethernet (TCP, typically port 49152 or configured) or serial (RS-232/TTY)
  • Direct memory-mapped variable exchange (the HMI reads/writes PLC memory directly)
  • Tightly coupled — HMI knew PLC memory layout and structure
  • Replaced by OPC UA FX in modern systems

If you encounter POWER WORX on a CP1584:

  • This means the machine has a legacy Power Panel connected alongside the CP1584
  • The CP1584 acts as a gateway/bridge between POWER WORX and OPC UA
  • Check Automation Studio configuration for POWERWORX or PVI (Process Visualization Interface) components
  • PVI is the B&R library that implements POWER WORX communication
// PVI object access in IEC 61131-3 (legacy pattern)
// This is what you might find in older PLC code
PVI_Connect(hConnection, 'CP1584', 'TCP', '<IP>');
PVI_ReadVariable(hConnection, 'Main.gMachineStatus', &rxStatus);
PVI_WriteVariable(hConnection, 'Main.gCmdStart', bStart);

VNC (Remote Display)

VNC is used on B&R systems as a passive remote display mechanism — it mirrors what is shown on a connected Panel PC’s screen.

┌──────────┐   VNC (5900)   ┌──────────────┐
│  Panel PC  │───────────────│  Remote PC    │
│  (shows    │               │  (VNC viewer │
│   HMI)     │               │   / noVNC)   │
└─────┬──────┘               └──────────────┘
      │ HTTP/HTTPS
      │
┌─────▼──────┐
│  CP1584    │
│  (mapp View│
│   server)  │
└────────────┘
  • Default VNC port on B&R Panel PCs: 5900
  • Some B&R systems also expose noVNC (HTML5 VNC client) on the controller’s web server
  • VNC is display only — you cannot inject HMI commands through VNC
  • For full remote HMI access, connect a browser directly to the controller’s mapp View server instead

Accessing VNC:

# Direct VNC connection to Panel PC (not the CP1584 itself)
vncviewer <Panel_PC_IP>:5900

# noVNC via controller web interface (if available)
http://<CP1584_IP>/vnc.html

VNC Configuration Notes:

  • VNC is available on B&R Panel PCs and Automation PCs (APC series) — not on headless CPUs like the CP1584
  • On the CP1584 specifically, the VNC server is part of the VNC Component in Automation Studio (Visualisierung > VNC) and requires it to be configured in the project
  • Default VNC password: typically blank (no password) on older systems; configured in the VNC component settings
  • Security warning: VNC traffic is unencrypted by default. On plant networks, use a VPN or SSH tunnel, or disable VNC and use the web-based mapp View interface instead
  • VNC performance depends on resolution, color depth, and network bandwidth. Reduce resolution on slow links (10 Mbps)
  • Troubleshooting VNC failures: Check that the Panel PC’s VNC component is enabled in the project (look for VncSrv in the task configuration via Automation Studio online view). If VNC doesn’t connect, check firewall rules and verify port 5900 is not blocked by the plant network

Alarm Handling: mapp AlarmX

mapp AlarmX is the integrated alarm management component for mapp View systems. It provides:

  • Centralized alarm definition in the Automation Studio project
  • Automatic alarm triggering when bound variables change state
  • Historical alarm logging with timestamps and acknowledgment
  • HMI integration via the AlarmList widget

Architecture

PLC Logic ──► mapp AlarmX Component ──► OPC UA FX ──► mapp View AlarmList Widget
                  │
                  ├── Alarm Definitions (.alarmx file)
                  ├── Alarm Groups (Machine, Safety, Process...)
                  ├── Severity Levels (Info, Warning, Error, Fatal)
                  └── Alarm Logging (to SD card / internal flash)

Alarm Configuration File Structure

// In the Automation Studio project: Logical/mappAlarmX/
AlarmGroups.config      → Group definitions
AlarmInstances.config   → Which variables trigger which alarms
AlarmParameters.config  → Thresholds, delays, severity mapping

Accessing Alarms Without the Project

# Via OPC UA:
Browse to: Objects → Data → AlarmX → ActiveAlarms

# Key variables exposed via OPC UA FX:
AlarmX.nActiveAlarmCount     → Number of currently active alarms
AlarmX.aActiveAlarms[0..N]  → Array of active alarm structures
  .sText                     → Alarm description
  .nCode                     → Alarm code number
  .eSeverity                 → Severity level
  .tOccurrence               → First occurrence timestamp
  .tAcknowledged             → Acknowledgment timestamp (0 if unack'd)

# Via Automation Runtime console (if SSH access):
# Alarm log files are typically stored at:
/flash/alarmlog/
/flash/UserProject/Log/

See also: alarm-logging.md for detailed alarm logging analysis and recovery procedures.


Diagnosing HMI Issues on an Undocumented Machine

Symptom: HMI Screen Blank or Not Loading

CHECKLIST:
□ Ping the controller IP from a PC on the same network
  → If unreachable: network/cable/switch issue — not HMI

□ Open browser → http://<CP1584_IP>
  → If browser shows connection refused: mapp View service not running
  → If browser shows login page: HMI is working, check credentials

□ If nothing loads on port 80, check port 443 (HTTPS):
  → Some systems force HTTPS only

□ Check if controller is in RUN mode:
  → Via Automation Studio "Online" → "Show Status"
  → Or via the physical controller status LED

□ SSH/FTP into controller and check mapp View process:
  ps aux | grep -i mapp
  # Or check the web server status
  ps aux | grep -i httpd

Symptom: HMI Shows Values But They’re Wrong/Stale

DIAGNOSIS:
1. Connect OPC UA client (UAExpert) to opc.tcp://<CP1584_IP>:4840
2. Browse to the same variables shown on the HMI
3. Compare OPC UA values with HMI displayed values
4. If OPC UA values are correct but HMI is wrong:
   → .data binding file has wrong variable mapping
   → Rebuild .data file with correct PLC variable references
5. If OPC UA values are also wrong:
   → PLC program issue, not HMI
   → See [execution-model.md](./execution-model.md) for PLC diagnostics

Symptom: Alarms Not Appearing on HMI

DIAGNOSIS:
1. Check OPC UA FX → AlarmX node → are alarms present in the namespace?
   → If yes but not showing on HMI: AlarmList widget misconfigured or page not visible
   → If no: mapp AlarmX component not running or not configured

2. Check if mapp AlarmX is in the software object list:
   → Automation Studio → Online → Software Objects
   → Look for "mpAlarmX" or "mappAlarmX" in the running components

3. Force an alarm condition:
   → Write to the alarm trigger variable via OPC UA client
   → Does it appear in the AlarmX OPC UA node?
   → Does it appear on the HMI?

Symptom: Can’t Log In / “Access Denied”

DIAGNOSIS:
1. Default credentials on many B&R systems:
   Username: administrator (or admin)
   Password: (blank or "admin" — varies by firmware)

2. If credentials are unknown and there's no documentation:
   → You will need Automation Studio to "Upload from Target" and read the
     Roles.config and Clients.config files
   → Or access the controller filesystem and read the config files directly

3. Factory reset (LAST RESORT):
   → Automation Studio → Online → Initialize Target
   → WARNING: This erases ALL configuration including PLC program

Recovering the HMI Project Without OEM Files

Step 1: Upload from Target

This is the primary recovery method for any undocumented B&R system.

Automation Studio:
1. File → New → Project from Target
2. Enter controller IP: <CP1584_IP>
3. Project name: Recovery_CP1584_<serial>
4. Select target hardware (Automation Studio will auto-detect)
5. Configure upload scope:
   ☑ Hardware configuration
   ☑ Software configuration (mapp components)
   ☑ Global variable declarations
   ☑ File system contents (this captures mapp View files)
   ☐ Source code (only compiled objects will be available)
6. Wait for upload (can take 10-30 minutes for large projects)
7. Save the recovered project as .apj

Step 2: Analyze Recovered mapp View Files

After upload, inspect the recovered project structure:

Logical/
└── mappView/
    ├── Pages/          ← .page files (XML format, human-readable)
    ├── Widgets/        ← .widget files (XML format)
    ├── Data/           ← .data files (variable bindings — CRITICAL)
    ├── Config/         ← Roles, clients, display settings
    └── Styles/         ← CSS overrides

Critical files to examine:

FileWhat it tells you
mappViewData.dataEvery variable binding between HMI and PLC
Roles.configUser roles and access permissions
Clients.configConnected display clients and their properties
*.page filesWhat screens exist and what widgets are on each
*.config in mappAlarmX/Alarm definitions and trigger conditions

Step 3: Reverse-Engineer Variable Mapping

1. Open mappViewData.data
2. Map each HMI binding to the PLC variable namespace:
   "Content.Main.Motor1Speed.Value" → "Data.Global.gMotor[1].fSpeed"
   → This tells you PLC variable: Main.gMotor[1].fSpeed

3. Cross-reference with the global variable declarations:
   → Find Main.gMotor data type
   → Find ST_Motor structure definition
   → Now you know every motor parameter available

Step 4: Export for Documentation

# Convert recovered .page files to documentation:
# .page files are XML — parse them to extract:
#   - Page names (screen list)
#   - Widget types per page
#   - Variable bindings per widget
#   - Text strings (process descriptions, labels)

# Example: parse a .page file
xmllint --format Main.page | grep -E '(widget|binding|text)'

What You CANNOT Recover

ItemReasonWorkaround
PLC source code (ST/SFC/CFC text)Only compiled object code is on the controllerUse decompiler (limited) or rewrite from observed behavior
Comments in PLC codeStripped during compilationDocument from reverse-engineering the logic
Original variable names (if optimized away)Compiler may rename variablesUse runtime names from OPC UA namespace
Password-protected mapp View configsEncryption on the controllerNeed to reconfigure from scratch

Panel Replacement Procedure (CP1584 Context)

Scenario: Panel PC Failed, Need to Replace

On B&R systems, the “HMI panel” is typically one of:

  1. A dedicated B&R Power Panel with built-in controller (your machine has a CP1584, which IS the controller — so the panel is likely a separate display)
  2. A B&R Panel PC connected to the CP1584 via Ethernet, running mapp View in a fullscreen browser
  3. A third-party display accessing mapp View via web browser

Replacing a B&R Panel PC

PREREQUISITES:
□ New panel PC with B&R Automation Runtime installed (or standard Windows/Linux)
□ IP address of the CP1584 controller
□ Network configuration (subnet, gateway)
□ Any role/client configuration needed for this panel

PROCEDURE:
1. Physically install the new panel:
   → Mount in existing cutout / VESA mount
   → Connect power
   → Connect Ethernet to the same switch as CP1584

2. Configure network on new panel:
   → Static IP on same subnet as CP1584
   → Verify ping to CP1584

3. Launch the HMI runtime:
   ┌─ If B&R Panel PC with Automation Runtime:
   │  → Automation Studio → Deployment → Deploy HMI Client
   │  → Or: the panel auto-discovers the mapp View server via mDNS
   │
   └─ If standard PC / thin client:
      → Open browser: http://<CP1584_IP>
      → Set to fullscreen (F11)
      → Bookmark for automatic startup

4. Verify all screens load correctly
5. Test alarm acknowledgment from the new panel
6. Test user login/role assignment

Reconfiguring the HMI Client on the Controller

If the new panel has a different resolution or needs a different role assignment:

# Access the Clients.config via Automation Studio or FTP:
# Edit the client entry for the new panel:

<Client>
  <Name>Panel_Line2</Name>
  <IpAddress>192.168.1.50</IpAddress>
  <DisplayResolution>1920x1080</DisplayResolution>
  <Role>Operator</Role>
  <AutoStartPage>Main</AutoStartPage>
</Client>

If There Is No Dedicated Panel (Headless Operation)

Some CP1584 machines run without any physical display — the HMI is accessed only via browser from a PC or tablet.

To verify the HMI is running on a headless machine:
1. Connect PC to same network
2. Open browser → http://<CP1584_IP>
3. If mapp View loads: HMI is running, no panel needed
4. If not: check if mapp View is enabled in the controller configuration
   → Automation Studio: mappView.config → Enabled = true
   → Also check: Configuration → mapp View → "Enable web server"

Multi-Client / Multi-User Setup

mapp View supports multiple simultaneous connections, each with independent state:

                    ┌──────────┐
                    │ CP1584   │
                    │ mapp View│
                    │ Server   │
                    └────┬─────┘
           ┌─────────────┼─────────────┐
           │             │             │
     ┌─────▼─────┐ ┌────▼──────┐ ┌────▼──────┐
     │ Operator  │ │ Engineer  │ │ Tablet    │
     │ Panel     │ │ Laptop    │ │ (remote)  │
     │ Role: Op  │ │ Role: Eng │ │ Role: View│
     └───────────┘ └───────────┘ └───────────┘

Role-Based Views

mapp View implements roles through the Roles.config file. Each role can have:

  • Different available pages (Operator doesn’t see Engineering pages)
  • Different widget visibility (some widgets hidden for certain roles)
  • Different variable write permissions (View role = read-only)
  • Different language settings
// Roles.config structure (simplified XML)
<Roles>
  <Role name="Administrator">
    <Pages>All</Pages>
    <Permission>ReadWrite</Permission>
  </Role>
  <Role name="Operator">
    <Pages>Main, Alarms, Recipe</Pages>
    <Permission>ReadWrite</Permission>
    <HiddenPages>Diagnostics, Network, System</HiddenPages>
  </Role>
  <Role name="Viewer">
    <Pages>Main, Alarms</Pages>
    <Permission>ReadOnly</Permission>
  </Role>
</Roles>

Multi-Client Data Consistency

When multiple clients are connected:

  • Read operations: Each client reads independently from the OPC UA FX namespace — no conflicts
  • Write operations (e.g., button press to start machine): The first write wins. Multiple clients pressing “Start” simultaneously do not cause errors — the PLC logic handles the edge detection
  • Alarm acknowledgment: Acknowledgment is tracked per-alarm, not per-client. If Client A acknowledges an alarm, Client B sees it as acknowledged
  • Recipe changes: mapp View handles recipe editing with a “checkout” mechanism — only one client can edit a recipe at a time

Practical Code Examples

Reading HMI Variables via OPC UA (Python)

"""
Read live HMI variables from B&R CP1584 via OPC UA.
Requires: pip install opcua-asyncio
"""
import asyncio
from asyncua import Client

CONTROLLER_IP = "192.168.1.10"
PORT = 4840
ENDPOINT = f"opc.tcp://{CONTROLLER_IP}:{PORT}"

async def read_machine_status():
    async with Client(url=ENDPOINT) as client:
        await client.connect()

        root = client.nodes.root
        objects = await root.get_child(["0:Objects"])
        data = await objects.get_child(["2:Data"])
        global_vars = await data.get_child(["2:Global"])

        machine_status = await global_vars.get_child(["2:gMachineStatus"])

        state = await machine_status.get_child(["2:sCurrentState"]).get_value()
        running = await machine_status.get_child(["2:bRunning"]).get_value()
        error = await machine_status.get_child(["2:nErrorCode"]).get_value()

        print(f"State: {state}")
        print(f"Running: {running}")
        print(f"Error Code: {error}")

        await client.disconnect()

asyncio.run(read_machine_status())

Browsing the HMI Variable Namespace (Python)

"""
Recursively browse the OPC UA FX namespace on a B&R controller
to discover all HMI-accessible variables — useful for undocumented machines.
"""
import asyncio
from asyncua import Client

async def browse_namespace(node, indent=0):
    children = await node.get_children()
    for child in children:
        name = (await child.get_browse_name()).Name
        node_id = str(child.nodeid)
        dtype = await child.get_data_type()
        try:
            value = await child.get_value()
            value_str = f" = {value}"
        except Exception:
            value_str = ""

        print("  " * indent + f"{name} [{dtype}]{value_str}  ({node_id})")
        await browse_namespace(child, indent + 1)

async def main():
    async with Client(url="opc.tcp://192.168.1.10:4840") as client:
        await client.connect()
        print("=== B&R OPC UA FX Namespace ===\n")
        objects = await client.nodes.objects.get_child(["2:Data"])
        await browse_namespace(objects)
        await client.disconnect()

asyncio.run(main())

Writing a Variable via OPC UA (Start/Stop Machine)

"""
Write a command to the PLC via OPC UA.
WARNING: Only use on a test machine or when you fully understand the system.
"""
import asyncio
from asyncua import Client

async def send_command():
    async with Client(url="opc.tcp://192.168.1.10:4840") as client:
        await client.connect()

        cmd_node = await client.nodes.objects.get_child([
            "2:Data", "2:Global", "2:gCommands", "2:bStart"
        ])

        # Edge-triggered: write TRUE, then FALSE
        await cmd_node.write_value(True)
        print("Command START sent")
        await asyncio.sleep(0.5)
        await cmd_node.write_value(False)
        print("Command START released")

        await client.disconnect()

asyncio.run(send_command())

Reading Active Alarms via OPC UA (Python)

"""
Read active alarms from mapp AlarmX via OPC UA FX namespace.
"""
import asyncio
from asyncua import Client

async def read_alarms():
    async with Client(url="opc.tcp://192.168.1.10:4840") as client:
        await client.connect()

        alarmx = await client.nodes.objects.get_child([
            "2:Data", "2:AlarmX"
        ])

        count = await (await alarmx.get_child(["2:nActiveAlarmCount"])).get_value()
        print(f"Active alarms: {count}\n")

        if count > 0:
            alarms_node = await alarmx.get_child(["2:aActiveAlarms"])
            alarms = await alarms_node.get_value()
            for i, alarm in enumerate(alarms):
                print(f"  [{i}] Code: {alarm.nCode}  "
                      f"Severity: {alarm.eSeverity}  "
                      f"Text: {alarm.sText}")

        await client.disconnect()

asyncio.run(read_alarms())

Checking mapp View Service Status

IMPORTANT: The CP1584 runs Automation Runtime (AR) on VxWorks — it does NOT provide SSH access or Linux-style process management. You cannot SSH into the controller, run ps, systemctl, or netstat commands. The correct approaches for checking mapp View status on a CP1584:

Via SDM (System Diagnostics Manager):

  1. Open a web browser to http://<CP1584_IP>/SDM
  2. Navigate to the Overview tab — check web server status
  3. Navigate to the Task Monitor tab — look for the HTTP/WebServer task
  4. Navigate to the Logger tab — check for web server errors

Via Automation Studio:

  1. Connect to the controller via Online > Login
  2. Open Diagnostics > Task Monitor — check HTTP server task status and cycle times
  3. Open Diagnostics > System Diagnostics Manager (SDM) > Diagnostics > Software Modules

Via OPC UA:

  1. Connect an OPC UA client to opc.tcp://<CP1584_IP>:4840
  2. Browse to the SDM namespace for web server health indicators

Via SNMP:

snmpwalk -v1 -c public <CP1584_IP> 1.3.6.1.4.1.2706.1

See diagnostics-sdm.md for full SDM usage details.

Extracting HMI Pages from Controller via FTP

# FTP into controller (NOT SSH — CP1584 has no SSH)
ftp <CP1584_IP>

# Navigate to mapp View files on the user partition
cd F:\mappView
# or
cd F:\UserProject\mappView

# Download all HMI definition files
lcd /local/backup/
cd Pages
mget *.page
cd ../Widgets
mget *.widget
cd ../Data
mget *.data
cd ../Config
mget *.config

# .page and .widget files are XML — parseable:
# xmllint --format Main.page | head -50

NOTE: The B&R AR filesystem uses C:\ (system) and F:\ (user/application) partition notation. These are NOT Windows paths — they are VxWorks device mounts that appear as drive letters. The FTP server exposes them in this format.


Key Findings

  1. mapp View is a web server inside the controller — the HMI is not a separate program. It serves HTML5/CSS3/JavaScript pages over HTTP/HTTPS from the controller itself.

  2. All data flows through OPC UA FX — there is no direct PLC memory access from the HMI. Every value displayed or entered on the HMI passes through the OPC UA FX information model on port 4840.

  3. HMI and control logic are fully decoupled — the PLC program has zero knowledge of the HMI. The HMI has zero knowledge of PLC program structure. This separation is enforced through the three-layer model (content, layout, logic) and the .data binding file indirection.

  4. On undocumented machines, upload from target is your primary recovery tool — Automation Studio can upload the hardware config, software object list, global variables, mapp component configurations, and deployed filesystem contents. Source code cannot be recovered.

  5. The .data file is the most important file — it maps every HMI element to every PLC variable. Losing it means you must reverse-engineer every variable binding by comparing what the HMI shows against what OPC UA exposes.

  6. Panel replacement does not require PLC changes — because the HMI is web-based, replacing a panel is purely a network/browser configuration task. No PLC reprogramming is needed.

  7. Legacy POWER WORX systems used direct memory mapping — unlike OPC UA FX, POWER WORX read/wrote PLC memory directly. If you encounter this on a CP1584, it indicates a bridged legacy display connection via the PVI library.

  8. VNC is display-only — VNC mirrors what a connected Panel PC shows. It cannot be used to interact with the mapp View server directly. For full remote access, use a web browser.

  9. Alarm handling is fully integrated — mapp AlarmX exposes active alarms, history, and acknowledgment status through the OPC UA FX namespace. The AlarmList widget on the HMI subscribes to this data automatically.

  10. Role-based access is configured in Roles.config — without the OEM project, you may need to upload from target to discover role definitions. Default credentials vary by firmware version.


Cross-References

Related DocumentContentRelevance
firmware.mdB&R firmware versions, update procedures, compatibilitymapp View features vary by firmware version; some features require minimum firmware levels
opcua.mdOPC UA server configuration, security setup, namespace browsingmapp View data exchange is entirely OPC UA FX-based; understanding OPC UA is essential for HMI diagnostics
execution-model.mdPLC task configuration, cycle times, program execution orderHMI responsiveness depends on PLC cycle time and task priorities; stale HMI values may indicate PLC execution issues
alarm-logging.mdAlarm history analysis, log file formats, recoverymapp AlarmX logs are written to the controller filesystem; alarm logging details complement the HMI alarm display
ftp-web-interface.mdFTP access, web server configuration, file downloadFTP is the primary method for extracting mapp View files from the CP1584 without Automation Studio
pvi-api.mdPVI middleware, variable access, programmatic connectionsPVI is the underlying communication layer for POWER WORX legacy HMI connections
diagnostics-sdm.mdSystem Diagnostics Manager, web-based diagnosticsSDM provides web server status, task monitoring, and system health for diagnosing HMI service issues
access-recovery.mdPassword recovery, credential discoveryDefault credentials for FTP/web/SDM access when OEM passwords are unknown
python-diagnostics.mdPython scripts for PLC communicationPython OPC UA clients for programmatic HMI data extraction and testing
network-architecture.mdNetwork topology, device discovery, VLAN segmentationHMI panel connectivity and VNC performance depend on network architecture

Document generated from reverse-engineering research on undocumented B&R CP1584 systems. All procedures should be validated on a test system before applying to production equipment.

B&R System Diagnostics Manager (SDM) & Automation Studio Diagnostics

Target audience: Automation engineers maintaining undocumented B&R CP1584 machines with zero OEM documentation. This guide covers how to access, configure, and use SDM and Automation Studio diagnostic tools to troubleshoot and understand a B&R controller you did not originally program.


1. Overview

B&R System Diagnostics Manager (SDM) is a built-in diagnostic web interface available in Automation Runtime V3.0 and higher. It provides browser-based access to the controller’s internal state—CPU load, memory usage, task execution, I/O module health, and the system logbook—without requiring Automation Studio, a project file, or any OEM documentation.

For CP1584 machines where no project exists in your archive, SDM is often the first and only tool you have to understand what the controller is doing, why it may have stopped, and what hardware is actually installed.

SDM is complemented by Automation Studio’s Logger tool, which can import system dump files (.tar.gz) exported from SDM for deeper offline analysis.


2. Prerequisites & Configuration

2.1 What Must Be Enabled on the Controller

SDM does not work out of the box on every B&R controller. Two services must be enabled in the Automation Runtime configuration:

SettingLocationRequired Value
Web ServerAutomation Studio → System → Configuration → Web ServerEnabled
SDMAutomation Studio → System → Configuration → SDMEnabled

If you have no project file (common when inheriting undocumented machines), you cannot change these settings via Automation Studio. Options:

  1. Check if SDM is already running — open http://<PLC_IP>/sdm in a browser. If it loads, you’re good.
  2. Use Automation Studio’s “Upload from PLC” — connect to the PLC IP, upload the configuration, enable web server and SDM, then download. This requires at minimum a compatible Automation Studio version matching the runtime on the target.
  3. Default configuration — many B&R default configurations ship with the web server enabled. SDM is not always enabled by default on older images.

2.2 Network Access

SDM communicates over HTTP (not HTTPS by default). Ensure:

  • The PLC IP is reachable from your workstation (ping test).
  • Port 80 is open on the PLC (standard HTTP).
  • For remote/internet access, a VPN or port-forward must be configured — SDM has no built-in authentication mechanism in older versions. Treat exposed SDM interfaces as sensitive.

3. Accessing SDM

3.1 Web Browser Access

Open any standard web browser and navigate to:

http://<PLC_IP>/sdm

For example, if the CP1584 has IP 192.168.1.10:

http://192.168.1.10/sdm

No installation, no plugins, no Java required. SDM renders a standard HTML interface.

3.2 Access Without Project Files

This is the critical advantage of SDM for undocumented machine scenarios:

  • You do not need Automation Studio installed.
  • You do not need the OEM project file or source code.
  • You do not need to know the PLC’s configuration.
  • You only need the PLC’s IP address and network connectivity.

SDM reads directly from the controller’s runtime, showing you the live state of the system as it runs.

3.3 Remote / Internet Access

Because SDM is web-based, it can be accessed from any location—intranet or internet—provided network routing is in place. This is useful for:

  • Remote troubleshooting of field machines.
  • Monitoring a line of machines from a central engineering office.
  • Supporting multiple plants without traveling.

4. SDM Interface — Sections & What They Show

4.1 System Logbook

The System Logbook (also called Event Log or System Log) is a chronological record of system events recorded during:

  • Startup — boot sequence, module initialization, firmware loading, configuration application.
  • Runtime operation — warnings, errors, state changes, communication events, module insertion/removal (if hot-swappable).

Logbook entries include:

  • Timestamp (controller time)
  • Event class (Info, Warning, Error, Fatal)
  • Event ID / error code
  • Source module (which hardware or software component generated the event)
  • Description text

The logbook is the primary tool for understanding why a controller went into Error or Stop state. Always check it first after a fault.

4.2 CPU Usage

SDM displays the current CPU utilization of the controller as a percentage. This shows:

  • Overall CPU load across all tasks.
  • Whether the controller is CPU-bound (sustained >80% is a concern).
  • Spikes that correlate with specific events (e.g., cyclic communication timeout causing retry storms).

4.3 Task Monitor

The Task Monitor is one of the most valuable SDM sections. It shows every cyclic task configured on the controller with:

ColumnDescription
Task NameThe configured task identifier (e.g., Cyclic#1, Cyclic#2, Timer)
Cycle Time (current)Most recent cycle execution time
Cycle time (min)Minimum observed cycle time
Cycle time (max)Maximum observed cycle time
Cycle time (avg)Average cycle time
Task LoadPercentage of CPU time consumed by this task
PriorityTask priority level
StateRunning, Waiting, Error, etc.

What to look for:

  • A task with a max cycle time approaching its configured watchdog limit → imminent watchdog trip.
  • A task showing error state → that task has crashed or is stuck.
  • High task load on a low-priority task stealing time from critical I/O tasks.

4.4 Memory Information

SDM shows memory usage broken down into:

  • User memory — how much of the available user RAM is allocated.
  • System memory — memory used by the operating system and runtime.
  • File system — usage on the onboard file system (if applicable).

Memory exhaustion can cause subtle failures (task not starting, unable to allocate buffers) before any explicit error is raised.

4.5 I/O Module Status

SDM lists all I/O modules detected in the controller’s hardware tree with:

  • Module type and identifier.
  • Slot/bus position.
  • Status — OK, Error, Not responding, Initializing.
  • Module firmware version.

This is critical on undocumented machines because it reveals the actual hardware configuration without needing the project file. You can use this to reconstruct a hardware overview of the machine.


5. System Dump Files

5.1 What Is a System Dump

A system dump is a snapshot of the controller’s entire diagnostic state, packaged as a .tar.gz archive. It contains:

  • Hardware information — controller type, serial number, firmware version, module inventory.
  • System logbook entries — all recorded events up to the moment of the dump.
  • Diagnostic data — task states, memory maps, I/O status, error registers.
  • Configuration snapshot — relevant runtime configuration parameters.

System dumps are created on the controller via SDM and then downloaded to your PC for offline analysis in Automation Studio.

5.2 Creating a System Dump in SDM

  1. Navigate to http://<PLC_IP>/sdm.
  2. Locate the System Dump or Create Dump section.
  3. Click Create or Generate.
  4. Wait for the controller to collect and package the data (can take 30 seconds to several minutes depending on system complexity).
  5. Download the resulting .tar.gz file to your workstation.

The dump is created from the controller’s current state. If the controller is in Error/Stop, create the dump before cycling power—the dump captures the fault state, which is what you need to analyze.

5.3 Opening System Dumps in Automation Studio

To analyze a system dump file in Automation Studio’s Logger:

  1. Open Automation Studio.
  2. Open or create a project — the Logger tool requires at least a project to be open. If you do not have the real project, create a dummy project (any valid B&R project with the same or similar controller target). The Logger uses the project context only as a container; it reads the dump data from the file itself.
    • Workaround: Create a new project, add a single controller of the same type as the PLC (e.g., CP1584), and save it. This is enough.
  3. Open the Logger — use Ctrl+L or go to Tools → Logger.
  4. In the Logger, click Load Data (or File → Load Data).
  5. Navigate to the .tar.gz system dump file and open it.
  6. The Logger will parse the dump and display all contained diagnostic data.

5.4 Limitations of Logger with Dummy Projects

When using a dummy project to analyze a dump from an unknown machine:

  • Hardware tree mismatch — the dummy project won’t match the real hardware. Logger may show some modules as “unknown.” This is acceptable; the logbook and diagnostic data are still fully readable.
  • No variable cross-reference — without the real project’s variable declarations, Logger cannot resolve variable names in the dump’s memory snapshots. You see raw addresses, not symbolic names.
  • No source-level debugging — Logger shows diagnostic data, not source code. To trace logic, you still need the actual project.

Despite these limitations, the logbook data, error codes, and task state information alone are often enough to diagnose the root cause of a fault.


6. Common Error Codes

The following error codes are frequently encountered in B&R CP1584 and similar controllers. They appear in the SDM System Logbook and in Automation Studio diagnostics.

Error CodeSeverityDescriptionTypical CauseRecommended Action
8021ErrorConfiguration error / invalid configurationMissing or corrupt configuration on controllerRe-upload configuration via Automation Studio; check if SDM/config files are intact
8099ErrorGeneral system error / unspecified faultVarious — check logbook for surrounding entries for contextReview full logbook around the 8099 timestamp; look for preceding warnings
9204FatalTemperature shutdown — controller exceeded safe operating temperatureBlocked ventilation, failed fan, ambient temperature too high, high CPU load generating excess heatImmediately check cooling/ventilation; reduce CPU load if possible; let controller cool before restart; inspect fan operation
9206ErrorHardware fault / module errorI/O module failure, bus communication failure, module not respondingCheck I/O module status in SDM; reseat modules; inspect bus cables; check for loose connections
9210FatalWatchdog timeout / system reset — a task exceeded its maximum cycle timeTask stuck in infinite loop, blocking I/O call, excessive interrupt load, communication timeoutCheck Task Monitor for which task is near/exceeding its limit; review that task’s code (if project is available); check for communication timeouts (PVI, fieldbus)
9212ErrorMemory error / insufficient memoryMemory allocation failure, buffer overflow, too many instancesCheck Memory Information in SDM; reduce dynamic allocations; check for memory leaks in user program
9214ErrorCommunication error / connection lostLost connection to upstream/downstream device, network cable issue, protocol mismatchCheck network cables; verify IP configuration; check ANSL connection (port 11169); verify PVI connection parameters

Error Code Investigation Procedure

  1. Note the error code and timestamp from the SDM logbook.
  2. Look at 5-10 entries before the error — preceding warnings often indicate the root cause (e.g., a communication timeout followed by a watchdog trip).
  3. Look at entries after the error — does the controller recover, or does it go to Stop?
  4. Cross-reference the error code in the table above.
  5. If the error is recurring, download a system dump and analyze in Automation Studio Logger.

7. ANSL Communication (PVI Port)

7.1 ANSL TCP Port

B&R controllers use the ANSL (Automation Network Service Layer) protocol for PVI (Process Visualization Interface) and automation communication. The default TCP port is 11169.

This port is used by:

  • Automation Studio to connect to the PLC for programming, debugging, and configuration.
  • PVI-based HMI applications (e.g., VNC, Panel Builder, custom SCADA) to exchange data with the PLC.
  • OPC UA and other higher-level protocols that run on top of PVI.

7.2 Port Accessibility

  • Ensure port 11169 is reachable from your Automation Studio workstation (test with telnet <PLC_IP> 11169 or a similar tool).
  • Firewalls between your PC and the PLC must allow TCP/11169.
  • If Automation Studio cannot connect to the PLC but SDM (port 80) works, the ANSL port may be blocked or the PVI service may not be running.

7.3 Troubleshooting Connection Issues

SymptomPossible CauseCheck
Automation Studio cannot discover PLCANSL port blockedtelnet <PLC_IP> 11169
SDM works but AS cannot connectPVI service disabledCheck AR configuration; ensure PVI/ANSL is enabled
Connection drops intermittentlyNetwork issue / switch problemCheck cables, switch ports, network load
“Unknown target” in ASController type mismatchEnsure AS version matches runtime; correct target type selected

8. Practical Procedures for Undocumented Machines

8.1 First Contact — What to Do When You Have No Documentation

  1. Find the PLC IP address.

    • Check the machine’s network switch/router for B&R MAC addresses (OUI: 00:0C:CD or similar).
    • Use B&R IP Address Finder tool (part of Automation Studio installation) to scan the subnet.
    • Check if a label on the controller shows an IP (common on well-maintained machines).
    • Try common B&R defaults: 192.168.1.10, 192.168.0.10.
  2. Open SDM in a browser.

    • Navigate to http://<PLC_IP>/sdm.
    • If SDM loads, proceed. If not, try enabling it via Automation Studio (see Section 2.1).
  3. Record the hardware configuration.

    • In SDM, go to I/O Module Status.
    • Document every module: type, slot, status, firmware version.
    • This becomes your hardware reference.
  4. Download and review the System Logbook.

    • Look for recurring errors.
    • Note the controller firmware version (shown in SDM header or hardware info).
    • Check if the controller is in Run, Error, or Stop state.
  5. Create a system dump.

    • Download the .tar.gz file.
    • Open it in Automation Studio Logger (Ctrl+L → Load Data).
    • Review all diagnostic data offline.
  6. Attempt to upload the configuration.

    • In Automation Studio, use Online → Upload to pull the configuration from the PLC.
    • This gives you the configuration (hardware tree, task structure, network settings) without the source code.
    • Upload does not give you the PLC program logic, but it gives you the project skeleton.

8.2 Routine Health Check Procedure

For machines you maintain but did not program, perform these checks periodically:

  1. Open SDM → System Logbook — scan for new warnings/errors since last check.
  2. Task Monitor — verify no task is approaching its watchdog limit; check for any task in Error state.
  3. CPU Usage — ensure not consistently above 80%.
  4. Memory Information — ensure not above 90% (leave headroom for peak operation).
  5. I/O Module Status — verify all modules show OK.
  6. If anything looks off, create a system dump before the situation degrades.

8.3 Post-Fault Investigation Procedure

  1. Do not cycle power yet. The fault state contains diagnostic information.
  2. Open SDM → System Logbook — read the last 20+ entries to understand the fault sequence.
  3. Create a system dump immediately — this captures the fault state.
  4. Task Monitor — check if any task is in Error or has an extreme max cycle time.
  5. I/O Module Status — check if any module is in Error or Not Responding.
  6. Download the dump and analyze in Automation Studio Logger.
  7. Cross-reference error codes with the table in Section 6.
  8. Only after gathering all diagnostic information, address the root cause and restart the controller.

9. SDM Advanced Features

9.1 Alarm Visualization

SDM provides an alarm overview section that aggregates active alarms and warnings from the system logbook. On newer AR versions (V4.0+):

  • Active alarm count — grouped by severity (Warning, Error, Fatal).
  • Alarm list — each row shows timestamp, alarm class, alarm ID, source module, and description. Clicking may reveal additional detail on some versions.
  • Alarm acknowledgment — newer versions allow acknowledging alarms from the web interface, clearing them from the active display (does not fix the underlying cause).
  • Historical alarm filter — some versions include date/time range and severity filters.

On CP1584 controllers running older AR versions (V3.x), the alarm view is typically limited to a simple scrolling list of the most recent logbook entries with no filtering or acknowledgment capability.

SDM does not include built-in trending. Workarounds: programmatic polling with time-series storage (Section 10), B&R mapp View widget trends, Automation Studio Watch/Trace, or OPC-UA subscriptions to external tools like Grafana.

9.3 Firmware and Software Version Display

SDM shows key identifiers in the hardware information area:

FieldDescription
Automation Runtime versionAR version (e.g., V4.12, V4.73). Determines feature availability.
Target typeController model (e.g., CP1584, CP1585).
Serial numberHardware serial of the controller.
Hardware revisionPCB revision level.
System software versionAdditional software component versions.
Module firmware versionsFirmware of each I/O module (shown in I/O Module Status).

This information determines whether a specific SDM feature is available, whether firmware updates are needed, and which Automation Studio version is required to connect.

9.4 SDM Access via HTTPS (Newer AR Versions)

Starting with Automation Runtime V4.0, the B&R web server supports HTTPS:

https://<PLC_IP>/sdm

Requirements and notes:

  • TLS certificate — controller ships with a self-signed certificate (browsers show a security warning). CA-signed certificates can be uploaded via Automation Studio.
  • Must be explicitly enabled in AR configuration under System → Configuration → Web Server. Not enabled by default.
  • Port — HTTPS typically uses 443, configurable in web server settings.
  • HTTP redirect — some versions can redirect HTTP (port 80) to HTTPS (port 443).

For undocumented machines, try HTTP first (http://<PLC_IP>/sdm). If it fails, try HTTPS. If both fail, the web server or SDM may not be enabled.

9.5 SDM REST API for Programmatic Access

Newer Automation Runtime versions (V4.50+) expose a limited REST-like interface alongside the SDM web pages. This is not a fully documented public API, but the following endpoints are observable on V4.x controllers:

EndpointMethodDescription
/sdm/api/system/infoGETController type, AR version, serial number, uptime
/sdm/api/taskmonitorGETTask monitor data (names, cycle times, states)
/sdm/api/memoryGETMemory usage breakdown
/sdm/api/logbookGETRecent logbook entries; supports ?count=N and ?severity=Error
/sdm/api/modulesGETI/O module status list
/sdm/api/dumpPOSTTriggers system dump creation

Caveats: these endpoints are not officially documented and may change between firmware versions. On V3.x they generally do not exist. No auth on older firmware; newer may require credentials. Probe http://<PLC_IP>/sdm/api/system/info with curl to test.

9.6 SDM User Authentication

Starting with Automation Runtime V4.20, SDM supports optional user authentication:

  • Username/password login — credentials managed in AR configuration under System → Configuration → Users.
  • Default credentials — many controllers ship with a default admin account. Check default settings or machine documentation.
  • Role-based access — users can be assigned roles limiting access to certain SDM sections.
  • Anonymous access — on controllers where authentication is not configured, SDM remains open. Default on older firmware.

If you encounter a login prompt without credentials, check with the previous maintainer or OEM. Authentication cannot be bypassed via the web interface.

9.7 SDM System Configuration Display

SDM includes a read-only view of system configuration parameters. Typically visible:

  • Network configuration — IP address, subnet mask, gateway, DNS servers, hostname.
  • Time synchronization — SNTP/NTP server settings, current time, timezone offset.
  • Communication settings — ANSL port, OPC-UA endpoint, POWERLINK settings.
  • Task configuration — task names, configured cycle times, watchdog limits.
  • File system paths — default directories for logs, configuration, user data on CF card.

This read-only view is valuable for undocumented machines as it reveals operational settings without needing the project file. Not all parameters are visible through SDM — some are only accessible via Automation Studio.

9.8 SDM File Browser

On controllers with CompactFlash storage, some SDM versions include a file browser for viewing and downloading files:

  • System log files — text log files written by the runtime.
  • Configuration files.cfg, .xml configuration files on the CF card.
  • User files — files placed on the CF card by the application or user.
  • System dump files — previously created dumps stored on the controller.

Limitations: availability depends on AR version and web server configuration. Upload and deletion are typically not available — this is a read-only interface. Large files or deep directory trees may cause slow rendering or timeouts.


10. Programmatic SDM Data Access

10.1 Python Script to Scrape SDM Web Pages

For controllers running AR V3.x where no REST API exists, the HTML pages served by SDM can be parsed programmatically using requests and BeautifulSoup (pip install requests beautifulsoup4):

import requests
from bs4 import BeautifulSoup
from datetime import datetime
import json

PLC_IP = "192.168.1.10"
SDM_BASE = f"http://{PLC_IP}/sdm"

def get_sdm_page(path):
    url = f"{SDM_BASE}/{path}"
    resp = requests.get(url, timeout=10)
    resp.raise_for_status()
    return resp.text

def parse_task_monitor(html):
    soup = BeautifulSoup(html, "html.parser")
    table = soup.find("table")
    if not table:
        return []
    headers = [th.get_text(strip=True) for th in table.find_all("th")]
    tasks = []
    for row in table.find_all("tr")[1:]:
        cells = [td.get_text(strip=True) for td in row.find_all("td")]
        if len(cells) == len(headers):
            tasks.append(dict(zip(headers, cells)))
    return tasks

snapshot = {
    "timestamp": datetime.utcnow().isoformat() + "Z",
    "tasks": parse_task_monitor(get_sdm_page("taskmonitor")),
}
print(json.dumps(snapshot, indent=2, default=str))

Important notes:

  • The URL paths (/sdm/cpu, /sdm/taskmonitor, /sdm/memory) are illustrative. Actual paths vary by AR version. Inspect the SDM page source in a browser to determine correct paths for your controller.
  • Table structures in the SDM HTML change between firmware versions. Adjust the parsing logic accordingly.

10.2 Parsing the SDM HTML Interface Programmatically

The SDM interface is standard server-rendered HTML. To parse any SDM page:

  1. Inspect page source in your browser (F12 developer tools) to find <table> elements containing target data.
  2. Handle pagination — some pages paginate with URL parameters (e.g., ?page=2&count=50). Loop through pages to collect all entries.
  3. Handle frame-based layouts — older SDM versions use HTML framesets. Fetch frame URLs individually by inspecting <frame src="..."> attributes.
  4. Character encoding — controllers may serve ISO-8859-1 or UTF-8. Check the Content-Type header or set resp.encoding explicitly.

10.3 Using Requests + BeautifulSoup to Extract Task Monitor Data

The task monitor page is the most useful data to scrape. Key considerations:

  • Refresh rate — SDM shows snapshots. Poll every 30-60 seconds.
  • Max cycle time — running maximum since last restart. A sudden jump between polls indicates a recent anomaly.
  • Task state changes — transition from “Running” to “Error”/“Waiting” is an immediate alert.
  • Watchdog proximity — ratio of max cycle time to watchdog limit. Above 80%: warning; above 95%: critical.

10.4 Using SDM Data in Automated Monitoring Systems

SDM data can be integrated into monitoring tools: write a Prometheus exporter for Grafana dashboards, a Nagios/Icinga check plugin, use Telegraf’s http_json/exec plugins, or publish to MQTT for Node-RED subscribers. Key considerations: rate-limit polling (CP1584 web server has limited capacity), cache if multiple consumers need data, handle reboots gracefully, and track uptime to detect unexpected restarts.


11. System Dump Deep Dive

11.1 What Is Inside the .tar.gz File

A system dump .tar.gz archive typically contains:

system_dump/
  info/
    hardware.txt, software.txt, configuration.txt, network.txt
  log/
    logbook.txt, logbook_alarms.txt
  diagnostic/
    tasks.txt, memory.txt, io_status.txt, cpu.txt
  trace/
    cyclic_trace_*.dat, bus_trace_*.dat          (binary)
  files/
    *.cfg, *.xml                                (config snapshots)
  runtime/
    global_vars.bin, task_stacks.bin            (binary)

Exact contents vary by AR version and controller type. Trace and runtime sections may be empty if no tracing was configured. The info/ and log/ directories are always present.

11.2 Extracting and Examining Specific Dump Files Without Automation Studio

The .tar.gz archive is a standard tar+gzip file. No B&R software needed:

mkdir dump_extracted
tar xzf system_dump_20260710_143022.tar.gz -C dump_extracted

Key files to examine directly with any text editor:

  • info/hardware.txt — controller type, serial, AR version, hardware revision.
  • log/logbook.txt — complete logbook; most immediately useful for fault analysis.
  • diagnostic/tasks.txt — task cycle time statistics at dump time.
  • diagnostic/io_status.txt — I/O module listing and status.
  • diagnostic/memory.txt — memory usage at dump time.

Binary files (.dat, .bin) require Automation Studio Logger.

11.3 Log File Format Inside the Dump

The log/logbook.txt uses a structured text format:

[2026-07-10 14:30:22.123] [Error   ] [9210] [TaskMonitor] Cyclic#1 exceeded watchdog limit (cycle=52.3ms, limit=50.0ms)

Field breakdown: Timestamp (YYYY-MM-DD HH:MM:SS.mmm, controller local time), Severity (Info/Warning/Error/Fatal), Event ID (numeric, matching Section 6 codes), Source (subsystem or module), Description (may include numeric values). Some entries have additional fields or multi-line descriptions, especially hardware fault events.

11.4 Configuration Snapshot Content

The info/configuration.txt file contains key-value pairs. Typical entries:

Controller Type: CP1584
Automation Runtime: V4.73
Uptime: 14d 06h 23m 11s
Network.IP: 192.168.1.10
ANSL.Port: 11169
OPC-UA.Enabled: true
WebServer.Enabled: true
SDM.Enabled: true
Powerlink.CycleTime: 1000us

This captures only operational parameters the diagnostic subsystem can read. For complete configuration (hardware tree, task mappings, variables), you need the project file.

11.5 Comparing Dumps Over Time (Diff Analysis)

When troubleshooting intermittent issues, comparing dumps from different time points reveals state changes:

diff -u dump_20260709/log/logbook.txt dump_20260710/log/logbook.txt
diff -u dump_20260709/diagnostic/tasks.txt dump_20260710/diagnostic/tasks.txt
diff -u dump_20260709/diagnostic/memory.txt dump_20260710/diagnostic/memory.txt

What to look for:

  • New error entries — errors in the later dump indicate a developing fault.
  • Memory growth — increasing user memory across dumps without a corresponding decrease suggests a memory leak.
  • Max cycle time increase — a task’s max cycle time growing progressively indicates accumulating latency.
  • Module status changes — a module going from OK to Error points to hardware degradation.
  • Configuration changes — differences in configuration.txt mean someone changed runtime settings between dumps.

11.6 Retention and Storage of Dumps for Compliance

For environments requiring diagnostic retention:

  • Naming conventionPLC01_CP1584_FAULT_20260710.tar.gz (machine ID, controller, reason, date).
  • Storage — network share alongside maintenance logs.
  • Retention — at least warranty period or regulatory requirement (typically 2-5 years for ISO 9001).
  • Metadata log — spreadsheet tracking date, machine ID, serial, AR version, reason, file location, analysis notes, root cause.
  • Size — 5-50 MB compressed. Store compressed; dispose per data retention policy when expired.

11.7 System Dump via CLI: systemdump.py (Open Source)

The systemdump.py tool by the hilch community contributor automates system dump creation, upload, and inventory extraction from the command line — no browser or Automation Studio required.

Installation:

pip install systemdumpy

Creating, uploading, and saving a dump from CLI:

py -m systemdumpy 192.168.1.10 -cuv -p MyMachine_

Output:

create a systemdump on 192.168.1.10
upload systemdump from 192.168.1.10
saving MyMachine__BuR_SDM_Sysdump_2026-07-10_14-30-55.tar.gz (2820986) bytes

Flags:

FlagAction
-cCreate a dump on the remote PLC
-uUpload/download the dump from PLC to local file
-dDelete the last dump from the PLC (free storage)
-nCreate dump without data files (logger, NCT, profiler — smaller)
-p PREFIXPrepend a prefix to the output filename
-iCreate an inventory list (.xlsx) from an existing dump file
-vVerbose output

Batch automation example — dump all machines on a subnet:

for ip in 192.168.1.10 192.168.1.11 192.168.1.12; do
  py -m systemdumpy "$ip" -cuv -p "$(hostname)_${ip}_" || echo "FAILED: $ip"
done

Creating hardware inventory from an existing dump file:

py -m systemdumpy BuR_SDM_Sysdump_2026-07-10_17-43-05.tar.gz -iv

This extracts all hardware module information (type, serial, firmware, status) into an .xlsx spreadsheet — invaluable for building spare parts inventories on undocumented machines. See spare-parts.md for the inventory methodology.

Viewing dumps without Automation Studio:

The SystemDumpViewer (GPL v3, desktop app) can open .tar.gz system dump files on any platform without Automation Studio installed. It displays hardware info, logbook, task timing, IO status, and memory data from the XML inside the archive.


12. AR Logbook Deep Analysis

12.1 Logbook Entry Format Details

The Automation Runtime system logbook records events in a structured format. Understanding the exact field layout is essential for programmatic parsing and filtering:

[YYYY-MM-DD HH:MM:SS.mmm] [Severity  ] [EventID] [Source          ] Description text

Severity levels in order of increasing criticality:

LevelMeaningController Response
InfoInformational (startup, normal state change)Logged only. No action.
WarningNon-critical anomalyLogged. May trigger user alarm. Controller continues.
ErrorFault affecting a subsystemLogged. Affected subsystem may halt. Other tasks continue.
FatalCritical fault requiring restartLogged. Controller goes to Error/Stop state. Manual intervention required.

Timestamps use the controller’s local time. If the clock is wrong (no SNTP sync, dead backup battery), timestamps will be offset from real time. Always verify time sync before relying on timestamps for forensic analysis.

12.2 Filter Patterns for Common Issues

When searching the logbook for specific problem categories:

Communication issues:

  • Event IDs: 9214, 5xxx range. Sources: ANSL, PVI, Powerlink, EtherCAT, Modbus.
  • Descriptions: timeout, connection lost, cable, retry.

Task/execution issues:

  • Event IDs: 9210, 5xxx range. Sources: TaskMonitor, Cyclic, Timer.
  • Descriptions: exceeded, watchdog, cycle time, overflow.

Hardware issues:

  • Event IDs: 9204 (temperature), 9206 (module fault). Sources: Hardware, I/O, Bus.
  • Descriptions: temperature, fault, not responding, inserted, removed.

Memory issues:

  • Event ID: 9212. Descriptions: memory, allocation, buffer, insufficient.

Startup issues:

  • Severity Fatal in the first 60 seconds after boot timestamps.
  • Descriptions: configuration, firmware, initialization, boot.

12.3 Logbook Capacity and Rollover Behavior

The AR system logbook has finite capacity:

  • Memory buffer — stored in a fixed-size memory buffer, typically 64 KB to 1 MB depending on controller and configuration.
  • Ring buffer — when full, oldest entries are overwritten. No archive to non-volatile storage by default.
  • Entry size — 80-200 bytes typical. A 512 KB buffer holds approximately 2,500-6,000 entries.
  • Estimated capacity — moderate event activity retains 1-3 days; many warnings may only retain a few hours.

Implications:

  • Dumps are essential for long-term analysis — the buffer rolls over, so creating a system dump is the only way to preserve data.
  • After a fault, dump immediately — root-cause entries will eventually be pushed out by subsequent events.
  • Logbook-to-file — AR V4.x can optionally write logbook entries to a file on the CF card (check AR configuration under System → Configuration → Logbook).

12.4 Exporting Logbook to CSV or Text

Via SDM file browser: navigate to logbook file (typically /log/logbook.txt on CF card) and download.

Via Automation Studio Logger: load dump or connect live, select Logbook view, use File → Export Data.

On machines using POWERLINK as the fieldbus:

  • POWERLINK cycle errors — logbook entries with source Powerlink or event IDs in the 6xxx range indicate fieldbus issues, correlating with I/O module status changes in SDM.
  • Timing correlation — a POWERLINK cycle error followed by a task watchdog timeout (event 9210) within the next few entries indicates the communication fault caused a task to block waiting for I/O data.
  • Node-related events — POWERLINK entries referencing specific node numbers cross-reference to I/O modules in SDM to identify the affected physical module.
  • Isochronous mode violations — entries mentioning isochronous or timing violation indicate the network cycle was disrupted, potentially causing motion control or synchronized I/O errors.

For deeper POWERLINK analysis, the dump’s trace/cyclic_trace_*.dat files contain captured cycle data (requires Automation Studio Logger).

12.6 Logbook Retention Policy

ScenarioMethodDuration
In-memory ring buffer (default)Overwrites oldest entries1-3 days
Logbook to CF card file (V4.x)Append to fileWeeks to months
System dump exportStatic .tar.gz on PCPermanent
External log collectionProgrammatic scraping + storageConfigurable

Recommended: configure logbook-to-file on CF card (if supported), create periodic system dumps, and use a Python scraper to capture entries to a central database.

12.7 Reading Logbook via OPC-UA or PVI

For controllers with OPC-UA enabled, logbook entries can be read programmatically:

  • OPC-UA logbook node — under Objects > System > Logbook, provides recent entries as an array. Subscribing gives near-real-time updates.
  • PVI logbook access — PVI provides a logbook object readable via the PVI .NET, C++, or Python API.
  • Event subscriptions — OPC-UA event subscriptions push logbook events as they occur, eliminating polling. Server-side filtering by severity, source, and event ID is supported.
  • Endpoint — typically opc.tcp://<PLC_IP>:4840. Requires OPC-UA enabled in AR configuration and a user account with sufficient permissions.

13. SDM Configuration Without Automation Studio

13.1 Checking if SDM Is Enabled via FTP

When you cannot use Automation Studio, check SDM status by inspecting configuration files via FTP:

  1. Connect: ftp <PLC_IP> (default credentials vary; common: admin/admin or no auth on older firmware).
  2. Navigate to configuration directories (e.g., /System/Config/, /CF/).
  3. Look for files controlling web server and SDM: Config.ini (may contain [WebServer] with Enabled=1), SysConfig.xml (XML configuration), BRSystemConfig.cfg (B&R proprietary).
ftp 192.168.1.10
ftp> cd System/Config
ftp> get Config.ini
ftp> get SysConfig.xml
ftp> bye

13.2 Enabling SDM by Modifying Configuration on CF Card

If SDM is not enabled, it may be possible to enable it by modifying configuration files:

In Config.ini — add or modify:

[WebServer]
Enabled=1
Port=80
[SDM]
Enabled=1

In SysConfig.xml — set the enabled attribute:

<WebServer Enabled="true" Port="80">
  <SDM Enabled="true" />
</WebServer>

After modification: upload the file via FTP, restart the controller (cold boot is most reliable), and verify at http://<PLC_IP>/sdm.

13.3 What Configuration Files Control SDM and Web Server

FileFormatControlsLocation
Config.iniINIWeb server enable, port, SDM enable/System/Config/ or CF root
SysConfig.xmlXMLWeb server, SDM, OPC-UA, network, time sync/System/Config/
BRSystemConfig.cfgB&R proprietarySystem-wide config including web services/System/
WebServer.cfgB&R proprietaryWeb server specific settings/System/WebServer/

Exact file names and locations vary between AR versions. V3.x uses primarily .ini/.cfg; V4.x uses more XML. Inspect the file system via FTP to determine what is present.

13.4 Risks of Modifying Configuration Files Manually

Modifying configuration files directly on the CF card bypasses all validation that Automation Studio performs. Key risks:

  • Syntax errors — an incorrectly formatted INI or XML file may cause the controller to fail to boot or refuse to start services.
  • Encoding issues — configuration files must use ASCII or ISO-8859-1. Editing on Windows may introduce BOM markers or CRLF line endings the controller cannot parse.
  • File permissions — modifying files via FTP may change permissions, preventing the runtime from reading them.
  • No validation — invalid port numbers or misspelled settings are silently ignored or cause unpredictable behavior.
  • Recovery difficulty — if the modified configuration prevents boot, recovery requires a known-good CF card image or Automation Studio (which may also fail to connect).

Mitigation: always back up the original file first, make one change at a time, keep a record of changes, and have a recovery plan (known-good CF card image or B&R support contact). Prefer Automation Studio’s “Upload from PLC, Modify, Download” workflow whenever possible.


14. Key Findings Summary

  • SDM is built into Automation Runtime V3.0+ and requires no additional software to access.
  • Web-based access at http://<PLC_IP>/sdm from any browser — no project file, no Automation Studio, no documentation needed.
  • System logbook is the primary diagnostic tool for understanding controller faults.
  • Task Monitor reveals task cycle times and loads — critical for diagnosing watchdog timeouts (error 9210).
  • System dumps (.tar.gz) can be exported from SDM and analyzed offline in Automation Studio Logger (Ctrl+L → Load Data).
  • Logger requires a project to be open — use a dummy project if the real project is unavailable.
  • ANSL default port 11169 is required for Automation Studio and PVI communication — separate from SDM’s HTTP port 80.
  • Common error codes include 8021 (config error), 8099 (general), 9204 (temperature shutdown), 9210 (watchdog/reset), and others documented in Section 6.
  • Temperature shutdown (9204) is a critical physical fault — always check ventilation and cooling before restarting.
  • SDM configuration (web server + SDM enabled) must be set in the AR configuration — if not already enabled on the target controller, you need Automation Studio to enable it.

15. Security Vulnerabilities in SDM

CVE-2025-3450 — SDM Denial-of-Service (Improper Resource Locking)

DetailValue
CVECVE-2025-3450
CVSSv3.1 7.5 (High), v4.0 8.2 (High)
AffectedAR < 6.3 and AR = 6.0
ImpactSystem node stop via crafted HTTP request to SDM
AuthenticationUnauthenticated (network-based)
AdvisoryB&R SA25P002 (2025-10-07)

All CP1584 systems running AR 4.x are affected. An attacker who can reach port 80/443 can crash the entire controller by sending a specially crafted message to the SDM web interface. This is not theoretical — B&R discovered it through internal security testing.

Mitigations (for systems that cannot update to AR R4.93):

  1. Disable SDM in the Automation Studio project if not actively needed for maintenance. AR Help GUID: 1d915d67-07f7-4034-a472-c204b5cabbfe
  2. Enable HTTPS with mutual TLS (mTLS) — in AS project, option “Validate SSL communication partner” (GUID: 01ced6c0-28ef-4aaa-bd05-2442b971859c). Note: mTLS also affects other web applications using the AR webserver (mapp View, etc.)
  3. Restrict webserver access to trusted IPs using the AR host-based firewall (GUID: 75b8994b-f97a-4e0f-8278-43c2a737e65f)
  4. Block port 80/443 at the network firewall except during active maintenance windows
  5. Never expose SDM to the internet or untrusted networks

CVE-2022-4286 — SDM Reflected XSS

DetailValue
CVECVE-2022-4286
CVSS6.1 (Medium)
AffectedAR >= 3.00 and <= C4.93
ImpactReflected cross-site scripting — JavaScript execution in authenticated user’s browser
AuthenticationRequires user interaction (click malicious link while authenticated)
PatchedAR R4.93

Mitigation: Update to AR R4.93. On older versions, avoid clicking untrusted links while authenticated to SDM.

CVE-2025-3449 — SDM Session Takeover (Predictable Session ID)

DetailValue
CVECVE-2025-3449
CVSSv3.1 4.2 (Medium)
CWECWE-340 (Generation of Predictable Numbers or Identifiers)
AffectedAR < 6.4 (all AR 4.x versions)
ImpactUnauthenticated attacker can take over an already-established SDM session by predicting the session ID
AdvisoryB&R SA25P003 (2025-10-07), CISA ICSA-26-141-04

Practical implications: Since SDM on older AR 4.x versions has no authentication, the predictable session ID means an attacker could hijack a maintenance engineer’s active SDM session. However, B&R notes SDM does not currently process session-specific data, so the practical impact is limited.

Mitigation: Block SDM access at the network firewall when not actively debugging. Never access SDM over untrusted networks. See ar-rtos.md Section 14.15 for full details.

CVE-2025-3448 — SDM Reflected XSS (New, Distinct from CVE-2022-4286)

DetailValue
CVECVE-2025-3448
CVSSv3.1 6.1 (Medium)
CWECWE-79 (Improper Neutralization of Input During Web Page Generation)
AffectedAR < 6.4 (all AR 4.x versions)
ImpactReflected XSS — attacker can execute arbitrary JavaScript in victim’s browser via crafted SDM URL
AdvisoryB&R SA25P003 (2025-10-07), CISA ICSA-26-141-04

Note: This is a separate vulnerability from CVE-2022-4286 (which was patched in R4.93). CVE-2025-3448 remains unpatched on all AR 4.x versions.

Mitigation: Do not click untrusted links while authenticated to SDM. Deploy a Web Application Firewall (WAF) to filter reflected XSS attempts. Never follow hyperlinks to SDM from emails, social media, or messaging apps.

CVE-2025-11498 — SDM CSV Injection

DetailValue
CVECVE-2025-11498
CVSSv3.1 6.1 (Medium)
CWECWE-1236 (Improper Neutralization of Formula Elements in a CSV File)
AffectedAR < 6.4 (all AR 4.x versions)
ImpactAttacker injects formula data into SDM-generated CSV exports via crafted URL; victim must click link AND manually open CSV in spreadsheet app
AdvisoryB&R SA25P003 (2025-10-14), CISA ICSA-26-141-04

Mitigation: Never use hyperlinks from untrusted sources to access SDM. If you export CSV diagnostic data from SDM, verify the URL was manually typed. Open CSV files from untrusted sources in a text editor first, not directly in Excel.

CVE-2021-22275 — AR Webserver Buffer Overflow (Stops Cyclic Program)

DetailValue
CVECVE-2021-22275
CVSS8.6 (High)
ImpactUnauthenticated DoS — stops cyclic program via crafted HTTP request
AffectedAutomation Runtime

Distinct from CVE-2025-3450 (which targets SDM specifically), this older vulnerability targets the AR webserver more broadly. On affected AR 4.x versions, any HTTP request to port 80 can potentially crash the cyclic program.

SDM Security Recommendations Summary

Risk LevelAction
ImmediateDisable SDM on all production CP1584s that don’t need active monitoring
Short-termConfigure HTTPS with mTLS; restrict webserver to trusted IPs via AR firewall
Medium-termBlock ports 80/443 at network firewall; enable only during maintenance windows
Long-termUpdate to AR R4.93 (patches CVE-2025-3450, CVE-2022-4286, CVE-2023-3242, CVE-2025-11044). Note: SA25P003 CVEs (CVE-2025-3449/3448/11498) require AR >= 6.4 and cannot be patched on any AR 4.x version — further reason to disable SDM on production PLCs.

See ar-rtos.md Section 14 for the complete vulnerability catalog and cp1584-forensics.md for the forensic workflow with security considerations.


16. B&R Automation Academy SDM Learning Content (2026)

In March 2026, B&R released a free microlearning module for the System Diagnostics Manager (SDM) as part of the Automation Academy. This is specifically targeted at end users and service engineers who need quick, reliable diagnostic insights without deep Automation Studio knowledge.

What it covers:

  • How to navigate the SDM web interface
  • Reading and interpreting the system logbook
  • Task monitor usage for performance diagnostics
  • I/O module status interpretation
  • Creating and downloading system dumps
  • Common error code identification

Access: Free through the B&R Automation Academy. Search the B&R Community for “Learning Content for End Users and Service Engineers: SDM” or visit the Automation Academy portal.

Relevance for undocumented machine maintainers: If you are new to B&R systems (inheriting a machine from a defunct OEM), this free training module is an efficient way to learn SDM without needing an Automation Studio license or B&R service contract. It complements this document by providing structured, vendor-approved training material.

Related: B&R also released a “Service & Diagnostics” training track in 2026 covering broader diagnostic techniques. See community.br-automation.com/t/release-2026-new-training-service-diagnostics/11444.


Key Findings

  1. SDM is the central diagnostic hub for B&R systems. It aggregates hardware status, task monitoring, IO state, logbook entries, alarm events, and firmware information into a single web-based interface accessible from any browser.

  2. SDM is accessible without Automation Studio. The built-in web server (default port 80/443) provides full diagnostic access to any device on the network — no project files, no AS license, and no OEM credentials required.

  3. The SDM logbook is the primary forensic data source. Every AR boot, error, warning, and configuration change is timestamped and stored in the logbook. Bulk export via FTP provides the raw material for post-mortem analysis.

  4. SDM has known security vulnerabilities. Multiple CVEs affect the SDM web interface (reflected XSS, DoS, authentication weaknesses). On isolated networks this is manageable; on connected networks, the SDM port should be firewalled.

  5. Hardware tree in SDM reveals the complete system topology. The hardware tree shows every module, its status, firmware version, and connection path. For undocumented machines, this is the fastest way to map out what hardware is installed.

  6. Task Monitor data correlates directly with execution-model.md. SDM shows real-time task cycle times, jitter, and watchdog status — making it the operational complement to the theoretical execution model documentation.


17. Cross-References

Related FileRelevance
firmware.mdAutomation Runtime versions, firmware update procedures, version compatibility with SDM features
execution-model.mdTask configuration, cycle times, task priorities, watchdog behavior — directly relevant to Task Monitor data in SDM
alarm-logging.mdUser-level alarm and event logging — complements the system-level logbook in SDM
system-variables.mdB&R system variables accessible via Automation Studio that provide additional diagnostic data beyond what SDM shows
python-diagnostics.mdPython scripts for SDM data scraping, automated health checks, and logbook parsing
opcua.mdReading diagnostic data via OPC-UA — logbook subscriptions, task monitor access, and alarm event feeds
hardware-monitoring.mdTemperature monitoring, fan status, and environmental sensor data — complements SDM hardware info
time-sync.mdTimestamp correlation between controller clock, SNTP, and PC time — critical for accurate logbook analysis
cp1584-forensics.mdForensic analysis workflow for CP1584 controllers — combining SDM dumps, logbook analysis, and hardware inspection
ftp-web-interface.mdFTP access to config/log files on the CF card — enabling SDM, inspecting configuration, and retrieving logbook files
io-card-hardware.mdIO module LED diagnostic patterns — interpreting ‘r’, ‘e’, ‘S’, ‘l’ LEDs that SDM also reports digitally
io-sniffing.mdProtocol-level IO diagnostics for X2X and POWERLINK — when SDM shows communication errors
network-architecture.mdNetwork topology and device enumeration — mapping all devices visible in SDM’s hardware tree
config-file-formats.mdConfiguration files controlling SDM enable/disable and webserver settings
access-recovery.mdPassword recovery when SDM requires authentication
cybersecurity-hardening.mdSDM security vulnerabilities and hardening — SDM is a critical attack surface
pvi-api.mdPVI API for programmatic access to SDM diagnostic data from external applications
acopos-drives.mdACOPOS drive status monitoring via SDM — drive fault codes, DC bus voltage, temperature
grounding-emc.mdEMC troubleshooting when SDM reports intermittent communication errors
online-changes.mdRuntime changes visible in SDM — how SDM reflects configuration modifications
cf-card-boot.mdCF card backup procedures using SDM system dump export
diagnostic-workstation.mdSetting up a workstation that uses SDM as a primary diagnostic tool
bootloader-recovery.mdRecovery procedures when SDM is inaccessible due to boot failure
remanufacturing.mdUsing SDM data to document a machine before control system replacement

Document generated for undocumented CP1584 maintenance scenarios. Verify all procedures against the specific controller firmware version in your environment.

B&R CP1584 Forensic Information Extraction Guide

Overview

This guide provides a systematic methodology for extracting every possible piece of information from a B&R CP1584 programmable logic controller when no original project files, documentation, or OEM support exists. It is written for automation engineers who have inherited undocumented machines built on B&R hardware from defunct or unresponsive OEMs.

The CP1584 is a B&R X20 Compact CPU controller with an Intel Atom processor, running B&R Automation Runtime (VxWorks-based on the CP1584; newer B&R controllers use a hypervisor with Linux alongside AR). It ships with Ethernet connectivity, CF card storage, OPC-UA capability, PVI (Process Visualization Interface) support, and the SDM (System Diagnostics Manager) web service.

The extraction process follows two fundamental phases:

  1. Discovery — Locate the PLC on the network and identify what services it exposes.
  2. Extraction — Pull data, configuration, logs, and runtime state from every accessible interface.

Everything documented here is non-destructive and read-only unless explicitly noted. Nothing here requires physical access to the controller beyond network connectivity and (optionally) a VNC connection.


1. Network Discovery

1.1 ANSL Protocol Discovery

B&R PLCs broadcast ANSL (Automation Network Service Layer) discovery packets. These are the fastest way to find a CP1584 on an unknown network.

Wireshark capture filter:

udp port 30303 or udp port 11169

Step-by-step procedure:

  1. Connect your workstation to the same physical or VLAN segment as the machine network.
  2. Open Wireshark and start a capture on the active interface.
  3. Apply the ANSL filter above.
  4. Within a few seconds you should see broadcast packets from the CP1584 containing:
    • Device name (configurable by the OEM, often descriptive)
    • IP address
    • Serial number
    • Firmware version
    • Automation Runtime version
    • ANSL protocol version
  5. Stop the capture and note the IP address.

If no ANSL packets appear, the PLC may be on a different subnet or ANSL discovery may be disabled in the controller’s network configuration.

1.2 nmap Service Scan

Once you have the IP address from ANSL or from a network diagram, scan for exposed services:

nmap -sV -p 80,21,11169,4840,5900,5800,8080,443,502 <PLC_IP>

Expected open ports and their significance:

PortServiceWhat it gives you
80HTTPSDM web interface, possibly 404 but headers reveal “B&R computer”
4840OPC-UAFull namespace browsing if configured by the OEM
11169PVI / ANSLPVI Manager communication port — the COMT port
21FTPCF card file access including user partition F:\
5900VNCRemote HMI display (if a visualization is running)
5800HTTP-VNCJava-based VNC viewer via browser (legacy)
8080HTTP altSecondary web service or OPC-UA HTTP gateway
502Modbus TCPIf a Modbus gateway task is running

1.3 B&R Separate IP Addresses

Some B&R hardware configurations use two independent network interfaces: one for process data/communication and one dedicated to visualization/HMI traffic. Check both interfaces during discovery. The ANSL packets will reveal both IPs if this is configured.


2. Web Interface (Port 80)

2.1 SDM — System Diagnostics Manager

The SDM is B&R’s built-in web-based diagnostics service. Access it at:

http://<PLC_IP>/sdm

What you get from SDM:

  • Logbook entries — timestamped system events, errors, warnings, and info messages. This is a goldmine for understanding what the machine does, what errors it encounters, and what tasks are running.
  • Task list — all running Automation Runtime tasks with CPU usage, cycle times, and memory consumption.
  • Hardware configuration — installed modules, firmware versions, serial numbers.
  • Network configuration — IP addresses, subnet masks, gateway, DNS.
  • File system browser — limited view of the CF card directory structure.
  • AR system information — Automation Runtime version, licensing status, uptime.

Step-by-step SDM exploration:

  1. Open http://<PLC_IP>/sdm in a browser.

  2. If prompted for credentials, try:

    • admin / no password
    • admin / admin
    • No credentials at all (anonymous access is common on older firmware) Security Warning (CVE-2025-3450): The SDM web interface has a known denial-of-service vulnerability (CVSS v3.1 7.5 High) in all AR versions before R4.93. An unauthenticated network attacker can send a crafted request to crash the controller via SDM. See diagnostics-sdm.md and ar-rtos.md Section 14.5 for full details and mitigations. When accessing SDM on unpatched systems, block port 80/443 at the firewall except during active maintenance windows, or use HTTPS with mutual TLS.
  3. Navigate to Logbook and export all available entries. These contain task names, error codes, and operational context.

  4. Navigate to Task Monitor and record every running task name. These map directly to PVI objects and are critical for OPC-UA/PVI reconstruction.

  5. Navigate to Hardware and record all module types, serial numbers, and firmware versions.

  6. Export or screenshot everything.

2.2 System Dump via SDM

The SDM web interface provides a button to create a system dump. This is a .tar.gz archive of the controller’s complete runtime state.

Procedure:

  1. In SDM, navigate to Diagnostics > Create System Dump.
  2. Wait for the dump to be generated (can take several minutes depending on CF card speed and system complexity).
  3. Download the .tar.gz file.
  4. Extract and analyze:
mkdir dump_analysis && tar -xzf system_dump.tar.gz -C dump_analysis/
find dump_analysis/ -type f

What the system dump typically contains:

  • AR log files (*.log, *.arlog)
  • Task memory snapshots
  • Network configuration files
  • License files
  • Installed software package manifest
  • Runtime configuration
  • Variable listing (partial — may include names and data types)
  • I/O mapping information
  • Recipe data
  • User partition file structure

2.3 Header Fingerprinting

Even if the web interface returns a 404, the HTTP response headers reveal critical information:

curl -v http://<PLC_IP>/ 2>&1 | head -30

Look for:

Server: B&R
X-Powered-By: B&R Automation Runtime

This confirms the device is a B&R controller even when the web root returns nothing useful.


3. FTP Access — CF Card Forensics

3.1 Connecting to the FTP Server

The CP1584 exposes its CF card filesystem via FTP. Connect with any FTP client:

ftp <PLC_IP>

Or with curl for scripted directory listing:

curl -s ftp://<PLC_IP>/ --list-only

Credentials to try:

  • Anonymous login (anonymous / any email as password)
  • admin / no password
  • admin / admin
  • Check the SDM network configuration page for configured FTP credentials.

3.2 Directory Structure

The CF card is organized into system and user partitions:

/                        ← System root
/System/                 ← Automation Runtime system files
/AT/                     ← Automation Runtime core
/AS/                     ← Automation Studio project files (if deployed)
/Temp/                   ← Temporary files, sometimes includes logs
/Licenses/               ← License files (.lic)
/Web/                    ← Web server files
/F:/                     ← User partition (designated as F:\ in B&R path notation)

3.3 User Partition (F:)

The user partition is where the deployed project lives. This is the most valuable target on the entire controller.

What to look for:

Path / PatternWhat it is
F:/Project/Deployed Automation Studio project structure
F:/Project/*.apjProject files — partial or full project archive
F:/Project/logic/PLC program source (may be compiled .pc or source .st)
F:/Project/visualization/Visualization project files (mapp View, VNC)
F:/Project/hardware/Hardware configuration (.hw files)
F:/Project/parameters/Machine parameters, recipe files
F:/Project/io/I/O mapping configuration
F:/*.logApplication log files
F:/*.csvData logs, recipe files, production records
F:/*.txtConfiguration files, notes left by OEM developers
F:/*.iniInitialization and configuration files
F:/*.xmlConfiguration, OPC-UA namespace exports, mapp config
F:/*.cfgSystem and application configuration
F:/*.arconfigAutomation Runtime configuration
F:Recipes/Recipe management directory
F:/DataLog/Datalogger output files
F:/AlarmLog/Alarm history files

Recursive download of the user partition:

wget -r -nH --cut-dirs=2 ftp://<PLC_IP>/F:/ -P cp1584-user-partition/

Or with lftp (better for large transfers):

lftp -u admin, -e "mirror --verbose --parallel=4 /F:/ ./cp1584-user-partition/" <PLC_IP>

3.4 Critical Configuration Files

If present on the CF card, these files are essential for reconstruction:

  • PvConfig.xml or PviConfig.xml — PVI Manager configuration including all registered variables, COMT ports, and transport types.
  • opcua_config.xml or UaServerConfig.xml — OPC-UA server namespace configuration with all published nodes.
  • mappServices.xml — Configuration for B&R mapp components (AlarmX, DataX, RecipeX, FileX, etc.).
  • ARConfig.cfg — Automation Runtime base configuration.
  • UserPar.dat or UserPar.cfg — User parameters and machine settings.
  • NetworkConfig.xml — Network interface configuration.

3.5 Datalogger and Alarm Archives

The B&R mapp DataX component writes .csv or proprietary binary files to the CF card. These archives can reveal:

  • Which variables are being logged and their engineering units
  • Sampling rates and trigger conditions
  • Historical trends that document machine behavior over time
  • Alarm history with timestamps, severity, and associated variables

4. OPC-UA Data Extraction

4.1 Prerequisites

OPC-UA is the single most productive extraction point if it was configured by the OEM. Many B&R machines from the last 10+ years run an OPC-UA server because it is the standard B&R communication layer for mapp View visualization and for SCADA/ MES integration.

Connection test:

nmap -pU 4840,sT 4840 <PLC_IP>

If port 4840 is open, proceed to namespace browsing.

4.2 UaExpert — OPC-UA Client

UaExpert is a free OPC-UA client from Unified Automation that supports namespace browsing without prior knowledge of the server configuration.

Procedure:

  1. Download and install UaExpert.
  2. Add a new server: opc.tcp://<PLC_IP>:4840
  3. If authentication is required, try:
    • Anonymous
    • Username/Password: admin / admin, User / User
    • Certificate-based (you would need the OEM’s certificate — unlikely without documentation)
  4. Once connected, expand the address space tree.
  5. Browse every namespace systematically. B&R OPC-UA servers typically expose:
    • Namespace 0: OPC-UA standard types (skip unless debugging)
    • Namespace 1-2: B&R system namespace with controller status, task info, hardware info
    • Namespace 3+: Application-specific namespaces created by the OEM

4.3 What to Extract from Each Namespace

For every variable node you find, record:

FieldWhy it matters
Node IDUnique identifier — you need this for PVI/OPC-UA programming
Display NameHuman-readable name — often reveals variable purpose
DescriptionMay contain engineering units, ranges, or documentation
Data TypeINT, REAL, BOOL, STRING, etc. — needed for reconstruction
Array DimensionsIf an array, the dimension reveals batch sizes, table lengths
ValueCurrent runtime value — reveals machine state
Access LevelRead/write — writable variables are control inputs
Browse Name PathHierarchy shows logical grouping (e.g., “Axis1/Position”)

UaExpert extraction procedure:

  1. Right-click on the top-level application namespace folder.
  2. Select Add to Document > Data Access View to subscribe to all variables.
  3. Export the address space: File > Export Address Space > CSV.
  4. The CSV export gives you the complete node list with IDs, names, types, and descriptions.
  5. Save this CSV — it is a primary artifact for project reconstruction.

4.4 Identifying Functional Groups

OPC-UA node hierarchy often reveals the machine’s functional structure:

Machine
├── Axis_Control
│   ├── Spindle_Speed      (REAL, R/W)
│   ├── Target_Position    (REAL, R/W)
│   ├── Actual_Position    (REAL, R)
│   └── Homing_Status      (BOOL, R)
├── Temperature
│   ├── Zone_1_Actual      (REAL, R)
│   ├── Zone_1_Setpoint    (REAL, R/W)
│   └── Heater_Enable      (BOOL, R/W)
├── Recipe
│   ├── Current_Recipe_Name (STRING, R/W)
│   ├── Load_Recipe        (METHOD)
│   └── Save_Recipe        (METHOD)
├── Status
│   ├── Machine_State      (UINT, R)
│   ├── Error_Code         (UINT, R)
│   ├── Error_Text         (STRING, R)
│   └── Cycle_Counter      (UDINT, R)
└── Commands
    ├── Start              (METHOD)
    ├── Stop               (METHOD)
    └── Reset              (METHOD)

Map every group and variable. This structure is essentially the machine’s functional specification.

4.5 Method and Event Nodes

B&R OPC-UA servers expose methods (callable functions) and events (notifications). In UaExpert:

  • Methods appear under the object node. Right-click and select Call to see input/output argument signatures.
  • Events can be subscribed to via the Event View. Subscribe to the server node to capture all events and record their fields.

Methods are especially valuable — they reveal the machine’s command interface (start, stop, recipe load, homing, etc.).


5. PVI API Access

5.1 Connecting Without a Project

The PVI Manager (Process Visualization Interface) is B&R’s native communication layer. It runs on the CP1584 and listens for PVI client connections. You can connect to it without any project files if you know the IP address and the COMT port.

Connection parameters:

ParameterValue / Description
COMT350 (default for Ethernet PVI connections)
PT11169 (default PVI transport port for TCP/IP). Note: Some documentation references port 11160 (INA2000 legacy). Port 11169 is the ANSL COMT port; 11160 is the INA2000 PVI transport port. Both may work depending on AR version.
IPThe controller’s IP address

5.2 PVI Transfer Tool

The PVI Transfer Tool is a standalone B&R utility that can:

  • Connect to a PVI Manager by IP address and COMT port
  • Browse all registered PVI objects (variables, data structures, arrays)
  • Read and write variable values in real time
  • Export the variable list

Connection procedure:

  1. Launch PVI Transfer Tool.
  2. Enter connection parameters: IP = <PLC_IP>, COMT = 350, PT = 11169.
  3. Click Connect.
  4. Browse the object tree. Every registered variable appears with its data type and current value.
  5. Export the complete variable list.

5.3 Programmatic PVI Access (Python)

If you need scripted access, the B&R PVI protocol can be implemented over TCP. The PVI Manager on the controller accepts text-based commands on port 11169.

import socket

PLC_IP = "192.168.1.100"
COMT_PORT = 11169

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((PLC_IP, COMT_PORT))
sock.settimeout(5)

def pvi_send(cmd):
    msg = f"{cmd}\r\n"
    sock.send(msg.encode('ascii'))
    return sock.recv(4096).decode('ascii', errors='replace')

pvi_send('CN="cp",C="cp",PVT="TCPIP",PVN="<PLC_IP>"')
print(pvi_send('CM="cp",C="ST",O="CPU"'))
print(pvi_send('RN="cp",C="ST",O="CPU",LN="State"'))
print(pvi_send('RG="cp",C="ST",O="CPU",LN="State"'))

sock.close()

This is a simplified example. The full PVI protocol documentation covers connect/read/write/unconnect sequences with specific escape character handling. Refer to the B&R PVI API documentation for complete protocol details.

5.4 PVI Limitations Without Project

  • You can only access variables that are registered in the PVI Manager. If the OEM did not register a variable for external access, it is invisible.
  • Data structures and arrays appear as registered objects but you need to know their element layout to interpret raw byte reads.
  • Variable names in PVI may differ from the OPC-UA display names — cross-reference both for complete coverage.

6. Forced I/O Reading

6.1 The Problem

Direct I/O reading (forcing, observing raw digital/analog I/O state at the hardware level) is not available without the original project configuration that defines the I/O mapping. The Automation Runtime knows which physical I/O points exist, but without the logical mapping from project files, you cannot directly correlate physical inputs/outputs to program variables.

6.2 Indirect I/O Observation via OPC-UA or PVI

If the OEM mapped I/O variables into the OPC-UA namespace or registered them in PVI, you can observe them indirectly:

  1. Connect via UaExpert or PVI Transfer Tool.
  2. Look for variables with naming patterns like DI_, DO_, AI_, AO_, Input_, Output_, IO_.
  3. Manually activate physical inputs (push buttons, sensors) and watch for corresponding variable state changes.
  4. Toggle outputs via writable variables and observe physical actuator response.

This is labor-intensive but effective for building an I/O map from scratch.

6.3 Automation Studio I/O Cross-Reference

If you eventually obtain a dummy project (see Section 8), the I/O mapping is defined in the Hardware Configuration (.hw file) within Automation Studio. The mapping connects physical I/O modules to logical variable names.


7. AR Log Analysis

7.1 Log Sources

B&R Automation Runtime generates logs from multiple sources:

SourceLocationContent
AR System LogSDM > Logbook, or via system dumpBoot sequence, task starts/stops, memory errors, license issues
Application LogCF card F:/ or via FTPApplication-specific events logged by the PLC program
Task Cycle LogSDM > Task MonitorCycle time violations, watchdog errors, task overload
Network LogSDM or system dumpNetwork interface events, connection drops, ANSL activity
mapp Alarm LogCF card F:/AlarmLog/ or OPC-UA alarm namespaceMachine alarms with timestamps, severity, and context
mapp DataLogCF card F:/DataLog/Sampled variable values in CSV or proprietary format

7.2 Analyzing Logbook Entries

Access logbook entries through SDM or from the system dump .tar.gz:

tar -xzf system_dump.tar.gz -C dump_analysis/
find dump_analysis/ -name "*.log" -o -name "*.arlog" -o -name "logbook*"

What to extract from logs:

  1. Task names — every task listed in the logbook is a PVI object and likely an OPC-UA node. Build your variable inventory from these names.
  2. Error patterns — recurring errors reveal weak points in the machine, common failure modes, and what conditions trigger protective stops.
  3. Timing patterns — timestamps in logs reveal cycle durations, batch processing times, and maintenance schedules.
  4. Software version mentions — log entries often contain the Automation Runtime version, mapp component versions, and firmware of connected hardware.

7.3 Logbook Export Script

for log in dump_analysis/**/logbook*.txt dump_analysis/**/logbook*.log; do
  echo "=== $log ==="
  head -100 "$log"
  echo ""
done

Extract unique task names from logs:

grep -ohP '(?<=Task\s)[A-Za-z0-9_]+' dump_analysis/**/*.log | sort -u

Extract unique variable names from logs:

grep -ohP '(?<=Variable\s)[A-Za-z0-9_.:]+' dump_analysis/**/*.log | sort -u

8. Online Monitoring with Automation Studio

8.1 Dummy Project Approach

Automation Studio is B&R’s engineering environment. Full online monitoring normally requires the original project, but a dummy project with matching hardware configuration provides partial access.

Prerequisites:

  • Automation Studio license
  • B&R Automation Runtime version matching the target CP1584 (check SDM for the exact version)

Procedure:

  1. Create a new Automation Studio project.
  2. Configure the target in the Physical Hardware view:
    • Add the CP1584 CPU with the correct firmware version.
    • Add all I/O modules as identified from SDM’s hardware page and serial numbers.
  3. Set the target IP address in the project configuration.
  4. Connect to the target: Online > Login.
  5. If the hardware configuration matches closely enough, you gain access to:
    • Variable cross-reference tables
    • Force table (for I/O forcing — read the warning below)
    • Trace/Scope (for real-time signal visualization)
    • I/O mapping display
  6. You will not see the application code (ladder, ST, C, etc.) without the source — only the runtime objects and their current values.

8.2 Safety Warning

Never force outputs on an undocumented, live production machine. The force table in Automation Studio can override program logic and physically actuate outputs. Use monitoring mode only (read access). Disable the force function or confirm force tables are empty before connecting.


9. Runtime Utility Center

9.1 Overview

The Runtime Utility Center (RUC) is a B&R maintenance tool that can:

  • Browse the CF card contents (system and user partitions)
  • Back up the complete CF card image
  • Read AR system information
  • Check and update firmware
  • Manage licenses
  • Access the logbook

9.2 CF Card Backup

Before doing anything else, create a full CF card backup:

  1. Launch Runtime Utility Center.
  2. Connect to <PLC_IP>.
  3. Navigate to CF Card > Backup.
  4. Select a destination directory.
  5. Wait for the complete backup (can take 15-60 minutes depending on card size and network speed).
  6. Store the backup image securely — it is your primary recovery asset.

9.3 Browsing CF Card Contents

The RUC file browser provides a GUI view of the CF card. Use it to navigate the same paths described in Section 3 (FTP Access). The RUC browser is sometimes able to access files that FTP cannot, particularly files owned by the root system user.


10. VNC Access

10.1 Connecting to the HMI

B&R HMI applications (mapp View or older Panel pages) expose a VNC server. This gives you a live view of the operator interface.

Connection:

vncviewer <PLC_IP>:5900

Or any VNC client pointing to <PLC_IP>:5900 (or :0).

10.2 What You Can Learn from the HMI

Even without documentation, the HMI display is an invaluable information source:

  • Screen navigation — map every screen, every button, every indicator.
  • Variable names visible in headers/status bars — B&R developers sometimes leave debug information visible.
  • Alarm lists — active and historical alarms reveal machine conditions.
  • Recipe screens — parameter names, ranges, and units reveal the machine’s process.
  • Trends/graphs — trend displays show which variables are being monitored and their expected behavior.
  • Axis control screens — reveal the number of servo axes, their names, and control modes.
  • Login screen — attempt default passwords: admin/admin, operator/operator, maintenance/maintenance.

10.3 Screen Capture and Documentation

Systematically document every HMI screen:

import subprocess, time

for i in range(50):
    time.sleep(2)
    subprocess.run(['scrot', f'hmi_screen_{i:03d}.png'])

(Navigation through screens must be done manually or via touchscreen if accessible.)


11. Network Traffic Analysis

11.1 Passive Capture Strategy

If you can physically tap into the network segment (mirror port, network tap, or hub), capture all traffic to and from the CP1584:

tshark -i eth0 -w cp1584_capture.pcap -f "host <PLC_IP>" -c 500000

11.2 Protocol Analysis

ANSL traffic (port 11169):

tshark -r cp1584_capture.pcap -Y "tcp.port == 11169" -T fields -e tcp.payload | head -20

This reveals PVI Manager communication including variable names, data types, and read/write operations from connected HMI panels, SCADA systems, or secondary controllers.

OPC-UA traffic (port 4840):

tshark -r cp1584_capture.pcap -Y "tcp.port == 4840" -T fields -e frame.time -e ip.src -e ip.dst

OPC-UA traffic reveals what external systems are connected and how frequently they poll the controller.

HTTP traffic (port 80):

tshark -r cp1584_capture.pcap -Y "http" -T fields -e http.request.uri -e http.host

This reveals what web-based systems are accessing the SDM or any custom web pages served from the CF card.

11.3 Discovering Communication Partners

From the captured traffic, build a map of all systems that communicate with the CP1584:

tshark -r cp1584_capture.pcap -T fields -e ip.src -e ip.dst | sort -u

This reveals the full automation network topology — SCADA servers, HMI panels, secondary PLCs, MES systems, and any other devices the CP1584 communicates with.


12. Systematic Extraction Workflow

Execute the following steps in order. Each step builds on the previous and maximizes coverage.

Phase 1: Non-Invasive Discovery

  • 1.1 Wireshark ANSL discovery — identify IP, name, firmware
  • 1.2 nmap service scan — identify open ports and services
  • 1.3 Web browser to http://<PLC_IP>/sdm — check SDM access
  • 1.4 Web browser to http://<PLC_IP>/ — check for custom web pages or 404 with B&R headers
  • 1.5 FTP anonymous login attempt — check CF card access
  • 1.6 VNC connection attempt — check HMI visibility
  • 1.7 OPC-UA connection attempt with UaExpert — check namespace accessibility

Phase 2: Data Collection

  • 2.1 SDM: Export all logbook entries
  • 2.2 SDM: Record all running tasks with cycle times
  • 2.3 SDM: Record complete hardware configuration
  • 2.4 SDM: Create and download system dump
  • 2.5 FTP: Recursive download of F:\ (user partition)
  • 2.6 FTP: Download any .log, .csv, .xml, .cfg, .ini files from system partition
  • 2.7 UaExpert: Export complete OPC-UA address space to CSV
  • 2.8 UaExpert: Subscribe to all variables and capture current values
  • 2.9 UaExpert: Document all methods (callable functions) and their signatures
  • 2.10 UaExpert: Subscribe to events and capture event definitions
  • 2.11 PVI Transfer Tool: Connect and export variable list
  • 2.12 VNC: Document all HMI screens (screenshots, navigation map)
  • 2.13 Runtime Utility Center: Full CF card backup
  • 2.14 Network capture: Record all traffic for 24-48 hours if possible

Phase 3: Analysis

  • 3.1 Cross-reference OPC-UA variable names with PVI variable names
  • 3.2 Cross-reference variable names with CF card file contents (config files, log files)
  • 3.3 Cross-reference task names from SDM with variable name prefixes from OPC-UA
  • 3.4 Analyze system dump for AR configuration and variable definitions
  • 3.5 Analyze log files for recurring patterns, error sequences, and operational context
  • 3.6 Map the complete communication network from captured traffic
  • 3.7 Build functional group hierarchy from OPC-UA namespace structure
  • 3.8 Identify all I/O mapping relationships between physical signals and logical variables

Phase 4: Reconstruction (Prerequisite: see project-reconstruction.md)

  • 4.1 Create dummy Automation Studio project with matching hardware
  • 4.2 Import OPC-UA namespace export to generate variable declarations
  • 4.3 Map all identified variable groups to functional software modules
  • 4.4 Document the machine’s complete functional specification
  • 4.5 Develop a migration plan if the CP1584 needs replacement

Key Findings Summary

FindingReliabilityEffortValue
OPC-UA namespace is the richest data sourceHighLowCritical
FTP CF card user partition F:\HighLowCritical
SDM logbook reveals task and variable namesHighLowHigh
System dump contains AR configurationHighMediumHigh
PVI Transfer Tool connects without projectHighLowHigh
VNC reveals HMI structure and variable namesMediumLowMedium
ANSL discovery identifies the controllerHighVery LowMedium
Network traffic reveals communication partnersHighMediumMedium
Automation Studio dummy project gives partial accessMediumHighHigh
Direct I/O forcing without projectNot possibleN/AN/A

Cross-References

FilePurpose
firmware.mdB&R firmware versions, upgrade/downgrade procedures, recovery
opcua.mdDetailed OPC-UA configuration, namespace structure, security, certificate management
pvi-api.mdPVI protocol specification, programmatic access from Python/C/C#, variable enumeration
ftp-web-interface.mdComplete FTP/Web interface file listing, credentials, and configuration access
config-file-formats.mdFile format specifications for all B&R configuration files accessible via FTP
project-reconstruction.mdStep-by-step project reconstruction from extracted artifacts
ar-rtos.mdAR OS internals — understanding error 25314, SERVICE mode, page faults, CVE table
cf-card-boot.mdCF card partition layout, file contents, imaging procedures, and cloning
execution-model.mdTask class structure — mapping task names from SDM to cycle times and priorities
memory-map.mdIO address mapping — understanding how physical IO maps to variables
diagnostics-sdm.mdSDM web interface for hardware overview, logger, system dump, and error analysis
network-architecture.mdNetwork discovery, ANSL protocol, device enumeration, topology mapping
system-variables.mdAR system variables — CPU temp, memory, task cycle times, watchdog, battery, network stats
alarm-logging.mdAlarm history extraction and format interpretation
online-changes.mdRuntime modification techniques when the original project is unavailable
access-recovery.mdPassword recovery, BOOT mode procedures, brwatch, Pvi.py, VNC access
program-reverse-engineering.mdAnalyzing compiled .br modules when no source is available
spare-parts.mdIdentifying hardware from physical inspection and order codes
io-card-hardware.mdIO module LED diagnostics, signal conditioning, and fault codes
remanufacturing.mdMigration planning when the CP1584 needs replacement
time-sync.mdTimestamp accuracy for correlating events during forensic analysis
hmi-integration.mdHMI screen documentation and variable extraction via VNC
encoder-diagnostics.mdEncoder monitoring via OPC-UA/PVI, phasing procedures
python-diagnostics.mdPython diagnostic scripts for automated forensic data collection
iiot-retrofit.mdMQTT/InfluxDB/Grafana setup for remote monitoring dashboards
ebpf-telemetry.mdAdvanced performance profiling with eBPF/systemtap for runtime analysis
troubleshooting-index.mdScenario-based index for finding the right document for any diagnostic problem

Emergency Recovery Contacts

If all extraction methods fail and the machine is critical:

  • B&R Technical Support — can provide firmware recovery images and remote diagnostics. Requires proof of ownership or partnership.
  • B&R Academy — training resources for Automation Studio and B&R system architecture.
  • B&R Partner Network — authorized B&R partners may have experience with similar machines and can provide consulting.

IO Card Message Sniffing for Sensor Diagnostics on B&R PLCs

A comprehensive technical guide to intercepting, capturing, and analyzing fieldbus traffic for sensor fault diagnosis on B&R Automation PLC systems (X20, X67, System 2003/2005, APROL).


Table of Contents

  1. Theoretical Approaches to Intercept Fieldbus Traffic
  2. Passive Tapping vs Active Sniffing
  3. Hardware Requirements per Protocol
  4. Wireshark Setup for POWERLINK and PROFINET
  5. CAN Bus Sniffing Tools
  6. X2X Bus Sniffing with Logic Analyzers
  7. Correlating Captured Data with IO Module Addresses
  8. Filtering Techniques to Isolate Sensor Data
  9. Timing Analysis for Intermittent Issues
  10. Practical Diagnostic Workflows
  11. Legal and Safety Considerations
  12. Tools Comparison Table
  13. Sources and References

1. Theoretical Approaches to Intercept Fieldbus Traffic

1.1 B&R Protocol Stack Overview

B&R Automation systems use multiple fieldbus and industrial Ethernet protocols depending on the IO system generation and bus controller selected:

ProtocolLayerB&R ProductTypical Use
X2X LinkPhysical (RS-485 derivative)X20 bus controllers (X20BC etc.)Local IO backplane/bus connection for X20 slices
ETHERNET Powerlink (EPL)L2 Ethernet (EtherType 0x88F6)X20ET, X67, Power PCsReal-time deterministic Ethernet, 100 Mbps
PROFINET IOL2 Ethernet (EtherType 0x8892)X20PN, gateway modulesSiemens-compatible integration, RT/IRT
CANopenL2 CAN (ISO 11898)X20CC, X20BC0073CAN-based IO, motion, drives
EtherNet/IPL4 UDP/TCPX20EB, gatewaysRockwell-compatible integration
Modbus TCP/RTUL4/L2Various gatewaysLegacy protocol bridging

X2X Link is B&R’s proprietary serial bus for connecting X20 I/O stations to the bus controller. It runs on a twisted-pair physical layer derived from RS-485, operating at up to 12 Mbaud. The protocol is closed-source and undocumented at the packet level, which makes full decoding difficult without reverse engineering.

Key characteristics:

  • Physical: RS-485 transceiver (differential pair), daisy-chain topology
  • Speed: Up to 12 Mbaud (B&R specific encoding)
  • Topology: Multi-drop from bus controller, up to 64 stations per segment
  • Frame structure: Proprietary; includes addressing, CRC, and cyclic data payloads
  • Update rate: Sub-millisecond, depending on station count and configuration

Interception approach: Since X2X is a closed protocol, interception focuses on signal-level analysis using logic analyzers rather than packet-level decode. You can observe timing, signal integrity, and bus utilization to diagnose physical-layer problems. For data-level analysis, the preferred approach is to use B&R’s own diagnostic tools (Automation Studio watch window, mapp Diagnostic) and correlate with the captured signal patterns.

ETHERNET Powerlink is an open-source (EPL v2.0+) real-time Ethernet protocol managed by the EPSG (Ethernet POWERLINK Standardization Group). It operates on standard Fast Ethernet (100BASE-TX) and uses a slot-based TDMA mechanism managed by a Managing Node (MN) - typically the B&R PLC CPU.

Frame types:

FramePurposeDirection
SoA (Start of Async)Opens asynchronous phaseMN -> all
SoC (Start of Cycle)Marks cycle boundaryMN -> all
PReq (Poll Request)Requests data from CNMN -> specific CN
PRes (Poll Response)CN responds with dataCN -> MN
ASnd (Async Send)Asynchronous data (configuration, diagnostics)Any node

Key characteristics:

  • Physical: Standard 100BASE-TX Ethernet, half-duplex
  • MAC: Uses custom ethertype or LLC/SNAP encapsulation
  • Cycle time: Configurable, 200us to 100ms typical
  • Addressing: Node IDs (1-239), node 240 = MN
  • Data format: Little-endian

Interception approach: Powerlink runs on shared Ethernet media (hub or switch in “passthrough” mode for EPL phase 1). Since it uses standard Ethernet frames with a recognizable ethertype, you can connect a PC with a standard NIC in promiscuous mode directly to the bus via a hub or tap. Wireshark includes a native POWERLINK dissector.

1.4 PROFINET IO

PROFINET uses standard Ethernet frames for real-time I/O exchange. There are three performance classes:

ClassMechanismTimingEtherType
NRT (Non-Real-Time)TCP/UDP50-100ms+Standard IP
RT (Real-Time)Direct L2 Ethernet1-10ms0x8892
IRT (Isochronous Real-Time)Hardware-scheduled TSN-like<1ms0x8892 (priority)

Key PROFINET protocols on the wire:

  • pn_dcp: Discovery and Configuration Protocol (device naming, IP assignment)
  • pn_rt: Real-Time cyclic data frames (cyclic I/O)
  • pn_io: Application layer (connection setup via DCE/RPC over UDP 34964)
  • pn_ptcp: Precision Time Control Protocol (IRT clock sync)
  • lldp: Link Layer Discovery Protocol (topology)

Interception approach: PROFINET RT/IRT frames are Layer 2 ethertype 0x8892 - they bypass TCP/IP entirely. You must capture on the Ethernet interface directly (via tap or SPAN port). Wireshark has full PROFINET dissectors built in.

1.5 CANopen

CANopen is a higher-layer protocol built on top of CAN 2.0A/B (ISO 11898). It uses an object dictionary (OD) model with specific communication objects:

ObjectCAN IDPurpose
NMT (Network Management)0x000State machine control (start/stop/reset)
SYNC0x080Cycle synchronization beacon
EMCY (Emergency)0x080+NodeIDError/fault notification
TPDO (Transmit PDO)0x180+NodeIDCyclic process data out
RPDO (Receive PDO)0x200+NodeIDCyclic process data in
SDO (Service Data)0x580+NodeID (RX), 0x600+NodeID (TX)Configuration, parameter access
HB (Heartbeat)0x700+NodeIDNode alive monitoring

Key characteristics:

  • Physical: CAN 2.0B, differential pair (CAN_H, CAN_L), twisted pair
  • Speed: 1 Mbps max (typical: 125 kbps - 1 Mbps)
  • Addressing: 11-bit (standard) or 29-bit (extended) CAN identifiers
  • Topology: Multi-drop bus with termination resistors (120 ohm at each end)

Interception approach: CANopen runs on CAN bus, which requires a CAN interface adapter (USB, PCI, or embedded). You connect the CAN adapter to the bus via a Y-cable or tap, and use specialized software to decode CANopen protocols. The object dictionary mapping (PDO/SDO) tells you which sensor data maps to which CAN IDs and byte offsets.


2. Passive Tapping vs Active Sniffing

2.1 Passive Tapping

Passive tapping inserts a hardware device inline on the communication link that copies all traffic to a monitoring port without participating in the protocol. The key property is zero interference with the live system.

Advantages:

  • No impact on timing, latency, or determinism of the live network
  • Cannot introduce errors or crash the production system
  • Invisible to protocol participants (no MAC address on the network)
  • Safe for safety-critical and hard-real-time systems
  • Captures all traffic including collisions and physical-layer errors

Disadvantages:

  • Requires physical access to insert the tap
  • May need network downtime to install (unless using breakout taps on existing connections)
  • Full-duplex Ethernet requires two capture interfaces (or an aggregate tap)
  • Cannot trigger or inject messages for active diagnostics

Passive tap types:

Tap TypeEthernetCANSerial/RS-485
Optical splitter (fiber)YesN/AN/A
Electrical tap (copper)Yes (regenerative or passive)Yes (Y-cable)Yes (T-connector or breakout board)
Magnetic/capacitive couplerYes (non-intrusive)YesYes
Breakout boxYes (BNC/RJ45)Yes (DB9)Yes (DB9/terminal block)

2.2 Active Sniffing

Active sniffing involves connecting a device as a participant on the network, either as a fully-featured node or as a promiscuous-mode listener.

For Ethernet (POWERLINK/PROFINET):

  • Connect a PC NIC directly to a switch port or hub
  • Configure the NIC in promiscuous mode to capture all frames
  • For POWERLINK: connect to a hub or directly to the bus (half-duplex shared medium)
  • For PROFINET: use managed switch port mirroring (SPAN) to copy traffic

Advantages:

  • Can use standard PC hardware and software (Wireshark)
  • Can inject traffic for active testing (e.g., ping, DCP requests)
  • No special tap hardware needed for basic capture
  • Can participate in protocol negotiations to aid decoding

Disadvantages:

  • Adds a device to the network (potential timing impact on shared-medium networks)
  • PC NIC OS-level timestamps are inaccurate (microsecond range at best, affected by scheduling)
  • May cause issues if the PC sends unwanted packets (TCP/IP stack, ARP, etc.)
  • Cannot capture collisions or physical-layer anomalies
  • Some protocols may reject unknown nodes

B&R-specific consideration: For POWERLINK, B&R’s own documentation states: “To record data traffic, an Ethernet port of the PC is connected directly to the POWERLINK network at any point.” This works because POWERLINK Phase 1 uses a shared Ethernet medium. However, B&R also notes that PC-based capture has “inaccurate timestamps” and recommends the X20ET8819 hardware analysis tool for precise diagnostics.

2.3 Choosing Between Approaches

ScenarioRecommended Approach
Quick diagnostic on POWERLINKActive (PC + Wireshark, direct connect)
Long-term intermittent fault capturePassive tap + hardware recorder (X20ET8819)
PROFINET on managed switchActive (SPAN port mirroring + Wireshark)
PROFINET on unmanaged switchPassive (inline Ethernet tap + Wireshark)
CANopen bus diagnosticsActive (CAN adapter + PCAN-View/CANalyzer) or passive (CAN tap)
X2X bus diagnosticsPassive only (logic analyzer on RS-485 differential pair)
Safety-rated systemsPassive only (never introduce active devices on safety networks)
Intermittent timing-critical faultsPassive with hardware timestamps (nanosecond accuracy)

3. Hardware Requirements per Protocol

ComponentPurposeRecommended
Hub (not switch)Share the Ethernet medium for passive monitoringAny 10/100 hub; Powerlink Phase 1 requires shared medium
Ethernet TapInline passive copper tap for full-duplex captureDualcomm DTE (port-stealing), NetOptics, Garland
PC with NICActive capture via WiresharkIntel-based NIC (best driver support); half-duplex, 100 Mbps
X20ET8819B&R’s dedicated Ethernet analysis toolNanosecond timestamps, trigger-based recording, filter inputs
Managed switch with SPANAlternative: port mirroring (Powerlink Phase 2+)Any managed switch supporting port mirroring

X20ET8819 Specifications (B&R’s recommended tool):

  • X20 form factor, slides directly into X20 backplane
  • 2x RJ45 Ethernet ports for inline connection
  • Hardware-based timestamps in nanosecond range
  • Trigger inputs (digital inputs or software trigger)
  • Filter-based recording to minimize file size
  • Compatible with Automation Studio for analysis
  • Ideal for sporadic/intermittent faults

3.2 PROFINET IO

ComponentPurposeRecommended
Managed industrial switchPort mirroring (SPAN) for traffic copySiemens SCALANCE X, B&R X20SW, Phoenix CONTACT
Ethernet TapInline passive tap (if no managed switch)SharkTap, Dualcomm DTE, NetOptics
PC with NICWireshark captureIntel or Realtek-based NIC; promiscuous mode support
PROFINET diagnostic toolPI PROFINET official toolsPNI (PROFINET Investigator), Proneta

Switch port mirroring setup:

  1. Configure the switch port where the IO device is connected as the source (monitored) port
  2. Configure a spare port as the destination (mirror) port
  3. Connect the capture PC to the destination port
  4. Ensure the mirror port can handle the full bandwidth of monitored traffic

3.3 CANopen

ComponentPurposeRecommended
CAN USB adapterPhysical CAN interface for PCPEAK PCAN-USB, Vector VN1610/VN1630, Kvaser Leaf
CAN tap/Y-cableNon-intrusive bus connectionPEAK CAN tap, DB9 Y-cable adapter
High-speed CAN transceiverLogic-level to CAN bus levelMCP2551, SN65HVD230 (for custom solutions)
120 ohm terminationBus termination (critical!)Built-in to adapters, or external resistor
OscilloscopePhysical signal analysisKeysight, Tektronix, Rigol (for signal integrity)
ComponentPurposeRecommended
Logic analyzerDigital signal capture on RS-485 pairSaleae Logic (8+ channels), sigrok/PulseView
RS-485 to TTL converterConvert differential RS-485 to logic levelsMAX485, SP3485 breakout board
OscilloscopeAnalog signal quality analysis4-channel, 100MHz+ bandwidth
Terminal block tapNon-intrusive breakout on bus wiresCustom DB9 or terminal block breakout

Connection method for X2X with logic analyzer:

  1. Locate the X2X bus wires (typically labeled X2L+/X2L- or similar on terminal blocks)
  2. Connect RS-485-to-TTL converter: A (non-inverting) to one channel, B (inverting) to another
  3. Set logic analyzer sample rate: minimum 10x the bus speed (for 12 Mbaud: 120 MHz minimum)
  4. Record for at least one full bus cycle to observe repeating patterns
  5. Analyze using UART async serial protocol decoder (may require custom baud rate settings)

Based on official B&R community documentation:

Step 1: Prepare the network interface

  • Deactivate all unneeded protocols (TCP/IP, Windows file sharing, etc.) on the capture interface
  • These can interfere with the POWERLINK network by generating unwanted packets
  • In Windows: Uncheck all items except “Wireshark Npcap Loopback Adapter” in adapter properties
  • In Linux: ip link set eth0 down && ip link set eth0 up promisc on

Step 2: Recommended NIC settings

  • Half-duplex mode
  • 100 Mbit/s transmission rate
  • Auto-crossover enabled (or use a crossover cable)

Step 3: Connect to the POWERLINK network

  • Connect the PC Ethernet port directly to the POWERLINK network at any point
  • A hub can be used between the PC and the network if direct connection fails
  • Verify link LEDs indicate active connection

Step 4: Start capture in Wireshark

  • Select the connected interface in Wireshark’s start screen
  • Double-click the interface or click the blue shark fin icon to start recording

Step 5: POWERLINK Display Filters

FilterPurpose
epl.src == 1All packets sent by NodeID 1 (typically the MN)
epl.dest == 1All packets sent to NodeID 1
epl.service_type == "SoA"Start of Async frames
epl.service_type == "PReq"Poll Request frames
epl.service_type == "PRes"Poll Response frames
epl.service_type == "ASnd"Asynchronous Send frames

Step 6: Analysis tips

  • Sort packets by the “Time” column to recognize the recurring POWERLINK cycle
  • Use Wireshark’s coloring rules to distinguish frame types (SoA = one color, PRes = another, ASnd = another)
  • Create a custom column for PRes payload: right-click “Payload” in a PRes frame -> “Apply as Column” -> rename to “PRes-Payload”
  • Note: POWERLINK user data is transmitted in little-endian format

Limitations of PC-based capture:

  • Inaccurate timestamps (OS scheduling jitter affects precision)
  • Large file sizes for extended captures
  • Cannot reliably capture sporadic errors
  • For precise timing analysis, use B&R X20ET8819 instead

4.2 Wireshark for PROFINET

Step 1: Install Wireshark

  • Download from https://www.wireshark.org
  • Install with Npcap (Windows) or libpcap (Linux) for packet capture driver
  • PROFINET dissectors are built-in: pn_rt, pn_io, pn_dcp, pn_ptcp

Step 2: Capture setup

  • PROFINET RT uses EtherType 0x8892 (not TCP/IP!) - you cannot filter by TCP port
  • Capture all Ethernet traffic on the interface (no capture filter) for full visibility
  • Optional capture filter to reduce noise: ether proto 0x8892 (only PROFINET RT/DCP/PTCP)

Step 3: Connect to the PROFINET network

  • Method A (Preferred): Managed switch with SPAN/port mirroring - mirror the IO device port to a monitoring port, connect PC to monitoring port
  • Method B: Inline Ethernet tap between PLC and switch
  • Method C: Direct connect (only if the PROFINET device supports it)

Step 4: PROFINET Display Filters

FilterWhat It Shows
pn_rtAll PROFINET RT cyclic I/O frames
pn_ioPROFINET IO application layer (connection setup, alarms)
pn_dcpPROFINET DCP (discovery, name assignment, IP config)
pn_ptcpPROFINET PTCP (IRT clock synchronization)
lldpLLDP frames (topology, neighbor detection)
mrpMedia Redundancy Protocol frames
eth.type == 0x8892All PROFINET frames (RT, DCP, PTCP)
pn_dcp.service_id == 5DCP Identify (device discovery)
pn_dcp.service_id == 4DCP Set (name/IP assignment)
pn_dcp.block_error != 0DCP errors
pn_rt.data_status.datavalid == 0Invalid cyclic data
pn_rt.transfer_status != 0Transfer errors
pn_rt.cycle_counterCycle counter (detect missed frames)
pn_io.alarm_typeAlarms from IO devices
pn_io.slot_nrSpecific slot number
pn_io.subslot_nrSpecific subslot number
pn_rt && eth.addr == 00:xx:xx:xx:xx:xxTraffic to/from specific MAC

Step 5: Decoding cyclic I/O data

  • Critical: Wireshark can decode cyclic data to module level ONLY if it captures the DCE/RPC connection setup
  • Best practice: Start Wireshark BEFORE powering on the IO device or restarting the PLC
  • If connection setup is missed, cyclic data shows as raw bytes without module context
  • Import PI PROFINET coloring rules: View -> Coloring Rules -> Import (colors: RT=green, DCP=blue, Alarms=red, LLDP=yellow)

Step 6: Custom columns for PROFINET diagnostics

ColumnField
Frame IDpn_rt.frame_id
Cycle Counterpn_rt.cycle_counter
Data Statuspn_rt.data_status
IOxSpn_io.ioxs
Delta Timeframe.time_delta_displayed

5. CAN Bus Sniffing Tools

5.1 Hardware Interfaces

PEAK PCAN (PEAK-System Technik GmbH)

  • PCAN-USB: Basic USB-to-CAN adapter, galvanically isolated
  • PCAN-USB FD: Supports CAN FD, 2 channels
  • PCAN-USB Pro FD: 4 channels, CAN/CAN FD
  • PCAN-View: Free monitoring software included
  • Pros: Affordable, reliable, good Linux support, free software
  • Cons: Limited scripting compared to Vector

Vector Informat

  • VN1610/VN1611: Professional CAN/CAN FD/LIN interfaces (1-4 channels)
  • VN1630/VN1640: High-channel-count interfaces
  • CANalyzer: Professional analysis software (CANopen, J1939, etc.)
  • CANoe: Full simulation + analysis environment
  • CANalyzer.CANopen: CANopen-specific analysis option with OD support
  • Pros: Industry gold standard, extensive protocol support, powerful scripting (CAPL)
  • Cons: Expensive (license starts ~$3,000+)

Kvaser

  • Kvaser Leaf Light: Budget single-channel CAN
  • Kvaser Memorator: Data logger with onboard storage
  • Kvaser CANKing: Included analysis software
  • Pros: Robust, good Linux drivers, Scripting with tscript
  • Cons: Software less capable than Vector CANalyzer

SocketCAN (Linux)

  • Built-in CAN stack in Linux kernel since 2.6.25
  • Works with: PEAK PCAN, Kvaser, SocketCAN-native devices (e.g., Microchip MCP2515-based)
  • Tools: candump, cansend, cansequence, cansniffer, canplayer
  • cansniffer provides a live hexadecimal/ASCII view of the bus
  • Python: python-can library provides high-level access
  • Pros: Free, scriptable, integrates with Linux ecosystem
  • Cons: No GUI analysis tool comparable to CANalyzer; limited CANopen decode

Other Tools

  • CanLover: Free, modern CAN bus analyzer for Linux/Windows, CANalyzer alternative, native SocketCAN
  • Kayak: Java-based open-source CAN traffic GUI
  • CanCat: Open-source CAN bus penetration testing tool
  • Busmaster: Open-source tool by RBEI (supports CAN, J1939, CANopen)

5.2 CANopen-Specific Analysis

For CANopen sensor diagnostics, the key is mapping CAN IDs to object dictionary entries:

TPDO/RPDO mapping (process data):

  • TPDO1: CAN ID 0x180 + NodeID (default)
  • RPDO1: CAN ID 0x200 + NodeID (default)
  • The PDO mapping (in the OD at index 0x1A00/0x1600) tells you which sensor values are at which byte offset
  • Example: A temperature sensor at NodeID 5 sends TPDO1 on CAN ID 0x185; bytes [0:1] = temperature in 0.1°C units

SDO access (configuration/diagnostics):

  • SDO Receive: CAN ID 0x600 + NodeID
  • SDO Transmit: CAN ID 0x580 + NodeID
  • Use SDO to read diagnostic objects, error history, manufacturer-specific status

Emergency messages:

  • CAN ID 0x080 + NodeID
  • Contains error code, error register, and vendor-specific data
  • Filter for these to quickly identify failing devices

Heartbeat monitoring:

  • CAN ID 0x700 + NodeID
  • Consumer heartbeat time in OD index 0x1016
  • Missed heartbeats = node offline or bus problem

5.3 Practical CAN Sniffing Setup for B&R Systems

  1. Locate the CAN bus access point: B&R X20CC modules have CAN bus terminals. Use a DB9 Y-adapter to tap in.
  2. Configure the CAN adapter: Set baud rate to match the B&R project configuration (check in Automation Studio)
  3. Start capture: Use candump can0 (SocketCAN) or PCAN-View
  4. Apply CANopen decode: If using CANalyzer with CANopen option, load the EDS/EDD file from the IO module manufacturer
  5. Monitor: Watch for EMCY (emergency) messages, heartbeat timeouts, or missing PDOs from specific nodes

6. X2X Bus Sniffing with Logic Analyzers

6.1 Why Logic Analyzers for X2X

Since X2X Link is a closed proprietary protocol with no publicly available dissector, protocol-level decoding is not feasible with standard tools. Logic analyzers capture the raw digital waveform, allowing you to:

  • Verify physical signal integrity (rise times, voltage levels, noise)
  • Measure timing between transmissions
  • Detect bus contention, framing errors, or signal degradation
  • Capture long traces for intermittent fault correlation
  • Observe the repeating cycle pattern to identify which time slots belong to which stations

6.2 Saleae Logic Analyzer

Supported models: Saleae Logic 8, Logic Pro 8, Logic Pro 16

Setup for X2X capture:

  1. Connect the RS-485 differential pair (X2L+/X2L-) through an RS-485-to-TTL level shifter (MAX485 or SP3485)
    • X2L+ (A line) -> Logic channel 0
    • X2L- (B line) -> Logic channel 1
    • Optionally: GND -> Logic GND, and the TX/RX enable lines if probing the transceiver IC directly
  2. Set sample rate: Minimum 10x the baud rate. For 12 Mbaud X2X, use 120+ MHz (Logic Pro 16 supports up to 500 MS/s)
  3. Set sample duration: Capture at least 10 full bus cycles to see repeating patterns
  4. In Saleae Logic 2 software:
    • Add Async Serial analyzer for each channel
    • Set baud rate to match (try 12M, 6M, 3M, 1.5M - B&R uses power-of-2 divisions of 12M)
    • Add I2C/SPI analyzer if the X2X uses a chip-select or clock line visible on the bus connector
  5. Export data to CSV for analysis in spreadsheets or Python scripts

Limitations:

  • Buffer depth limits long-term monitoring (use high-performance models with 2GB+ capture)
  • Cannot decode proprietary protocol semantics
  • TTL input range (must use level shifter for RS-485)

6.3 Sigrok / PulseView (Open Source)

Supported hardware: Any sigrok-compatible logic analyzer (DreamSourceLab, Clone, Sipeed, or even an Arduino with sigrok firmware)

Protocol decoders available in sigrok (relevant for X2X analysis):

  • UART (Async Serial) - 131+ total decoders supported
  • CAN (Controller Area Network) - for CAN bus analysis
  • I2C, SPI - for sub-protocols or chip-level probing
  • Modbus RTU - over RS-485 UART
  • Jitter, Timing - for timing analysis between signals

Setup for X2X with sigrok:

  1. Install sigrok and PulseView: apt install sigrok pulseview (Debian/Ubuntu)
  2. Connect RS-485 through level shifter to logic analyzer channels
  3. Run sigrok-cli for command-line capture:
    sigrok-cli --driver dreamsourcecli --config samplerate=120M --channels 0,1 \
      --protocol-decoder uart:baudrate=12000000:rx=0 --protocol-decoder uart:baudrate=12000000:rx=1 \
      -o x2x_capture.sr
    
  4. Analyze in PulseView or export with sigrok-cli -i x2x_capture.sr -P uart:csv
  5. Write custom Python protocol decoder using libsigrokdecode API for X2X-specific analysis

Advantages of sigrok:

  • Free and open source
  • Supports 131+ protocol decoders
  • Works with cheap logic analyzer hardware ($10-50)
  • CLI interface for automated/scripted capture
  • Extensible: write custom decoders in Python for proprietary protocols

6.4 Oscilloscope as Complement

Use a 4-channel oscilloscope for X2X physical-layer analysis:

  • Channel 1: X2L+ (A line)
  • Channel 2: X2L- (B line)
  • Channel 3: X2L+ - X2L- (differential, math function)
  • Channel 4: Ground reference or another signal

What to look for:

  • Differential voltage swing (should be >1.5V for RS-485)
  • Signal rise/fall times (degradation indicates cable or connector issues)
  • Noise, ringing, reflections on the bus
  • Common-mode voltage (should stay within RS-485 receiver range: -7V to +12V)

7. Correlating Captured Data with IO Module Addresses

7.1 Understanding B&R IO Address Mapping

B&R Automation Studio assigns addresses to IO modules based on their physical position in the station:

X20 System addressing:

Bus Controller (X20BCxxxx)
  ├── Slot 1: X20DI9371 (Digital Input 16ch) → %IX0.0.0 - %IX0.0.15
  ├── Slot 2: X20AI4631 (Analog Input 4ch)  → %IW4 (words 4-7)
  ├── Slot 3: X20AO4621 (Analog Output 4ch) → %QW8 (words 8-11)
  └── Slot 4: X20DO9321 (Digital Output 16ch) → %QX0.0.0 - %QX0.0.15

The %I/%Q prefix indicates input/output, %X = bit, %W = word (16-bit), %B = byte.

7.2 Correlating by Protocol

For POWERLINK:

  • Each CN (Controlled Node) has a NodeID (configured in Automation Studio)
  • The PRes frame from a CN contains the process image for that station
  • Within the PRes payload, the byte order matches the slot order configured in the hardware tree
  • To find a specific sensor: look up its NodeID, find its PRes frames, and calculate the byte offset based on slot position and data type

For PROFINET:

  • Wireshark decodes cyclic data to slot/subslot level (if connection setup was captured)
  • You’ll see: Module: DI 8x24V (Slot 1, Subslot 1) → Input Data: 0xFF
  • Use pn_io.slot_nr and pn_io.subslot_nr filters to isolate specific IO modules
  • The AR (Application Relation) and CR (Connection Record) in the connection setup define the mapping

For CANopen:

  • CANopen PDOs map to object dictionary entries (index/subindex)
  • The PDO mapping (OD index 0x1A00 for TPDO, 0x1600 for RPDO) defines the byte layout
  • Each sensor channel maps to a specific object in the OD
  • Example: Object 0x6401 (analog input ch1) maps to TPDO1 byte [0:1]
  • Load the device’s EDS/EDD file in CANalyzer to see the full mapping

7.3 Practical Correlation Workflow

  1. Build an address map: In Automation Studio, export or document the IO configuration for each station:

    • Station name/NodeID
    • Slot position → module type → variable name → address
    • Data type and byte width per channel
  2. Identify the failing channel: Use B&R’s mapp Diagnostic or the Automation Studio watch window to determine which variable/address is showing unexpected values.

  3. Locate in the capture:

    • POWERLINK: Filter by epl.src == <NodeID> for the failing station, then examine the PRes payload at the byte offset corresponding to the failing channel
    • PROFINET: Filter by pn_io.slot_nr == <slot> and pn_io.subslot_nr == <subslot>
    • CANopen: Calculate the CAN ID for the failing node’s TPDO/RPDO, filter for that ID, and examine the relevant bytes
  4. Verify the data path: Trace the data from the capture back to the IO module’s physical terminal to confirm the channel-to-address mapping.


8. Filtering Techniques to Isolate Sensor Data

8.1 Wireshark Filtering for Ethernet Protocols

POWERLINK - isolate a specific station:

epl.src == 5 && epl.service_type == "PRes"

Shows only Poll Response frames from NodeID 5 (this station’s process data).

POWERLINK - isolate async communication:

epl.service_type == "ASnd"

Async frames carry diagnostics, configuration, and error messages.

PROFINET - isolate a device by MAC:

eth.addr == 00:0e:8c:12:34:56 && pn_rt

All cyclic RT traffic for a specific IO device.

PROFINET - isolate bad data:

pn_rt.data_status.datavalid == 0

Shows only frames where the device reports data as invalid.

PROFINET - isolate alarms:

pn_io.alarm_type

All alarm notifications (plug/pull, diagnosis, process alarms).

8.2 SocketCAN Filtering for CANopen

Capture only from a specific node:

candump can0,185:7FF

(Capture CAN ID 0x185 = TPDO1 of NodeID 5, mask 0x7FF = match all 11 bits)

Capture emergency messages only:

candump can0,080:7FF

(All emergency messages from any node)

Capture with CANopen decode (cansniffer):

cansniffer can0

Shows a live matrix view of all CAN IDs with data bytes, updated in real-time.

Python filtering with python-can:

import can
bus = can.Bus(interface='socketcan', channel='can0', bitrate=500000)
for msg in bus:
    if msg.arbitration_id == 0x185:  # TPDO1 from NodeID 5
        temp_raw = int.from_bytes(msg.data[0:2], 'little')
        temp_c = temp_raw / 10.0
        print(f"Temperature: {temp_c}°C")

8.3 Logic Analyzer Filtering for X2X

In Saleae Logic 2:

  • Time range selection: Highlight a section of the capture to zoom in
  • Search: Search for specific byte patterns or transitions
  • Export selection: Export only the selected time range to CSV

In sigrok-cli:

sigrok-cli -i capture.sr -P uart:min_tx_len=1 -A uart=rx-0:rx-1 | grep "temperature"

Pipe the decoded output through grep/awk for pattern matching.

8.4 Triggered Capture

For isolating specific events in high-traffic networks:

Wireshark capture filters:

ether proto 0x8892 and ether[0] & 1 = 0

Only unicast PROFINET frames (filter out multicast).

Wireshark stop conditions:

  • Capture -> Stop Conditions -> “After X packets” or “After X seconds”
  • Useful for capturing exactly one POWERLINK cycle or a specific number of PROFINET RT frames

Hardware trigger (X20ET8819):

  • Configure a digital input trigger to start recording when a physical event occurs
  • Use filter expressions to pre-select which frames to store
  • Essential for capturing sporadic intermittent faults that may not occur during a manual observation window

9. Timing Analysis for Intermittent Communication Issues

9.1 Common Intermittent Fault Patterns

SymptomProtocol LayerLikely CauseDetection Method
Occasional missed cyclePOWERLINK/PROFINET RTNetwork overload, bad cableCycleCounter gaps
Random data corruptionCAN / SerialEMI, ground loop, poor terminationCRC errors, bit stuffing errors
Intermittent node dropCANopen / X2XLoose connector, failing transceiverHeartbeat timeout, bus-off
Timing jitter spikesAny real-time protocolCPU overload, OS schedulingDelta time histogram
Data stalenessPOWERLINK/PROFINETIO module sensor failureDataValid=0, IOxS=bad

9.2 Wireshark Timing Analysis

POWERLINK cycle time analysis:

  1. Filter for SoC (Start of Cycle) frames: epl.service_type == "SoC"
  2. Add column: frame.time_delta_displayed (delta from previous frame)
  3. Sort by time and examine the delta column
  4. Healthy: consistent delta matching the configured cycle time (e.g., 1.000ms +/- 0.01ms)
  5. Faulty: delta spikes, missed cycles, or irregular intervals

PROFINET cycle analysis:

  1. Filter: pn_rt
  2. Add column: pn_rt.cycle_counter
  3. If CycleCounter has gaps (e.g., 12340, 12341, 12343 - missed 12342), frames were lost
  4. Add column: frame.time_delta_displayed
  5. Build a histogram: Statistics -> Capture File Properties -> “Create Stat” or use Expert Info

PROFINET data validity analysis:

  1. Filter: pn_rt.data_status.datavalid == 0
  2. If this returns frames, the IO device is reporting invalid data
  3. Cross-reference with pn_io.alarm_type for diagnostic alarms
  4. Check timing: does DataValid go to 0 at the same time as alarms? (indicates sensor failure)
  5. Does DataValid go to 0 without alarms? (indicates communication issue)

9.3 CAN Bus Error Analysis

CAN error types and what they mean:

Error TypeMeaningCommon Cause
Bit ErrorTransmitted bit differs from monitored bitCable length, EMI
Stuff Error6 consecutive equal bits (violates bit stuffing rule)Corrupted data
CRC ErrorCalculated CRC doesn’t match received CRCElectrical noise, bad connection
Form ErrorFixed-format field has wrong valueTransceiver fault
ACK ErrorNo ACK from any receiverWiring, termination, bus-off
Bus-OffNode has accumulated too many errors and disconnected itselfPersistent fault (cable, transceiver)

Detection with CAN tools:

  • PCAN-View: Shows error frames, TX/RX error counters, bus state
  • CANalyzer: Error frame analysis, bus load measurement, error statistics
  • SocketCAN: ip -details -statistics link show can0 shows error counters
  • candump can0 -e includes error frames in the capture

Intermittent CAN fault diagnostic workflow:

  1. Monitor the TX error counter (TEC) and RX error counter (REC) over time
  2. If TEC increases sporadically but recovers: intermittent cable issue
  3. If REC increases: bus-level noise or another node transmitting errors
  4. If both TEC and REC increase together with error frames: EMI or ground loop
  5. If counters go to bus-off: persistent fault - check termination, cable, and connectors
  6. Use an oscilloscope on CAN_H and CAN_L to check signal quality during the fault

9.4 X2X Timing Analysis

With a logic analyzer:

  1. Capture a long trace (several minutes) during normal operation to establish baseline
  2. Measure the time between recurring patterns (each station’s transmission time slot)
  3. Set a trigger on the “unexpected” pattern: e.g., a frame that appears only during the fault
  4. Compare signal integrity during normal operation vs. during the fault
  5. Check for: jitter in frame timing, changes in frame length, missing responses, or signal quality degradation

9.5 Statistical Analysis Methods

Wireshark IO Graphs:

  • Statistics -> IO Graph: Plot packet rate, bytes/frame, or custom field values over time
  • Useful for visualizing periodic behavior and spotting anomalies

Wireshark Expert Info:

  • Analyze -> Expert Info: Shows warnings and notes about unusual patterns
  • Detects: retransmissions, duplicate ACKs, out-of-order frames, protocol violations

Custom Python analysis:

import scapy.all as scapy
packets = scapy.rdpcap('capture.pcap')
deltas = [packets[i+1].time - packets[i].time for i in range(len(packets)-1)]
import statistics
print(f"Mean cycle: {statistics.mean(deltas)*1000:.3f} ms")
print(f"Std dev: {statistics.stdev(deltas)*1000:.3f} ms")
print(f"Min: {min(deltas)*1000:.3f} ms, Max: {max(deltas)*1000:.3f} ms")

10. Practical Diagnostic Workflows

Scenario: An analog input sensor on an X20 AI module occasionally reads zero or max value.

Steps:

  1. Confirm the symptom in Automation Studio: Watch the variable over time using the watch window or mapp Trend
  2. Identify the station: Note the NodeID and slot position of the failing module
  3. Set up Wireshark capture:
    • Connect PC to POWERLINK network via hub
    • Disable TCP/IP on the capture interface
    • Set NIC to half-duplex, 100 Mbps
  4. Filter for the failing station:
    • epl.src == <NodeID> && epl.service_type == "PRes"
    • Add a PRes-Payload column
  5. Compare good vs bad readings:
    • Identify the byte offset of the failing channel in the PRes payload
    • Correlate with the known sensor address mapping
  6. Check for POWERLINK errors:
    • Look for ASnd frames with error indications
    • Check if other stations are affected
  7. Physical checks:
    • Inspect wiring from sensor to AI module terminals
    • Check shield/ground connections
    • Verify sensor power supply
  8. Advanced: If the fault is timing-related, switch to X20ET8819 for nanosecond-precision capture with hardware trigger

10.2 Workflow 2: PROFINET IO Device Randomly Dropping Offline

Scenario: A PROFINET IO device intermittently shows “Not Found” or drops out of data exchange.

Steps:

  1. Set up capture with SPAN/tap:
    • Configure managed switch: mirror the port connected to the failing IO device
    • Connect PC to mirror port, start Wireshark
    • Critical: Start capture before the device connects to capture the connection setup
  2. Monitor normal operation:
    • Verify cyclic RT frames are arriving regularly: pn_rt && eth.addr == <device MAC>
    • Check CycleCounter is incrementing without gaps
    • Verify DataValid = 1
  3. Capture the failure event:
    • Let the capture run until the device drops out
    • Look for the last cyclic frame before the dropout
  4. Analyze the failure:
    • If cyclic frames stop abruptly with no alarms: cable or power failure
    • If DataValid goes to 0 before dropout: sensor/module error
    • If DCP re-discovery occurs: device rebooted or was reconnected
    • If ARP/LLDP stops: physical link went down
  5. Check alarms before dropout:
    • pn_io.alarm_type - look for Pull, Diagnosis, or Status alarms
  6. Root cause:
    • Physical layer: cable, connector, switch port
    • Power: check device power supply
    • Configuration: verify GSDML version, module configuration match
    • Network: check for overloaded switch, VLAN issues

10.3 Workflow 3: CANopen Sensor Sporadically Not Updating

Scenario: A CANopen analog sensor module occasionally stops sending updated values.

Steps:

  1. Identify the node’s CAN ID: Calculate from the PDO mapping (default TPDO1 = 0x180 + NodeID)
  2. Set up CAN capture:
    • Connect CAN adapter to bus via Y-tap
    • Configure matching baud rate
    • Start capture
  3. Monitor PDO traffic:
    • Filter for the node’s TPDO CAN ID
    • Watch the data bytes for the sensor value
  4. Check for errors:
    • Look for emergency messages (CAN ID 0x080 + NodeID)
    • Check heartbeat messages (0x700 + NodeID) - are they still arriving?
    • Monitor bus error counters: ip -s link show can0
  5. SDO read diagnostic objects:
    • Use CANalyzer or python-can to send SDO read requests to diagnostic objects
    • Read OD index 0x1001 (Error Register) and 0x10FD (Error History)
  6. Physical layer:
    • Measure CAN_H and CAN_L voltages with a multimeter (recessive: ~2.5V, dominant: ~3.5V/1.5V)
    • Verify 120-ohm termination at both bus ends
    • Check cable shielding and ground

10.4 Workflow 4: X2X Bus Communication Errors (General)

Scenario: Random communication errors on the X2X bus causing IO modules to show diagnostic LEDs.

Steps:

  1. Check B&R diagnostics first:
    • Use Automation Studio: System Diagnostics -> IO Diagnostics
    • Identify which stations and modules are affected
  2. Set up logic analyzer:
    • Connect RS-485 level shifter to X2L+/X2L- wires
    • Set sample rate to 10x bus speed (120 MHz for 12 Mbaud)
    • Capture for a long duration to catch the intermittent event
  3. Analyze signal integrity:
    • Check differential voltage levels
    • Look for signal ringing, reflections, or noise
    • Compare with known-good reference capture
  4. Check physical layer:
    • Verify bus termination at both ends
    • Inspect connectors for corrosion or loose contacts
    • Check cable length (X2X has maximum segment length limits)
    • Verify shield grounding
  5. Bus utilization:
    • Measure the percentage of time the bus is active vs. idle
    • High utilization can cause timing margin issues
    • Reduce cycle time or station count if overloaded
  6. Replace/swap:
    • Swap the bus controller to rule out a failing transceiver
    • Swap individual IO modules to isolate the failing node

11. Legal and Safety Considerations

11.1 Authorization and Access Control

  • Only authorized personnel should perform network sniffing on industrial control systems
  • Obtain written permission from the plant/facility management before installing any monitoring equipment
  • Follow the organization’s IT/OT security policies and change management procedures
  • Document all monitoring activities, including what was captured, when, and by whom

11.2 Impact on Production Systems

  • Passive tapping is the safest method as it introduces zero risk to the live system
  • Active sniffing (connecting a PC to the network) carries risks:
    • Accidentally sending packets that disrupt real-time communication
    • PC NIC flooding the bus with unwanted traffic (ARP, DHCP, IPv6)
    • Network card driver issues causing packet storms
  • Always disable TCP/IP and other network services on the capture interface before connecting
  • Test any monitoring setup during a planned shutdown before deploying on live systems
  • Use a dedicated, isolated capture machine (never a production PC)

11.3 Data Privacy and Security

  • Captured fieldbus traffic may contain sensitive production data (recipes, process parameters, proprietary configurations)
  • pcap files should be treated as confidential data and stored securely
  • Do not share capture files outside the organization without proper authorization
  • Delete captures after the diagnostic issue is resolved (unless required for compliance)
  • Captured data may contain safety-related information - handle with appropriate care
  • Some industrial protocols transmit passwords or configuration data in plaintext

11.4 Regulatory Compliance

RegulationRelevance
IEC 62443Industrial cybersecurity: network monitoring must comply with zone/conduit model
GDPRIf captures contain personal data (e.g., operator actions)
NIST CSFUS: Identify and protect industrial control system communications
Machine Directive (EU)Safety-related systems must not be compromised by monitoring
Company policiesIT security policies, OT network access policies, change management

11.5 Safety-Critical Systems

  • Never install monitoring equipment on safety-rated fieldbus segments (e.g., PROFIsafe, openSAFETY, CIP Safety) without:
    • Manufacturer approval
    • Safety engineer sign-off
    • Formal risk assessment
    • SIL/PLD verification that monitoring does not compromise safety functions
  • Passive taps are generally acceptable on safety networks as they don’t modify traffic
  • Active devices (even in promiscuous mode) must be certified for use in safety networks

11.6 Liability

  • Monitoring equipment installed on industrial networks becomes part of the safety chain
  • If monitoring equipment fails and causes an incident, the installer may be liable
  • Always follow manufacturer guidelines for network monitoring
  • Use only approved and tested monitoring hardware
  • Maintain records of all monitoring installations and configurations

12. Tools Comparison Table

12.1 Ethernet Protocol Analysis Tools

ToolCostProtocol SupportPlatformStrengths
WiresharkFreePOWERLINK, PROFINET, EtherNet/IP, Modbus TCP, all standard protocolsWin/Linux/macOSIndustry standard, powerful filtering, extensible
EPL-VizFree (research)POWERLINK onlyWeb-basedPOWERLINK-specific visualization, state monitoring
B&R X20ET8819~$500-1500 (est.)POWERLINK onlyB&R systemNanosecond timestamps, trigger recording, filter inputs
Hilscher netANALYZER~$2,000-5,000PROFINET, EtherCAT, EtherNet/IP, POWERLINKPC (Windows)Professional industrial Ethernet analysis
Hilscher netMIRROR~$500-1,500Any EthernetPassive tapNon-intrusive monitoring, hardware-based
PI PROFINET Investigator~$1,000-3,000PROFINET (all classes)WindowsOfficial PI tool, GSD-based decode
PronetaFreePROFINETWindowsNetwork topology, device commissioning

12.2 CAN Bus Analysis Tools

ToolCostCANopen SupportPlatformStrengths
PEAK PCAN-ViewFree (with adapter)Basic CAN frame displayWin/LinuxIncluded with PCAN hardware, simple and reliable
PEAK PCAN-Explorer 6~$500-1,000CANopen with EDS importWindowsCANopen-specific analysis, free trial
Vector CANalyzer~$3,000-8,000Full CANopen, J1939, LIN, MOSTWindowsIndustry gold standard, CAPL scripting, graphics
Vector CANalyzer.CANopen~$1,500 add-onCANopen OD, PDO, SDOWindowsDeep CANopen analysis with EDS/EDD
Kvaser CANKingFree (with adapter)BasicWindowsSimple monitoring
SocketCAN (candump/cansniffer)FreeBasic CAN frame captureLinuxScriptable, integrates with Python, free
python-canFreeCANopen via canopen libraryCross-platformPython scripting, automated analysis
CanLoverFreeCANopenWin/LinuxModern UI, CANalyzer alternative, SocketCAN native
BusmasterFreeCANopen, J1939, ISO 15765WindowsOpen-source, comprehensive, GUI

12.3 Logic Analyzers for X2X/Serial

ToolCostSample RateChannelsStrengths
Saleae Logic 8~$500100 MS/s8Excellent software, easy to use, protocol decode
Saleae Logic Pro 16~$1,000500 MS/s16Higher sample rate for fast X2X at 12Mbaud
Saleae Logic Pro 16 (High-Performance)~$1,500500 MS/s (with deep memory)16Long captures, high performance
Sigrok/PulseView + cheap LA$10-100 (hardware)24-100 MS/s8-16Free software, 131+ decoders, extensible
DreamSourceLab DSLogic~$150-300400 MS/s16High performance, sigrok compatible
Rigol DS1054Z (scope+LA)~$4001 GS/s16 (LA mode)Oscilloscope + logic analyzer combined

12.4 Ethernet Tap Hardware

ToolCostTypeSupported Media
Dualcomm DTE~$30-50Port-stealing (regenerative)Copper 10/100/1000
SharkTap~$50-100Regenerative inline tapCopper 10/100/1000
Garland Technology~$200-500Passive/aggregatedCopper + Fiber
NetOptics / Gigamon~$500-2,000Enterprise passive/aggregatedCopper + Fiber
Managed switch (SPAN)N/A (existing)Software mirroringDepends on switch
Hilscher netMIRROR~$500-1,500Industrial passive tapIndustrial Ethernet

12.5 Comprehensive Capability Matrix

ToolPOWERLINKPROFINETCANopenX2XCaptureTiming AccuracyCost Range
WiresharkYesYesNo (via CAN adapter)NoSoftware~microsecondFree
X20ET8819YesNoNoNoHardwareNanosecond$$$
netANALYZERYesYesNoNoHardwareNanosecond$$$$
PCAN-ViewNoNoYesNoSoftwareMillisecond$ (w/adapter)
CANalyzerNoNoYesNoSoftwareMillisecond$$$$
SocketCANNoNoYesNoSoftware/CLIMillisecondFree
Saleae LogicNoNoCAN (decode)Yes (signal)Hardware~nanosecond$$-$$$
Sigrok/PulseViewNoNoCAN (decode)Yes (signal)Hardware/CLI~nanosecondFree-$
OscilloscopeNoNoCAN (signal)Yes (signal)HardwareNanosecond-psec$$-$$$$

Legend: Free = $0, $ = <$100, $$ = $100-500, $$$ = $500-2,000, $$$$ = >$2,000


13. Sources and References

Official Documentation

  • B&R Community: “Diagnosis of POWERLINK networks using Wireshark” https://community.br-automation.com/t/diagnosis-of-powerlink-networks-using-wireshark/3648
  • B&R Automation: POWERLINK in detail https://www.br-automation.com/en/technologies/powerlink/technology/powerlink-in-detail/
  • B&R Automation: X20ET8819 Ethernet Analysis Tool https://www.br-automation.com/en/products/io-systems/x20-system/x20-hub-system/x20et8819/
  • B&R Automation: POWERLINK Configuration and Diagnostics (TM950TRE.40) http://www.ftp.boss-bravo.fr/wiki/pdf/TM_BR/TM950TRE.40-ENG_POWERLINK%2520Configuration%2520and%2520Diagnostics_V4000.pdf

Wireshark and Protocol References

  • SCADA Protocols: “Wireshark for PROFINET: How to Capture and Decode RT, DCP, and IO Traffic” https://scadaprotocols.com/wireshark-profinet-decode-rt-dcp-guide/
  • Wireshark Wiki: PROFINET/RT https://wiki.wireshark.org/PROFINET/RT
  • Wireshark Wiki: PROFINET/DCP https://wiki.wireshark.org/PROFINET/DCP
  • Wireshark Wiki: PROFINET/IO https://wiki.wireshark.org/PROFINET/IO
  • Felser Engineering: PROFINET Manual - Wireshark https://www.felser.ch/profinet-manual/wireshark.html
  • Felser Engineering: Port Mirroring - PROFINET Manual https://www.felser.ch/profinet-manual/pn_port-mirroring.html
  • EPL-Viz: POWERLINK visualization https://epl-viz.github.io/

CAN Bus and CANopen

  • CSS Electronics: “CANopen Explained - A Simple Intro” https://www.csselectronics.com/pages/canopen-tutorial-simple-intro
  • CSS Electronics: “CAN Bus Errors Explained” https://www.csselectronics.com/pages/can-bus-errors-intro-tutorial
  • Analog Devices: “How to map objects to a PDO on a CANopen slave” (AN-076) https://www.analog.com/cn/resources/app-notes/an-076.html
  • NI: “The Basics of CANopen” https://www.ni.com/en/shop/seamlessly-connect-to-third-party-devices-and-supervisory-system/the-basics-of-canopen.html
  • Grid Connect: “CAN Bus Diagnostics: Step-by-Step Guide” https://www.gridconnect.com/blogs/news/how-to-diagnose-a-controller-area-network-can
  • EEVblog: “Kvaser or Peak CAN bus adapters for CAN Open” https://www.eevblog.com/forum/chat/kvaser-or-peak-can-bus-adapters-for-can-open/
  • RPubs: “CAN Tool Comparison (Vector vs PEAK)” https://rpubs.com/daniel_pas/can_tool_comparison
  • GitHub: “Awesome CAN bus tools, hardware and resources” https://github.com/ajouatom/canbus-tools
  • CAN Wiki: “CAN analyzers” http://www.can-wiki.info/doku.php?id=testequipment:cananalyzers

Hardware and Sniffing Tools

  • Hilscher: “Sniffing Tool” (glossary/overview) https://www.hilscher.com/service-support/glossary/sniffing-tool
  • Sigrok: “Protocol decoders” (131+ decoders) http://sigrok.org/wiki/Protocol_decoders
  • Vector: CANalyzer.CANopen product page https://www.vector.com/int/en/products/products-a-z/software/canalyzer/option-canopen/
  • PEAK-System: PCAN-View product page https://www.peak-system.com/products/software/analysis-software/pcan-view/
  • ControlTech: “Vector CANalyzer Alternative: PEAK PCAN-Explorer 6” https://controltechuk.com/blog/vector-canalyzer-alternative/
  • Atomic Object: “Affordable CAN Bus Tools that Won’t Break the Bank” https://spin.atomicobject.com/affordable-can-bus-tools/
  • CanLover: Free CAN analyzer alternative https://canlover.ddns.net/

Network Tapping and Monitoring

  • Garland Technology: “Network TAPs” https://www.garlandtechnology.com/network-tap
  • Gigamon: “Understanding Network TAPs” https://www.gigamon.com/resources/resource-library/white-paper/understanding-network-taps-first-step-to-visibility.html
  • Network Critical: “Top 8 Network TAPs for Passive Network Monitoring in 2026” https://www.networkcritical.com/blogs/top-8-network-taps-for-passive-network-monitoring
  • Industrial Monitor Direct: “Capturing EtherNet/IP I/O Traffic: Network Taps vs Switch Port Mirroring” https://industrialmonitordirect.com/blogs/knowledgebase/capturing-ethernetip-io-traffic-with-wireshark-network-taps-vs-switch-port-mirroring
  • Siemens Industry Support: “Network capture with Wireshark and Port Mirroring using SCALANCE X” https://support.industry.siemens.com/cs/document/109976057

B&R X2X and IO Systems

  • B&R Automation: X20 System User’s Manual https://www.phb-electricite.fr/content/doc/br_automation/x20_system_manual.pdf
  • Reddit r/PLC: “B&R X2X Link network troubleshooting” https://www.reddit.com/r/PLC/comments/p73low/br_x2x_link_network_troubleshooting/
  • B&R Automation: X20BC0063 (X2X to PROFIBUS DP bus controller) https://www.br-automation.com/en/products/io-systems/x20-system/bus-controllers/x20bc0063/

Industrial Ethernet Switches

  • Bihl+Wiedemann: “POWERLINK Fieldbus system” https://www.bihl-wiedemann.de/en/company/technological-foundations/bus-systems/powerlink

Academic and Research

  • ResearchGate: “Attacking Fieldbus Communications in ICS: Applications to the SWaT Testbed” https://www.researchgate.net/publication/292612170_Attacking_Fieldbus_Communications_in_ICS_Applications_to_the_SWaT_Testbed
  • ResearchInventy: “A Comprehensive Study of Cybersecurity in Fieldbus Protocols” http://www.researchinventy.com/papers/v15i9/15092732.pdf

Cross-References


Document generated July 2026. Verify all URLs and tool versions before use. Industrial network sniffing should only be performed by qualified personnel following organizational safety and security policies.


Key Findings

  1. Wireshark with the POWERLINK plugin is the most accessible sniffing tool — it captures EPL traffic from any PC with a supported NIC in promiscuous mode. No expensive hardware required for basic POWERLINK diagnostics.
  2. X2X bus sniffing requires a logic analyzer — the proprietary protocol has no Wireshark decoder. A Saleae or Sigrok-compatible analyzer with ground clips on the X2X link connector is needed. See x2x-protocol.md for frame format details.
  3. CAN bus sniffing with PCAN or Vector tools is well-supported — the CANopen protocol on the B&R IF2772 is standard CiA 301, making commercial CAN analyzers fully capable. PDO/SDO mapping can be decoded with standard tools.
  4. Network tap placement matters — for POWERLINK, tap at the switch mirror port (not inline) to avoid timing disruption. For X2X, probe the backplane connector pins directly with the logic analyzer ground clips.
  5. Sniffing without disrupting production is the primary challenge — always use non-invasive methods (mirror ports, clamp-on current probes) on running machines. Reserve invasive probing for shutdown windows.
  6. The most common sniffing use case for undocumented machines is identifying which IO channel is failing — correlate captured sensor data with the IO module’s channel assignment to pinpoint the exact failing channel without any documentation.

eBPF-Based Telemetry for B&R (ABB) PLCs: Comprehensive Technical Analysis

Modern Linux-based B&R controllers (BX/BP series, X20 with embedded Linux) offer opportunities for deep runtime telemetry that were impossible on older VxWorks-based systems. This document explores using eBPF, strace, perf, and SystemTap to capture function calls, message data, and performance metrics from the B&R Automation Runtime — both live on a running controller and from captured dump files for post-mortem analysis of control program bugs. Where eBPF is not available, alternative approaches including ptrace-based tracing and LD_PRELOAD hooking are covered. Cross-references: ar-rtos.md for AR runtime internals, custom-diagnostic-tools.md for building diagnostic tools that run on the PLC, and python-diagnostics.md for external diagnostic scripting.

Table of Contents

  1. Executive Summary
  2. B&R Automation Runtime: OS Architecture
  3. eBPF Feasibility on B&R Controllers
  4. Alternative Tracing Approaches
  5. Capturing Function Calls from B&R Runtime
  6. Message Data Interception: POWERLINK/X2X/CAN
  7. Task Scheduling, Cycle Times, and Context Switch Monitoring
  8. Memory Access Monitoring: IO Reads/Writes
  9. B&R’s Built-in Tracing and Profiling Hooks
  10. Automation Studio Profiler
  11. Custom Telemetry Collectors Using B&R’s C/C++ SDK
  12. Live Monitoring vs. Dump-File Analysis
  13. Using perf to Profile B&R Tasks on VxWorks-Based Controllers
  14. Practical Limitations
  15. SDM and OPC-UA as Alternative Telemetry Paths
  16. SNMP Monitoring of B&R Hardware Health Metrics
  17. Recommended Telemetry Architecture

1. Executive Summary

eBPF cannot be used natively on B&R PLCs. Automation Runtime (AR) is based on VxWorks, not Linux. VxWorks does not implement eBPF. This fundamental OS-level constraint means all Linux-native tracing tools (eBPF/bpftrace, perf, SystemTap, strace, ftrace, LD_PRELOAD) are unavailable on standard B&R controllers.

However, B&R provides a rich set of built-in diagnostics tools, and several viable telemetry paths exist:

ApproachFeasibilityData Available
eBPF on AR (VxWorks)Not possibleN/A
eBPF on hypervisor Linux sidePossible on dual-OS APCsLinux-side data only
Automation Studio ProfilerExcellentTask runtimes, cycle violations, CPU load
SDM (System Diagnostics Manager)ExcellentHardware status, IO, firmware, network
OPC UA ServerExcellentAny PLC variable in real-time
Network Command Trace (NCT)GoodPOWERLINK/CAN bus traffic, commands
RTInfo / BRSystem libraryGoodCycle times, task info at application level
Custom C modules (AsIO, etc.)GoodIO access, memory-mapped regions
SNMPGoodNetwork config, hardware health
System Dump analysisGood (post-mortem)Full state snapshot

2. B&R Automation Runtime: OS Architecture

2.1 Core OS: VxWorks-Based

B&R Automation Runtime (AR) is definitely based on VxWorks. This was confirmed by B&R engineering staff on the official community forum:

“Automation Runtime is definitely based on VxWorks. For sure, B&R developed a lot of additional functions, task class scheduling, drivers and abstraction layers needed for PLCs (that’s the reason why it’s called by its own name AutomationRuntime), but the base is still VxWorks until now.” — Alexander Hefner, B&R Community (May 2024) Source: https://community.br-automation.com/t/the-os-behind-ar/3303

Key implications of this architecture:

  • Not Linux: Standard Linux tracing tooling (eBPF, perf, SystemTap, strace, LD_PRELOAD) does not apply to the real-time execution environment.
  • RTOS with deterministic scheduling: VxWorks provides hard real-time guarantees with priority-based preemptive scheduling. B&R adds custom task class scheduling on top of this.
  • Closed/proprietary: The runtime is a proprietary binary distribution. Source code and kernel headers are not available.

2.2 Dual-OS Systems: The Hypervisor

On B&R Automation PCs (APC series), a bare-metal hypervisor runs alongside a General Purpose OS (GPOS):

  • Automation Runtime runs as the real-time partition (VxWorks-based)
  • Windows IoT Enterprise LTSC or “B&R for Linux” (based on Ubuntu/Debian) runs as the standard partition
  • Data exchange occurs via shared memory between partitions

This means on dual-OS APCs, eBPF is technically possible on the Linux side — but only for monitoring the Linux GPOS partition, not the real-time Automation Runtime partition.

Sources:

  • https://www.br-automation.com/en-us/products/software/operating-systems/
  • https://www.real-time-systems.com/fileadmin/benutzerdaten/real-time-systems/pdf/BnR_TR_17209_Hypervisor_EN.pdf
  • https://www.br-automation.com/en/about-us/customer-magazine/2018/20189/two-operating-systems-on-one-device/

2.3 ARsim: Windows Simulation

ARsim (Automation Runtime Simulation) runs on the Windows development machine. It simulates the AR runtime but is not identical to the target execution. It is useful for debugging but does not expose VxWorks-level internals.

2.4 Controller Categories

Controller TypeBase OSeBPF Possible?Notes
X20/X67 CPU modulesVxWorks (AR)NoStandard PLC hardware
Power Panel / Panel PCsVxWorks (AR) + optional GPOSOnly GPOS sideHMI + control
Automation PC (APC)VxWorks (AR) + Windows/LinuxOnly GPOS sideDual-OS via hypervisor
ARsim on dev PCWindows simulationN/ANot representative of target

3. eBPF Feasibility on B&R Controllers

3.1 On Native AR (VxWorks-Based Controllers)

eBPF is not available. VxWorks does not implement the BPF virtual machine, BPF syscall interface, or any of the kernel infrastructure required for eBPF. This applies to all standard B&R controllers (X20, X67, Power Panel, etc.).

VxWorks has its own instrumentation framework (Wind River Workbench diagnostics, System Viewer), but these are proprietary and not accessible from user code without Wind River development tools.

3.2 On B&R for Linux (GPOS Partition of APC)

On dual-OS Automation PCs running “B&R for Linux”:

  • The Linux partition runs a standard Linux kernel (Ubuntu-based)
  • eBPF tools (bpftrace, bcc tools, bpftool) can theoretically be installed
  • However, you can only monitor the Linux GPOS partition, not the real-time Automation Runtime
  • The RTOS partition is isolated by the hypervisor; shared memory is the only communication channel

3.3 What eBPF Could Monitor on the Linux Side

If you deploy eBPF on the Linux partition of an APC:

Data PointAccessible?Notes
Linux process schedulingYesStandard bpftrace/perf
Network stack (TCP/IP)YesBut POWERLINK runs on RTOS side
File system I/OYesSD card, USB, logging files
Shared memory reads/writesPartiallyCan observe the Linux-side end of shared memory transfers
PLC task executionNoRTOS partition, not visible
POWERLINK/X2X bus trafficNoRTOS drivers, not visible
IO module accessNoHardware mapped to RTOS

Source: https://github.com/SASE-Space/ot-openness-comparison/blob/main/README.md


4. Alternative Tracing Approaches

4.1 strace — System Call Tracing

Status: Not applicable to native AR.

strace relies on the Linux ptrace system call mechanism to intercept and record system calls made by a process. VxWorks has no equivalent mechanism accessible to user programs. The VxWorks kernel shell provides taskShow() and similar commands, but these are not equivalent to strace.

On the Linux GPOS partition of APCs, strace works normally for Linux-side processes.

4.2 perf — Performance Profiler

Status: Not applicable to native AR.

perf uses Linux kernel performance counters (perf_events subsystem) and hardware performance monitoring units (PMUs). These do not exist in the VxWorks kernel.

On the Linux GPOS partition, perf works for Linux processes. See Section 13 for details on VxWorks-specific profiling.

4.3 SystemTap — Dynamic Instrumentation

Status: Not applicable to native AR.

SystemTap requires Linux kernel headers, a compiled kernel module infrastructure, and the Linux kernel’s kprobes/jprobes mechanism. None of these exist in VxWorks.

4.4 LD_PRELOAD Hooking

Status: Not applicable to native AR.

LD_PRELOAD is a Linux dynamic linker feature that allows pre-loading shared libraries to intercept function calls. VxWorks uses its own module loading system (the Object Module Loader, or OML), which does not support this mechanism.

On the Linux GPOS partition, LD_PRELOAD works for Linux processes — but this still only monitors the GPOS side.

4.5 VxWorks-Specific Alternatives

VxWorks provides its own set of diagnostic tools:

ToolWhat it doesAccess
VxWorks Kernel ShellInteractive command-line on targetRequires shell access (SSH/serial)
Wind River Workbench System ViewerTask-aware tracing with instrumentationRequires WR development tools
Tracealyzer for VxWorksVisual trace analysis of task schedulingThird-party, requires instrumentation SDK
Lauterbach TRACE32Hardware debugger with trace capabilitiesJTAG access required
GDB (cross-debug)Source-level debuggingRequires debug symbols and GDB stub

Source: https://www.windriver.com/blog/tracealyzer-for-vxworks-overview-and-getting-started-guide


5. Capturing Function Calls from B&R Runtime

5.1 The Runtime is Proprietary and Opaque

B&R’s runtime executables (BX/BP binaries compiled from Automation Studio) are proprietary compiled modules loaded by the AR kernel. There is no standard mechanism to:

  • Hook into runtime function calls
  • Set breakpoints in runtime internals
  • Intercept function entry/exit without debug tools
  • Dynamically instrument running code

5.2 What CAN Be Observed at the Application Level

Within your own IEC/ST/C programs running on the PLC, you can instrument code using:

  1. RTInfo Function Block (BRSystem library): Provides cycle time, task index, and timing information for the current task context. Call RTInfo from within your program to get runtime statistics.

    Source: https://community.br-automation.com/t/cycle-time-in-fb/4372

  2. AsBrStr library: String and logging functions for structured diagnostic output.

  3. mapp View Trace: If using HMI components, mapp View provides tracing of user interactions and data flow.

  4. User-defined logging: Write diagnostic data to data modules (persistent storage) or send via OPC UA/UDP to external collectors.

5.3 Automation Studio Debugger

Automation Studio provides a source-level debugger (C debugger and IEC debugger):

  • Breakpoints, single-step, line coverage
  • Watch windows for variable monitoring
  • Disassemble view for compiled code
  • Works online (connected to target) and in ARsim

This requires an active Automation Studio connection to the PLC and is primarily a development tool, not a production telemetry mechanism.


6. Message Data Interception: POWERLINK/X2X/CAN

POWERLINK is B&R’s primary industrial Ethernet protocol, implemented as an open-source protocol stack (openPOWERLINK). It runs on standard Ethernet hardware.

At the software level on the PLC:

  • POWERLINK communication is handled by AR kernel drivers
  • User code does not directly access POWERLINK frames
  • Data is exchanged through the process image (IO mapping)

Capturing POWERLINK traffic:

MethodWhat you getRequirements
Network Command Trace (NCT)POWERLINK commands, timing, errorsEnabled in AS; captured in system dump
Ethernet tap (port mirror)Full pcap capture of POWERLINK framesSwitch with port mirroring; openPOWERLINK Wireshark dissector
SDM POWERLINK diagnosticsError counters, node status, link qualityWeb browser access to SDM
OPC UA POWERLINK modelConfigured data exchange objectsOPC UA server enabled; subscription-based
openPOWERLINK API (Linux)Full stack controlOnly on Linux-side, not on AR

Sources:

  • https://www.br-automation.com/en/technologies/powerlink/faq/
  • https://github.com/OpenAutomationTechnologies/openPOWERLINK_V2
  • http://www.ftp.boss-bravo.fr/wiki/pdf/TM_BR/TM950TRE.40-ENG_POWERLINK%20Configuration%20and%20Diagnostics_V4000.pdf

X2X is B&R’s proprietary point-to-point connection protocol for I/O nodes (typically within a single station/bus controller).

Capturing X2X data:

  • X2X is a proprietary, non-Ethernet protocol
  • No packet capture mechanism exists
  • Diagnostics available through SDM: node status, error counters, cycle synchronization
  • I/O data visible through the process image (map to PLC variables)

6.3 CAN Bus

B&R controllers support CAN interfaces. CAN diagnostics are available through:

MethodData Available
ArCAN library (in user code)CAN frame send/receive from user programs
SDM CAN diagnosticsBus load, error counters, state
Network Command TraceCAN commands logged
SDM web interfaceError frame counts, bus-off events

6.4 Network Command Trace (NCT)

The Network Command Trace is a diagnostic tool built into AR that logs fieldbus communication events:

  • Captures POWERLINK, CAN, and other bus commands
  • Records timing, errors, and data transfer events
  • Can be included in system dumps
  • Enabled via Automation Studio diagnostic configuration
  • Useful for post-mortem analysis of communication failures

Source: https://www.youtube.com/watch?v=aGNr5DICm8M (B&R “Troubleshoot Hardware Using Network Command Trace”)


7. Task Scheduling, Cycle Times, and Context Switch Monitoring

7.1 B&R Task Class Architecture

B&R AR uses task classes (TC#1 through TC#8+), each with a configurable cycle time:

Task ClassTypical CycleUse Case
TC#1 (Cyclic#1)10 ms (default)Fast control loops
TC#2 (Cyclic#2)100 msStandard logic
TC#3 (Cyclic#3)200 msNon-critical logic
TC#4-8User-definedVarious
Timer HSTCMicrosecond-rangeHigh-speed timer tasks
Event classesOn-demandNon-cyclic, triggered

Higher-priority task classes can preempt lower ones. A cycle time violation occurs when a lower-priority task takes too long and prevents a higher-priority task from completing within its cycle.

7.2 Monitoring Task Scheduling

Built-in mechanisms:

  1. Automation Studio Profiler (see Section 10): The primary tool for monitoring task execution, preemptions, cycle time consumption, and CPU load per task class.

  2. RTInfo Function Block (BRSystem library): Returns the current task’s cycle time and runtime information. Sample from within any cyclic program.

    (* Example: Monitor cycle time in ST *)
    rtInfo_0(enable := TRUE);
    currentCycleTime := rtInfo_0.cycleTime;
    
  3. Logger (Automation Studio): Captures cycle time violation events, errors, and warnings. Viewable online or exported from system dumps.

  4. Watchdog monitoring: AR’s watchdog can be configured to trigger SERVICE mode on cycle time violations. The Logger records these events with timestamps.

7.3 Context Switch Visibility

Direct context switch monitoring (equivalent to Linux sched tracepoints or eBPF sched_switch) is not available on AR without Wind River’s proprietary instrumentation tools.

The Profiler provides the closest equivalent: it records task entry/exit events, preemption timing, and idle time — sufficient for most performance analysis needs.


8. Memory Access Monitoring: IO Reads/Writes

8.1 IO System Architecture

B&R uses a process image model:

  • Inputs are mapped to %IX addresses
  • Outputs are mapped to %QX addresses
  • Memory areas: %MX (flags), %MX (merker/flags), %LX (local), %MW (word memory)

IO is updated cyclically by the kernel at the start/end of each cycle. User code reads/writes the process image, not hardware directly.

8.2 Monitoring IO at the Application Level

AsIO library — B&R’s standard IO access library:

  • AsIOFListDP(): Get data pointers for IO objects
  • AsIORead(), AsIOWrite(): Direct IO read/write from C/C++ modules
  • Functions to enumerate IO channels, get mapping information

You can build a custom C module that periodically reads IO data and logs it:

AsIOFListDP() → get pointer to IO data area
memcpy() → copy data to telemetry buffer
Export via OPC UA or send via UDP

Source: https://community.br-automation.com/t/how-to-use-asio-library-function-asioflistdp-to-get-the-pointer-of-a-certain-io/3475

8.3 Watching IO via the Profiler

The Profiler does not capture individual IO read/write operations. It captures task-level timing, not data-level access patterns.

8.4 Watching IO via the Trace

Automation Studio’s Trace function can record variable values over time:

  • Configure trace to sample specific variables at defined intervals
  • Data is stored in a trace buffer and can be uploaded to Automation Studio
  • Resolution limited by trace buffer size and sampling rate

8.5 Hardware-Level Monitoring (Not Possible from Software)

Direct hardware register access monitoring (equivalent to eBPF kprobe on ioread*/iowrite*) is not possible on B&R AR. The RTOS kernel handles all hardware access, and there is no user-space mechanism to observe or intercept it.


9. B&R’s Built-in Tracing and Profiling Hooks

9.1 Diagnostic Infrastructure Overview

B&R provides a comprehensive diagnostic infrastructure within Automation Runtime:

ComponentPurposeAccess Method
LoggerEvent/error logging, cycle violationsAS online / system dump
ProfilerTask-level timing and schedulingAS online / system dump
Network Command TraceBus communication eventsSystem dump
System Diagnostics ManagerWeb-based diagnosticsHTTP/HTTPS
System DumpFull state captureSDM / function block
TraceVariable value recordingAS online
WatchReal-time variable monitoringAS online
ARsim DebuggerSource-level debuggingAS connected

9.2 AsArProf Library

The AsArProf library provides programmatic control over the Profiler from within PLC code:

Function BlockAction
LogStopStop running profiler
LogDeInstallRemove existing profiler configuration
LogInstallInstall profiler with custom parameters
LogStartEnable and start profiler
LogStateGetQuery profiler state

This allows automatic profiler activation on PLC startup, e.g., in an INIT program of TC#1:

  1. Call LogStop to stop any running profiler
  2. Call LogDeInstall to remove old config
  3. Call LogInstall with custom parameters (buffer size, recording entries)
  4. Call LogStart to begin recording
  5. (Optional) Call LogStateGet to verify

Source: https://community.br-automation.com/t/how-to-create-a-long-profiler-with-enough-data-for-analysis/493

9.3 Library Logging

Individual B&R libraries can be configured for verbose logging within the Profiler. This adds library-specific events (e.g., POWERLINK stack events, motion control events) to the profiler trace.


10. Automation Studio Profiler

10.1 What the Profiler Captures

The Automation Studio Profiler is the primary performance analysis tool for B&R PLCs:

  • Task execution times: How long each task class takes per cycle
  • Task preemptions: When a higher-priority task interrupts a lower one
  • CPU idle time: Percentage of time the CPU is idle
  • Cycle time violations: When a task exceeds its configured cycle time
  • Non-cyclic task execution: Event-driven task timing
  • Call counts: Number of times each task was invoked
  • Unknown task detection: Tasks not properly accounted for in the buffer

10.2 Profiler Configuration

The Profiler stores data in circular buffers:

ParameterDefaultRecommended
Number of recording entries~200015000+ for long traces
Buffer for created tasks1050
Buffer for created user tasks1030
Config storageUSRROMUSRROM
Data object storageUSRRAM or DRAM

The profiler should run for at least 2x the longest task cycle time for meaningful data.

10.3 Profiler Workflow

  1. Connect Automation Studio to PLC
  2. Open > Profiler
  3. Configure buffer sizes (Configuration button)
  4. Install profiler on target
  5. Wait for capture period (10+ seconds typical)
  6. Stop profiler → Upload Data Object
  7. Analyze in Table view or Gantt-style timeline view
  8. Save configuration into project for persistence across reboots

10.4 Profiler Output Analysis

  • Table view: Shows each task class with min/max/avg cycle time, CPU usage percentage
  • Gantt view: Visual timeline of task execution and preemptions
  • Export: Data can be part of system dumps for offline analysis
  • Archived profilers: Automatic error profilers are created on cycle time violations (stored as prfmod$f)

10.5 Limitations

  • Requires Automation Studio connection (not a standalone tool)
  • Buffer sizes limited by PLC memory (USRRAM/DRAM)
  • Does not capture individual function/block execution times within a task
  • Does not capture IO access patterns or message-level bus data
  • No real-time streaming — data is collected in buffers and uploaded post-capture

Sources:

  • https://community.br-automation.com/t/how-to-create-a-long-profiler-with-enough-data-for-analysis/493
  • https://community.br-automation.com/t/maximum-cycle-time-violation/5749

11. Custom Telemetry Collectors Using B&R’s C/C++ SDK

11.1 Automation Runtime SDK

B&R provides a C/C++ development environment within Automation Studio for creating user modules (custom libraries and function blocks):

  • ANSI C modules compiled for the VxWorks-based target
  • Access to B&R runtime APIs (AsIO, AsTime, ArCAN, BRSystem, etc.)
  • Compiled to .BR files (binary runtime modules)
  • Runs as part of the cyclic task execution

11.2 Available Libraries for Telemetry

LibraryTelemetry Use
BRSystemRTInfo for cycle times, task info, system timing
AsIOIO access, data pointer enumeration, direct IO read/write
AsTimeHigh-resolution timestamps, time synchronization
ArCANCAN bus communication (send/receive frames, diagnostics)
AsUDP / AsTCPNetwork communication (send telemetry to external collectors)
AsFileFile system access (write logs to SD card)
AsMemMemory access functions
mapp componentsHigher-level data logging and connectivity

11.3 Building a Custom Telemetry Collector

Architecture for a C-based telemetry collector running on the PLC:

Cyclic Task (e.g., TC#2, 100ms)
  ├── Sample RTInfo → cycle time, task runtime
  ├── Read AsIO process image → IO values
  ├── Read ArCAN status → CAN bus counters
  ├── AsTime → high-resolution timestamp
  ├── AsUDP → send telemetry packet to collector server
  └── AsFile → local buffer/log file

The collector runs as a standard PLC program, with access to all runtime APIs. It can:

  • Aggregate metrics over time
  • Compute moving averages, min/max, histograms
  • Send to external systems via UDP/TCP
  • Write to local storage for batch upload

11.4 OPC UA as Telemetry Export

Rather than raw UDP, the OPC UA server provides a structured telemetry path:

  1. Define telemetry variables in the Automation Studio project
  2. Enable OPC UA accessibility on each variable
  3. External OPC UA clients subscribe and receive updates at configurable rates

This is the recommended approach for production telemetry from B&R PLCs (see Section 15).


12. Live Monitoring vs. Dump-File Analysis

12.1 Live Monitoring

ToolDataLatencyProduction Use
Watch WindowVariable valuesReal-timeDevelopment only
TraceVariable historyReal-timeDevelopment only
ProfilerTask timingNear real-timeCan run in production (with overhead)
OPC UA ServerAny PLC variableConfigurable (10ms+)Production-ready
SDM Web UIHardware diagnosticsOn-demandProduction-ready
SNMPHardware healthPolling intervalProduction-ready

12.2 Dump-File Analysis (Post-Mortem)

ToolDataTrigger
System DumpFull PLC state, logger, profiler, NCTManual (SDM/FB) or automatic (error)
Profiler uploadTask timing dataManual capture
Trace uploadVariable historyManual capture

12.3 System Dump Contents

A system dump (XML-based, collected via SDM or SdmSystemDump() FB) contains:

  • General target status
  • Software modules and their versions
  • System timing information
  • Hardware modules: configuration, serial numbers, firmware versions
  • IO status at dump timestamp
  • Memory status
  • Logger entries
  • Profiler data
  • Network Command Trace data
  • Application information

Source: https://github.com/hilch/systemdump.py

12.4 Automating System Dumps

The systemdump.py tool (open-source) automates system dump creation and collection from the command line:

pip install systemdumpy

py -m systemdumpy 192.168.0.100 -cuv -p MyCPU_

This creates, uploads, and saves system dumps programmatically — useful for automated diagnostics pipelines.

Source: https://github.com/hilch/systemdump.py

12.5 Comparison

CriterionLive MonitoringDump Analysis
VisibilityOngoingPoint-in-time snapshot
OverheadVaries (OPC UA low, Profiler moderate)Capture moment only
AutomationOPC UA subscriptions, SNMP pollingsystemdump.py, SdmSystemDump()
ScopeLimited to configured variablesComprehensive system state
Best forTrending, dashboards, alertingRoot cause analysis, forensics

13. Using perf to Profile B&R Tasks on VxWorks-Based Controllers

13.1 perf on VxWorks: Not Possible

The Linux perf tool is not available on VxWorks-based B&R controllers. perf requires:

  • Linux perf_events kernel subsystem
  • Hardware PMU access through Linux syscalls
  • BPF or kernel module support for advanced tracing

None of these exist in VxWorks.

13.2 VxWorks Performance Analysis Tools

Wind River provides proprietary performance tools for VxWorks:

ToolWhat it doesAccess
Wind River Workbench ProfilerTask-level profiling with timing dataRequires WR Workbench license
System ViewerEvent-based tracing with kernel/user instrumentationRequires instrumentation SDK
Tracealyzer for VxWorksVisual trace analysis, timeline viewPercepio product, requires SDK integration
VxWorks Kernel ShelltaskShow(), spShow(), memShow()Shell access required
Lauterbach TRACE32Hardware-level trace, performance countersJTAG debugger required

13.3 Tracealyzer for VxWorks

Tracealyzer is the closest VxWorks equivalent to Linux perf/eBPF tracing:

  • Records task scheduling events (start, stop, preemption)
  • Provides timeline visualization of task execution
  • Supports user-defined events (custom instrumentation points)
  • Requires linking a recorder library into the application
  • Limitation: Requires the Tracealyzer SDK and integration into the B&R build process, which is not straightforward given AR’s closed nature

Source: https://www.windriver.com/blog/tracealyzer-for-vxworks-overview-and-getting-started-guide

13.4 VxWorks Kernel Shell Commands

If shell access is available (SSH/serial), useful diagnostic commands include:

taskShow()       /* List all tasks with stack usage and state */
spShow(taskId)   /* Show details of a specific task */
memShow()        /* Memory pool statistics */
iosShow()        /* IO system status */
netShow()        /* Network interface statistics */

13.5 Practical Takeaway

For profiling B&R PLC tasks, use the Automation Studio Profiler rather than trying to use VxWorks-level tools. The AS Profiler is purpose-built for B&R’s task class architecture and does not require additional licenses or access mechanisms.


14. Practical Limitations

14.1 What You CANNOT Monitor

ConstraintDetails
Individual function/block execution timesProfiler shows task-level timing only, not per-FB
Kernel-internal behaviorVxWorks kernel scheduling decisions are opaque
Hardware register accessNo mechanism to observe IO hardware reads/writes
POWERLINK frame-level data (on-target)Bus traffic captured only via NCT or external tap
X2X Link protocol dataProprietary, no software-level capture mechanism
Memory-mapped IO timingNot visible from user space
Interrupt latencyRequires hardware tools (Lauterbach/oscilloscope)
Real-time bus trafficMust use external network tap + Wireshark

14.2 What Requires Shell Access

Shell access (SSH or serial console) is needed for:

  • VxWorks kernel shell commands (taskShow, memShow, etc.)
  • File system browsing on the PLC
  • Manual configuration changes not available via AS
  • Network diagnostics (ifconfig, ping, etc.)

Shell access is not enabled by default and requires:

  • SSH component to be included in the AR configuration
  • SSH credentials configured in the project
  • Network access to the PLC

B&R has confirmed SSH is supported on VxWorks (as of VxWorks 6.5+), but enabling it is a configuration choice.

Source: https://community.br-automation.com/t/sftp-support/8247

14.3 What Requires Automation Studio Project Files

TaskRequires AS Project?
Profiler configurationYes (or via AsArProf library in code)
OPC UA variable exposureYes (variable properties must be configured)
Trace configurationYes
Watch windowYes (project connection)
System dump creationNo (SDM web UI works independently)
SNMP configurationYes (SNMP module must be in project)
Custom C modulesYes (compiled in AS)

14.4 What Requires Automation Runtime Source/License

TaskFeasibility
Modify AR kernel behaviorNot possible (closed source)
Add custom VxWorks kernel modulesNot possible (AR controls kernel)
Use Wind River Workbench for profilingRequires separate WR license, may not be compatible
Use TracealyzerRequires SDK integration (difficult with AR)
B&R for Linux customizationPossible on GPOS partition of APCs

14.5 Production Safety Considerations

  • The Profiler adds CPU overhead (buffer writes every cycle) — minimize buffer sizes or uninstall after capture
  • OPC UA subscriptions add network overhead
  • System dump creation can briefly pause the PLC
  • Custom telemetry C modules must not violate cycle time constraints
  • Any monitoring that adds latency can cause cycle time violations in fast tasks

15. SDM and OPC-UA as Alternative Telemetry Paths

15.1 System Diagnostics Manager (SDM)

SDM is an integral component of Automation Runtime V3.0 and higher, providing web-based diagnostics accessible from any browser:

URL: http://<PLC-IP>/sdm

Available data through SDM:

CategoryData Points
Hardware OverviewModule status, serial numbers, firmware versions, temperatures
NetworkInterface status, IP configuration, POWERLINK node status
IO SystemModule configuration, channel status, error counts
DiagnosticsEvent log, warnings, errors, cycle time violations
MemoryMemory usage, partition status
System DumpCreate and download full system dumps

SDM is the primary recommended tool for hardware-level health monitoring of B&R PLCs.

Source: https://www.scribd.com/document/916397506/TM213TRE-40-EnG-Automation-Runtime-V4100-B-R-Acopos

15.2 OPC UA Server

B&R provides OPC UA servers and clients on every controller as a standard feature (no additional licensing required):

  • OPC UA server runs directly on the PLC
  • Port 4840 (standard OPC UA)
  • Supports both OPC UA client and server roles
  • Any PLC variable can be exposed via OPC UA
  • Subscription-based real-time updates
  • Compliant with IEC 62443 security standards (AS 6.0+)

Setting up OPC UA telemetry:

  1. In Automation Studio, open the CPU configuration
  2. Enable OPC UA Server in the configuration
  3. For each variable to monitor, set OPC UA accessibility in variable properties
  4. OPC UA clients (SCADA, MES, custom collectors) subscribe to variables

OPC UA information models:

  • B&R provides two OPC UA information models for representing PLC data
  • Custom NodeId mapping available
  • PLCopen function blocks for OPC UA server/client in user code

Sources:

  • https://www.automation.com/article/br-adds-opc-ua-to-automation-studio-software
  • https://opcua.brhelp.cn/OPC%2520UA%20Information%2520models.pdf
  • http://soup01.com/en/2023/08/31/brautomation-studio_part04_configure-an-opc-ua-server-2/

15.3 Building an OPC UA-Based Telemetry Pipeline

B&R PLC
  └─ OPC UA Server (port 4840)
       ├─ PLC variables (cycle times, IO data, status flags)
       ├─ mapp component data
       └─ Custom telemetry variables from C modules
            │
            ▼
      OPC UA Collector (e.g., Telegraf, custom Python/C++ client)
            │
            ▼
      Time-Series Database (InfluxDB, TimescaleDB, Prometheus)
            │
            ▼
      Dashboard / Alerting (Grafana, etc.)

15.4 OPC UA FX (TSN)

B&R is moving toward OPC UA FX (Field eXchange) over TSN as the next-generation protocol, potentially replacing POWERLINK for new installations. This provides native OPC UA-based telemetry with TSN timing guarantees.

Source: https://www.reddit.com/r/PLC/comments/1pux2cf/is_br_making_a_mistake_choosing_opc_ua_fx_over/


16. SNMP Monitoring of B&R Hardware Health Metrics

16.1 SNMP Support

B&R PLCs support SNMP for network configuration and remote monitoring:

  • SNMP v2c and v3 supported (v3 for authentication/encryption)
  • SNMP agent runs as part of Automation Runtime
  • Requires SNMP module to be included in the AS project configuration
  • Standard MIB-II support for network interfaces
  • B&R-specific private MIB for hardware diagnostics

16.2 Available SNMP Data

CategoryOID RangeData
System description1.3.6.1.2.1.1System name, uptime, contact
Interface status1.3.6.1.2.1.2Network interface counters, status
Network (IP/ICMP/TCP/UDP)1.3.6.1.2.1.4-7Protocol statistics
B&R private MIBVendor-specificModule status, hardware health, temperatures

16.3 brsnmp — Open-Source Tool

brsnmp (https://github.com/hilch/brsnmp) is a C++ Windows command-line tool that executes PVI-SNMP commands for B&R PLCs. It requires the B&R PVI Development Setup to be installed (PVI 4.x or PVI 6.5.2+). Without a PVI license, PVI Manager runs for 2 hours then must be restarted.

Download the pre-built Windows binary from https://github.com/hilch/brsnmp/releases

Basic usage:

brsnmp --list
brsnmp --filter=X20CP1584 --details
brsnmp --filter=macAddress.+00-60-65-3a-39-10 --ipAddress=192.168.1.50

Capabilities:

  • Remote network configuration via SNMP
  • Hardware monitoring queries
  • Integration with standard SNMP monitoring tools (Zabbix, Nagios, PRTG, etc.)

Source: https://github.com/hilch/brsnmp

16.4 SNMP Monitoring Integration

B&R PLC (SNMP Agent)
  └─ snmpd on Automation Runtime
       ├─ Standard MIB-II data (interfaces, system)
       └─ B&R private MIB (hardware health)
            │
            ▼
      SNMP Manager (Zabbix, Nagios, LibreNMS, PRTG)
            │
            ▼
      Alerts / Dashboards

16.5 SNMP Limitations

  • No real-time PLC data: SNMP cannot access process variables, IO data, or cycle times
  • Network/hardware only: Primarily useful for infrastructure monitoring (network interfaces, hardware status)
  • Requires SNMP module: Must be included in the AS project; not enabled by default
  • Polling-based: Not event-driven (unless combined with SNMP traps)
  • Cannot replace OPC UA: For PLC application data, OPC UA is the proper protocol

17.1 For Production Monitoring

┌─────────────────────────────────────────────────┐
│                    B&R PLC                        │
│                                                   │
│  ┌──────────────┐  ┌──────────────────────────┐  │
│  │ OPC UA Server│  │ SNMP Agent                │  │
│  │ (port 4840)  │  │ (port 161)                │  │
│  └──────┬───────┘  └───────────┬──────────────┘  │
│         │                      │                   │
│  ┌──────┴───────┐              │                   │
│  │ Custom C     │              │                   │
│  │ Telemetry    │              │                   │
│  │ Module       │              │                   │
│  │ (via AsIO,   │              │                   │
│  │  RTInfo, etc)│              │                   │
│  └──────────────┘              │                   │
└─────────┬──────────────────────┬──────────────────┘
          │                      │
          ▼                      ▼
   ┌──────────────┐       ┌──────────────┐
   │ OPC UA       │       │ SNMP         │
   │ Collector   │       │ Manager      │
   │ (Telegraf,   │       │ (Zabbix,     │
   │  Node-OPCUA) │       │  LibreNMS)   │
   └──────┬───────┘       └──────────────┘
          │
          ▼
   ┌──────────────┐
   │ Time-Series  │
   │ DB           │
   │ (InfluxDB,   │
   │  TimescaleDB)│
   └──────┬───────┘
          │
          ▼
   ┌──────────────┐
   │ Grafana /   │
   │ Alerting    │
   └──────────────┘

17.2 For Deep Diagnostics (Post-Mortem)

  1. System Dump via SDM or SdmSystemDump() function block
  2. Upload with systemdump.py or AS
  3. Analyze Profiler data, Logger entries, NCT data
  4. Correlate with OPC UA historical data

17.3 For Development

  1. Automation Studio Profiler (primary)
  2. Watch windows + Trace (variable-level)
  3. AS Debugger (source-level)
  4. Network Command Trace (bus diagnostics)
  5. SDM web interface (hardware status)

Appendix A: Source References

TopicSource
AR is VxWorks-basedhttps://community.br-automation.com/t/the-os-behind-ar/3303
Hypervisor dual-OShttps://www.real-time-systems.com/fileadmin/benutzerdaten/real-time-systems/pdf/BnR_TR_17209_Hypervisor_EN.pdf
B&R OS productshttps://www.br-automation.com/en-us/products/software/operating-systems/
B&R for Linuxhttps://www.br-automation.com/en-us/products/software/operating-systems/operating-systems-components-and-versions/br-for-linux/
IT-OT integrationhttps://www.br-automation.com/en/about-us/press-room/new-freedom-through-it-ot-integration-09-12-2020/
Profiler configuration guidehttps://community.br-automation.com/t/how-to-create-a-long-profiler-with-enough-data-for-analysis/493
RTInfo function blockhttps://community.br-automation.com/t/cycle-time-in-fb/4372
AsIO libraryhttps://community.br-automation.com/t/how-to-use-asio-library-function-asioflistdp-to-get-the-pointer-of-a-certain-io/3475
systemdump.pyhttps://github.com/hilch/systemdump.py
brsnmphttps://github.com/hilch/brsnmp
awesome-B-R resourceshttps://github.com/hilch/awesome-B-R
OPC UA information modelshttps://opcua.brhelp.cn/OPC%2520UA%20Information%2520models.pdf
OPC UA in AShttps://www.automation.com/article/br-adds-opc-ua-to-automation-studio-software
OPC UA FX directionhttps://www.reddit.com/r/PLC/comments/1pux2cf/is_br_making_a_mistake_choosing_opc_ua_fx_over/
POWERLINK open sourcehttps://github.com/OpenAutomationTechnologies/openPOWERLINK_V2
POWERLINK FAQhttps://www.br-automation.com/en/technologies/powerlink/faq/
POWERLINK diagnosticshttp://www.ftp.boss-bravo.fr/wiki/pdf/TM_BR/TM950TRE.40-ENG_POWERLINK%20Configuration%20and%20Diagnostics_V4000.pdf
NCT troubleshootinghttps://www.youtube.com/watch?v=aGNr5DICm8M
SDM CVE (context)https://www.abb.com/global/en/company/about/cybersecurity/alerts-and-notifications
SDM in AR manualhttps://www.scribd.com/document/916397506/TM213TRE-40-EnG-Automation-Runtime-V4100-B-R-Acopos
AR overview manualhttp://www.ftp.boss-bravo.fr/wiki/pdf/TM_BR/TM213TRE.40-ENG_Automation%2520Runtime_V4100.pdf
AS diagnostics manualhttps://www.scribd.com/document/356519728/TM223TRE.40-EnG-Automation-Studio-Diagnostics-V4200
SSH on VxWorkshttps://community.br-automation.com/t/sftp-support/8247
SNMP X20 PLChttps://community.br-automation.com/t/x20-plc-support-for-snmp-v2-v3-sample-project-inquiry/5829
Tracealyzer for VxWorkshttps://www.windriver.com/blog/tracealyzer-for-vxworks-overview-and-getting-started-guide
VxWorks kernel shellhttps://learning.windriver.com/vxworks-kernel-shell
Linux tracing systems comparisonhttps://jvns.ca/blog/2017/07/05/linux-tracing-systems/
eBPF tracing introhttps://www.brendangregg.com/blog/2016-12-27/linux-tracing-in-15-minutes.html

Appendix B: Quick Reference — Can I Monitor This?

WhatHowProduction-Ready?
Task cycle timesRTInfo FB, Profiler, OPC UAYes
Task preemptionsProfiler onlyYes (with overhead)
CPU load per taskProfiler onlyYes (with overhead)
PLC variable valuesOPC UA, Watch, TraceYes (OPC UA)
IO channel valuesOPC UA (mapped variables), AsIO in CYes
POWERLINK node statusSDM, OPC UA modelYes
POWERLINK frame dataExternal tap + WiresharkYes (passive)
CAN frame dataArCAN library, OPC UAYes
X2X Link dataProcess image variables onlyPartial
Memory usageSDM, system dumpPost-mortem only
Hardware temperaturesSDM, SNMPYes
Network interface statsSNMP, SDMYes
Firmware versionsSDM, system dump, SNMPYes
Error/warning eventsLogger, OPC UA, SDMYes
Individual FB execution timeNot availableNo
Kernel scheduling decisionsNot availableNo
Hardware register accessNot availableNo
Interrupt latencyRequires external measurementNo

Last updated: July 2026


SystemDumpViewer for Post-Mortem Analysis

B&R system dumps contain logger data, memory snapshots, task states, and hardware status. The community SystemDumpViewer tool provides a GUI for inspecting these dumps without B&R support portal access.

Installation and Usage:

## Download from the awesome-B-R repository
## https://github.com/br-automation-community/awesome-B-R
## SystemDumpViewer is a Java-based GUI tool

java -jar SystemDumpViewer.jar SystemDump.xml

Alternatively, systemdump.py (https://github.com/hilch/systemdump.py) provides command-line parsing:

pip install systemdump.py
systemdump --input SystemDump.xml --summary
systemdump --input SystemDump.xml --logger
systemdump --input SystemDump.xml --hardware

What the tools extract:

  • Logger entries (errors, warnings, info) with timestamps
  • Task cycle time statistics (min, max, average per task)
  • Memory usage per task
  • Hardware status (temperatures, voltages, module states)
  • Stack traces for crashes (if captured)

This is the closest thing to eBPF-style post-mortem tracing available for B&R systems. See diagnostics-sdm.md for SDM system dump download procedures.


Key Findings

  1. eBPF is NOT directly usable on B&R AR/VxWorks — the VxWorks kernel does not support eBPF infrastructure. All eBPF monitoring approaches require running on a separate Linux host, not on the PLC itself.
  2. The most practical monitoring approach is network-level capture — use Wireshark/tshark to capture POWERLINK, OPC-UA, and Modbus traffic from a mirror port or tap. This reveals communication patterns without PLC access.
  3. System dump analysis is the primary post-mortem diagnostic tool — the SDM system dump captures logger data, memory snapshots, and hardware state. It is the closest thing to “telemetry” available for B&R AR systems.
  4. PVI variable monitoring from a PC provides real-time telemetry — the PVI API allows continuous variable polling at rates matching task cycle times. Combined with Python scripting, this creates a powerful external monitoring system.
  5. strace/perf are irrelevant for the CP1584 — these tools require Linux on the target. For AR internals monitoring, use SDM, the AS Profiler, and the RTInfo function block.
  6. For debugging control program bugs specifically, the most effective approach is the AS Logger with backtrace (for crashes), Trace/oscilloscope (for timing), and IecCheck (for runtime bounds checking).

Cross-References

Related FileRelevance
ar-rtos.mdAR OS architecture (VxWorks vs Linux), process model, and system call interface
diagnostics-sdm.mdSDM web interface for real-time hardware monitoring and system dump downloads
system-variables.mdB&R system variables for CPU temperature, memory usage, and task cycle times
hardware-monitoring.mdTemperature sensors, voltage rails, and hardware health metrics on the CP1584
pvi-api.mdPVI API for external variable polling and telemetry data collection from Python/C
python-diagnostics.mdPython scripts for automated telemetry collection and diagnostic reporting
iiot-retrofit.mdMQTT, SNMP, and time-series data logging for modern monitoring dashboards
execution-model.mdTask scheduling, cycle times, and watchdog behavior relevant to performance profiling
powerlink-internals.mdPOWERLINK protocol capture and analysis with Wireshark
network-architecture.mdNetwork topology, POWERLINK/Ethernet switching, and VLAN configuration for telemetry data paths
io-sniffing.mdX2X and fieldbus traffic interception for IO-level diagnostics
custom-diagnostic-tools.mdBuilding diagnostic programs that run ON the PLC using the B&R C/C++ SDK
opcua.mdOPC-UA subscriptions for real-time variable monitoring and alarm events

B&R CP1584 Compact Flash Card Boot Sequence — Complete Technical Reference

The Compact Flash card is the heart of a B&R CP1584 system — it contains the operating system, firmware, user program, hardware configuration, and all runtime data. Understanding every file on the CF card, their load order, and what happens at each boot stage is critical when you need to modify a program without Automation Studio, recover from a corrupted card, or diagnose boot failures on a legacy machine with no OEM support. This document provides a file-by-file analysis of the CF card contents, the complete boot sequence, and practical procedures for imaging, modifying, and recovering CF card data. Cross-references: bootloader-recovery.md for recovery when the CF card is missing or corrupted, firmware.md for firmware architecture details, and config-file-formats.md for configuration file formats.

Table of Contents

  1. Overview
  2. CF Card Hardware Requirements
  3. CF Card Partition Structure
  4. File System and Directory Layout
  5. File Types and Their Purposes
  6. Boot Sequence — Stage by Stage
  7. Runtime Operating States
  8. How AR Determines Which Program to Execute
  9. Network Configuration Files
  10. User Partition Structure
  11. Imaging and Analyzing CF Card Contents
  12. Modifying Boot Parameters Without Automation Studio
  13. Changing the Loaded Program Binary Manually
  14. Backup and Restore Procedures
  15. CF Card Corruption and Missing Card Scenarios
  16. Creating a Bootable CF Card from Scratch
  17. Safe Boot Modes and Recovery Options
  18. Sources

1. Overview

The B&R CP1584 (also referenced as X20CP1584) is an Industrial PC controller from B&R Automation. It runs Automation Runtime (AR), B&R’s proprietary real-time operating system built on top of VxWorks. The controller boots from an Industrial Compact Flash (CF) card that contains the bootloader, operating system kernel, hardware configuration, and compiled user program.

Key characteristics of the CP1584 platform:

  • CPU: x86-based Intel processor
  • OS: B&R Automation Runtime (based on Wind River VxWorks)
  • Boot media: Compact Flash card (industrial-grade, SLC or high-endurance MLC)
  • File system: FAT16 or FAT32 (depending on card size and AR version)
  • HMI: None (headless controller — no integrated display)
  • Communication: Ethernet (Gigabit), POWERLINK, X2X Link, RS232, USB, plus optional interface modules (CAN, Modbus, etc.)

The entire boot process, runtime environment, and user application are stored on the CF card. Without a valid CF card, the controller cannot boot.


2. CF Card Hardware Requirements

Industrial-Grade Cards Only

B&R controllers are extremely picky about CF card compatibility. Consumer-grade CF cards typically will not work for booting because:

  1. Missing bootable media flag: Consumer CF cards do not set the “Fixed Disk / Bootable” flag in their ATA identification data. The BIOS requires this flag to attempt booting from the CF card.
  2. No wear leveling controller: Consumer cards lack the multi-partition controller needed for the 4-partition layout.
  3. Limited write endurance: Consumer MLC flash may fail after thousands of write cycles; industrial SLC cards handle hundreds of thousands.
  4. Temperature range: Industrial cards operate -40°C to +85°C; consumer cards typically 0°C to +70°C.

Known Compatible Cards

  • SiliconDrive SSD series (e.g., SSD-C64M-3076, part number 5CFCRD.0064-03) — used in Power Panel 300/400
  • B&R branded CF cards (part numbers starting with 5CFCRD)
  • Siemens SIMATIC industrial CF cards (similar bootable flag requirements)
  • Cards with ATA “Fixed Disk” identification set by the manufacturer

Card Sizes

  • Older systems (Power Panel 300, early X20): 64MB — 256MB (FAT16)
  • Mid-range systems (X20 CP1584 era): 128MB — 1GB (FAT16/FAT32)
  • Newer systems: 1GB — 8GB (FAT32)

Warning

Cloning partition tables and files to a consumer CF card will not work even with identical data. The boot process hangs at “Attempting to boot a Hard Drive… VxLD 1.4.1” indefinitely because the BIOS does not recognize the card as a boot device.


3. CF Card Partition Structure

B&R typically creates up to 4 partitions on a CF card. This is one of the reasons consumer CF cards fail — they often lack the on-card controller that can maintain multiple partitions.

Partition Layout

┌─────────────────────────────────────────────┐
│  Master Boot Record (MBR)                    │
│  - Partition table with 4 entries            │
│  - VxWorks bootloader signature              │
├─────────────────────────────────────────────┤
│  Partition 1: Active System Partition       │
│  - FAT16 or FAT32                            │
│  - Contains: bootloader (VxLD), AR kernel,    │
│    hardware config, user program              │
│  - Boot flag: ACTIVE (0x80)                  │
├─────────────────────────────────────────────┤
│  Partition 2: Passive / Update Partition     │
│  - FAT16 or FAT32                            │
│  - Mirror/update partition for fail-safe    │
│    updates (used by Runtime Update feature)  │
│  - Boot flag: INACTIVE (0x00)                │
├─────────────────────────────────────────────┤
│  Partition 3: User Partition                │
│  - FAT16 or FAT32                            │
│  - Contains: user data files, SystemDump     │
│    data, file device storage, recipes, logs   │
│  - Non-bootable                              │
├─────────────────────────────────────────────┤
│  Partition 4: Diagnostic / Utility          │
│  - Optional, may not exist on all cards     │
│  - Contains: diagnostic logs, crash dumps,   │
│    service mode data                         │
├─────────────────────────────────────────────┤
│  Remaining space (unpartitioned)             │
└─────────────────────────────────────────────┘

Active vs. Passive Partition

B&R uses an A/B partition scheme for fail-safe updates:

  • Active partition (A): Currently booted and running. Contains the live bootloader + AR + program.
  • Passive partition (B): Updated in the background during Runtime Update. On next reboot, if the passive partition is valid, the system switches to boot from it. If boot fails, it falls back to the old active partition.

This dual-partition approach ensures that a failed firmware or program update does not brick the controller.

Partition Types

The MBR partition type IDs used:

  • 0x06 — FAT16 (for smaller cards ≤ 2GB)
  • 0x0B or 0x0C — FAT32 (for larger cards)
  • The active partition has the boot flag (0x80) set in byte 0 of the MBR partition entry

4. File System and Directory Layout

Active System Partition Directory Tree

/ (Root of Active Partition)
├── VxLD              — VxWorks Loader (bootloader executable)
├── brconfig.sys      — Automation Runtime system configuration
├── autoexec.bat      — Optional startup commands (legacy)
├── boot.ini          — Boot configuration / boot parameters
├── CPUTemp.ini       — CPU temperature monitoring settings
├── *.sys             — System driver files
├── *.dll             — Runtime libraries
├── *.bin             — Binary blobs (kernel extensions, firmware)
│
├── Flash/
│   ├── Project/       — Project folder for Power Panel systems
│   │   ├── *.apj      — Automation Studio project file
│   │   ├── *.acp      — Compiled automation component package
│   │   ├── *.br       — B&R runtime binary
│   │   ├── *.pc       — Program configuration
│   │   ├── *.obj      — Compiled object modules
│   │   ├── *.par      — Parameter/configuration files
│   │   ├── Hardware.hwl — Hardware configuration description
│   │   ├── Hardware.hw  — Hardware configuration binary
│   │   └── *.sys       — Additional system files
│   └── *.log          — Runtime and application log files
│
├── Mynte/             — Automation Runtime package directory
│   ├── X86/           — x86 architecture binaries
│   │   ├── APP/       — Application programs
│   │   │   ├── *.acp  — Compiled automation components
│   │   │   ├── *.br   — Runtime binaries
│   │   │   ├── *.obj  — Object modules
│   │   │   └── *.par  — Parameter files
│   │   ├── ACP/       — Automation Component Packages
│   │   ├── SYS/       — System modules
│   │   └── SAFETY/    — Safety application (Safe Series)
│   └── CONFIG/        — Configuration data
│
├── System/            — System-level files and drivers
│   ├── *.sys          — Kernel drivers
│   ├── *.dll          — Shared libraries
│   └── *.bin          — Binary components
│
├── Config/            — Configuration directory
│   ├── *.ini          — INI configuration files
│   ├── *.par          — Parameter files
│   └── *.xml          — XML configuration
│
├── Temp/              — Temporary files
│
├── Log/               — Runtime and application logs
│   ├── *.log          — Log files
│   └── SystemDump/    — System crash dump files
│
└── RAS/               — Remote Access Service files (optional)

Directory Path Variations by Controller Model

Controller SeriesProject Path on CF Card
X20 (CP1484/CP1584/CP3484)/Mynte/X86/APP/
Power Panel 400/500/Flash/Project/
Power Panel 300/Flash/
Automation PC (APC)/Mynte/ACP/
Safe Series (Safety)/Mynte/SAFETY/

5. File Types and Their Purposes

Boot and System Files

File ExtensionFull NamePurpose
(VxLD)VxWorks LoaderFirst-stage bootloader. Loaded by BIOS from the CF card. Responsible for loading the VxWorks kernel and Automation Runtime into RAM. The “VxLD 1.4.1” string is printed during early boot.
.sysSystem FileDriver files and kernel extensions loaded by AR during initialization. brconfig.sys is the primary AR system configuration file.
.binBinaryRaw binary blobs — kernel images, firmware updates, hardware-specific binary data.

Configuration Files

File ExtensionFull NamePurpose
.apjAutomation ProjectAutomation Studio project file. Contains the project structure, references to hardware configuration, program organization, and library references. XML-based format.
.hwlHardware ListHuman-readable hardware configuration description file. Lists all hardware modules, their ordering, addresses, and parameters in a structured text format.
.hwHardware BinaryCompiled binary version of the hardware configuration. Generated from the .hwl file. Contains the precise hardware topology that AR uses to initialize the I/O system.
.parParameter FileRuntime parameter configuration. Contains tunable parameters for the application and hardware — IP addresses, cycle times, watchdog settings, module-specific parameters.
.iniInitialization FileStandard INI-format configuration files. CPUTemp.ini configures CPU temperature monitoring thresholds. boot.ini may contain boot selection parameters.
brconfig.sysB&R Config SystemMaster Automation Runtime configuration. Contains OS-level settings: startup sequence, memory allocation, task class definitions, driver parameters, network boot settings.

Program Files

File ExtensionFull NamePurpose
.acpAutomation Component PackageCompiled automation component — the primary executable unit in B&R’s system. Contains compiled PLC logic (ladder, ST, CFC, etc.), HMI visualization, and library references. This is the machine-code representation of the user program.
.brB&R Runtime BinaryRuntime binary file. Contains compiled runtime components including task definitions, function blocks, and data modules. Can include both user code and standard library modules.
.pcProgram ConfigurationProgram configuration file. Defines program structure: task classes, cycle times, program entry points, module ordering. Links .obj files together.
.objObject ModuleCompiled object file — intermediate binary module. Generated by the Automation Studio compiler from individual source files. Linked together during the build process. In the deployed form, these are the individual runtime modules loaded by AR.

Other Files

File ExtensionFull NamePurpose
.logLog FileRuntime log output — boot sequence, errors, warnings, user program messages.
.dllDynamic Link LibraryShared libraries used by AR and user programs.
.rtaRuntime ArchiveBackup archive of the entire runtime. Created by Automation Studio’s “Receive Runtime Archive from Target” function. Contains all compiled modules, configuration, and system files.
.zp2 / .zp3Zipped Partition ImageCompressed disk image format used by Runtime Utility Center. .zp2 = dual image, .zp3 = triple image. Contains sector-level backup of the entire CF card (or specific partitions).
.pkgPackageAutomation Studio project package — the full source project in a single distributable file. This is the source, not compiled code.

6. Boot Sequence — Stage by Stage

Stage 1: Power-On and BIOS POST (0–3 seconds)

Power On
  │
  ├─ CPU reset, x86 real-mode entry at 0xFFFF0
  ├─ BIOS POST: RAM test, CPU init, bus scan
  ├─ Detect CF card on IDE/CF interface
  ├─ Read CF card ATA identification data
  │    └─ Verify "Fixed Disk" flag (industrial cards only)
  ├─ Read MBR from CF card (sector 0)
  ├─ Parse partition table, find ACTIVE partition
  └─ Load first sector of active partition (VBR)

What happens: The x86 BIOS performs standard POST. It enumerates the CF card as an IDE drive. If the CF card does not report as a “Fixed Disk” (consumer cards typically report as “Removable”), the BIOS may skip it or fail to boot. The BIOS reads the MBR, identifies the active partition, loads the Volume Boot Record (VBR), which then loads the bootloader.

Stage 2: VxWorks Loader — VxLD (3–8 seconds)

VxLD 1.4.1 Loading...
  │
  ├─ Reads FAT filesystem from active partition
  ├─ Locates and loads VxWorks kernel image (vxWorks)
  ├─ Loads kernel symbol table (if present)
  ├─ Parses kernel boot parameters from brconfig.sys
  ├─ Initializes minimal hardware (CPU, RAM, interrupt controller)
  ├─ Transfers control to VxWorks kernel entry point
  └─ Display: "BR Automation Runtime B4.XX booting..."

What happens: The VxLD bootloader is the second-stage loader. It understands the FAT filesystem, reads the VxWorks kernel binary from the CF card, loads it into RAM, and jumps to its entry point. The VxLD version string (e.g., “VxLD 1.4.1”) appears on the display during this phase. If the bootloader cannot find the kernel, the system hangs here.

Stage 3: VxWorks Kernel Initialization (8–15 seconds)

VxWorks kernel startup
  │
  ├─ Kernel data structures initialization
  ├─ Memory subsystem initialization (MMU, virtual memory)
  ├─ Interrupt controller setup
  ├─ Timer initialization (system clock)
  ├─ Task scheduler initialization
  ├─ Load AR kernel modules (*.sys, *.dll from /System/)
  ├─ Initialize I/O subsystem
  ├─ Initialize file system drivers (FAT driver for CF access)
  ├─ Mount CF card partitions
  └─ Start Automation Runtime initialization

What happens: The VxWorks kernel initializes its core subsystems. B&R has extended VxWorks with custom task class scheduling, I/O management, abstraction layers, and drivers specific to their hardware platform. The kernel mounts the CF card filesystem(s) so that AR can access its configuration and programs.

Stage 4: Automation Runtime Initialization (15–25 seconds)

Automation Runtime initialization
  │
  ├─ Read brconfig.sys for system configuration
  ├─ Initialize task class scheduler
  │    └─ Task Class 1 (highest priority, cyclic)
  │    └─ Task Class 2
  │    └─ ...
  │    └─ Task Class N (lowest priority, background)
  ├─ Load and initialize hardware configuration (Hardware.hw)
  ├─ Scan and initialize hardware modules
  │    └─ CPU I/O modules
  │    └─ X2X bus modules
  │    └─ Fieldbus interfaces
  │    └─ Communication interfaces (Ethernet, etc.)
  ├─ Initialize network stack
  │    └─ Read IP configuration from .par or brconfig.sys
  │    └─ Configure Ethernet interface
  │    └─ Set hostname
  ├─ Initialize file devices
  │    └─ User partition mount point
  │    └─ FTP server
  │    └─ OPC UA server (if configured)
  └─ Enter INIT state

What happens: AR loads its configuration, sets up the real-time task class scheduler (a key B&R differentiator — task classes provide deterministic scheduling), initializes all hardware from the Hardware.hw configuration, and sets up networking. The system is now in the INIT state but no user programs are running yet.

Stage 5: User Program Loading (25–35 seconds)

User program loading
  │
  ├─ Locate program in active partition
  │    └─ Search path: /Flash/Project/ or /Mynte/X86/APP/
  ├─ Load compiled modules (*.acp, *.br, *.obj)
  ├─ Resolve library dependencies
  ├─ Link modules together
  ├─ Load parameter files (*.par)
  ├─ Initialize program data areas (retain persistent variables)
  ├─ Execute INIT routines (if configured)
  │    └─ User INIT code runs once
  └─ Start cyclic task execution

What happens: AR loads the compiled user program from the CF card. It reads the program configuration (.pc files) to determine which modules to load, loads the compiled binary modules (.acp, .br, .obj), and links them together. If the program was previously running and had persistent data, AR restores the retained data from the CF card. INIT routines run once (configurable), then the cyclic tasks begin.

Stage 6: RUN State (35+ seconds)

RUN state
  │
  ├─ All task classes running cyclically
  │    └─ Task Class 1: highest priority cyclic tasks
  │    └─ Task Class 2: ...
  │    └─ Background tasks (HMI update, communication)
  ├─ Network services active
  │    └─ Ethernet/IP
  │    └─ OPC UA
  │    └─ HTTP (SDM - System Diagnostics Manager)
  │    └─ FTP
  ├─ HMI visualization running (if applicable)
  ├─ LED indicators: RUN solid green
  └─ Ready for Automation Studio connection

Boot State LED Indicators

LED StateMeaning
RUN solid greenNormal RUN state — all task classes executing
RDY/F flashingBoot in progress / INIT state
RUN flashing + RDY/F solidSERVICE mode — task classes stopped, diagnostics available
RUN + RDY/F both solidBOOT mode — AR failed to load or CF card issue
Both offNo power, or pre-BIOS stage
All flashing alternatelyDIAG mode — hardware failure or critical error

7. Runtime Operating States

B&R Automation Runtime has several operating states that the controller transitions through during boot and operation:

State Diagram

          ┌──────────────────────────────────────┐
          │           POWER ON                    │
          └──────────────┬───────────────────────┘
                         │
                         ▼
          ┌──────────────────────────────────────┐
          │           BOOT mode                   │
          │  (No CF card, or CF card not bootable)│
          └──────────────┬───────────────────────┘
                         │ CF card valid, AR loads
                         ▼
          ┌──────────────────────────────────────┐
          │           INIT state                  │
          │  (AR loaded, hardware initialized,    │
          │   user program loading)               │
          └──────────────┬───────────────────────┘
                         │ INIT routines complete
                         ▼
          ┌──────────────────────────────────────┐
          │           CONF / CONFIG state          │
          │  (System configured, tasks not started) │
          └──────────────┬───────────────────────┘
                         │ Configuration complete
                         ▼
          ┌──────────────────────────────────────┐
          │           RUN state                    │
          │  (All task classes executing normally) │
          └──────────────┬───────────────────────┘
                         │ Error detected
                         ▼
          ┌──────────────────────────────────────┐
          │           SERVICE mode                │
          │  (Task classes stopped,               │
          │   system accessible for diagnostics)  │
          └──────────────┬───────────────────────┘
                         │ Critical error
                         ▼
          ┌──────────────────────────────────────┐
          │           DIAG mode                   │
          │  (Diagnostic mode, AR boot failed)     │
          └──────────────────────────────────────┘

State Descriptions

  • BOOT mode: The controller has power but could not load Automation Runtime. This means the CF card is missing, corrupted, not recognized, or the bootloader/kernel is damaged. The display may show “BOOT mode” text. No network services are available.

  • INIT state: AR is loaded and initializing. Hardware modules are being detected and configured. This is a transient state during normal boot.

  • CONF state: System is fully configured but tasks have not yet started. This state is brief during normal boot but can be entered during configuration changes.

  • RUN state: Normal operating state. All user-defined task classes are executing cyclically. Network services are active. Automation Studio can connect and perform online changes.

  • SERVICE mode: No task classes are running. Triggered by: runtime errors (divide by zero, cycle time violation, page fault, access violation), major transfer operations, or manual warm restart. The system is accessible via Ethernet (SDM at http://<IP>/sdm) and the logger is available for diagnostics. A warm restart exits service mode if the error condition is resolved.

  • DIAG mode: Automation Runtime failed to boot correctly. Triggered by: corrupted CF card memory, kernel panic, or fatal hardware failure. More severe than service mode — AR is not fully operational.

How to Transition Between States

FromToMethod
BOOTINITInsert valid CF card + warm restart
INITCONFAutomatic (after INIT routines complete)
CONFRUNAutomatic (after configuration applied)
RUNSERVICEError condition, warm restart, or manual trigger
SERVICERUNWarm restart (if error resolved)
SERVICEDIAGUnrecoverable error
AnyBOOTCold power cycle with no/invalid CF card
AnyINITWarm restart with valid CF card

8. How AR Determines Which Program to Execute

Program Discovery Sequence

Automation Runtime follows a deterministic search order to locate and load the user program:

  1. Read boot configuration from brconfig.sys — may specify an explicit program path
  2. Check Hardware.hw for the program module list — the hardware configuration references the program components
  3. Search standard directories in order:
    • /Flash/Project/ (Power Panel controllers)
    • /Mynte/X86/APP/ (X20 controllers including CP1584)
    • /Mynte/ACP/ (Automation PC controllers)
  4. Load the .pc (Program Configuration) file — this is the entry point that defines the program structure
  5. Load referenced modules (.acp, .br, .obj) as specified in the .pc file
  6. Load parameter files (.par) for module configuration
  7. Verify module integrity — checksums and version compatibility

Program-to-Hardware Binding

The program is tightly coupled to the hardware configuration:

  • The .hw file describes the exact hardware topology (module types, positions, addresses)
  • The .pc file references specific modules that expect certain hardware to be present
  • If the actual hardware does not match the .hw configuration, AR will not enter RUN state
  • This is why programs are hardware-specific and cannot simply be moved between different controller models

Runtime Archive (.rta) Loading

When using Automation Studio’s “Download Runtime to Target”:

  • The .rta file contains all program modules + hardware config + AR system files
  • AS writes these to the active partition of the CF card
  • The system is configured to load from the newly written files on next boot
  • The passive partition may be updated simultaneously for redundancy

9. Network Configuration Files

IP Address Configuration

Network settings are stored in multiple possible locations depending on the AR version and configuration method:

  1. Hardware configuration (.hw / .par files): The primary location. When you configure the Ethernet interface in Automation Studio’s Physical View → CPU → ETH node, the IP address, subnet mask, and gateway are embedded in the hardware configuration.

  2. brconfig.sys: May contain override network parameters.

  3. Parameter files (.par): Can contain IP-related parameters that are applied at runtime.

Default Network Settings

SettingDefault Value
IP Address0.0.0.0 (DHCP) or 192.168.1.10 (factory default varies by model)
Subnet Mask255.255.255.0
Gateway0.0.0.0 (none)
Hostname“br-automation” (configurable in Ethernet configuration)

Setting IP Without Automation Studio

  1. Via SDM (System Diagnostics Manager): Access http://<current_IP>/sdm in a web browser. Navigate to network configuration and set static IP.

  2. Via CF card: Mount the CF card, navigate to the project’s configuration directory, and edit the relevant .par file to change the IP address values. This requires understanding the binary or text format of the parameter file.

  3. Via B&R Service Tool (RUC): Runtime Utility Center can set IP addresses during CF card generation.

  4. Via Ethernet Setting Mode: On some X20 controllers, hold the RUN/STOP switch in a specific position during power-on to enter an Ethernet configuration mode where the default IP 192.168.100.1 is activated.


10. User Partition Structure

Purpose

The user partition (Partition 3) provides persistent storage for:

  • User data files (recipes, configuration data, measurement logs)
  • SystemDump files (crash dump data written after fatal errors)
  • File device storage (arbitrary user files accessible via AR file functions)
  • Application-generated data (CSV exports, data logging)

Setting Up the User Partition

The user partition must be configured to be usable:

  1. During CF card creation: Automation Studio or Runtime Utility Center can create the user partition when generating the CF card.

  2. Via Automation Studio: In the CPU configuration, set up a “File Device” that points to the user partition.

  3. Programmatic: Use the AR FileDeviceCreate() function to define a file device pointing to the user partition.

File device mapping:
  User Partition → /USER/ (or configured mount point)
  Active Partition → /SYSTEM/

Important Notes

  • RUC (Runtime Utility Center) cannot repartition an existing CF card. If no user partition exists, you cannot create one through RUC alone — you must recreate the CF card from scratch via Automation Studio’s “Generate Compact Flash” or “Offline Install” feature.
  • The user partition survives program updates and AR updates (it is not overwritten during normal operations).
  • SystemDump data is written to the user partition when configured via SysDump settings.

User Partition Directory Structure

/ (Root of User Partition)
├── data/              — User data files
├── recipes/           — Recipe data
├── logs/              — Application-generated logs
├── SystemDump/        — Crash dump files
│   ├── dump_XXXXX.sys — Individual dump files
│   └── ...
├── backup/            — User backups
└── *.csv, *.txt, etc. — Application data files

11. Imaging and Analyzing CF Card Contents

Method 1: dd (Linux)

Sector-by-sector imaging of the entire CF card:

# Create image from CF card
dd if=/dev/sdX of=/path/to/backup.img bs=512 status=progress

# Write image to new CF card
dd if=/path/to/backup.img of=/dev/sdX bs=512 status=progress

# Verify image integrity
dd if=/dev/sdX of=/dev/null bs=512 status=progress
md5sum /path/to/backup.img

# Create compressed image
dd if=/dev/sdX bs=512 status=progress | gzip > /path/to/backup.img.gz

Where /dev/sdX is the CF card device (verify with lsblk or fdisk -l).

Method 2: Win32DiskImager (Windows)

1. Download Win32DiskImager from https://win32diskimager.org/
2. Insert CF card via USB reader
3. Select the CF card drive letter
4. Click "Read" to create an image file
5. Click "Write" to restore an image to a new card

Method 3: HDD Raw Copy Tool (Windows)

1. Download from https://hddguru.com/software/HDD-Raw-Copy-Tool/
2. Select source CF card
3. Create .imgc (compressed raw image) file
4. Restore to target CF card

This tool is recommended by industrial automation technicians for CF card cloning.

Method 4: B&R Runtime Utility Center (Official)

1. Insert CF card into PC reader
2. Launch Runtime Utility Center (RUC)
3. Press F9 → "Generate Compact Flash"
4. Click "Select disk" → choose CF card
5. Click "Create image file from CF"
6. Image saved as .zp2 or .zp3 format

To restore:
1. RUC → Tools → Restore CF Card Image
2. Select .zp2/.zp3 file
3. Select target CF card
4. Write image

The .zp2/.zp3 format is B&R proprietary and contains metadata about the image in addition to the raw partition data.

Method 5: Automation Studio — Runtime Archive

1. Connect to controller via Ethernet
2. Transfer → Receive Runtime Archive from Target
3. Saves as .rta file

To restore:
1. Transfer → Download Runtime to Target
2. Select .rta file
3. Downloads to CF card via Ethernet (requires AR to be running)

Mounting and Analyzing CF Card Partitions (Linux)

# Identify CF card device
lsblk

# Mount active partition (first partition)
sudo mount /dev/sdX1 /mnt/cf_active -t vfat

# Mount user partition (third partition)
sudo mount /dev/sdX3 /mnt/cf_user -t vfat

# Explore
ls -laR /mnt/cf_active/
ls -laR /mnt/cf_user/

# Examine partition table
sudo fdisk -l /dev/sdX
sudo parted /dev/sdX print

# Hexdump MBR
sudo dd if=/dev/sdX bs=512 count=1 | xxd

# Extract individual files
cp -r /mnt/cf_active/Flash/ /tmp/flash_backup/

12. Modifying Boot Parameters Without Automation Studio

Editing Configuration Files Directly on the CF Card

  1. Remove CF card from controller (power down first!)
  2. Mount on PC using a CF card reader
  3. Navigate to the configuration directory
  4. Edit the relevant file with a text or hex editor:

IP Address in Parameter Files

Location: /Flash/Project/ or /Mynte/X86/APP/
File: *.par (parameter file, may be text or binary)

If text format, edit IP address values directly.
If binary format, use a hex editor to locate and modify IP octets.

Boot Configuration in brconfig.sys

Location: / (root of active partition)
File: brconfig.sys

This file may be binary or text. If text, edit boot parameters directly.
Common parameters include:
  - Default boot partition
  - Kernel boot arguments
  - Memory allocation settings
  - Driver initialization options

Changing the Active Boot Partition

Use fdisk (Linux) or diskpart (Windows) to toggle the ACTIVE flag:
  
  Linux: sudo fdisk /dev/sdX → use 'a' command to toggle boot flag
  Windows: diskpart → select disk → select partition → active
  
Then swap partition contents between active and passive partitions
to boot from the updated partition.

Warnings

  • Always backup the CF card before editing — a single corrupted byte can prevent booting.
  • Do not edit binary files with a text editor — use a hex editor.
  • Verify file checksums after editing if available.
  • Test on a spare CF card first if possible.

13. Changing the Loaded Program Binary Manually

Method 1: Copy Program Files to CF Card

If you have a compiled program (from Automation Studio or from another working controller):

  1. Backup the existing CF card (dd image)
  2. Mount the active partition on a PC
  3. Navigate to the program directory:
    • X20: /Mynte/X86/APP/
    • Power Panel: /Flash/Project/
  4. Replace the program files:
    • Copy new .acp, .br, .obj, .pc files
    • Copy matching .hw and .hwl files (hardware must match!)
    • Copy matching .par parameter files
  5. Safely eject the CF card
  6. Insert into controller and power on

Method 2: Swap Active/Passive Partition

If the passive partition already contains the desired program (e.g., from a previous update):

  1. Use fdisk/diskpart to make the passive partition active
  2. Boot the controller — it will now load from the formerly-passive partition
  3. Verify program operation

Method 3: Replace Individual Modules

AR loads modules individually based on the .pc file. You can:

  1. Identify which .obj module corresponds to which program function
  2. Replace individual .obj files on the CF card
  3. Keep the .hw and .pc files unchanged (unless hardware changed)
  4. Boot and verify

Critical Constraints

  • The hardware configuration (.hw) must match the physical hardware exactly. If you copy a program from a CP1584 to a CP1484, it will fail.
  • Library modules must be compatible with the AR version on the CF card.
  • The .pc file references modules by name — renamed or missing modules will cause load failure.
  • Persistent/retained variables may cause unexpected behavior if the data layout changed.

14. Backup and Restore Procedures

Backup Methods (Ranked by Completeness)

1. Full CF Card Image (Most Complete)

# Linux
dd if=/dev/sdX of=/backup/cp1584_backup_$(date +%Y%m%d).img bs=512 status=progress

# Also backup MBR separately for safety
dd if=/dev/sdX of=/backup/mbr_backup.bin bs=512 count=1

This captures everything: MBR, partition table, all partitions, bootloader, OS, program, user data.

2. Runtime Utility Center Image (.zp2/.zp3)

RUC → F9 → Generate CF → Create image file from CF

Creates compressed image with B&R metadata. Recommended official method.

3. Runtime Archive (.rta)

Automation Studio → Transfer → Receive Runtime Archive from Target

Captures the compiled runtime (program + hardware config + system files) but NOT the bootloader or partition structure. Requires Ethernet connection to a running controller.

4. Individual File Backup

1. Mount CF card
2. Copy entire directory tree:
   - /Flash/ or /Mynte/ (program and configuration)
   - /Config/
   - brconfig.sys, VxLD, boot.ini
   - All .apj, .acp, .br, .pc, .obj, .hw, .hwl, .par files
   - Log files
3. Note: this misses the MBR, partition table, and bootloader

Restore Procedures

Restoring a Full Image

# Verify target card is correct!
lsblk
# Write image
dd if=/backup/cp1584_backup.img of=/dev/sdX bs=512 status=progress

CRITICAL: The target CF card must be identical in capacity or larger, and must be an industrial-grade card with the bootable flag.

Restoring via RUC

RUC → Tools → Restore CF Card Image → select .zp2/.zp3 → select target disk

Restoring via Automation Studio

1. Create a new project for the target hardware
2. Transfer → Download Runtime to Target → select .rta
3. This requires AR to already be running on the target

Best Practices

  • Always create backups after any program change
  • Store original Automation Studio project files (.pkg) in version control (Git, SVN)
  • Keep multiple backup copies: full image (.img), RUC image (.zp3), and runtime archive (.rta)
  • Label CF cards with controller serial number and backup date
  • Schedule periodic CF card replacement every 3-5 years (industrial cards have finite write endurance)
  • Never remove CF card while controller is powered on

15. CF Card Corruption and Missing Card Scenarios

Missing CF Card

Symptoms:

  • Display shows: “no boot device present, halting”
  • No LED activity
  • No network connectivity
  • Controller is completely non-functional

Resolution: Insert a valid CF card and perform warm restart.

Corrupted Boot Sector / MBR

Symptoms:

  • Display shows: “Attempting to boot a Hard Drive… VxLD 1.4.1” then hangs
  • Continuous reboot loop
  • No progress beyond bootloader stage

Cause:

  • Improper shutdown (power loss during write)
  • CF card wear-out (exceeded write cycle limit)
  • Physical card damage
  • Corrupted partition table

Resolution:

  1. Remove CF card and create a sector-by-sector backup using dd or HDD Raw Copy
  2. Attempt to repair using fdisk or test disk tools
  3. If repair fails, restore from backup image
  4. If no backup exists, recreate CF card from scratch (see Section 16)

Corrupted File System

Symptoms:

  • Boot progresses past VxLD but AR fails to start
  • Controller enters DIAG mode
  • Display shows: “BOOT mode: Diagnosis” or “BOOT mode: Service”
  • Runtime error messages in log files

Cause:

  • Power interruption during file write
  • Excessive write cycles degrading flash cells
  • File system metadata corruption

Resolution:

  1. Mount CF card on PC and check file system integrity
  2. Copy off all readable files
  3. Run filesystem check: fsck.vfat -a /dev/sdX1
  4. If repairable, restore missing/corrupted files from backup
  5. If not repairable, restore from full image backup

Corrupted User Program

Symptoms:

  • AR boots successfully (past INIT state)
  • Controller enters SERVICE mode after attempting to run user program
  • Cycle time violations or page fault errors in logger

Cause:

  • Program file corruption (power loss during download)
  • Incompatible program version
  • Missing library modules

Resolution:

  1. Connect via Automation Studio or SDM to read error logs
  2. Re-download the program from Automation Studio
  3. If no AS project available, restore from .rta backup

Intermittent Boot Failures

Symptoms:

  • Sometimes boots successfully, sometimes fails
  • Random reboots during operation

Cause:

  • Failing CF card (intermittent bad sectors)
  • Loose CF card connector
  • Failing card reader pins

Resolution:

  1. Reseat CF card firmly
  2. Replace CF card (clone first)
  3. Inspect card reader pins for damage

16. Creating a Bootable CF Card from Scratch

This is the official and most reliable method.

1. Open Automation Studio
2. Create a new project or open existing project
3. Configure hardware (Physical View) to match the target controller:
   - Add the correct CPU module (X20CP1584)
   - Configure I/O modules matching physical hardware
   - Configure Ethernet interface (set IP address)
4. Build the project (Ctrl+Shift+B)
5. Online → Create Configuration → select "Compact Flash"
   OR
   In Automation Studio, use "Transfer" → "Download to Target"
   with a CF card connected via USB reader
6. Automation Studio writes:
   - MBR and partition table
   - Active partition with bootloader, AR, program
   - Passive partition (if configured)
   - User partition
7. Verify the card boots in the target controller

Method 2: Automation Studio — Offline Install

For larger systems where CF card is too small for the full AR installation:

1. In Automation Studio: Tools → Offline Install
2. Select target AR version
3. Create installation media on CF card or USB stick
4. Insert into controller and boot — AR installs from media

Creating a CF card from scratch without Automation Studio requires:

  1. Industrial CF card with bootable flag
  2. Bootloader binary (VxLD) — must match target AR version
  3. AR kernel and modules — from B&R service pack or extracted from backup
  4. Hardware configuration (.hw, .hwl) — matching physical hardware
  5. User program files (.acp, .br, .obj, .pc) — compiled and matching
# Create partition table
sudo fdisk /dev/sdX
  # Create 3-4 primary partitions
  # Set partition 1 as ACTIVE (bootable)
  # Partition 1: FAT16, ~200MB (or more for larger programs)
  # Partition 2: FAT16, ~200MB (passive/backup)
  # Partition 3: FAT16/FAT32, remaining space (user)

# Format partitions
sudo mkfs.vfat -F 16 /dev/sdX1
sudo mkfs.vfat -F 16 /dev/sdX2
sudo mkfs.vfat -F 16 /dev/sdX3

# Mount and copy files
sudo mount /dev/sdX1 /mnt/cf
# Copy bootloader, kernel, AR modules, hardware config, program
sudo cp VxLD /mnt/cf/
sudo cp brconfig.sys /mnt/cf/
sudo cp -r System/ /mnt/cf/
sudo cp -r Mynte/ /mnt/cf/
sudo cp -r Flash/ /mnt/cf/
sudo cp -r Config/ /mnt/cf/
sudo umount /mnt/cf

# Install bootloader to MBR/VBR
# (This is the tricky part — requires the correct VBR with
#  VxLD chain-loading code, which is specific to B&R's setup)

Method 4: Clone from Working Card

If you have a working CF card:

# Full sector-by-sector clone
dd if=/dev/sdX of=/dev/sdY bs=512 status=progress

The target card must be identical capacity and industrial-grade.


17. Safe Boot Modes and Recovery Options

Warm Restart (Controlled Restart)

  • Trigger: Automation Studio command, SDM web interface, RUN/STOP switch
  • Effect: AR shuts down gracefully, saves persistent data, restarts from CF card
  • Use for: Recovering from SERVICE mode, applying configuration changes

Cold Restart (Power Cycle)

  • Trigger: Physical power off → wait → power on
  • Effect: Full hardware reset, complete boot from scratch
  • Use for: Clearing transient errors, full system restart

BOOT Mode Recovery

When the controller is in BOOT mode (no AR loaded):

  1. Check CF card insertion — reseat the card
  2. Verify CF card is industrial-grade with bootable flag
  3. Connect via serial console (if available) for diagnostic output
  4. Replace CF card with known-good backup
  5. Use Runtime Utility Center to create a new CF card from backup image

SERVICE Mode Recovery

When the controller is in SERVICE mode:

  1. Access SDM at http://<IP>/sdm — available even in SERVICE mode
  2. Open Logger in Automation Studio or SDM to identify the error
  3. Review backtrace to find the code location that caused the fault
  4. Common causes:
    • Cycle time violation (code stuck in loop or blocking IO in fast task)
    • Page fault / access violation (writing beyond array/string bounds)
    • Divide by zero
    • Library module incompatibility
  5. Fix the code in Automation Studio, re-download
  6. Warm restart to exit SERVICE mode

DIAG Mode Recovery

When the controller is in DIAG mode:

  1. CF card corruption is likely — the AR kernel failed to fully initialize
  2. Remove CF card and create a backup (dd image) before attempting repair
  3. Restore from known-good backup image
  4. If no backup, recreate CF card from scratch using Automation Studio
  5. Check for hardware problems — damaged card reader, CPU failure

Emergency Recovery via USB

Some newer B&R controllers support automatic AR installation from USB:

1. Create a USB flash drive (FAT16/FAT32) with AR installation files
2. Download AR service pack from B&R website (www.br-automation.com)
3. Extract to USB drive
4. Insert USB into controller
5. Power on — AR detects USB and offers to install

Recovery via Serial Console

For advanced debugging:

1. Connect serial console cable to controller's serial port
2. Terminal settings: 57600 baud (factory default), 8N1, no flow control. If no output appears, try 9600 or 115200.
3. Boot output includes detailed VxWorks kernel messages
4. Can access VxWorks shell for low-level diagnostics

Key Findings

  • Consumer CF cards will not work even with identical partition data cloned onto them — the BIOS requires the ATA “Fixed Disk” flag that only industrial-grade cards (B&R 5CFCRD series) set; the boot hangs at “VxLD 1.4.1” indefinitely on consumer cards.
  • The boot sequence has 6 distinct stages from BIOS POST through VxLD bootloader loading, VxWorks kernel init, Automation Runtime initialization, user program loading, to full RUN state — failures at different stages point to different root causes (hardware vs. OS vs. application).
  • The A/B (Active/Passive) partition scheme provides fail-safe updates — firmware and program updates are written to the passive partition first; on reboot the system switches to it only if valid, falling back to the old active partition if the new one fails, which prevents bricking during updates.
  • The SYSTEM partition must contain at minimum: VxLD bootloader, brconfig.sys (master AR configuration), the VxWorks kernel, Hardware.hw (compiled hardware topology), and the compiled user program (.acp/.br/.pc/.obj files) in /Mynte/X86/APP/ for X20 controllers.
  • Boot parameters (IP address, kernel arguments) can be modified without Automation Studio by mounting the CF card on a PC and editing .par files or brconfig.sys — but always image the card first since a single corrupted byte prevents booting, and binary files require a hex editor, not a text editor.
  • The hardware configuration (.hw) is tightly coupled to the physical I/O topology — programs cannot be moved between different controller models or different I/O configurations without matching the .hw file to the actual hardware, or AR will refuse to enter RUN state.
  • Four imaging methods are available ranked by completeness: (1) full sector-level dd image captures everything including MBR, (2) Runtime Utility Center .zp2/.zp3 with B&R metadata, (3) Automation Studio .rta runtime archive (misses bootloader and partition structure), (4) individual file copy (misses MBR and partition table).
  • Runtime Utility Center cannot repartition an existing CF card — if you need a user partition that doesn’t exist, the entire card must be recreated from scratch via Automation Studio’s Offline Installation.

18. Cross-References

Related FileRelevance
bootloader-recovery.mdRecovery procedures when the CF card is corrupted or missing
firmware.mdB&R firmware architecture, SRAM/flash/user partition memory model
firmware-version-mgmt.mdAR version compatibility and firmware update paths
config-file-formats.mdDetailed format reference for every configuration file on the CF card
access-recovery.mdPassword recovery and accessing the CF card via FTP without credentials
ftp-web-interface.mdFTP server access to CF card partitions for remote backup and inspection
cp1584-forensics.mdExtracting information from a running CP1584, including CF card contents
ar-rtos.mdAutomation Runtime OS internals and kernel boot process
retentive-data.mdBattery-backed SRAM data preservation during CF card swaps
online-changes.mdSaving modified programs back to the CF card for persistence

19. Sources

B&R Official Documentation

  • B&R Automation Runtime Overview and Setup (TM213) — https://www.br-automation.com
  • B&R Automation Studio Quick Start (MASYS2ASQS) — https://instrumentacionycontrol.net
  • B&R BIOS Upgrade Documentation — https://www.br-automation.com/en/downloads/industrial-pcs-and-panels/power-panel-100200/bios-upgrade/
  • B&R Automation Runtime Product Page — https://www.br-automation.com/en-us/products/software/automation-runtime/

B&R Community Forum Discussions

  • “How to get PLC to go from boot mode to run mode?” — https://community.br-automation.com/t/how-to-get-plc-to-go-from-boot-mode-to-run-mode/5866
  • “Configuration Files deleted in CF card” — https://community.br-automation.com/t/configuration-files-deleted-in-cf-card/8210/11
  • “The OS behind AR” — https://community.br-automation.com/t/the-os-behind-ar/3303
  • “User Program trigger Execution of Init and Exit Routine” — https://community.br-automation.com/t/user-program-trigger-execution-of-init-and-exit-routine/3718
  • “Arsim fails to boot” — https://community.br-automation.com/t/arsim-fails-to-boot/1638
  • “CF Card stops functioning once variable is changed” — https://community.br-automation.com/t/cf-card-stops-functioning-once-variable-is-changed/2827
  • “Creating a CF Card With Files From Mapp Backup” — https://community.br-automation.com/t/creating-a-cf-card-with-files-from-mapp-backup/1987
  • “USER partition not creating” — https://community.br-automation.com/t/user-partition-not-creating/4654
  • “Service Mode - What is it and how to collect diagnostics” — https://community.br-automation.com/t/service-mode-what-is-it-and-how-to-collect-diagnostics/1613
  • “How can I save SystemDump data on the user partition” — https://community.br-automation.com/t/how-can-i-save-systemdump-data-on-the-user-partition-of-the-cf-card/2454
  • “Shipping CompactFlash Card” — https://community.br-automation.com/t/shipping-compactflash-card/2033
  • “CPU x20cp1584 cannot find target” — https://community.br-automation.com/t/cpu-x20cp1584-cannot-find-target/5019

Third-Party Technical Resources

  • Industrial Monitor Direct: “B&R PCMCIA CF Card Backup and Restore Procedure” — https://industrialmonitordirect.com/blogs/knowledgebase/br-pcmcia-cf-card-backup-and-restore-procedure
  • Industrial Monitor Direct: “B&R Power Panel 400 CF Card Boot Failure and Program Backup Procedures” — https://industrialmonitordirect.com/blogs/knowledgebase/br-power-panel-400-cf-card-boot-failure-and-program-backup-procedures
  • Industrial Monitor Direct: “Uploading B&R Project from CF Card in Automation Studio” — https://industrialmonitordirect.com/blogs/knowledgebase/uploading-br-project-from-compact-flash-card-in-automation-studio
  • Industrial Monitor Direct: “How to Backup B&R CF Card Using Runtime Utility Center” — https://industrialmonitordirect.com/blogs/knowledgebase/br-cf-card-backup-using-runtime-utility-center
  • DMC Inc: “B&R Automation — Changing Automation Runtime Configurations” — https://www.dmcinfo.com/blog/26437/br-automation-changing-automation-runtime-configurations/
  • B&R Process Control: CF Upgrade Instructions — https://www.process-control.com/wp-content/uploads/b-r-cf-upgrade-instructions.pdf

Community Forum Discussions (PLCTalk, Reddit)

  • PLCtalk: “Do B&R Industries Power Panel 300 work only with specific models of CF cards?” — https://www.plctalk.net/forums/threads/do-b-r-industries-power-panel-300-work-only-with-specific-models-of-cf-cards.145986/
  • PLCtalk: “B&R X20 service mode” — https://www.plctalk.net/forums/threads/b-r-x20-service-mode.91845/
  • PLCtalk: “B&R CP476 upload” — https://www.plctalk.net/forums/threads/b-r-cp476-upload.55486/page-3
  • Reddit r/PLC: “B&R PLC Program Loading” — https://www.reddit.com/r/PLC/comments/1amxzp6/br_plc_program_loading/
  • Reddit r/PLC: “B&R 5PC600 5X02-00 Boot Mode: Diagnosis, Service” — https://www.reddit.com/r/PLC/comments/nd94vw/br_5pc600_5x0200_boot_mode_diagnosis_service/

Technical References

  • Scribd: Runtime Utility Center Overview — https://www.scribd.com/document/938093397/03-RuntimeUtilityCenter-V4-7-10-6-2016-EN
  • VxWorks Boot Process (general reference) — https://medium.com/@knownsec404team/analysis-of-vxworks-boot-process-and-overflow-testing-599897fb862b
  • HDDGURU Raw Copy Tool — https://hddguru.com/software/HDD-Raw-Copy-Tool/
  • Win32DiskImager — https://win32diskimager.org/

Document generated from research across B&R official documentation, community forums, and third-party technical resources. Some details are inferred from VxWorks general behavior and B&R community knowledge — verify against your specific AR version and hardware manual.


  • firmware.md — B&R firmware architecture, AR version landscape, memory layout, and firmware update mechanisms
  • bootloader-recovery.md — Recovery procedures when the CF card is corrupted or the PLC won’t boot
  • config-file-formats.md — Detailed format reference for every configuration file on the CF card
  • ar-rtos.md — Automation Runtime OS internals including VxWorks boot process and security vulnerabilities
  • ftp-web-interface.md — FTP-based remote access to CF card contents for backup and diagnostics
  • cp1584-forensics.md — Extracting information from a running CP1584 without project files
  • access-recovery.md — Gaining initial access to an undocumented PLC, including CF card backup procedures
  • execution-model.md — Task class scheduling and how task configuration is loaded from CF card
  • memory-map.md — CPU memory regions including how CF card partitions map to the address space
  • retentive-data.md — Battery-backed SRAM data preservation during CF card swaps and cold restarts
  • project-reconstruction.md — Rebuilding an AS project from CF card contents
  • diagnostics-sdm.md — Using SDM to monitor CF card health and boot errors
  • cp1584-hardware-ref.md — CP1584 physical interfaces, CF card slot, and hardware specifications
  • online-changes.md — How CF card persistence works when making online changes to running programs
  • spare-parts.md — Sourcing replacement CF cards and certified media
  • remanufacturing.md — Migration from CF-card-based CP1584 to SD-card-based newer controllers

B&R X2X Link Protocol — Wire-Level Technical Reference

Scope: B&R (Bernecker + Rainer, now ABB) X2X Link and X2X+ backplane/remote-I/O bus systems used in the X20, X67, and Compact-S product families.

Date: July 2026 — Compiled from official B&R datasheets, system manuals, community posts, and third-party technical articles.


Table of Contents

  1. Protocol Overview
  2. Physical Layer
  3. X2X Frame Format and Wire-Level Encoding
  4. Timing, Bit Rate, and Synchronization
  5. Node Addressing
  6. Protocol Versions — X2X Link vs X2X+
  7. Error Handling and Diagnostics
  8. Sniffing / Tapping X2X Traffic
  9. Decoding IO Card Sensor Data at the Protocol Level
  10. Pinpointing Failing IO Modules / Channels from Captured Traffic
  11. Tools for X2X Analysis
  12. Component Reference Tables
  13. Source URLs and References

1. Protocol Overview

X2X Link is B&R’s proprietary real-time deterministic bus protocol designed for:

  • Backplane communication between I/O modules on the X20/X67 bus bases
  • Remote I/O expansion up to 100 m from the controller
  • Providing a single unified protocol for both local (backplane) and remote (cable) I/O, eliminating the need for separate fieldbus-to-I/O gateways

Key characteristics:

PropertyValue
Protocol typeProprietary, master-slave, cyclic deterministic
MediaPCB traces (backplane) + twisted-pair copper cable (remote)
TopologyDaisy-chain / multi-drop
Max bus speed12 Mbps (X2X Link)
Max segment length100 m per segment (remote cable)
Max slave nodes62 per master (X20BT9100 / X20BR9300)
Cycle time0.5 ms to 10 ms (configurable, default 2 ms)
Address range0x01 – 0xFD (manual) or auto-assigned (0x00)
OwnerB&R Industrial Automation (now ABB) — closed/undocumented wire protocol

IMPORTANT CAVEAT: B&R has never publicly released a wire-level protocol specification for X2X Link. The frame structure, checksum algorithm, and bit-level encoding described below are reconstructed from official hardware documentation, system manuals, community knowledge, and reverse-engineering observations. Some details are necessarily incomplete or inferred.


2. Physical Layer

2.1 Backplane (X20 Local Bus)

On the X20 backplane, X2X Link is carried on the module-to-module bus connectors (8-pin keyed connectors at 12.5 mm pitch). The protocol runs at 12 Mbps over PCB traces directly between modules slotted onto the bus base.

  • Each X20 module has an 8-pin bus connector on each side (left/right)
  • Modules are physically clipped together onto a DIN-rail-mounted bus base
  • The bus base carries: X2X data lines, +24 VDC, GND, and I/O power
  • No external cabling is needed for local backplane communication

For remote I/O expansion, X2X Link uses a differential-pair serial link over shielded twisted-pair copper cable. The physical layer is electrically compatible with EIA-485 (RS-485) transceivers, but the protocol and data encoding are entirely proprietary — it is NOT standard UART/RS-485 framing.

2.2.1 Connector — M12, B-keyed, 5-pin

All X2X Link remote cable assemblies use B-keyed M12 circular connectors:

PinSignalWire ColorFunction
1X2X+RedX2X Link data+ (differential pair A) AND +24 VDC supply for remote backplane
2X2XWhiteX2X Link data reference (differential pair B)
3X2X⊥BlackX2X Link inverse data (differential pair A inverse)
4X2X\BlueX2X Link data ground / inverse reference
5Not assignedUnused (present on connector but NC)
ShellSHLDBraided shield360° shield via knurled-head screw

Critical note about pin 1 (Red wire / X2X+): Pin 1 carries both the X2X Link data signal AND the +24 VDC power supply for the remote X2X backplane. When connecting to devices with their own power supply (e.g., IF789 or LS189 interfaces), the red wire end must be insulated (heat-shrink) to prevent short circuits. For standard X2X remote stations (X20BR9300, X67 modules), pin 1 provides both data and power.

Source: X2X Link Cables Data Sheet V2.21

2.2.2 Cable Specifications

ParameterValue
Cable type4-core shielded twisted pair
Data pair (X2X / X2X⊥)2 × 0.25 mm² (AWG 24), tinned Cu, light blue + white
Supply pair (X2X+ / X2X\)2 × 0.34 mm² (AWG 22), tinned Cu, red + black
ShieldingPaired aluminum foil shield + braided tinned Cu overall
Outer sheathPUR mixture, halogen-free, purple
Outer diameter6.9 mm ± 0.2 mm
Max current per contact4 A
Max connection voltage125 V AC/DC
Conductor resistance< 180 Ω/km at 20°C
Temperature range (fixed)-25 to 80°C
Temperature range (flexible)-20 to 80°C
Min bend radius (fixed)≥ 7.5× outer diameter (≈ 52 mm)
Min bend radius (flexing)≥ 15× outer diameter (≈ 104 mm)
Drag chain ratingMax 7 m/s², 3 m/s velocity

Standard pre-assembled cable lengths: 0.25 m, 1.0 m, 1.5 m, 2.0 m, 5.0 m, 10.0 m, 15.0 m, 25.0 m, 50.0 m. Bulk cable (X67CA0X99) available in 100 m and 500 m drums for custom assembly.

Cable part numbers:

  • X67CA0X01.xxxx — Straight M12-to-M12 connection cables
  • X67CA0X11.xxxx — Angled (90°) M12-to-M12 connection cables
  • X67CA0X21.xxxx — Straight female-to-open attachment cables
  • X67CA0X41.xxxx — Straight male-to-open open cables
  • X67CA0X51.xxxx — Angled male-to-open open cables
  • X20CA0X48.xxxx — X20 system attachment cables (open-ended one side)

2.2.3 Termination

  • 120Ω termination resistors are required at both ends of each X2X Link segment
  • B&R dedicated terminator: X20AT6100 (120Ω, 0.25W)
  • DC resistance measured between X2X+ and X2X⊥ at bus ends should read ~60Ω (two 120Ω resistors in parallel when both terminators are installed)
  • Some modules have built-in termination switches/jumpers

2.2.4 Topology

  • Daisy-chain / multi-drop — modules are connected serially with an IN and OUT port
  • Each X20BR9300 bus receiver has two X2X ports for daisy chaining
  • Maximum of 100 m total cable length per segment
  • The X2X Link bus is fed by the X20BR9300 bus receiver (or X20BT9100 transmitter)
  • After approximately 30 modules on a single segment, a bus repeater (another X20BR9300/X20BT9100) is needed
  • Shield must be grounded at both ends for best EMC immunity; ground the supply line as close as possible to the shield connection point

2.2.5 Physical Verification Checklist

1. Verify DC bus voltage: Should be 2.5V ±0.5V between X2X+ and X2X⊥ when idle
2. Verify DC resistance between A+ and B-: ~60Ω with both terminators installed
3. Check cable shield grounding: One-point grounding minimum, two-point preferred
4. Confirm segment length ≤ 100 m
5. Confirm terminator at first and last node
6. Check for ground potential differences between panels
7. Verify power supply sequencing: X2X modules stabilize before CPU initialization

3. X2X Frame Format and Wire-Level Encoding

3.1 What Is Known

B&R has not published the X2X Link wire-level protocol specification. The following is reconstructed from multiple sources:

3.2 Physical Signaling

  • The X2X Link uses differential signaling over twisted pairs, electrically compatible with RS-485 transceivers
  • The bus operates at 12 Mbps on the backplane; remote cable speed is determined by the transceiver and cable quality (B&R specifies up to 12 Mbps with their qualified cable over 100 m)
  • The encoding is NOT standard UART/async serial (no start/stop bits in the conventional sense). The protocol uses a synchronous, clock-recovered NRZ-like encoding with its own frame delimiters and bit-stuffing
  • The master provides the clock reference for all slaves on the bus

3.3 Inferred Frame Structure

Based on community observations and reverse-engineering efforts, X2X Link frames appear to follow this general structure:

┌──────────┬──────────┬──────────┬──────────────┬─────────┬──────────┐
│ Preamble │ Sync     │ Header   │ Payload Data │ CRC/FCS │ EOM      │
│ (edge    │ Pattern  │ (address │ (I/O data,   │ Checksum│ End of   │
│  training│ (unique  │ + ctrl + │ config,      │         │ Message  │
│  for PLL │ word for │ frame    │ diag)        │         │ marker)  │
│  lock)   │ framing) │ type)    │              │         │          │
└──────────┴──────────┴──────────┴──────────────┴─────────┴──────────┘
FieldDescription (Inferred)
PreambleA burst of alternating edges allowing slave receivers to lock their
PLL/clock recovery circuits. Duration depends on baud rate and receiver
requirements.
Sync PatternA unique bit sequence that marks the start of a valid frame.
Distinguishes real data from line noise.
HeaderContains at minimum: destination/source node address, frame type code,
and payload length. Likely 2-4 bytes.
PayloadVariable-length data: I/O input/output values, configuration parameters,
diagnostic status words, module identification.
CRC/FCSFrame Check Sequence for integrity verification. Likely CRC-16 or
CRC-32, but exact polynomial is unknown.
EOMEnd-of-message delimiter or final bit pattern.

3.4 Frame Types (Inferred)

The X2X Link master cyclically transmits the following frame categories:

Frame TypeDirectionDescription
ConfigurationMaster → SlaveSent during initialization. Assigns node addresses, sets module
parameters, configures I/O mapping. Slave must be in RESET/BOOT mode
to accept configuration.
Cyclic DataMaster → Slave (outputs) + Slave → Master (inputs)Real-time I/O data exchanged every cycle. Output data from the master
is piggybacked onto the master’s polling frame; input data from the slave
is returned in the slave’s response slot.
Diagnostic/StatusMaster ↔ SlaveStatus words indicating module health, error flags, watchdog state,
and per-channel diagnostics.
Ack/NACKSlave → MasterAcknowledgment of configuration frames, error responses.

3.5 Cyclic Communication Model

The X2X Link operates on a master-slave polling model within each cycle:

  1. Master broadcasts a poll frame containing the destination node address and output data
  2. The addressed slave responds with input data and status information
  3. Master polls the next slave in sequence
  4. All slaves are polled once per cycle time
  5. The cycle repeats deterministically

This means: Cycle time ≥ (number_of_slaves × per_slave_transaction_time) which is why the X2X cycle time must be at least as fast as the task class that reads/writes its I/O.

NOTE: The exact byte-level frame format, sync word values, CRC polynomial, and bit-level encoding remain proprietary. B&R has not released this information. Any attempt to fully decode X2X traffic from raw captures would require either (a) a leaked specification or (b) significant protocol reverse-engineering effort.


4. Timing, Bit Rate, and Synchronization

4.1 Bit Rate

ContextBit Rate
X20 backplane (local I/O)12 Mbps
Remote X2X Link (cable)12 Mbps (with qualified B&R cable, ≤ 100 m)
X2X+ backplane~48 Mbps (estimated, 4× X2X Link)

Source: B&R System Overview I/O, Fieldbus, and Control Systems (2011/2012 edition) — X20IF1061 and X20IF1063 interface modules listed with “X2X Link, baudrate max. 12 Mbps”

4.2 Cycle Time

The X2X Link cycle time is user-configurable in Automation Studio:

ParameterValue
Minimum cycle time0.5 ms (500 μs)
Maximum cycle time10 ms (10000 μs)
Default cycle time2 ms
GranularityMultiples of the system timer base (typically 100-200 μs steps)
ConstraintMust be a multiple of or divisor of task class cycle times

The cycle time determines how fast I/O data is updated:

  • At 2 ms cycle time: I/O is refreshed 500 times per second
  • At 0.5 ms cycle time: I/O is refreshed 2000 times per second
  • The X2X cycle time directly affects the cyclic task classes in Automation Studio; task classes must have cycle times that are multiples of the X2X cycle

4.3 Synchronization Mechanism

  • The master node (CPU or bus controller) generates the timing reference for the entire X2X bus
  • All slave nodes synchronize to the master’s clock via the X2X frame preamble and sync patterns
  • When an ACOPOS drive (POWERLINK) is added to the configuration, the system timer configuration changes to “EPL/X2X Interface” mode, and the POWERLINK and X2X interfaces share the same timing base
  • POWERLINK cycle time must be a multiple of 400 μs for motion control applications
  • IO-Link cycle times can be synchronized to or explicitly specified independently from the X2X cycle time

4.4 Timing Constraints

  • The X2X cycle time must match or be compatible with the task class cycle times that read/write the I/O mapped to that X2X bus
  • If a stepper motor controller (e.g., X20SM1436) runs in a 4 ms task, the X2X bus must also run at ≤ 4 ms (typically the same value)
  • Default X2X cycle: 2 ms; default POWERLINK cycle: 10 ms (but these can be changed independently in Automation Studio)

Source: Pedronf65 blog post on B&R task timing configuration


5. Node Addressing

5.1 Addressing Scheme

Each X2X Link node has a unique 1-byte address in the range 0x01 to 0xFD (1 to 253 decimal). Address 0x00 has a special meaning (automatic assignment).

5.2 How Nodes Get Addresses — Two Methods

Method 1: Manual Address via DIP Switches

Bus modules equipped with node number switches (e.g., X20BM05) allow manual address assignment:

  • Two rotary/hex switches labeled ×16 and ×1 provide a range of 0x00 to 0xFF
  • The actual address is: (×16 switch value × 16) + ×1 switch value
  • Setting the switches to a value in range 0x01–0xFD sets the X2X Link address permanently for the bus base
  • Setting 0x00 enables automatic address assignment (see below)
  • Placing a node-number-switch module at the beginning of an X20 block ensures a unique address base; subsequent modules in the block are auto-numbered upward from that base

The switches are physically located on the bus module (bottom of the module), with symbols printed on the locking lever for external visibility.

Method 2: Automatic Address Assignment

  • When a bus module’s node number switches are set to 0x00, the X2X Link address is automatically assigned by the master during initialization
  • The master assigns addresses in ascending order starting from the last known address + 1
  • Manual and automatic addressing can be combined: place one manually-set module to establish a unique base, then let subsequent modules auto-assign

5.3 Address Assignment Rules

  • No two nodes on the same X2X segment may share the same address
  • The master (CPU/bus controller) always has the lowest address (typically 0x01)
  • Addresses must match the configuration in Automation Studio
  • Changes to node number switches only take effect after a power cycle
  • The X2X Link address is independent of the electronics module plugged into the slot — it depends only on the bus module’s switch setting

5.4 Addressing on X67 System

On X67 remote I/O blocks:

  • The left node number switch sets the upper nibble (×16)
  • The right node number switch sets the lower nibble (×1)
  • Combined value forms the X2X Link address

PropertyValue
Introduced~2005 with X20 system launch
Bus speed12 Mbps
Cycle time0.5 – 10 ms
Max slaves62 per master
Max segment100 m cable
AvailabilityAll X20/X67 CPUs, bus controllers, interface modules
Backward compatibleYes — universal support

6.2 X2X+ (Enhanced)

PropertyValue
IntroducedJanuary 2023
Bus speed~48 Mbps (estimated, 4× X2X Link)
Response time4× faster than X2X Link
BandwidthSignificantly higher; handles large data volumes
Max slavesNot publicly specified (likely ≥ 62)
Max segment100 m cable
AvailabilitySelected X20 controllers (e.g., X20CP168x, X20CP368x series)
CompatibilityNOT directly combinable with X2X Link in same segment

6.3 Key Differences

FeatureX2X LinkX2X+
Transfer rateBase4× base
Response timeBase4× faster
Data bandwidthStandardHigh (suitable for vibration analysis, high-speed DAQ)
Topology supportBackplane + remoteBackplane only (as of initial release)
MixingN/ACannot mix X2X+ and X2X Link in same segment
Controller requirementAny X20/X67Specific SG4 controllers with X2X+ option
Cycle time range0.5 – 10 msSub-millisecond possible

From B&R press release (Jan 30, 2023):

“X2X+ enables faster data transfer and up to four times faster response times. In combination with this higher bandwidth, large amounts of data can be handled quickly and easily.”

Source: B&R “Four times more performance” press release

6.4 Migration Notes

  • Existing X20 I/O modules are compatible with both X2X Link and X2X+
  • If X2X+ is selected in Automation Studio as the backplane bus, all local modules use X2X+; remote X2X Link segments require a separate X2X Link interface
  • A separate X2X Link interface module is needed if you need to connect X2X Link remote stations to an X2X+ system

7. Error Handling and Diagnostics

7.1 CPU Operating Modes

ModeR-LED PatternX-LED PatternBehavior
BOOTDouble flash (~1 Hz)VariesFirmware loading — DO NOT interrupt
RESETSingle flash (~1 Hz)OffNo valid application or corrupt config
RUNSteady ON (green)Steady ON (orange)Application executing, X2X active
STOPSingle flashVariesApplication halted by user or error

7.2 Module-Specific LED Diagnostics

ModuleLEDStatusMeaning
X20BR9300 (Slave bridge)R-LEDSolid greenNormal: Power OK
X20BR9300X-LEDSolid orangeX2X communication active
X20BR9300R-LEDSingle flashReset mode / not configured
X20BR9300X-LEDOffX2X communication not established
X20BT9100 (Master terminal)R-LEDSingle flashModule not initialized by CPU
X20BT9100X-LEDOffNo X2X frame transmission
X20 I/O ModulesR-LEDSteady greenModule initialized and operational
X20 I/O ModulesR-LEDSingle flashWaiting for CPU configuration

7.3 CPU Error Codes (7-Segment Display)

CodeMeaning
E001Hardware initialization error
E002Memory test failure
E003Fieldbus initialization error
E004Application load error

7.4 Common Failure Modes

FailureSymptomsLikely Cause
All modules single-flashNo X2X communicationCPU in RESET/STOP, hardware fault, missing config
Single slave offlineOne panel not respondingCable fault, termination missing, power issue, address conflict
Intermittent commsRandom slave dropoutsCable length > 100 m, poor shielding, ground loops, failing transceiver
All slaves fail after warm startComplete bus lossWatchdog timeout, power sequencing, master transceiver failure
Configuration mismatchSlave R-LED solid but X-LED offPhysical topology differs from Automation Studio project config

7.5 X2X Bus Configuration Error Detection

  • During initialization, the master sends configuration frames to each slave in sequence
  • If a slave does not acknowledge configuration within the timeout period, that node is marked as not configured
  • Address conflicts (duplicate addresses) will cause initialization failures for the conflicting nodes
  • The X2X bus is completely inactive if the CPU is not in RUN mode — this is by design, as a safety measure

7.6 Power Supply Sequencing

  • 24 VDC power to X2X modules must stabilize before CPU initialization
  • Recommended sequence:
    1. Disconnect all 24 VDC power
    2. Wait 60 seconds for complete discharge
    3. Reapply power to X2X modules first, wait 2 seconds
    4. Apply power to CPU
    5. Observe LED sequences during boot

7.7 Reset Button Behavior

  • Brief press: Warm restart — application program remains in memory
  • Hold 3+ seconds then release: Warm restart with re-initialization attempt
  • Hold 10+ seconds during power-on: Cold start — clears retain variables, forces complete re-initialization
  • Cold start can also be triggered via Automation Studio command

8. Sniffing / Tapping X2X Traffic

8.1 Challenge Level: HIGH

X2X Link is a 12 Mbps differential serial protocol on a proprietary physical layer. There is no off-the-shelf Wireshark dissector or commercial protocol analyzer that natively supports X2X Link. Sniffing requires custom hardware and software.

8.2 Physical Tap Points

For the remote X2X Link cable, the tap point is straightforward — you have accessible M12 connectors. For the local backplane, you would need to either:

  • Probe the PCB traces directly (requires opening the module housing)
  • Tap into the bus connector pins using fine-pitch probe clips

8.3 Hardware Options

Option A: High-Speed Logic Analyzer

ToolSample RateChannelsSuitability
Saleae Logic Pro 16500 MS/s16Marginal — 500 MS/s gives ~42 samples per bit at 12 Mbps
Saleae Logic 2 Pro 161 GS/s16Adequate — 83 samples per bit
Saleae High-Speed USB2 GS/s16+Good — 166 samples per bit
sigrok/Clone (Sainlogic)24-100 MS/s8-16Insufficient for 12 Mbps

REQUIREMENT: At 12 Mbps, one bit period is ~83.3 ns. You need a minimum of 4-5 samples per bit (16-20 ns resolution), so the logic analyzer must sample at ≥ 48-60 MS/s per channel. A 100 MS/s or better analyzer is strongly recommended.

Option B: RS-485 Transceiver Tap Board

Build a simple passive tap:

                    ┌─────────────────────┐
  X2X Master ──────│ A (non-inverting)    │────── Logic Analyzer CH1
                    │ B (inverting)       │────── Logic Analyzer CH2
  X2X Slave ───────│ GND                 │────── Logic Analyzer GND
                    │                      │
                    │ 120Ω term (switchable)│
                    └─────────────────────┘
  • Use a high-speed RS-485 transceiver rated for ≥ 20 Mbps (e.g., SN65HVD1782, MAX1487, ADM485)
  • Add a switchable 120Ω termination resistor to avoid affecting bus operation when tapping mid-segment
  • Power the tap board from an isolated supply to avoid ground loops
  • Connect the transceiver output to the logic analyzer’s digital inputs

Option C: Differential Probe + Oscilloscope

  • A differential probe (e.g., Tektronix P5200 or equivalent) connected to an oscilloscope can visually capture the X2X signal waveform
  • Not suitable for long captures or automated decoding, but useful for verifying signal integrity and estimating baud rate

8.4 Capture Procedure

  1. Identify tap point: Disconnect the X2X cable at a convenient junction (between master and first slave, or between two slaves)
  2. Install passive tap: Insert the tap board inline. Ensure termination is correct (tap mid-segment: no termination; tap at end: enable termination)
  3. Configure logic analyzer:
    • Sample rate: ≥ 100 MS/s (≥ 200 MS/s recommended)
    • Channels: CH1 = X2X+ (data+), CH2 = X2X⊥ (data-)
    • Trigger: Rising or falling edge on CH1
    • Capture duration: ≥ 2× X2X cycle time (4 ms at 2 ms cycle)
  4. Start capture and observe:
    • You should see a periodic pattern corresponding to the X2X cycle
    • Each cycle contains multiple bursts (one per slave)
    • Idle periods between bursts show the bus in the recessive/idle state

8.5 Signal Characteristics to Expect

        ┌──┐  ┌──┐  ┌──┐  ┌─────┐           ┌──┐
   X2X+ ┘  └──┘  └──┘  └──┘     └───────────┘  └──
   X2X⊥ ────────────────────────────────────────────
           ← Frame 1 →         Idle    ← Frame 2 →
  • Differential voltage swing: approximately 1.5–3.0 V (typical RS-485 levels)
  • Idle/bus-free state: X2X+ ≈ X2X⊥ (both at common-mode voltage, ~2.5V)
  • Active state: X2X+ and X2X⊥ diverge by ±1.5V differential

9. Decoding IO Card Sensor Data at the Protocol Level

9.1 What You Need to Know Before Decoding

To decode IO data from raw X2X traffic, you need:

  1. The I/O mapping from the Automation Studio project (which node addresses map to which I/O modules, which channels, and data types)
  2. The cyclic data layout for each node (how many bytes of input/output data per node per cycle)
  3. The byte order (likely little-endian, consistent with x86 B&R CPUs)
  4. The frame boundary markers (sync pattern) to segment the captured bitstream
  5. The CRC/checksum algorithm (to validate decoded frames)

9.2 Data Mapping Architecture

In Automation Studio, the I/O mapping defines:

Node Address 0x01 (X20BR9300 - Panel 1):
  Slot 2: X20DI9372 (16-channel digital input)
    → Input bytes: 2 bytes (16 bits, one per channel)
    → Byte 0: Channels 1-8 (bit 0 = channel 1)
    → Byte 1: Channels 9-16 (bit 0 = channel 9)
  Slot 3: X20AO4622 (4-channel analog output, 16-bit)
    → Output bytes: 8 bytes (4 × 16-bit values)
    → Bytes 0-1: Channel 1 value (0 to 32767 = 0 to 10V)
    → Bytes 2-3: Channel 2 value
    → ...

Node Address 0x11 (X20BR9300 - Panel 2):
  Slot 2: X20AI4632 (4-channel analog input, 16-bit)
    → Input bytes: 8 bytes (4 × 16-bit values)
    → Bytes 0-1: Channel 1 value (0 to 32767 = 0-10V or 4-20mA)
    → ...

9.3 Digital Input Data Format (Inferred)

  • Digital I/O is packed as bit-mapped bytes, 8 channels per byte
  • Bit 0 of byte 0 = channel 1 (or channel 0, depending on B&R’s convention)
  • Little-endian packing: LSB first
  • Sink inputs read 1 = input active (current flowing)
  • Source inputs read 1 = input active (voltage present)

9.4 Analog Data Format (Inferred)

  • Analog values are typically 16-bit signed or unsigned integers
  • Resolution depends on the specific module (12-bit or 16-bit ADC)
  • Scaling from raw value to engineering units is done in the PLC program, not in the protocol
  • Common analog ranges:
    • ±10V: raw 0–32767 (unsigned) or -32768–32767 (signed)
    • 0–10V: raw 0–32767
    • 4–20mA: raw 0–32767 (where 0 = 4mA, 32767 = 20mA)

9.5 Decoding Workflow (Without Official Specification)

  1. Capture raw differential signal with logic analyzer
  2. Convert differential signal to single-ended (X2X+ XOR X2X⊥)
  3. Identify frame boundaries using sync patterns
  4. Extract bitstream for each frame
  5. Parse header to identify source/destination address
  6. Extract payload based on known I/O mapping
  7. Verify with CRC (algorithm unknown — trial and error with common CRC-16 polynomials: CRC-16-CCITT, CRC-16-IBM, CRC-16-MODBUS)

Practical reality: Without the official protocol spec, decoding X2X payload data requires significant reverse-engineering effort. The most practical approach is to use known I/O states as test patterns and correlate captured bits with expected values.


10. Pinpointing Failing IO Modules / Channels from Captured Traffic

10.1 Diagnostic Approach Using Captured Traffic

If you can capture and decode X2X traffic (even partially), you can identify failing modules/channels by:

Method 1: Address-Level Identification

  1. Compare the list of responding node addresses in captured traffic against the expected configuration
  2. A missing address in the cyclic polling sequence indicates a slave that is not responding (offline, cable fault, or module failure)
  3. An unexpected address may indicate an address conflict or misconfigured node

Method 2: Status Word Analysis

Each slave’s response frame likely contains a status/diagnostic word. Look for:

  • Error flag bits (which bit positions indicate which conditions is unknown without the spec)
  • Watchdog timeout flags
  • Module-specific error codes
  • Per-channel diagnostic bits for digital modules (wire-break, short-circuit)

Method 3: Data Anomaly Detection

  • Digital inputs stuck at 0 or 1 despite known physical state → channel fault or wiring issue
  • Analog values pegged at 0, full-scale, or random noise → ADC failure, open wire, or signal conditioning fault
  • Sudden data loss from a specific node → module failure, cable disconnect, or power loss to that station

Method 4: Timing Analysis

  • Increased round-trip time for a specific slave → the slave is taking longer to respond, possibly due to internal retries or hardware degradation
  • Missing response frames → slave timeouts, CRC failures, or physical layer errors

10.2 Practical Troubleshooting Without Protocol Decoding

Since full X2X decoding is impractical without the spec, the most effective approach is:

  1. Use Automation Studio diagnostics: Configure X2X diagnostic information to be sent over EIP/POWERLINK to a central HMI or data logger
  2. Monitor LED patterns: As described in Section 7.2, LED states provide immediate visual diagnostic information
  3. Use the B&R “Network Analyzer” (X20ET8819): This is B&R’s own Ethernet/ POWERLINK analysis tool — it can capture POWERLINK traffic but does not directly decode X2X
  4. Swap-and-test: Replace suspect modules or cables one at a time and observe which change restores communication
  5. Resistance/continuity testing: Check cable resistance between X2X+ and X2X⊥ along the chain

10.3 Diagnostic Data Export

B&R Automation Studio can be configured to export X2X diagnostic data including:

  • Slave online/offline status
  • Per-module error counters
  • Watchdog status
  • Cycle time monitoring
  • Configuration match/mismatch flags

This data is typically exported via:

  • OPC UA (all SG4 controllers with Ethernet)
  • Ethernet/IP tags (X20BC0088 bus controller)
  • Modbus/TCP registers (X20BC0087 bus controller)
  • POWERLINK process data

11. Tools for X2X Analysis

11.1 Official B&R Tools

ToolFunctionX2X Support
Automation StudioConfiguration, programming, online diagnosticsFull — configure bus, set addresses, cycle times, monitor status
X20ET8819Ethernet/POWERLINK network analyzerIndirect — captures POWERLINK frames containing X2X status
Automation RuntimeRuntime system with diagnostic featuresFull — provides I/O diagnostics, error logging, watchdog
Target Browser (in Automation Studio)Device discovery, status monitoringShows X2X bus state, slave status
mapp View / Panel BuilderHMI with diagnostic displaysCan show X2X error/status tags
OPC UA Server (built-in)Standardized data accessExposes X2X diagnostic tags via OPC UA

11.2 Third-Party / Community Tools

ToolFunctionX2X Support
WiresharkNetwork protocol analyzerNO native X2X dissector — would need custom Lua/C plugin
Saleae Logic / Logic 2Logic analyzer softwareCaptures raw digital waveforms; no X2X protocol decode
sigrok / PulseViewOpen-source logic analyzerCaptures raw waveforms; no X2X decode
Teledyne LeCroy RS-422/485 ComProbeSerial protocol analyzerPhysical layer capture; no X2X decode
Frontline (Teledyne)Industrial protocol analyzer suiteRS-485/RS-422 physical layer; no X2X decode

11.3 Writing a Custom Wireshark Dissector for X2X

Since no native X2X dissector exists, you could write one using Wireshark’s Lua API:

-- Pseudo-code for a Wireshark Lua dissector for X2X Link
-- This is a skeleton — the actual frame format is proprietary and unknown

local x2x_proto = Proto("x2x_link", "B&R X2X Link Protocol")

local f_frame_type = ProtoField.uint8("x2x.frame_type", "Frame Type", base.HEX)
local f_src_addr   = ProtoField.uint8("x2x.src_addr", "Source Address", base.HEX)
local f_dst_addr   = ProtoField.uint8("x2x.dst_addr", "Dest Address", base.HEX)
local f_payload    = ProtoField.bytes("x2x.payload", "Payload")
local f_crc        = ProtoField.uint16("x2x.crc", "CRC", base.HEX)

x2x_proto.fields = {
    f_frame_type, f_src_addr, f_dst_addr, f_payload, f_crc
}

function x2x_proto.dissector(buffer, pinfo, tree)
    pinfo.cols.protocol = "X2X Link"
    local subtree = tree:add(x2x_proto, buffer())

    -- NOTE: Field offsets and sizes are UNKNOWN/INFERRED
    -- Actual implementation requires the official spec or RE
    subtree:add(f_frame_type, buffer(0, 1))
    subtree:add(f_src_addr,   buffer(1, 1))
    subtree:add(f_dst_addr,   buffer(2, 1))
    subtree:add(f_payload,    buffer(3, buffer:len() - 5))
    subtree:add(f_crc,        buffer(buffer:len() - 2, 2))
end

-- Register as a user DLT (Data Link Type) for raw capture import
local wtap_dissector_table = DissectorTable.get("wtap_encap")
wtap_dissector_table:add(wtap_dissector_table:get_free_id(), x2x_proto)

To use this:

  1. Capture X2X traffic with a logic analyzer → export as raw binary/captured stream
  2. Write a conversion script to import the raw data into a pcap-like format
  3. Register the custom dissector to decode the frames
┌──────────────┐     X2X Cable      ┌──────────────┐     X2X Cable      ┌──────────────┐
│              │◄──────────────────►│              │◄──────────────────►│              │
│  CPU/Master  │   IN     OUT       │  X2X Tap     │   IN     OUT       │  Slave I/O   │
│  (X20CP...)  │                   │  Board       │                   │  (X20BR...)  │
│              │                   │              │                   │              │
└──────────────┘                   └──────┬───────┘                   └──────────────┘
                                          │
                                    ┌─────┴─────┐
                                    │ RS-485     │
                                    │ Transceiver│
                                    └─────┬─────┘
                                          │
                                    ┌─────┴─────┐
                                    │  Logic     │
                                    │  Analyzer  │──► PC (Saleae/sigrok)
                                    │  ≥100MS/s  │
                                    └───────────┘

12. Component Reference Tables

ModelFieldbusX2X AddressingConnector
X20BC0043CANopenDIP switches5-pin multipoint
X20BC0053POWERLINKDIP switches5-pin multipoint
X20BC0063PROFIBUS DPDIP switches9-pin DSUB
X20BC0073DeviceNetDIP switches5-pin multipoint
X20BC0083CAN I/ODIP switches5-pin multipoint
X20BC0087Modbus/TCPDIP switches2× RJ45 (switch)
X20BC0088Ethernet/IPDIP switches2× RJ45 (switch)
X20BC0089POWERLINKDIP switches2× RJ45 (switch)
X20BC1083POWERLINKDIP switches2× RJ45 (switch)
ModelFunctionPowerKey Spec
X20BT9100Bus transmitter (master side)0.85 WUp to 62 slaves, 100 m segment
X20BT9400Bus transmitter + X67 power supplyIncludes X67 module power feed
X20BR9300Bus receiver (slave side)2.5 WSupply for X2X Link + internal I/O
ModelFieldbusX2X SupportConnector
X67BC4321CANopenYesM12 A-coded
X67BC5321CAN I/OYesM12 A-coded
X67BC6321ETHERNET PowerlinkYesM12 B-coded
X67BC7321-1POWERLINKYesM12 A-coded
X67BC8321-1ETHERNETYesM12 D-coded

12.4 Bus Modules with Node Number Switches

ModelDescription
X20BM05Bus module, node number switch, 24VDC keyed, I/O supply interrupted left
X20BM01Bus module, standard (no node switch, auto-addressing)

12.5 Termination and Accessories

Part NumberDescription
X20AT6100120Ω termination resistor, 0.25W
X20AC130x seriesX2X Link attachment cables for X20
X67CA0Xxx.xxxxX2X Link cables for X67 (M12, various lengths/configs)
X67CA0X99.xxxxBulk cable for custom assembly (100 m / 500 m)

13. Source URLs and References

Official B&R Documentation

DocumentURL
X20 System User’s Manual (v3.50+)https://assets.euautomation.com/uploads/parts/datasheet/11/x20if1063.pdf
X20 System User’s Manual (v3.60)https://www.all4sps.com/mediafiles/Sonstiges/X20PS3300_1.pdf
X2X Link Product Pagehttps://www.br-automation.com/en-us/products/network-and-fieldbus-modules/x2x-link/
X20BR9300 Datasheethttps://www.br-automation.com/en-us/products/io-systems/x20-system/bus-receivers-and-transmitters/x20br9300/
X20BT9100 Datasheethttps://www.br-automation.com/en-us/products/io-systems/x20-system/bus-receivers-and-transmitters/x20bt9100/
X20BM05 Datasheethttps://static.chipdip.ru/lib2/a/302/DOC071302011.pdf
X2X Link Cables Datasheet (v2.21)https://www.multiwaycontrol.com/multiway/X2X-X67CA0X99.1000-Link-Cable-ENG.pdf
X20BC0088 Product Pagehttps://www.br-automation.com/en-us/products/io-systems/x20-system/bus-controllers/x20bc0088/
B&R X2X+ Press Release (Jan 2023)https://www.br-automation.com/en/about-us/press-room/four-times-more-performance-30-01-2023/
X20(c)CP168x(X) with X2X+ Infohttps://tlauk.net/document/71064/B%2526R%252C%2520X20CCP1684.pdf

Technical Articles and Community Posts

ArticleURL
Control.com: B&R Unveils X2X+ Backplane Bushttps://control.com/news/br-now-offering-x2x-on-the-x20-bus/
B&R Community: Communication Protocol Deviceshttps://community.br-automation.com/t/communication-protocol-devices/426
B&R Community: RS485 X20 Serieshttps://community.br-automation.com/t/rs485-communication-x20-series/1787
B&R Community: Siemens and X2X Communicationhttps://community.br-automation.com/t/siemens-and-b-and-r-x2x-communication/3751
B&R Community: Connecting BB80 Modulehttps://community.br-automation.com/t/connecting-a-new-plc-module-bb80/4339
B&R Community: IO-Link Cycle Timehttps://community.br-automation.com/t/io-link-v-pd-outrunmode/2912
Pedronf65: B&R PLC 4ms Task Confighttps://pedronf65.wordpress.com/2015/05/28/br-plc-configuration-4ms-task-with-x20cp1381-cpu-acoposmicro-x20sm1436/

Troubleshooting and Diagnostics

ArticleURL
IMD: Diagnosing X2X Bus Communication Failureshttps://industrialmonitordirect.com/blogs/knowledgebase/diagnosing-br-x2x-bus-communication-failures-and-cpu-reset-mode-symptoms
IMD: Resolving X2X Communication and Reset Mode LED Issueshttps://industrialmonitordirect.com/blogs/knowledgebase/resolving-br-x2x-communication-and-reset-mode-led-issues
Reddit r/PLC: X2X Link Network Troubleshootinghttps://www.reddit.com/r/PLC/comments/p73low/br_x2x_link_network_troubleshooting/
Reddit r/PLC: X2X Interface Debugginghttps://www.reddit.com/r/PLC/comments/1cdzfly/br_x2x_interface_debugging/

System Overview / Reference

DocumentURL
B&R System Overview I/O, Fieldbus, Control Systemshttps://theengineer.markallengroup.com/production/content/uploads/2012/02/MM-E00640.459.pdf
B&R RS Online X20 System Manualhttps://docs.rs-online.com/b8f4/A700000013942634.pdf
Scribd: X20 System Manual (v3.10)https://www.scribd.com/document/474939830/X20-System-ENG-pdf
Scribd: X67 System Manual (v3.00)https://www.scribd.com/document/479295115/X67-System-ENG-V3-00-pdf
X20BT9100 Datasheet PDFhttps://www.nexinstrument.com/assets/images/pdf/X20BT9100.pdf

Reverse Engineering / Sniffing References

ResourceURL
EEVblog: Figuring out an RS485 Protocolhttps://www.eevblog.com/forum/projects/figuring-out-an-rs485-protocol/
Stack Exchange: Reverse-Engineering RS-485https://electronics.stackexchange.com/questions/431270/reverse-engineering-rs-485-communication
Stack Overflow: Reverse Engineering Serial Protocolhttps://stackoverflow.com/questions/67733520/reverse-engineering-serial-protocol
Saleae Forum: Two Days Decoding RS-485https://discuss.saleae.com/t/two-days-decoding/2558
Teledyne LeCroy: Industrial Protocol Analyzershttps://www.teledynelecroy.com/protocolanalyzer/industrial-network-protocol
James Gibbard: Wireshark Lua User DLThttps://www.gibbard.me/wireshark_lua_user_link_layer/
Wireshark Wiki: Lua Dissectorshttps://wiki.wireshark.org/lua/dissectors

Cross-References


Appendix A: X2X Quick Reference Card

┌──────────────────────────────────────────────────────────────────┐
│                    B&R X2X LINK QUICK REFERENCE                    │
├──────────────────────────────────────────────────────────────────┤
│ Bus Speed:        12 Mbps (X2X Link) / ~48 Mbps (X2X+)           │
│ Cycle Time:       0.5 ms – 10 ms (default 2 ms)                 │
│ Max Slaves:       62 per master                                  │
│ Max Cable:        100 m per segment                              │
│ Addresses:        0x01–0xFD (manual), 0x00 = auto               │
│ Termination:      120Ω at both ends (X20AT6100)                 │
│ Connector:        M12 B-keyed 5-pin (remote)                     │
│ Pin 1: X2X+ (Red) — Data+ AND +24V supply                      │
│ Pin 2: X2X (White) — Data reference                              │
│ Pin 3: X2X⊥ (Black) — Data- inverse                            │
│ Pin 4: X2X\ (Blue) — Data ground                                │
│ Pin 5: NC                                                      │
│ Shield: 360° via knurled screw (ground both ends)                │
│ Idle Voltage: ~2.5V between X2X+ and X2X⊥                       │
│ Terminated R:  ~60Ω between X2X+ and X2X⊥ (both ends)          │
├──────────────────────────────────────────────────────────────────┤
│ LED Patterns:                                                     │
│   R-LED steady green = Normal operation                         │
│   R-LED single flash = Reset/Stop mode                          │
│   R-LED double flash = Boot mode (don't interrupt)               │
│   X-LED steady orange = X2X communication active                │
│   X-LED off = No X2X communication                              │
├──────────────────────────────────────────────────────────────────┤
│ Default CPU IP (Boot mode): 192.168.1.1                          │
│ Config Tool: Automation Studio (B&R)                             │
├──────────────────────────────────────────────────────────────────┤
│ ⚠ X2X+ and X2X Link CANNOT be mixed in the same segment        │
└──────────────────────────────────────────────────────────────────┘

Appendix B: X2X LED Diagnostic Pattern Reference (Field Troubleshooting)

LED Types on X2X Modules

LEDNameColorPurpose
RRun/ReadyGreenModule power and CPU/init status
XX2X BusOrangeX2X bus communication activity
I/OChannel statusGreen/RedPer-channel or per-module I/O status

R-LED Patterns

PatternMeaningAction
Steady greenNormal operation; module initializedNone — system is running
Single flash (~1 Hz)CPU in STOP/RESET mode; modules not initializedCPU has entered reset — check CPU error code, watchdog, application load
Double flashBoot mode — firmware update in progressDo not power off during double flash; wait for update to complete
OffNo power to moduleCheck 24V supply, fuses, bus base connection
Red (some modules)Hardware fault detectedReplace module; check for overtemperature or overvoltage

X-LED Patterns

PatternMeaningAction
Steady orangeX2X communication active; bus traffic presentNormal — no action needed
Flashing orangeX2X bus initializing or intermittent communicationWait for stabilization; if persistent, check cabling and termination
OffNo X2X communication detectedCheck bus cable, master module, CPU RUN status, termination

System-Level LED Interpretation Table

ModuleR-LEDX-LEDInterpretation
X20BT9100 (Master)Single flashOffCPU in reset; X2X master not active
X20BR9300 (Slave, OK)Steady greenSteady orangeNormal — slave communicating with master
X20BR9300 (Slave, fail)Single flashOffSlave not receiving valid X2X signals
All modules on a panelSingle flashN/ACPU in STOP/RESET; entire panel affected

CPU Reset Mode Entry Conditions

The CPU enters reset/STOP mode when any of the following occur:

  1. Hardware watchdog timeout (typically 500 ms – 2 s, configurable)
  2. Critical memory access violation (page fault, illegal address)
  3. Illegal instruction executed
  4. Power-up with corrupted non-volatile memory
  5. Manual reset via Automation Studio (warm restart)
  6. Firmware update failure

In reset mode:

  • CPU stops executing application code
  • All X2X/POWERLINK fieldbus masters are disabled
  • Digital outputs go to safe state (0V)
  • All module R-LEDs flash at ~1 Hz
  • Communication with Automation Studio may still be possible via service interface

Recovery Procedure for X2X Communication Failure

1. Disconnect all 24VDC power to CPU and X2X modules
2. Wait 60 seconds for complete discharge (capacitors)
3. Reapply power to X2X bus modules FIRST, wait 2 seconds for stabilization
4. Apply power to CPU
5. Observe LED sequences:
   - R-LED: single flash → double flash (init) → steady green (RUN)
   - X-LED on master: off → flashing orange → steady orange (X2X active)
   - Slave R-LEDs: single flash → steady green (initialized)
   - Slave X-LEDs: off → steady orange (communication established)

If LEDs do not progress past single flash:

  • Check termination resistors (120Ω) at both bus ends
  • Measure DC bus voltage between X2X+ and X2X⊥: should be 2.5V ±0.5V when idle
  • Check for ground potential differences between panels
  • Verify node address switches on X20BR9300 are unique and match configuration
  • Try pressing CPU reset button (3-second hold) for warm restart

X2X Bus Components Quick Reference

ComponentCatalog NumberKey Specification
X2X Master Bus TransmitterX20BT9100Up to 62 slaves, 100m segment, daisy-chain
X2X Slave Bus ReceiverX20BR930024VDC, 90mA, isolated communication, dual X2X ports
X2X Link Cable (standard)X67CA0X01.xxxxM12 B-keyed 5-pin, shielded, pre-assembled lengths
X2X Link Cable (bulk)X67CA0X99100m / 500m drums, PUR sheath, purple
Termination ResistorX20AT6100120Ω, 0.25W, for bus ends
Bus Controller (POWERLINK)X20BC0083Couples X2X I/O to POWERLINK, synchronous 1:1 cycle
Bus Controller (EtherNet/IP)X20BC0088Couples X2X I/O to EtherNet/IP
Bus Controller (EtherCAT)X20BC00G3Couples X2X I/O to EtherCAT master
Bus Controller (PROFIBUS DP)X20BC0063Couples X2X I/O to PROFIBUS DP

Appendix C: X2X+ Backplane Bus (2023 Enhancement)

In January 2023, B&R introduced the X2X+ backplane bus as an option for X20 systems, delivering approximately 4× the bandwidth of X2X Link.

PropertyX2X LinkX2X+
Backplane speed12 Mbps~48 Mbps (estimated)
Cycle time0.5 ms – 10 msAs low as 0.125 ms (estimated)
Dual cycle timesNoYes — separate fast/slow data channels
TimestampingNoYes — per-data timestamps
Module compatibilityAll X20 modulesAll X20 modules (backward compatible)
Bus module requiredStandard X20 bus modulesX2X+ capable bus modules only
Segment mixingN/ACannot mix X2X Link and X2X+ in same segment

X2X+ Advantages for Condition Monitoring

The higher bandwidth and per-data timestamping make X2X+ particularly suited for:

  • High-speed vibration monitoring and condition monitoring
  • Higher sampling rates on analog channels
  • Separate fast/slow cycle times: less time-critical data transported at slower rate to reduce CPU/network load
  • Complex high-speed processes controlled with cost-effective standard hardware

Migration Note

All existing X20 I/O modules are compatible with X2X+. To upgrade, only the bus modules (the base/backplane modules) need to be replaced with X2X+-capable versions. The electronic modules (I/O slices) remain the same.

Source: B&R Press Room, “Four times more performance” (2023-01-30) — https://www.br-automation.com/en/about-us/press-room/four-times-more-performance-30-01-2023/


Appendix D: Glossary

TermDefinition
X2X LinkB&R’s proprietary bus protocol for I/O module communication
X2X+Enhanced version of X2X Link with 4× bandwidth (introduced 2023)
Automation StudioB&R’s integrated development environment for programming and configuration
Automation RuntimeB&R’s real-time operating system running on X20/X67 controllers
Bus BaseThe DIN-rail-mounted backplane that holds X20 modules
Bus ModuleThe base module (e.g., X20BM05) that provides power and X2X bus connections
Bus Transmitter (BT)Module (e.g., X20BT9100) that transmits X2X signals from master to remote slaves
Bus Receiver (BR)Module (e.g., X20BR9300) that receives X2X signals and feeds remote I/O stations
Node Number SwitchDIP/rotary switch on bus modules for manual X2X address assignment
mappB&R’s modular application framework (mapp Motion, mapp View, etc.)
POWERLINKB&R’s Ethernet-based real-time protocol for controller-to-controller communication
Task ClassIn Automation Runtime, a cyclically-executed group of programs with a defined cycle time
SG4B&R’s current-generation controller hardware platform

Key Findings

  1. X2X Link is B&R’s proprietary master-slave deterministic serial bus running at 12 Mbps over RS-485 differential signaling. The wire protocol specification has never been publicly released by B&R. Frame format, sync words, CRC polynomial, and bit-level encoding are reconstructed/inferred from hardware documentation and reverse-engineering observations.

  2. Physical layer: remote cable uses M12 B-keyed 5-pin connectors with a critical pin 1 dual-function – the red wire (X2X+) carries both differential data AND +24 VDC power for the remote backplane. When connecting to self-powered devices (IF789, LS189), the red wire must be insulated to prevent short circuits. Termination is 120 ohm at both ends (X20AT6100); measured DC resistance across X2X+/X2X perpendicular should read approximately 60 ohm.

  3. Cycle time is user-configurable from 0.5 ms to 10 ms (default 2 ms). Cycle time must be compatible with task class cycle times (multiples or divisors). At 2 ms cycle, IO refreshes 500 times/second; at 0.5 ms, 2000 times/second. X2X+ (introduced 2023) provides approximately 4x bandwidth (estimated 48 Mbps backplane) but is not compatible with X2X Link in the same segment.

  4. Up to 62 slave nodes per master (X20BT9100 transmitter / X20BR9300 receiver), with a maximum segment length of 100 m. After approximately 30 modules on a single segment, a bus repeater is required. Topology is daisy-chain/multi-drop. Node addressing is via hex rotary DIP switches (0x01-0xFD manual, 0x00 auto-assigned).

  5. Sniffing X2X requires a logic analyzer sampling at >= 100 MS/s (200 MS/s recommended) – at 12 Mbps, one bit period is ~83.3 ns, requiring 4-5 samples per bit minimum. A Saleae Logic 2 Pro 16 (1 GS/s, 83 samples/bit) is adequate; cheaper sigrok clones at 24-100 MS/s are insufficient. Build a passive RS-485 tap board using a high-speed transceiver (SN65HVD1782, MAX1487) with switchable 120 ohm termination.

  6. IO data decoding from raw traffic requires: the Automation Studio IO mapping (node addresses to module types to channel data types), the byte order (little-endian, consistent with x86 B&R CPUs), frame boundary sync patterns, and the CRC algorithm (unknown – trial with CRC-16-CCITT, CRC-16-IBM, CRC-16-MODBUS). Digital IO is bit-packed (8 channels per byte, LSB first); analog values are 16-bit signed/unsigned integers.

  7. LED diagnostic patterns: R-LED steady green = normal operation, single flash = reset/stop mode, double flash = boot mode (do not power off during firmware update), X-LED steady orange = X2X communication active, X-LED off = no X2X communication. Default CPU IP in boot mode is 192.168.1.1.

  8. Idle bus voltage between X2X+ and X2X perpendicular is approximately 2.5 V. When actively transmitting, the differential voltage swing is approximately 1.5-3.0 V (standard RS-485 levels). Shield should be grounded at both ends for best EMC immunity.


This document is compiled from publicly available sources. The X2X Link wire protocol is proprietary to B&R Industrial Automation (ABB). Some protocol details are inferred or reconstructed and should be verified against official documentation if available. No confidential or proprietary protocol specifications were accessed in creating this document.

B&R ETHERNET Powerlink (EPL) — Deep Internals Technical Reference

Scope: Comprehensive technical reference covering the architecture, timing, diagnostics, configuration, and troubleshooting of B&R ETHERNET Powerlink networks.

Standards referenced: EPSG DS 301 (Communication Profile), EPSG DS 302-B (Application Layer), IEC 61158-13, IEC 61784-2, EN 50325-4 (CANopen profiles), ISO 15745-4 (XML device description)


Table of Contents

  1. Architecture Overview
  2. CN / MN State Machine
  3. POWERLINK Cycle Timing
  4. Phase Timing Within a Cycle
  5. Ethernet Hardware Requirements — PHY / MAC
  6. POWERLINK Frame Format
  7. Node Addressing and Identification
  8. PDO Mapping over POWERLINK
  9. SDO Communication
  10. Object Dictionary Layout
  11. Error Handling and Recovery
  12. Capturing and Analyzing EPL Traffic with Wireshark
  13. Identifying Dropped Packets and Timing Violations
  14. POWERLINK Configuration Files (XML Descriptors)
  15. Modifying POWERLINK Parameters Without Automation Studio
  16. Troubleshooting Intermittent Communication Failures
  17. References and Source URLs

1. Architecture Overview

ETHERNET Powerlink is a real-time Ethernet (RTE) communication profile that extends standard IEEE 802.3 Fast Ethernet with deterministic scheduling. It was introduced by B&R (Bernecke+Rainer) in 2001 and was managed by the EPSG (Ethernet POWERLINK Standardization Group) until the EPSG dissolved in 2023. B&R now stewards the technology.

Key facts:

  • Software-based protocol — no proprietary ASICs required
  • Runs on any standard Ethernet silicon (MAC + PHY)
  • Cycle times down to 100 µs with jitter < 1 µs (modern implementations)
  • Up to 240 networked real-time devices per segment
  • International standards: IEC 61158-13, IEC 61784-2, GB/T 27960-2011 (China)
  • CANopen application layer (DS301/DS302) — “CANopen over Ethernet”

1.2 Managing Node (MN) and Controlled Nodes (CN)

RoleDescription
MN (Managing Node)The master. Controls network access via Slot Communication Network Management (SCNM). Sends SoC, PReq, SoA frames. Manages NMT state of all CNs.
CN (Controlled Node)Slaves. Respond to polling with PRes frames. Send ASnd frames when invited. Up to 240 CNs per segment.

Only one MN exists per POWERLINK segment. The MN grants deterministic media access to each CN sequentially — eliminating the CSMA/CD non-determinism of standard Ethernet.

1.3 Physical Topology

POWERLINK operates on standard IEEE 802.3u 100BASE-TX (or 1000 Mbps with EPL Gigabit).

  • Recommended: Repeating hubs (not switches) within the real-time domain — minimizes delay and jitter
  • Switches introduce variable latency due to store-and-forward and queuing
  • Topologies: line, star, tree (any combination)
  • Connectors: RJ-45 (8P8C) and M12 industrial
  • Cabling: IAONA Industrial Ethernet Planning and Installation Guide

Real-time and non-real-time domains are separated. Standard IP routing connects the two.


2. CN / MN State Machine (NMT)

The Network Management (NMT) state machine governs boot-up, configuration, and runtime behavior of every POWERLINK device. The MN controls the states of all CNs by issuing NMT commands and monitoring status.

2.1 NMT States

Each POWERLINK device (both MN and CN) implements the following NMT states:

StateCodeDescription
NMT_Reset_Application0x01Application is reset. Communication parameters return to defaults. Device is not communicating.
NMT_Reset_Communication0x02Communication is reset (comparable to CANopen Reset Communication). Device reinitializes communication parameters but application state may persist.
NMT_Initializing0x03Device is performing its internal initialization routine (hardware self-test, loading defaults). Transient state.
NMT_PreOperational10x04Device has initialized. It can receive SDOs for parameterization and configuration, but does not send or receive PDOs. NMT commands are accepted.
NMT_PreOperational20x05Device has been addressed and partially configured. Configuration Manager sets parameters. Still no cyclic PDO exchange.
NMT_Ready_To_Operate0x06All configuration is complete. Device is ready to enter cyclic data exchange. Waiting for MN command to transition to OPERATIONAL.
NMT_Operational0x07Normal runtime state. Device participates in the isochronous cycle — sends/receives PDOs cyclically.
NMT_Stopped0x08Device has been stopped by NMT command. No PDO exchange. Communication parameters retained. Can be restarted to OPERATIONAL.

2.2 CN State Machine — Transitions

The CN state machine is controlled by the MN through NMT commands sent in ASnd frames:

                    ┌─────────────────────┐
                    │ NMT_Initializing     │
                    └──────────┬──────────┘
                               │ (auto: init complete)
                               ▼
               ┌───────────────────────────────┐
    ┌──────────│ NMT_Reset_Application (0x01)    │◄──────────────────┐
    │          └───────────────┬───────────────┘                   │
    │                          │ (NMT_Reset_Communication cmd)    │ (NMT_Reset_Application
    │                          ▼                                   │  cmd from MN)
    │          ┌───────────────────────────────┐                   │
    │          │ NMT_Reset_Communication (0x02) │◄──────────────────┘
    │          └───────────────┬───────────────┘
    │                          │ (auto: reset complete)
    │                          ▼
    │          ┌───────────────────────────────┐
    │          │ NMT_PreOperational1 (0x04)     │◄── NMT_Reset_Comm cmd
    │          └───────────────┬───────────────┘
    │                          │ (MN assigns nodeID via DNA; configuration starts)
    │                          ▼
    │          ┌───────────────────────────────┐
    │          │ NMT_PreOperational2 (0x05)     │
    │          └───────────────┬───────────────┘
    │                          │ (NMT_EnableReadyToOperate cmd from MN)
    │                          ▼
    │          ┌───────────────────────────────┐
    │          │ NMT_Ready_To_Operate (0x06)    │
    │          └───────────────┬───────────────┘
    │                          │ (NMT_Start_Node cmd from MN)
    │                          ▼
    │          ┌───────────────────────────────┐
    │          │ NMT_Operational (0x07)         │
    │          └──────────┬────────┬───────────┘
    │                     │        │
    │       (NMT_Stop_   │        │ (Error detected:
    │        Node cmd)   │        │  timeout, loss of PRes, etc.)
    │                     ▼        ▼
    │          ┌───────────────────────────────┐
    │          │ NMT_Stopped (0x08)            │
    │          └───────────────┬───────────────┘
    │                          │ (NMT_Start_Node cmd)
    │                          └──────────────► back to Operational
    └───────────────────────────┘ (any error or NMT_Reset cmd returns
                                   to appropriate reset state)

2.3 MN Cycle State Machine

In addition to the NMT state machine, each device has a Cycle State Machine that controls the POWERLINK cycle on the Data Link Layer. The Cycle State Machine is itself controlled by the NMT state machine — it only runs when the NMT state is OPERATIONAL.

The MN Cycle State Machine steps through the cycle phases:

  1. Send SoC (Start of Cycle) — broadcast
  2. Send PReq to CN #1, wait for PRes
  3. Send PReq to CN #2, wait for PRes
  4. … (all configured CNs)
  5. Send SoA (Start of Asynchronous)
  6. Wait for ASnd (from invited CN, if any)
  7. Cycle complete — start next SoC

2.4 Boot-Up Sequence (Observed in Wireshark)

  1. MN enters Operational and begins sending SoC frames
  2. Unconfigured CNs send StatusRequest frames (identifying as node 0xF0 — unaddressed)
  3. MN responds with IdentResponse (IRes) — acknowledges the CN
  4. MN sends DNA (Dynamic Node Allocation) command — assigns a nodeID
  5. MN reads CN’s XDD parameters via SDO
  6. MN configures PDO mapping via SDO
  7. MN issues NMT_EnableReadyToOperate command
  8. CN transitions to Ready_To_Operate
  9. MN issues NMT_Start_Node command
  10. CN transitions to Operational — now participates in cyclic PDO exchange

3.1 Key Parameters

ParameterObject IndexDescription
CycTimeTotal POWERLINK cycle time. The period from one SoC to the next. Configured on the MN.
PresTimeTime reserved for the CN’s PRes response. The MN waits this long for a PRes before declaring a timeout.
SendCycleUsed internally by the MN to schedule the next SoC transmission. The MN’s internal timer target.
AsyncMTUMaximum Transfer Unit for asynchronous phase. Determines how much async data can be sent per cycle. Configurable per-network.
LossOfFrameToleranceNumber of missed PRes responses before the MN declares the CN as lost and triggers error handling.
AsyncTimeoutMaximum time the MN waits for an ASnd response in the async phase.

3.2 Calculating Minimum Cycle Time

From the B&R FAQ, the minimum cycle time is determined by:

Frames per cycle:
  1x SoC          = 64 bytes
  Nx PReq/PRes    = 64 to 1500 bytes each (depends on PDO payload size)
  1x SoA          = 64 bytes
  1x ASnd         = 300 to 1500 bytes (if async data present)

Transmission time = (payload_bytes * 8 + 64) bits * 10 ns/bit
                    (at 100 Mbit/s = 10 ns per bit)

Inter-frame gap  = 960 ns (IEEE 802.3 minimum IFG; ideal target for EPL)

Total CycleTime >= sum of all frame transmission times
                   + all inter-frame gaps
                   + PRes response time per CN (typically 960 ns minimum)

Example calculation for 10 nodes, each with 32 bytes of PDO data:

SoC:               (64 * 8 + 64) * 10 ns  =   5,760 ns
10x PReq:         10 * (64 * 8 + 64) * 10 ns =  57,600 ns
10x PRes:         10 * ((64+32) * 8 + 64) * 10 ns = 96,000 ns
10x IFG (PReq→PRes): 10 * 960 ns = 9,600 ns
SoA:               (64 * 8 + 64) * 10 ns  =   5,760 ns
ASnd (no data):    0 ns (if unused)

Total minimum:  ~174,720 ns ≈ 175 µs

With fewer nodes or smaller payloads, cycle times can reach 100 µs.

3.3 Prescaler and Multiplexed Mode

POWERLINK supports a prescaler mechanism that allows groups of CNs to be polled at different rates:

  • Prescale factor N: A CN with prescaler N is only polled every Nth cycle
  • The SoC frame contains a PS (Prescaled Slot) flag and MC (Multiplexed Cycle Completed) flag
  • This allows combining fast motion axes (polled every cycle) with slow temperature sensors (polled every 10th or 100th cycle)

4. Phase Timing Within a Cycle

The POWERLINK cycle consists of three distinct phases:

|<------------- CycTime (e.g., 200 µs) ----------------->|
|                                                        |
|  Start     |  Isochronous Phase          | Asynchronous |
|  Phase      |                             | Phase       |
|             |                             |             |
|  SoC ──► PReq1──►PRes1 ──► PReq2──►PRes2 ──► ... ──► SoA──►ASnd ──►|
|             |<-- Time Slot 1 -->|<-- TS 2 -->|        |            |
|             |  (CN1 exclusive)  |(CN2 excl.) |        |            |

4.1 Start Phase

  • MN broadcasts a SoC (Start of Cycle) frame to all nodes
  • Destination MAC: broadcast (FF:FF:FF:FF:FF:FF)
  • Contains: NetTime (global network timestamp), RelativeTime, flags
  • All CNs synchronize to this frame — it is the cycle trigger
  • Flags in SoC: PS (Prescaled Slot indicator), MC (Multiplexed Cycle Completed), AN (Asynchronous Needed)

4.2 Isochronous Phase (Real-Time Data Exchange)

During this phase, the MN polls each configured CN sequentially:

  1. MN sends PReq (Poll Request) — unicast to the specific CN’s MAC address

    • Contains: MN’s TX PDO data for that CN
    • Fields: RD (Ready), EA (Exception Acknowledge), MS (Multiplexed Slot), PDOVersion
    • Payload: the process data (PDO) directed to this CN
  2. CN responds with PRes (Poll Response) — multicast to all nodes

    • Contains: CN’s TX PDO data
    • Fields: NMTStatus, RD, PR (Priority), RS (RequestToSend), EN (Exception New)
    • Multicast: All CNs receive this — enabling peer-to-peer producer/consumer communication (a drive can listen to another drive’s PRes without routing through the MN)

Time Slot: Each PReq/PRes pair occupies a dedicated time slot. The MN tracks elapsed time and if PRes is not received within the configured timeout, the CN is marked as having a communication error.

4.3 Asynchronous Phase

After all isochronous slots, the MN sends SoA (Start of Asynchronous):

  • Contains: EPLVersion, NMT status, sync control, svid (service ID), svtg (service target)
  • The SoA frame names which CN is invited to send asynchronous data
  • The invited CN responds with ASnd (Asynchronous Send)
  • ASnd can carry: SDO transfers, NMT commands, NMT responses, status/error information
  • Standard IP-based protocols (TCP, UDP, HTTP, etc.) can be tunneled through ASnd
  • If no async data is needed, the SoA frame alone ends the cycle

4.4 Phase Duration Configuration

  • The isochronous phase duration is determined by: number of CNs × (PReq transmission time + PRes transmission time + inter-frame gap + PRes response time)
  • The asynchronous phase duration is the remainder of CycTime after the isochronous phase
  • If the isochronous phase takes longer than CycTime, the MN cannot maintain the cycle → communication error

5. Ethernet Hardware Requirements — PHY / MAC

POWERLINK’s key design principle: it uses completely standard Ethernet hardware. There is no custom ASIC or modified MAC required. This is what distinguishes POWERLINK from protocols like EtherCAT (which requires a custom EtherCAT slave controller ASIC).

However, several hardware considerations are critical:

5.1.1 Half-Duplex Mode

POWERLINK operates in half-duplex mode within the real-time domain.

  • All frames are broadcast/multicast on a shared segment
  • No switches in the real-time domain — only repeating hubs
  • Switches introduce store-and-forward delay (frame must be fully received before forwarding) and queuing latency — both destroy deterministic timing
  • Hubs simply repeat bits at the PHY level with minimal delay (typically < 1 µs)

5.1.2 Physical Layer

  • 100BASE-TX (100 Mbit/s, twisted pair) — primary specified physical layer
  • 1000 Mbps (Gigabit Ethernet) also supported since 2006
  • Standard Ethernet PHY transceivers are used
  • Auto-negotiation should be disabled or fixed to 100 Mbps half-duplex in the real-time domain
  • Auto-crossover (MDI-X) is acceptable and simplifies cabling

5.1.3 MAC Layer

  • Standard IEEE 802.3 MAC is used
  • The CSMA/CD mechanism is effectively bypassed because POWERLINK’s scheduling ensures only one node transmits at a time — no collisions occur under normal operation
  • The MAC does not need any modification; the scheduling is implemented in software
  • Some implementations use a hardware-assisted “selective forward” mechanism or FPGA-based MAC to reduce software latency (e.g., port PE2MAC IP core, Xilinx solutions)

5.1.4 Network Card Setup for Diagnostics

When capturing traffic with a PC:

  • Set to 100 Mbps, half-duplex
  • Disable all protocols (TCP/IP, Windows File Sharing, etc.) on the capture interface
  • Connect via a hub (not a switch) to see all traffic
  • A switch will only forward unicast traffic to the capture port if the port is the destination, missing all other CNs’ traffic

5.1.5 Hardware Acceleration for CNs

While no custom ASIC is required, many CN implementations use hardware acceleration to meet the strict 960 ns PRes response time requirement:

  • FPGA-based implementations: Xilinx Spartan/Virtex, Altera Cyclone
  • SoC approaches: TI Sitara (AM335x) with PRU-ICSS, NXP i.MX, ARM Cortex with dedicated Ethernet DMA
  • Dedicated communication processors: Hilscher netX, IXXAT, Kunbus

5.2 Frame Timing on the Wire

At 100 Mbps:

  • 1 bit = 10 ns
  • Minimum Ethernet frame = 512 bits (64 bytes) = 5.12 µs (with preamble and IFG)
  • Maximum Ethernet frame = 12,288 bits (1536 bytes with preamble) = 122.88 µs
  • Inter-frame gap (IFG) = 96 bits = 960 ns

For a 64-byte SoC frame:

  • Preamble (8 bytes) + Frame (64 bytes) + FCS (4 bytes) + IFG (12 bytes) = 88 bytes
  • 88 × 8 bits × 10 ns = 7,040 ns ≈ 7 µs

6.1 EtherType

POWERLINK frames use EtherType 0x88AB (registered with IEEE).

This is how a protocol analyzer (Wireshark) distinguishes POWERLINK frames from standard IP traffic.

6.2 Frame Structure

┌──────────────────────────────────────────────────────────────────┐
│ Ethernet Header (14 bytes)                                       │
│ ┌──────────────┬──────────────┬──────────────────────────────┐   │
│ │ Dest MAC (6B)│ Src MAC  (6B)│ EtherType: 0x88AB (2B)       │   │
│ └──────────────┴──────────────┴──────────────────────────────┘   │
├──────────────────────────────────────────────────────────────────┤
│ POWERLINK Header                                                  │
│ ┌──────────────────┬──────────┬──────────┐                       │
│ │ Message Type (1B)│ Src (1B) │ Dest (1B)│                       │
│ └──────────────────┴──────────┴──────────┘                       │
├──────────────────────────────────────────────────────────────────┤
│ Message-specific payload (variable length)                       │
│ SoC: NetTime, RelativeTime, flags                                │
│ PReq/PRes: PDO data, status flags                                │
│ SoA: EPL version, NMT status, service IDs                         │
│ ASnd: SDO commands, NMT commands, status responses               │
├──────────────────────────────────────────────────────────────────┤
│ Ethernet FCS (4 bytes — CRC32)                                   │
└──────────────────────────────────────────────────────────────────┘
TypeNameDirectionDescription
SoCStart of CycleMN → All (broadcast)Cycle synchronization, contains NetTime
PReqPoll RequestMN → CN (unicast)Invites specific CN to send its data
PResPoll ResponseCN → All (multicast)CN’s process data response
SoAStart of AsynchronousMN → CN (unicast)Opens async phase, names invited CN
ASndAsynchronous SendCN → All (multicast)CN’s async data (SDO, status, etc.)
AInvAsync InvitationMulti-ASnd invitation (EPL v2+)

6.4 Destination / Source Fields in the EPL Header

  • Source (epl.src): Node ID of the sending device (1-240, 0xF0 for MN, 0xFF for broadcast)
  • Destination (epl.dest): Node ID of the intended receiver (or broadcast)

Note: The MAC addresses are derived from the nodeID. POWERLINK uses a convention where the last byte of the MAC address encodes the nodeID.


7. Node Addressing and Identification

7.1 Node ID

  • Each POWERLINK device is addressed by an 8-bit Node ID (1 to 240)
  • Node ID 0xF0 is reserved for the MN (Managing Node)
  • Node ID 0xFF is broadcast (all nodes)
  • The Node ID has only local significance within a POWERLINK segment
  • A CN with nodeID 0 (unset) sends StatusRequest frames during boot-up to get assigned an ID

7.2 Dynamic Node Allocation (DNA)

During boot-up, the MN assigns nodeIDs to unconfigured CNs via the DNA (Dynamic Node Allocation) command in an ASnd frame. The DNA command contains:

FieldDescription
currnnCurrent Node Number of the CN (if known)
currmacCurrent MAC address of the CN
newnnNew node number to assign
flagsWhich fields are valid
macCompare current MAC ID flag
cnnCompare current node number flag
nnnSet new node number flag
leasetimeLease time for dynamic allocation
hpmHub Port Mask (for topology-aware setup)

7.3 CN Number

In B&R systems, the “CN number” is the logical number (1, 2, 3…) assigned to each CN in the Automation Studio project. This maps to the POWERLINK nodeID during configuration.

7.4 MAC Address Convention

POWERLINK uses the assigned nodeID to construct the destination MAC for PReq frames. The MAC address format is:

01:01:00:00:00:XX   where XX = NodeID (in hex)

For example:

  • Node 1: 01:01:00:00:00:01
  • Node 10: 01:01:00:00:00:0A
  • Node 240: 01:01:00:00:00:F0
  • MN broadcast: FF:FF:FF:FF:FF:FF

PRes frames use multicast MAC addresses so all CNs can receive them (producer/consumer model).


In CANopen, PDOs are limited to 8 bytes. In POWERLINK, a single PDO can carry up to 1490 bytes of net data (limited by the Ethernet MTU minus headers).

POWERLINK has only one TxPDO per device (since the frame can carry all data in one transmission), unlike CANopen which has up to 4 TPDOs and 4 RPDOs.

8.2 PDO Mapping Objects (Object Dictionary)

Object IndexNameDescription
0x1600RPDO Mapping (Receive)Defines which OD entries are mapped into the Rx PDO (data received from MN)
0x1610 - 0x161FAdditional RPDO MappingsUp to 16 mapping objects (though typically only 0x1600 is used in EPL)
0x1A00TPDO Mapping (Transmit)Defines which OD entries are mapped into the Tx PDO (data sent to MN/CNs)
0x1A10 - 0x1A1FAdditional TPDO MappingsAdditional transmit mapping objects

Each mapping object contains sub-indices:

  • Sub-index 0: Number of mapped objects
  • Sub-index 1..254: Mapping entries (16-bit each)

Each mapping entry encodes:

Bits 15..8: Index of the OD object
Bits  7..0: Sub-index of the OD object

The actual number of bytes per mapped object is determined by the data type of the referenced OD entry (e.g., UNSIGNED16 = 2 bytes, REAL32 = 4 bytes, etc.).

8.3 Static vs. Dynamic Mapping

TypeDescription
Static mappingDefined by the device manufacturer. Cannot be changed by the user. Typical for simple sensors/encoders.
Dynamic mappingConfigured by the user via SDO during network startup. Typical for complex devices like drives.

8.4 PDO Communication Parameters

Object IndexParameterDescription
0x1400 sub0RPDO CommunicationNumber of entries
0x1400 sub1RPDO COB-IDCANopen COB-ID (not used for addressing in EPL, but kept for compatibility)
0x1400 sub2RPDO Transmission Type0-240 (synchronous, send every Nth cycle) or 254/255 (async)
0x1800 sub0TPDO CommunicationNumber of entries
0x1800 sub1TPDO COB-IDCANopen COB-ID for compatibility
0x1800 sub2TPDO Transmission TypeCyclic or event-driven transmission

8.5 PDO Version

The PDOVersion field (epl.preq.pdov / epl.pres.pdov) in PReq/PRes frames indicates whether the PDO mapping has changed. If the MN detects a PDO version mismatch, it may trigger reconfiguration.


9. SDO Communication

9.1 SDO Transfer Mechanisms

SDOs (Service Data Objects) are used for non-time-critical parameter exchange:

  • Configuration during boot-up
  • Reading/writing OD entries at runtime
  • Diagnostic data access

SDOs can be transferred via three mechanisms in POWERLINK:

MechanismDescriptionUse Case
SDO via ASndSDO data embedded directly in ASnd framesMost common; no IP stack needed
SDO via UDP/IPSDO data in standard UDP datagramsAllows access from outside the real-time domain via IP routing
SDO via PDOSDO data embedded in a PDO containerRare; for urgent parameter updates in the isochronous phase

9.2 SDO Protocol Layers

The SDO protocol in POWERLINK has multiple layers (visible in Wireshark):

  1. Command Layer (epl.asnd.sdo.cmd): Initiate read/write, segment, abort

    • command.id: SDO Command ID
    • data.index / data.subindex: OD object reference
    • data.size: Total data size
  2. Sequence Layer (epl.asnd.sdo.seq): Segmentation and flow control

    • send.sequence.number / receive.sequence.number: Sequence counter
    • send.con / receive.con: Confirmation toggle
  3. Fragmentation: Wireshark can reassemble fragmented SDO transfers using the fragment fields

9.3 SDO Abort Codes

SDO transfers can be aborted with a 32-bit abort code (visible in epl.asnd.sdo.cmd.abort.code). Common abort codes include:

  • 0x05040001: Toggle bit not alternated
  • 0x06040000: SDO protocol timeout
  • 0x06040001: Client/server command specifier not valid
  • 0x06040041: SDO blocked by the SDO client
  • 0x06040042: Memory size exceeds SDO block size
  • 0x06060000: Unsupported access to an object
  • 0x06070010: Data type does not match (length error)
  • 0x08000000: General error

10. Object Dictionary Layout

Index RangeAreaDescription
0x0000Not used
0x0001 - 0x001FStatic Data TypesBOOLEAN, INTEGER8, UNSIGNED16, REAL32, VISIBLE_STRING, etc.
0x0020 - 0x003FComplex Data TypesPre-defined structures (records, arrays)
0x0040 - 0x005FManufacturer Specific Complex TypesVendor-defined structures
0x0060 - 0x007FDevice Profile Specific Static TypesProfile-specific data types
0x0080 - 0x009FDevice Profile Specific Complex TypesProfile-specific structures
0x00A0 - 0x03FFReserved
0x0400 - 0x041FPOWERLINK Specific Static Data TypesEPL-specific type definitions
0x0420 - 0x04FFPOWERLINK Specific Complex Data TypesEPL-specific structures
0x0500 - 0x0FFFReserved
0x1000 - 0x1FFFCommunication Profile AreaNMT, PDO, SDO, timing parameters
0x2000 - 0x5FFFManufacturer Specific Profile AreaVendor-specific parameters
0x6000 - 0x9FFFStandardised Device Profile AreaCANopen device profiles (DSP402 drives, etc.)
0xA000 - 0xBFFFStandardised Interface Profile AreaInterface profiles
0xC000 - 0xFFFFReserved

10.2 Key Communication Objects

IndexNameTypeDescription
0x1000Device TypeUNSIGNED32Bitfield identifying device capabilities
0x1001Error RegisterUNSIGNED8Generic error indicator (bitfield)
0x1005COB-ID SYNCUNSIGNED32CANopen compatibility (sync object)
0x1006Communication Cycle PeriodUNSIGNED32NMT_CycleLen_U32 — cycle length in µs
0x1007Synchronous Window LengthUNSIGNED32Window for synchronous PDO transmission
0x1008Manufacturer Device NameVISIBLE_STRINGDevice name string
0x1009Manufacturer Hardware VersionVISIBLE_STRINGHardware version
0x100AManufacturer Software VersionVISIBLE_STRINGSoftware version
0x1010Store ParametersUNSIGNED8Commands to store params to non-volatile memory
0x1011Restore Default ParametersUNSIGNED8Commands to restore factory defaults
0x1017Producer Heartbeat TimeUNSIGNED16Heartbeat time in ms
0x1018Identity ObjectRECORDVendorID, ProductCode, RevisionNo, SerialNo
0x1400+RPDO CommunicationRECORDReceive PDO parameters (COB-ID, type, inhibit, event timer)
0x1600+RPDO MappingRECORDRPDO mapping entries
0x1800+TPDO CommunicationRECORDTransmit PDO parameters
0x1A00+TPDO MappingRECORDTPDO mapping entries
0x1F12NMT Startup ParametersRECORDMN-specific startup configuration
0x1F1xDLL Error CountersRECORDLoss of frame, CRC error, timeout counters

10.3 Identity Object (0x1018)

Sub-indexNameDescription
0NumberOfEntriesNumber of vendor-specific entries (typically 4)
1VendorIDIEEE OUI of the device manufacturer
2ProductCodeManufacturer-specific product code
3RevisionNumberHardware/software revision
4SerialNumberDevice serial number

11. Error Handling and Recovery

11.1 Error Detection Mechanisms

POWERLINK uses multiple layers of error detection:

LayerMechanismDetection
Ethernet PHYSignal Quality Error (SQE), carrier lossPhysical layer issues
Ethernet MACCRC-32 (FCS)Frame corruption from EMI, cabling issues
POWERLINK DLLFrame timeout, sequence monitoringMissed PRes, cycle timing violations
POWERLINK NMTState machine monitoringCommunication loss, CN not responding
SDOAbort codes, sequence number validationTransfer failures, timeout
ApplicationError register (0x1001), error historyDevice-specific errors

11.2 DLL Error Counters

Each POWERLINK device maintains error counters accessible via SDO:

CounterDescriptionTypical Object
LossOfFrameCntNumber of SoC frames not received within expected windowDLL object
CRCErrCntNumber of frames received with CRC/FCS errorsDLL object
TimeoutCntNumber of PReq timeouts (MN) or PRes timeouts (CN)DLL object
InvalidFrameCntNumber of frames with invalid POWERLINK header/formatDLL object
BufferOverflowCntNumber of times a receive buffer overflowedDLL object

B&R devices provide additional Ethernet-level error counters for diagnosing physical network connections (cable and connector quality).

11.3 Timeout Handling

When the MN sends a PReq to a CN and does not receive a PRes within the configured PresTime:

  1. Immediate cycle: The MN marks the slot as “missed” and continues to the next CN
  2. LossOfFrameTolerance: If the CN misses a configurable number of consecutive cycles, the MN declares the CN as lost
  3. CN state transition: The MN may issue an NMT_Stop_Node or NMT_Reset_Command to the affected CN
  4. Error logging: The error is recorded in the MN’s error counters and typically triggers a diagnostic alarm (WCC or mapp alarm in Automation Studio)

11.4 CRC Error Handling

CRC errors are detected at the Ethernet MAC level:

  • The received frame’s FCS does not match the computed CRC-32
  • The frame is discarded — no POWERLINK processing occurs
  • The CRCErrCnt counter is incremented
  • If the corrupted frame was a PRes, the MN treats it as a missed response (same as timeout)
  • Common causes: damaged cables, EMI (variable frequency drives, welding equipment), loose connectors, exceeding cable length limits

11.5 Duplicate Detection

POWERLINK’s sequence layer includes mechanisms to detect duplicate frames:

  • The Sequence Layer (epl.asnd.sdo.seq) maintains SendSequenceNumber and ReceiveSequenceNumber counters
  • Wireshark flags duplicated frames with the epl.asnd.sdo.duplication expert info
  • Invalid sequence values trigger epl.error.value.send.sequence or epl.error.value.receive.sequence errors

11.6 Error Register (0x1001) — Static Error Bitfield

BitMeaning
Bit 0Generic error
Bit 1Current (device drawing excess current)
Bit 2Voltage (supply voltage out of range)
Bit 3Temperature (device temperature out of range)
Bit 4Communication error (EPL-specific)
Bit 5Device Profile Spec (profile-specific error)
Bit 7Manufacturer Spec (vendor-specific error)

11.7 Automatic Recovery

  • CN timeout recovery: After the MN declares a CN as lost, the CN may automatically restart its state machine and attempt to re-join the network (back to PreOperational1)
  • Watchdog: The MN has an internal watchdog timer. If the MN itself fails, all CNs detect loss of SoC frames and enter a safe state (typically Stopped or Reset)
  • Hot-plugging: New CNs can be hot-plugged into a running POWERLINK network. They send StatusRequest frames, get assigned a nodeID via DNA, and go through the full configuration sequence

12. Capturing and Analyzing EPL Traffic with Wireshark

12.1 EPL Protocol Support in Wireshark

Wireshark has built-in POWERLINK (EPL) protocol support since version 1.0.0. No additional plugin is required — the dissector is registered for EtherType 0x88AB.

The dissector is identified by the protocol field epl.

12.2 Hardware Setup for Capture

RequirementDetails
Network InterfaceAny Ethernet NIC (100 Mbps recommended)
Connection MethodConnect PC via a hub (not switch) to see all traffic
Duplex SettingSet NIC to half-duplex, 100 Mbps
Protocol CleanupDisable all protocols (TCP/IP, Client for Microsoft Networks, File and Print Sharing, etc.) on the capture interface to prevent the PC from injecting non-EPL frames
Advanced TipUse B&R X20ET8819 network analysis tool for nanosecond-precision timestamps and hardware-triggered capture

12.3 Wireshark Display Filters

Wireshark provides a comprehensive set of epl.* display filters:

Message type filters:

epl.soc          # Start of Cycle frames
epl.preq         # Poll Request frames
epl.pres         # Poll Response frames
epl.soa          # Start of Asynchronous frames
epl.asnd         # Asynchronous Send frames
epl.ainv         # Async Invitation (Multi-ASnd)

Node filters:

epl.src == 1              # All frames sent by NodeID 1
epl.dest == 1             # All frames addressed to NodeID 1
epl.src == 0xf0           # All frames from the MN

Status and error filters:

epl.pres.stat == 0x07     # PRes with NMT state = Operational
epl.pres.stat == 0x04     # PRes with NMT state = PreOperational1
epl.pres.en == 1           # PRes with Exception New flag set
epl.error                  # Any EPL error expert info
epl.error.payload.length.differs  # Payload length mismatch

SDO filters:

epl.asnd.sdo              # Any SDO transfer
epl.asnd.sdo.cmd.abort     # SDO abort frames
epl.asnd.sdo.cmd.data.index == 0x1006  # SDO access to cycle time object

PDO content visualization: To visualize cyclic user data, add a custom column:

  1. Select a PRes frame
  2. Right-click the “Payload” field
  3. Select “Apply as Column”
  4. Rename to “PRes-Payload”

12.4 Color Rules for Quick Analysis

Define Wireshark coloring rules for quick visual identification:

epl.soc           → Blue    (sync frame)
epl.preq          → Green   (MN polling)
epl.pres          → Orange  (CN response)
epl.soa           → Purple  (async phase start)
epl.asnd          → Brown   (async data)
epl.error         → Red     (errors)

12.5 Sample Captures

Wireshark includes sample EPL captures on the Wireshark Wiki SampleCaptures page:

  • EPLv1 capture: MN and three CNs in operational mode
  • EPLv2 capture: Boot-up of MN and one CN

These are excellent references for learning the frame sequences.

12.6 Practical Capture Workflow

  1. Connect PC to POWERLINK segment via hub
  2. Disable all network protocols on the capture NIC
  3. Start Wireshark, select the capture NIC
  4. Apply a capture filter if needed: ether proto 0x88AB (captures only EPL frames)
  5. Let it run for several cycles (typically 1-2 seconds is enough)
  6. Stop capture, save as pcapng
  7. Sort by “Time” column to see the repeating cycle pattern
  8. Apply display filters to focus on specific nodes or frame types

13. Identifying Dropped Packets and Timing Violations

13.1 Symptoms of Sensor Glitches Caused by EPL Issues

  • Intermittent position/velocity jumps in drives
  • Sporadic sensor readout errors (stale data, wrong values)
  • Unexpected NMT state transitions on CNs (dropping from Operational to Stopped)
  • Watchdog or communication alarms in the PLC

13.2 Identifying Missed PRes in Wireshark

Look for a PReq without a corresponding PRes:

  1. Filter: epl.preq
  2. Examine the time between consecutive PReq frames
  3. If the gap for a PReq→PRes pair is abnormally long (or there’s no PRes between two PReq frames), the CN missed its slot

The MN’s behavior on a missed PRes:

  • The cycle continues to the next CN’s PReq
  • The CN’s error counter increments
  • After LossOfFrameTolerance consecutive misses, the CN is dropped

13.3 Identifying CRC Errors

  1. In Wireshark, look for frames with “Frame check sequence: [incorrect, should be …]” in the Ethernet layer detail
  2. Filter with eth.fcs_bad == 1 (if the NIC reports FCS errors)
  3. Check the DLL error counters via SDO: read the CRCErrCnt object

Note: Many modern NICs strip the FCS before passing frames to the operating system, so CRC errors may not be visible in Wireshark. Use the device’s internal error counters instead, or use a network analyzer that preserves FCS (like B&R X20ET8819).

13.4 Cycle Timing Violations

To verify cycle timing in Wireshark:

  1. Filter: epl.soc
  2. Examine the time delta between consecutive SoC frames
  3. Compare against the configured CycTime
  4. If the delta varies significantly (> 10% of CycTime), there may be:
    • Too many CNs for the configured cycle time
    • Async phase taking too long
    • NIC/driver latency on the capture PC

Important: PC-based timestamps are inherently inaccurate for sub-microsecond measurements. For precise jitter analysis, use hardware-based network analyzers.

13.5 Frame Sequence Errors

If the frame order appears wrong in a capture:

  • This is almost always a capture artifact (PC NIC buffer timing, OS scheduling)
  • Connect the PC via a hub (not switch)
  • Disable all protocols on the capture NIC
  • Use hardware-based capture for definitive results

The MN itself handles frame timing with much tighter tolerances than a PC can observe.


14.1 XDD — XML Device Description File

Every POWERLINK CN is described by an XDD (XML Device Description) file. This is standardized per ISO 15745-4 and EPSG DS311.

The XDD file contains:

  • VendorID, ProductCode, RevisionNo — device identity
  • Object Dictionary — all OD entries with index, sub-index, data type, access rights, defaults
  • PDO mapping — default TPDO/RPDO mapping entries
  • Device profile — profile-specific parameters (e.g., DSP402 for drives)
  • EPLVersion — supported POWERLINK version
  • Feature flags — isochronous support, SDO by UDP/IP, dynamic PDO mapping, multiplexing, etc.

Format:

<?xml version="1.0" encoding="UTF-8"?>
<ISO15745ProfileContainer>
  <ISO15745Profile>
    <ProfileBody>
      <ApplicationLayers>
        <DeviceProfileClass>
          <ProfileBody>
            <ISO15745ProfileContainer ...>
              <!-- Object Dictionary entries -->
            </ISO15745ProfileContainer>
          </ProfileBody>
        </DeviceProfileClass>
      </ApplicationLayers>
    </ProfileBody>
    <ProfileHeader>...</ProfileHeader>
  </ISO15745Profile>
</ISO15745ProfileContainer>

14.2 XDC — XML Device Configuration File

After network configuration is complete in Automation Studio, a build process generates an XDC file for each CN. The XDC file is the configured version of the XDD — it contains the actual parameter values (PDO mapping, nodeID, cycle parameters) as configured in the project.

The XDC is used by:

  • The MN at runtime to know how to configure each CN
  • openCONFIGURATOR or other tools for network setup
  • Third-party integration tools

14.3 CDC — Configuration Description File

The MN’s configuration is stored in a CDC file. This is generated by the network configuration tool (Automation Studio, openCONFIGURATOR, or CODESYS) and contains:

  • All CN configurations
  • Node IDs
  • PDO mappings
  • Cycle time parameters
  • Prescaler assignments
  • Asynchronous MTU

14.4 Configuration Files on the CF Card

On B&R PLCs, the POWERLINK configuration is deployed to the Compact Flash (or SD) card as part of the Automation Studio project:

/Synchronize/
  └── <ProjectName>/
       ├── Config.prc
       ├── <MN_Interface>.cfg
       └── Powerlink/
            ├── MN_Configuration.xml (or .cdc)
            ├── CN1_Configuration.xdc
            ├── CN2_Configuration.xdc
            ├── ...
            └── CNn_Configuration.xdc

The exact file structure may vary by Automation Runtime version. The MN reads these configuration files at startup to configure the POWERLINK network.

14.5 ETS/EDS — Legacy CANopen Device Description

Some legacy devices may provide EDS files (CANopen Electronic Data Sheet format). These can be imported into Automation Studio or openCONFIGURATOR, which converts them into XDD/XDC format for POWERLINK use.


15. Modifying POWERLINK Parameters Without Automation Studio

15.1 Via SDO Access

Since POWERLINK uses CANopen’s object dictionary, any OD entry can be read or written via SDO:

Using openCONFIGURATOR:

  • Import the XDD files for all devices
  • Configure the network visually (node IDs, PDO mapping, cycle time)
  • Generate the CDC configuration file
  • Deploy to the MN

Using B&R tools:

  • The B&R Automation Studio “Physical View” allows direct configuration of the POWERLINK interface parameters
  • Configuration is compiled into the project and deployed on next download

The OPC UA companion specification (OPC-30110) provides direct access to the POWERLINK Object Dictionary from any OPC UA client. This allows:

  • Reading/writing OD entries without Automation Studio
  • Diagnostic access from standard HMI/SCADA systems
  • Configuration changes at runtime

15.3 Via Network Trace Tools (Read-Only)

You can observe but not modify parameters via Wireshark by examining:

  • SDO write commands during boot-up (epl.asnd.sdo.cmd.write.by.index)
  • NMT commands (epl.asnd.nmtcommand)
  • PDO mapping configuration SDOs

For developers using the openPOWERLINK stack, parameters are modified via the API:

// Example: Read/write OD entry
tOplkError oplk_readObject(UINT16 index_p, UINT8 subIndex_p,
                            tPlkDataType *pDataType_p, void *pDstData_p, UINT16 *pSize_p);
tOplkError oplk_writeObject(UINT16 index_p, UINT8 subIndex_p,
                             tPlkDataType dataType_p, UINT16 dataSize_p, const void *pSrcData_p);

15.5 Direct File Editing (Advanced)

On B&R systems, the XDC/CDC configuration files on the CF card are XML files that can theoretically be edited directly. However:

  • This is NOT recommended by B&R and may void support
  • The MN may verify file integrity (checksums, signatures)
  • Incorrect edits can cause the network to fail to start
  • Always back up the original files before modification

If you must edit offline, use a validated XML editor and check against the DS311/XDD schema.


16. Troubleshooting Intermittent Communication Failures

16.1 Systematic Troubleshooting Checklist

Layer 1 — Physical Layer

  • Verify all cable lengths are within 100 m (Cat5) specification
  • Check for damaged cables, kinks, sharp bends, crushed sections
  • Inspect RJ-45 connectors for oxidation, bent pins, poor crimps
  • Ensure proper grounding and shielding (use industrial-grade cable)
  • Check for EMI sources near cables (VFDs, welding, power cables)
  • Verify hub port LEDs show consistent link activity
  • Separate POWERLINK cables from high-power cables

Layer 2 — Ethernet / MAC

  • Verify half-duplex mode on all devices (no duplex mismatch)
  • Confirm all devices are at 100 Mbps (no speed mismatch)
  • Check Ethernet error counters: CRC errors, frame alignment errors, collisions
  • Verify no switches in the real-time domain (only hubs)
  • Check for broadcast storms from non-EPL sources
  • Read DLL error counters from all devices via SDO
  • Check LossOfFrameCnt — if incrementing, SoC is not arriving consistently
  • Check CRCErrCnt — if incrementing, physical layer issue
  • Check TimeoutCnt — if incrementing, CNs are too slow or cycle time too short
  • Check NMT state of all CNs (should be 0x07 = Operational)
  • Look for CNs dropping to Stopped (0x08) or lower states
  • Check PLC alarm log for POWERLINK errors (WCC_WATCHDOG, mnuErrorStat)
  • Verify all CNs completed boot-up and configuration successfully

Layer 5 — Application / Configuration

  • Verify PDO mapping is correct (no mismatch between MN expectation and CN configuration)
  • Verify CycTime is long enough for all nodes and their data payloads
  • Check async MTU is sufficient for async traffic requirements
  • Verify node IDs are unique and correct

16.2 Common Root Causes of Intermittent Failures

SymptomLikely Root CauseDiagnostic
Random sensor glitchesCycle time too short for number of nodesCalculate minimum cycle time; increase CycTime
One CN periodically drops outCabling issue to that CN; loose connectorSwap cable; check CRC error counters
All CNs drop simultaneouslyHub failure; MN issue; power supplyCheck MN health; try different hub
Delay increases over timeHub port overheating; cable degradationMonitor over time; replace hub
CNs fail after firmware updateXDC mismatch; PDO version changeRegenerate XDC; clear MN configuration cache
Only during certain machine statesEMI from actuators (VFDs, solenoids)Route cables away from EMI sources; use shielded cable
Occurs when adding new nodesCycTime exceeded; too much dataReduce PDO payload or increase CycTime
Sporadic, cannot reproduceOS jitter on MN (Windows-based MN); hardware timingUse Linux-based MN; check MN CPU load

16.3 Network Diagnostic Tools

ToolCapabilityNotes
WiresharkFree; captures and decodes EPL framesTimestamps limited by OS; best via hub
OmniPeak (Savvius)Commercial; similar to WiresharkBetter filtering and analysis
B&R X20ET8819Hardware analyzer; nanosecond timestamps; trigger inputsMost precise; can capture sporadic errors via DI trigger
B&R Automation Studio DiagnosticsOnline monitoring of error counters, NMT statesBuilt-in to B&R PLC runtime
openCONFIGURATORNetwork configuration and diagnosticsOpen-source; SourceForge

16.4 B&R PLC Diagnostic Approach

  1. Check the PLC alarm log (System → Diagnostics in Automation Studio or web interface)
  2. Look for POWERLINK-specific alarms: WCC_WATCHDOG, mnuErrorStat, plkErrorState
  3. Use the POWERLINK library diagnostic FBs (e.g., MC_Powerlink_STATE, MC_Powerlink_DIAG)
  4. Read error counters from the MN and each CN via SDO or OPC UA
  5. If the PLC log shows specific nodeIDs failing, focus on those CNs

16.5 Advanced: EPL-Viz

EPL-Viz is a visualization tool for Ethernet POWERLINK networks that provides:

  • Network state monitoring
  • Cycle timing analysis
  • Error pattern detection
  • Timeline visualization

Available at: https://epl-viz.github.io/


Cross-References


17. References and Source URLs

Official Specifications (EPSG / B&R)

DocumentURL
EPSG DS 301 V1.5.1 — Communication Profile Specificationhttps://br-cws-assets.de-fra-1.linodeobjects.com/EPSG_301_V-1-5-1_DS-c710608e.pdf
EPSG DS 302-B V1.1.1 — NMT State Machine, MN/CN Cycle Stateshttps://br-cws-assets.de-fra-1.linodeobjects.com/EPSG_302-B_V-1-1-1_DS-39befa02.pdf
EPSG DS 310 V1.0.10 — CN State Transitionshttps://www.br-automation.com/fileadmin/EPSG_310_V-1-0-10_DS-pdf-b9da88aa.pdf
B&R POWERLINK FAQhttps://www.br-automation.com/en-us/technologies/powerlink/faq/
B&R TM950 — POWERLINK Configuration and Diagnosticshttps://www.br-automation.com/en/academy/classroom-training/training-modules/connectivity/tm950-powerlink-configuration-and-diagnostics/
DocumentURL
OPC-30110 — General Informationhttps://reference.opcfoundation.org/specs/OPC-30110/4
OPC-30110 — Terms, Definitions, Conventionshttps://reference.opcfoundation.org/specs/OPC-30110/3

Wireshark Resources

ResourceURL
Wireshark EPL Display Filter Referencehttps://www.wireshark.org/docs/dfref/e/epl.html
B&R Community — Diagnosis of POWERLINK Networks Using Wiresharkhttps://community.br-automation.com/t/diagnosis-of-powerlink-networks-using-wireshark/3648
Wireshark Sample Captures (EPL)https://wiki.wireshark.org/samplecaptures
ResourceURL
openPOWERLINK V2 (GitHub)https://github.com/OpenAutomationTechnologies/openPOWERLINK_V2
openPOWERLINK (SourceForge)https://sourceforge.net/projects/openpowerlink/
openCONFIGURATORhttps://sourceforge.net/projects/openconf/

Using openPOWERLINK for POWERLINK protocol analysis on Linux: The openPOWERLINK stack implements both MN (master) and CN (slave) roles and runs on standard Linux with either user-space or kernel-space (via Xenomai or PREEMPT_RT) execution. For diagnostic purposes, you can:

  1. Build a POWERLINK CN (slave) on a Linux PC that joins the B&R POWERLINK network, allowing you to receive and log all PDO data from the MN in real-time without needing Wireshark.
  2. Use the openPOWERLINK MN (master) on Linux to independently poll all CNs on the network, verifying node addressing and identifying nodes that the B&R MN may not be communicating with.
  3. Capture raw POWERLINK frames at the application layer using openPOWERLINK’s event/callback system, which provides decoded frame data (SoC, PReq, PRes, SoA, ASnd) — more structured than raw Wireshark captures.

The stack is BSD-licensed and supports Linux, Windows, and Xilinx/Altera FPGAs. See the GitHub README for build instructions. This is an advanced technique for complex multi-node POWERLINK diagnostics where Wireshark capture alone is insufficient. See io-sniffing.md for the full fieldbus sniffing methodology.

Hardware and Implementation

ResourceURL
port GmbH — POWERLINK Productshttps://www.port.de/en/products/ethernet-powerlink.html
port PE2MAC IP Corehttps://www.port.de/fileadmin/user_upload/Dateien_IST_fuer_Migration/Produktbilder/pe2mac_e.pdf
Xilinx Ethernet POWERLINK Solutionhttps://www.xilinx.com/publications/prod_mktg/Ethernet_Powerlink_ssht.pdf
POWERLINK on TI Sitara ProcessorsTexas Instruments Application Report SPRY275A
Hilscher POWERLINK Controlled Node APIhttps://www.hilscher.com/fileadmin/cms_upload/de/Resources/pdf/POWERLINK_Controlled_Node_V3_Protocol_API_05_EN.pdf
EPL-Viz Visualization Toolhttps://epl-viz.github.io/

Community and Knowledge Base

ResourceURL
B&R Community Forumhttps://community.br-automation.com/
SEW-Eurodrive POWERLINK Basicshttps://download.sew-eurodrive.com/download/html/31550045/en-EN/3139678618731399154827.html
CAN/CiA — CANopen on Real-Time Ethernethttps://www.can-cia.org/fileadmin/cia/documents/proceedings/2005_a_pfeiffer.pdf
Ethernet Powerlink — Wikipediahttps://en.wikipedia.org/wiki/Ethernet_Powerlink

Configuration File Tools

ResourceURL
XDD Tool Suite (Eclipse Marketplace)https://marketplace.eclipse.org/content/ethernet-powerlink-xdd-tool-suite
POWERLINK Configuration Editor (CODESYS)https://us.store.codesys.com/media/n98_media_assets/files/n98_media_assets/files/p/r/product_datasheet_powerlink_en.pdf

B&R Configuration Guides

ResourceURL
B&R CRA Guide for POWERLINKhttps://br-cws-assets.de-fra-1.linodeobjects.com/BR_CRA-Guide-2026-b4951272.pdf
ABB — Generic Drive Interface with B&R PLC and EPLhttps://library.e.abb.com/public/1473b3a7347d4c338a2d8dcc2d663f12/AN00264_Generic_drive_interface_BanR_PLC_with_EPL_Rev_A_EN.pdf

Key Findings

  1. POWERLINK is a software-based real-time Ethernet protocol requiring no proprietary ASICs – it runs on any standard 100BASE-TX Ethernet MAC/PHY silicon. The MN (Managing Node) controls media access via Slot Communication Network Management (SCNM), granting deterministic time slots to each CN (Controlled Node). Cycle times down to 100 us with jitter < 1 us are achievable; up to 240 CNs per segment are supported.

  2. The POWERLINK cycle has three phases: Start Phase (SoC broadcast with NetTime), Isochronous Phase (sequential PReq/PRes polling of each CN), and Asynchronous Phase (SoA + ASnd for SDO, NMT, diagnostics, and tunneled IP traffic). If the isochronous phase exceeds CycTime, the MN cannot maintain the cycle and triggers a communication error.

  3. Minimum cycle time calculation: each PReq/PRes pair adds (payload_bytes * 8 + 64) * 10 ns transmission time plus 960 ns inter-frame gap. For 10 nodes with 32 bytes PDO each, the minimum is approximately 175 us. The Prescaler mechanism allows polling different CN groups at different rates (e.g., every Nth cycle for slow sensors).

  4. The CANopen application layer means PDO mapping objects (0x1400/0x1600 for RPDO, 0x1800/0x1A00 for TPDO) and SDO communication (abort codes, sequence layers) work identically to CANopen over CAN. The object dictionary structure (0x1000-0x1FFF communication area, 0x6000-0x9FFF device profiles) is standard CiA DS301.

  5. Wireshark capture setup: connect a PC NIC directly to the POWERLINK hub (not switch), deactivate TCP/IP on the capture interface, set half-duplex 100 Mbps. Key display filters: epl.service_type == "PRes" for IO data, epl.service_type == "ASnd" for configuration/diagnostics, epl.src == <NodeID> to isolate a specific station.

  6. Error handling uses multiple layers: Ethernet CRC-32 (FCS) for frame corruption, DLL error counters (LossOfFrameCnt, CRCErrCnt, TimeoutCnt, InvalidFrameCnt, BufferOverflowCnt accessible via SDO), and NMT state machine transitions. When a CN misses the configurable LossOfFrameTolerance consecutive cycles, the MN declares it lost and issues NMT_Stop_Node.

  7. The MN boot-up sequence visible in Wireshark: unconfigured CNs send StatusRequest (node 0xF0), MN responds with IdentResponse, assigns nodeID via DNA, reads XDD parameters via SDO, configures PDO mapping, issues NMT_EnableReadyToOperate, then NMT_Start_Node to enter Operational state.

  8. Intermittent POWERLINK failures are most commonly caused by: damaged cables/loose connectors (CRC errors), EMI from VFDs/welders, exceeding 100 m cable length limit, switches introducing variable latency (use hubs instead), and bus overload (isochronous phase exceeding CycTime). Monitor DLL error counters to distinguish physical-layer errors from timing violations.


Document compiled from official EPSG specifications, B&R documentation, OPC Foundation companion specifications, Wireshark dissector documentation, openPOWERLINK source code references, community knowledge base posts, and hardware vendor application notes.

B&R X20IF2772 CAN Bus Module — Comprehensive Technical Reference

The X20IF2772 is B&R’s CAN bus interface module for the X20 system, implementing CANopen over CAN 2.0B. On legacy machines, CANopen networks often connect sensors, actuators, third-party devices, and subsystems that are critical to machine operation but poorly documented. This document covers the IF2772 hardware specifications, CANopen protocol stack implementation on B&R, PDO/SDO mapping, CAN identifier assignment, hardware-level CAN bus sniffing with tools like PCAN and Vector CANalyzer, and how to decode sensor data from raw CAN messages to diagnose field-level problems. Cross-references: io-card-hardware.md for IO card hardware architecture, physical-layer-sniffing.md for physical-layer CAN probing techniques, and io-sniffing.md for general fieldbus sniffing approaches.

Table of Contents

  1. IF2772 Module Specifications
  2. CANopen on B&R: Protocol Stack Implementation
  3. PDO/SDO Mapping on B&R CAN Modules
  4. CAN Identifier Assignment
  5. Bit Timing Configuration
  6. Hardware CAN Bus Sniffing
  7. SocketCAN on Linux
  8. Decoding Sensor Data from CAN Messages
  9. CANopen Error Handling
  10. IF2772 Configuration Parameters (Object Dictionary)
  11. Setting Up CANopen on B&R Without the Original Project
  12. Common CAN Bus Problems and Diagnostic Procedures
  13. Wiring and Termination Requirements
  14. CAN Analysis Tools Comparison

1. IF2772 Module Specifications

Module Overview

The B&R X20IF2772 is a dual CAN bus interface module for the B&R X20 I/O system. It provides application-specific expansion of X20 controllers via two independent, electrically isolated CAN bus interfaces, each capable of up to 1 Mbit/s.

Order number: X20IF2772 B&R ID code: 0x1F25 (decimal 7973)

Key Hardware Specifications

ParameterValue
CAN Interfaces2 (IF1 and IF2)
CAN ControllerSJA1000 (NXP/Philips — standalone CAN controller)
Max Transfer Rate1 Mbit/s per interface
Max Bus Distance1000 m (at lower baud rates; ~40 m at 1 Mbit/s)
CAN ID Format11-bit standard; does NOT support CAN RTR with 29-bit extended IDs
Connectors2x 5-pin multipoint male connector (order terminal block TB2105 separately)
Terminating ResistorsIntegrated, individually switchable per interface
Electrical IsolationPLC isolated from CAN (IF1 and IF2); interfaces isolated from each other
Power Consumption1.2 W
Node Addressing2 hex rotary DIP switches (shared for both interfaces)
Operating Temperature-25 to +60°C (horizontal), -25 to +50°C (vertical)
Storage Temperature-40 to +85°C
Protection RatingIP20

Connector Pinout (both IF1 and IF2)

PinFunction
1CAN_GND — CAN ground
2CAN_L — CAN low (dominant low)
3SHLD — Shield
4CAN_H — CAN high (dominant high)
5NC — Not connected

Required accessory terminal blocks:

  • 0TB2105.9010 — screw clamp, 2.5 mm²
  • 0TB2105.9110 — push-in, 2.5 mm²

LED Status Indicators

LEDColorMeaning
STATUSGreen (on)Interface module active
STATUSRed (on)Controller is starting up
TxD CAN 1Yellow (on)Module transmitting on IF1
TxD CAN 2Yellow (on)Module transmitting on IF2
TERM CAN 1Yellow (on)Integrated terminating resistor active on IF1
TERM CAN 2Yellow (on)Integrated terminating resistor active on IF2

Certifications

CE, UKCA, ATEX Zone 2 (II 3G Ex nA nC IIA T5 Gc), cULus, DNV, CCS, LR, KR, ABS, BV, KC.

Supported CANopen Features

  • CANopen master operation (configurable in Automation Studio 3.0+)
  • NMT master/slave functionality
  • PDO (TPDO and RPDO) communication
  • SDO (client and server) for configuration
  • SYNC object generation/consumption
  • EMCY (Emergency) object support
  • Heartbeat producer/consumer
  • EDS file-based device configuration
  • DTM (Device Type Manager) configuration mode

Limitations: The module does NOT support CAN RTR messages with extended CAN identifiers (29-bit) due to memory/performance constraints of the SJA1000 controller. Standard 11-bit identifiers work fully.

Module Specifications Sources

  • B&R X20IF2772 datasheet V2.30: https://docs.rs-online.com/5f80/A700000013921576.pdf
  • B&R product page: https://www.br-automation.com/en-us/products/io-systems/x20-system/x20-interface-module-communication/x20if2772/
  • Automation Distribution: https://automationdistribution.com/b-r-x20if2772-x20-interface-can-can/

2. CANopen on B&R: Protocol Stack Implementation

Architecture

B&R’s CANopen implementation on the X20 platform is integrated into the Automation Studio development environment and runs on the X20 controller (CPU). The CANopen protocol stack runs as a system-level service managed by the controller’s firmware, not on the IF2772 module itself. The IF2772 provides the physical CAN bus interface (SJA1000 CAN controller + transceiver), while the protocol processing occurs in the controller.

B&R CANopen Module Family

ModuleFunctionNotes
X20IF1041-1CANopen MasterDTM configuration, 1 CAN interface, 8 MB SDRAM
X20IF1043-1CANopen Slave (DTM)1 CANopen slave interface
X20IF10E3-1CANopen SlaveSimilar slave variant
X20IF27722x CAN (generic)Dual CAN, configurable as CANopen master in AS 3.0+
X20IF1063CAN bus (X2X Link + CAN)Hybrid module

The IF2772 differs from the IF1041-1 in that it has two CAN interfaces and was originally designed as a generic CAN bus module. CANopen master capability was added via firmware/Automation Studio support starting with Automation Studio 3.0.

Configuration Methods

B&R supports two primary configuration approaches for CANopen:

  1. DTM (Device Type Manager) Configuration

    • Import EDS (Electronic Data Sheet) files for each slave device
    • Drag-and-drop configuration in Automation Studio’s hardware tree
    • Graphical PDO mapping via the DTM interface
    • Recommended for most applications
  2. Programmatic (ArCAN Library) Configuration

    • Use B&R’s AsCAN / AsArCAN library in Automation Studio
    • Configure PDOs, SDOs, and node parameters via structured data types in IEC code
    • Necessary when no EDS file is available or for custom/raw CAN communication
    • Provides full control over CAN identifiers and timing

B&R CANopen in Automation Studio

  1. Add the X20IF2772 module to the hardware tree
  2. Right-click the CAN interface and select “CANopen (DTM)”
  3. Import slave device EDS files via Tools → Manage 3rd Party Devices or drag from Hardware Catalog
  4. Configure PDO mappings, node IDs, and baud rates
  5. The firmware is part of the Automation Studio project and is automatically loaded to the module

CANopen Protocol Sources

  • B&R CANopen products: https://www.br-automation.com/en-us/products/network-and-fieldbus-modules/canopen/
  • B&R Community — CANopen over X20IF2772: https://community.br-automation.com/t/canopen-communication-over-x20if2772/6000
  • B&R Community — CANopen trace guide: https://community.br-automation.com/t/how-to-trace-description-guide-canopen/4929
  • CiA CANopen knowledge: https://www.can-cia.org/can-knowledge/canopen

3. PDO/SDO Mapping on B&R CAN Modules

PDO (Process Data Object) Overview

PDOs are single CAN frames (up to 8 bytes in CAN 2.0B) used for time-critical, real-time process data exchange. They are broadcast without acknowledgment — no confirmation or retry.

Two types:

  • TPDO (Transmit PDO): Device sends data to the bus (e.g., sensor reading, status)
  • RPDO (Receive PDO): Device receives data from the bus (e.g., setpoint, command)

PDO Communication Parameter Objects

Object IndexPurpose
1400h–15FFhRPDO communication parameters (up to 512 RPDOs)
1800h–19FFhTPDO communication parameters (up to 512 TPDOs)

Each PDO communication record contains:

  • Sub 0: Highest sub-index supported
  • Sub 1: COB-ID (11-bit CAN identifier + validity bit 31)
  • Sub 2: Transmission type (0–255)
  • Sub 3: Inhibit time (minimum interval between transmissions, in 100 µs units)
  • Sub 5: Event timer (periodic transmission in ms)

PDO Mapping Parameter Objects

Object IndexPurpose
1600h–17FFhRPDO mapping parameters
1A00h–1BFFhTPDO mapping parameters

Each mapping record contains up to 64-bit (8 bytes) of mapped objects:

  • Sub 0: Number of mapped objects
  • Sub 1..N: Mapped object = [31:24] sub-index, [23:16] byte length, [15:0] object index

PDO Mapping Procedure (Standard CiA 301)

  1. Invalidate PDO: Set bit 31 of the COB-ID entry (sub-index 1) to 1
  2. Clear mapping: Write 0x00 to sub-index 0 of the mapping object
  3. Write new mapping: Write each object mapping to sub-indices 1, 2, 3…
  4. Validate mapping: Set sub-index 0 to the number of mapped objects
  5. Re-enable PDO: Clear bit 31 of the COB-ID entry

SDO (Service Data Object) Overview

SDOs are used for configuration and parameter access. They use a client-server model with confirmed communication (request/response). An SDO transfer requires multiple CAN frames:

  • Client → Server (SDO Download): Initiator writes to a remote OD entry
  • Server → Client (SDO Upload): Initiator reads from a remote OD entry

SDO CAN IDs default to:

  • Rx SDO (Client to Server): 0x600 + Node-ID
  • Tx SDO (Server to Client): 0x580 + Node-ID

B&R-Specific PDO Behavior

Important: B&R controllers may not use the PDO channel mappings defined in the EDS file for all objects. B&R’s default PDO mapping in Automation Studio can differ from what the EDS file specifies. When configuring PDOs on a B&R CANopen master:

  1. Always verify the actual PDO mapping in Automation Studio after importing the EDS
  2. Check which objects are actually mapped in the generated configuration
  3. Use the DTM interface to visually confirm mapping before deployment
  4. If the EDS defines objects that aren’t mapped, use the ArCAN library to add custom mappings programmatically

PDO Transmission Types

TypeDescription
0Synchronous, acyclic (transmit after next SYNC)
1–240Synchronous, cyclic (transmit every N-th SYNC)
241–251Reserved
252–255Event-driven, asynchronous (manufacturer-specific)
255Asynchronous (device-internal event triggers)

PDO/SDO Mapping Sources

  • CiA PDO protocol: https://www.can-cia.org/can-knowledge/pdo-protocol-1
  • CiA CANopen tutorial: https://www.csselectronics.com/pages/canopen-tutorial-simple-intro
  • B&R PDO mapping (non-EDS): https://industrialmonitordirect.com/blogs/knowledgebase/br-canopen-pdo-mapping-not-using-eds-file-definitions
  • B&R Community — CANopen help: https://community.br-automation.com/t/help-with-canopen-communication-using-x20if1041-1/5158

4. CAN Identifier Assignment

CANopen Default COB-ID Scheme

CANopen uses 11-bit CAN identifiers (COB-IDs) assigned according to a function-code-based scheme:

COB-ID = (Function Code × 0x80) + Node-ID

where Node-ID ranges from 1 to 127.

Default CANopen COB-ID Table

FunctionCOB-ID BaseFormulaDirection
NMT Module Control0x0000x000 + Node-IDMaster → Slave
SYNC0x080Fixed (broadcast)Master → All
EMCY (Emergency)0x0800x080 + Node-IDSlave → Master
TIME STAMP0x100Fixed (broadcast)Producer → All
TPDO10x1800x180 + Node-IDSlave → Bus
RPDO10x2000x200 + Node-IDBus → Slave
TPDO20x2800x280 + Node-IDSlave → Bus
RPDO20x3000x300 + Node-IDBus → Slave
TPDO30x3800x380 + Node-IDSlave → Bus
RPDO30x4000x400 + Node-IDBus → Slave
TPDO40x4800x480 + Node-IDSlave → Bus
RPDO40x5000x500 + Node-IDBus → Slave
SDO Tx (Server→Client)0x5800x580 + Node-IDSlave → Client
SDO Rx (Client→Server)0x6000x600 + Node-IDClient → Slave
HEARTBEAT0x7000x700 + Node-IDProducer → All
LSS (Layer Setting Service)0x7E5FixedConfiguration

B&R IF2772 Node Addressing

The IF2772 uses two hex rotary switches to set the node number. Both CAN interfaces share the same node number (switches are per-module, not per-interface).

  • Valid node IDs: 1–127
  • Node ID 0 is reserved for NMT commands (cannot be assigned to a physical node)

Customizing CAN Identifiers

CANopen allows COB-ID customization through the object dictionary:

  1. NMT state must be Pre-operational or Operational (for some devices)
  2. Write new COB-ID to the PDO communication parameter (index 1400h–19FFh, sub-index 1)
  3. Bit 31 of the COB-ID: 0 = PDO valid, 1 = PDO invalid
  4. Bit 30: 0 = PDO is mapped to the CANopen default COB-ID range, 1 = PDO uses the full 11-bit range (0x000–0x7FF)

When using the B&R ArCAN library, COB-IDs can be assigned directly in structured data types without relying on the default formula.

CAN Identifier Sources

  • CiA identifier usage: https://www.microcontrol.net/wp-content/uploads/2021/10/td-03011e.pdf
  • Renesas CANopen manual: https://www.renesas.com/en/document/mas/canopen-library-user-manual
  • CSS Electronics CANopen intro: https://www.csselectronics.com/pages/canopen-tutorial-simple-intro

5. Bit Timing Configuration

Timing Overview

The SJA1000 CAN controller on the IF2772 uses bit timing registers (BTR0 and BTR1) to configure baud rate, sampling point, and synchronization jump width. In B&R’s Automation Studio, these are abstracted — you select a baud rate and the firmware calculates the register values.

Standard CANopen Baud Rates (CiA 301)

Baud RateTypical Bus LengthBit Time (Tq total)Typical Prescaler
10 kbit/s5000 m500 TqConfigurable
20 kbit/s2500 m250 TqConfigurable
50 kbit/s1000 m100 TqConfigurable
125 kbit/s500 m16–20 TqCommon in industrial
250 kbit/s250 m16–20 TqCommon default
500 kbit/s100 m16–20 TqHigh performance
800 kbit/s50 m16 TqSpecialized
1000 kbit/s40 m16 TqMaximum for CAN 2.0B

Bit Timing Parameters

A CAN bit is divided into Time Quanta (Tq) segments:

| SYNC_SEG | TIME_SEG1 | TIME_SEG2 |
|   1 Tq   |  1..16 Tq |  1..8 Tq  |
  • SYNC_SEG: Always 1 Tq — synchronizes nodes on the bus
  • TIME_SEG1: Propagation segment + Phase Buffer Segment 1
  • TIME_SEG2: Phase Buffer Segment 2
  • SJW (Synchronization Jump Width): 1..4 Tq — how much a node can resynchronize per bit

Sampling Point

The sampling point is where the CAN controller samples the bus level to determine bit value:

Sampling Point (%) = (1 + TIME_SEG1) / (1 + TIME_SEG1 + TIME_SEG2) × 100

Recommended sampling points (CiA 301 / CiA 105):

Baud RateRecommended Sampling Point
10–125 kbit/s87.5%
250 kbit/s87.5%
500 kbit/s87.5%
1000 kbit/s75–87.5%

A sampling point of 87.5% is the CANopen standard recommendation. At higher baud rates, slightly lower values (75–80%) provide more tolerance for clock drift.

SJA1000 Register Details

The SJA1000 uses a 16 MHz crystal (typical on B&R modules).

BTR0 (Bus Timing Register 0):

| SJW1 SJW0 | BRP5 BRP4 BRP3 BRP2 BRP1 BRP0 |
  • SJW: Synchronization Jump Width (0–3, actual value + 1)
  • BRP: Baud Rate Prescaler (0–63, actual value + 1)

BTR1 (Bus Timing Register 1):

| SAM | TSEG2.2 TSEG2.1 TSEG2.0 | TSEG1.3 TSEG1.2 TSEG1.1 TSEG1.0 |
  • SAM: Sampling mode (1 = triple sampling, 0 = single)
  • TSEG1: Time Segment 1 (0–15, actual value + 1)
  • TSEG2: Time Segment 2 (0–7, actual value + 1)

Example: 500 kbit/s with SJA1000 @ 16 MHz

Prescaler = 1 (BRP = 0)
Tq = 2 × (BRP + 1) / 16 MHz = 125 ns
Bit time = 500 kbit/s → 2 µs → 16 Tq

SYNC_SEG  = 1 Tq
TSEG1     = 12 Tq (register value 11)
TSEG2     = 3 Tq  (register value 2)
SJW       = 1 Tq  (register value 0)
Sampling  = (1 + 12) / 16 = 81.25%

Configuring in B&R Automation Studio

  1. Open the hardware configuration for the IF2772
  2. Select the CAN interface (IF1 or IF2)
  3. Set the baud rate from the dropdown (125k, 250k, 500k, 1M, etc.)
  4. Automation Studio calculates the SJA1000 BTR0/BTR1 register values automatically
  5. For non-standard baud rates, use the ArCAN library to write BTR values directly

Bit Timing Sources

  • SJA1000 datasheet (NXP): Standard CAN controller reference
  • CiA 301 specification: Bit timing requirements
  • B&R X20IF2772 datasheet: https://docs.rs-online.com/5f80/A700000013921576.pdf

6. Hardware CAN Bus Sniffing

Sniffing Overview

To capture CAN bus traffic without interfering with the running B&R system, you need a CAN-to-USB/PCI adapter connected in listen-only mode as a passive node on the bus. This is essential for debugging communication between the IF2772 and field devices.

Connection Methods

1. Y-Cable / T-Junction Tap

                    ┌──────────────┐
B&R IF2772 ────────┤  T-junction  ├──────── Field Device
                    │   (tap)      │
                    └──────────────┘
                          │
                    CAN Adapter (sniffer)

Connect the CAN adapter’s CAN_H and CAN_L to a tap point on the bus. Do NOT add a third terminating resistor — the adapter should be in high-impedance mode.

2. In-Line Pass-Through Adapter

Some CAN adapters (e.g., Kvaser Leaf, PEAK PCAN) support in-line pass-through where the adapter sits between two bus segments. Ensure proper termination.

PEAK PCAN Hardware

ProductInterfaceCAN FDChannelsPrice Range
PCAN-USBUSB 2.0No1$150–250
PCAN-USB FDUSB 2.0Yes1$300–400
PCAN-USB Pro FDUSB 2.0Yes2$500–700
PCAN-PCI Express FDPCIeYes2$600–900

Software:

  • PCAN-View (free): Basic monitor, transmit, record
  • PCAN-Explorer 6 (paid): Advanced analysis, DBC import, graphical display, scripting

Vector CANalyzer / CANoe

ProductUse CaseCAN FDPrice Range
CANalyzerAnalysis, measurement, diagnosticsYes$3,000–8,000+
CANoeDevelopment, simulation, testYes$5,000–15,000+

Features:

  • Real-time trace window
  • DBC/LDF/A2L database import for symbolic decoding
  • Graphics, data, and statistics windows
  • IG (Interactive Generator) for injecting frames
  • CAPL scripting for automated tests
  • Network management and gateway simulation

Kvaser Hardware

ProductInterfaceCAN FDChannelsPrice Range
Kvaser Leaf Light v2USBNo1$100–200
Kvaser Leaf Pro HSUSBNo1$250–350
Kvaser MemoratorUSB/SDYes2$400–600
Kvaser U100USB-CYes1$300–500

Software: Kvaser CANlib SDK (C/C++ API), Kvaser TRCAN, Kvaser Viewer

Ixxat (HMS Networks)

ProductInterfaceCAN FDPrice Range
Ixxat USB-to-CANUSBNo$200–400
Ixxat CAN-IBPCIe/PCIYes$400–800

Important: Listen-Only Mode

When sniffing a live CANopen network with the B&R master, always configure the CAN adapter in listen-only mode:

  • PEAK PCAN: Set PCAN_listen_only flag in PCAN-View or API
  • Vector: Enable “Listen Only” in CANalyzer channel configuration
  • SocketCAN: Set ip link set can0 type can bitrate 500000 listen-only on
  • Kvaser: Set canOPEN_LISTEN_ONLY in canOpen() call

Listen-only mode ensures the adapter never sends ACK bits, error frames, or any data on the bus, preventing interference with the production system.

Hardware Sniffing Sources

  • PEAK PCAN: https://www.peak-system.com/products/software/analysis-software/pcan-view/
  • Vector CANalyzer vs PCAN: https://controltechuk.com/blog/vector-canalyzer-alternative/
  • CAN tool comparison: https://rpubs.com/daniel_pas/can_tool_comparison
  • Affordable CAN tools: https://spin.atomicobject.com/affordable-can-bus-tools/

7. SocketCAN on Linux

SocketCAN Overview

SocketCAN is the Linux kernel’s native CAN protocol stack, exposing CAN devices as network interfaces (like eth0). This makes CAN accessible through standard socket APIs and network tools.

Setup

# Load the CAN controller driver (varies by hardware)
sudo modprobe peak_pci        # PEAK PCAN PCI cards
sudo modprobe vcan            # Virtual CAN for testing
sudo modprobe mcp251xfd       # Microchip MCP251xFD SPI-based

# Configure a CAN interface
sudo ip link set can0 type can bitrate 500000
sudo ip link set up can0

# Verify
ip -details link show can0

Core Utilities (can-utils)

Install: sudo apt install can-utils

candump — Capture CAN Traffic

# Capture all frames
candump can0

# Capture with timestamps
candump -t a can0

# Capture and log to file
candump -l can0

# Filter by CAN ID (only ID 0x181)
candump can0,181#FFFFFFFF

# Filter by ID range
candump can0,180:7FF#00000000

# Filter by data bytes (first byte = 0x01)
candump can0,~0#01000000

# Multiple interfaces
candump can0,can1

cansend — Transmit CAN Frames

# Standard data frame (ID=0x123, data=01 02 03 04)
cansend can0 123#01020304

# Remote frame
cansend can0 123#R

# Extended 29-bit ID
cansend can0 12345678#01020304

cangen — Generate CAN Traffic

# Generate random frames
cangen can0

# Generate at 100 ms interval with ID range 0x100-0x1FF
cangen can0 -g 100 -I 100 -L 1FF

# Generate specific length frames
cangen can0 -l 8 -D r

cansniffer — Real-Time CAN Sniffer

# Interactive sniffer showing changing bytes
cansniffer can0

# Shows which bytes change between frames
# Useful for identifying sensor data in unknown protocols

canplayer — Replay CAN Traffic

# Record
candump -l -n 1000 can0

# Replay
canplayer -I candump-2026-07-10_143022.log can0

slcanattach — Serial/Lawicel CAN Gateway

# For serial-based CAN adapters (e.g., LAWICEL, ELM327)
slcanattach -w -s 500000 -c /dev/ttyUSB0

bcmsocket — Broadcast Manager

# Receive a specific CAN ID with timeout
cansend can0 123#01020304 &

# Set up cyclic transmission
cangen can0 -e -g 100 &

CAN-FD Support

# Configure CAN-FD interface
sudo ip link set can0 type can bitrate 500000 dbitrate 2000000 fd on
sudo ip link set up can0

# Capture CAN-FD frames
candump can0

# Send CAN-FD frame (8 bytes data, bit-rate switch)
cansend can0 123##01122334455667788

Python Integration (python-can)

import can

# Initialize SocketCAN interface
bus = can.Bus(channel='can0', interface='socketcan', bitrate=500000)

# Receive messages
for msg in bus:
    print(f"ID: {msg.arbitration_id:03X}  Data: {msg.data.hex()}  DLC: {msg.dlc}")

# Send messages
msg = can.Message(arbitration_id=0x181, data=[1, 2, 3, 4], is_extended_id=False)
bus.send(msg)

SocketCAN Sources

  • SocketCAN kernel documentation: https://docs.kernel.org/networking/can.html
  • Linux can-utils: https://github.com/linux-can/can-utils
  • can-utils tutorial: https://dbcutility.com/blog/can-utils-candump-guide/
  • SocketCAN practical guide: http://sgframework.readthedocs.io/en/latest/cantutorial.html

8. Decoding Sensor Data from CAN Messages

The Challenge

When troubleshooting field-level sensor problems via CAN bus traffic, you need to interpret raw CAN data bytes. CANopen PDOs carry sensor values as mapped objects from the device’s object dictionary. Without the correct DBC/EDS file, decoding requires understanding the mapping.

Step-by-Step Decoding

Step 1: Identify the PDO COB-ID

Given a node with ID = 5:

  • TPDO1 = 0x180 + 5 = 0x185
  • TPDO2 = 0x280 + 5 = 0x285
  • TPDO3 = 0x380 + 5 = 0x385

Step 2: Consult the Device’s Object Dictionary

The EDS file (or device manual) tells you which objects are mapped to each TPDO.

Example: A temperature sensor (Node 5) maps:

  • TPDO1 (0x185): Object 6004h:01 (Temperature value, INT16, in 0.1°C units)

Step 3: Extract the Data Bytes

Captured frame: ID=0x185  Data=0x01 0xF4 0x00 0x00 0x00 0x00 0x00 0x00

First 2 bytes = 0xF401 (little-endian INT16) Decimal = -179

If the unit is 0.1°C: Temperature = -17.9°C

Common Data Types in CANopen

Data TypeSizeRangeDescription
BOOLEAN1 bit0/1Flag
UNSIGNED8 (UNS8)1 byte0–255Unsigned integer
UNSIGNED16 (UNS16)2 bytes0–65535Unsigned integer
UNSIGNED32 (UNS32)4 bytes0–4,294,967,295Unsigned integer
INTEGER8 (INT8)1 byte-128–127Signed integer
INTEGER16 (INT16)2 bytes-32768–32767Signed integer
INTEGER32 (INT32)4 bytes-2³¹–2³¹-1Signed integer
REAL324 bytesIEEE 754Floating point

Endianness

CANopen uses little-endian byte order by default (LSB first). For a 16-bit value spanning bytes 0–1 of a CAN frame:

  • Byte 0 = low byte (bits 0–7)
  • Byte 1 = high byte (bits 8–15)

Practical Diagnostic Example

Suppose you have a pressure sensor on CANopen node 12 and it reports erratic values:

# Capture only this sensor's TPDO1
candump can0,18C#FFFFFFFF

Output:

(1609456789.123456) can0 18C#0300800000000000
(1609456789.623456) can0 18C#0420810000000000
(1609456790.123456) can0 18C#FF3F820000000000

Decoding (assume mapping: sub-index 0 = pressure UNS32, sub-index 1 = status UNS8):

  • Frame 1: Pressure = 0x00008003 (32771 units, e.g., 3.277 bar), Status = 0x00 (OK)
  • Frame 2: Pressure = 0x00008120 (33056 units, 3.306 bar), Status = 0x04 (Warning)
  • Frame 3: Pressure = 0x000082FF (33535 units, 3.354 bar), Status = 0xFF (Error)

This reveals the sensor is drifting and entered error state.

Using DBC Files with candump

# Convert DBC to SocketCAN attribute format
# (Using python-can or cantools)

# With cantools + python-can:
python3 -c "
import cantools, can
db = cantools.database.load_file('sensor.dbc')
for msg in db.messages:
    print(f'{msg.name}: ID=0x{msg.frame_id:03X}')
"

Reverse-Engineering Unknown Sensors

When no documentation exists:

  1. Use cansniffer to observe which bytes change with sensor activity
  2. Correlate changes with physical events (apply pressure, change temperature, etc.)
  3. Identify data types by observing value ranges and step sizes
  4. Document findings in a DBC or mapping table

Sensor Data Decoding Sources

  • CSS Electronics — CAN bus data reading: https://www.autopi.io/blog/how-to-read-can-bus-data/
  • Tektronix CAN troubleshooting: https://www.tek.com/en/solutions/industry/automotive-test-solutions/in-vehicle-networks/can-bus-troubleshooting-oscilloscope-can-bus-decoder
  • PicoScope CAN decoding: https://www.picotech.com/library/knowledge-bases/oscilloscopes/can-bus-serial-protocol-decoding

9. CANopen Error Handling

CAN Error States

Each CAN node maintains two error counters:

  • TEC (Transmit Error Counter): Increments on transmit errors, decrements on successful transmits
  • REC (Receive Error Counter): Increments on receive errors, decrements on successful receives

Based on these counters, a node transitions between three states:

Error Active (TEC and REC < 128)

  • Normal operating state. The node can send and receive normally.
  • When an error is detected, the node sends an Active Error Flag (6 dominant bits).
  • The active error frame forces all other nodes to acknowledge the error.
  • Both counters decrement by 1 on each successful message (TEC) or successful reception (REC).

Error Passive (TEC > 127 OR REC > 127)

  • The node can still communicate but with restrictions.
  • When an error is detected, the node sends a Passive Error Flag (6 recessive bits).
  • The passive error flag does NOT dominate the bus — other nodes may not notice it.
  • After sending a passive error flag, the node waits 8 bit times (Suspend Transmission) before trying to transmit again.
  • This gives other nodes priority in bus arbitration.

Bus-Off (TEC > 255)

  • The node completely disconnects from the bus.
  • No transmission or reception is possible.
  • The CAN controller internally sets the bus-off status bit.
  • Recovery: The node must monitor 128 consecutive occurrences of 11 consecutive recessive bits on the bus (128 × 11 recessive bits = 11 bit times of dominant-free bus).
  • In B&R systems, bus-off recovery can be configured:
    • Automatic recovery after a timeout (via Automation Studio settings)
    • Manual recovery via NMT Reset command or module restart
    • Physical reset (power cycle the IF2772)

CAN Error Types

Error TypeDescriptionCommon Cause
Bit ErrorBit value differs from what was transmitted (on TX node only)Wiring issue, EMI
Stuff Error6 consecutive identical bits not followed by complementary stuff bitClock skew, noise
CRC ErrorReceived CRC doesn’t match calculated CRCCorrupted frame
Form ErrorFixed-form bit field is illegalCorruption
ACK ErrorTransmitter doesn’t see dominant ACK bitDisconnected node, wiring

Error Frame Structure

An error frame consists of:

  1. Error Flag: 6 dominant bits (active) or 6 recessive bits (passive)
  2. Error Delimiter: 8 recessive bits (marks end of error frame)

After an error frame, bus arbitration restarts from the beginning.

CANopen Emergency Protocol (EMCY)

CANopen adds an application-level error reporting mechanism via the Emergency object:

  • COB-ID: 0x080 + Node-ID
  • Triggered when: A device detects an internal error (overcurrent, temperature, communication loss)
  • Payload: 8 bytes:
ByteDescription
0–1Error Code (16-bit, CiA-defined)
2Error Register (mirror of OD index 1001h)
3–4Manufacturer-specific error code
5–7Additional info (manufacturer-specific)

Common CiA Emergency Error Codes

Error CodeDescription
0x0000Error Reset / No error
0x1000Generic error
0x2310Current
0x4310Voltage
0x5310Temperature (over-temperature)
0x6100Device hardware
0x8110CAN overrun
0x8120CAN passive mode
0x8130CAN bus-off
0x8210CAN RX queue overflow
0x8220CAN TX queue overflow
0x8230CAN controller error
0x8240CAN life guard error
0x8250CAN recovered from bus-off
0x8300CAN PDO length exceeded

Heartbeat / Node Guarding Errors

CANopen uses two mechanisms to detect node failures:

Heartbeat (recommended in modern CANopen):

  • Producer sends heartbeat at a configurable interval (OD index 1017h)
  • Consumer monitors for heartbeat timeouts
  • Consumer sets HeartbeatTimeoutEvent in status register on timeout
  • Timeout threshold configured in OD index 1016h (consumer)

Node Guarding (legacy):

  • Master polls each slave with a Remote Transmission Request (RTR) on the node’s guard COB-ID
  • Slave responds with its toggle bit and status
  • If toggle bit doesn’t change between polls or response is missing → error

CANopen Error Handling Sources

  • HMS Networks error states: https://www.hms-networks.com/support/tech-support/kb-articles/10436555566354-CANOpen-Error-States–Error-Active–Error-Passive–and-Bus-Off
  • CSS Electronics CAN errors: https://www.csselectronics.com/pages/can-bus-errors-intro-tutorial
  • Kvaser error handling: https://kvaser.com/lesson/can-error-handling/
  • STMicroelectronics bus-off recovery: https://www.st.com/resource/en/technical-note/tn1367-spc5x-can-errors-management-and-bus-off-recovery-stmicroelectronics.pdf

10. IF2772 Configuration Parameters (Object Dictionary)

Object Dictionary Structure

The CANopen Object Dictionary (OD) is accessed via 16-bit indices with 8-bit sub-indices. The IF2772, when configured as a CANopen master, exposes configuration parameters through the standard OD ranges.

Communication Profile Area (1000h – 1FFFh)

IndexSub-IndexNameDescription
1000h0Device TypeIdentifies the device type (bit-field: profile, device)
1001h0Error RegisterBit-field indicating current error conditions
1002h0Manufacturer StatusManufacturer-specific status register
1005h0COB-ID SYNCCAN identifier for SYNC message
1006h0Communication Cycle PeriodSYNC cycle period in µs
1007h0Synchronous Window LengthWindow for synchronous PDOs in µs
1008h0Manufacturer Device NameString
1009h0Manufacturer Hardware VersionString
100Ah0Manufacturer Software VersionString
1010h0–3Store ParametersSave configuration to non-volatile memory
1011h0–3Restore Default ParametersReset to factory defaults
1014h0COB-ID EMCYEmergency object CAN identifier
1016h0–127Consumer Heartbeat TimeHeartbeat timeout for each monitored node (ms)
1017h0Producer Heartbeat TimeHeartbeat production interval (ms)
1018h0, 1–4Identity ObjectVendor ID, Product Code, Revision, Serial Number
1400h–15FFh0–1+RPDO Communication ParametersCOB-ID, transmission type, inhibit time, event timer
1600h–17FFh0–8RPDO Mapping ParametersMapped object entries
1800h–19FFh0–1+TPDO Communication ParametersCOB-ID, transmission type, inhibit time, event timer
1A00h–1BFFh0–8TPDO Mapping ParametersMapped object entries

Error Register (1001h) Bit Definitions

BitMeaning
0Generic error
1Current
2Voltage
3Temperature
4Communication error
5Device profile specific
6Reserved (always 0)
7Manufacturer specific

Store Parameters (1010h)

Sub-IndexDescription
0Number of sub-indices
1Save all parameters to non-volatile memory
2Save communication parameters
3Save application parameters
4–127Manufacturer-specific

Identity Object (1018h)

Sub-IndexDescription
0Number of elements (typically 4)
1Vendor-ID (B&R vendor ID)
2Product Code (device-specific)
3Revision Number (firmware version)
4Serial Number (module-specific)

Device Type (1000h) Format (32-bit)

Bit 31-26: Profile number (0 = CiA301, 402h = DSP, etc.)
Bit 25-16: Additional profile information
Bit 15-8: Device type (flags)
Bit 7-0: Flags (e.g., bit 0 = simple device, bit 1 = complex device)

Object Dictionary Sources

  • CiA 301 specification: CANopen application layer and communication profile
  • B&R IF2772 datasheet: https://docs.rs-online.com/5f80/A700000013921576.pdf
  • Siemens CANopen tutorial: https://cache.industry.siemens.com/dl/files/771/109479771/att_993267/v1/109479771_CANopen_Tutorial_V20_en.pdf

11. Setting Up CANopen on B&R Without the Original Project

Scenario

You have a B&R X20 system with an IF2772 module running an unknown CANopen configuration. The original Automation Studio project is lost or unavailable, and you need to reconfigure CANopen.

Prerequisites

  • Automation Studio (version 3.0 or later for IF2772 CANopen master)
  • Physical access to the X20 controller and IF2772 module
  • EDS files for all CANopen slave devices on the bus
  • Knowledge of the target baud rate and node IDs

Step-by-Step Procedure

Step 1: Connect to the Controller

  1. Connect your PC to the X20 controller via Ethernet
  2. In Automation Studio: Online → Connection Settings
  3. Enter the controller’s IP address
  4. Select “Online without project” if prompted
  5. Click Connect (F5)
  6. You can now browse the controller’s running configuration and firmware version

Step 2: Identify Connected CANopen Devices

  1. Physically inspect the CAN bus — note any slave devices and their node ID switches
  2. If you have a CAN sniffer (PCAN, Vector, SocketCAN), capture traffic to identify active nodes
  3. Look for EMCY (0x080+NodeID) and Heartbeat (0x700+NodeID) frames to enumerate nodes
# Using SocketCAN to identify nodes
candump can0 | grep -E "^.*can0 [78][0-9A-F]{2}"

Step 3: Create a New Automation Studio Project

  1. File → New Project
  2. Select the correct controller model (e.g., X20CP1585)
  3. Add the IF2772 to the hardware tree in the correct slot
  4. Configure the firmware version to match the controller’s current firmware

Step 4: Configure the CAN Interface

  1. In the hardware tree, expand the IF2772
  2. Select IF1 (or IF2) → right-click → “CANopen (DTM)”
  3. Set the baud rate to match the existing bus (commonly 125k, 250k, or 500k)
  4. Set the node number (match the DIP switch setting on the module)

Step 5: Import EDS Files and Add Slaves

  1. Tools → Manage 3rd Party Devices (or drag from Hardware Catalog)
  2. Import the EDS file for each slave device
  3. Set each slave’s node ID to match its physical switch setting
  4. Configure PDO mappings according to the device documentation

Step 6: Configure PDOs

  1. In the DTM configuration, open the PDO mapping view
  2. Verify which TPDOs from the slaves you want to receive (as RPDOs on the master)
  3. Configure which RPDOs the master sends to the slaves (as TPDOs on the slave side)
  4. Map the PDO data to variables in your IEC program

Step 7: Configure NMT and Heartbeat

  1. Set the heartbeat producer time on the master (index 1017h)
  2. Configure consumer heartbeat times for each slave (index 1016h)
  3. Set the NMT startup sequence (boot-up → Pre-operational → Operational)

Step 8: Deploy and Verify

  1. Download the configuration to the controller
  2. Monitor CAN traffic for proper communication
  3. Verify PDO data exchange using Automation Studio’s online view
  4. Check the IF2772 LEDs: STATUS green, TxD yellow (flashing during transmit)

Using the ArCAN Library for Raw CAN

If you need to work with non-CANopen CAN protocols or custom identifiers:

PROGRAM _CAN_Init
    // Configure CAN interface
    AsArCAN_Init(
        pInterface := ADR(ifCAN1),
        nBaudrate := 500000,
        pTxBuffer := ADR(aTxBuffer),
        nTxBufSize := 16,
        pRxBuffer := ADR(aRxBuffer),
        nRxBufSize := 16
    );
END_PROGRAM

CANopen Setup Sources

  • B&R Community — CANopen over X20IF2772: https://community.br-automation.com/t/canopen-communication-over-x20if2772/6000
  • B&R Community — Vehicle CAN setup: https://community.br-automation.com/t/how-to-setup-communication-on-a-vehicle-can/2778
  • B&R Automation Studio connect: https://industrialmonitordirect.com/blogs/knowledgebase/br-automation-studio-connect-to-controller-and-view-program
  • B&R Community — CANopen trace guide: https://community.br-automation.com/t/how-to-trace-description-guide-canopen/4929

12. Common CAN Bus Problems and Diagnostic Procedures

Problem 1: No Communication (No TxD LED Activity)

Possible Causes:

  • Wrong baud rate (mismatch between master and slaves)
  • CAN bus wiring open (broken cable)
  • Missing or incorrect terminating resistors
  • Module not properly initialized

Diagnostics:

  1. Verify baud rate matches on all devices
  2. Measure resistance between CAN_H and CAN_L at the module connector (should read ~60 Ω with two 120 Ω terminators)
  3. Check the STATUS LED — should be green
  4. Use oscilloscope to verify CAN_H/CAN_L differential signals

Problem 2: Intermittent Communication Errors

Possible Causes:

  • EM interference (cable routing near power cables)
  • Poor shield grounding
  • Loose connections
  • Near baud rate limit for cable length
  • Too many nodes causing bus load > 70%

Diagnostics:

  1. Monitor error frames with CAN sniffer
  2. Check bus load (should be < 70% at peak)
  3. Verify cable length is within limits for the baud rate
  4. Inspect shield connections — SHLD should be grounded at one or both ends
  5. Check REC/TEC counters on nodes (via SDO read of OD index 1001h or vendor-specific)

Problem 3: Nodes Going Bus-Off

Possible Causes:

  • Wiring fault (short, open, corrosion)
  • Faulty transceiver on one node
  • External interference
  • Ground loops
  • Incorrect termination

Diagnostics:

  1. Disconnect nodes one at a time to isolate the faulty device
  2. Measure CAN_H and CAN_L voltages at idle:
    • CAN_H ≈ 2.5–3.5 V (recessive ≈ 2.5 V, dominant ≈ 3.5 V)
    • CAN_L ≈ 1.5–2.5 V (recessive ≈ 2.5 V, dominant ≈ 1.5 V)
  3. Check for shorts between CAN_H and CAN_L (should be ~60 Ω, not 0 Ω)
  4. Check for shorts between CAN lines and ground

Problem 4: High Bus Load / Too Many Messages

Possible Causes:

  • Too many PDOs transmitting at high rates
  • Event-driven PDOs firing too frequently
  • SYNC rate too high

Diagnostics:

  1. Use CANalyzer/PCAN-Explorer to measure bus load percentage
  2. Reduce PDO transmission rates (increase inhibit time, change transmission type from synchronous to event-driven)
  3. Reduce SYNC period if synchronous PDOs are used
  4. Consolidate multiple objects into fewer PDOs (use full 8-byte payload)

Problem 5: Heartbeat Timeout Errors

Possible Causes:

  • Slave node crashed or powered off
  • CAN cable disconnected
  • Slave in Error-Active/Passive state, not transmitting
  • Wrong heartbeat consumer timeout configured

Diagnostics:

  1. Verify the slave is powered and its STATUS LED is active
  2. Check for EMCY messages from the slave before heartbeat loss
  3. Verify heartbeat producer interval on the slave matches expected rate
  4. Increase consumer heartbeat timeout if transient delays are expected

Problem 6: PDO Data Not Updating

Possible Causes:

  • Wrong COB-ID mapping
  • PDO marked invalid (bit 31 of COB-ID set)
  • Wrong node ID
  • NMT state not Operational

Diagnostics:

  1. Verify NMT state is Operational (not Pre-operational or Stopped)
  2. Read PDO communication parameters via SDO to verify COB-ID
  3. Verify PDO mapping is valid
  4. Check if the PDO is being transmitted on the bus (use sniffer)

Diagnostic Flowchart

Start
  │
  ├─ No communication at all?
  │   ├─ Check STATUS LED (green = active)
  │   ├─ Measure bus termination (60 Ω expected)
  │   ├─ Check CAN_H/CAN_L voltages
  │   └─ Verify baud rate
  │
  ├─ Communication but errors?
  │   ├─ Monitor error frames (sniffer)
  │   ├─ Check wiring/shielding
  │   ├─ Check bus load (< 70%)
  │   └─ Measure REC/TEC counters
  │
  ├─ Node going bus-off?
  │   ├─ Isolate by removing nodes one by one
  │   ├─ Check for ground loops
  │   └─ Verify transceiver health
  │
  └─ Data incorrect/missing?
      ├─ Verify PDO mapping (EDS vs. actual)
      ├─ Check NMT state (Operational?)
      ├─ Verify node IDs match physical switches
      └─ Check byte order / data scaling

Diagnostic Procedures Sources

  • CSS Electronics CAN bus errors: https://www.csselectronics.com/pages/can-bus-errors-intro-tutorial
  • Total Phase CAN debugging: https://www.totalphase.com/blog/2025/09/debugging-can-automotive-industrial-medical-robotics-aerospace-systems/
  • Kvaser error handling: https://kvaser.com/lesson/can-error-handling/

13. Wiring and Termination Requirements

CAN Bus Physical Layer (ISO 11898-2)

The CAN bus uses a differential pair (CAN_H and CAN_L) with common-mode rejection to provide noise immunity.

Cable Requirements

ParameterSpecification
Cable TypeTwisted pair, shielded (STP)
Characteristic Impedance120 Ω (±10%)
Wire Cross-Section0.25–0.65 mm² (AWG 22–18)
Max Stub LengthTypically < 0.3 m at 1 Mbit/s
ShieldingFoil + braid recommended
Bend Radius> 5× cable diameter

Bus Topology

CAN is a linear bus topology (not star or ring). Devices are connected via drop lines (stubs) from the main bus trunk.

┌───────────── 120 Ω ─────────────────────┐
│                                          │
├──[Node 1]──┬──[Node 2]──┬──[Node 3]──┤ 120 Ω
              │             │               │
              Stub         Stub            Stub
              (<0.3m)       (<0.3m)        (<0.3m)

Termination

The bus must be terminated with 120 Ω resistors at both ends of the trunk:

  • Without termination: Signal reflections cause data corruption
  • With termination: The 120 Ω resistors match the cable’s characteristic impedance, preventing reflections
  • Total bus resistance (measured at any point): Should be approximately 60 Ω (two 120 Ω resistors in parallel)

IF2772 Termination

The IF2772 has integrated terminating resistors (one per CAN interface), selectable via hardware switches on the bottom of the module:

  • TERM CAN 1: Switch for IF1 terminating resistor (ON/OFF)
  • TERM CAN 2: Switch for IF2 terminating resistor (ON/OFF)

LED indicator: The TERM CAN 1/TERM CAN 2 LED lights yellow when the resistor is active.

Proper configuration:

  • IF2772 is at one end of the bus → turn terminating resistor ON
  • IF2772 is in the middle of the bus → turn terminating resistor OFF
  • IF2772 is at both ends (if bus is short and only connects to one IF2772 interface) → turn resistor ON on the far-end device, OFF on IF2772

Wiring Diagram (IF2772 TB2105 Terminal Block)

TB2105          TB2105 (next device)
──────          ──────────────────
Pin 1: CAN_GND ─────── Pin 1: CAN_GND
Pin 2: CAN_L   ─────── Pin 2: CAN_L
Pin 3: SHLD    ─────── Pin 3: SHLD
Pin 4: CAN_H   ─────── Pin 4: CAN_H
Pin 5: NC      ─────── Pin 5: NC

Shield grounding options:

  • One-side grounded: Connect SHLD to ground at one end only (prevents ground loops)
  • Both-side grounded (with care): If ground potential difference is < 2 V, can ground at both ends
  • Never leave SHLD floating in noisy industrial environments

Voltage Levels

StateCAN_HCAN_LDifferential (CAN_H - CAN_L)
Recessive (logic 1)~2.5 V~2.5 V~0 V
Dominant (logic 0)~3.5 V~1.5 V~2.0 V

Common Wiring Mistakes

  1. Swapped CAN_H and CAN_L — causes total communication failure; the bus appears to work intermittently due to dominant/recessive inversion
  2. Missing termination — reflections cause errors at high baud rates; may work at low baud rates
  3. Double termination in the middle — reduces signal swing, causes margin issues
  4. No ground reference — common-mode voltage drifts outside transceiver range
  5. Star topology — causes reflections and timing violations
  6. Long stubs — creates impedance discontinuities

Wiring Sources

  • B&R IF2772 datasheet: https://docs.rs-online.com/5f80/A700000013921576.pdf
  • CiA 301 specification (physical layer recommendations)
  • ISO 11898-2: Road vehicles — Controller area network — High-speed medium access unit

14. CAN Analysis Tools Comparison

Hardware + Software Comparison Matrix

ToolHardwareSoftwareCANopen SupportDBC ImportCAPL/ScriptLinuxPrice (HW+SW)
Vector CANalyzerVN1640, VN1630, CANcaseXLCANalyzerExcellent (NMT, PDO, SDO trace)DBC, LDF, ARXMLCAPL scriptingNo (Windows)$3,000–8,000+
Vector CANoeSame as CANalyzerCANoeFull (simulation + analysis)DBC, LDF, ARXMLCAPL scriptingNo$5,000–15,000+
PEAK PCAN-Explorer 6PCAN-USB, PCAN-USB FDPCAN-Explorer 6Good (CANopen trace, NMT)DBCVBScript/JScriptLinux SDK$300–1,000
PEAK PCAN-ViewPCAN-USBPCAN-View (free)Basic (raw CAN only)NoNoVia can-utilsHW only ($150–400)
Kvaser MemoratorKvaser MemoratorKvaser TRCAN, SDKGoodDBCC/C++ APIYes (Linux SDK)$400–800
Kvaser CANKingAny Kvaser HWCANKing (free)LimitedDBC (via setup)NoVia can-utilsHW only
SocketCAN (Linux)Any Linux-supported adaptercan-utils, python-canBasic (raw CAN, python-can has CANopen)DBC (via cantools)Python, CNativeFree (open source)
Ixxat CanAnalyserIxxat USB-to-CANCanAnalyserGoodDBCNoNo$500–2,000
CanLoverAny CAN adapterCanLoverBasic-ModerateDBCNoNoFree
PicoScopePicoScope 3000/4000/5000PicoScope 7Basic (protocol decode)DBCNoNo$500–3,000

Detailed Comparison

Vector CANalyzer — Industry Standard

Strengths:

  • Gold standard for CANopen analysis
  • Excellent CANopen NMT, PDO, SDO, EMCY trace with symbolic names
  • CAPL scripting for automated tests and simulations
  • DBC/LDF/ARXML database support
  • Powerful graphics and data analysis windows
  • IG (Interactive Generator) for manual frame injection
  • Network statistics (bus load, error counters)

Weaknesses:

  • Expensive
  • Windows only
  • Steep learning curve for CAPL
  • Requires Vector hardware (or compatible)

Best for: Professional automotive/industrial development labs with budget

PEAK PCAN-Explorer 6 — Cost-Effective Alternative

Strengths:

  • Significantly cheaper than Vector
  • Good CANopen support with symbolic trace
  • DBC import for symbolic decoding
  • VBScript/JScript scripting
  • Supports CAN FD
  • Includes PCAN-View (free basic monitor)

Weaknesses:

  • Less powerful scripting than CAPL
  • Fewer analysis windows than CANalyzer
  • CANopen features not as deep as Vector

Best for: Mid-range industrial applications, cost-conscious teams

SocketCAN + can-utils — Free and Open Source

Strengths:

  • Free, included in Linux kernel
  • Works with many cheap CAN adapters
  • Excellent for scripting and automation
  • python-can library for high-level CANopen
  • cansniffer for reverse engineering

Weaknesses:

  • No built-in CANopen protocol decode (need python-can or manual)
  • No graphical DBC viewer (use SavvyCAN, CanLover, or cantools)
  • Linux-only
  • No official CAN FD database support in core tools

Best for: Linux-based systems, CI/CD pipelines, budget setups, scripting automation

SavvyCAN — Open Source GUI

Strengths:

  • Free and open source
  • Cross-platform (Windows, Linux, Mac)
  • DBC import and symbolic decoding
  • CANopen NMT state machine display
  • Supports many CAN adapters (SocketCAN, PCAN, Kvaser, Lawicel, etc.)
  • Frame injection and playback
  • Active development

Best for: Budget-friendly GUI-based analysis with CANopen features

Budget Recommendations by Use Case

Use CaseRecommended SetupEst. Cost
Quick field debuggingPEAK PCAN-USB + PCAN-View$200
Basic CANopen diagnosticsPEAK PCAN-USB FD + PCAN-Explorer 6$700
Professional CANopen analysisVector CANalyzer + VN1640$5,000+
Linux/DevOps monitoringSocketCAN + any USB adapter + python-can$50–200
Automotive reverse engineeringSavvyCAN + cheap USB-CAN adapter$30–100
Long-term bus recordingKvaser Memorator (onboard SD)$500
Production line testVector CANoe + automation$8,000+
Mixed B&R + 3rd party devicesPCAN-Explorer 6 + PCAN-USB FD$800

CAN Analysis Tools Sources

  • Vector CANalyzer: https://www.vector.com/int/en/products/products-a-z/software/canalyzer/
  • PEAK PCAN-View: https://www.peak-system.com/products/software/analysis-software/pcan-view/
  • PCAN-Explorer 6 guide: https://controltechuk.com/blog/vector-canalyzer-alternative/
  • Kvaser vs PEAK discussion: https://www.eevblog.com/forum/chat/kvaser-or-peak-can-bus-adapters-for-can-open/
  • CAN tool comparison (RPubs): https://rpubs.com/daniel_pas/can_tool_comparison
  • CanLover: https://canlover.ddns.net/
  • SavvyCAN: https://github.com/savvycan/SavvyCAN
  • Linux can-utils: https://github.com/linux-can/can-utils

Cross-References

Community Tools for CANopen Diagnostics

ToolURLPurpose
canopen-message-interpretergithub.com/hilch/canopen-message-interpreterPython script to interpret CAN traces as CANopen messages per CiA DS301 / V4.2.0. Feeds raw CAN log files and outputs decoded CANopen messages. Essential for post-capture analysis of CAN sniffing sessions.
PCAN-ViewComes with PEAK PCAN hardwareBasic CAN bus monitoring and transmit tool included with PCAN USB adapters
Vector CANalyzerCommercial (Vector Informatik)Professional CAN bus analysis with database import, trace analysis, and signal decoding
CANdevStudiogithub.com/ecomodeeu/CANdevStudioOpen-source CAN frame visualization and simulation tool

Appendix: Quick Reference

Common CANopen CAN IDs (Node ID = 1 example)

ObjectCOB-ID
NMT0x000
SYNC0x080
EMCY0x081
TPDO10x181
RPDO10x201
TPDO20x281
RPDO20x301
TPDO30x381
RPDO30x401
TPDO40x481
RPDO40x501
SDO Rx0x601
SDO Tx0x581
HEARTBEAT0x701

IF2772 Quick Specs Summary

  • 2x CAN interfaces (SJA1000 controller each)
  • Max 1 Mbit/s per interface
  • Integrated 120 Ω termination (switchable)
  • 5-pin TB2105 terminal blocks (order separately)
  • Node address: 2 hex DIP switches
  • Power: 1.2 W
  • CANopen master via Automation Studio 3.0+
  • No 29-bit RTR support
  • ATEX Zone 2 certified

Key SocketCAN Commands

# Setup
sudo ip link set can0 type can bitrate 500000 && sudo ip link set up can0

# Capture
candump can0                           # All frames
candump can0 -t a -l                   # Timestamped, log to file
candump can0,181#FFFFFFFF              # Filter single ID

# Send
cansend can0 181#0102030405060708      # 8-byte data frame

# Monitor changes
cansniffer can0                        # Interactive byte-change view

# Replay
canplayer -I logfile can0

# Status
ip -details -statistics link show can0

Key Findings

  1. The X20IF2772 uses a SJA1000 standalone CAN controller (NXP/Philips) per interface – not a modern integrated MCU CAN peripheral. This limits the module to standard 11-bit CAN identifiers only; 29-bit extended IDs with RTR are not supported due to SJA1000 memory/performance constraints. Maximum baud rate is 1 Mbit/s per interface.

  2. CANopen master configuration on the IF2772 is available in Automation Studio 3.0+. Two configuration approaches exist: DTM (Device Type Manager) for graphical drag-and-drop setup with EDS file import, and programmatic (ArCAN library) for code-based PDO/SDO configuration when no EDS file is available or for custom raw CAN communication.

  3. B&R’s default PDO mapping in Automation Studio may differ from what the EDS file specifies. Always verify actual PDO mapping after EDS import using the DTM interface. PDO communication parameters live at object indices 0x1400+ (RPDO) and 0x1800+ (TPDO), with mapping at 0x1600+ and 0x1A00+. The PDO invalidation/remapping procedure requires setting bit 31 of the COB-ID, clearing the mapping, writing new entries, then clearing bit 31.

  4. CANopen COB-ID assignment follows COB-ID = (FunctionCode * 0x80) + NodeID: TPDO1 = 0x180+NodeID, RPDO1 = 0x200+NodeID, SDO Rx = 0x600+NodeID, SDO Tx = 0x580+NodeID, Heartbeat = 0x700+NodeID. The IF2772 uses two hex rotary DIP switches for node addressing (1-127), shared across both interfaces.

  5. SocketCAN on Linux provides full sniffing and injection capability: sudo ip link set can0 type can bitrate 500000 && sudo ip link set up can0 to configure, candump can0 to capture, cansend can0 181#0102030405060708 to transmit, cansniffer can0 for interactive byte-change monitoring. The python-can library (can.Bus(interface='socketcan')) provides programmatic access.

  6. Built-in 120 ohm termination resistors are individually switchable per interface (TERM CAN 1 / TERM CAN 2 LEDs indicate active state). Both interfaces are electrically isolated from each other and from the PLC. Required terminal blocks (TB2105, screw clamp or push-in 2.5 mm2) are ordered separately.

  7. For sensor data decoding from CANopen PDOs: calculate the node’s TPDO1 CAN ID (0x180 + NodeID), consult the EDS object dictionary mapping, extract data bytes in little-endian order (byte 0 = LSB), and apply the device’s scaling (e.g., INT16 in 0.1C units). CANopen data types: UNSIGNED8/16/32, INTEGER8/16/32, REAL32 (IEEE 754).

  8. Common diagnostic procedures: candump can0,080:7FF captures all emergency messages; candump can0,181#FFFFFFFF filters a single node’s TPDO1; ip -details -statistics link show can0 shows bus error counters. A correctly terminated two-node bus reads approximately 60 ohm between CAN-H and CAN-L with power off. Single-node CAN-H to ground should be 2.5-3.0 V, CAN-L to ground 2.0-2.5 V when powered.


Document generated from research of B&R Automation documentation, CiA (CAN in Automation) specifications, B&R Community forums, and CANopen reference materials. Last updated: July 2026

B&R Automation Runtime (AR) — RTOS Internals Technical Reference

Compiled from official B&R documentation, B&R Community forum posts, training materials, security advisories, and press releases.


1. Underlying OS Architecture

1.1 Base OS: VxWorks (Wind River Systems)

Automation Runtime is based on VxWorks, the industry-standard RTOS from Wind River Systems (a subsidiary of Aptiv). This was confirmed officially by B&R employees on the B&R Community forum.

“Automation Runtime is definitely based on VxWorks. For sure, B&R developed a lot of additional functions, task class scheduling, drivers and abstraction layers needed for PLCs (that’s the reason why it’s called by its own name AutomationRuntime), but the base is still VxWorks until now.” — B&R Community forum, 2024

Key evidence:

  • B&R’s own Cyber Security Advisory #01/2019 states: “B&R Automation Runtime software is based on VxWorks and these vulnerabilities affect a range of Automation Runtime versions…”
  • VxWorks is a proprietary, Unix-like, scalable RTOS developed by Wind River Systems, widely deployed in mission-critical embedded systems.

1.2 B&R Extensions on Top of VxWorks

B&R has built a substantial layer on top of VxWorks:

  • Custom task class scheduling — B&R’s unique cyclic task class model (Cyclic #1 through #8) with configurable cycle times and tolerance
  • PLC-specific drivers — X2X bus drivers, POWERLINK, Ethernet/IP
  • Hardware abstraction layer (HAL) — isolates user programs from hardware specifics; applications run identically across different B&R controllers
  • I/O management subsystem — synchronized I/O cycle with task classes
  • Non-volatile memory management — User ROM, User RAM, Retain, Remanent memory systems

1.3 exOS (Enhanced Crossover Operating System) — Linux Side

Starting around 2020, B&R introduced exOS, allowing Linux code to run alongside Automation Runtime on the same hardware:

“The enhanced crossover Operating System (exOS) allows machine builders to use any Linux code within their B&R system.” — B&R Press Release, 2020-12-09

Architecture:

  • On dual-core/multi-core B&R controllers (e.g., Automation PC / APC series), cores can be assigned to either:
    • Automation Runtime (RTOS) — real-time control
    • GPOS (Linux) — general-purpose OS via exOS
  • Starting with AR 6.4 and AS 6.5, cores can be assigned dynamically to either GPOS or AR
  • Communication between AR and Linux uses a buffered API for process data exchange
  • Shared memory is used for data exchange between the two sides

1.4 Hardware Platform Evolution

Controller SeriesProcessorAR BaseNotes
Older B&R 2003/2005PowerPCVxWorksLegacy systems
X20CP1584 / X20(c)CP158xIntel Atom 600 MHzVxWorks256 MB DDR2 SDRAM
X20CP1684 / X20CP358xIntel Atom (faster)VxWorksHigher performance
X20CP0484-1 / X20CP0410Intel AtomVxWorksSingle-core license
C80 controllerIntel (multi-core)VxWorksWith SATA flash
APC910Intel Core i (co-designed with Intel)VxWorks + exOSMulti-core with hypervisor
APC3200Intel multi-coreVxWorks + exOSSupports multicore AR

Note: The CP1584 uses an Intel Atom processor clocked at 0.6 GHz with 256 MB DDR2 SDRAM, USB, Ethernet, POWERLINK, and removable CompactFlash. Newer controllers use increasingly powerful Intel Atom and Core i processors.


2. Process Model

2.1 Program Loading and Execution

AR does not use traditional OS processes. Instead, it uses a flat task model where all user code runs within the AR runtime environment as tasks:

  1. Program Transfer: Automation Studio compiles IEC 61131-3 code (ST, LD, FBD, IL, SFC), Automation Basic, and C/C++ into object code
  2. Transfer to controller: Object code is transferred via Ethernet, USB, or loaded from CompactFlash/CFast card
  3. Storage locations:
    • User ROM (Flash): Non-volatile storage for program code and configuration
    • User RAM (DRAM): Volatile runtime memory for variables
    • Retain memory: Battery-backed or flash-backed persistent data (survives power cycle)
    • Remanent memory: Flash-backed persistent data (survives power cycle, no battery needed)
  4. Startup sequence:
    • Controller boots → VxWorks kernel starts → AR runtime initializes
    • System configuration loaded from User ROM
    • Init routines execute (INIT section of each task)
    • Cyclic routines begin executing per task class configuration

2.2 Task Model

  • User programs are organized into tasks (logical units of code)
  • Tasks are assigned to task classes (Cyclic #1 through #8)
  • Each task class has a configurable:
    • Cycle time — e.g., 1 ms, 10 ms, 100 ms
    • Tolerance — watchdog window for cycle time violation
    • Task class idle time — reserved time for system tasks
  • Tasks within the same task class are executed sequentially within the cycle
  • There is no process isolation between user tasks — all tasks share the same address space (flat memory model)

2.3 No Traditional Process Isolation

Unlike Linux or Windows, AR tasks do not have separate address spaces. All user code runs in a shared memory space within the AR runtime. This means:

  • A pointer error in one task can corrupt memory used by another task
  • Page faults (error 25314) can be caused by any task accessing invalid memory
  • There is no memory protection between tasks
  • The IecCheck / AdvIecChk libraries provide runtime bounds checking as a debugging aid (not for production)

3. Task Scheduler Internals

3.1 Priority System (0–255)

AR operates on a priority-based preemptive scheduling system derived from VxWorks, with priorities 0–255:

“Automation Runtime operates on a priority system (0-255). The higher the priority number of a task, the higher priority it has when multiple tasks want to run at the same time.” — B&R Community Wiki

Priority bands (documented by community members):

Priority RangeCategoryExamples
>230HW Interrupts & I/O SchedulingHigher than Cyclic #1
190–230Cyclic TasksCyclic #1 (highest) to Cyclic #8 (lowest), motion/system operations
4–190System TasksEthernet, ANSL/TCP/UDP, file ops, logger, visualization, webserver, SDM
<4Idle TasksIDLE (priority 0), TcIdleFiller (priority 3)

3.2 Cyclic Task Classes

  • Up to 8 cyclic task classes (Cyclic #1 through Cyclic #8)
  • Cyclic #1 has the highest priority among cyclics; Cyclic #8 has the lowest
  • Each task class has a configurable cycle time and tolerance (watchdog window)
  • Tasks within a task class execute sequentially each cycle
  • The System Tick (base timer for all AR) determines the minimum configurable cycle time

3.3 Preemptive Scheduling

  • When a higher-priority task becomes ready to run, it preempts the currently running lower-priority task
  • Cyclic tasks always preempt system tasks
  • Within cyclic task classes, tasks run to completion before the next task in the same class starts

3.4 Task Class Idle Time

A critical mechanism for allowing system tasks to execute:

  • Configured per task class (by default: Cyclic #2, 20ms cycle, with 2ms idle time at the end)
  • During the idle time window, cyclic tasks yield and system tasks can execute
  • Implemented via the TcIdleFiller mechanism:
    • Affected task classes are moved to priority 2
    • TcIdleFiller runs at priority 3 (always ready to run, yields to everything higher)
    • If no system tasks need to run, TcIdleFiller runs no-ops
    • This time is counted as CPU usage (not idle), which can make SDM report artificially high CPU

3.5 Cycle Time Enforcement (Watchdog)

  • Each task class has a tolerance value — if the cycle exceeds cycle_time + tolerance, a cycle time violation occurs
  • Violation behavior:
    • Logged in the logbook
    • Controller enters Service Mode (all task classes halted)
    • Revision notes (AR 6.6.2): Added “Watchdog after a cycle time violation when the task (task class) is in the safe state (e.g. in a critical section)”

3.6 Multicore Scheduling (AR 6.1+)

Starting with Automation Runtime 6.1, B&R introduced multicore support:

AR VersionMulticore Capability
AR 6.1Multicore platform for mapp packages, AR API
AR 6.3Multicore diagnostics (Profiler, SDM)
AR 6.4Full multicore for non-hard-RT system tasks; parallel ANSL communication; hypervisor with Windows 11 + efficiency cores; Reader/Writer Locks; SMB 1.0 permanently disabled
AR 6.5Hard real-time multicore — task classes assignable to specific CPU cores; ManagedCertificateStore extended to ANSL/FTP/HTTP/SMTP; FTP RBAC; SNI support; ArCert CSR generation; hypervisor repair boot for PCIe interrupt conflicts; ARsim 4 GB process memory
AR 6.x (future)mapp Track, IEC Task classes parallelization
  • Tasks can be dynamically distributed across cores based on load
  • Dynamic load balancing to least-utilized cores
  • AR 6.5 hard real-time core assignment: In AS 6.5, individual task classes (Cyclic #1-#8) can be pinned to specific CPU cores via the Hardware Configuration in Automation Studio. This enables true deterministic hard real-time execution on dedicated cores, isolating time-critical control tasks from system and communication tasks. Configuration is per-task-class under the CPU’s “Multicore” settings. Note: not all CPUs have multiple cores available for AR (some cores may be reserved for GPOS/exOS or the BIOS); check the system datasheet for core availability.
  • IO scheduler cannot benefit from multicore
  • Synchronization primitives needed (AsSem Standard Library) to prevent race conditions on shared memory
  • Not all hardware supports multicore (check System Datasheets; BIOS may reserve cores)

4. System Call Interface

4.1 How User Code Interacts with the RTOS

User programs interact with AR through B&R standard libraries (function blocks / FUBs) rather than direct OS system calls. These libraries wrap underlying VxWorks and B&R-specific OS calls.

4.2 Key Standard Libraries

LibraryPurpose
AsArProfRuntime profiling — LogIdleShow() for CPU usage measurement
AsMemMemory allocation and management functions
AsFileFile operations (FileOpen, FileRead, FileWrite, FileClose, DirOpen, etc.)
ArEventLogUser logbook entries (logline function)
AsSemSemaphores and synchronization (critical for multicore)
AsBrStrString manipulation
AsTCPTCP/IP socket operations
AsUDPUDP socket operations
AsMbTCPModbus TCP implementation
IecCheckRuntime IEC code validation (division by zero, null ptr, array bounds)
AdvIecChkExtended IEC validation with backtrace info
DataObjData object persistent storage
ST (System Tasks)Suspend/resume system modules at runtime

4.3 No Direct VxWorks API Access

User programs in IEC languages (ST, LD, FBD, etc.) cannot call VxWorks APIs directly. Only C/C++ programs compiled with the B&R C compiler can potentially access lower-level functions, but this is not documented for general use.

4.4 Online Services API

Automation Studio communicates with the controller via an online protocol for:

  • Variable monitoring (Watch window)
  • Trace/oscilloscope
  • Logger access
  • Program transfer (download/compare)
  • Profiling
  • Force variables

These use the ANSL (Automation Network Service Layer) protocol running as a system task.

4.5 Practical Runtime Monitoring from IEC Code

The AsArProf library provides runtime profiling capabilities directly from IEC code:

PROGRAM _CYCLIC
    VAR
        cpuUsage    : REAL;
        cycleTime   : LTIME;
        idleShow    : DINT;
        taskInfo    : STRING;
    END_VAR

    (* Read CPU usage using AsArProf *)
    cpuUsage := AsArProf.GetCpuUsage();

    (* Read current task's cycle time *)
    cycleTime := _taskGetCurrentCycleTime();

    (* Log idle time statistics (for diagnosing high CPU) *)
    (* This shows how much time is available for system tasks *)
    idleShow := AsArProf.LogIdleShow();

    (* Write diagnostic info to the logbook *)
    IF cpuUsage > 80.0 THEN
        ArEventLog.LogInfo(0, 0, 'High CPU usage detected: %.1f%%', cpuUsage);
    END_IF
END_PROGRAM

For monitoring system variables externally without IEC code access, see system-variables.md. For building external Python-based monitoring tools, see python-diagnostics.md.


5. Interrupt Handling

5.1 No User-Defined ISRs

This is a critical design decision:

“Since the Automation Runtime and the whole hardware ecosystem is based on a deterministic runtime behavior, there’s no functionality like ‘user defined IRQ / ISR’ (because this could disturb the realtime operation, for example if the ISR takes too long to execute).” — B&R Community, 2024

AR deliberately excludes user-defined interrupt service routines to maintain deterministic timing.

5.2 IRQ Task Classes

B&R provides IRQ task classes for hardware interrupt handling:

“Each interrupt capable module can be assigned an interrupt task (IRQ task for short) which is processed each time the corresponding interrupt is triggered.” — B&R Programming Training Document

  • IRQ tasks are assigned to specific hardware modules (e.g., digital input modules with interrupt capability)
  • They execute at a priority higher than Cyclic #1 (>230 priority range)
  • The interrupt triggers the associated task to execute in its configured task class
  • This is the sanctioned way to handle hardware events in AR

5.3 HW Interrupts and I/O Scheduling

  • Hardware interrupts and I/O scheduling run at priorities greater than 230
  • This includes the X2X bus cycle, POWERLINK communication
  • The I/O cycle is synchronized with task class cycles (configurable per task class)

5.4 Interrupt Latency

Not publicly documented with specific numbers. However:

  • AR guarantees deterministic behavior with configured cycle times
  • Minimum achievable cycle time depends on the specific controller (some support sub-1ms)
  • The X2X bus and I/O updates are deterministic and synchronized with the task class cycle

5.5 reACTION Technology

For extremely fast responses, B&R offers reACTION modules (X20DS/DSP and X20DC/counter modules):

  • Hardware-level response times in the microsecond range
  • Edge detection and nettime timestamps at the module level
  • Offloads time-critical processing from the CPU to the I/O module itself

6. Memory Management

6.1 Memory Regions

AR uses a structured memory layout with named partitions. For the complete CP1584 address map with specific addresses and sizes, see memory-map.md. For battery-backed data management, see retentive-data.md.

Memory AreaTypePersistencePurpose
User ROMFlashNon-volatileProgram code, configuration, data objects
User RAMDRAMVolatileRuntime variables, heap, stack
RetainBattery-backed / FlashPersistent (power cycle)Retained variable values
RemanentFlashPersistent (power cycle)Remanent variable values (no battery)
SystemDRAM/FlashMixedAR kernel, drivers, system tasks
I/ODRAMVolatileProcess image (input/output data)

6.2 Memory Configuration

  • Memory sizes are configurable per controller in the CPU properties (Memory configuration section)
  • Configurable devices for Retain and Remanent memory
  • Must ensure configured sizes >= used sizes (build error if insufficient)
  • Automation Studio provides offline memory usage analysis

6.3 Heap Management

  • AsMem library provides memory allocation functions for dynamic memory
  • No detailed public documentation on heap implementation (VxWorks memPartLib / memLib likely underneath)
  • Memory fragmentation can occur with dynamic allocation
  • System tasks like NvFlushHandler handle non-volatile memory flush operations

6.4 Stack Management

  • Each task has its own stack (size typically configurable)
  • No public documentation on default stack sizes or limits
  • Stack overflow could cause page faults

6.5 Memory Protection

  • Limited memory protection between user tasks (flat address space)
  • The processor MMU can detect accesses to invalid/protected memory regions → triggers page fault (error 25314)
  • No isolation between tasks — a corrupt pointer in one task can corrupt another task’s data
  • Memory can become invalid and be relocated during online transfers, causing “Value applied from references” issues

6.6 Memory Access Violations

Error 6804 (memory access violation) can precede error 25314 (page fault / EXCEPTION). The AR exception handler logs these and transitions the controller to Service Mode.


7. Hardware Abstraction Layer (HAL)

7.1 Purpose

The HAL is a B&R-developed abstraction layer that sits between the AR runtime and the underlying hardware:

“Thanks to an abstraction layer, applications run identically on all B&R hardware platforms.” — B&R Automation Runtime product page

7.2 What the HAL Abstracts

  • Processor architecture (PowerPC → Intel Atom → Intel Core i migration)
  • Memory controller and bus interfaces
  • I/O bus (X2X backplane communication)
  • Communication interfaces (Ethernet, POWERLINK, USB, serial)
  • Storage (CompactFlash, CFast, SATA flash, onboard flash)
  • Hardware timers and interrupt controllers

7.3 HAL Benefits

  • Portability: User programs compiled once can run on different B&R controllers
  • Hardware independence: Same program runs on X20CP1584, X20CP1684, APC910, etc.
  • Online software comparison: AR can compare the compiled code on the controller with the code in Automation Studio

8. Monitoring Runtime Behavior for Debugging

8.1 Automation Studio Profiler

  • Task and system runtime measurement built into Automation Studio
  • Shows per-task CPU usage, execution times, priorities
  • From AR 6.3+: multicore-aware profiler showing per-core utilization
  • Shows the TcIdleFiller no-op time separately
  • Can identify which tasks consume the most CPU time

8.2 System Diagnostics Manager (SDM)

  • Web-based diagnostic interface built into AR (V3.0+)
  • Accessible via standard web browser from any location
  • Displays:
    • CPU usage (historical and real-time)
    • Task class cycle times
    • Memory usage
    • System status
    • I/O module status
  • Runs as a low-priority system task — does not interfere with cyclic tasks
  • Opening SDM in a browser adds some CPU load due to cyclic data transfer (CGI interface)
  • CPU usage is calculated as: 100% - [time spent at Priority 0, IDLE]

8.3 Logger (Logbook)

  • Central logging system accessible via Automation Studio (Open → Logger) or SDM
  • Multiple log categories:
    • System log — OS-level events, errors, warnings (includes error 25314, 6804, etc.)
    • User log — Application-specific log entries via ArEventLog library
  • Each log entry has a timestamp, severity, and optional backtrace
  • Backtrace tab: For errors like page faults, shows the call stack with clickable links to source code (when debug symbols are available)
  • Logbook persists across reboots; stored on non-volatile memory

8.4 Watch Window

  • Real-time variable monitoring
  • Can watch any variable from any task
  • Does not require code changes

8.5 Trace (Oscilloscope)

  • Variable trace function for graphical display of variable values over time
  • Common commissioning tool for timing analysis

8.6 Single Step and Disassemble

  • Automation Studio supports single-stepping through code on the target
  • Disassemble function for examining compiled code
  • Debugger stops tasks (not cores) — in multicore, all instances of a task are stopped regardless of which core they run on

8.7 System Dump

  • Diagnostic tool for collecting complete logs from the PLC
  • Downloadable over Ethernet without needing a CF card
  • Includes logger files and system state information
  • Openable in Automation Studio for analysis

9. System Variables Exposed by AR

9.1 CPU Usage

  • LogIdleShow function block (AsArProf library) — provides CPU usage as a programmable variable
    • Returns the same value as the SDM CPU usage display
    • Based on underlying system functions measuring idle time
  • SDM: Always available via web interface
  • Not available as a direct CPU datapoint — must use LogIdleShow function block

9.2 Task Cycle Times

  • Visible in the Profiler and SDM
  • Shows current execution time per task class
  • Shows tolerance and configured cycle time
  • Task class idle time visible

9.3 Memory Usage

  • Automation Studio provides offline memory usage analysis (per variable, per task, total)
  • DRAM usage measured once on the target
  • Memory configuration sizes visible in CPU configuration
  • Used vs. configured for User ROM, User RAM, Retain, Remanent

9.4 CPU Temperature

  • Available as a CPU datapoint (unlike CPU usage)
  • Configurable datatype

9.5 I/O Module Status

  • Available via SDM and I/O configuration
  • Module insertion/removal detection
  • Diagnostic data per channel

9.6 System Task Information

Visible in the Profiler:

  • IDLE — priority 0 no-op task
  • TcIdleFiller — priority 3 no-op during task class idle time
  • NvFlushHandler — non-volatile memory flush handler
  • sataXbdReqSvc — SATA/flash disk request service
  • mvLoader — module loader
  • mvRpctxtfmt — runtime context formatting
  • ANSL, TCP, UDP, webserver, visualization tasks
  • I/O bus cycle tasks

10. Crash, Exception, and Watchdog Handling

10.1 Service Mode

When a critical error occurs, the controller enters Service Mode — all task classes are halted:

“Service mode means that no task classes are running on the PLC. The application program is not running; the PLC is halted.”

Triggers for Service Mode:

  1. Reset button pressed on the PLC
  2. “Stop Target” command from Automation Studio
  3. Critical error at runtime (the error-driven case)

10.2 Exception: Page Fault (Error 25314)

The most common runtime crash:

“The processor throws an exception to the operating system if it tries to access an invalid or protected memory location. The B&R operating system logs this type of serious memory violation as a page fault (error 25314).”

Causes:

  • Null or incorrect pointer
  • Division by zero
  • Array index out of bounds
  • Incorrect memory copy (buffer overflow)
  • Memory relocation during online transfer

Diagnostic procedure:

  1. Check the Logger (System log) for error 25314
  2. Examine the Backtrace tab — may link directly to source code
  3. Add IecCheck or AdvIecChk library for enhanced diagnostics
  4. Systematically disable tasks to isolate the faulting task
  5. Use remanent variables to narrow down faulting code section

10.3 Exception: Memory Access Violation (Error 6804)

  • Can precede or accompany error 25314
  • Indicates the processor detected invalid memory access before the full page fault

10.4 Cycle Time Violation (Watchdog Timeout)

  • When a task class exceeds its configured cycle_time + tolerance
  • Logged in the logbook
  • Can trigger Service Mode (controller halts)
  • AR 6.6.2 fix: Watchdog now also triggers when task is in safe state (e.g., critical section)

10.5 Watchdog Behavior Summary

Violation TypeError CodeAction
Page Fault25314Enter Service Mode, log backtrace
Memory Access Violation6804Log error, may lead to 25314
Cycle Time ViolationvariesLog error, may enter Service Mode
IEC Runtime Error (with IecCheck)55555Enter Service Mode with detailed info
User ROM clearedvariesAuto-restart into diagnostic mode

10.6 Exception During Startup

  • Documented issue: intermittent “EXCEPTION Page Fault” during startup
  • Error chain: 6804 memory access violation → 25314 page fault
  • Related to mvLoader and mvRpctxtFmt threads during module loading
  • Can be caused by memory moving around during transfer

10.7 Crash Handling Flow

Exception occurs (hardware trap)
    → VxWorks exception handler
    → B&R exception handler logs error
    → Error code written to logbook (with backtrace if available)
    → Controller enters Service Mode
    → All cyclic task classes halted
    → SDM, Logger, web interface remain available for diagnostics

11. File System

11.1 Storage Media

Controller TypeStorage
X20CP1584 and similarRemovable CompactFlash (CF) card
Newer controllersCFast card
C80 controllerOnboard SATA flash
Automation PC (APC)SSD/HDD + SATA flash

11.2 CF Card Contents

  • AR system image and boot files
  • User configuration
  • User programs (User ROM contents)
  • Logbook files
  • User files (created via AsFile library)
  • System dump files

11.3 File Operations from User Programs

The AsFile library provides file system access:

  • FileOpen — Open/create files on the CF card
  • FileRead / FileWrite — Read/write file data
  • FileClose — Close file handles
  • DirOpen / DirRead / DirClose — Directory operations
  • File paths reference the CF card’s file system

Important considerations:

  • File operations run as system tasks (priority 4–190 range)
  • Heavy file I/O can impact system performance (sataXbdReqSvc system task)
  • NvFlushHandler system task manages non-volatile memory writes (DataObj, logger objects, user files)
  • Files written during runtime persist on the storage media

11.4 File System Diagnostics

  • sataXbdReqSvc — system task handling SATA/flash disk requests
  • High CPU usage in this task can indicate excessive file writes
  • Configuration files can be deleted from CF card by system (reported bug on community)

11.5 CF Card Backup/Restore

  • Runtime Utility Center tool for creating backup images of CF/CFast cards
  • Image files can be stored on PC and restored to spare cards
  • LogBook can be retrieved directly from CF/CFast card

12. Networking Stack

12.1 TCP/IP Implementation

AR’s networking is built on VxWorks’ TCP/IP stack (historically Wind River’s IPnet stack):

“The vulnerability exists in the TCP/IP stack implementation of the underlying operating system.” — B&R Security Notice for NAME-WRECK vulnerability

  • This confirms AR uses the underlying VxWorks TCP/IP stack
  • B&R has issued security advisories related to VxWorks TCP/IP vulnerabilities (e.g., NAME-WRECK)

12.2 Network Protocols Supported

  • POWERLINK — B&R’s real-time Ethernet protocol (deterministic, time-critical)
  • Ethernet/IP — For interoperability with Rockwell/Allen-Bradley systems
  • Modbus TCP — Via AsMbTCP library
  • OPC UA — Client/Server and FX (fieldbus eXtensible) with multicore support (6.1+)
  • TCP/UDP sockets — Available via AsTCP/AsUDP libraries for custom protocols
  • REST/HTTP — Possible via socket-level implementation
  • SDM web interface — HTTP server built into AR

12.3 Network Architecture

  • Ethernet traffic handling runs as a system task (priority 4–190 range)
  • ANSL (Automation Network Service Layer) handles online communication between AS and the controller
  • POWERLINK cycle is deterministic and integrated with the I/O cycle
  • Network tasks yield to cyclic tasks — high cyclic load can block network responses (100-500ms delays)
  • X20HB8815 gateway module provides an additional Ethernet port for TCP/IP
  • Separates POWERLINK traffic from general TCP/IP traffic

13. AR Log System and Diagnostic Output

13.1 Logger Architecture

The Logger is AR’s central logging and diagnostic system:

Log Categories:

  • System log — OS and runtime events:
    • Startup/shutdown events
    • Error 25314 (page fault) with backtrace
    • Error 6804 (memory access violation)
    • Cycle time violations
    • I/O module events (insertion, removal, errors)
    • Watchdog events
    • System task events
  • User log — Application events via ArEventLog library:
    • Custom log entries with configurable severity
    • Accessed via logline function

13.2 Accessing the Logger

MethodAccess
Automation StudioOpen → Logger (Ctrl+L)
SDM (web)Logger page in web interface
System DumpLogger files included in system dump
CF/CFast cardLogBook files on storage media
ArEventLog libraryProgrammatic access from user code

13.3 Log Entry Format

  • Timestamp
  • Severity level
  • Error code (for system errors)
  • Description/message
  • Backtrace (for exceptions like 25314) — call stack with module names, addresses, and source line references

13.4 Backtrace Feature

For page fault (25314) entries:

  • Backtrace tab shows the call stack
  • Lines with green arrows can be double-clicked to jump to source code in Automation Studio
  • Requires debug symbols (not available for stripped/optimized builds)

13.5 User Logging (ArEventLog)

(* Example: Writing to user logbook *)
logline(severity_level, message_string);
  • The logline function uses the ArEventLog library
  • Entries appear in the Logger accessible via Ctrl+L or SDM
  • Useful for application-level diagnostics without custom file operations

13.6 Profiling Data

  • The Profiler provides runtime measurement data:
    • Per-task execution time
    • CPU usage percentage
    • Priority information
    • Time spent in idle vs. system vs. cyclic tasks
  • Available as a recording (trace) or real-time view
  • From AR 6.3+: per-core data in multicore systems

13.7 Logbook Persistence

  • Log entries are stored in non-volatile memory
  • Survives warm starts and power cycles
  • Log capacity is finite — oldest entries may be overwritten
  • System Dump collects the full logbook for offline analysis

14. Security Vulnerability History (VxWorks-Derived)

Because AR is based on VxWorks, it inherits vulnerabilities from the underlying OS components. B&R (now part of ABB) publishes Cyber Security Advisories when affected products are identified. This section documents known vulnerabilities relevant to the CP1584 running AR 4.x.

14.1 URGENT/11 (2019) — VxWorks TCP/IP Stack (IPnet)

Discovered by Armis Research, URGENT/11 comprised 11 vulnerabilities in the VxWorks IPnet TCP/IP stack affecting all VxWorks versions since 6.5. B&R issued Cyber Security Advisory #01/2019 confirming impact on AR.

Impact on CP1584:

  • Remote code execution possible via crafted TCP/IP packets
  • Denial of service via malformed network frames
  • Information leakage through stack-based buffer overflows
  • Affected AR versions: All AR versions using the vulnerable IPnet stack (most AR 3.x and early 4.x versions)

Mitigation: Update AR to the patched version specified in B&R’s advisory. Network isolation (VLAN, firewall) is the primary mitigation when patching is not immediately possible.

14.2 NAME-WRECK (2021) — DNS Protocol Vulnerabilities

B&R issued a separate security notice for NAME-WRECK, a set of DNS-related vulnerabilities in VxWorks’ TCP/IP implementation.

  • Affected: AR versions using VxWorks IPnet stack
  • Impact: Remote code execution, denial of service via crafted DNS responses
  • Mitigation: Update AR; block unsolicited DNS traffic at the firewall

14.3 SA24P011 (August 2024) — Multiple VxWorks and OpenSSL Vulnerabilities

B&R published Cyber Security Advisory SA24P011 covering six CVEs in AR versions prior to 6.0.2:

CVEVulnerabilityCVSSImpact
CVE-2020-28895VxWorks memory allocator integer overflow (calloc)7.3 HighMemory corruption, DoS
CVE-2020-1971OpenSSL X.509 EDIPartyName NULL pointer deref5.9 MediumDoS via malicious certificate
CVE-2021-23840OpenSSL EVP_CipherUpdate integer overflow7.5 HighApp crash or incorrect behavior
CVE-2021-23841OpenSSL X509_issuer_and_serial_hash NULL deref5.9 MediumDoS via malicious certificate
CVE-2024-5800Weak Diffie-Hellman groups in SSL/TLS stack6.5 MediumDecryption of SSL/TLS communications
CVE-2024-5801IP forwarding enabled by default6.5 MediumNetwork segment bypass, packet injection

Affected AR versions: All versions before AR 6.0.2 — this includes the CP1584 running AR 4.x.

Practical implications for AR 4.x CP1584 systems:

  • The CP1584 cannot upgrade to AR 6.x (incompatible hardware). These vulnerabilities remain unpatched on AR 4.x systems.
  • CVE-2024-5800 (weak TLS) means FTP and OPC-UA communication using the built-in SSL/TLS may be decryptable.
  • CVE-2024-5801 (IP forwarding) means the PLC could be used as a network bridge to bypass firewall segmentation.
  • CVE-2020-28895 (memory corruption) could allow remote DoS via crafted packets.

Mitigation for unpatched AR 4.x systems:

  1. Network isolation: Place the CP1584 on a dedicated VLAN with no direct internet access. Allow only necessary protocols (ANSL on 11169, POWERLINK on dedicated interface, FTP on 21).
  2. Disable IP forwarding if possible via the runtime firewall configuration.
  3. Block unnecessary services — if FTP is not needed, disable it. If SDM web access is not needed, restrict access.
  4. Use VPN for remote access — never expose B&R PLC interfaces directly to the internet.
  5. Monitor for anomalous traffic — use SNMP or an IIoT platform to detect unusual network activity from the PLC.

14.4 CVE-2025-11044 (January 2026) — ANSL Server DoS (Race Condition)

B&R published SA25P005 identifying a permanent denial-of-service vulnerability in the ANSL Server component of AR. CISA also published ICSA-26-125-03.

DetailValue
CVECVE-2025-11044
CVSSv3.1 6.8 (Medium), v4.0 8.9 (High)
CWECWE-770 (Allocation of Resources Without Limits or Throttling)
AffectedAR < 6.5.0 and AR < R4.93
ImpactPermanent DoS — ANSL Server crash requiring controller restart
AuthenticationUnauthenticated (network-based)
AdvisoryB&R SA25P005 (2026-01-19)

Exploitation details: The vulnerability is caused by insufficient throttling and limiting mechanisms in the ANSL Server. Successful exploitation requires winning a race condition (not guaranteed on every attempt). B&R determined that shorter cycle times in customer projects increase the likelihood of exploitation.

Mitigation for unpatched AR 4.x systems:

  1. Update to AR R4.93 or later (patches this vulnerability on the CP1584 platform)
  2. For versions that cannot be updated: increase application cycle times (longer cycles reduce exploit probability)
  3. Configure the Control Network Firewall to limit maximum data traffic and concurrent connections to the ANSL server to no more than 80% of measured peak traffic
  4. Test maximum load capacity before commissioning

14.5 CVE-2025-3450 (October 2025) — SDM DoS (Improper Resource Locking)

B&R published SA25P002 identifying a denial-of-service vulnerability in the System Diagnostics Manager (SDM) web interface.

DetailValue
CVECVE-2025-3450
CVSSv3.1 7.5 (High), v4.0 8.2 (High)
AffectedAR < 6.3 and AR = 6.0
ImpactSystem node stop via crafted SDM request
AuthenticationUnauthenticated (network-based)
AdvisoryB&R SA25P002 (2025-10-07)

Practical implications for CP1584: All AR 4.x versions are affected. An attacker who can reach the SDM web interface (port 80) can send a specially crafted message to crash the entire controller. See diagnostics-sdm.md for SDM-specific mitigations.

Mitigation for CP1584:

  1. Restrict SDM access to trusted personnel only — disable SDM in the AS project if not needed for maintenance
  2. Configure the HTTP protocol over TLS (HTTPS) — use mutual TLS (mTLS) in AS project option “Validate SSL communication partner”
  3. Restrict webserver access to trusted IP addresses using the AR host-based firewall (Automation Help GUID 75b8994b-f97a-4e0f-8278-43c2a737e65f)
  4. Block port 80/443 at the network firewall except during active maintenance windows

14.6 CVE-2025-11043 (January 2026) — Automation Studio Certificate Validation

B&R published SA25P004 identifying insufficient server certificate validation in Automation Studio’s ANSL and OPC-UA clients.

DetailValue
CVECVE-2025-11043
CVSSv3.1 7.4 (High), v4.0 9.1 (Critical)
CWECWE-295 (Improper Certificate Validation)
AffectedAutomation Studio < 6.5
ImpactMan-in-the-middle — attacker can spoof trusted server, intercept data, alter PLC program during transfer
AdvisoryB&R SA25P004 (2026-01-19)

Practical implications: This affects the engineering workstation, not the PLC directly. However, if you use Automation Studio to connect to a CP1584 over an untrusted network, an attacker could impersonate the PLC and inject malicious code during online changes or program transfers. Critical for remote maintenance scenarios.

Mitigation:

  1. Update Automation Studio to version 6.5
  2. Operate Automation Studio within Level 2 of the ABB ICS Cyber Security Reference Architecture
  3. Never connect Automation Studio to PLCs over public networks or untrusted WiFi
  4. Use VPN with proper certificate validation for any remote maintenance

14.7 CVE-2025-3449 — Automation Studio Privilege Escalation

DetailValue
CVECVE-2025-3449
CVSSHigh
AffectedAutomation Studio (specific versions pending)
ImpactIncorrect Permission Assignment for Critical Resource — privilege escalation

An attacker with local access to the engineering workstation could exploit this to gain elevated privileges. Relevant for shared engineering workstations or compromised developer laptops.

14.8 CVE-2024-0323 — FTP Server Weak TLS

DetailValue
CVECVE-2024-0323
CVSS9.8 (Critical)
AffectedAutomation Runtime (all versions with FTP enabled)
ImpactMan-in-the-middle on FTP connections; supports SSLv3, TLSv1.0, TLSv1.1

Practical implications for CP1584: The built-in FTP server uses insecure encryption. Any FTP session to/from the CP1584 (including CF card backup/restore) can be intercepted and decrypted. Do not use FTP over untrusted networks. This vulnerability is unlikely to be patched on AR 4.x.

14.9 CVE-2023-3242 — Portmapper DoS

DetailValue
CVECVE-2023-3242
CVSS8.6 (High)
AffectedAutomation Runtime < G4.93
ImpactPermanent denial-of-service via improper initialization in Portmapper
AuthenticationUnauthenticated (network-based)

Patched in AR R4.93. On older AR 4.x versions, the Portmapper service can be exploited to permanently crash the controller.

14.10 CVE-2023-1617 — VC4 VNC Authentication Bypass (Critical)

DetailValue
CVECVE-2023-1617
CVSS9.8 (Critical)
AffectedB&R VC4 (VNC Server): 3.x–4.45.3, 4.7.x–4.72.9
ImpactUnauthenticated bypass of VNC authentication — full HMI access without credentials
CWECWE-287 (Improper Authentication)

Practical implications for CP1584: If the CP1584 runs a visualization (mapp View, VC4), an attacker on the network can connect to the VNC server (port 5900) and see the full HMI display without any authentication. This exposes all machine state, operator interactions, and potentially allows input injection.

Mitigation:

  1. Update VC4 to the latest version (4.45.1+ or 4.72.9+)
  2. Block VNC ports (5900, 5800) at the network firewall
  3. Disable VNC if not needed for remote monitoring
  4. See access-recovery.md for VNC security guidance

14.11 CVE-2021-22289 — Automation Studio Code Injection (Project Upload)

DetailValue
CVECVE-2021-22289
CVSS8.3 (High)
AffectedAutomation Studio >= 4.0
ImpactRemote code execution via malicious project upload mechanism
AuthenticationUnauthenticated (network-based)

If Automation Studio is running and listening for incoming connections, a network attacker could exploit the project upload mechanism to execute arbitrary code on the engineering workstation.

14.12 CVE-2021-22275 — AR Webserver Buffer Overflow

DetailValue
CVECVE-2021-22275
CVSS8.6 (High)
AffectedAutomation Runtime
ImpactUnauthenticated attacker can stop cyclic program and cause DoS via webserver buffer overflow

Practical implications for CP1584: An attacker sending a crafted HTTP request to the PLC’s web interface (port 80) can crash the cyclic program, stopping the machine. This is distinct from CVE-2025-3450 which targets SDM specifically.

14.13 CVE-2022-4286 — SDM Reflected XSS

DetailValue
CVECVE-2022-4286
CVSS6.1 (Medium)
AffectedAutomation Runtime >= 3.00 and <= C4.93
ImpactReflected cross-site scripting in SDM web interface

Patched in AR R4.93. If an authenticated user visits a malicious URL while logged into SDM, JavaScript can execute in their browser session. See diagnostics-sdm.md.

14.14 CVE-2024-2637 — Search Path Code Execution

DetailValue
CVECVE-2024-2637
CVSS7.2 (High)
AffectedMultiple B&R products including Automation Runtime, mapp components, ADI driver, HMI Service Center
ImpactLocal code execution via uncontrolled search path element
CWECWE-427

An authenticated local attacker could place specially crafted files in the loading search path to execute malicious code. Relevant for shared engineering workstations.

14.15 CVE-2025-3449 — SDM Predictable Session ID (Session Takeover)

B&R published SA25P003 (CISA ICSA-26-141-04) identifying a session takeover vulnerability in SDM.

DetailValue
CVECVE-2025-3449
CVSSv3.1 4.2 (Medium)
CWECWE-340 (Generation of Predictable Numbers or Identifiers)
AffectedAR < 6.4
ImpactUnauthenticated attacker can take over an already-established SDM session by guessing the predictable session ID
AuthenticationUnauthenticated (network-based)
AdvisoryB&R SA25P003 (2025-10-07), CISA ICSA-26-141-04

Practical implications for CP1584: All AR 4.x versions are affected. Since SDM does not implement authentication in older AR versions, session takeover could allow an attacker to view diagnostic data or inject commands if they can predict the session ID. However, B&R notes that SDM “does not process any session-specific data” at this time, so the practical impact is limited to browser-level interaction.

Mitigation for CP1584:

  1. Update to AR R4.93 if possible (partial mitigation — does not fix this CVE on AR 4.x)
  2. Block SDM access (port 80/443) at the network firewall when not actively debugging
  3. Never access SDM over public networks or untrusted WiFi
  4. Use VPN for remote SDM access

14.16 CVE-2025-3448 — SDM Reflected XSS (New)

DetailValue
CVECVE-2025-3448
CVSSv3.1 6.1 (Medium)
CWECWE-79 (Improper Neutralization of Input During Web Page Generation)
AffectedAR < 6.4
ImpactReflected XSS — attacker can execute arbitrary JavaScript in the context of the victim’s browser session via crafted SDM URL
AuthenticationRequires user interaction (victim must click malicious link)
AdvisoryB&R SA25P003 (2025-10-07), CISA ICSA-26-141-04

Practical implications for CP1584: All AR 4.x versions are affected. This is distinct from CVE-2022-4286 (which was patched in R4.93). An attacker could craft a malicious link that, when clicked by an authenticated user, executes JavaScript in their browser. The exploit requires social engineering.

Mitigation: Do not click untrusted links while authenticated to SDM. Deploy a Web Application Firewall (WAF) to filter reflected XSS attempts. Block SDM at the network level when not needed.

14.17 CVE-2025-11498 — SDM CSV Injection

DetailValue
CVECVE-2025-11498
CVSSv3.1 6.1 (Medium)
CWECWE-1236 (Improper Neutralization of Formula Elements in a CSV File)
AffectedAR < 6.4
ImpactAttacker can inject formula data into a generated CSV file via crafted SDM URL. The CSV must then be manually opened by the victim in a spreadsheet application (e.g., Excel) that evaluates formulas.
AuthenticationRequires user to click malicious link AND manually open resulting CSV
AdvisoryB&R SA25P003 (2025-10-14), CISA ICSA-26-141-04

Practical implications for CP1584: All AR 4.x versions are affected. This is a multi-step attack requiring both clicking a malicious link and opening a CSV export. The impact is limited to the user’s machine (formula injection in spreadsheets can execute local commands in some configurations).

Mitigation: Never use hyperlinks from untrusted sources to access SDM. Disable CSV export functionality in SDM if not needed. Be cautious opening CSV files exported from SDM if the URL source was not manually typed.

14.18 CVE-2026-0936 — PVI Logfile Credential Leak

DetailValue
CVECVE-2026-0936
CVSS5.0 (Medium)
CWECWE-532 (Insertion of Sensitive Information into Log File)
AffectedPVI client versions prior to 6.5
ImpactPVI client logging function (disabled by default) may log credential information processed by the PVI client application
AuthenticationRequires local authenticated attacker + logging explicitly enabled
AdvisoryB&R SA26P001 (2026-01-29)

Practical implications for CP1584: The PVI logging feature is disabled by default and must be explicitly enabled. If enabled, PVI may log sensitive information including connection credentials used to access the PLC. If you have enabled PVI logging on your diagnostic workstation, review log files for embedded credentials before sharing them.

Mitigation: Do not enable PVI logging unless actively debugging PVI communication issues. Purge any existing PVI log files that may contain credentials.

14.19 CVE-2025-11043 — Automation Studio Certificate Validation Bypass

DetailValue
CVECVE-2025-11043
CVSS7.4 (High)
CWECWE-295 (Improper Certificate Validation)
AffectedAutomation Studio versions before 6.5
ImpactOPC-UA client and ANSL over TLS client in AS could accept certificates from unauthorized parties, allowing MITM attacks
AuthenticationUnauthenticated (network-based)
AdvisoryB&R SA25P004 (2026-01-19)

Practical implications for CP1584: When using Automation Studio to connect to a CP1584 over TLS-secured ANSL connections, an attacker on the network could intercept and modify the communication. This affects the engineering workstation, not the PLC directly, but could lead to malicious code being downloaded to the PLC.

Mitigation: Upgrade to Automation Studio 6.5+. If stuck on AS 4.x, use direct IP connections on an isolated network segment rather than relying on TLS for security.

14.20 CVE-2025-11482 — PPT30 OPC-UA Server Connection Exhaustion DoS

DetailValue
CVECVE-2025-11482
CVSS7.5 (High)
CWECWE-400 (Uncontrolled Resource Consumption)
AffectedPPT30 Operating System versions before 1.8.0
ImpactUnauthenticated network-based attacker can permanently prevent legitimate users from accessing the OPC-UA service by exhausting connection resources
AdvisoryB&R SA25P006 (2026-05-26)

Practical implications: If the machine uses a PPT30 HMI panel with OPC-UA server enabled, an attacker on the same network can exhaust the OPC-UA connection pool, denying access to OPC-UA data. Block OPC-UA port (4840) at the switch port if the PPT30 does not need external OPC-UA access.

14.21 CVE-2024-8603 — Broken or Risky Cryptographic Algorithm in SSL/TLS

DetailValue
CVECVE-2024-8603
CVSSv3.1 7.5 (High), v4.0 8.2 (High)
CWECWE-327 (Use of a Broken or Risky Cryptographic Algorithm)
AffectedAR before 6.1, mapp View before 6.1
ImpactUnauthenticated network attacker can masquerade as services on impacted devices
AuthenticationUnauthenticated (network-based)
AdvisoryB&R SA25P001 (2025-01-15)

Practical implications for CP1584: All AR 4.x versions use the affected SSL/TLS component. An attacker on the network could impersonate legitimate services (OPC-UA server, SDM, FTP) by exploiting weak cryptographic algorithms in the TLS implementation. This is distinct from CVE-2024-5800 (weak DH groups) — this vulnerability relates to the broader SSL/TLS algorithm selection, including cipher suite negotiation and certificate validation weaknesses.

Mitigation for CP1584:

  1. Network isolation — place CP1584 on a dedicated VLAN with no direct internet access
  2. Use VPN with proper certificate validation for any remote access
  3. Do not trust TLS connections from AR 4.x devices — the cryptographic protection is inadequate
  4. Consider using OPC-UA with security policy “None” on internal networks rather than relying on broken TLS for protection — a broken TLS session provides a false sense of security
  5. This vulnerability is unpatchable on AR 4.x — requires AR >= 6.1 for the fix

Source: NVD CVE-2024-8603, B&R SA25P001 advisory PDF

14.22 CVE-2024-5800 — Weak Diffie-Hellman Groups in TLS Stack

DetailValue
CVECVE-2024-5800
CVSS7.5 (High)
CWECWE-326 (Inadequate Encryption Strength)
AffectedAR versions before 6.0.2
ImpactInsufficient Diffie-Hellman group strength allows network attacker to decrypt SSL/TLS communications
AdvisoryB&R SA24P011 (2024-08-09, updated 2024-08-30)

Practical implications for CP1584: All AR 4.x versions use weak DH groups. Any TLS-encrypted communication (FTP over TLS, HTTPS for SDM on AR 6.x, OPC-UA with security) on a CP1584 running AR 4.x is vulnerable to decryption by a network attacker with sufficient computational resources. This means FTP credentials and OPC-UA data transmitted over TLS on AR 4.x PLCs should be considered compromised if the network is not physically secured.

Mitigation: Use network isolation rather than relying on TLS encryption. For FTP access, accept that credentials may be intercepted on AR 4.x and use ephemeral credentials. For OPC-UA, use a VPN tunnel or dedicated VLAN for additional protection.

14.22 CVE-2026-6900/6901 — APROL Certificate Validation and Search Path (APROL-only)

DetailValue
CVECVE-2026-6900 (CVSS 7.4) / CVE-2026-6901 (CVSS 7.7)
AffectedAPROL before R 4.4-01P5
ImpactImproper certificate validation + untrusted search path
AdvisoryB&R SA26P011 (2026-07-06)

Note: APROL is B&R’s process control system (DCS/SCADA), not directly related to CP1584 PLCs. Listed here for completeness as it affects B&R products.

14.23 Complete B&R Security Advisory Timeline (2024-2026)

The following table provides a chronological reference of all B&R security advisories affecting Automation Runtime and related components. This is critical for understanding what firmware versions address which vulnerabilities.

DateAdvisoryProducts AffectedCVE(s)SeverityAR Version Fix
2024-02-05SA23P004AR FTP(legacy)MediumAR 6.x (TLS hardening)
2024-02-05SA23P018AR SDMCVE-2022-4286MediumAR R4.93
2024-02-14SA24P004AR SSH(TerraPin)MediumUpdated SSH component
2024-02-22SA23P019AS + TGCVE-2024-0220HighAS 4.12+ / Updated TG
2024-04-10SA24P002B&R PCs/HMI(LogoFail)MediumUEFI firmware update
2024-05-14SA24P005Multiple B&R productsCVE-2024-2637High (7.2)Product-specific updates
2024-08-09SA24P011AR (multiple)CVE-2024-5800, othersHighAR R4.93 / AR 6.x
2024-11-27SA22P014mapp components(auth bypass)Highmapp component updates
2025-01-15SA25P001AR SSL/TLS, PVI clientCVE-2024-8603, CVE-2026-0936High (7.5-8.2)AR >= 6.1 / PVI >= 6.5
2025-03-24SA24P015APROLCVE-2022-43762/63/64Critical (9.8)APROL R 4.4-01P5
2025-10-07SA25P002AR SDMCVE-2025-3450High (7.5)AR >= 6.3 / R4.93
2025-10-07SA25P003AR SDMCVE-2025-3448/3449/11498Medium (4.2-6.1)AR >= 6.4
2026-01-19SA25P004Automation StudioCVE-2025-11043High (7.4)AS >= 6.5
2026-01-19SA25P005AR ANSLCVE-2025-11044Medium (6.8)AR >= 6.5 / R4.93
2026-01-29SA26P001PVI clientCVE-2026-0936Medium (5.0)PVI >= 6.5
2026-02-18SA25P007Automation Studio (SQLite)(SQLite vuln)MediumAS update
2026-05-26SA25P006PPT30 OPC-UACVE-2025-11482MediumPPT30 firmware update
2026-06-10SA26P009B&R products (XZ Utils)CVE-2024-3094 relatedCriticalUpdated system components
2026-06-11SA26P010B&R products (Linux kernel)CVE-2026-31431, CVE-2026-43284, CVE-2026-46333, CVE-2026-46300, CVE-2026-43494High (7.8)Linux for B&R <=12, APROL, X20EDS410
2026-07-06SA26P011APROLCVE-2026-6900/6901High (7.4-7.7)APROL R 4.4-01P5

Key takeaway for CP1584 operators: The CP1584 maxes out at AR R4.93, which patches CVE-2025-3450 (critical SDM data deletion), CVE-2025-11044 (ANSL DoS), CVE-2024-5800 (weak TLS), and CVE-2022-4286 (SDM XSS). However, 20+ CVEs remain unpatchable on AR 4.x, including all SA25P003 vulnerabilities (session takeover, XSS, CSV injection) and all certificate validation issues. Network isolation is not optional — it is mandatory.

14.24 Security Posture Summary for CP1584 (Updated)

AR VersionURGENT/11NAME-WRECKSA24P011CVE-2025-11044CVE-2025-3450SA25P003CVE-2024-5800CVE-2024-0323CVE-2021-22275CVE-2023-1617CVE-2025-11043 (AS)CVE-2026-0936 (PVI)Recommendation
AR 3.xVulnerableVulnerableVulnerableVulnerableVulnerableVulnerableVulnerableVulnerableVulnerableVulnerableN/A (AS-side)N/A (PVI-side)Critical — isolate immediately
AR 4.10-4.80Partially patchedPartially patchedVulnerableVulnerableVulnerableVulnerableVulnerableVulnerableVulnerableVulnerableN/A (AS-side)N/A (PVI-side)High — update to 4.93 if possible
AR 4.90-4.92PatchedPatchedVulnerableVulnerableVulnerableVulnerableVulnerableVulnerableVulnerableVulnerableN/A (AS-side)N/A (PVI-side)High — network isolation critical
AR 4.93 (R4.93)PatchedPatchedPartiallyPatchedPatchedVulnerablePartiallyVulnerableVulnerableUpdate VC4N/A (AS-side)N/A (PVI-side)Medium — best achievable for CP1584

SA25P003 covers CVE-2025-3449 (SDM session takeover), CVE-2025-3448 (SDM reflected XSS), and CVE-2025-11498 (SDM CSV injection). These require AR >= 6.4 to patch and cannot be patched on any AR 4.x version.

Key observations:

  • AR R4.93 patches CVE-2025-11044 (ANSL DoS), CVE-2025-3450 (critical SDM data deletion), CVE-2023-3242, CVE-2022-4286 (SDM XSS), and partially addresses SA24P011
  • CVE-2025-11043 (AS certificate validation) and CVE-2026-0936 (PVI credential logging) affect the engineering workstation software, not the PLC runtime. Mitigate by upgrading AS to 6.5+ and keeping PVI logging disabled.
  • No AR 4.x version patches CVE-2024-0323 (FTP weak TLS), CVE-2021-22275 (webserver buffer overflow), CVE-2024-5800 (weak DH groups), CVE-2024-8603 (broken/risky crypto algorithm in SSL/TLS), CVE-2023-1617 (VC4 VNC bypass), or any SA25P003 CVEs (SDM XSS/session/CSV injection)
  • The SA25P003 vulnerabilities (CVE-2025-3448, CVE-2025-3449, CVE-2025-11498) further strengthen the case for disabling SDM on production CP1584s when not actively needed
  • The VC4 VNC authentication bypass is independently patchable via VC4 component updates
  • FTP should be considered insecure on all AR 4.x versions — the weak DH groups (CVE-2024-5800) and broken crypto algorithms (CVE-2024-8603) in AR 4.x TLS mean even TLS-encrypted FTP sessions may be decryptable
  • Total unpatchable CVEs on CP1584 (AR R4.93): 20+ known vulnerabilities remain unpatchable due to the AR 4.x ceiling. Network isolation is mandatory, not optional.

14.25 SA26P009 (June 2026) — XZ Utils Vulnerability Impact on B&R Products

DetailValue
AdvisoryB&R SA26P009 (2026-06-10)
CVERelated to CVE-2024-3094 (XZ Utils backdoor)
AffectedB&R products incorporating XZ Utils
ImpactSupply chain compromise risk via compromised compression library

CP1584 impact: NONE. The CP1584 runs VxWorks, not Linux, and does not use XZ Utils. SA26P009 affects B&R products that run Linux (Automation PCs, Linux for B&R, APROL, edge controllers). The XZ Utils vulnerability (CVE-2024-3094) was a backdoor inserted into the xz compression library that could enable unauthorized SSH access on affected systems. While this was one of the most significant supply chain attacks in recent history, it does not affect VxWorks-based PLCs like the CP1584.

Source: B&R SA26P009 advisory PDF, CISA AL26-009

14.26 SA26P010 (June 2026) — Linux Kernel Vulnerabilities Impact on B&R Products

DetailValue
AdvisoryB&R SA26P010 (2026-06-11)
CVEsCVE-2026-31431, CVE-2026-43284, CVE-2026-46333, CVE-2026-46300, CVE-2026-43494
CVSSv3.1 7.8 (High)
AffectedLinux for B&R <=12, APROL <4.4-010.10.260602, X20EDS410 /all
ImpactLocal privilege escalation to root on affected Linux-based systems
AdvisoryB&R SA26P010 / CISA ICSA-26-174-06

CP1584 impact: NONE. The CP1584 runs VxWorks (AR), not Linux. SA26P010 affects only B&R products that include a Linux kernel: Automation PCs running “B&R for Linux,” APROL process control systems, and the X20EDS410 edge controller. The X20CP1584 is a pure VxWorks PLC and is not affected by any Linux kernel vulnerability.

For migration planning: If you are planning to migrate from CP1584 to an X20CP3xxx series or APC platform, be aware that these newer controllers may run Linux components and will require ongoing Linux kernel security patches. See remanufacturing.md for migration analysis.

Source: B&R SA26P010 advisory PDF, CISA ICSA-26-174-06

Control Network Firewall Rules for B&R CP1584:

  INBOUND:
    Allow TCP 11169  from [Engineering subnet]     — ANSL (Automation Studio online)
    Allow TCP 4840   from [SCADA/HMI subnet]        — OPC-UA (if used)
    Allow UDP 123    from [NTP server]               — NTP time sync
    Allow TCP 80/443 from [Maintenance subnet]       — SDM (restrict to maintenance windows only)
    Block TCP 21     from ALL                       — FTP (insecure, use only for emergency backup)
    Block TCP 5900   from ALL                       — VNC (update VC4 first if needed)
    Block ALL        from [Office/Guest networks]    — No PLC access from non-control networks

  OUTBOUND:
    Allow UDP 123    to [NTP server]                 — NTP time sync
    Allow TCP 11160  to [PVI Manager IP]             — PVI callbacks
    Block ALL other outbound                        — PLC should not initiate external connections

The CP1584 cannot be fully patched against all known vulnerabilities. The best achievable security posture is AR R4.93 (latest AR 4.x) with updated VC4, combined with strict network isolation, firewall rules above, and disabling all unnecessary services. See access-recovery.md for security implications, network-architecture.md for network isolation guidance, and diagnostics-sdm.md for SDM-specific mitigations.


Appendix A: Source URLs

SourceURL
B&R Community: “The OS behind AR”https://community.br-automation.com/t/the-os-behind-ar/3303
B&R Automation Runtime Product Pagehttps://www.br-automation.com/en-us/products/software/automation-runtime/
B&R Cyber Security Advisory #01/2019 (VxWorks)https://www.br-automation.com/fileadmin/2019_01_VxWorks_IPnet_Vulnerabilities_en-ffaeca09.pdf
B&R exOS Press Releasehttps://www.br-automation.com/en/about-us/press-room/new-freedom-through-it-ot-integration-09-12-2020/
B&R Community: “Idle task class and TcIdleFiller”https://community.br-automation.com/t/idle-task-class-and-tcidlefiller/1451
TM213 Training Manual (Automation Runtime V4.1)https://www.scribd.com/document/916397506/TM213TRE-40-EnG-Automation-Runtime-V4100-B-R-Acopos
B&R Community: “Troubleshooting Page Faults”https://community.br-automation.com/t/troubleshooting-page-faults/494
B&R Community: “CPU usage FUB”https://community.br-automation.com/t/is-there-a-fub-or-i-o-datapoint-to-read-the-cpu-usage/2825
B&R Community: “Multicore Processing in AS6”https://community.br-automation.com/t/innovation-2025-multicore-processing-in-automation-software-6/8477
B&R Community: “Service Mode”https://community.br-automation.com/t/service-mode-what-is-it-and-how-to-collect-diagnostics/1613
B&R Community: “Hardware Interrupt”https://community.br-automation.com/t/hardware-interrupt-equivalent-or-alternative-function/4743
B&R Community: “NvFlushHandler CPU load”https://community.br-automation.com/t/cpu-loading-is-increased-by-10-in-c80-controller-due-to-system-tasks-nvflushhandler-and-sataxbdreqsvc/7696
B&R Community: “Page Fault during startup”https://community.br-automation.com/t/intermittent-exception-page-fault-during-startup-mvloader-mvrpctxtfmt-threads/10157
B&R Community: “System Dump”https://community.br-automation.com/t/how-to-collect-a-system-dump-from-a-b-r-controller/10497
B&R Community: “Access to logging”https://community.br-automation.com/t/access-to-logging-in-plc/3243
B&R Community: “Memory relocation”https://community.br-automation.com/t/value-applied-from-references/7017
B&R Community: “Two Operating Systems”https://www.br-automation.com/en/about-us/customer-magazine/2018/20189/two-operating-systems-on-one-device/
B&R X20CP1584 Product Pagehttps://www.br-automation.com/en-us/products/plc-systems/x20-system-coated/x20-plc/x20ccp1584/
B&R NAME-WRECK Security Noticehttps://www.br-automation.com/fileadmin/2021-03-Security-Notice-NAME-WRECK-f442adc5.pdf
B&R SA24P011 (Multiple Vulnerabilities)https://www.br-automation.com/fileadmin/SA24P011-d8aaf02f.pdf
B&R SA25P002 — CVE-2025-3450 (SDM DoS)https://www.br-automation.com/fileadmin/SA25P002-f6a69e61.pdf
B&R SA25P004 — CVE-2025-11043 (AS Certificate Validation)https://www.br-automation.com/fileadmin/SA25P004-4f45197f.pdf
B&R SA25P005 — CVE-2025-11044 (ANSL Server DoS)https://www.br-automation.com/fileadmin/SA25P005-26597bd0.pdf
CISA ICSA-26-125-03 (CVE-2025-11044)https://www.cisa.gov/news-events/ics-advisories/icsa-26-125-03
OpenCVE B&R Vulnerability Databasehttps://app.opencve.io/cve/?vendor=br-automation
Armis URGENT/11 Researchhttps://www.armis.com/research/urgent-11/
B&R Diagnostics Product Pagehttps://www.br-automation.com/en-us/products/software/additional-information/diagnostics/
B&R Programming Training (IRQ)https://www.infoplc.net/files/descargas/b_r/infoplc_net_br_leccion_2_basic_programing.pdf
awesome-B&R (GitHub)https://github.com/hilch/awesome-B-R
B&R SA25P003 — CVE-2025-3449/3448/11498 (SDM XSS/Session/CSV)https://www.cisa.gov/news-events/ics-advisories/icsa-26-141-04
B&R SA26P001 — CVE-2026-0936 (PVI Logfile Credential Leak)https://br-cws-assets.de-fra-1.linodeobjects.com/SA26P001-2862434c.pdf
B&R SA25P004 — CVE-2025-11043 (AS Certificate Validation)https://br-cws-assets.de-fra-1.linodeobjects.com/SA25P004-4f45197f.pdf
B&R SA25P005 — CVE-2025-11044 (ANSL Server DoS)https://br-cws-assets.de-fra-1.linodeobjects.com/SA25P005-26597bd0.pdf
B&R SA25P006 — CVE-2025-11482 (PPT30 OPC-UA DoS)https://br-cws-assets.de-fra-1.linodeobjects.com/SA25P006-0eec719c.pdf
B&R SA26P009 — XZ Utils Impact on B&R Productshttps://br-cws-assets.de-fra-1.linodeobjects.com/SA26P009-b2b4dd6d.pdf
B&R SA26P010 — Linux Kernel Impact on B&R Productshttps://br-cws-assets.de-fra-1.linodeobjects.com/SA26P010-0ea64434.pdf
B&R SA26P011 — APROL R 4.4-01P5 Security Fixeshttps://br-cws-assets.de-fra-1.linodeobjects.com/SA26P011-661853b7.pdf
B&R Cyber Security Advisories Indexhttps://www.br-automation.com/en-us/service/cyber-security/cyber-security-advisories-and-notices/
B&R Lifecycle Policyhttps://www.br-automation.com/en/about-us/br-lifecycle/
B&R X20 20th Anniversary Press Releasehttps://www.br-automation.com/en/about-us/press-room/twenty-years-and-still-going-strong/

Cross-References


Key Findings

  1. Automation Runtime is confirmed VxWorks-based — B&R employees confirmed this on the community forum, and security advisories reference VxWorks vulnerabilities. Understanding VxWorks behavior helps explain AR’s characteristics.
  2. No user-defined ISRs exist in AR — deterministic timing is maintained by excluding user interrupt handlers. Use IRQ task classes for hardware events instead.
  3. All user tasks share a flat address space — no memory protection between tasks. A pointer error in one task can corrupt another task’s data. The IecCheck/AdvIecChk libraries provide runtime bounds checking for debugging.
  4. The TcIdleFiller mechanism can cause SDM to report artificially high CPU usage — idle time at the end of a task class cycle is filled with no-ops counted as CPU time, not actual idle.
  5. Page faults (error 25314) are the most common runtime crash — caused by null pointers, array bounds violations, or memory relocation during online transfers. The backtrace feature in the Logger is the primary diagnostic tool.
  6. exOS allows Linux to run alongside AR on multi-core controllers (not applicable to single-core CP1584, but relevant for migration planning to newer hardware).
  7. System tasks (networking, file I/O, SDM, OPC-UA) run at priorities 4-190, always below cyclic tasks (190-230). Heavy system task load can delay network responses but cannot affect real-time cyclic execution.

B&R CPU Memory Map and Direct Memory Access — Comprehensive Technical Reference

Scope: X20/X67 systems, CP1584/CP1484 series, Automation Studio (AS4.x through AS6.x), Automation Runtime (AR), IEC 61131-3 on B&R, and direct/pointer-based IO access patterns.

Last updated: July 2026


Table of Contents

  1. Overview of B&R Memory Architecture
  2. IO Data Mapping in the PLC Address Space
  3. Software Addressing vs Hardware Addressing
  4. IEC 61131-3 Direct Addressing Prefixes on B&R
  5. How IO Modules Are Mapped to Address Ranges Automatically
  6. Memory Regions: IO Image, System Variables, User Program, Retentive Data
  7. Direct Memory Access via ADR(), ACCESS, and brsmemcpy
  8. AT / Overlay Mechanisms in IEC 61131-3 on B&R
  9. Memory Addressing for Digital IO, Analog IO, and Special Function Modules
  10. Accessing IO Data When Normal IO Access Is Unreliable
  11. Direct Memory Access via Automation Studio — mapp and System Functions
  12. Memory Mapping Differences: CP1584 vs X20/X67 Systems
  13. Memory Layout of a Typical B&R CP1584 (SRAM, Flash, IO Space)
  14. Diagnostic Use of Direct Memory Access
  15. Sources and References

1. Overview of B&R Memory Architecture

B&R Automation controllers (Power Panel, X20 CPUs, X67 CPUs, APC industrial PCs) are built on PC-based architectures using Intel-compatible processors (Atom, Celeron, Core i-series). The memory model differs significantly from traditional PLCs in that it combines a flat PC memory space with an IEC 61131-3 compliant IO addressing layer on top.

1.1 Memory Hierarchy

+-------------------------------------------------------+
|              CompactFlash / Flash (Application)        |  — User application code, HMI, configuration
|              (Removable, non-volatile)                 |
+-------------------------------------------------------+
|              System Flash (Internal)                   |  — Automation Runtime firmware, boot loader
|              (Non-removable, non-volatile)             |
+-------------------------------------------------------+
|              SRAM — User RAM (1 MB typical)            |  — Retentive variables, fast data area
|              (Battery-backed)                          |
+-------------------------------------------------------+
|              DDR SDRAM — System RAM                    |  — OS, runtime, task memory, heap
|              (128–512 MB typical for X20CP15xx)        |
+-------------------------------------------------------+
|              IO Image / IO Data Space                  |  — Mapped IO from X2X Link / POWERLINK bus
|              (Dedicated background I/O processor)      |
+-------------------------------------------------------+

1.2 Key Architectural Principles

  • Integrated I/O Processor: X20 CPUs have a dedicated I/O processor that handles I/O data points in the background, independent of the main CPU cycle. This means IO data is continuously refreshed regardless of task execution timing.
  • Flat Memory Model: Underlying x86 architecture provides a flat 32-bit (or 64-bit on newer models) address space. The IEC 61131-3 addressing layer provides a structured abstraction over this flat space.
  • Battery-Backed Retentive Memory: A lithium battery (CR2477N, 3V/950mAh) backs retentive variables, User RAM, System RAM, and the real-time clock. Battery life: minimum 2 years at 23°C, replacement recommended every 4 years.
  • CompactFlash for Application Storage: The application (compiled code, configuration, HMI pages) is stored on a removable CompactFlash card in a dedicated slot.

Source: X20(c)CP158x and X20(c)CP358x Data Sheet


2. IO Data Mapping in the PLC Address Space

2.1 The IO Image Concept

B&R controllers maintain an IO Image — a memory area that mirrors the current state of all physical I/O points. The IO image is divided into:

  • Input Image: Contains the latest values read from all input modules
  • Output Image: Contains the values to be written to all output modules

The dedicated I/O processor continuously updates the input image from field hardware and transfers output image values to field hardware, independently from the PLC task cycle.

2.2 How IO Data Flows

Physical Input → X2X Link / POWERLINK Bus → IO Image (Input Side) → User Program
User Program → IO Image (Output Side) → X2X Link / POWERLINK Bus → Physical Output

During each task cycle, the user program reads from the input image and writes to the output image. The actual physical I/O is handled asynchronously by the I/O processor.

2.3 IO Mapping File: IoMap.iom

In Automation Studio, IO mapping is managed through the IoMap.iom file. This file maps hardware I/O channels to software variables using the AT directive and IEC addressing syntax:

VAR_CONFIG
    gBatterie AT %IB."PLC1".BatteryStatusCPU;
    MODUL1 AT %IX."X20CS1012_3003A1".ModuleOk;
    MODUL2 AT %IX."X20DI9371_3003DI01".ModuleOk;
    MODUL3 AT %IX."X20DI9371_3003DI02".ModuleOk;
    ::MODUL13 AT %IX."X20DO9322_3003DO01".ModuleOk;
    ::MODUL14 AT %IX."X20AI4622_3003AI01".ModuleOk;
END_VAR

The :: prefix is a visibility/scope qualifier for application module variables. Variables in application modules require the :: prefix with the application module name.

Source: B&R Community — Use of “::” in IoMap.iom


3. Software Addressing vs Hardware Addressing

3.1 Two Addressing Paradigms

B&R Automation Studio supports two distinct addressing paradigms:

Software Addressing (Symbolic / Variable-Based)

  • Variables are declared in .var files with meaningful names
  • The compiler assigns physical addresses automatically
  • IO is linked to variables through the IoMap.iom configuration
  • Preferred for readability, maintainability, and portability
  • Example: LimitSwitch1 AT %IX.0.0 — the variable LimitSwitch1 is mapped to hardware address

Hardware Addressing (Direct / Absolute)

  • Variables are declared with explicit IEC 61131-3 addresses directly in code
  • The programmer specifies exact addresses (%IX0.0, %QW2.5, %MD100)
  • Useful for low-level debugging, diagnostic access, and porting legacy code
  • Less portable — address may change if hardware configuration changes

3.2 When to Use Which

ScenarioSoftware AddressingHardware Addressing
Normal application programmingYesNo
Porting from other IEC platformsNoYes
Diagnostic/debug readsNoYes
Memory-mapped register accessNoYes
Generic software modules (reusable)YesNo
Legacy B&R 2000/2003 codeNoYes

3.3 B&R-Specific Extensions

B&R extends standard IEC 61131-3 addressing with:

  • Module-qualified addressing: %IX."X20DI9371_3003DI01".Channel1 — directly addresses a specific channel of a specific hardware module by its B&R hardware name
  • CPU data points: %IB."PLC1".BatteryStatusCPU — addresses CPU-internal diagnostic data
  • General data points: System-wide data such as time and temperature, accessible from any module in the station

4. IEC 61131-3 Direct Addressing Prefixes on B&R

4.1 Prefix Notation

The IEC 61131-3 standard defines a prefix notation for direct variable addressing. B&R implements this as follows:

PrefixMeaningData TypeSizeExample
%IXInput bitBOOL1 bit%IX0.0
%IYInput byte (legacy)BYTE/USINT8 bits%IY0
%IBInput byteBYTE/USINT8 bits%IB0
%IWInput wordWORD/UINT16 bits%IW0
%IDInput double wordDWORD/UDINT32 bits%ID0
%QXOutput bitBOOL1 bit%QX0.0
%QBOutput byteBYTE/USINT8 bits%QB0
%QWOutput wordWORD/UINT16 bits%QW0
%QDOutput double wordDWORD/UDINT32 bits%QD0
%MXMemory bitBOOL1 bit%MX0.0
%MBMemory byteBYTE/USINT8 bits%MB0
%MWMemory wordWORD/UINT16 bits%MW0
%MDMemory double wordDWORD/UDINT32 bits%MD0

4.2 Address Structure

The general format is: %<prefix><byte_offset>.<bit_offset>

  • Byte offset: Address in bytes from the start of the respective IO area
  • Bit offset: Bit number within the byte (0-7), used only with X suffix (bit-level)

Examples:

// Digital input — first station, first module, channel 0
LimitSwitch AT %IX0.0 : BOOL;

// Analog input — word at byte offset 4 (covers channels 2-3 of a 16-bit module)
Temperature AT %IW4 : INT;

// Digital output — byte 0, bit 3
Valve1 AT %QX0.3 : BOOL;

// Memory word for internal calculations
Counter AT %MW100 : UINT;

// Input double word for a 32-bit encoder value
Encoder AT %ID8 : DINT;

4.3 Automatic Address Assignment

When B&R hardware modules are inserted into the physical configuration in Automation Studio, addresses are assigned automatically starting from:

  • %IX0.0 / %IW0 for inputs
  • %QX0.0 / %QW0 for outputs

The system allocates address space sequentially based on:

  1. Station order in the X2X Link chain
  2. Slot position within the station (left to right)
  3. Module type and channel count (digital modules use bit addressing, analog modules use word addressing)

Users can override automatic addresses manually in the hardware configuration if needed.

Source: Industrial Monitor Direct — B&R Hardware Guide


5. How IO Modules Are Mapped to Address Ranges Automatically

B&R’s X2X Link is the local bus connecting I/O modules to the CPU (or bus controller). When you configure hardware in Automation Studio’s Physical View, the system:

  1. Detects module types: Each module’s hardware catalog entry specifies how many bytes of I/O data it requires
  2. Allocates address ranges sequentially: Starting from offset 0, each module consumes its required number of bytes
  3. Creates the IoMap.iom entries: Software variable mapping is generated based on the hardware configuration

5.2 Address Allocation Example

Station: X20CS1012 (Bus Controller, slot 0)
├── X20DI9371 (12ch Digital Input)  → %IX0.0 through %IX1.3   (12 bits = 2 bytes)
├── X20DO9322 (8ch Digital Output)   → %QX0.0 through %QX0.7   (8 bits = 1 byte)
├── X20AT4222 (4ch Analog Input)    → %IW2.0 through %IW9.0   (4 × 16-bit = 8 bytes)
└── X20AI4622 (4ch Analog Input)    → %IW10.0 through %IW17.0  (4 × 16-bit = 8 bytes)

For remote stations connected via POWERLINK (V1/V2), the MN (Managing Node) allocates PDO (Process Data Object) mapping. The IO data from remote stations appears in the IO image at addresses determined by the POWERLINK configuration. The mapping is defined in the Automation Studio POWERLINK configuration and is reflected in the IoMap.iom.

5.4 Module-Qualified Addressing

B&R provides an alternative addressing mode that uses the hardware module name directly:

// Instead of %IX0.0, reference the specific module and channel by name:
ChannelValue AT %IX."X20DI9371_3003DI01".Channel1;
ModuleOk AT %IX."X20DI9371_3003DI01".ModuleOk;

This is hardware-address-relative but not position-dependent — if you move the module to a different slot, the address remains valid because it references the module identity, not the byte offset. This is a B&R extension to IEC 61131-3.


6. Memory Regions: IO Image, System Variables, User Program, Retentive Data

6.1 Memory Region Overview

Memory RegionVolatilityBacked ByPurpose
IO Image (Input)Volatile (refreshed each bus cycle)X2X Link / POWERLINKCurrent input states
IO Image (Output)Volatile (written each bus cycle)X2X Link / POWERLINKPending output states
System RAMBattery-backedDDR SDRAM + batteryOS, runtime system, task memory
User RAM (SRAM)Battery-backed1 MB SRAM + batteryFast user data, non-remanent vars
Retentive / Remanent MemoryBattery-backedSRAM portionVariables declared with RETAIN
Persistent / Permanent MemoryNon-volatileFlash file systemVariables declared with PERSISTENT
System FlashNon-volatileInternal flashAutomation Runtime firmware, bootloader
CompactFlashNon-volatileRemovable CF cardApplication code, HMI, configuration
User FlashNon-volatileOnboard flash (if available)Stored user data

6.2 Variable Storage Classes

B&R Automation Studio supports several variable storage classes:

6.2.1 Non-Retain (Default)

VAR
    MyCounter : UINT;      // Lost on warm/cold restart
    MyFlag : BOOL;          // Lost on warm/cold restart
END_VAR

Stored in User RAM (SRAM). Initialized on every program start.

6.2.2 Retain (VAR RETAIN)

VAR RETAIN
    AccumulatedTime : UDINT;   // Survives warm restart, battery-backed
    LastSetpoint : REAL;       // Survives warm restart, battery-backed
END_VAR

Stored in the remanent memory area (a dedicated portion of the 1 MB SRAM).

Critical behavior: If any variable in a function block is marked RETAIN, the entire instance of that function block is stored in the remanent memory area. Non-retained variables within that instance are also placed in remanent memory but are re-initialized according to their declaration. This can significantly increase remanent memory usage.

Example:
  FB instance has 96 bytes total, but only 8 bytes are RETAIN (2x UDINT)
  → Entire 96 bytes allocated in remanent memory area
  → Only the 8 RETAIN bytes preserve their value across restart

Source: B&R Community — Retain Tag and Remanent Memory Usage

6.2.3 Persistent (VAR PERSISTENT)

VAR PERSISTENT
    CalibrationData : REAL;
    SerialNumber : STRING[32];
END_VAR

Stored in non-volatile flash memory (file system on CompactFlash). Survives both warm and cold restarts, including complete power loss (no battery required). However, flash has limited write cycles, so frequent writes to PERSISTENT variables should be avoided.

6.2.4 Configurable Remanent Memory Size

On X20CP1584:

  • Maximum remanent memory: 256 kB (configurable in Automation Studio)
  • Available SRAM: 1 MB total, of which 1 MB - configured remanent size is available for non-remanent user data

On X20CP1586:

  • Maximum remanent memory: 1 MB

The remanent memory size is configurable in Automation Studio under the CPU configuration properties.

6.3 What the Battery Backs Up

  • Remanent variables (VAR RETAIN)
  • User RAM
  • System RAM
  • Real-time clock

Source: X20(c)CP158x Data Sheet — Battery Section


7. Direct Memory Access via ADR(), ACCESS, and brsmemcpy

7.1 The ADR() Operator

The ADR() operator returns the memory address (pointer) of a variable. On B&R, this returns a 32-bit address (or 64-bit on 64-bit targets):

VAR
    MyVar : UINT;
    pMyVar : REFERENCE TO UINT;
    MyArray : ARRAY[0..99] OF USINT;
    ptrArray : UDINT;
END_VAR

// Get the address of a variable
ptrArray := ADR(MyArray);

// Use a typed reference
pMyVar REF= MyVar;   // or: pMyVar ACCESS ADR(MyVar);

7.2 The ACCESS Keyword (Dynamic Variables)

B&R uses the ACCESS keyword to create a dynamic variable — a typed reference to a memory location determined at runtime. This is B&R’s primary mechanism for overlaying a variable type onto an arbitrary memory address:

// Dereference a pointer to write
CurrentValue ACCESS ADR(PointerArray[x]);
CurrentValue := TRUE;

// If the array already contains references, omit ADR()
CurrentValue ACCESS PointerArray[x];
CurrentValue := TRUE;

Source: B&R Community — How to dereference a pointer

7.3 ACCESS with INDEX for Array Overlay

The ACCESS keyword can be combined with INDEX to create dynamically indexed access to arrays or structures at arbitrary memory offsets:

VAR
    DataBuffer : ARRAY[0..255] OF BYTE;
    pValue : REFERENCE TO UINT;
    Offset : USINT;
END_VAR

// Access a UINT at a variable offset within the buffer
pValue ACCESS ADR(DataBuffer[0]) INDEX Offset;
pValue := 1234;

7.4 brsmemcpy() — Safe Memory Block Transfer

The brsmemcpy() function from the AsBrStr library is the recommended way to copy blocks of memory (strings, arrays, structs) between arbitrary addresses:

// Copy a UINT into a byte array (little-endian on x86)
brsmemcpy(ADR(Data[0]), ADR(myUINT), SIZEOF(myUINT));

// Copy back
brsmemcpy(ADR(myUINT), ADR(Data[0]), SIZEOF(myUINT));

brsmemcpy() is preferred over brsstrcpy() for memory operations because it requires an explicit length parameter, preventing buffer overflows.

Important: When using brsmemcpy() with string destinations, do not pass the start address of the destination variable as the starting address if the destination is a string with a specific maximum length. Use ADR(DestVar) with SIZEOF(DestVar) to prevent memory corruption.

Source: B&R Community — Working with large strings; B&R Community — Variable Addresses

7.5 Pointer Arithmetic Examples

Converting between byte arrays and larger data types:

VAR
    Data : ARRAY[0..27] OF USINT;
    pUINT : REFERENCE TO UINT;
    myUINT : UINT;
END_VAR

// Method 1: Using ACCESS (pointer dereference)
pUINT ACCESS ADR(Data[0]);
pUINT := myUINT;         // Write UINT to bytes 0-1
myUINT := pUINT;         // Read UINT from bytes 0-1

// Method 2: Using brsmemcpy
brsmemcpy(ADR(Data[0]), ADR(myUINT), SIZEOF(myUINT));  // Write
brsmemcpy(ADR(myUINT), ADR(Data[0]), SIZEOF(myUINT));  // Read

// Method 3: Bit access within a word
myBOOL := myUINT.0;      // Access bit 0 of the UINT

On x86 (little-endian), a UINT value of 258 (0x0102) is stored as:

  • Data[0] = 0x02 (low byte)
  • Data[1] = 0x01 (high byte)

Source: B&R Community — Moving Bytes into Integers and back

7.6 Memory Access Violations

Common causes of memory access violations on B&R:

  • Accessing a variable by its address after the memory has been moved (e.g., after task initialization)
  • Array overflow or string buffer overflow
  • Pointer pointing to invalid/freed memory
  • ADR() used with wrong data type alignment

Mitigation:

  • Deploy the IecCheck library during debugging to detect overflow errors (remove before production!)
  • Use ACCESS in the CYCLIC task, not in INIT, to avoid access violations from moved memory
  • Prefer brsmemcpy() over pointer manipulation for bulk transfers

Source: B&R Community — Value applied from references


8. AT / Overlay Mechanisms in IEC 61131-3 on B&R

8.1 The AT Directive

The AT directive is the standard IEC 61131-3 mechanism for mapping a variable to a specific memory address. B&R fully implements this:

// Map a BOOL to a specific input bit
LimitSwitch AT %IX0.0 : BOOL;

// Map a UINT to a specific input word
AnalogValue AT %IW4 : UINT;

// Map a variable to a specific memory word
Counter AT %MW100 : UDINT;

// Map a variable to a memory byte (overlay)
StatusByte AT %MB50 : BYTE;

// Overlay multiple variables on the same memory location
MultiAccess1 AT %MW200 : UINT;
MultiAccess2 AT %MW200 : ARRAY[0..1] OF USINT;  // Same address, different view

8.2 Union-Like Overlay via AT

B&R supports overlaying multiple variables on the same memory address, effectively creating union-like behavior:

VAR
    RawValue AT %MW10 : WORD;
    LowByte AT %MB10 : USINT;    // Same memory, low byte
    HighByte AT %MB11 : USINT;   // Same memory, high byte
    Bit0 AT %MX10.0 : BOOL;      // Same memory, bit 0
    Bit1 AT %MX10.1 : BOOL;      // Same memory, bit 1
END_VAR

8.3 AT with Hardware-Module-Qualified Addresses

VAR
    // Map to specific module channel
    DI_Ch1 AT %IX."X20DI9371_3003DI01".Channel1 : BOOL;
    DI_Ch2 AT %IX."X20DI9371_3003DI01".Channel2 : BOOL;

    // Map to module status
    ModuleStatus AT %IX."X20DI9371_3003DI01".ModuleOk : BOOL;

    // Map to CPU diagnostic data
    BatteryStatus AT %IB."PLC1".BatteryStatusCPU : BOOL;
END_VAR

8.4 AT in IoMap.iom vs AT in Variable Declarations

LocationUsageScope
.var files (VAR_CONFIG / AT in declarations)Permanent variable-to-IO mappingBuild-time, compiled
IoMap.iom (VAR_CONFIG block)IO mapping configurationBuild-time, compiled
Runtime ACCESSDynamic, runtime-determined mappingRuntime, pointer-based

The IoMap.iom approach is the standard way to map IO in Automation Studio — it provides a GUI for point-and-click mapping and separates IO configuration from code logic.


9. Memory Addressing for Digital IO, Analog IO, and Special Function Modules

9.1 Digital IO (X20DI93xx / X20DO93xx)

Digital modules use bit-level addressing (%IX / %QX):

// 12-channel digital input module
DI_1 AT %IX0.0 : BOOL;
DI_2 AT %IX0.1 : BOOL;
...
DI_12 AT %IX1.3 : BOOL;

// 8-channel digital output module
DO_1 AT %QX0.0 : BOOL;
DO_2 AT %QX0.1 : BOOL;
...
DO_8 AT %QX0.7 : BOOL;

Module-specific diagnostic channels:

ModuleOk AT %IX."X20DI9371_3003DI01".ModuleOk : BOOL;   // Module status

9.2 Analog IO (X20AT42xx / X20AI46xx / X20AO46xx)

Analog modules use word-level addressing (%IW / %QW). Each analog channel typically occupies 2 bytes (16 bits) or 4 bytes (32 bits for high-resolution modules):

// 4-channel analog input module (16-bit per channel)
AI_Ch1 AT %IW0 : INT;    // Channel 1 (bytes 0-1)
AI_Ch2 AT %IW2 : INT;    // Channel 2 (bytes 2-3)
AI_Ch3 AT %IW4 : INT;    // Channel 3 (bytes 4-5)
AI_Ch4 AT %IW6 : INT;    // Channel 4 (bytes 6-7)

// 4-channel analog output module
AO_Ch1 AT %QW0 : INT;
AO_Ch2 AT %QW2 : INT;
AO_Ch3 AT %QW4 : INT;
AO_Ch4 AT %QW6 : INT;

For analog temperature modules (e.g., X20AT4232), the module handles ADC conversion internally and provides scaled values in the IO image.

9.3 Special Function Modules

Special modules (communication gateways, encoder interfaces, IO-Link masters, etc.) typically provide larger data structures in the IO image:

  • X20IF10xx (Interface Modules): Provide data areas for protocol-specific communication. Data sizes depend on the protocol and configuration.
  • X20CS1010 (Encoder Interface): Encoder values are mapped as double words (%ID) in the IO image.
  • X20IF1043 (CAN Interface): CAN receive/transmit data mapped via IoMap to variables. Users assign variables to the IO mapping of the interface module.
  • IO-Link Masters: IO-Link data is typically mapped as byte arrays in the IO image. Boolean process data within IO-Link devices can be mapped to %IX/%QX addresses.

Source: B&R Community — X20IF1043 IO Mapping


10. Accessing IO Data When Normal IO Access Is Unreliable

10.1 Scenarios Requiring Direct IO Access

Normal IO access through mapped variables may become unreliable in these situations:

  • The IO image is corrupted or not properly initialized
  • A module has lost communication but the bus is still running
  • During diagnostic mode (DIAG switch position)
  • When the IO mapping configuration is incorrect or outdated
  • When investigating sporadic IO glitches that don’t manifest in the mapped variables

10.2 Diagnostic Mode Access

The X20 CPU has a DIAG operating mode switch position. In this mode:

  • Program sections in User RAM and User Flash are not initialized
  • The CPU boots in diagnostic mode
  • After diagnostic mode, the CPU always performs a warm restart
  • IO image data is accessible for diagnostic inspection

This allows maintenance personnel to read IO states without the user program affecting outputs.

10.3 Direct Memory Access via Watch/Trace

In Automation Studio, with the debugger halted on a breakpoint and the Watch window open:

  • Pointers can be dereferenced to inspect memory content at arbitrary addresses
  • In AS4, use the debugger watch with pointer dereferencing
  • In AS6.3+, a function is available that reveals a variable name given its address

Source: B&R Community — Watching memory content with AS

10.4 Bypassing IO Mapping with Direct Addresses

When IO mapping is unreliable, you can read IO directly by using absolute addresses in your code:

VAR
    DirectInput : BOOL;
    DirectAnalog : INT;
END_VAR

// Direct read from IO image — bypassing IoMap mapping
DirectInput := %IX0.5;         // Read digital input directly
DirectAnalog := %IW10;          // Read analog input directly

// Direct write to IO image
%QX2.3 := TRUE;                 // Write digital output directly
%QW20 := 32768;                 // Write analog output directly

10.5 PVI (Process Visualization Interface) External Access

The B&R PVI system allows external applications (C#, Python, etc.) to read and write PLC variables — including IO data — via:

  • PVI Services (COM/ActiveX)
  • PVI .NET
  • PVIservices REST API (newer systems)

This provides an external path to IO data that bypasses the PLC program entirely, useful for:

  • Automated testing (e.g., reading/writing IO from external tools)
  • SCADA/HMI systems
  • Data logging

Source: B&R Community — Automated IO Access from External Tools


11. Direct Memory Access via Automation Studio — mapp and System Functions

11.1 System Libraries for Memory Access

B&R provides several system libraries for direct memory operations:

LibraryKey FunctionsPurpose
AsBrStrbrsmemcpy(), brsstrcpy(), brsmemset()Memory block transfer and string operations
AsMemMemory utility functionsMemory allocation, deallocation
SysMemSystem memory accessSystem-level memory operations
IecCheckBoundary checkingDebug library for detecting memory violations
SysFileFile I/ORead/write files on CompactFlash

11.2 mapp Technology

B&R’s mapp (modular application) technology provides pre-engineered software components:

  • mapp Control: PID controllers and signal processing
  • mapp Motion: Motion control functions
  • mamp View: Web-based HMI
  • mapp AlarmX: Alarm management
  • mapp Recipe: Recipe management
  • mapp Database: Data logging to SQLite

mapp components internally manage their own memory regions and IO mappings. Access to mapp internal data is provided through standardized FB interfaces, not direct memory access.

11.3 System Functions for Diagnostic Data

BatteryInfo:

BatteryInfo(stBatteryInfo);
// stBatteryInfo contains battery status from CPU diagnostics

CPU IO Mapping Diagnostic Data: CPU status registers (battery, temperature, module errors) are accessible through:

  • The CPU’s IO mapping (available in IoMap.iom)
  • Software registers (accessible via %IB."PLC1".* addresses)

11.4 General Data Points

X20 CPUs provide general data points that are not CPU-specific:

  • System time
  • Heat sink temperature
  • Other general system information

These are accessible from any module in the station and are described in the X20 system user’s manual under “Additional information — General data points”.

Source: X20(c)CP158x Data Sheet — General Data Points


12. Memory Mapping Differences: CP1584 vs X20/X67 Systems

12.1 System Comparison

FeatureX20CP1584X20CP1585X20CP1586X20CP1484X67 CPUs
ProcessorAtom E640T 0.6 GHzAtom E680T 1.0 GHzAtom E680T 1.6 GHzCeleron 266 MHzVaries (ARM/x86)
DDR RAM256 MB DDR2256 MB DDR2512 MB DDR232 MB DRAMVaries
User SRAM1 MB1 MB1 MB1 MBVaries
Max Remanent256 kB256 kB1 MBVariesVaries
Interface Slots1111Varies
POWERLINKV1/V2 (MN/CN)V1/V2 (MN/CN)V1/V2 (MN/CN)V1/V2V1/V2
Ethernet10/100/100010/100/100010/100/100010/100Varies
Min Cycle Time400 µs200 µs100 µs2 msVaries
USB2x USB 1.1/2.02x USB 1.1/2.02x USB 1.1/2.02x USBVaries
RedundancyNoNoNoNoVaries

12.2 X20 vs X67 Differences

  • X20: Modular system with DIN-rail mounting, separate bus controller and I/O modules, supports both local (X2X Link) and remote (POWERLINK) I/O
  • X67: IP67-rated, field-mountable I/O system. Similar addressing model to X20 but designed for harsh environments with M12 connectors

Both X20 and X67 share the same IO addressing model and Automation Studio configuration approach. The IO mapping is identical in terms of %IX, %QX, %IW, %QW notation.

12.3 Power Panel / APC Differences

B&R Power Panel targets (PP100, PP200, etc.) and APC industrial PCs run the same Automation Runtime but may have:

  • Larger DDR RAM (up to several GB)
  • Solid-state drives instead of CompactFlash
  • Additional PCIe slots for specialized interface cards
  • Different IO connection methods (e.g., direct onboard IO vs X2X bus)

The IO addressing model remains the same, but the physical connection to IO hardware differs.

12.4 CP358x vs CP158x

The CP358x series (e.g., X20CP3584, X20CP3586) differs from CP158x primarily in:

  • 3 interface module slots (vs 1 on CP158x)
  • CPU redundancy support (CP3586 supports controller redundancy)
  • Same processor options, same SRAM, same IO addressing

Source: X20(c)CP158x and X20(c)CP358x Data Sheet


13. Memory Layout of a Typical B&R CP1584 (SRAM, Flash, IO Space)

13.1 Detailed Memory Map

=== X20CP1584 Memory Layout ===

0x00000000 ┌─────────────────────────────┐
           │      System Flash (Internal) │  Automation Runtime firmware
           │      (Size: varies)          │  Boot loader
           ├─────────────────────────────┤
           │      CompactFlash (Removable)│  Application code (.pc executable)
           │      (512 MB – 16 GB)        │  HMI pages
           │                              │  Configuration files
           │                              │  mapp data
           ├─────────────────────────────┤
0x???????? │                              │
           │      DDR2 SDRAM (256 MB)     │  Automation Runtime OS
           │                              │  Task memory (Cyclic, Event, etc.)
           │                              │  Heap/Stack for C programs
           │                              │  mapp component memory
           │                              │  System buffers
           ├─────────────────────────────┤
           │                              │
           │      SRAM — User Area       │  Total: 1 MB
           │      (Battery-backed)        │
           │  ┌───────────────────────┐  │
           │  │ Remanent Memory       │  │  Configurable, max 256 KB
           │  │ (VAR RETAIN data)     │  │  Battery-backed
           │  │                       │  │  Preserved across warm restart
           │  ├───────────────────────┤  │
           │  │ Non-Remanent User RAM │  │  1 MB - remanent size
           │  │ (VAR data)            │  │  Battery-backed, but cleared on
           │  │                       │  │  cold restart if battery fails
           │  └───────────────────────┘  │
           ├─────────────────────────────┤
           │      IO Image / IO Space     │  Managed by integrated I/O processor
           │  ┌───────────────────────┐  │  Continuously updated in background
           │  │ Input Image           │  │  %IX*, %IW*, %IB*, %ID*
           │  │ (Digital + Analog)    │  │
           │  ├───────────────────────┤  │
           │  │ Output Image          │  │  %QX*, %QW*, %QB*, %QD*
           │  │ (Digital + Analog)    │  │
           │  ├───────────────────────┤  │
           │  │ CPU Diagnostic Data    │  │  Battery status, temperature,
           │  │                       │  │  module status, etc.
           │  └───────────────────────┘  │
           └─────────────────────────────┘

13.2 User Flash Data Area

For CPUs with onboard flash (not CP1584 specifically but common on newer models):

  • Typically 512 kB of flash for user data
  • Used for persistent storage of calibration data, recipes, etc.
  • Accessible via SysFile library functions

13.3 Task Memory Organization

Within the DDR SDRAM, Automation Runtime allocates memory for each configured task:

Task Cyclic1 ──────────── Stack + Code + Variables
Task Cyclic2 ──────────── Stack + Code + Variables
Task Event ────────────── Stack + Code + Variables
...
System overhead ────────── OS kernel, drivers, buffers

13.4 Overtemperature Protection

  • CPU shutdown at 110°C processor temperature or 95°C board temperature
  • Logbook entries: Error 9204 (temperature restart), Error 9210 (halt after reset)

14. Diagnostic Use of Direct Memory Access

14.1 Common Diagnostic Patterns

Reading Module Status via IO Image

VAR
    ModuleOk : BOOL;
END_VAR

ModuleOk := %IX."X20DI9371_3003DI01".ModuleOk;
// If FALSE, module is in error state

Reading CPU Diagnostic Registers

VAR
    BatteryStatus : BOOL;
    Temperature : INT;  // From general data points
END_VAR

BatteryStatus := %IB."PLC1".BatteryStatusCPU;
// TRUE = battery OK, FALSE = battery empty/dead

Memory Inspection via ADR() + ACCESS

VAR
    TargetAddress : UDINT;
    ViewAsUINT : UINT;
END_VAR

// Given a memory address (from ADR() or other source), inspect contents
ViewAsUINT ACCESS TargetAddress;
// Watch ViewAsUINT in the watch window to see the memory contents

Using IecCheck for Runtime Bounds Checking

Deploy the IecCheck library to detect:

  • Array boundary violations
  • String overflow
  • Memory access violations
  • Stack corruption

Important: Remove IecCheck before deploying to production — it adds significant overhead.

14.2 Trace and Watch Tools

  • Watch Window: Monitor live variable values when online. Supports override of output variables that are not driven by code. In AS4, dereference pointers with the debugger halted.
  • Trace Window: Continuously record variable values with configurable sample rate. Maximum trace size is configurable. After stopping, zoom into the timeline to inspect values at each CPU scan.
  • Logbook: System events (errors, warnings, temperature, battery) are automatically logged and can be accessed via the Automation Studio Logbook viewer.

14.3 Memory Access Violation Troubleshooting

Common diagnostics for “memory access violation” errors:

  1. Check ADR() targets: Ensure all ADR()-derived pointers point to valid, initialized memory
  2. Check task timing: ACCESS in INIT task may access memory before tasks are fully initialized
  3. Check array bounds: Use IecCheck to detect overflow
  4. Check string operations: brsstrcpy() can corrupt adjacent memory if the destination is too small — prefer brsmemcpy() with explicit length
  5. Check function block retain: If retain variables in an FB are corrupted, the entire FB instance may be affected due to the all-or-nothing remanent allocation

14.4 External Diagnostic Access

  • PVIservices / PVI .NET: External applications can read PLC variables including IO data, useful for automated diagnostic scripts
  • SNMP: Some B&R devices support SNMP for basic health monitoring
  • OPC UA: Available on newer Automation Runtime versions for standardized data access

Cross-References


15. Sources and References

Official B&R Documentation

  1. X20(c)CP158x and X20(c)CP358x Data SheetPDF
  2. X20 System User’s ManualPDF (RS Online)
  3. B&R Automation Studio Product Pagebr-automation.com
  4. B&R Online Help (Automation Help)help.br-automation.com
  5. B&R mapp Technologybr-automation.com/mapp

B&R Community Forum Posts

  1. Variable Addresses after Compilationcommunity.br-automation.com/7920
  2. Watching Memory Content with AS (4.xx)community.br-automation.com/7685
  3. How to Dereference a Pointercommunity.br-automation.com/6740
  4. Moving Bytes into Integers and Backcommunity.br-automation.com/3075
  5. Retain Tag and Remanent Memory Usagecommunity.br-automation.com/4320
  6. Use of “::” in IoMap.iomcommunity.br-automation.com/2176
  7. Value Applied from Referencescommunity.br-automation.com/7017
  8. Retain Variable Reset to Zerocommunity.br-automation.com/8142
  9. Working with Large Stringscommunity.br-automation.com/5239
  10. How to Assign Variables to IO Mapping of X20IF1043community.br-automation.com/8116
  11. Automated Read/Write Access to ARSim Hardware I/Ocommunity.br-automation.com/10409

Technical Articles and Guides

  1. Programming B&R PLCs with Automation Studiocontrol.com
  2. B&R PLC Hardware and Automation Studio Overviewindustrialmonitordirect.com
  3. B&R Automation Studio: Program & Transfer to PLC Hardware Guideindustrialmonitordirect.com

Community Knowledge

  1. Reddit: B&R X20 Setupreddit.com/r/PLC
  2. Reddit: B&R Use of Pointersreddit.com/r/PLC
  3. Awesome B&R — Curated ResourcesGitHub

Key Findings

  1. B&R X20 CPUs use a dedicated I/O processor that refreshes the IO Image independently of the PLC task cycle. Input and output images are separate memory areas updated asynchronously from user program execution.

  2. IO addresses are assigned automatically by Automation Studio starting from %IX0.0/%IW0 (inputs) and %QX0.0/%QW0 (outputs), allocated sequentially based on station order in the X2X Link chain, slot position, and module channel count. Module-qualified addressing (e.g., %IX."X20DI9371_3003DI01".Channel1) survives slot repositioning.

  3. The AT overlay directive allows multiple variables to share the same memory address, creating union-like behavior: a WORD at %MW10 can be simultaneously accessed as BYTE at %MB10/%MB11 or individual bits at %MX10.0 through %MX10.7. This is the primary mechanism for type-punning and bit-level IO access.

  4. Direct memory access uses ADR() to get pointers, ACCESS for type-safe dereferencing, and brsmemcpy() (from the AsBrStr library) for raw block copies. The IECCheck library provides runtime bounds checking for pointer operations – critical for preventing page faults during online changes.

  5. Six variable storage classes exist: Non-Retain (lost on restart), Retain (battery-backed SRAM, survives warm restart), Remanent (like Retain but initialized on first cold boot), Persistent (Flash file system, survives cold restart), Persistent_Volatile (Persistent read but Non-Retain write), and Constant (compile-time). Maximum retentive data on CP1584 is 256 KB.

  6. B&R extends IEC 61131-3 with CPU-qualified addressing (%IB."PLC1".BatteryStatusCPU) for reading internal CPU diagnostics like battery status, temperature, and firmware version directly from the IO image without system function calls.

  7. For diagnostic access when IO mapping is unreliable, use absolute addressing (%IX0.5, %IW10) in code, the DIAG switch position on the CPU (prevents program execution while keeping IO image accessible), or PVI/OPC-UA external access to bypass the PLC program entirely.

  8. The IoMap.iom file generated by Automation Studio maps hardware IO to software variables using VAR_CONFIG blocks. The :: prefix on variable names indicates application module scope. This file is the single source of truth for IO-to-variable mapping and must match the hardware configuration on the PLC.


Disclaimer: This document is compiled from publicly available sources including official B&R documentation, B&R community forum posts, technical articles, and community knowledge. For the most authoritative and up-to-date information, consult the official B&R Automation Help system at help.br-automation.com and the official data sheets available from br-automation.com.

B&R X20 IO Card Hardware Architecture — Technical Reference

Comprehensive hardware-level reference for B&R Automation X20 I/O modules covering signal conditioning, ADC/DAC paths, electrical isolation, filtering, diagnostics, and fault identification.


Table of Contents

  1. System Architecture Overview
  2. Signal Conditioning Circuits
  3. ADC/DAC Paths on Analog Modules
  4. Electrical Isolation
  5. Digital Input Filtering and Debounce
  6. LED Diagnostic Codes and Patterns
  7. Failure Modes and LED Indications
  8. B&R X20 IO Card Types and Model Numbers
  9. Thermocouple and RTD Input Handling
  10. 4-20mA vs 0-10V Input Considerations
  11. Output Types: Relay, Transistor, Analog
  12. Identifying Faulty IO Card vs Wiring vs Sensor
  13. IO Card Power Supply: Rails and Current Limits
  14. Diagnostic Features per Card Type
  15. Hot-Swap Capabilities
  16. Sources

1. System Architecture Overview

The B&R X20 system is a slice-based I/O and control system where individual I/O modules plug into a DIN rail alongside bus modules, power supply modules, and CPUs. Modules communicate via the proprietary X2X Link backplane — a daisy-chain real-time fieldbus that carries both data and power between adjacent slices on the rail.

Core Components

ComponentFunctionKey Models
Bus ModuleBackbone for bus supply, bus data, and I/O electronics powerX20BM01, X20BM05, X20BM11, X20BM15, X20BM31
Power Supply Module24 VDC feed for X2X Link and internal I/O supplyX20PS2100, X20PS2110, X20PS3300, X20PS3310
Terminal BlockField wiring connection point (6-pin or 12-pin)X20TB06, X20TB12
I/O ModuleSignal processing (digital, analog, temperature, special)DI/DO/AI/AO/AT/CM/MM/DC series
Bus Controller / CPUFieldbus gateway (POWERLINK, EtherNet/IP, Modbus/TCP)BC0087, BC0088, CP148x, CP348x
Bus Receiver/TransmitterX2X segment bridging over distanceX20BR9300, X20BT9100
  • Topology: Daisy-chain with terminator jumpers required on last node per segment
  • Maximum segment length: 100 m
  • Characteristic impedance: ~120 Ω (terminated)
  • Communication: Deterministic cyclic data exchange synchronized to network cycle
  • SyncOut offset: Digital outputs update with fixed offset (<60 µs) relative to network cycle

Mechanical Design

  • Pitch: 12.5 mm +0.2 mm per slice
  • Mounting: Standard 35 mm DIN rail with snap-lock mechanism
  • IP Rating: IP20 (modules are cabinet-mounted)
  • Keyed bus modules: Prevent incorrect module insertion
  • Terminal blocks: Plug-on design — field wiring remains in place during module swap

2. Signal Conditioning Circuits

Analog Input Signal Path (AI4622 Example)

The analog input signal chain for a module like the X20AI4622 (4-channel, ±10V / 0-20mA):

Field Signal → Terminal Block → Input Protection (overvoltage/reverse polarity)
    → Voltage Divider / Current Shunt → 1st-Order Anti-Aliasing Filter
    → Multiplexer → Sigma-Delta ADC → Digital Filter → X2X Link → PLC

Voltage Input Path (±10V):

  • Input range scaled to ADC full-scale via precision resistor divider
  • First-order low-pass anti-aliasing filter before ADC
  • 13-bit converter resolution (including sign), effectively ±12-bit

Current Input Path (0-20mA / 4-20mA):

  • Current converted to voltage via precision shunt resistor
  • Same ADC path as voltage inputs
  • Configurable via software — no hardware jumpers needed

RTD Input Signal Path (AT2222 Example)

For the X20AT2222 (2-channel Pt100/Pt1000):

Sensor (Pt100/1000) → Terminal Block → Constant Current Source (250 µA)
    → Sense Resistor Network → Multiplexer → Sigma-Delta ADC
    → Digital Linearization (EN 60751) → X2X Link → PLC
  • Measurement current: 250 µA ±1.25% constant current source
  • Reference resistor: 4530 Ω ±0.1%
  • Connection modes: Configurable 2-wire or 3-wire per module
  • Input filter: First-order low-pass, cutoff frequency 500 Hz

Thermocouple Input Signal Path (AT2402 Example)

For the X20AT2402 (2-channel thermocouple):

Thermocouple → Terminal Block → Input Filter (1st-order LP, 500 Hz cutoff)
    → Multiplexer → Sigma-Delta ADC → Cold Junction Compensation
    → Linearization (EN 60584) → X2X Link → PLC

Digital Input Signal Path (DI9371 Example)

Field Signal (24 VDC) → Terminal Block → Reverse Polarity Protection
    → Configurable Input Filter (RC debounce) → Optocoupler / Digital Isolator
    → Status Register → X2X Link → PLC

3. ADC/DAC Paths on Analog Modules

ADC Specifications

ModuleChannelsInput RangeResolutionConversion MethodConversion Time
X20AI46224±10V / 0-20mA13-bit (incl. sign)Sigma-deltaPer filter time
X20AI46324±10V / 0-20mA13-bit (incl. sign)Sigma-deltaPer filter time
X20AT22222Pt100/Pt100016-bitSigma-delta20 ms (1ch, 50Hz)
X20AT24022TC types J,K,N,S,B,R16-bitSigma-delta80.4 ms (2ch, 50Hz)
X20AT64026TC types B,E,J,K,N,R,S,T16-bitSigma-delta~100 ms/ch

ADC Sampling Modes

X20AI4622 configurable filter times (determines effective sampling rate and noise rejection):

Filter SettingCutoff FrequencyFilter Time
15 Hz15 Hz66.7 ms
25 Hz25 Hz40 ms
30 Hz30 Hz33.3 ms
50 Hz (default)50 Hz20 ms
60 Hz60 Hz16.7 ms
100 Hz100 Hz10 ms
500 Hz500 Hz2 ms
1000 Hz1000 Hz1 ms

X20AT2402/AT2222 configurable filter times (same settings as above).

Synchronous Mode (AI4622)

When synchronous mode is enabled in the A/D converter configuration, the module operates the ADC synchronized to the bus cycle. This ensures deterministic sampling aligned with the control loop.

DAC Specifications

ModuleChannelsOutput RangeResolutionConversion TimeSettling Time
X20AO46224±10V or 0-20mA/4-20mA13-bit (±12-bit V / 12-bit I)300 µs (all outputs)500 µs full range

X20AO4622 output architecture:

PLC Value (INT) → D/A Converter → Solid-State Relay (SSR) → Output Filter
    (1st-order LP, 10 kHz cutoff) → Terminal Block → Field Device
  • Output protection: Short-circuit proof with current limiting at ±40 mA
  • Internal enable relay: Controls power-up behavior — outputs remain in defined state during startup
  • Voltage output: Load ≥1 kΩ, max ±10 mA
  • Current output: Load max 600 Ω (Rev. ≥J0), max 20 mA

DAC Function Models

ModeDescriptionMinimum Cycle
Function Model 0 (Standard)I/O without jitter — corrected values output in next cycle≥400 µs
Function Model 1 (Fast Response)I/O with fast response — corrected values output in same cycle≥400 µs

4. Electrical Isolation

Isolation Architecture

All X20 I/O modules provide galvanic isolation between the I/O channels and the X2X bus:

Field Side (24V / Sensors / Actuators)
    |
    [Optocouplers / Transformers / Capacitive Isolators]
    |
    [Isolation Barrier: 500 Veff test voltage]
    |
Bus Side (X2X Link / Internal Logic)

Isolation Ratings

ParameterRating
Insulation voltage (channel to bus)500 Veff
Common-mode rejection (TC modules, DC)>70 dB
Common-mode rejection (TC modules, 50 Hz)>70 dB
Common-mode rejection (RTD modules, DC)>95 dB
Common-mode rejection (RTD modules, 50 Hz)>80 dB
Crosstalk between channels (RTD)<-93 dB
Crosstalk between channels (TC)<-70 dB

Channel-to-Channel Isolation

  • Channel isolated from bus: YES (all modules)
  • Channel isolated from channel: NO (channels within same module share a common reference)
  • Channel isolated from I/O power supply: NO (digital output modules)

Isolation Methods Used

  1. Optocouplers: Digital input and output modules use optical isolation between field-side circuitry and bus-side logic
  2. Transformer/Capacitive isolation: Analog modules employ galvanic isolation barriers (typically capacitive or transformer-coupled) between the ADC/DAC front-end and the X2X bus interface
  3. Internal isolation barrier: Rated for 500 Veff, providing safety isolation per IEC 61131-2

5. Digital Input Filtering and Debounce

Configurable Filter Times

Digital input modules (e.g., X20DI9371 — 12 digital inputs, 24 VDC, sink) feature configurable input filters to debounce mechanical contacts and suppress noise:

Filter SettingFilter TimeUse Case
0 msNo filterClean digital signals (e.g., solid-state outputs)
0.1 ms100 µsFast response, minimal debounce
0.5 ms500 µsStandard fast-switching sensors
1 ms1 msMedium-speed mechanical contacts
3 ms3 msTypical relay/switch debounce
10 ms10 msSlow mechanical contacts
25 ms25 msVery noisy environments, slow switches

Hardware Filter Implementation

The debounce is implemented as an RC filter followed by a digital threshold detection:

Field Input → Reverse Polarity Protection → RC Filter (configurable time constant)
    → Schmitt Trigger / Comparator → Optocoupler → X2X Link

Digital Input Module Specifications (X20DI9371)

ParameterValue
Nominal voltage24 VDC
Switching voltage15-30 VDC (typical)
Connection typeSink (1-wire connections)
Filter timeConfigurable (0-25 ms range)
Status indicatorsPer-channel I/O LEDs + module status LEDs
Diagnostic statusSoftware-readable per channel
Power consumption (bus)~0.1 W
Power consumption (internal I/O)~0.5 W

6. LED Diagnostic Codes and Patterns

Standard LED Layout

All X20 I/O modules have three categories of status LEDs:

LEDColorLocationPurpose
r (Run)GreenModule top-leftOperating state indicator
e (Error)RedModule top-right (next to r)Error/fault indicator
1-N (Channel)Green/OrangePer channelIndividual channel I/O status

Module Operating State LEDs

These two LEDs (r and e) follow a consistent pattern across all X20 I/O modules:

Green LED (r — Run/Operating State)

StatusMeaning
OffNo power to module
Single FlashRESET mode — Module powered but not configured / waiting for valid configuration from CPU
Double FlashBOOT mode — Firmware update in progress (DO NOT power off during this)
BlinkingPREOPERATIONAL mode — Module initialized but not yet in RUN state
Steady ONRUN mode — Module operational, processing I/O normally

Red LED (e — Error)

StatusMeaning
OffNo error — everything OK (or no power to module)
Steady ONError or reset state — Module has detected a fault
Single FlashWarning/Error on an I/O channel — Overflow or underflow on analog inputs, level monitoring triggered on digital outputs

Combined Indicators

StatusMeaning
Red ON + Green single flashInvalid firmware — Module has detected firmware corruption or version mismatch
Red ON (safety modules SE LED)Defective module — Must be replaced immediately (safety modules only)

Channel Status LEDs (Per Channel)

LED ColorStatusMeaning
OffChannel disabled or no powerInput is switched off / channel not active
Green steady ONValue OKAnalog/digital converter running, value within normal range
Green blinkingError conditionOverflow, underflow, or open line detected
Orange steady ONOutput activeDigital output channel is switched ON (output modules only)
Orange OffOutput inactiveDigital output channel is switched OFF (output modules only)

Safety Module LEDs (X20SDxxxx, X20SIxxxx)

Safety I/O modules have additional LEDs:

LEDMeaning
SE (System Error) — Steady RedDefective module — Must be replaced immediately
SE — FlashingError detected but module not defective
SLSafe Logic communication status
FDFailsafe diagnostic status

Critical: On safety modules (X20SL…), a constantly lit SE LED indicates a defective module that must be replaced immediately. On X20SLX… modules (no hardware acknowledge interface), replacement requires software acknowledgment via SafeDESIGNER.


7. Failure Modes and LED Indications

Failure Mode Classification

Failure ModeRoot CauseLED PatternSoftware Diagnostic
No power to moduleModule supply disconnected, blown fuse, wiring faultAll LEDs OFFModule not visible on bus
Reset modeNo valid application, corrupt configuration, CPU haltedr: single flash, e: OFF, x-led: OFFModule not initialized
Boot modeFirmware update, forced boot entryr: double flashFirmware loading indicator
PreoperationalModule initialized but CPU not in RUNr: blinkingModule detected, not yet active
Channel overrange (analog)Signal exceeds ±10V or 0-20mA rangee: single flash, channel: green blinkingStatus register: 0x7FFF (overshoot)
Channel underrange (analog)Signal below valid rangee: single flash, channel: green blinkingStatus register: 0x8001 (undershoot)
Open circuit (analog)Wire broken, sensor disconnectede: single flash, channel: green blinkingStatus register: 0x7FFF (open circuit)
Invalid firmwareCorrupted firmware, version mismatchRed ON + green single flashModule non-functional
Short circuit (digital output)Output wiring shorted to ground/V+e: single flash, channel: orange off (output disabled)Status bit: 1 for that channel
Overload (digital output)Total current exceeds module ratinge: single flashThermal shutdown activated
X2X bus communication lossX2X cable break, missing terminator, bad connector, or CPU in STOP/SERVICE modeAll modules: r: continuously blinking (not single flash)No communication across entire rack. Check X2X daisy-chain cable, terminator jumpers on last module, and confirm CPU is in RUN mode. This is one of the most common “all outputs off” failure modes. See x2x-protocol.md.
Missing I/O field power (e blinking + r steady)I/O power supply rail lost (e.g., E-stop relay dropped the I/O supply, blown fuse, bad jumper)e: single flash (per-channel), r: steady greenModule communicating normally but has no field power. The X20 system separates logic power (+24V LOGIC) from field power (+24V I/O). Check the power supply module’s terminal 1-5/1-6, verify jumpers, and confirm the E-stop relay is not dropping the I/O supply rail. The X20PS2100 and X20PS3300 power supply modules have separate logic and I/O power terminals specifically for this E-stop scenario.
Missing I/O supply (channel-level)Field power supply failuree: single flash (per-channel)Status bit set for ON channels
X2X bus failureCable break, missing terminator, bad connectorAll modules: r: single flashNo communication
Defective module (safety)Internal hardware failure (safety modules)SE: steady redReplace immediately
Cold junction error (temperature)CJC sensor drift, ambient conditionse: single flash, channel: green blinking2-3°C offset typical

Per-Channel Error Values (Analog Modules)

Error ConditionDigital Value (INT)Hex Value
Open circuit+327670x7FFF
Upper limit overshoot+327670x7FFF
Lower limit undershoot-327670x8001
Invalid value / General fault-327680x8000
Channel not switched on-327680x8000

Per-Channel Status Bits (Digital Output Modules — DO9322)

Status BitMeaning
0No error
1Short circuit or overload
1Channel ON but missing I/O power supply
1Channel OFF but external voltage applied

Digital output monitoring has a 10 ms diagnostic delay before reporting an error.


8. B&R X20 IO Card Types and Model Numbers

Digital Input Modules

ModelChannelsVoltageConnectionFilterSpecial
X20DI2371224 VDC2-wireConfigurableSink
X20DI2372224 VDC2-wireConfigurableSource
X20DI2377224 VDC2-wireConfigurableSink, high-speed
X20DI26532230 VAC2-wireConfigurableAC input
X20DI4371424 VDC2-wireConfigurableSink
X20DI4372424 VDC2-wireConfigurableSource
X20DI46534230 VAC2-wireConfigurableAC input
X20DI4760424 VDC2-wireConfigurableDiagnostic
X20DI6371624 VDC1-wireConfigurableSink
X20DI6372624 VDC1-wireConfigurableSource
X20DI65536230 VAC1-wireConfigurableAC input
X20DI8371824 VDC1-wireConfigurableSink
X20DI93711224 VDC1-wireConfigurableSink
X20DI93721224 VDC1-wireConfigurableSource

Digital Output Modules

ModelChannelsVoltageCurrentConnectionTypeSpecial
X20DO2321224 VDC2 A1-wireTransistor (sink)
X20DO2322224 VDC0.5 A1-wireTransistor (source)
X20DO2623224 VDC2 A2-wireTransistorDiagnostic
X20DO2649224 VDC2 A2-wireRelayRelay output
X20DO4321424 VDC2 A1-wireTransistor (sink)
X20DO4322424 VDC0.5 A1-wireTransistor (source)
X20DO4331424 VDC2 A1-wireTransistor (source)
X20DO4332424 VDC2 A1-wireTransistorDiagnostic
X20DO4529424 VDC2 A2-wireRelayRelay output
X20DO4623424 VDC2 A2-wireTransistorDiagnostic
X20DO6321624 VDC2 A1-wireTransistor (sink)
X20DO6322624 VDC0.5 A1-wireTransistor (source)
X20DO6529624 VDC2 A2-wireRelayRelay output
X20DO8322824 VDC0.5 A1-wireTransistor (source)
X20DO8331824 VDC2 A1-wireTransistor (source)
X20DO8332824 VDC2 A1-wireTransistorDiagnostic
X20DO93211224 VDC0.5 A1-wireTransistor (sink)
X20DO93221224 VDC0.5 A1-wireTransistor (source)Output monitoring

Analog Input Modules

ModelChannelsRangeResolutionFilter
X20AI17441Full16-bitConfigurable
X20AI26222±10V / 0-20mA13-bitConfigurable
X20AI26322±10V / 0-20mA13-bitConfigurable
X20AI46224±10V / 0-20mA / 4-20mA13-bitConfigurable
X20AI46324±10V / 0-20mA / 4-20mA13-bitConfigurable

Analog Output Modules

ModelChannelsRangeResolutionFilter
X20AO262220-20mA / 4-20mA12-bit1st-order LP
X20AO26322±10V / 0-20mA / 4-20mA13-bit1st-order LP
X20AO46224±10V / 0-20mA / 4-20mA13-bit1st-order LP
X20AO46324±10V / 0-20mA / 4-20mA13-bit1st-order LP

Temperature Modules

ModelChannelsSensor TypesResolutionSpecial
X20AT22222Pt100, Pt100016-bit (0.1°C)2-wire / 3-wire
X20AT42224Pt100, Pt100016-bit (0.1°C)2-wire / 3-wire
X20AT23112Thermocouple16-bitSpecial function
X20AT24022TC: J,K,N,S,B,R16-bit (0.1°C)Cold junction comp.
X20AT64026TC: B,E,J,K,N,R,S,T16-bit (0.1°C)Cold junction comp.
X20ATA4922TC: J,K,N,S,B,R,E,C,T16-bitNetTime timestamping

Mixed / Special Function Modules

ModelDescription
X20DM93248 digital inputs + 4 digital outputs
X20CM1201Combination module (digital + analog)
X20CM8281Universal mixed module (digital + analog + counter)
X20MM2436PWM motor bridge, 2 channels
X20MM4456PWM motor bridge, 4 channels
X20SM1426Stepper motor module
X20SM1436Stepper motor module
X20DC1196Counter module, 1x 5V AB incremental encoder
X20DC1198Counter module, 1x 5V SSI
X20DC1396Counter module, 1x 24V incremental encoder
X20DC1398Counter module, 1x 24V SSI
X20DC2395/2396/2398/4395Multi-channel counter modules
X20DS1119/DS1319Ultrasonic distance measurement

Coated Modules

All modules are available in coated variants (prefix X20c instead of X20) for protection against condensation and corrosive gases, certified to BMW GS 95011-4 and EN 60068-2-60. Electronics are fully compatible with standard versions.


9. Thermocouple and RTD Input Handling

Thermocouple Modules (X20AT2402, X20AT6402)

Cold Junction Compensation (CJC)

Thermocouples measure the temperature difference between the hot junction (measurement point) and the cold junction (terminal block). The module must compensate for the cold junction temperature:

  • Internal CJC sensor: Pt1000 (or equivalent) integrated into the terminal block
  • Automatic compensation: Module continuously measures terminal temperature and adds it mathematically to the thermocouple EMF
  • CJC precision: ±2°C (natural convection after 10 min), ±4°C (forced convection after 10 min)
  • CJC temperature range: -25°C to +85°C
  • CJC resolution: 0.1°C (1 LSB)

External Cold Junction

For large distances between controller and measurement point, or for higher precision:

  1. Route thermocouple via copper extension wire from external cold junction to terminal
  2. Measure cold junction temperature with separate RTD sensor (e.g., X20AT2222)
  3. Write external CJC temperature into the module’s ExternalCompensationTemperature register
  4. Module uses this value instead of internal measurement

External CJC recommended when:

  • Large distances between controller and measurement point
  • Module consuming more than 1 W is connected adjacent
  • Strongly fluctuating ambient conditions (draft, temperature changes)

Linearization

  • Standard: EN 60584 for thermocouples
  • Method: Internal linearization — the module’s firmware performs the conversion from EMF to temperature
  • Supported types: J, K, N, S, B, R (AT2402); B, E, J, K, N, R, S, T (AT6402)

Thermocouple Measurement Ranges

TypeRangeMax Error @25°C (Gain)Max Error @25°C (Offset)
J (Fe-CuNi)-210 to 1200°C0.06%0.04%
K (NiCr-Ni)-270 to 1372°C0.06%0.05%
N (NiCrSi-NiSi)-270 to 1300°C0.06%0.05%
S (PtRh10-Pt)-50 to 1768°C0.06%0.11%
B (PtRh30-PtRh60)0 to 1820°C0.06%0.13%
R (PtRh13-Pt)-50 to 1664°C0.06%0.09%

Conversion Time (X20AT2402, Function Model 0)

Channels ActiveFilterConversion Time
1 channel50 Hz (20 ms)40.2 ms
2 channels50 Hz (20 ms)120.6 ms
1 channel1000 Hz (1 ms)2.2 ms
2 channels1000 Hz (1 ms)4.4 ms

Formula: (n + 1) * (2 * Filter time + 200 µs) for Function Model 0.

RTD Modules (X20AT2222)

Measurement Principle

Constant Current Source (250 µA) → Pt100/Pt1000 Sensor → Sense Resistor
    → Multiplexer → Sigma-Delta ADC → Linearization (EN 60751) → Temperature

RTD Specifications

ParameterValue
Sensor typesPt100, Pt1000
Measurement range-200°C to +850°C
Resistance range0.1 to 4500 Ω / 0.05 to 2250 Ω
Resolution0.1°C (1 LSB)
Measurement current250 µA ±1.25%
Reference resistor4530 Ω ±0.1%
Connection modes2-wire or 3-wire (configurable per module)
Max error (gain, @25°C)±0.037%
Max error (offset, @25°C)±0.0015%
Max gain drift±0.004%/°C
Nonlinearity<0.001%
Crosstalk<-93 dB
CMRR (DC)>95 dB
CMRR (50 Hz)>80 dB

Conversion Time (X20AT2222)

ChannelsConfigurationFilterTime
1Any50 Hz (20 ms)20 ms
2Same sensor type50 Hz (20 ms)80 ms
2Different sensor types50 Hz (20 ms)120 ms

10. 4-20mA vs 0-10V Input Considerations

Comparison

Parameter4-20 mA Current Loop0-10 V Voltage Signal
Noise immunityExcellent — current signals are immune to voltage drops from wiring resistance and EMIPoorer — susceptible to ground loops, EMI, and voltage drops
Cable lengthUp to 1000+ m (practically limited by compliance voltage)Typically <30 m for good accuracy
Wire resistance impactNone (current is constant regardless of resistance)Significant — voltage divider effect with wire resistance
Open wire detectionBuilt-in — 0 mA = open wire (below 4 mA threshold)No built-in detection
Short circuit detectionPossible via underrange detectionRisk of damage without protection
Ground loopsImmune (floating current source)Susceptible — may need isolated modules
Resolution usage4 mA offset wastes ~20% of range but provides “live zero”Full range used (0-100%)
Live zeroYes — 4 mA = zero process value, 0 mA = faultNo — 0 V could be zero or fault
Load requirementsModule’s shunt resistor; field device must supply currentModule’s input impedance (typically >100 kΩ)

B&R Module Considerations

On the X20AI4622, both 0-20mA/4-20mA and ±10V are available on the same module. Signal type is determined by terminal connection:

  • Voltage terminals: Connect signal to U+ and U- terminals
  • Current terminals: Connect signal to I+ and U- (common) terminals
  • Configuration: Set via software register ConfigOutput01

Error Values (4-20mA)

ConditionCurrentDigital ValueHex
0% process4 mA00x0000
100% process20 mA327670x7FFF
Open wire0 mAStatus register flags error0x7FFF (error value)
Underrange<4 mAStatus bit set0x8001
Overshoot>20 mAStatus bit set0x7FFF

When to Choose Each

  • Use 4-20mA when: Long cable runs (>10m), noisy industrial environment, outdoor installations, need open-wire detection, multiple devices on same loop
  • Use 0-10V when: Short distances, clean environment, simple sensors (potentiometers, pressure transducers with voltage output), cost-sensitive applications

11. Output Types: Relay, Transistor, Analog

Transistor Outputs (Solid-State)

The most common digital output type in the X20 system. Uses current-sourcing or current-sinking FETs:

ParameterX20DO9322 (0.5A source)X20DO8332 (2A source)X20DO2321 (2A sink)
Output typeCurrent-sourcing FETCurrent-sourcing FETCurrent-sinking FET
Nominal current0.5 A per channel2 A per channel2 A per channel
Total current6 A module max16 A module max4 A module max
Switching delay<300 µs<300 µs<300 µs
Max frequency (resistive)500 Hz500 Hz500 Hz
Leakage current (off)5 µA5 µA5 µA
RDS(on)210 mΩ50 mΩ50 mΩ
Short-circuit current<12 A peak<12 A peak<12 A peak
ProtectionThermal shutdown, freewheeling diodeThermal shutdown, freewheeling diodeThermal shutdown, freewheeling diode

Inductive load handling: Built-in freewheeling diode with typical braking voltage of 50 VDC when switching off inductive loads. Maximum switching frequency for inductive loads depends on coil inductance (see module derating curves).

Relay Outputs

Available on select modules (e.g., X20DO2649, X20DO4529, X20DO6529):

  • Contact type: Electromechanical relay
  • Rated current: 2 A per channel
  • Connection: 2-wire (isolated contacts)
  • Advantages: Complete galvanic isolation of output contacts, can switch AC or DC, no leakage current
  • Disadvantages: Limited switching life (mechanical wear), slower switching speed, contact bounce
  • Use cases: Switching different voltage levels, AC loads, applications requiring true isolation

Analog Outputs (X20AO4622)

ParameterVoltage ModeCurrent Mode
Range±10 V0-20 mA / 4-20 mA
Resolution±12-bit (1 LSB = 2.441 mV)12-bit (1 LSB = 4.883 µA)
Max load≥1 kΩ600 Ω
Short-circuit protectionCurrent limiting ±40 mAShort-circuit proof
Output filter1st-order LP, 10 kHz cutoff1st-order LP, 10 kHz cutoff
Start-up behaviorInternal enable relay — defined state at power-upSame
Gain accuracy0.08%0.09%
Offset accuracy0.05%0.05%
Gain drift0.015%/°C0.02%/°C
Nonlinearity<0.007%<0.007%

12. Identifying Faulty IO Card vs Wiring vs Sensor

Systematic Diagnostic Approach

Step 1: Check module LEDs (quick visual diagnosis)
Step 2: Read software status registers (detailed per-channel info)
Step 3: Measure field signals with multimeter
Step 4: Isolate the fault source (card / wiring / sensor)

Decision Matrix

SymptomIO Card FaultWiring FaultSensor Fault
All channels dead, all LEDs OFFX (no power)X (main supply)
All modules showing single flash (r-led)X (bus failure)X (X2X cable)
Single channel error, adjacent channels OKPossibleX (broken wire)X (failed sensor)
Multiple random channel errorsX (internal fault)PossiblePossible
Consistent offset on analog valueX (CJC drift, calibration)Possible (resistance)X (sensor drift)
Open circuit on one channelUnlikelyX (broken wire)X (open sensor)
Short circuit error flaggedUnlikelyX (short to GND/V+)Possible
Overshoot on analog inputX (ADC fault)UnlikelyX (sensor overrange)
Intermittent errorsX (loose connection internally)X (loose terminal)X (intermittent sensor)
Error persists after module swapRuled outXX
Error moves with moduleXRuled outRuled out

Step-by-Step Procedure

For Digital Input Issues:

  1. Check LED: Is the channel LED changing state?

    • LED OFF = No signal → Check sensor, wiring, power supply
    • LED ON but PLC reads wrong → Possible bus communication issue
  2. Measure at terminal block:

    • 0 V when expected 24 V → Sensor not actuating or wiring broken
    • 24 V when expected 0 V → Sensor stuck or wiring shorted
    • Voltage present but unstable → Loose connection, ground fault
  3. Swap sensor: Connect known-good sensor → If error persists, issue is wiring or card

  4. Swap module: Replace with known-good module → If error follows module, card is faulty

For Analog Input Issues:

  1. Read status register: Check for overflow (0x7FFF), underrange (0x8001), open circuit (0x7FFF with open flag), or invalid (0x8000)
  2. Measure signal at terminal: Compare multimeter reading to PLC value
  3. Check error values:
    • 2-3°C offset on thermocouple: Normal (CJC inherent accuracy ±1-2°C for Type K). Apply software calibration offset.
    • Large offset: Check wiring resistance, sensor type configuration, grounding
  4. Monitor CJC register (CompensationTemperature): Should read close to ambient temperature

For Digital Output Issues:

  1. Check status register: Each bit reports short circuit, overload, or missing supply
  2. Check output LED: Orange = ON, Off = OFF
  3. Measure output voltage at terminal:
    • 0 V when commanded ON → Short circuit, overload, or module fault
    • 24 V when commanded OFF → External voltage applied (wiring fault)
  4. Total current check: Sum of all active outputs must not exceed module rating

Thermocouple-Specific Troubleshooting

SymptomLikely CauseAction
2-3°C offset from referenceInherent thermocouple accuracy + CJC errorApply software calibration offset in PLC
Large offset (>10°C)Wrong thermocouple type configuredCheck ConfigOutput02 register setting
Reading -25°C or max rangeOpen thermocouple or broken wireCheck wiring continuity
Erratic readingsIncorrect extension wire usedReplace with correct type (KX for Type K)
All channels reading same valueMultiplexer faultReplace module

RTD-Specific Troubleshooting

SymptomLikely CauseAction
Open circuit flaggedBroken sensor or wiringMeasure resistance at terminal
Reading 0°C when hotShort circuit in sensor leadsCheck resistance (should be ~100-385 Ω for Pt100 at room temp)
Offset between channelsWire resistance imbalanceUse 3-wire connection instead of 2-wire
Crosstalk between channelsExceeding common-mode rangeCheck wiring grounding

13. IO Card Power Supply: Rails and Current Limits

Power Architecture

The X20 system has two distinct power domains:

                    24 VDC Field Supply
                          |
                    [X20PSxxxx Power Supply Module]
                    /                    \
            X2X Link Bus Supply     Internal I/O Supply
            (Bus Module)            (I/O Module Electronics)
                    |                       |
            [X20BMxx Bus Module]     [I/O Modules]
                    |
            X2X Data + Bus Power
                    |
            [I/O Module Bus Side]

Power Supply Modules

ModelDescriptionX2X LinkInternal I/O SupplyNotes
X20PS210024 VDC supplyYes (feed)Continuous through10 A slow-blow fuse
X20PS211024 VDC supplyYes (feed)Continuous through10 A slow-blow fuse
X20PS330024 VDC supplyYes (feed)Interrupted to leftBus + I/O supply
X20PS331024 VDC supplyYes (feed)Interrupted to leftBus + I/O supply

Bus Modules

ModelDescriptionI/O Supply
X20BM01Basic 24 VDC bus moduleNot specified
X20BM0524 VDC, with node switchNot specified
X20BM1124 VDC keyedInternal I/O supply connected through
X20BM1524 VDC keyed, node switchInternal I/O supply connected through
X20BM3124 VDCNot specified

Current Limits and Monitoring

  • Bus supply current monitoring: Bus supply current >2.3 A is flagged as a warning
  • Internal current limiting: Power supply modules have internal current limit (short circuit protection) and connections for external fuse
  • I/O module current budget: Each module’s datasheet specifies bus power consumption and internal I/O power consumption
  • Total I/O current: Must be calculated based on the sum of all connected modules

Power Consumption Examples

ModuleBus PowerInternal I/O Power
X20DI9371 (12 DI)~0.1 W~0.5 W
X20DO9322 (12 DO, 0.5A)0.26 W1.15 W
X20AI4622 (4 AI)0.01 W~1 W
X20AO4622 (4 AO)0.01 W1.8 W (Rev. ≥J0)
X20AT2222 (2 RTD)0.01 W1.1 W
X20AT2402 (2 TC)0.01 W0.72 W
X20BR9300 (Bridge)2.5 WN/A
X20BT9100 (Terminal)0.85 WN/A

Derating

Modules require derating above certain ambient temperatures. For example:

  • X20DO9322: No derating below 55°C; max current per channel reduced to 0.35 A above 55°C
  • X20AO4622: Derating curves for voltage vs. ambient temperature (see datasheet)

14. Diagnostic Features per Card Type

Diagnostic Capabilities Summary

FeatureDigital InputDigital OutputAnalog InputAnalog OutputTemperature (TC)Temperature (RTD)
Module run/error LEDYesYesYesYesYesYes
Per-channel LEDYes (green)Yes (orange)Yes (green)Yes (orange)Yes (green)Yes (green)
Software error registerYesYes (per-ch)Yes (per-ch)Yes (channel type)Yes (per-ch)Yes (per-ch)
Open circuit detectionN/AN/AYesN/AYesYes
Overrange/underrangeN/AN/AYesN/AYesYes
Short circuit detectionN/AYes (per-ch, 10ms)N/AYesN/AN/A
Overload detectionN/AYes (thermal)N/AYesN/AN/A
Wire break detectionVia input stateN/AYes (via underrange)N/AYesYes
Invalid firmware detectionYesYesYesYesYesYes
IO Cycle CounterN/AN/AYesN/AYesYes
Serial number readoutYesYesYesYesYesYes
Hardware variant readoutYesYesYesYesYesYes
Power supply monitoringN/AYes (per-ch)N/AN/AN/AN/A

General Data Points (All Modules)

Accessible via the bus controller, these are common to all X20 I/O modules:

  • Serial number — Unique module identifier
  • Hardware variant — Hardware revision
  • B&R ID code — Module type identifier (e.g., 0x1BA8 for AT2402, 0x1BA3 for AO4622)

Automation Studio Diagnostics

In Automation Studio (B&R’s IDE):

  • TM920 Diagnostics and Service: Module-level diagnostics including I/O status, error history, and module identification
  • mapp View Diagnostics: HMI visualization for monitoring module status
  • Remote Diagnostics (SDM): Access via http://<IP>/SDM/ for runtime diagnostic information
  • SafeDESIGNER (safety modules): Safety-specific diagnostics, module acknowledgment, parameter monitoring

15. Hot-Swap Capabilities

X20 Module Replacement Procedure

The X20 system supports hot-swapping of individual I/O modules without powering down the entire system:

  1. Release the module from the DIN rail using the snap-lock mechanism
  2. Disconnect the terminal block from the I/O module (field wiring stays connected to the terminal block)
  3. Insert replacement module into the same position on the DIN rail
  4. Reconnect the terminal block to the new module
  5. Module auto-initializes on the X2X bus (LED sequence: single flash → blinking → steady ON)

Key Design Features Enabling Hot-Swap

  • Terminal block separation: Terminal blocks remain connected to field wiring; only the electronic module is removed
  • X2X Link hot-insertion: Bus modules detect new modules automatically
  • Keyed bus modules: Prevent incorrect module insertion (keying ensures correct module type and orientation)
  • Internal enable relay (analog outputs): Analog output modules have an internal enable relay that holds outputs in a defined state during power-up
  • SafeLOGIC acknowledgment: Safety modules require software acknowledgment after replacement (X20SL: hardware button; X20SLX: software only)

Safety Module Replacement

Safety I/O modules have additional requirements:

  • X20SL (SafeLOGIC): Has a hardware acknowledge button on the module
  • X20SLX (SafeLOGIC X): No hardware interface — acknowledgment can only be done via software (SafeDESIGNER + password)
  • The SafeLOGIC stores all module serial numbers; replacing a module triggers a safety acknowledgment requirement
  • System remains in safe state until the new module is acknowledged

Limitations

  • Bus module replacement: Requires re-initialization of all downstream modules
  • Power supply module replacement: Momentary power interruption to downstream I/O modules
  • CPU replacement: Full system restart required
  • X2X cable hot-plug: Not recommended — terminator jumpers must be maintained

Coated Module Starting Temperature

Coated modules (X20c prefix) can be powered on at temperatures as low as -40°C (cold start), though operating temperature must still meet specifications (-25°C to +60°C horizontal) once running. This is relevant for hot-swap in cold environments.


Sources


Key Findings

  1. X20 IO modules use plug-in connectors with spring-cage terminals (X20TB series) — these are keyed and cannot be inserted incorrectly. Always note the terminal block type when documenting an undocumented machine.
  2. Digital input LED behavior reveals connection status and diagnostic state: solid green = input active, blinking = diagnostic (short circuit, wire break, or module fault), off = no signal. The pattern differs between standard and diagnostic-capable modules.
  3. Analog modules offer 12-bit or 16-bit resolution — the resolution choice affects measurement precision and noise susceptibility. Higher resolution modules have higher per-channel cost but better accuracy for critical measurements.
  4. Module power consumption is documented per-module but often overlooked — summing all module currents against the X20PS power supply rating (typically 24V/10A) prevents brownout-related IO failures. See power budgets in each module’s datasheet.
  5. Diagnostic-capable modules (X20SD/x models) provide channel-level wire-break and short-circuit detection — these modules cost more but are invaluable for troubleshooting intermittent sensor issues on undocumented machines.
  6. X2X Link bus power is limited to 7W (derated to 5W above 55C) — large IO stations may require additional bus power supplies. Overloading causes the red X2X LED on the power supply module to illuminate.
  7. The ‘e’ (error) LED blinking on any X20 module means I/O power supply is missing — the X20 system separates logic power (+24V LOGIC) from field power (+24V I/O). A blinking ‘e’ LED with ‘r’ steady green means the module is communicating fine but has no field power. Check the power supply module’s terminal 1-5/1-6, verify jumpers, and confirm the E-stop relay is not dropping the I/O supply rail. The X20PS2100 and X20PS3300 power supply modules have separate logic and I/O power terminals specifically for this E-stop scenario.
  8. A continuously blinking ‘r’ LED on all modules indicates X2X bus communication loss — if every module in a rack shows blinking ‘r’, the bus controller (X20BC0087) has lost its X2X link to the CPU. Check the X2X daisy-chain cable, verify terminator jumpers on the last module, and confirm the CPU is in RUN mode (not STOP or SERVICE). This is one of the most common “all outputs off” failure modes on B&R machines. See x2x-protocol.md for X2X troubleshooting.
  9. Missing X20 end plates (X20EB8011) can cause intermittent shorts — the orange plastic end plates are not decorative. Without them, the exposed bus contacts of the rightmost module can short against cabinet metal, causing sporadic I/O faults that stop the machine. Always verify both left and right end plates are installed on every X20 rack.
  10. Power supply module LEDs have specific meanings: ‘r’ single flash = RESET mode; ‘r’ blinking = PREOPERATIONAL; ‘r’ steady green = RUN; ‘e’ double flash = X2X power overload OR I/O power too low; ‘e’ steady red = X2X power overloaded; ‘S’ yellow = RS232 activity; ‘l’ red = X2X power overload. The power supply module is the first thing to check when any I/O fault occurs.

Cross-References

B&R PLC Program Reverse Engineering: Technical Analysis

A comprehensive technical reference for analyzing, disassembling, and recovering information from compiled B&R (Bernecker + Rainer) IEC 61131-3 programs.


1. B&R Object Code File Formats

B&R Automation Studio uses several proprietary file formats throughout the development, compilation, and deployment lifecycle. Understanding each is essential to any analysis of compiled B&R code.

1.1 .br Files — Compiled Binary Modules

The .br extension is the primary B&R compiled object format. The Automation Studio compiler produces executable program modules (“B&R modules”) in machine code as .br files. These are transferred to the controller as “system objects” during project download.

Contents:

  • Native machine code (x86 or ARM depending on target CPU)
  • Compiled library references and dependency information
  • Configuration parameters for the module
  • Symbolic variable names (if symbol export is enabled at compile time)
  • Module metadata: name, version, size in bytes, target architecture

The .br format is proprietary and undocumented. B&R has not publicly released format specifications. The compiled binary cannot be decompiled back to source code using any B&R-provided tool.

Source: B&R Automation Studio Quick Start guide states: “The compiler provides an executable program module (B&R module) in machine code. B&R modules (*.BR files) can be transferred to the controller as system objects.” — https://instrumentacionycontrol.net/wp-content/uploads/2017/11/IyCnet_BR_AutomationStudio_QuickStart_MASYS2ASQS-E_240.pdf

1.2 .pc Files — Project Configuration

The .pc file is the Automation Studio project container. It is not a compiled binary but rather a project-level configuration and metadata file that holds references to all project components.

Contents:

  • Project-level metadata (name, version, Automation Studio version)
  • Hardware tree configuration (left panel in AS project view)
  • Software tree configuration (right panel in AS project view)
  • References to all programs, user files, hardware configuration options
  • I/O mapping definitions and hardware module assignments
  • Task configuration (cycle times, priorities)
  • References to library dependencies

The .pc file acts as the top-level manifest for the entire Automation Studio project. It does not contain compiled code itself but references the .br binary modules that are generated during compilation.

Source: B&R Community forum: “The project itself is a collection of programs, user files, hardware trees, hardware configuration options, configuration files, I/O mappings…” — https://community.br-automation.com/t/referencing-all-resources-from-another-project/2354

1.3 .obj Files — Intermediate Object Files

During the B&R compilation pipeline, intermediate object files may be generated. These are linker-able binary units that contain partially compiled code. In the B&R ecosystem, .obj files typically appear in the build directory of an Automation Studio project and represent pre-linked object code for individual Program Organization Units (POUs) or C source files before final linking into a .br module.

Contents (typical):

  • Relocatable machine code sections
  • Symbol table (local and external references)
  • Relocation entries for linker resolution
  • Debug information (if compiled with debug symbols)

These are standard object file formats (likely COFF or ELF derivatives) used by the GNU toolchain that underpins the B&R compiler for C programs, rather than a B&R-proprietary format.

1.4 .l5k Files — Allen-Bradley Export (Not B&R)

The .l5k extension is associated with Rockwell/Allen-Bradley RSLogix/Studio 5000 PLC export files (L5K is an XML-like ASCII export format for ControlLogix/CompactLogix programs). This format is not used by B&R and is included here only for clarity, as it frequently appears in general PLC reverse engineering discussions.

For B&R systems, the relevant export format would be the Automation Studio archive format (.ar) or individual source files (.st, .ld, .c, .h, .var).

1.5 Other Relevant B&R File Formats

ExtensionPurpose
.stStructured Text source files
.ldLadder Diagram source files
.varVariable declaration files (Global.var, Local.var)
.c / .hANSI C source and header files (B&R supports C programming)
.arAutomation Studio project archive (includes all dependencies)
.expExport files (legacy PG2000 format)
.lhLibrary header files
.visVisualization pages

2. B&R IEC 61131-3 Compiler Architecture

2.1 Compilation Pipeline Overview

B&R Automation Studio compiles IEC 61131-3 programs (Structured Text, Ladder Diagram, Function Block Diagram, Sequential Function Chart) through a multi-stage pipeline:

Source (.st/.ld/.sfc) → Frontend Parser → Intermediate Representation (IR)
                                                      ↓
                            C Source (.c/.h) → GCC Cross-Compiler → Object (.obj)
                                                      ↓
                                              Linker → Binary Module (.br)

Key characteristics:

  • The IEC 61131-3 languages are compiled through a proprietary frontend that produces an intermediate representation
  • This IR is then translated to C code, which is compiled by an embedded GCC cross-compiler targeting the PLC’s CPU architecture
  • Final linking produces the .br binary module in native machine code
  • B&R supports both IEC 61131-3 languages and native ANSI C programming on the same controller

2.2 Target Architectures

B&R controllers span multiple CPU architectures, which determines the instruction set of the compiled binary:

Controller SeriesCPU ArchitectureExample CPUs
X20/X67Intel Atom (x86) or ARMAtom E3940, ARM Cortex
Power Panel / Panel PCIntel Core-i (x86_64)Celeron to Core i7
CP47x Series32-bit (proprietary, ~150 MHz)CP474-EL
APC (Automation PC)Intel x86_64Various Core-i generations
ACOPOStrak/motorsARM or PowerPCVarious embedded cores

The Claroty Team82 research confirmed: “B&R X20 series offers a modular and compact PLC configuration. It is based on an Intel ATOM CPU (X86) or ARM architecture, and runs VxWorks as its RTOS firmware.”

Source: https://web-assets.claroty.com/resource-downloads/team82-evil-plc-attack-research-paper-1661285586.pdf

2.3 Runtime Environment

All modern B&R controllers run Automation Runtime (AR), B&R’s proprietary real-time operating system based on VxWorks (see ar-rtos.md for full OS internals). Older B&R 2005 systems and some legacy controllers used different RTOS solutions. Automation Runtime provides:

The compiled .br modules are loaded and executed by Automation Runtime as native code, running directly on the CPU without any bytecode virtual machine layer. The boot sequence that loads these modules is documented in cf-card-boot.md.


3. Bytecode vs. Native Code: B&R’s Approach

3.1 B&R Compiles to Native Code

B&R does not use an intermediate bytecode format like Siemens MC7. This is a critical architectural difference from other major PLC vendors:

VendorCompilation TargetExecution Model
B&RNative machine code (x86/ARM)Direct CPU execution
Siemens S7-300/400MC7 bytecodeVirtual machine interpreter
Siemens S7-1200/1500MC7+ bytecodeVirtual machine with JIT
CODESYS (generic)Proprietary bytecodeVirtual machine interpreter
Beckhoff TwinCATNative machine codeDirect execution

The B&R compilation pipeline translates IEC 61131-3 source code through C to native machine code using GCC. This means:

  1. No virtual machine layer — the compiled code runs as direct x86/ARM instructions
  2. Better performance — no interpretation or JIT overhead
  3. Harder to reverse engineer — the output is standard machine code, not a structured bytecode with documented opcodes
  4. Standard tools apply — disassemblers for x86/ARM can analyze the binary directly

3.2 Contrast with Siemens MC7 Bytecode

Siemens S7 PLCs compile all IEC 61131-3 languages into MC7/MC7+ bytecode, a lower-level representation executed by a virtual machine in the PLC. As Claroty’s research describes: “Regardless of input sources, the PLC program will be compiled into MC7 / MC7+ bytecode, which is a lower-level representation of the code. After being compiled by the engineering station, code blocks (in MC7/MC7+ format) are downloaded and installed into a PLC.”

MC7 bytecode has been partially reverse-engineered by the security community:

  • The rizin reverse engineering framework includes rz-libmc7 for disassembling MC7 bytecode
  • PNF Software’s JEB decompiler supports S7 PLC program analysis

Source: https://claroty.com/team82/research/the-race-to-native-code-execution-in-plcs Source: https://github.com/rizinorg/rz-libmc7

B&R’s native code compilation means no equivalent bytecode specification exists to leverage for analysis.


4. Approaches to Decompilation and Disassembly

4.1 Disassembly (Native Code)

Since B&R compiles to native x86/ARM machine code, standard disassembly toolchains apply. The CP1584 uses an Intel Atom E640T (x86, 32-bit). See cp1584-hardware-ref.md for the full CPU specification and ar-rtos.md for the AR runtime environment details.

For x86-based controllers (X20, APC, Power Panel):

  • Use disassemblers that support x86 (32-bit or 64-bit depending on CPU)
  • Identify code regions by looking for function prologues and epilogues
  • The GCC-compiled code will follow standard x86 calling conventions

For ARM-based controllers:

  • Use ARM disassemblers (ARMv7, ARMv8 depending on CPU)
  • Standard ARM calling conventions (AAPCS) will apply

Practical Disassembly Workflow with Ghidra

Ghidra (NSA’s open-source reverse engineering suite) is the recommended tool for analyzing B&R .br binaries:

# Install Ghidra (requires JDK 17+)
# Download from https://github.com/NationalSecurityAgency/ghidra/releases

# Create a project and import the .br file
# Ghidra will prompt for language/specification:
#   - For CP1584 (Intel Atom, 32-bit): x86:LE:32:default
#   - For newer X20CP3xxx (x86_64): x86:LE:64:default
#   - For ARM-based modules: ARM:LE:32:v8

# After import, run auto-analysis. Key steps:
# 1. Window → Defined Strings — extract all string constants
# 2. Window → Functions — review identified function boundaries
# 3. Window → Data Type Manager — look for known B&R data structures
# 4. Symbol Tree → Exports/Imports — find library function calls

# Search for IO address patterns (memory-mapped IO ranges):
# Search → For Bytes → 0x...
# B&R IO ranges are documented in memory-map.md

Binary Identification Commands

# Step 1: Identify file format
file binary.br
# Expected: may show "data" if proprietary, or "ELF" if B&R wraps standard format

# Step 2: Find embedded format signatures
binwalk binary.br
# Look for: ELF headers, PE headers, LZMA/zlib compressed sections

# Step 3: Extract all strings (minimum 6 characters for useful output)
strings -n 6 -t x binary.br > strings_output.txt

# Step 4: Extract Unicode strings (B&R IEC STRING type may use wide chars)
strings -e l -n 4 binary.br > unicode_strings.txt

# Step 5: Look for B&R-specific identifiers
grep -i "BR_\|Automation\|POWERLINK\|X2X\|mbtcp\|AsMb\|mapp" strings_output.txt

# Step 6: Quick hex analysis of file header
xxd -l 512 binary.br | head -32

Python Script: Automated B&R Binary Analyzer

#!/usr/bin/env python3
"""Analyze B&R .br binary files for recoverable information."""

import struct
import sys
import re
from collections import Counter

def analyze_br_binary(filepath):
    with open(filepath, 'rb') as f:
        data = f.read()

    print(f"=== B&R Binary Analysis: {filepath} ===")
    print(f"File size: {len(data):,} bytes ({len(data)/1024:.1f} KB)")
    print()

    # Check for known file format magic bytes
    magic_checks = [
        (b'\x7fELF', 'ELF binary'),
        (b'MZ', 'PE executable'),
        (b'\x1f\x8b', 'gzip compressed'),
        (b'BZh', 'bzip2 compressed'),
        (b'\x5d\x00\x00', 'LZMA compressed'),
    ]
    for magic, name in magic_checks:
        if data[:len(magic)] == magic:
            print(f"Format: {name}")

    # Check if file starts with a B&R-specific header
    if data[:2] == b'BR' or data[:4] == b'BR\x00\x00':
        print("Format: B&R proprietary header detected")
        print(f"Header bytes: {data[:32].hex()}")
    print()

    # Extract ASCII strings (min 6 chars)
    ascii_pattern = re.compile(rb'[\x20-\x7e]{6,}')
    strings_found = ascii_pattern.findall(data)
    print(f"ASCII strings found: {len(strings_found)}")

    # Categorize strings
    categories = Counter()
    interesting = []
    for s in strings_found:
        s_decoded = s.decode('ascii', errors='ignore')
        if re.search(r'\.st|\.ld|\.var|\.c|\.h|\.vis', s_decoded):
            categories['source_file_refs'] += 1
            interesting.append(s_decoded)
        elif re.search(r'mapp|AsMb|POWERLINK|X2X|Modbus|OPC|SDM', s_decoded):
            categories['library_refs'] += 1
            interesting.append(s_decoded)
        elif re.search(r'Error|Fault|Alarm|Warning', s_decoded):
            categories['diagnostics'] += 1
            interesting.append(s_decoded)
        elif re.search(r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}', s_decoded):
            categories['ip_addresses'] += 1
            interesting.append(s_decoded)

    print("String categories:")
    for cat, count in categories.most_common():
        print(f"  {cat}: {count}")

    if interesting:
        print(f"\nInteresting strings (top 30):")
        for s in interesting[:30]:
            print(f"  {s}")

    # Look for x86 function prologue patterns (push ebp; mov ebp, esp)
    prologue = b'\x55\x8b\xec'
    prologue_count = 0
    pos = 0
    while True:
        pos = data.find(prologue, pos)
        if pos == -1:
            break
        prologue_count += 1
        pos += 1
    print(f"\nPotential x86 function prologues (55 8B EC): {prologue_count}")

    # Look for standard calling convention patterns
    ret_count = data.count(b'\xc3')  # x86 RET instruction
    print(f"RET instructions (C3 hex): {ret_count}")

    print(f"\n=== Analysis complete ===")
    print(f"For IO address mapping, cross-reference with [memory-map.md](memory-map.md)")
    print(f"For runtime environment details, see [ar-rtos.md](ar-rtos.md)")

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print(f"Usage: {sys.argv[0]} <binary.br>")
        sys.exit(1)
    analyze_br_binary(sys.argv[1])

4.2 Decompilation

Decompilation of native machine code to recover IEC 61131-3 source is effectively impossible. The compilation pipeline goes through C as an intermediate step, and:

  1. The IEC 61131-3 → C translation is lossy (structured control flow is linearized)
  2. The C → machine code compilation is lossy (variable names stripped, optimizations applied)
  3. No decompiler can reconstruct structured text, ladder diagrams, or function block diagrams from x86/ARM machine code
  4. At best, you can recover C-like pseudocode showing control flow and data operations

4.3 Structured Analysis Methodology

A practical approach to understanding B&R compiled code:

  1. Binary format identification — Use file, binwalk, or hex analysis to determine the format
  2. Architecture detection — Identify the target CPU from file headers
  3. Section mapping — Identify code, data, and symbol sections
  4. String extraction — Pull all string literals for contextual clues
  5. Function identification — Locate function boundaries using prologue patterns
  6. Cross-reference building — Track data references and call relationships
  7. IO address correlation — Match memory-mapped IO addresses with hardware documentation

4.4 Academic Frameworks

The research community has developed frameworks for PLC binary analysis, though none are B&R-specific:

ICSREF (NDSS 2019): Automated reverse engineering of CODESYS PLC binaries. While focused on CODESYS (not B&R), the methodology of binary format reverse engineering, symbol table recovery, and control flow analysis is applicable.

Source: https://www.ndss-symposium.org/ndss-paper/icsref-a-framework-for-automated-reverse-engineering-of-industrial-control-systems-binaries/ Code: https://github.com/momalab/ICSREF

PLC-BinX (2025): Cross-platform binary code analysis for PLC binaries. Implements CODESYS-specific reverse engineering with three stages: identifying code regions, recovering function boundaries, and semantic analysis.

Source: https://arxiv.org/html/2605.17392v2


5. Tools for Analyzing B&R Binary Files

5.1 Standard Reverse Engineering Tools

ToolApplicability to B&RNotes
IDA ProHighIndustry-standard disassembler/decompiler. Supports x86, ARM. IDAPython scripting for custom analysis. Commercial license required.
GhidraHighNSA’s open-source reverse engineering suite. Supports x86, ARM. Built-in decompiler produces C pseudocode. Scriptable via Java/Python. Free.
rizin/radare2HighOpen-source framework. Has rz-libmc7 plugin for Siemens MC7 but also supports standard x86/ARM disassembly.
Binary NinjaMedium-HighCommercial RE platform with good x86/ARM support and API.
objdumpMediumGNU binutils tool. Can disassemble x86/ARM sections if the .br format uses standard ELF/COFF object wrappers. Limited without format documentation.
readelfMediumReads ELF headers and sections. Useful if B&R’s internal format wraps standard ELF.
fileLow-MediumIdentifies file type from magic bytes. May or may not recognize B&R proprietary formats.
binwalkMediumScans for embedded file signatures, compressed sections, and known file headers within the binary.
stringsHighExtracts printable ASCII/Unicode strings. Simple but effective for finding variable names, error messages, configuration strings.

5.2 B&R-Specific Considerations

Standard tools work on B&R binaries only if the underlying format is recognizable (e.g., ELF-wrapped). If B&R uses a fully proprietary container format with custom headers, initial analysis requires:

  1. Manual hex analysis to identify format structure
  2. Custom parsing scripts (Python with struct module) to extract sections
  3. Pattern-based identification of code vs. data regions

The B&R C compiler is GCC-based, which means compiled C code within B&R modules will exhibit standard GCC characteristics:

  • Standard function prologues (push ebp; mov ebp, esp for x86)
  • DWARF debug sections (if debug info is present)
  • Standard calling conventions

For the complete CP1584 hardware specification (CPU, memory, interfaces) that determines the binary architecture, see cp1584-hardware-ref.md.

5.3 Extracting the Binary from a Running CP1584

When you have physical access to the PLC but no project files, the compiled binaries reside on the CompactFlash card. See cf-card-boot.md for the full CF card file layout and ftp-web-interface.md for remote extraction methods:

# Method 1: FTP access (if FTP server is enabled on the CP1584)
ftp 192.168.10.1
# Navigate to /Card/ or /System/ directories
# Compiled binaries are typically in:
#   /Card/System/B&R/ or /System/Objects/
# Files may have .br, .obj, or no extension

# Method 2: Physical CF card extraction (power down first!)
# Remove CF card, image it with dd on a Linux workstation:
dd if=/dev/sdb of=cp1584_cf_card.img bs=4M status=progress
# Mount and explore:
sudo mount -o ro,loop cp1584_cf_card.img /mnt/cf_card/
find /mnt/cf_card/ -name "*.br" -o -name "*.obj"

# Method 3: ARsim (if you have the binary file)
# Load the .br into Automation Studio's ARsim for behavioral analysis
# This runs the binary in a PC-based simulation environment

5.3 Automation Studio’s Own Analysis Tools

While not reverse engineering tools per se, Automation Studio provides capabilities for understanding code structure:

  • Cross-Reference Generator: Must be explicitly generated (not built by default). Shows all uses of any variable, function block, or data object across the project.
  • List Usage: Tracks variable usage across all code blocks.
  • Find in Files: Global text search across project source files.

Source: https://community.br-automation.com/t/new-to-b-r-best-practices-for-tracking-variables-list-usage-cross-ref-and-tracing-physical-i-os/11429


6. Information Recoverable from Compiled Code

6.1 What CAN Be Recovered

InformationRecoverabilityMethod
String literalsHighstrings tool or manual extraction from data sections
Error messages / alarm textHighString extraction from read-only data sections
Constant valuesHighFound as immediate operands in disassembled code
Control flow structureMediumDisassembly and control flow graph reconstruction
Function boundariesMediumPrologue/epilogue pattern matching
Library function callsMediumExternal call references and imported function names
Symbolic variable namesMedium-LowOnly if symbol table was included in the binary
Data structure layoutLow-MediumInferred from access patterns in disassembled code
IO mapping addressesLow-MediumMemory-mapped addresses in data access instructions

6.2 What CANNOT Be Recovered

InformationReason
Original IEC 61131-3 language (ST/LD/FBD/SFC)Language-specific constructs are lost during compilation to C and then to machine code
Original variable namesStripped during compilation unless explicitly retained in symbol table
CommentsNever included in compiled output
Ladder diagram topologyRung structure, contacts, and coils cannot be reconstructed from machine code
Function block diagram connectionsVisual wiring is lost; only the resulting logic remains
Visualization pagesSeparate from program code; not included in compiled binary
Task configurationStored in project metadata, not in the compiled binary module
Hardware configurationSeparate from program code; defined in the .pc project file
Original project organizationPOU hierarchy and project tree structure not preserved in binary

6.3 B&R’s Own Statement

B&R explicitly states that compiled application objects loaded to the controller contain:

  • Binary machine code for the CPU
  • Compiled library references
  • Configuration parameters
  • Symbolic variable names (if enabled)

And explicitly do not contain:

  • Original POU source files
  • Task configuration in XML format
  • Visualization pages

Source: https://industrialmonitordirect.com/blogs/knowledgebase/br-cp474-source-code-upload-is-recovery-possible


7. Configuration Data in Compiled Binaries

7.1 IO Mapping

B&R IO mapping is typically defined in the project hardware configuration and stored in the .pc project file and associated configuration objects. The compiled binary itself contains the machine code that reads from and writes to memory-mapped IO addresses, but the mapping metadata (which physical terminal maps to which software variable) is stored separately in the project configuration.

In the compiled code, IO access appears as memory reads/writes to specific address ranges:

  • Digital IO: bit-level access to memory-mapped regions
  • Analog IO: word/dword access to specific address offsets
  • Communication data: structure-based access to protocol buffer areas

7.2 Task Configuration

Task configuration (cycle times, priorities, task-to-POU assignments) is defined at the project level and is part of the project metadata downloaded to the controller. This configuration tells Automation Runtime when and how to invoke each compiled program module.

The task configuration is likely stored in a separate configuration block within the download package, not within the .br binary module itself. Automation Runtime reads this configuration to set up the cyclic execution schedule.

7.3 Parameter Data

B&R supports “Data Objects” (DatObj) — persistent parameter blocks that can be read/written at runtime. These are managed via the DataObj library and stored in separate memory areas on the PLC, distinct from the compiled program code.

Source: https://community.br-automation.com/t/as4-as6-datobj-data-modules-on-the-plc/7656


8. String Extraction from Compiled Code

8.1 Techniques

String extraction is one of the most productive analysis techniques for B&R binaries:

Basic string extraction:

strings -n 6 -t x binary.br > strings_output.txt

Unicode string extraction:

strings -e l -n 4 binary.br > unicode_strings.txt

Context-aware extraction:

  • Look for string references in disassembled code (addresses of lea or mov instructions pointing to data sections)
  • Cross-reference string addresses with code that uses them for functional context
  • B&R IEC string type uses a structure with length + data; look for these patterns

8.2 What Strings Reveal

In B&R compiled code, strings typically include:

  • Variable names: If the symbol table is embedded (controlled by compiler settings)
  • Error/alarm messages: Hardcoded message strings from alarm handling
  • OPC UA tag names: If OPC UA server configuration includes string identifiers
  • File paths: Configuration file paths or log file names
  • Network addresses: Hardcoded IP addresses or hostnames
  • Protocol identifiers: POWERLINK, EtherCAT, Modbus identifiers
  • Function block instance names: If debugging information is included
  • User-defined string constants: Any STRING typed constant in the source code

8.3 B&R IEC String Format

B&R’s IEC 61131-3 STRING type uses a specific memory layout: a header byte containing the maximum length followed by the actual string data (not null-terminated in the traditional C sense, though a null terminator may be present for compatibility). When searching for IEC strings in binary data, look for patterns of a length byte followed by ASCII text.


9. Cross-Referencing with Live PLC Behavior

9.1 Online Monitoring with Automation Studio

Automation Studio provides online monitoring capabilities when connected to a running PLC:

Watch/Trace:

  • Add variables to the watch window to monitor real-time values
  • Force variables to specific values to observe program response
  • Set breakpoints in source code (only with source available)
  • Single-step through program execution

Online View:

  • Connect to a running target via Ethernet
  • Monitor variable states in real time
  • Examine IO states
  • View task cycle information and timing

Source: https://community.br-automation.com/t/new-to-b-r-best-practices-for-tracking-variables-list-usage-cross-ref-and-tracing-physical-i-os/11429

9.2 Using Online Data to Understand Compiled Code

When source code is unavailable but you can connect to a running PLC:

  1. Variable enumeration via PVI: B&R’s PVI (Process Visualization Interface) protocol can enumerate all variables available in the runtime, including their symbolic names and memory addresses. This works without source code. See pvi-api.md for the complete PVI API reference.

  2. PVI Monitor tool: Can view all available variables in real-time and export the variable list. The runtime stores variable metadata in its memory structure.

  3. OPC UA browsing: If OPC UA is configured on the PLC, any OPC UA client can browse the address space and extract variable names, types, and current values. See opcua.md for OPC-UA configuration details.

  4. System variables: AR system variables (CPU temperature, cycle times, task info) are always available and provide runtime context. See system-variables.md for the full list.

  5. Behavioral analysis: By manipulating inputs and observing outputs, you can map the functional behavior of the compiled program, even without understanding the internal code. Use io-sniffing.md for intercepting fieldbus traffic and diagnostics-sdm.md for SDM-based error tracking.

Source: https://industrialmonitordirect.com/blogs/knowledgebase/extracting-variables-from-br-cp476-plc-without-source-code

9.3 Limitations of Online Analysis

  • Cannot see internal logic or program flow
  • Cannot modify program code
  • Cannot recover original source structure
  • Variable names are only available if they were included in the compiled binary
  • No access to visualization or task configuration through online monitoring alone

10.1 Overview of Applicable Law

Reverse engineering of industrial control software is subject to multiple overlapping legal frameworks. This section provides general information, not legal advice. Consult qualified counsel for specific situations.

10.2 U.S. Law — Key Statutes

DMCA Section 1201 (17 U.S.C. § 1201): Prohibits circumventing “technological protection measures” that control access to copyrighted works. Software vendors may argue that authentication, code signing, obfuscation, and protocol encryption are protected technical measures. Section 1201(f) provides a narrow exception for reverse engineering “for the sole purpose of identifying and analyzing elements of the program necessary to achieve interoperability” with an independently created program.

Copyright Law (17 U.S.C. § 107 — Fair Use): Making copies of software for analysis may qualify as fair use, particularly for interoperability research (established in Sega v. Accolade and Sony v. Connectix). However, fair use is a fact-specific defense, not a guarantee.

Trade Secret Law: Reverse engineering through fair and independent means does not generally violate trade secret law. However, if you obtained the software subject to an NDA or contractual obligation prohibiting reverse engineering, analysis may constitute misappropriation.

Contract Law (EULAs/NDAs): Many industrial software licenses include “no reverse engineering” clauses. The Blizzard v. BnetD case established that mass-market EULA provisions prohibiting reverse engineering can be enforceable, potentially overriding fair use rights.

ECPA (18 U.S.C. § 2510): Network packet inspection during analysis may require consent of parties or the network operator.

Source: https://www.eff.org/issues/coders/reverse-engineering-faq

10.3 Industrial Control-Specific Considerations

  • Safety implications: Modifying or incorrectly reconstructing PLC logic can cause physical harm, equipment damage, or environmental releases. Any reverse engineering of safety-critical systems carries extraordinary liability risk.
  • OEM contractual obligations: Machine builders and system integrators typically own the PLC programs and may have contractual rights protecting their intellectual property.
  • Regulatory compliance: Industries such as pharmaceutical, food, nuclear, and chemical have regulatory requirements around validated control systems. Unauthorized modification of validated PLC programs can violate regulations (FDA 21 CFR Part 11, etc.).
  • B&R licensing: B&R Automation Studio itself is licensed software. Using it in ways that violate the B&R license agreement creates contractual risk.

10.4 Legitimate Use Cases

Reverse engineering of PLC code may be legally defensible in certain scenarios:

  • Security research: Analyzing binaries for vulnerabilities (with responsible disclosure)
  • Interoperability: Developing compatible systems when no documentation exists
  • Legacy system maintenance: When the original vendor is unavailable and no source exists
  • Malware analysis: Investigating known or suspected PLC malware (e.g., Stuxnet-style attacks)
  • Forensic investigation: Post-incident analysis after a cybersecurity event

10.5 Risk Mitigation

  • Consult legal counsel before beginning any reverse engineering
  • Ensure lawful acquisition of the software
  • Avoid agreeing to “no reverse engineering” clauses where possible
  • Use least-intrusive techniques first (online monitoring before binary disassembly)
  • Document the legitimate purpose of the analysis
  • Consider engaging the vendor or OEM for authorized access to documentation

11. Using Automation Studio’s Online View

11.1 Connection Setup

  1. Connect PC to PLC via Ethernet
  2. In Automation Studio: Online → Settings → Browse for Targets
  3. Select the target controller from the list
  4. Establish the online connection

11.2 Available Online Capabilities (Without Source)

Even without the source project, Automation Studio can connect to a running PLC and provide:

CapabilityWithout SourceWith Source
Monitor variable valuesYes (if symbols available)Yes
Force variablesYes (with appropriate permissions)Yes
View task statusYesYes
Examine IO statesYesYes
Set breakpointsNoYes
Single-step executionNoYes
Cross-reference variablesNoYes
Modify program codeNoYes

11.3 Extracting Symbol Tables Online

When connected to a running PLC with Automation Studio (even without source code), you may be able to:

  1. Browse the online variable list
  2. Export the symbol table if the runtime exposes it
  3. Monitor and log variable values over time
  4. Identify the data types and memory addresses of variables

This provides partial documentation of the running program’s data model, which can be combined with binary analysis for a more complete picture.

11.4 ARsim (Simulation)

Automation Studio includes ARsim (Automation Runtime Simulation), which allows running compiled programs on a PC without physical hardware. If you have the compiled binary, you can potentially load it into ARsim and observe its behavior, which provides a controlled environment for behavioral analysis.

Source: https://www.youtube.com/watch?v=2YwZ9ubOE5c


12. Recovery of IO Mapping from Compiled Binaries

12.1 Approaches

From the binary itself:

  1. Disassemble the compiled code and look for memory access patterns to known IO address ranges (see memory-map.md for the full CP1584 address space)
  2. B&R IO is memory-mapped; IO modules appear at specific addresses in the controller’s address space — see io-card-hardware.md for IO card architecture details
  3. Identify reads from input addresses and writes to output addresses by analyzing mov, load, and store instructions
  4. Cross-reference these addresses with B&R hardware documentation to identify physical IO points

From the runtime (online):

  1. Connect to the running PLC via PVI or OPC UA
  2. Browse the variable namespace for IO-mapped variables
  3. Examine the addressing in the variable declarations
  4. Use Automation Studio’s hardware comparison feature (AS 4.0+): “Automation Studio provides a new access to compare configured hardware and software with online connected hardware.”
  5. Use the system diagnostic manager (SDM) to identify IO module status — see diagnostics-sdm.md

From project artifacts:

  1. If any project files survive (even partial), the hardware configuration in the .pc file contains the IO mapping — see config-file-formats.md for the file format details
  2. IO configuration is typically stored in XML within the project structure
  3. Check for backup files, version control archives, or configuration exports
  4. The CF card contains configuration files that define the IO layout — see cf-card-boot.md

12.2 B&R IO Addressing

B&R uses a hierarchical addressing scheme:

  • Hardware modules are addressed by bus and slot position
  • Software variables are mapped to these hardware addresses through the IO mapping configuration
  • The compiled code accesses IO through these mapped addresses

Without the project configuration, you must reverse-engineer the mapping by:

  1. Identifying all memory-mapped IO addresses in the disassembled code
  2. Determining which addresses are reads (inputs) vs. writes (outputs)
  3. Correlating addresses with known hardware module specifications
  4. Testing hypotheses by manipulating physical IO and observing program behavior

12.3 Limitations

  • Complex IO mapping (aliasing, scaling, offset calculations) embedded in the code may be difficult to identify
  • Network-based IO (POWERLINK, EtherCAT, OPC UA) may not follow simple memory-mapped patterns
  • IO configuration for Safety systems (Safety PLC) may be additionally protected

13. B&R Symbol Export/Import Mechanisms

13.1 Library-Based Symbol Management

B&R provides a library system that supports partial IP protection through compiled libraries:

Compiled Libraries:

  • Functions and function blocks can be compiled into binary libraries and distributed without source code
  • The library exports symbolic interface definitions (function names, parameter types) while hiding the implementation
  • Consumers can import and use the library in their projects, but cannot view the internal code
  • Binary libraries are compiled for specific CPU architectures (ARM, x86)

Library Export:

  • Automation Studio supports exporting libraries in compiled (binary) form
  • “When exporting binary libraries they are only compiled for the CPU architectures used in the project. So a good way is to have one ARM CPU (Like X20CP0484) and one Intel CPU (Like X20CP1585) to make sure the library can be used on both.”

Source: https://community.br-automation.com/t/error-occured-while-build-source-after-export-import-library/6564

13.2 Symbol Table Settings

B&R provides compiler settings that control whether symbolic information is included in compiled binaries:

  • Symbol export: Can be enabled/disabled at the project or module level
  • Debug information: DWARF debug sections can be included (increases binary size but preserves variable names and types)
  • Variable address information: Can be exported for online monitoring purposes

13.3 Source Code Protection Features

B&R offers several mechanisms for protecting intellectual property:

  1. Compiled libraries: Distribute code as pre-compiled binaries with only interface definitions exposed
  2. Password protection: Tasks and libraries can be password-protected (anyone can use them, but only the password holder can modify them)
  3. Source file “encryption”: Automation Studio has a source file protection feature, though B&R community discussions reveal it is “more of an access control check/deterrent than true encryption”

Source: https://community.br-automation.com/t/automate-encrypting-source-files/11031 Source: https://community.br-automation.com/t/hiding-parts-of-my-program/3247

13.4 Technology Guarding

B&R’s Technology Guarding system provides additional protection for intellectual property through a server-based licensing system. It uses SSL/TLS encryption for secure communication with Automation Studio. For license recovery procedures when the OEM is unavailable, see license-mgmt.md.

Source: https://community.br-automation.com/t/ssl-tls-encryption-required-for-access-to-technology-guarding-server-and-automation-studio-upgrades/3049

13.5 Extracting Binaries Without Automation Studio Access

When you cannot connect Automation Studio to the PLC (e.g., password-protected — see access-recovery.md for recovery procedures), alternative binary extraction paths exist:

  1. FTP server: If enabled, the FTP interface exposes the CF card file system remotely (see ftp-web-interface.md)
  2. Physical CF card removal: Power down, remove the CF card, and image it on a workstation (see cf-card-boot.md)
  3. Web server / SDM: The System Diagnostics Manager web interface may expose limited file access
  4. Serial console: The bootloader recovery mode provides limited file system access via serial (see bootloader-recovery.md)

14. Practical Limitations

14.1 Hard Limitations — What Cannot Be Done

  1. Source code recovery: B&R compiled binaries cannot be decompiled back to original IEC 61131-3 source code. This is a fundamental limitation, not a tool limitation.

  2. Source upload from PLC: “By default, B&R does not save source code on the target. Only the compiled binary is stored, which cannot be decompiled to source code.” Automation Studio cannot upload source code from a connected controller.

  3. Language reconstruction: You cannot determine whether the original code was written in Structured Text, Ladder Diagram, or any other IEC 61131-3 language from the compiled binary.

  4. Visualization recovery: HMI/visualization pages are never included in compiled program binaries.

  5. Project organization: The original project structure, naming conventions, and organization are lost in compilation.

  6. Comments and documentation: All developer comments and inline documentation are stripped during compilation.

14.2 Partial Recovery — What Can Sometimes Be Done

  1. Variable names: Recoverable if symbol table was included in the binary (controlled by compiler settings) or via online PVI enumeration from a running PLC.

  2. Control flow: Recoverable at the machine code level using disassemblers and decompilers, yielding C-like pseudocode. The high-level IEC semantics are lost.

  3. String constants: Fully recoverable from the data sections of the binary.

  4. IO mapping: Partially recoverable through combination of binary analysis and online monitoring.

  5. Library dependencies: Import/export symbols reveal which external libraries the code depends on.

  6. Functional behavior: Can be observed and documented through online monitoring and IO manipulation.

14.3 Effort vs. Reward Assessment

GoalFeasibilityEffort RequiredPractical Approach
Full source recoveryImpossibleN/AContact OEM/B&R support
Functional understandingPossibleVery HighOnline monitoring + behavioral analysis
IO mapping documentationPossibleHighPVI enumeration + manual tracing
Variable list extractionPossibleLow-MediumPVI tools or OPC UA browsing
Security auditPossibleVery HighBinary disassembly + fuzzing + protocol analysis
Migration to new platformPossibleVery HighRecreate logic from behavioral analysis + documentation

When faced with a B&R PLC running unknown compiled code:

  1. Connect online and extract the variable list via PVI/OPC UA
  2. Document all IO behavior by systematically toggling inputs and recording outputs
  3. Extract all strings from the binary for contextual information
  4. Identify the CPU architecture to select appropriate disassembly tools
  5. Disassemble the binary with Ghidra or IDA Pro for structural analysis
  6. Cross-reference online behavior with disassembled code to build understanding
  7. Document findings in a format suitable for recreation in a new project
  8. Recreate the program in a new Automation Studio project based on documented behavior

References

B&R Official Documentation

B&R Community Forum Discussions

Reverse Engineering Research

Siemens MC7 and Comparative Analysis

Security Research

Practical Guides

Community Discussions


Key Findings

  1. B&R compiles IEC 61131-3 source through a proprietary frontend to C code, then through an embedded GCC cross-compiler to native x86/ARM machine code (.br files). There is no intermediate bytecode layer like Siemens MC7, meaning standard disassemblers (IDA Pro, Ghidra, rizin) can analyze the binaries directly using conventional x86/ARM techniques.

  2. Source code cannot be recovered from compiled .br binaries. The IEC-to-C-to-machine-code pipeline is doubly lossy: language-specific constructs (ladder rungs, FBD wiring, SFC steps) are destroyed in the first translation, and variable names, comments, and project structure are stripped in the second. At best, C-like pseudocode can be recovered via Ghidra’s decompiler.

  3. Automation Studio cannot upload source code from a running PLC – only compiled binaries are stored on the controller. Without the original .ar project archive, the only actionable recovery paths are: (a) online monitoring via PVI/AS to extract variable names and values, (b) binary disassembly to recover control flow and constant values, and (c) IO mapping recovery from memory access patterns in the disassembled code.

  4. Information with the highest recoverability from binaries includes string literals, error messages, constant values (immediate operands), function boundaries (prologue/epilogue patterns), and library call references. Symbolic variable names are only recoverable if the compiler’s symbol export option was enabled at build time.

  5. The ICSREF framework (NDSS 2019, github.com/momalab/ICSREF) and PLC-BinX (2025) provide automated PLC binary analysis methodologies, though neither is B&R-specific. ICSREF’s approach – format identification, symbol table recovery, control flow analysis – is directly applicable to B&R’s GCC-compiled output.

  6. B&R provides four IP protection mechanisms: compiled libraries (binary distribution with only interface definitions), password protection (per-task/library), source file “encryption” (actually access control, not real encryption), and Technology Guarding (server-based licensing with SSL/TLS). The encryption mechanism is acknowledged by the community as a deterrent, not cryptographic protection.

  7. For practical analysis without source code, connect Automation Studio to the running PLC to monitor variable values, force IO states, and browse the online variable list. ARsim can load compiled binaries for behavioral analysis in a sandboxed PC environment without physical hardware.

  8. IO mapping recovery requires identifying memory-mapped read/write patterns in disassembled code (mov/load/store instructions targeting known IO address ranges), then cross-referencing those addresses with B&R hardware documentation to map them to physical IO points. Network-based IO (POWERLINK, EtherCAT) does not follow simple memory-mapped patterns.


Cross-References

Related FileRelevance
cp1584-forensics.mdInformation extraction methodology from a running CP1584 without project files
project-reconstruction.mdBuilding a new Automation Studio project from an unknown running PLC
memory-map.mdCPU memory map and IO address ranges for binary analysis cross-referencing
cf-card-boot.mdCF card file structure where compiled binaries are stored
config-file-formats.mdConfiguration file formats related to compiled project deployment
pvi-api.mdPVI API for online variable browsing and runtime analysis
execution-model.mdTask structure and IEC 61131-3 execution model relevant to binary analysis
firmware.mdAR firmware architecture and how compiled modules are loaded
license-mgmt.mdIP protection and Technology Guarding for compiled libraries
access-recovery.mdGaining access to an undocumented PLC for analysis
io-card-hardware.mdIO module addressing for mapping binary IO access patterns to physical modules
ar-rtos.mdVxWorks-based OS internals that execute the compiled binaries
cp1584-hardware-ref.mdCPU architecture (Intel Atom E640T) determining x86/32-bit binary format
opcua.mdOPC-UA server for online variable browsing without source code
modbus-gateway.mdModbus TCP as an alternative data extraction protocol
system-variables.mdAR system variables available for runtime monitoring during behavioral analysis
diagnostics-sdm.mdSystem Diagnostics Manager for error tracking on running systems
io-sniffing.mdFieldbus traffic interception for IO behavior mapping
ftp-web-interface.mdRemote file access methods for binary extraction
bootloader-recovery.mdSerial console access in bootloader mode for binary retrieval
online-changes.mdRuntime patching techniques for behavioral testing
custom-diagnostic-tools.mdBuilding diagnostic programs that run on the PLC itself
python-diagnostics.mdPython + PVI/OPC-UA scripts for automated data extraction
documentation-reconstruction.mdSystematic documentation of undocumented B&R machines
safe-io-diagnostics.mdSafety system considerations when analyzing safety-related code

Document compiled from public sources including B&R documentation, academic research, security publications, and community forums. Last updated: July 2026.

B&R PVI (Process Visualization Interface) — Complete Technical Reference

A comprehensive guide for programmatic PLC access via B&R’s PVI middleware.


Table of Contents

  1. What PVI Is and How It Works
  2. The PVI API: C/C++, .NET, COM
  3. Connecting to a CP1584 via PVI
  4. Reading and Writing Variables
  5. Browsing the Variable Namespace Without Project Files
  6. Pulling Diagnostic Data from a Running CP1584
  7. Error Handling: Error Codes and Recovery
  8. Data Types: B&R Types to PVI/C Types
  9. Callbacks and Event Handling
  10. Performance Considerations
  11. Python PVI Bindings
  12. Using PVI from Linux
  13. PVI vs OPC-UA: When to Use Which
  14. PVI License Requirements
  15. Example Code for Common Diagnostic Tasks

1. What PVI Is and How It Works

Overview

PVI (Process Visualization Interface) is B&R Industrial Automation’s proprietary communication middleware. It abstracts physical connections (Ethernet, serial, CAN, USB) behind a uniform API, enabling PC-based software to discover controllers, access variables symbolically, read/write process data, and manage controller lifecycle.

All higher-level B&R products consume PVI internally — OPC servers, B&R HMI panels, mapp View, Automation Studio’s online functionality, and PVI Transfer.

Client-Server Architecture

PVI uses a client-server principle allowing PVI applications to be operated remotely:

┌──────────────────┐         ┌──────────────────┐         ┌──────────────────┐
│   PVI Client     │  TCP/   │   PVI Manager    │  ANSL/  │   B&R Controller │
│   (Application)  │◄──────► │   (PviMan.exe)   │◄───────►│   (CP1584, X20,  │
│   - C API DLL    │         │   Windows service │  INA    │    APC, PowerPanel│
│   - .NET DLL     │         │   or process      │         │    Automation RT) │
│   - COM objects  │         │   Routes/lines    │         │   Port 11160/ANSL │
└──────────────────┘         └──────────────────┘         └──────────────────┘

Key Components

ComponentLocationFunction
PviMan.exe (PVI Manager)Windows hostCentral service: manages line configurations, routes traffic to controllers. Runs as Windows service or process.
PVIServerAutomation Runtime (controller)Exposes process variables from controller tasks to the network.
PVI Client LibrariesApplication (DLLs)C/C++ DLL (PviCom.dll), .NET assemblies (BR.AN.PviServices), COM objects.
PVI OPC ServerWindows hostTranslates OPC DA / UA calls into PVI calls.
PVI MonitorWindows hostGUI tool for monitoring connections, configuring logging, snapshots.

PVI Lines (Protocols)

PVI routes communication through “lines,” each a different protocol driver:

LineDriver CodeProtocolUse Case
ANSLLNANSLAutomation Net Standard Language (TCP)Primary modern protocol for variable access to AR ≥ V4.08 controllers.
INA2000LNINAINA2000 (UDP, legacy)Legacy protocol for older controllers. 255-byte payload per frame limit. REMOVED in PVI 6.x — see critical note below.
SNMPLNSNMPSNMP v1Network configuration (IP, subnet, gateway) of B&R PLCs.
MODBUSLNMODBUSModbus TCPCommunication with third-party Modbus devices.
NET2000LNNETNET2000B&R’s legacy proprietary fieldbus.
ADILNADIAutomation Device InterfaceDirect local access on B&R IPCs (no network).
DCANLNDCANDevice CANCAN bus communication.

⚠️ CRITICAL: PVI 6.x Drops INA2000 Support

Starting with PVI version 6 (bundled with Automation Studio 6), B&R completely removed INA2000 protocol support. PVI 6.x supports only ANSL and SNMP lines. This means:

  • Any existing code, scripts, or tools using LNINA will fail with missing DLL errors on AS6 installations.
  • The INA2000 DLL (PviIna.dll) is no longer shipped and cannot be side-loaded.
  • ANSL is backward-compatible with all AR ≥ V4.08 controllers, including the CP1584 — so migration is straightforward: replace LNINA with LNANSL in your connection code.
  • If you are using a recovered AS4 project and upgrading to AS6, search the entire project for “INA” or “LNINA” and replace with ANSL equivalents.

Migration checklist for existing PVI code:

1. Find all occurrences of: "LNINA", "INA2000", "PviIna"
2. Replace driver code:    LNINA    → LNANSL
3. Replace protocol string: "INA"    → "ANSL"
4. Update connection:      UDP port → TCP port (default 1212)
5. Test ANSL connectivity:  PVI Manager → Add Line → ANSL → your PLC IP

See firmware-version-mgmt.md §5.3.1 for full AS4→AS6 migration details.

PVI Object Hierarchy

PVI organizes objects in a strict hierarchy. All objects must be created parent-first:

PVI (root)
 └── Line (e.g., LNANSL)
      └── Device (e.g., TCP/IP interface)
           └── CPU/Station (e.g., PLC at 192.168.1.50)
                ├── Task
                │    ├── Variable (process variable)
                │    └── Variable ...
                ├── Module
                └── CPU-level Variables (global scope)

PVI Architecture Sources


2. The PVI API: C/C++, .NET, COM

C/C++ API (Native)

The C API is the foundational interface exposed through PviCom.dll (on Windows). It uses a flat function-based API with string-based object creation and callback-based event handling.

Key functions:

// Initialization / Shutdown
DWORD PviInitialize( DWORD dwFlags );
DWORD PviUninitialize( void );
DWORD PviInitializeEx( DWORD dwFlags, char *szPviManName );  // connect to specific PVI Manager

// Object Management
DWORD PviCreate(       LPSTR lpszParent, LPSTR lpszName, LPSTR lpszAccess, PFN_PVI_COMPLETION pfnCompletion, DWORD dwUserData );
DWORD PviCreateLink(  LPSTR lpszParent, LPSTR lpszName, LPSTR lpszAccess, PFN_PVI_COMPLETION pfnCompletion, DWORD dwUserData );
DWORD PviDelete(      LPSTR lpszIdent, PFN_PVI_COMPLETION pfnCompletion, DWORD dwUserData );

// Variable Read / Write
DWORD PviRead(        LPSTR lpszIdent, LPSTR lpszAccess, LPVOID pBuffer, DWORD dwLength, DWORD dwTimeout, PFN_PVI_COMPLETION pfnCompletion, DWORD dwUserData );
DWORD PviWrite(       LPSTR lpszIdent, LPSTR lpszAccess, LPVOID pBuffer, DWORD dwLength, DWORD dwTimeout, PFN_PVI_COMPLETION pfnCompletion, DWORD dwUserData );
DWORD PviReadValue(   LPSTR lpszIdent, LPVOID pBuffer, DWORD dwLength, DWORD dwTimeout );
DWORD PviWriteValue(  LPSTR lpszIdent, LPVOID pBuffer, DWORD dwLength, DWORD dwTimeout );

// Information / Status
DWORD PviGetInfo(     LPSTR lpszIdent, LPSTR lpszAccess, LPVOID pBuffer, DWORD dwLength, LPDWORD lpdwRetLen, DWORD dwTimeout );
DWORD PviGetList(     LPSTR lpszIdent, LPSTR lpszMask, LPSTR lpszAccess, LPVOID pBuffer, DWORD dwLength, LPDWORD lpdwRetLen, DWORD dwTimeout );

// Callbacks
DWORD PviSetCallbackMode( LPSTR lpszIdent, PFN_PVI_COMPLETION pfnCompletion, DWORD dwMode, DWORD dwUserData );
DWORD PviSetCallbackX(    LPSTR lpszIdent, PFN_PVI_COMPLETION_X pfnCompletionX, DWORD dwMode, DWORD dwUserData );

// Error
LPSTR PviGetErrorText( DWORD dwError, LPSTR lpszBuffer, DWORD dwLength );
DWORD PviGetLastError( void );

// ActiveX / COM (legacy)
DWORD PviCreateAx(  LPSTR lpszParent, LPSTR lpszName, LPSTR lpszAccess, PFN_PVI_COMPLETION pfnCompletion, DWORD dwUserData );

Callback signature:

typedef void (CALLBACK *PFN_PVI_COMPLETION)(
    LPSTR lpszIdent,   // object identifier
    DWORD  dwError,     // error code (0 = success)
    DWORD  dwEvent,     // event type (PVI_EVENT_LINK, etc.)
    DWORD  dwInfo1,
    DWORD  dwInfo2,
    DWORD  dwUserData
);

// Extended callback (PVI 4.x+)
typedef void (CALLBACK *PFN_PVI_COMPLETION_X)(
    LPSTR lpszIdent,
    DWORD  dwError,
    LPSTR lpszEvent,
    DWORD  dwInfo1,
    LPSTR lpszInfo2,
    DWORD  dwUserData
);

Headers and libraries are provided in the PVI Development Setup:

  • C:\BrAutomation\PVI\V4.xx\Include\PviCom.h
  • C:\BrAutomation\PVI\V4.xx\Lib\x64\PviCom.lib

.NET API (BR.AN.PviServices)

The .NET wrapper (BR.AN.PviServices.dll) provides an object-oriented interface. It is a GUI variable interface that uses the Windows Message Loop to trigger events.

Key classes:

using BR.AN.PviServices;

// Hierarchy
PviConnection connection = new PviConnection(); // connects to Pvi Manager
connection.Root                                   // PVI root object
Line line = new Line(connection.Root, "LNANSL", "CD=LNANSL");
Device device = new Device(line, "TCP", "CD=/IF=TcpIp");
Cpu cpu = new Cpu(device, "myPLC", "CD=/IP=192.168.1.50");
Task task = new Task(cpu, "myTask");
Variable variable = new Variable(task, "myVar");

// Read/Write
variable.ReadValue();
variable.WriteValue(42);

// Event-driven updates
variable.ValueChanged += (sender, e) => {
    Console.WriteLine($"Value: {variable.Value}");
};

// CPU diagnostics
cpu.Connected += (sender, e) => { /* connected */ };
cpu.ErrorChanged += (sender, e) => { /* handle errors */ };

// CPU info
string cpuStatus = cpu.Status.RunState; // "Run", "Stop", "Init", ...
DateTime cpuTime = cpu.Time;

// Start/stop tasks
task.Start();
task.Stop();
task.Cycle(3);   // single-cycle mode, N cycles
task.Resume();    // resume single-cycle

// Connection lifecycle
connection.Start(); // begins event loop
connection.Stop();  // shuts down

Thread safety note: BR.AN.PviServices is NOT thread-safe. All modifications to PVI object members must be done on the main UI thread. Use Invoke/BeginInvoke if updating from background threads.

COM API (Legacy)

PVI also exposes a COM/ActiveX interface via PviCreateAx(). This is primarily for legacy VB6 applications and is not recommended for new development. The COM interface wraps the same underlying C API.

PVI Services Version Compatibility

PVI VersionAR CompatibilityAPI Changes
PVI 3.xAR 3.xINA2000 primary, ANSL emerging
PVI 4.xAR 4.x+ANSL primary, INA2000 legacy. Extended callbacks.
PVI 5.xAR 5.xImproved .NET API, 64-bit support
PVI 6.xAR 6.xANSL and SNMP only (INA removed)

PVI API Sources


3. Connecting to a CP1584 via PVI

Target Overview: CP1584

The CP1584 is a B&R Power Panel with an integrated controller and display (Automation Runtime). It exposes PVI via ANSL (TCP) and legacy INA2000 (UDP).

Connection Parameters

ParameterValueNotes
ProtocolANSL (recommended)Automation Net Standard Language
Default TCP Port11160Default INA2000 transport port. Note: Some B&R documentation and tools (e.g., ANSL discovery) reference port 11169. Both ports may be active depending on AR version and configuration. Port 11160 is the INA2000/PVI TCP port; port 11169 is the ANSL COMT port. Try both if one doesn’t respond.
OPC UA Port4840If OPC UA is enabled (AR ≥ 4.0)
INA2000 Port11160 (UDP)Legacy; 297-byte frame limit (255 payload + 42 headers)

ANSL Connection String Format

/IF=TcpIp /IP=<ip_address> [/PORT=<port>] [/SLOT=<slot>] [/PASS=<password>]

C/C++ Example: Connect to CP1584

#include "PviCom.h"

DWORD err;

// Initialize PVI (connects to local PVI Manager)
err = PviInitialize(0);
if (err != 0) {
    char errMsg[256];
    PviGetErrorText(err, errMsg, sizeof(errMsg));
    printf("PviInitialize failed: %s\n", errMsg);
    return -1;
}

// Create ANSL line
err = PviCreate("PVI", "LNANSL", "CD=LNANSL", myCallback, 0);

// Create TCP device
err = PviCreate("LNANSL", "TCP", "CD=/IF=TcpIp", myCallback, 0);

// Create CPU station (CP1584)
err = PviCreate("LNANSL/TCP", "CP1584", 
    "CD=/IP=192.168.1.50 /PORT=11160", 
    myCallback, 0);

// Wait for PVI_EVENT_LINK (connection established)

.NET Example: Connect to CP1584

using BR.AN.PviServices;

var connection = new PviConnection();

var line = new Line(connection.Root, "LNANSL", "CD=LNANSL");
var device = new Device(line, "TCP", "CD=/IF=TcpIp");
var cpu = new Cpu(device, "CP1584", "CD=/IP=192.168.1.50 /PORT=11160");

cpu.ErrorChanged += (sender, e) => {
    if (cpu.ErrorCode == 11020) {
        Console.WriteLine("Unable to establish connection");
    } else if (cpu.ErrorCode != 0) {
        throw new PviException(cpu.ErrorCode);
    } else {
        Console.WriteLine("Connected to " + cpu.Name);
    }
};

connection.Start();

Python (Pvi.py) Example: Connect to CP1584

from pvi import *

pviConnection = Connection()

line = Line(pviConnection.root, 'LNANSL', CD='LNANSL')
device = Device(line, 'TCP', CD='/IF=TcpIp')
cpu = Cpu(device, 'CP1584', CD='/IP=192.168.1.50')

def cpuErrorChanged(error: int):
    if error == 11020:
        print("Unable to establish connection")
        pviConnection.stop()
    elif error != 0:
        raise PviError(error)
    else:
        print(f"Connected to CPU, AR-Version: {cpu.version}")

cpu.errorChanged = cpuErrorChanged
pviConnection.start()

SNMP Line: Network Configuration

SNMP is used for IP configuration of B&R devices (set IP, subnet, gateway):

line = Line(pviConnection.root, 'LNSNMP', CD='LNSNMP')
device = Device(line, 'SNMP', CD='/IF=SNMP /IP=192.168.1.50 /CM=public')

Connection Troubleshooting

SymptomCauseFix
“Unable to establish connection” (error 11020)Wrong IP, controller not reachable, ANSL disabledVerify IP with ping; check ANSL enabled in project
PVI line shows “Station not responding”Subnet mismatch, firewall blocking port 11160Check subnet; open TCP 11160
Timeout on high-latency links (>300ms)INA2000’s request-response protocol has high latency sensitivitySwitch to ANSL which is TCP-based and more latency-tolerant
Error 4806Requested data not foundVariable doesn’t exist or isn’t exposed; check variable name

Connecting to CP1584 Sources


4. Reading and Writing Variables

Variable Access Paths

Variables are addressed hierarchically:

LNANSL/TCP/CP1584/<TaskName>/<VariableName>

For global (CPU-scope) variables:

LNANSL/TCP/CP1584/<VariableName>

C/C++: Synchronous Read/Write

// Synchronous read (blocks until complete)
float value;
DWORD err = PviReadValue("LNANSL/TCP/CP1584/myTask/myRealVar", 
                          &value, sizeof(float), 5000);  // 5s timeout

// Synchronous write
int newValue = 42;
err = PviWriteValue("LNANSL/TCP/CP1584/myTask/myIntVar", 
                     &newValue, sizeof(int), 5000);

C/C++: Asynchronous Read/Write

// Asynchronous read — callback fires when data arrives
err = PviRead("LNANSL/TCP/CP1584/myTask/myRealVar", 
              "CV=0",        // access string (Control Value, format 0 = raw)
              &buffer, sizeof(buffer), 5000,
              readCompleteCallback, userData);

// Asynchronous write
err = PviWrite("LNANSL/TCP/CP1584/myTask/myIntVar",
               "CV=0",
               &newValue, sizeof(newValue), 5000,
               writeCompleteCallback, userData);

C/C++: Access Strings

The access string parameter (lpszAccess) controls formatting:

Access CodeMeaning
CV=0Raw binary value
CF=<format>Format string for display
RF=<ms>Refresh rate in milliseconds (for cyclic reads)
HY=<threshold>Hysteresis — only report changes above threshold
VT=<type>Variable type override
VL=<bytes>Variable length
VN=<count>Array dimension count

.NET: Read/Write with Events

// Read with auto-refresh
var tempVar = new Variable(task, "gHeating.status.actTemp");
tempVar.RF = 200;  // refresh every 200ms
tempVar.HY = 0.5;  // hysteresis 0.5°C

tempVar.ValueChanged += (sender, e) => {
    Console.WriteLine($"Temperature: {tempVar.Value}");
};

// Direct write
var setpoint = new Variable(task, "gHeating.setpoint");
setpoint.WriteValue(75.0f);

Python (Pvi.py): Read/Write

from pvi import *

pviConnection = Connection()
line = Line(pviConnection.root, 'LNANSL', CD='LNANSL')
device = Device(line, 'TCP', CD='/IF=TcpIp')
cpu = Cpu(device, 'CP1584', CD='/IP=192.168.1.50')
task = Task(cpu, 'myLogic')

# Read a variable with auto-refresh (200ms)
temperature = Variable(task, 'gHeating.status.actTemp', RF=200, HY=0.5)
temperature.valueChanged = lambda v: print(f'Temp = {v}')

# Write a variable
setpoint = Variable(task, 'gHeating.setpoint')
def onConnected(error):
    if error == 0:
        setpoint.value = 75.0
        print(f'Wrote setpoint: {setpoint.value}')

task.errorChanged = onConnected
pviConnection.start()

Reading/Writing All IEC Data Types (Python Example)

from datetime import datetime, time, date, timedelta
from pvi import *

# Writing all basic IEC types (from Pvi.py basics1.py example)
variableList = (
    ('myBOOL',    True),
    ('myUSINT',   123),
    ('mySINT',    -123),
    ('myUINT',    1234),
    ('myINT',     -1234),
    ('myUDINT',   1234567),
    ('myDINT',    -124567),
    ('myREAL',    1.234e2),
    ('myLREAL',   -3.1415e100),
    ('mySTRING',  b'hello, world'),
    ('myWSTRING', 'hello, world'),
    ('myDT',      datetime.fromisoformat('2011-11-04T00:05:23')),
    ('myTIME',    timedelta(minutes=3, seconds=45, milliseconds=33)),
    ('myTOD',     time(hour=14, minute=30, second=13)),
    ('myDATE',    date.today()),
    ('myINTArray',      (1, 2, 3, 4, 5, 6, 7)),
    ('mySTRINGArray',   (b'Huey', b'Dewey', b'Louie')),
    ('myREALArray',     100.0),  # broadcast single value to all elements
)

for name, value in variableList:
    variable = Variable(task, name)
    variable.value = value       # write
    print(f'{name}: {variable.value}')  # read back
    variable.kill()

ANSL Read Path Size Threshold

From the B&R community documentation:

  • Variables > 64 kB are read asynchronously
  • Variables ≤ 64 kB are read synchronously

This has implications for large arrays and structs — plan for callback-based handling.

Reading and Writing Variables Sources


5. Browsing the Variable Namespace Without Project Files

PVI can enumerate all objects on a controller without needing the Automation Studio project. This is critical for diagnostics, generic HMI tools, and data discovery.

C/C++: PviGetList

// Get list of tasks on a CPU
char buffer[8192];
DWORD retLen;
DWORD err = PviGetList(
    "LNANSL/TCP/CP1584",  // CPU ident
    "*Task*",               // mask: list all tasks
    "C=Info",               // access: return info objects
    buffer, sizeof(buffer),
    &retLen,
    5000
);

// Parse the returned buffer — contains formatted list of task objects

.NET: Cpu.ExternalObjects

// Wait for CPU connection, then enumerate
cpu.Connected += (s, e) => {
    var allObjects = cpu.ExternalObjects;
    
    var modules = allObjects.Where(o => o.Type == "Module").Select(o => o.Name);
    var tasks = allObjects.Where(o => o.Type == "Task").Select(o => o.Name);
    var globalVars = allObjects.Where(o => o.Type == "Pvar").Select(o => o.Name);
    
    foreach (var taskName in tasks) {
        var task = new Task(cpu, taskName);
        // task.ExternalObjects gives task-local variables
    }
};

Python (Pvi.py): List All Objects on a CPU

from pvi import *
from pprint import pprint

pviConnection = Connection()
line = Line(pviConnection.root, 'LNANSL', CD='LNANSL')
device = Device(line, 'TCP', CD='/IF=TcpIp')
cpu = Cpu(device, 'CP1584', CD='/IP=192.168.1.50')

def cpuErrorChanged(error):
    if error == 0:
        allObjects = cpu.externalObjects

        # Modules
        moduleNames = [o['name'] for o in allObjects if o['type'] == 'Module']
        for name in moduleNames:
            module = Module(cpu, name)
            print(f"Module: {name}, Status: {module.status}")
            module.kill()

        # Tasks
        taskNames = [o['name'] for o in allObjects if o['type'] == 'Task']
        for name in taskNames:
            task = Task(cpu, name)
            print(f"Task: {name}, Status: {task.status}")
            task.kill()

        # Global variables (CPU scope)
        globalVarNames = [o['name'] for o in allObjects if o['type'] == 'Pvar']
        for name in globalVarNames:
            var = Variable(cpu, name)
            print(f"Global Var: {name}, Type: {var.dataType}, Value: {var.value}")
            var.kill()

        # Task-local variables
        for taskName in taskNames:
            task = Task(cpu, taskName)
            taskVars = [o['name'] for o in task.externalObjects if o['type'] == 'Pvar']
            print(f"\nTask '{taskName}' variables:")
            for vname in taskVars:
                print(f"  {vname}")
            task.kill()

        pviConnection.stop()
    elif error:
        raise PviError(error)

cpu.errorChanged = cpuErrorChanged
pviConnection.start()

ANSL UIF Library: Browsing on Linux

When using the ANSL UIF library (Linux native), variable browsing works at the task level:

// Get module list
ANSLI_CPU_ListModules(identCpu);    // returns list of modules
ANSLI_CPU_ListTasks(identCpu);      // returns list of tasks

// Get variables (IMPORTANT: use TASK, not CPU for variables)
ANSLI_TASK_ListVariables(identTask); // returns task-local variables
ANSLI_CPU_ListVariables(identCpu);   // NOTE: may not be supported in all ANSL expansions

Important: According to B&R community, ANSLI_CPU_ListVariables may not be supported in ANSL expansion I. Use ANSLI_TASK_ListVariables with a connected task ident instead.

Browsing Variable Namespace Sources


6. Pulling Diagnostic Data from a Running CP1584

CPU Status Information

from pvi import *

cpu = Cpu(device, 'CP1584', CD='/IP=192.168.1.50')

def onConnected(error):
    if error == 0:
        # PVI version
        print(f"PVI Version: {pviConnection.root.version}")
        # AR version
        print(f"AR Version: {cpu.version}")
        # CPU run state
        print(f"Run State: {cpu.status.get('RunState', 'unknown')}")
        # CPU clock
        print(f"CPU Time: {cpu.time.isoformat()}")
        # CPU type info
        print(f"CPU Type: {cpu.cpuInfo.get('CT', 'unknown')}")
        # Installed tasks
        print(f"Tasks: {len(cpu.tasks)}")

Task Status and Control

from datetime import datetime, timedelta

task = Task(cpu, 'brewing')

def stateMachine(init):
    # Read task status
    print(f"Task status: {task.status}")
    print(f"Task version: {task.version}")

    # Task control operations
    task.stop()       # stop the task
    task.cycle(3)    # set single-cycle mode, 3 cycles
    task.resume()    # execute a single cycle
    task.start()     # restart normal cyclic execution

pviConnection.start(stateMachine)

Module Status

allObjects = cpu.externalObjects
moduleNames = [o['name'] for o in allObjects if o['type'] == 'Module']

for name in moduleNames:
    module = Module(cpu, name)
    status = module.status  # dict with module-specific status fields
    print(f"Module {name}: {status}")
    module.kill()

System Dump / Profiler Data

Pvi.py includes utilities for parsing B&R system dump files:

from pvi.utils import BrProfilerDataFile
import csv

profilerData = BrProfilerDataFile('path/to/BuR_SDM_profiling_*.pd')

# Summary info
print("Summary:", profilerData.info)
print("Cyclic tasks:", profilerData.cyclicTasks)
print("System tasks:", profilerData.systemTasks)

# Export to CSV
with open('profiler.csv', 'w', newline='') as f:
    writer = csv.writer(f, delimiter=';')
    writer.writerow(["Nr", "time", "object name", "ident", "event", "description"])
    for n, entry in enumerate(profilerData.entries):
        writer.writerow((n+1, entry.microseconds, entry.objectName,
                         hex(entry.objectIdent), hex(entry.event), 
                         entry.eventDescription))

SNMP-Based Diagnostics

Use the SNMP line to read network configuration:

line = Line(pviConnection.root, 'LNSNMP', CD='LNSNMP')
device = Device(line, 'SNMP', CD='/IF=SNMP /IP=192.168.1.50 /CM=public')
# Read device info (IP settings, MAC address, firmware version, etc.)

Diagnostic Data Sources


7. Error Handling: Error Codes and Recovery

Error Code Categories

PVI error codes are returned as DWORD values. Common error ranges:

RangeCategory
0Success
1–99General PVI errors
100–999PVI Manager / system errors
1000–1999Line/driver errors
2000–3999Connection errors
4000–4999Variable access errors
5000–5999Memory/buffer errors
10000–11999ANSL-specific errors

Common Error Codes

Error CodeMeaningTypical CauseRecovery
0Success
11020Unable to establish connectionTarget unreachable, wrong IP, ANSL disabledVerify IP, check ANSL configuration
4806Requested data not foundVariable doesn’t exist or not exposedCheck variable name/path
12050PVI is lockedLicense issue — 2-hour trial expiredRestart PVI Manager or obtain license
1056Can’t start PVI Manager serviceService already running, timing issueUse PVI Registry Changer to switch to process mode
5882Function block error in C libraryB&R library function issue in custom C libraryCheck library version compatibility
variousObject creation failedParent not connected yetWait for parent PVI_EVENT_LINK callback

Getting Error Text

// C API
char errMsg[512];
PviGetErrorText(errorCode, errMsg, sizeof(errMsg));
printf("Error %lu: %s\n", errorCode, errMsg);
# Pvi.py
raise PviError(error_code)  # automatically formats error text

Recovery Strategies

  1. Reconnection logic: PVI does not auto-reconnect. Implement retry logic:

    cpu.errorChanged = lambda err: reconnect_cpu() if err == 11020 else None
    
  2. PVI Manager restart: If PVI locks up (2-hour trial), you must stop and restart the PVI Manager. This also requires restarting any application using PVI (including Automation Studio).

  3. Object re-creation: If a connection drops, delete and re-create the PVI objects in the hierarchy.

PVI Logging for Debugging

Enable detailed logging via PVI Monitor (Options > PVI Diagnostics):

Key components to log:

ComponentLog FilePurpose
PviMan.exePviMan.logGeneral PVI Manager activity
PviMan.exe/LnAnsl.dllLnAnsl.logANSL protocol tracing
PviMan.exe/LnAnsl.dll/AnslLnAnslA.logANSL layer details
PviMan.exe/LnAnsl.dll/CommunicationLnAnslC.logANSL communication traces
PviMan.exe/LnIna2.dllLnIna2.logINA protocol (legacy)
PviMan.exe/Icomm.dllIcomm.logInternal communication
pg.exe/PviCom.dll/ClientPviClient.logClient-side PVI calls

Set Break Function to stop logging automatically on a specific error:

Use Break Function: True
Expression: E=4806
Turn-off global logging mode: True

Error Handling Sources


8. Data Types: B&R Types to PVI/C Types

IEC 61131-3 to C/C++ Type Mapping

IEC Data TypeB&R NameC TypeSize (bytes)Range
BOOLBOOLunsigned char / bool10 or 1
SINTSINTsigned char / int8_t1-128 to 127
USINTUSINTunsigned char / uint8_t10 to 255
BYTEBYTEunsigned char / uint8_t10 to 255
INTINTshort / int16_t2-32768 to 32767
UINTUINTunsigned short / uint16_t20 to 65535
WORDWORDunsigned short / uint16_t20 to 65535
DINTDINTint / int32_t4-2^31 to 2^31-1
UDINTUDINTunsigned int / uint32_t40 to 2^32-1
DWORDDWORDunsigned int / uint32_t40 to 2^32-1
LINTLINTlong long / int64_t8-2^63 to 2^63-1
ULINTULINTunsigned long long / uint64_t80 to 2^64-1
REALREALfloat4IEEE 754 single precision
LREALLREALdouble8IEEE 754 double precision
TIMETIMEint32_t (milliseconds)4T#0S to T#24D_23H_59M_59S_999MS
DATEDATEint32_t (days since 1970-01-01)4D#1970-01-01 to D#2106-02-06
TIME_OF_DAYTODint32_t (ms since midnight)4TOD#00:00:00 to TOD#23:59:59.999
DATE_AND_TIMEDTstruct { date; time }8Combined date + time
STRING[n]STRINGchar[n+1]n+1Null-terminated, max 80 chars default
WSTRING[n]WSTRINGwchar_t[n+1]2*(n+1)UTF-16LE, max 80 chars default

Struct and Array Handling

TypePVI Behavior
StructsTransferred as raw byte block. Structure layout (alignment, member offsets) must be known to the client. ANSL UIF cannot provide struct format information — alignment must match.
ArraysContiguous memory. Access individual elements with array index in variable name or write a slice. Pvi.py supports tuple broadcast to set all elements to one value.
Nested structsTreated as flat byte arrays over the wire. Client must know the exact memory layout including any padding/alignment.

B&R-Specific Alignment Rules

B&R follows standard C struct alignment rules on the target (typically PowerPC or ARM alignment). When reading/writing structs via C or ctypes, ensure:

  1. Use #pragma pack or equivalent to match B&R alignment
  2. Account for target-specific alignment (PowerPC uses 4-byte alignment for 32-bit types)
  3. Test with known values before deploying

Python Type Mapping (Pvi.py)

Pvi.py automatically maps between Python and IEC types:

IEC TypePython Type
BOOLbool
SINT/USINT/BYTEint
INT/UINT/WORDint
DINT/UDINT/DWORDint
REALfloat
LREALfloat
STRINGbytes
WSTRINGstr
TIMEdatetime.timedelta
DATEdatetime.date
TODdatetime.time
DTdatetime.datetime
Arraytuple

9. Callbacks and Event Handling

PVI Event Types (C API)

EventDescription
PVI_EVENT_LINKObject connected/linked successfully
PVI_EVENT_UNLINKObject disconnected
PVI_EVENT_READAsynchronous read completed
PVI_EVENT_WRITEAsynchronous write completed
PVI_EVENT_DATACyclic data update (when RF is set)
PVI_EVENT_ERRORError occurred on this object
PVI_EVENT_INFOInformation message

Setting Callbacks in C

// Set completion callback for a variable (receives all events)
err = PviSetCallbackX(
    "LNANSL/TCP/CP1584/myTask/myVar",
    myVariableCallback,  // PFN_PVI_COMPLETION_X
    PVI_CB_MODE_ALL,     // mode: receive all events
    userData
);

// Callback function
void CALLBACK myVariableCallback(
    LPSTR lpszIdent,
    DWORD  dwError,
    LPSTR lpszEvent,     // event name string
    DWORD  dwInfo1,
    LPSTR lpszInfo2,     // additional info
    DWORD  dwUserData
) {
    if (dwError != 0) {
        // handle error
        return;
    }
    
    if (strcmp(lpszEvent, "PVI_EVENT_DATA") == 0) {
        // Variable value updated — read new value
        float value;
        PviReadValue(lpszIdent, &value, sizeof(value), 0);
        printf("Variable %s = %f\n", lpszIdent, value);
    }
    else if (strcmp(lpszEvent, "PVI_EVENT_LINK") == 0) {
        printf("Variable %s linked\n", lpszIdent);
    }
}

.NET Events

// Variable-level events
variable.ValueChanged += (sender, e) => { /* value changed */ };
variable.ErrorChanged += (sender, e) => { /* error on variable */ };

// CPU-level events  
cpu.Connected += (sender, e) => { /* connection established */ };
cpu.ErrorChanged += (sender, e) => { /* error on CPU connection */ };

// Task events
task.StatusChanged += (sender, e) => { /* task run state changed */ };
task.ErrorChanged += (sender, e) => { /* error on task */ };

Python (Pvi.py) Callbacks

# Variable change callback with refresh
temperature = Variable(task, 'gHeating.status.actTemp', RF=200, HY=0.5)

def onTempChange(value):
    print(f'Temperature changed to {value}')

temperature.valueChanged = onTempChange

# CPU error callback
cpu.errorChanged = lambda err: print(f'CPU error: {err}') if err else print('Connected')

# Connection lifecycle
def runtimeMonitor(init):
    """Called every PVI cycle — implement state machines here"""
    pass

pviConnection.start(runtimeMonitor)

Cyclic Refresh vs Polled Read

ApproachLatencyCPU LoadBest For
Cyclic refresh (RF parameter)Deterministic (set interval)Low (PVI handles it)Continuous monitoring, HMI displays
Polled read (explicit PviRead)Variable (depends on poll rate)Higher (client-driven)On-demand diagnostics, conditional reads
Event-based (PVI_EVENT_DATA with HY)Near-instant on changeLowestState monitoring, alarm detection

Hysteresis (HY): Only triggers callback when value changes by more than the threshold. Reduces network traffic and callback frequency.

# Only notify if temperature changes by > 0.5°C
temperature = Variable(task, 'actTemp', RF=100, HY=0.5)

Callbacks and Event Handling Sources


10. Performance Considerations

Latency Benchmarks

Communication PathTypical LatencyNotes
PVI ANSL (local LAN)5–20 msTCP-based, 1–2 round trips
PVI INA2000 (local LAN)10–50 msUDP-based, 297-byte frame limit adds overhead
PVI ANSL (high latency, >300ms)Degraded but functionalANSL handles it; INA does not
OPC UA (on-controller)10–50 msAdditional protocol overhead
OPC UA (via PVI OPC Server)20–100 msExtra hop through PVI Manager

Refresh Rate Limits

ParameterRecommended RangeHard Limit
Variable refresh (RF)100–1000 ms~10 ms floor (depends on CPU and variable count)
Hysteresis (HY)Application-dependent0 = report every change
Cyclic data trending10–100 msVery fast trending requires dedicated C# companion (see br-automation-pvi MCP)

CPU Load Impact

The OPC UA server on a mid-range X20 CPU (e.g., X20CP3584) consumes approximately 0.3–0.8 ms per 100 variables per cycle. Budget accordingly when the controller also runs motion and I/O tasks.

For PVI (ANSL) direct access, the load is lower than OPC UA since there’s no serialization overhead.

Sizing Formula for Variable Load

ServerLoad ≈ N_variables × (1000 / Refresh_ms) × Payload_bytes / 1024^2 [MB/s]

Example: 500 variables at 100 ms refresh, 8-byte payloads:

500 × 10 × 8 = 40,000 B/s ≈ 0.038 MB/s (negligible on Ethernet, but CPU-bound)

Best Practices

  1. Batch reads: Read multiple variables in a single PVI cycle rather than individual synchronous calls.
  2. Use hysteresis: Set HY to filter out noise and reduce callbacks.
  3. Limit refresh rate: 200 ms is a good default for HMI; 1000 ms for logging/scada.
  4. Avoid large struct reads in tight loops: Structs > 64 kB use the async path, adding latency.
  5. INA2000 limitations: Max 255 bytes per UDP frame. Use ANSL for any data exceeding this.
  6. High-frequency trending: For 10–100 ms trending, use a C# companion service or specialized data logger rather than direct PVI polling from Python/interpreted languages.

Performance Considerations Sources


11. Python PVI Bindings

Repository: https://github.com/hilch/Pvi.py
Install: pip install pvipy
License: MIT
Docs: https://hilch.github.io/Pvi.py/

Pvi.py is a comprehensive Python wrapper that handles the complexity of the C API. Features:

  • Object-oriented hierarchy matching PVI’s object model
  • Automatic type conversion between Python and IEC types
  • Callback-based event handling
  • Variable browsing, CPU diagnostics, task control
  • System dump / profiler data parsing
  • SNMP support for network configuration

Requirements: PVI Development Setup must be installed on the machine (provides the underlying DLLs).

Limitations:

  • Writing to basic datatypes only (no direct struct write support). Workaround: write to simple wrapper variables in the PLC.
  • Not thread-safe (inherent PVI limitation).

Wrapping the C API with ctypes (Manual Approach)

For environments where Pvi.py can’t be used, you can wrap PviCom.dll directly:

import ctypes
from ctypes import wintypes, c_char_p, c_uint, c_void_p, POINTER, WINFUNCTYPE

# Load PVI DLL
pvicom = ctypes.WinDLL("PviCom.dll")

# Define callback type
PFN_PVI_COMPLETION = WINFUNCTYPE(
    None,           # return void
    c_char_p,       # lpszIdent
    c_uint,         # dwError
    c_uint,         # dwEvent
    c_uint,         # dwInfo1
    c_uint,         # dwInfo2
    c_uint          # dwUserData
)

# PviInitialize
pvicom.PviInitialize.argtypes = [c_uint]
pvicom.PviInitialize.restype = c_uint

pvicom.PviUninitialize.argtypes = []
pvicom.PviUninitialize.restype = c_uint

# PviCreate
pvicom.PviCreate.argtypes = [c_char_p, c_char_p, c_char_p, 
                               PFN_PVI_COMPLETION, c_uint]
pvicom.PviCreate.restype = c_uint

# PviReadValue
pvicom.PviReadValue.argtypes = [c_char_p, c_void_p, c_uint, c_uint]
pvicom.PviReadValue.restype = c_uint

# PviWriteValue
pvicom.PviWriteValue.argtypes = [c_char_p, c_void_p, c_uint, c_uint]
pvicom.PviWriteValue.restype = c_uint

# Initialize
err = pvicom.PviInitialize(0)
print(f"PviInitialize: {err}")

# Callback
@PFN_PVI_COMPLETION
def myCallback(ident, error, event, info1, info2, userdata):
    ident_str = ident.decode('ascii') if ident else ""
    print(f"Callback: {ident_str} Error={error} Event={event}")

# Create objects (simplified — real code needs to wait for LINK events)
pvicom.PviCreate(b"PVI", b"LNANSL", b"CD=LNANSL", myCallback, 0)
pvicom.PviCreate(b"LNANSL", b"TCP", b"CD=/IF=TcpIp", myCallback, 0)
pvicom.PviCreate(b"LNANSL/TCP", b"PLC", b"CD=/IP=192.168.1.50", myCallback, 0)

# Read a float
value = ctypes.c_float()
err = pvicom.PviReadValue(b"LNANSL/TCP/PLC/myTask/myFloat", 
                           ctypes.byref(value), ctypes.sizeof(value), 5000)
print(f"Value: {value.value}")

pvicom.PviUninitialize()

Other Third-Party Tools

ToolDescriptionLink
brsnmpPython CLI for PVI-SNMP commands (list/search PLCs, change IP)github.com/hilch/brsnmp
br-automation-pvi MCPMCP server bridging B&R PLCs with AI assistants (Claude, etc.)mcpmarket.com/server/br-automation-pvi
ListAllBurPLCsLists all B&R PLCs on networkListed in awesome-B-R
brwatchService tool: watch, change, log variables, set IP addressesListed in awesome-B-R
BRLibToHelpPython tool to parse B&R Automation Studio libraries and generate CHM help filesgithub.com/br-automation-community/BRLibToHelp
VS Code B&R ExtensionVS Code extension for building B&R Automation Studio projectsgithub.com/br-automation-community/vscode-brautomationtools
AS6 Migration ToolsOpen-source scripts for detecting deprecated libraries/FBs when migrating AS4 to AS6github.com/br-automation-community/as6-migration-tools
B&R SBOM GeneratorScans AS6 projects and generates CycloneDX 1.5 SBOMs per configurationgithub.com/br-automation-community
OPCUA_SimpleDemonstration of OPC UA client-server communication with B&R PLCgithub.com/rparak/OPCUA_Simple

Python PVI Bindings Sources


12. Using PVI from Linux

Option 1: ANSL UIF Library (Native C/C++)

The AnslUIF library is the official path for Linux PLC communication. It is a C/C++ library included in the PVI Development Setup.

Location in PVI package: C:\BrAutomation\PVI\V4.12\AN\ (documentation, libraries, samples)

Supported platforms: Linux x86, Linux x64

Capabilities:

  • ANSL TCP communication with B&R PLCs (AR ≥ V4.08)
  • Connect, enumerate modules/tasks/variables
  • Read and write variables
  • No PVI Manager dependency (direct TCP connection)

Limitations:

  • No TLS support — ANSL communication is unencrypted
  • No struct format information — only basic data type info. Client must know struct layout and alignment.
  • ANSLI_CPU_ListVariables may not be supported in ANSL expansion I; use ANSLI_TASK_ListVariables instead.

Key functions:

ANSLI_Initialize()
ANSLI_Deinitialize()

ANSLI_CPU_Connect(identCpu, ...)     // connect to CPU
ANSLI_CPU_ListModules(identCpu)       // list modules
ANSLI_CPU_ListTasks(identCpu)         // list tasks
ANSLI_CPU_GetInfo(identCpu, ...)      // CPU info

ANSLI_TASK_Connect(identCpu, taskName, ...)
ANSLI_TASK_ListVariables(identTask)   // list task-local variables
ANSLI_TASK_GetInfo(identTask, ...)

ANSLI_PVAR_Read(identVar, buffer, size)    // read variable
ANSLI_PVAR_Write(identVar, buffer, size)   // write variable

The Pvi.py wrapper depends on the Windows PVI Manager and PviCom.dll. Running through WINE is theoretically possible but not documented and likely fragile due to the Windows service model of PviMan.exe.

For Linux-based systems, the recommended path is OPC UA (no PVI needed):

  • Enable OPC UA on the B&R controller (AR ≥ 4.0)
  • Use Python’s asyncua or opcua libraries to connect directly
  • No Windows dependency
import asyncio
import asyncua

async def main():
    client = asyncua.Client(url="opc.tcp://192.168.1.50:4840")
    await client.connect()
    var = await client.get_node("ns=2;s=gHeating.status.actTemp")
    value = await var.read_value()
    print(f"Temperature: {value}")
    await client.disconnect()

asyncio.run(main())

Option 4: PVI Manager on Windows, Client on Linux

Run the PVI Manager on a Windows machine, then connect remotely from a Linux client using the PVI client DLL over the network. This requires the PVI client/server remote feature, which routes PVI client calls through the PVI Manager’s TCP interface.

Using PVI from Linux Sources


13. PVI vs OPC-UA: When to Use Which

Decision Matrix

CriterionPVIOPC UARaw TCP/UDP
StandardizationB&R proprietaryIEC 62541 (international standard)None
Encryption / AuthNoneYes (certificates, user tokens, SecurityPolicies)Application layer
Typical Latency5–20 ms10–50 msApplication-defined
SCADA IntegrationVia PVI OPC bridge (extra hop)Native (any OPC UA client)Custom driver
Platform SupportWindows native, Linux via ANSL UIFCross-platform (any OPC UA SDK)Any
Effort to expose new variableLow (auto-exposed via PVI)Low (mark as OPC UA accessible in AS)High (custom code in PLC)
Cross-vendor compatibilityB&R onlyAny OPC UA server/clientCustom
Real-time deterministicNoNoOptional
OverheadLowMedium (XML/Binary encoding)Lowest
Max throughputHigh (raw binary)MediumHighest

When to Use PVI

  • Integrating with B&R HMI panels that use PVI internally
  • Using B&R PVI Transfer for firmware deployment
  • Need SNMP-based network configuration of B&R devices
  • Accessing module-level diagnostics not exposed via OPC UA
  • Tools that need to start/stop tasks or perform CPU control actions
  • Legacy controllers (AR < 4.0) that don’t support OPC UA
  • Lowest latency access where OPC UA overhead is unacceptable

When to Use OPC UA

  • New projects — OPC UA is the modern standard
  • Linux-based clients — no PVI Manager dependency
  • Multi-vendor SCADA integration (Ignition, UA Expert, etc.)
  • Security required — encrypted communication with certificate auth
  • Eliminating Windows dependency — OPC UA runs directly on the controller
  • Non-B&R consumers — any OPC UA client can connect

Both Can Coexist

Both protocols can run simultaneously on the same B&R controller:

  • PVI/ANSL on TCP port 11160
  • OPC UA on TCP port 4840

PVI vs OPC-UA Sources


14. PVI License Requirements

License Overview

PVI requires a license on non-B&R IPCs (standard PCs). Without a license, PVI runs in trial mode for 2 hours. After this, all PVI-based programs stop working. PVI Manager must be stopped and restarted to reset.

Important: The 2-hour trial is per PVI Manager session, not per application. All PVI clients on the machine are affected.

License Products

Order CodeTypeNotes
0TG1000.01Technology Guard (USB Dongle)Hardware dongle for PVI license
0TG1000.02Technology Guard (USB Dongle, newer)Requires PVI ≥ 4.1.06 / 4.2.02
1TG0500.01Software Container LicenseNo physical dongle; software-based (PVI ≥ 4.9)
1TG0500.02Technology Guard LicenseUsed with 0TG1000.01/02 dongle
5S0500.99Mass License (Software DLL)Implemented as BrLcmode.dll in PVI bin folder. One-time purchase for unlimited devices. Requires negotiation with B&R sales.

License Check

The PVI Manager checks the license via:

  1. Hardware ADI driver — installed on B&R IPCs, exempts them from license requirement
  2. USB dongle (Technology Guard)
  3. Software container (1TG0500.01)
  4. Software DLL (BrLcmode.dll for mass licensing)

License holder information is displayed in the PviMonitor window.

Exemptions

EnvironmentLicense Required?
B&R IPC (with ADI driver)No
B&R Windows CE devicesNo (PVI Manager doesn’t check)
Automation StudioNo (bundled license)
PVI Transfer ToolNo (bundled license)
Standard PC (non-B&R)Yes
B&R Panel without ADIYes

Verifying License

# Run license checker (PVI ≥ 4.9)
C:\BrAutomation\PVI\V4.x\Bin\BrSecChk.exe
# Under "Configuration", ensure "Search Technology Guarding License" is enabled

32-bit vs 64-bit

The 32-bit BrLcmode.dll is not compatible with a 64-bit PVI Manager. If migrating from 32-bit to 64-bit, a new 5S0500.99 order must be placed.

Changing the PVI Manager Version

  1. Open PVI Monitor with administrator rights
  2. Options > PVI Registry Changer
  3. Select the PviMan.exe of the desired PVI version
  4. Click OK

PVI License Sources


15. Example Code for Common Diagnostic Tasks

15.1 Complete Diagnostic Connection (Python)

"""
Connect to a B&R CP1584, read CPU status, list all tasks,
enumerate global variables, and read task-local variables.
"""

from pvi import *
from pprint import pprint
import json

class PlcDiagnostics:
    def __init__(self, ip_address, cpu_name='CP1584'):
        self.ip = ip_address
        self.cpu_name = cpu_name
        self.connection = Connection()
        self._setup()
        self.result = {}

    def _setup(self):
        self.line = Line(self.connection.root, 'LNANSL', CD='LNANSL')
        self.device = Device(self.line, 'TCP', CD='/IF=TcpIp')
        self.cpu = Cpu(self.device, self.cpu_name, 
                       CD=f'/IP={self.ip}')

    def _on_cpu_ready(self, error):
        if error == 11020:
            print(f"ERROR: Cannot reach {self.ip}")
            self.connection.stop()
            return
        if error != 0:
            raise PviError(error)

        print(f"=== Connected to {self.cpu_name} at {self.ip} ===")
        self.result['cpu_info'] = {
            'pvi_version': self.connection.root.version,
            'ar_version': self.cpu.version,
            'run_state': self.cpu.status.get('RunState', 'unknown'),
            'cpu_time': self.cpu.time.isoformat(),
            'cpu_type': self.cpu.cpuInfo.get('CT', 'unknown'),
        }
        print(f"AR Version: {self.result['cpu_info']['ar_version']}")
        print(f"Run State: {self.result['cpu_info']['run_state']}")

        self._enumerate_objects()

    def _enumerate_objects(self):
        all_objects = self.cpu.externalObjects

        modules = [o['name'] for o in all_objects if o['type'] == 'Module']
        tasks = [o['name'] for o in all_objects if o['type'] == 'Task']
        global_vars = [o['name'] for o in all_objects if o['type'] == 'Pvar']

        self.result['modules'] = []
        for name in modules:
            m = Module(self.cpu, name)
            self.result['modules'].append({name: dict(m.status)})
            m.kill()

        self.result['tasks'] = []
        for name in tasks:
            t = Task(self.cpu, name)
            info = {name: {'status': dict(t.status), 'version': t.version}}
            task_vars = [o['name'] for o in t.externalObjects if o['type'] == 'Pvar']
            info[name]['variables'] = task_vars
            self.result['tasks'].append(info)
            t.kill()

        self.result['global_variables'] = []
        for name in global_vars:
            v = Variable(self.cpu, name)
            info = {'name': name, 'type': str(v.dataType), 'value': str(v.value)}
            self.result['global_variables'].append(info)
            v.kill()

        print(f"\nModules: {[m for m in modules]}")
        print(f"Tasks: {[t for t in tasks]}")
        print(f"Global Variables ({len(global_vars)}): {global_vars}")

        with open('diagnostics.json', 'w') as f:
            json.dump(self.result, f, indent=2, default=str)
        print("\nDiagnostics saved to diagnostics.json")
        self.connection.stop()

    def run(self):
        self.cpu.errorChanged = self._on_cpu_ready
        self.connection.start()


if __name__ == '__main__':
    diag = PlcDiagnostics('192.168.1.50')
    diag.run()

15.2 Monitor Variable Changes with Logging (Python)

"""
Monitor temperature and pressure variables from a CP1584.
Log changes to CSV with timestamps.
"""

import csv
import time
from datetime import datetime
from pvi import *

PLC_IP = '192.168.1.50'
CSV_FILE = 'plc_log.csv'

variables_to_monitor = [
    ('gHeating.status.actTemp', 200, 0.5),     # (name, refresh_ms, hysteresis)
    ('gHeating.status.pressure', 500, 0.1),
    ('gMotor.speed.actual', 100, 1.0),
    ('gMotor.status.running', 500, 0),          # BOOL, report every change
]

connection = Connection()
line = Line(connection.root, 'LNANSL', CD='LNANSL')
device = Device(line, 'TCP', CD='/IF=TcpIp')
cpu = Cpu(device, 'CP1584', CD=f'/IP={PLC_IP}')
task = Task(cpu, 'mainlogic')

csv_file = open(CSV_FILE, 'w', newline='')
writer = csv.writer(csv_file)
writer.writerow(['timestamp', 'variable', 'value'])


def make_callback(var_name):
    def callback(value):
        ts = datetime.now().isoformat()
        writer.writerow([ts, var_name, value])
        csv_file.flush()
        print(f'{ts} | {var_name} = {value}')
    return callback


pvi_vars = []
def on_task_ready(error):
    if error == 0:
        for name, rf, hy in variables_to_monitor:
            v = Variable(task, name, RF=rf, HY=hy)
            v.valueChanged = make_callback(name)
            pvi_vars.append(v)

task.errorChanged = on_task_ready

try:
    connection.start()
finally:
    csv_file.close()

15.3 Batch Read Multiple Variables (C/C++)

#include <stdio.h>
#include "PviCom.h"

#define TIMEOUT_MS 3000
#define NUM_VARS 5

typedef struct {
    const char *name;
    void *buffer;
    size_t size;
} PviVar;

volatile int completed = 0;

void CALLBACK readCallback(LPSTR ident, DWORD error, DWORD event,
                          DWORD info1, DWORD info2, DWORD userData) {
    if (event == 4) {  // PVI_EVENT_READ
        if (error == 0) {
            int idx = (int)userData;
            printf("Read %s: OK\n", ((PviVar*)vars)[idx].name);
        } else {
            printf("Read failed: error %lu\n", error);
        }
        completed++;
    }
}

void batchRead() {
    PviVar vars[NUM_VARS] = {
        {"LNANSL/TCP/CP1584/mainlogic/gHeating.status.actTemp", &(float){0}, sizeof(float)},
        {"LNANSL/TCP/CP1584/mainlogic/gHeating.status.pressure", &(float){0}, sizeof(float)},
        {"LNANSL/TCP/CP1584/mainlogic/gMotor.speed.actual", &(double){0}, sizeof(double)},
        {"LNANSL/TCP/CP1584/mainlogic/gMotor.status.running", &(unsigned char){0}, 1},
        {"LNANSL/TCP/CP1584/mainlogic/gMachine.cycleCount", &(int){0}, sizeof(int)},
    };
    completed = 0;

    for (int i = 0; i < NUM_VARS; i++) {
        PviRead(vars[i].name, "CV=0", vars[i].buffer, vars[i].size,
                TIMEOUT_MS, readCallback, i);
    }

    while (completed < NUM_VARS) {
        // Wait for all reads to complete (application-specific message loop)
    }
}

15.4 CPU Control: Warm Start / Cold Start (Python)

"""
Read CPU state and perform control actions.
"""
from pvi import *

connection = Connection()
line = Line(connection.root, 'LNANSL', CD='LNANSL')
device = Device(line, 'TCP', CD='/IF=TcpIp')
cpu = Cpu(device, 'CP1584', CD='/IP=192.168.1.50')

def on_connected(error):
    if error != 0:
        raise PviError(error)

    state = cpu.status.get('RunState', 'unknown')
    print(f"Current run state: {state}")

    if state == 'Run':
        # Stop all cyclic tasks for controlled shutdown
        for task_name in cpu.tasks:
            task = Task(cpu, task_name)
            task.stop()
            print(f"Stopped task: {task_name}")
            task.kill()

    # To restart, use cpu methods:
    # cpu.warmStart()  — warm restart (retain data)
    # cpu.coldStart()  — cold restart (clear retained data)
    # These may require specific access parameters

    connection.stop()

cpu.errorChanged = on_connected
connection.start()

15.5 Browse and Export Variable List to CSV (Python)

"""
Export complete variable namespace to CSV.
"""
import csv
from pvi import *

connection = Connection()
line = Line(connection.root, 'LNANSL', CD='LNANSL')
device = Device(line, 'TCP', CD='/IF=TcpIp')
cpu = Cpu(device, 'CP1584', CD='/IP=192.168.1.50')

def on_ready(error):
    if error != 0:
        raise PviError(error)

    with open('variable_export.csv', 'w', newline='') as f:
        writer = csv.writer(f)
        writer.writerow(['Scope', 'Name', 'Type', 'Size', 'Value'])

        # Global variables
        for obj in cpu.externalObjects:
            if obj['type'] == 'Pvar':
                v = Variable(cpu, obj['name'])
                writer.writerow(['Global', obj['name'], str(v.dataType),
                                 v.descriptor.get('VL', '?'), str(v.value)])
                v.kill()

        # Task-local variables
        for obj in cpu.externalObjects:
            if obj['type'] == 'Task':
                task = Task(cpu, obj['name'])
                for var_obj in task.externalObjects:
                    if var_obj['type'] == 'Pvar':
                        v = Variable(task, var_obj['name'])
                        writer.writerow([obj['name'], var_obj['name'],
                                         str(v.dataType),
                                         v.descriptor.get('VL', '?'), str(v.value)])
                        v.kill()
                task.kill()

    print("Exported to variable_export.csv")
    connection.stop()

cpu.errorChanged = on_ready
connection.start()

Source URLs Summary

ResourceURL
B&R PVI Online Helphttps://help.br-automation.com/#/en/4/automationnet/pvi/pvi.htm
B&R PVI Development Setuphttps://www.br-automation.com/en/downloads/software/automation-netpvi/pvi-development-setup/
B&R Community: PVI How-to Guidehttps://community.br-automation.com/t/how-to-guide-all-about-automation-net-pvi/4846
B&R Community: ANSL UIF Variable Listinghttps://community.br-automation.com/t/reading-variable-list-using-ansl-uif-library/8180
B&R Community: Python PVI Wrapperhttps://community.br-automation.com/t/python-pvi-wrapper-question-regarding-pvi-py/4996
Industrial Monitor Direct: Communication Guidehttps://industrialmonitordirect.com/blogs/knowledgebase/br-plc-communication-pvi-opc-and-tcpip-integration
Pvi.py (GitHub)https://github.com/hilch/Pvi.py
Pvi.py Documentationhttps://hilch.github.io/Pvi.py/
Pvi.py Exampleshttps://github.com/hilch/Pvi.py/tree/main/examples
awesome-B-R (Curated List)https://github.com/hilch/awesome-B-R
brsnmp (GitHub)https://github.com/hilch/brsnmp
br-automation-pvi MCP Serverhttps://mcpmarket.com/server/br-automation-pvi
B&R Community Mainhttps://community.br-automation.com

16. Security: PVI Credential Logging Vulnerability (CVE-2026-0936)

16.1 Advisory Details

FieldValue
CVECVE-2026-0936
B&R AdvisorySA26P001
CISA AdvisoryICSA-26-125-02
CVSS v3.15.0 (Medium)
CWECWE-532 (Insertion of Sensitive Information into Log File)
AffectedPVI client < 6.5.0
Fixed InPVI 6.5.0 (bundled with AS 6.5)

16.2 What the Vulnerability Does

When PVI client logging is enabled, credentials (passwords, connection parameters, authentication tokens) are written in plaintext to the PVI log file. An authenticated local attacker with read access to the log directory can extract these credentials and use them to access the PLC or other B&R devices.

16.3 Practical Impact for CP1584 Engineers

  • Risk is LOW if logging is disabled (default state) — no credentials are written anywhere
  • Risk is HIGH if logging was enabled for troubleshooting — plaintext PLC passwords may be sitting in log files on engineering workstations
  • The vulnerability is client-side only — it does NOT affect the PLC’s PVI server component or ANSL protocol

16.4 Mitigation Steps

  1. Check if PVI logging is enabled on all engineering workstations:
    • PVI logging is not enabled by default — it must be explicitly activated
    • Check for PVI log files (typically in the PVI application directory or a user-specified path)
  2. Delete any existing PVI log files if they contain connection history:
    Get-ChildItem -Path "C:\Program Files*\B&R*\Pvi*" -Filter "*.log" -Recurse
    Get-ChildItem -Path "$env:LOCALAPPDATA\B&R" -Filter "*.log" -Recurse
    
  3. Restrict log file access via NTFS permissions if logging must remain enabled:
    icacls "C:\path\to\pvi\logs" /inheritance:r /grant:r "%USERNAME%:(OI)(CI)F"
    
  4. Upgrade PVI to 6.5.0 (bundled with Automation Studio 6.5) — this version removes credential information from log output
  5. Rotate PLC passwords if PVI logging was previously enabled and log files were accessible to other users

16.5 Interaction with Access Recovery

When performing credential recovery on an undocumented CP1584 (see access-recovery.md), be aware that previous engineers may have left PVI log files on shared workstations that contain the PLC’s credentials. Search engineering PCs for PVI log files as a credential discovery method — but also ensure any discovered log files are secured or deleted to prevent credential leakage.


Cross-References


Document generated from web research. Some details are based on community reports and may vary with PVI/AR version. Always verify against the official B&R documentation for your specific version.


Key Findings

  1. PVI is the primary programmatic interface to B&R PLCs — it provides read/write access to process variables, alarm events, and logger data from any Windows PC. No AS project required for variable access.
  2. Connection requires the ANSL protocol on port 11169 — PVI communicates via the Automation Network Service Layer, which must be reachable. The PLC must be in RUN or SERVICE mode (not BOOT).
  3. Variable enumeration via CmpObject is the most valuable PVI capability for undocumented machines — it reveals all global variables, their data types, and memory addresses without needing the original project.
  4. PVI supports both synchronous and asynchronous data transfer — synchronous calls block the calling thread; asynchronous use callbacks and are preferred for continuous monitoring.
  5. Python wrappers for PVI exist — the community has developed Python bindings via Ctypes that expose PVI functionality to Python scripts. See python-diagnostics.md for complete examples.
  6. PVI cannot change CPU configuration — it can read/write runtime variables but cannot modify IP addresses, task configuration, or module settings. Use AS or FTP for configuration changes.
  7. The PVI Transfer Tool is separate from PVI runtime — it handles CF card creation and mass deployment, not real-time variable access.

B&R Automation Studio Project Reconstruction from an Unknown Running CP1584

Overview

This document describes the end-to-end process of creating a new B&R Automation Studio project for a CP1584 controller that is already running in the field but has no known project files. Since B&R PLCs store only compiled binaries on-target, the original source code cannot be recovered — instead, the approach relies on extracting every observable artifact from the running system to reconstruct a functional project. The methodology covers network discovery to locate the PLC, AR log analysis for configuration clues, OPC-UA browsing and PVI enumeration to surface all accessible variables, hardware configuration reading, and exploiting the CF/CFast card for additional data. Throughout, cross-references are provided to companion documents that expand on specific techniques: cp1584-forensics.md for low-level forensic analysis, opcua.md for OPC-UA setup and browsing details, pvi-api.md for the PVI Python API used during enumeration, and diagnostics-sdm.md for System Diagnostics Manager (SDM) usage and remote diagnostics capabilities.

Table of Contents

  1. Executive Summary
  2. Critical Limitation: Source Code Cannot Be Extracted
  3. Network Discovery: Finding the PLC
  4. AR Log Analysis
  5. System Dump: The Most Important Diagnostic Tool
  6. OPC-UA Browsing for Variable Discovery
  7. Using PVI to Enumerate All Accessible Variables
  8. Reading Hardware Configuration from a Running PLC
  9. Using the CF/CFast Card to Aid Reconstruction
  10. Creating a New Automation Studio Project
  11. Creating a Matching Hardware Configuration
  12. Capturing the Current Program State
  13. Building a Configuration Export Tool
  14. Systematic Step-by-Step Workflow
  15. Documenting Findings: IO Maps, Variable Lists, Program Structure
  16. What Information Is Permanently Lost
  17. Best Practices for Documenting Undocumented Machines
  18. Open-Source Tool Reference
  19. Sources

1. Executive Summary

Reconstructing an Automation Studio project for a B&R X20CP1584 PLC without the original source code is a challenging but partially achievable task. B&R PLCs store only compiled binary code on the controller – the source code (structured text, ladder logic, C code) is never stored on the PLC unless the programmer explicitly enabled the “Transfer source files to target” option during the original download.

However, a surprising amount of information can be recovered: the complete hardware tree (modules, firmware versions, serial numbers), all runtime variables with their names and types, task configurations, AR version information, IO states, network configuration, and diagnostic logs. This information, combined with systematic observation of the machine’s behavior, allows you to create a new Automation Studio project that matches the hardware and can connect to the running program – even if you cannot view or modify the original logic.

This document covers every known method for extracting information from a running B&R PLC and assembling it into a usable project.


2. Critical Limitation: Source Code Cannot Be Extracted

“There is no way to get the code out of a B&R PLC. If you need to make changes to the PLC you need to have the source code to begin with.” – Reddit r/PLC community

“There is only compiled code on the control that is not readable. Only if the programmer has explicitly stored the source code on the flash can it be downloaded.” – Stephan Herbig, B&R Community

Key facts:

  • B&R PLCs store only compiled binaries by default
  • The compiled code cannot be decompiled or reverse-engineered back to readable source
  • Two optional mechanisms exist that may have stored source on the target:
    1. Target Source Files Comparison (Project > Compare Source Files On Target) – stores a copy of source for comparison purposes
    2. Store project source files directly on target – stores the full source on the CF card’s user partition

To check if source exists on the target:

  1. Open Automation Studio
  2. Connect to the PLC (Online > Settings, configure the IP, click “Connect”)
  3. Try File > Open Project From Target
  4. If you get “No valid Automation Studio project file found”, no source was stored

Sources:

  • https://community.br-automation.com/t/upload-program-from-a-plc/1520
  • https://www.reddit.com/r/PLC/comments/1ja6zbk/problem_getting_program_from_a_plc_x20_br/

3. Network Discovery: Finding the PLC

3.1 Method 1: B&R SNMP Scan via Automation Studio

The primary method for finding a B&R PLC on the network:

  1. Open Automation Studio
  2. Go to Online > Settings
  3. Click Browse – Automation Studio uses SNMP to discover B&R devices
  4. All B&R PLCs on the network segment will appear with their IP addresses, serial numbers, and device types

Requirements:

  • The PLC must have SNMP enabled (it is by default on AR < 6.0, but disabled by default in AS 6.0+ projects)
  • If SNMP is disabled, put the PLC in BOOT mode – SNMP re-enables automatically
  • WinPcap/Npcap must be installed on the PC (required for the browsing feature)
  • The PC must be on the same subnet

Sources:

  • https://community.br-automation.com/t/browse-for-targets-in-as-not-working/2065
  • https://community.br-automation.com/t/finding-browsing-plc-in-online-settings-not-possible-under-windows-11/4840

3.2 Method 2: brsnmp (Open-Source CLI Tool)

brsnmp is an open-source command-line tool that uses B&R’s PVI-SNMP protocol to discover and manage PLCs on the network without Automation Studio.

## List all B&R PLCs as JSON with full details
brsnmp --details

## Output example:
[
  {
    "targetTypeDescription": "X20CP1583",
    "serialNumber": "D45B0168612",
    "cfSerialNumber": "000060076643A1000085",
    "arVersion": "B04.45",
    "arVersionNorm": "04.45.2",
    "arState": "4",
    "arBootPhase": "40",
    "deviceName": "IF2",
    "macAddress": "00-60-65-16-fd-da",
    "ipAddress": "192.168.0.14",
    "subnetMask": "255.255.255.0",
    "ipMethod": "0",
    "nodeNumber": "129",
    "inaActivated": "1",
    "inaPortNumber": "11159",
    "hostName": "br-automation",
    "defaultGateway": "",
    "dnsActivated": "0"
  }
]

## List only MAC addresses
brsnmp --list

## Filter to a specific PLC type
brsnmp --filter="X20CP1584" --details

## Change IP settings remotely
brsnmp --filter="X20CP1584" ipAddress=192.168.1.100 subnetMask=255.255.255.0

## Save discovery results
brsnmp --details > plc_inventory.json

Key fields for reconstruction:

FieldValue for Reconstruction
targetTypeDescriptionExact CPU model (e.g., X20CP1584)
arVersionAutomation Runtime version (determines AS version needed)
serialNumberHardware serial for asset tracking
ipAddress / subnetMaskNetwork configuration
nodeNumber / inaNodeNumberPOWERLINK/X2X bus address
hostNameConfigured hostname

Note: AS 6.0+ projects disable SNMP by default. If the PLC is running AS 6.0+ code, you may need to put it in BOOT mode first to enable SNMP.

Sources:

  • https://github.com/hilch/brsnmp

3.3 Method 3: Wireshark / ARP Scan

If SNMP is completely unavailable:

  1. Connect your PC to the same physical network as the PLC
  2. Set your PC’s IP to the same subnet (B&R default is typically 192.168.100.x)
  3. Open Wireshark and capture on the Ethernet interface
  4. Look for B&R’s SNMP responses or POWERLINK multicast traffic (group address 01:E0:AF:00:00:00)
  5. The PLC’s MAC address starts with 00:60:65 (B&R’s OUI)
  6. Use ARP scan: arp -a or nmap -sn 192.168.100.0/24

3.4 Method 4: Physical Inspection

The X20CP1584 has:

  • DIP switches on the bottom for node number (POWERLINK address)
  • Default IP: 192.168.100.X where X is derived from the DIP switch settings (when switches are set to FF, default is 192.168.100.1)
  • Ethernet ports: IF1 (left) and IF2 (right, typically IF2 is the main connection)
  • LED indicators: RUN (green = running), ERR (red = error), MAINT (yellow = service mode)

Sources:

  • https://community.br-automation.com/t/determining-a-plcs-ip-address-using-wireshark/495
  • https://community.br-automation.com/t/how-to-find-your-b-r-plc-in-a-network-with-python/7227

4. AR Log Analysis

4.1 What Is the AR Log?

The AR Log (Automation Runtime Log) is the PLC’s internal logbook. It records:

  • Startup/shutdown events
  • Module insertion/removal
  • Configuration errors
  • Runtime errors and warnings
  • Task class execution information
  • Software module loading
  • Network events
  • POWERLINK/X2X bus events

The primary log file is arlogsys which contains the system logbook entries.

4.2 Accessing the AR Log

Method 1: Via SDM (System Diagnostics Manager)

  1. Navigate to http://<PLC_IP>/sdm in a web browser (or https://<PLC_IP>/sdm for AR 6.0+)
  2. Click the Logger tab
  3. Click Upload from target to download the log file
  4. The log file can be opened in Automation Studio’s Logger (Open > Logger > Load Data)

Method 2: Via Automation Studio Logger

  1. Connect to the PLC in Automation Studio (Online > Settings)
  2. Go to Open > Logger (or Ctrl+L)
  3. The Logger connects to the PLC and displays log messages in real-time
  4. Use Load Data to load historical logs

Method 3: Via CF Card (for ARembedded systems)

  1. Remove the CF card from the PLC
  2. Open Runtime Utility Center
  3. Select Tools > Back up files from Compact Flash
  4. Navigate to DATA1 Partition > RPSHD > SYSROM
  5. Select all files beginning with $ (these are the log files)
  6. Save them to your PC

Method 4: Via System Dump The System Dump (see Section 5) includes the complete log files bundled into a single archive.

4.3 What Information the Log Reveals for Reconstruction

Information CategoryDescription
AR VersionThe exact Automation Runtime version (critical for matching AS version)
Software ModulesWhich libraries and function blocks are loaded
Hardware DetectionWhich modules were detected at startup
Task ConfigurationTask class names and cycle times
Error HistoryRecurring errors that indicate configuration issues
Network EventsPOWERLINK node assignments, bus errors
Boot SequenceOrder of module initialization

4.4 Important: AS Version Matching

Your Automation Studio version must match the AR major version of the PLC:

  • PLC running AR B4.93 → Use AS 4.12
  • PLC running AR 6.5.1 → Use AS 6.x
  • Mismatched versions will fail to read logs properly

Sources:

  • https://community.br-automation.com/t/how-to-collect-a-system-dump-from-a-b-r-controller/10497
  • https://community.br-automation.com/t/service-mode-what-is-it-and-how-to-collect-diagnostics/1613
  • https://community.br-automation.com/t/access-to-logging-in-plc/3243

5. System Dump: The Most Important Diagnostic Tool

5.1 What Is a System Dump?

The System Dump is the single most valuable artifact you can extract from a running B&R PLC for reconstruction purposes. It is a .tar.gz archive that collects comprehensive diagnostic data about the PLC into one file.

Available starting with AR V3.08. Created via the SDM web interface.

5.2 Information Contained in a System Dump

The system dump XML file contains:

CategoryContents
General Target StatusCPU mode (RUN/SERVICE/BOOT), AR version, uptime, hostname
Software ModulesAll loaded libraries and their exact versions
System TimingTask class configurations, cycle times, task priorities
Hardware ModulesComplete hardware tree with module types, serial numbers, firmware versions, slot positions, bus topology
IO StatusCurrent state of all digital and analog IO at the timestamp of the dump
Memory StatusMemory usage, partition sizes
Logger DataFull log files (when “Parameters + Data-Files” is selected)
Network ConfigurationIP settings, gateway, DNS, SNMP state
Network Command Trace (NCT)Network communication trace if enabled
Application InfoTask names, module configuration details

5.3 Creating a System Dump via Web Browser

  1. Open browser: http://<PLC_IP>/sdm
  2. Click the System Dump icon
  3. Select “Parameters + Data-Files” (recommended for full information)
  4. Click OK
  5. Click Upload from target
  6. Save the resulting .tar.gz file

5.4 Creating a System Dump via Python (Automated)

Using the open-source systemdump.py tool:

pip install systemdumpy

# Create, upload, and save a system dump
py -m systemdumpy 192.168.0.100 -cuv -p MachineA_

# Create an inventory spreadsheet from the dump
py -m systemdumpy BuR_SDM_Sysdump_2024-01-15_11-51-55.tar.gz -iv

5.5 Viewing a System Dump

Method 1: SystemDumpViewer (Open Source, Recommended)

  • SystemDumpViewer is a Qt-based application that visualizes system dump data in a format similar to the SDM
  • Shows hardware tree, module details, software versions, IO status, log data
  • Built with Qt 6.4.2, supports multiple languages
  • Download releases from GitHub

Method 2: Automation Studio Logger

  1. Open Automation Studio
  2. Open > Logger
  3. Load Data (top-left icon)
  4. Select the .tar.gz file
  5. Logs will populate with all available modules on the left

Method 3: Direct XML Extraction The .tar.gz contains a SystemDump.xml file that can be parsed programmatically to extract hardware inventories, software lists, and configuration data.

5.6 System Dump for Hardware Inventory

The system dump is the primary source for discovering the complete hardware configuration:

py -m systemdumpy <dumpfile>.tar.gz -iv

This generates an .xlsx spreadsheet with:

  • Every module in the system (CPU, IO modules, bus couplers, communication modules, drives)
  • Slot/position within the bus tree
  • Serial numbers
  • Firmware versions
  • Module types

This information directly maps to what you need to recreate in Automation Studio’s Hardware Configuration.

Sources:

  • https://github.com/hilch/systemdump.py
  • https://github.com/bee-eater/SystemDumpViewer
  • https://community.br-automation.com/t/how-to-collect-a-system-dump-from-a-b-r-controller/10497
  • https://help.br-automation.com/#/en/6/automationruntime/targets/sdm/sdm/sdm.htm

6. OPC-UA Browsing for Variable Discovery

6.1 Enabling OPC-UA on the PLC

The X20CP1584 supports an integrated OPC-UA server, but it must be enabled and configured. If it was enabled in the original project, you can use it to browse variables without the source code.

Note: OPC-UA must be explicitly configured in the original Automation Studio project. If it was never configured, this method will not work.

To enable OPC-UA (if you can get a blank project connected):

  1. In Automation Studio, open the Configuration View
  2. Right-click on the CPU and select Properties
  3. Navigate to the OPC-UA tab
  4. Enable the OPC-UA server
  5. Configure the port (default: 4840)
  6. Transfer to target

6.2 Browsing Variables via OPC-UA

If OPC-UA is active:

  1. Use any OPC-UA client (UA Expert, Prosys Simulation, Ignition, Node-RED)
  2. Connect to opc.tcp://<PLC_IP>:4840
  3. Browse the address space
  4. Variable nodes will show symbolic names and data types

Important: Only variables that were explicitly mapped to the OPC-UA server in the original project’s UA Map will be visible. This is typically a subset of all variables.

6.3 Automation Studio Code Watch (Online Monitoring)

Automation Studio’s Code Watch Extension (AS 2025) provides an online watch capability:

“The extension displays live variable values and, in development versions, supports writing to variables.”

Even without source code, Automation Studio’s Watch Window (Online > Compare > Software) can access all variables on the PLC if the project has been configured for online comparison.

Using Online > Compare > Software without source:

  1. Connect to the PLC
  2. Open Online > Compare > Software
  3. Scroll to Diagnosis Objects to see configured diagnostic items
  4. The watch window shows variables that are available for monitoring

6.4 Automation Studio Code Watch Access Limitation

“It seems like AS Code Watch window has access to all the variables on the PLC even if they aren’t enabled in the UA Map.”

This means the Automation Studio IDE can see variables through PVI even without OPC-UA, but you need an AS project connected to the PLC to use this feature.

Sources:

  • https://community.br-automation.com/t/opc-ua-server-enable-steps-for-x20cp1584/3036
  • https://community.br-automation.com/t/exposing-all-variables-over-opcua/11799
  • https://community.br-automation.com/t/release-2025-automation-studio-code-watch-extension-overview/8620

7. Using PVI to Enumerate All Accessible Variables

7.1 What Is PVI?

PVI (Process Visualization Interface) is B&R’s proprietary communication protocol between PLCs and PC applications. It is the foundation for all online monitoring, HMI communication, and diagnostic access. PVI can enumerate all process variables (PVs) on a running PLC, including their symbolic names, data types, and current values.

7.2 Method 1: Runtime Utility Center (RUC)

The Runtime Utility Center is installed with the PVI Development Setup (free download from B&R).

To extract all variables:

  1. Install PVI Development Setup from https://www.br-automation.com/en/downloads/software/automation-netpvi/pvi-development-setup/
  2. Open Runtime Utility Center
  3. Select “Create, modify and execute projects (.pil)”
  4. Create a new connection to the PLC (specify IP and protocol)
  5. Once connected, expand the variable tree to browse all available variables
  6. Use the Variable List feature to export all variables to a file

“If you have installed PVI, you will find the Runtime Utility Center on your computer. This allows you to save all the controller variables in a file.”

“You can get the variable list using PVI and even create a new HMI using those variables in .NET on a PC using the PVIservices dll.”

7.3 Method 2: brwatch (Open-Source Variable Browser)

brwatch is the most practical open-source tool for variable enumeration on a B&R PLC.

Features:

  • Lists all B&R PLCs on the network via SNMP/UDP scan
  • Browses the complete variable tree of a connected PLC
  • Watches variables in real-time (with configurable number representation)
  • Changes variable values (with confirmation)
  • Starts/stops/restarts tasks
  • Logs variable values to CSV files
  • Changes IP settings
  • Supports both INA and ANSL protocols

Usage for variable enumeration:

  1. Download brwatch.exe from https://github.com/hilch/brwatch/releases
  2. Requires PVI Development Setup to be installed (for PVI DLLs)
  3. Run brwatch.exe
  4. Click on the TCP/IP device to start network scanning
  5. Select the target PLC
  6. Left-click on each node in the tree view to scan/expand variables
  7. Drag variables to the watch list on the right
  8. Save the configuration via File > Save

Configuration (brwatch.ini):

[General]
; Use ANSL=1 for newer PLCs (AR >= 4.x)
; Default is INA protocol
ANSL=0

Limitations:

  • Without a PVI license (1TG0500.02), PVI runs for only 2 hours at a time, then requires restart
  • Built in plain C using Win32 API, Windows only

7.4 Method 3: PVIservices DLL (.NET Development)

For programmatic variable enumeration:

// Requires PVIservices library (installed with PVI Development Setup)
using B&R.PVI;

PviConnection pvi = new PviConnection();
pvi.Connect("192.168.1.100", PVIProtocol.INA);

// Enumerate all variables
foreach(var variable in pvi.GetAllVariables())
{
    Console.WriteLine($"{variable.Name}: {variable.Address} [{variable.DataType}]");
}

7.5 Method 4: pvipy (Python PVI Wrapper)

pvipy is a Python wrapper for B&R’s PVI interface:

pip install pvipy

This allows you to write Python scripts that connect to the PLC and enumerate all variables programmatically, export them to CSV, or build custom tools.

7.6 What Variable Information Is Available

PropertyAvailable Via
Symbolic variable namePVI, brwatch, RUC
Data type (BOOL, INT, REAL, STRING, etc.)PVI, brwatch, RUC
Current valuePVI, brwatch, RUC
Variable scope (global/local)Partially (via naming convention)
Variable structure (if struct member)PVI, brwatch (tree browse)
Array dimensionsPVI, brwatch
Memory addressPVI (internal)

Sources:

  • https://community.br-automation.com/t/read-values-with-pvi/3497
  • https://github.com/hilch/brwatch
  • https://industrialmonitordirect.com/blogs/knowledgebase/extracting-variables-from-br-cp476-plc-without-source-code
  • https://www.plctalk.net/forums/threads/b-r-cp476-visualisation-on-b-r-studio.96158/

8. Reading Hardware Configuration from a Running PLC

As detailed in Section 5, the System Dump provides the complete hardware tree including:

  • CPU model and firmware
  • All X20 bus couplers and their stations
  • IO module types, positions, and configurations
  • Communication module types and settings
  • Drive system topology
  • Serial numbers for all modules
# Extract hardware inventory to Excel
py -m systemdumpy <dumpfile>.tar.gz -iv

8.2 Via SDM Web Interface

Navigate to http://<PLC_IP>/sdm and browse the following sections:

  • System Page > General: CPU model, AR version, serial number, uptime
  • System Page > Hardware: Complete module list with status and firmware versions
  • System Page > Timing: Task class list with cycle times
  • IO Viewer: Live state of all IO points

8.3 Via brsnmp

## Get detailed PLC information
brsnmp --details

This shows the CPU type, serial number, AR version, network configuration, and POWERLINK node number.

8.4 Via Automation Studio Online

  1. Create a new blank project (File > New Project)
  2. Go to Online > Settings
  3. Configure the connection to the PLC’s IP
  4. Click Connect
  5. If hardware recognition succeeds, AS can auto-detect the hardware configuration

Automation Studio’s “Load Hardware Configuration from Target”: When creating a new project, Automation Studio offers the option to load the hardware configuration from the target system. This is one of the most powerful methods:

  1. File > New Project
  2. When prompted, select the option to detect hardware from the target
  3. AS queries the PLC’s hardware tree and populates the Hardware Configuration

Note: This works best when AS and AR versions match. The hardware detection identifies module types and positions but may not capture all parameter settings.

8.5 Via SDM IO Viewer

The SDM’s IO Viewer shows live IO states:

  • Navigate to http://<PLC_IP>/sdm
  • Select the IO Viewer tab
  • See all digital inputs, digital outputs, analog inputs, analog outputs with their current values
  • This helps map physical IO points to functional purposes

Sources:

  • https://community.br-automation.com/t/unable-to-find-hardware-configuration-online/1049
  • https://instrumentacionycontrol.net/wp-content/uploads/2017/11/IyCnet_BR_AutomationStudio_QuickStart_MASYS2ASQS-E_240.pdf
  • https://www.dmcinfo.com/blog/24942/creating-new-projects-and-adding-hardware-modules-br-automation-studio-blog-series-part-one/

9. Using the CF/CFast Card to Aid Reconstruction

9.1 CF Card Partition Structure

B&R typically creates 4 partitions on the CF/CFast card:

PartitionPurpose
Partition 0Boot loader / system firmware
Partition 1 (Active)Runtime system files, compiled binaries, configuration
Partition 2Passive/backup (passive copy of active)
User PartitionOptional; may contain user files, source code, recipes, logs

Important: Consumer card readers often cannot handle multi-partition industrial CF cards. Use the Runtime Utility Center or a card reader specifically designed for industrial CF cards.

9.2 What May Be on the CF Card

  1. Compiled binaries (always present): The compiled PLC program in .br format
  2. Source code (optional): Only if “Transfer source files to target” was enabled in the original project
  3. Configuration files: CFCfg.ini and other configuration files
  4. Log files: In the RPSHD/SYSROM directory
  5. User files: On the User partition – recipes, data logs, custom files
  6. AR system files: The complete Automation Runtime installation

9.3 Creating a CF Card Image (Critical First Step)

Before doing anything else, create a complete backup image of the CF card:

  1. Install Runtime Utility Center (from PVI Development Setup)
  2. Open Runtime Utility Center
  3. Select “Create, modify and execute projects (.pil)”
  4. Go to Tools > Back up files from Compact Flash / Image file
  5. Select the CF card drive letter
  6. Choose “Create Image” and save the complete .img file
  7. This image can be restored to a replacement CF card using “Restore Image”

“You could also create a copy or image of the compact flash card. You are then not able to change the program code since there are just compiled binaries on it, but you could restore it on another CPU if your current CPU fails.”

9.4 Exploring CF Card Contents

Using Runtime Utility Center:

  1. Tools > Back up files from Compact Flash
  2. Select the CF card
  3. Wait for disk information to load
  4. Expand: DATA1 Partition > RPSHD > SYSROM
  5. Select files beginning with $ (log files)
  6. Browse other directories for configuration files and user data

9.5 Checking for Source Code on the CF Card

If you’re very lucky, the source project may be stored on the user partition:

“If you are very lucky, the source project will be stored on the F:\ (user partition) of the CF card.”

To check:

  1. In Runtime Utility Center, browse the user partition (usually the last partition on the card)
  2. Look for .apj (Automation Studio project) files or .ac (Automation Studio Configuration) directories
  3. If found, these can potentially be loaded in Automation Studio

9.6 CF Card for Backup and Migration

Even without source code, the CF card image serves as:

  • A complete backup of the running system
  • A way to restore the exact same program on a replacement CPU
  • A source of configuration and log information

Sources:

  • https://www.reddit.com/r/PLC/comments/1amxzp6/br_plc_program_loading/
  • https://community.br-automation.com/t/how-to-reset-a-plc-without-removable-media/3383
  • https://community.br-automation.com/t/runtime-utility-center-create-restore-backups-plc-images/11710
  • https://industrialmonitordirect.com/blogs/knowledgebase/br-pcmcia-cf-card-backup-and-restore-procedure

10. Creating a New Automation Studio Project

10.1 Prerequisites

  1. Determine the AR version from the System Dump or SDM or brsnmp
  2. Install the matching Automation Studio version
  3. Install hardware support packages for the CPU and modules
  4. Install PVI Development Setup for additional tools

10.2 Create a New Project with Hardware Auto-Detection

Option A: Load Hardware from Target (Best Method)

  1. File > New Project
  2. Select “Standard Project”
  3. Assign a project name
  4. During hardware configuration, select “Load Hardware Configuration from Target”
  5. Enter the PLC’s IP address
  6. Automation Studio queries the PLC and auto-populates the hardware tree
  7. The complete hardware configuration (CPU, bus couplers, IO modules, communication modules) is imported

Option B: Manual Hardware Configuration

  1. File > New Project
  2. Select “Standard Project”
  3. Manually add hardware based on System Dump inventory
  4. Navigate to Physical View
  5. Right-click > Insert Module
  6. Add the CPU (X20CP1584)
  7. Add bus couplers and IO modules matching the System Dump

10.3 Configure Network Settings

  1. In Configuration View, select the CPU
  2. Set the IP address to match the PLC’s current IP
  3. Configure subnet mask, gateway, hostname
  4. Enable SNMP (required for online browsing)
  5. Configure Ethernet POWERLINK settings if applicable

10.4 Connecting to the Running PLC

  1. Online > Settings
  2. Add a new connection
  3. Set the IP address (must match exactly)
  4. Set the transport protocol (INA or ANSL)
  5. Click “Connect”
  6. The PLC’s status should change to “Online”

10.5 What You Can Do Once Connected

ActionPossible Without Source?
Watch variables in real-timeYES (via Watch window, brwatch, PVI)
Change variable valuesYES (most variables are writable)
Start/Stop/Restart tasksYES (via brwatch, AS, or PVI)
View IO statesYES (via SDM, AS System Monitor)
Modify program logicNO (requires source code)
Add new variablesNO (requires source code)
Change task configurationsNO (requires recompilation)
Transfer a new programYES (overwrites running binary)

Sources:

  • https://www.dmcinfo.com/blog/24942/creating-new-projects-and-adding-hardware-modules-br-automation-studio-blog-series-part-one/
  • https://community.br-automation.com/t/getting-started-with-b-r-hello-community-first-project-backend-plc-part/4676
  • https://instrumentacionycontrol.net/wp-content/uploads/2017/11/IyCnet_BR_AutomationStudio_QuickStart_MASYS2ASQS-E_240.pdf

11. Creating a Matching Hardware Configuration

11.1 Using the System Dump Inventory

The system dump provides everything needed to recreate the hardware tree:

  1. Run py -m systemdumpy <dump>.tar.gz -iv to generate the hardware inventory spreadsheet
  2. Use the inventory as a checklist for adding modules in Automation Studio
  3. Pay special attention to:
    • Module order: The position of modules on the bus matters
    • Bus couplers: X20 bus couplers (BC, BB, etc.) and their station numbers
    • Slot positions: Some modules are slot-sensitive
    • Firmware versions: Match firmware versions in the new configuration

11.2 Physical Inspection Checklist

Since the System Dump provides module types but not physical wiring:

  1. Photograph all IO modules in the cabinet, noting:
    • Module part numbers (visible on the module label)
    • Slot/position on the bus
    • Terminal wiring labels
  2. Document the bus topology:
    • Which bus couplers are at which addresses
    • Which station numbers are configured via DIP switches
    • Cable routing between bus couplers
  3. Record DIP switch settings on all bus couplers

11.3 X20 Bus Topology Notes

The X20 system uses a right-side bus (X2X) to connect modules:

  • The CPU’s IF3 or IF4 port connects to the first bus coupler
  • Bus couplers have station numbers (configured via hardware switches or software)
  • Each bus coupler can have up to 12 modules attached
  • Station numbers must be unique within a bus segment
  • Bus couplers may be connected in a chain (daisy-chain topology)

The X20CP1584 typically has:

  • IF3: Ethernet POWERLINK (managed node or CN)
  • IF1/IF2: Standard Ethernet for programming and OPC-UA

Document the POWERLINK configuration:

  • Node number (from brsnmp nodeNumber field)
  • Whether the CPU is a Managing Node (MN) or Controlled Node (CN)
  • Connected drives/slaves on the POWERLINK bus

Sources:

  • https://community.br-automation.com/t/automation-studio-hardware-list-export/8312
  • https://store.sim3d.com/demo3d_2024/configuring_a_br_automation_connection

12. Capturing the Current Program State

12.1 What CAN Be Captured

DataMethodTool
Complete variable list with typesPVI enumerationbrwatch, RUC, PVIservices
Current variable valuesOnline monitoringbrwatch, AS Watch, PVI
Hardware configurationSystem dump, SDMsystemdump.py, SDM web
Task class list and cycle timesSystem dump, SDMsystemdump.py
Software modules and versionsSystem dumpsystemdump.py
IO mapping and live statesSDM IO ViewerWeb browser
Network configurationbrsnmp, SDMbrsnmp
Log historySDM Logger, CF cardWeb browser, RUC
CF card imageRUC backupRuntime Utility Center

12.2 What CANNOT Be Captured

DataReason
Source code (ST, LD, C, SFC)Only compiled binary exists on PLC
Comments and documentationCompiled out
Original variable declarationsOnly runtime metadata survives
Program structure/file organizationBinary is flattened
Configuration parameter commentsOnly values survive
Library source codeOnly compiled references
Timer/counter presets in codeMay be visible as variable values but not the code logic

12.3 Snapshot Procedure

Before making any changes, capture a complete snapshot:

# 1. System dump
py -m systemdumpy <PLC_IP> -cuv -p MachineName_

# 2. SNMP details
brsnmp --details > <PLC_IP>_snmp_details.json

# 3. Variable list (via brwatch: browse all tree nodes, save config)
# In brwatch: File > Save As > variables.bww

# 4. CF card image
# In Runtime Utility Center: Tools > Back up files from Compact Flash > Create Image

# 5. IO states (manual: screenshot SDM IO Viewer)

Sources:

  • https://community.br-automation.com/t/upload-program-from-a-plc/1520
  • https://community.br-automation.com/t/backup-program-from-plc-x20cp1381-so-i-can-restore-it-in-another-cpu-same-as-the-first-one/8140

13. Building a Configuration Export Tool

13.1 Python-Based Export Script Concept

A reconstruction toolkit can be built using open-source components:

"""
B&R PLC Configuration Export Tool
Combines system dump parsing, SNMP discovery, and PVI variable enumeration
"""

import json
import subprocess
import xml.etree.ElementTree as ET
from pathlib import Path
from datetime import datetime

class BRConfigExporter:
    def __init__(self, plc_ip: str, output_dir: str = "./export"):
        self.plc_ip = plc_ip
        self.output_dir = Path(output_dir) / f"BR_Export_{datetime.now():%Y%m%d_%H%M%S}"
        self.output_dir.mkdir(parents=True, exist_ok=True)

    def export_system_dump(self):
        """Create and download system dump from PLC"""
        subprocess.run([
            "py", "-m", "systemdumpy",
            self.plc_ip, "-cuv",
            "-p", f"Export_{self.plc_ip.replace('.', '_')}"
        ])
        # Find the downloaded file and move to output dir

    def export_snmp_details(self):
        """Export PLC network and hardware details via SNMP"""
        result = subprocess.run(
            ["brsnmp", "--filter", self.plc_ip, "--details"],
            capture_output=True, text=True
        )
        with open(self.output_dir / "snmp_details.json", "w") as f:
            f.write(result.stdout)

    def parse_system_dump_xml(self, dump_path: str) -> dict:
        """Parse system dump XML to extract structured data"""
        # The .tar.gz contains SystemDump.xml
        # Parse: hardware modules, software modules, tasks, memory, network
        pass

    def export_hardware_inventory(self, dump_path: str):
        """Generate hardware inventory spreadsheet"""
        subprocess.run([
            "py", "-m", "systemdumpy", dump_path, "-iv"
        ])

    def generate_io_map_template(self, hardware_data: dict):
        """Create IO mapping template from hardware data"""
        # Generate a spreadsheet with columns:
        # Module, Slot, Channel, Type, Current Value, Purpose (to be filled), Wire Label
        pass

    def generate_variable_list_template(self):
        """Create variable documentation template"""
        # Generate a spreadsheet with columns:
        # Variable Name, Data Type, Scope, Current Value, Purpose (to be filled)
        pass

    def export_all(self):
        """Run all export operations"""
        self.export_system_dump()
        self.export_snmp_details()
        # ... additional exports
        print(f"All exports saved to: {self.output_dir}")

13.2 System Dump XML Structure (Key Elements)

The SystemDump.xml contains these primary sections:

<SystemDump>
  <GeneralStatus>
    <TargetMode>RUN</TargetMode>
    <ARVersion>B04.45</ARVersion>
    <SerialNumber>...</SerialNumber>
    <HostName>br-automation</HostName>
  </GeneralStatus>

  <Software>
    <Module Name="AsBrStr" Version="4.45.2"/>
    <Module Name="AsIec" Version="4.45.2"/>
    <Module Name="MpCore" Version="4.45.0"/>
    <!-- ... all loaded libraries -->
  </Software>

  <Hardware>
    <Module Type="X20CP1584" Slot="0" Serial="..." Firmware="...">
      <SubModule Type="X20BC0087" Station="1" Slot="1"/>
      <SubModule Type="X20DI9371" Slot="2"/>
      <SubModule Type="X20DO9322" Slot="3"/>
      <!-- ... complete hardware tree -->
    </Module>
  </Hardware>

  <Timing>
    <TaskClass Name="Cyclic#1" CycleTime="10000"/>
    <TaskClass Name="Cyclic#2" CycleTime="100000"/>
  </Timing>

  <Memory>
    <Partition Name="RPSHD" Used="..." Total="..."/>
    <Partition Name="User" Used="..." Total="..."/>
  </Memory>
</SystemDump>

13.3 Leveraging Existing Tools

ToolLanguagePurpose
systemdump.pyPythonCreate/parse system dumps
SystemDumpViewerC++/QtVisualize system dump data
brwatchCBrowse and watch variables
brsnmpC++Network discovery and configuration
pvipyPythonPython PVI wrapper for variable access
Pvi.pyPythonAlternative Python PVI wrapper
brOscatLibASStandard utility library (useful for reference)

Sources:

  • https://github.com/hilch/systemdump.py
  • https://github.com/bee-eater/SystemDumpViewer
  • https://github.com/hilch/brwatch
  • https://github.com/hilch/brsnmp

14. Systematic Step-by-Step Workflow

Phase 1: Discovery (No Changes to PLC)

StepActionToolOutput
1.1Photograph cabinet, note all module labelsCameraPhoto archive
1.2Record all DIP switch settingsVisualSwitch settings doc
1.3Discover PLC on networkbrsnmp / AS browseIP, model, AR version, serial
1.4Create complete CF card imageRuntime Utility Center.img backup file
1.5Create system dumpSDM web / systemdump.py.tar.gz dump file
1.6Download AR logSDM / AS LoggerLog files
1.7Capture SNMP detailsbrsnmp –detailssnmp_details.json
1.8Screenshot SDM IO ViewerWeb browserIO state reference

Phase 2: Variable Enumeration

StepActionToolOutput
2.1Install PVI Development SetupB&R websitePVI tools available
2.2Browse complete variable treebrwatch / RUCVariable list
2.3Export variable list with typesbrwatch / RUCVariable documentation
2.4Record current values of all variablesbrwatch CSV loggervariables_<timestamp>.csv
2.5Identify task names and classesbrwatch / systemdumpTask configuration

Phase 3: Hardware Documentation

StepActionToolOutput
3.1Parse system dump for hardware inventorysystemdump.py -ivinventory.xlsx
3.2Build hardware tree in AS matching the dumpAutomation StudioAS project with hardware
3.3Document bus topology (stations, couplers)Visual + system dumpBus diagram
3.4Verify IO module types against physical inspectionVisual comparisonVerified hardware list
3.5Configure network settings in new projectAutomation StudioMatching IP config

Phase 4: Project Assembly

StepActionToolOutput
4.1Install matching AS versionB&R websiteCompatible AS installed
4.2Create new project, load hardware from targetAutomation StudioProject with hardware config
4.3If hardware auto-detect fails, manually add from inventoryAutomation StudioComplete hardware tree
4.4Configure task classes based on system dump dataAutomation StudioTask configuration
4.5Test online connection to PLCAutomation StudioConfirmed connectivity
4.6Verify all variables accessible via Watch windowAutomation StudioVariable access confirmed

Phase 5: Documentation

StepActionToolOutput
5.1Create IO map from hardware inventory + IO ViewerSpreadsheetIO map document
5.2Create variable reference from exported listSpreadsheetVariable reference
5.3Document task configurationSpreadsheetTask documentation
5.4Document network configurationTextNetwork diagram
5.5Create functional description from observed behaviorTextFunctional spec
5.6Archive all exports in version controlGitReconstruction repository

15. Documenting Findings: IO Maps, Variable Lists, Program Structure

15.1 IO Map Template

| Station | Slot | Module Type | Channel | Type (DI/DO/AI/AO) | Wire Label | Current State | Purpose (observe) |
|---------|------|-------------|---------|-------------------|------------|---------------|-------------------|
| 1       | 1    | X20BC0087   | -       | Bus Coupler       | BC1        | OK            | Cabinet 1 base    |
| 1       | 2    | X20DI9371   | CH1     | DI                | X1-E1      | TRUE          | Safety door closed |
| 1       | 2    | X20DI9371   | CH2     | DI                | X1-E2      | FALSE         | Start button      |

15.2 Variable List Template

| Variable Name | Data Type | Scope | Current Value | Structure/Parent | Purpose (observe) |
|---------------|-----------|-------|---------------|-----------------|-------------------|
| gMachineState | DINT       | Global| 2             | -               | Machine state enum |
| stAxis1       | AxAxisRef | Global| [struct]       | -               | Axis 1 parameters |
| stAxis1.nPos  | LREAL     | Member| 1234.56       | stAxis1         | Current position  |
| bStartButton  | BOOL       | Global| FALSE         | -               | Start command     |

15.3 Task Configuration Template

| Task Class | Name | Cycle Time (ms) | Priority | Watchdog (ms) | Estimated Purpose |
|------------|------|-----------------|----------|----------------|-------------------|
| 1          | Cyclic#1 | 10           | 1        | 50             | Fast IO / motion    |
| 2          | Cyclic#2 | 100          | 5        | 500            | Standard logic     |
| 3          | Cyclic#3 | 1000         | 10       | 5000           | Slow / HMI update   |

15.4 Program Structure Inference

Without source code, program structure must be inferred:

  1. Variable naming conventions: Well-named variables reveal functional groupings (e.g., stConveyor_*, axisHeater_*)
  2. Task class count and cycle times: Fast tasks suggest motion/safety, slow tasks suggest HMI/recipes
  3. Software modules loaded: MpAxis suggests motion, MpRecipe suggests recipe handling
  4. Observed behavior: Watch variable changes during machine operation to understand logic flow
  5. IO patterns: Correlate IO changes with machine actions to infer interlocks and sequences

16. What Information Is Permanently Lost

16.1 Completely Lost (Cannot Be Recovered)

InformationReason
Source code (ST, LD, C, SFC)Only compiled binary exists; cannot be decompiled
Comments and inline documentationStripped during compilation
Original project file structureBinary is flattened; no file boundaries survive
Program logic and algorithmsCompiled to machine code
Timer/counter presets in logicOnly visible if exposed as variables
Function block internal implementationsLibrary internals not exposed
Configuration parameter commentsOnly values, not rationale
Original developer’s intentCannot be inferred from binary

16.2 Partially Recoverable

InformationRecovery MethodQuality
Variable namesPVI enumerationFull (symbolic names preserved in binary)
Variable typesPVI enumerationFull (type metadata preserved)
Current variable valuesOnline monitoringFull (real-time)
Hardware configurationSystem dump, SDMFull (complete hardware tree)
Task configurationSystem dumpPartial (names and cycle times)
Software modulesSystem dumpFull (library list with versions)
Network configurationbrsnmp, SDMFull
IO mappingSDM IO ViewerPartial (physical → logical mapping requires observation)

16.3 The “Golden Scenario”: Source Code Was Stored on Target

In rare cases, the original developer enabled “Transfer source files to target” or “Target Source Files Comparison”. In this case:

  • File > Open Project From Target in Automation Studio will load the complete source
  • The source files are stored on the CF card’s active partition
  • You can fully edit and rebuild the program

Check this FIRST before attempting any reconstruction.

Sources:

  • https://community.br-automation.com/t/upload-program-from-a-plc/1520
  • https://www.reddit.com/r/PLC/comments/1ja6zbk/problem_getting_program_from_a_plc_x20_br/
  • https://community.br-automation.com/t/problem-getting-program-from-a-plc-x20/5019

17. Best Practices for Documenting Undocumented Machines

17.1 Immediate Actions

  1. NEVER power off the PLC until you have at minimum:
    • A CF card image backup
    • A system dump
    • A complete variable list export
  2. Work on a copy: Clone the CF card image and work with the clone, never the original
  3. Document everything as you go: Don’t rely on memory; photograph and record immediately
  4. Use version control: Store all exports and documentation in a Git repository

17.2 Documentation Standards

  1. Naming convention: Use consistent naming for all discovered elements
  2. Date stamps: Include dates on all exports and observations
  3. Machine state context: Record what the machine was doing when you captured each piece of data
  4. Correlation: Cross-reference variable names with IO points and observed behavior
  5. Confidence levels: Mark information as “Observed”, “Inferred”, or “Guessed”

17.3 Functional Reverse Engineering Approach

Since you cannot see the code, reverse-engineer the function:

  1. Map all IO: For each input, trigger it and observe which outputs/variables change
  2. Map sequences: Track the order of operations by watching state variables
  3. Identify modes: Determine machine states (auto, manual, fault, setup) from state variables
  4. Map safety interlocks: Identify which conditions prevent certain actions
  5. Document recipes/parameters: Capture all setpoint/parameter values
  6. Record timing: Measure cycle times and sequence durations
  7. Map communication: Identify external device communication (Modbus, PROFINET, OPC-UA, etc.)

17.4 Building a Replacement Strategy

If modification is required and source code is truly lost:

  1. Keep the original running: Do NOT overwrite the existing binary
  2. Build a parallel system: Create a new project that runs alongside the original, taking over functions incrementally
  3. Use the CF card image as safety net: If anything goes wrong, you can restore the original image
  4. Consider external overrides: For simple changes, an external PLC or soft-PLC can modify IO signals without touching the original program
  5. Contact B&R support: They may be able to help identify the original system integrator

17.5 Long-Term Recommendations

  1. Label everything: Every wire, every module, every terminal
  2. Create as-built drawings: Update cabinet drawings to match actual configuration
  3. Record all setpoints: Many machines have critical parameters visible as variables
  4. Document startup sequence: Record the order the machine goes through on power-up
  5. Archive all discovered data in multiple locations: Local PC, network share, cloud backup

18. Open-Source Tool Reference

Essential Tools

ToolURLLanguagePurpose
brwatchhttps://github.com/hilch/brwatchC (Win32)Variable browsing, monitoring, logging, IP config
brsnmphttps://github.com/hilch/brsnmpC++Network discovery, PLC details, IP management
systemdump.pyhttps://github.com/hilch/systemdump.pyPythonCreate/parse system dumps from CLI
SystemDumpViewerhttps://github.com/bee-eater/SystemDumpViewerC++/QtVisualize system dump data
Pvi.pyhttps://github.com/hilch/Pvi.pyPythonPython PVI wrapper for PLC communication
awesome-B-Rhttps://github.com/hilch/awesome-B-R-Curated list of B&R tools and libraries

B&R Official Tools

ToolIncluded WithPurpose
Automation StudioB&R licenseFull IDE for B&R PLCs
Runtime Utility CenterPVI Development SetupCF card backup/restore, variable lists
PVI ManagerPVI Development SetupManages PVI connections
PVI MonitorPVI Development SetupReal-time variable monitoring
SDM (web-based)PLC itself (AR >= 3.0)System diagnostics, system dump, logger

Python Ecosystem

ToolURLPurpose
pvipyhttps://pypi.org/project/pvipy/Python PVI wrapper
demo-br-asyncuahttps://github.com/hilch/demo-br-asyncuaAsync OPC-UA client for B&R PLCs
systemdumpyhttps://pypi.org/project/systemdumpy/CLI system dump tool

19. Sources

B&R Official Documentation

  • B&R Online Help: https://help.br-automation.com/
  • B&R SDM Documentation: https://help.br-automation.com/#/en/6/automationruntime/targets/sdm/sdm/sdm.htm
  • B&R System Dump Help: https://help.br-automation.com/#/en/6/automationruntime/targets/sdm/sdm/sdm2_sdmpage_systemdump.html
  • PVI Development Setup Download: https://www.br-automation.com/en/downloads/software/automation-netpvi/pvi-development-setup/
  • B&R Tutorial Portal: https://www.br-automation.com/en/academy/virtual-classroom/br-tutorial-portal/

B&R Community Forum Posts

  • How to collect a System Dump: https://community.br-automation.com/t/how-to-collect-a-system-dump-from-a-b-r-controller/10497
  • Service Mode Diagnostics: https://community.br-automation.com/t/service-mode-what-is-it-and-how-to-collect-diagnostics/1613
  • Upload program from a PLC: https://community.br-automation.com/t/upload-program-from-a-plc/1520
  • OPC UA Server enable steps for X20CP1584: https://community.br-automation.com/t/opc-ua-server-enable-steps-for-x20cp1584/3036
  • Exposing all variables over OPCUA: https://community.br-automation.com/t/exposing-all-variables-over-opcua/11799
  • Read values with PVI: https://community.br-automation.com/t/read-values-with-pvi/3497
  • Browse for targets troubleshooting: https://community.br-automation.com/t/browse-for-targets-in-as-not-working/2065
  • Finding PLC in Online Settings: https://community.br-automation.com/t/finding-browsing-plc-in-online-settings-not-possible-under-windows-11/4840
  • SNMP scan from CLI: https://community.br-automation.com/t/scan-network-snmp-from-terminal-cli/10280
  • Runtime Utility Center backups: https://community.br-automation.com/t/runtime-utility-center-create-restore-backups-plc-images/11710
  • Open Project from Target: https://community.br-automation.com/t/x20cp0292-program-upload-no-valid-automation-studio-project-file/8613
  • Hardware list export: https://community.br-automation.com/t/automation-studio-hardware-list-export/8312
  • Logger access: https://community.br-automation.com/t/access-to-logging-in-plc/3243
  • PLC IP via Wireshark: https://community.br-automation.com/t/determining-a-plcs-ip-address-using-wireshark/495
  • SystemDumpViewer guide: https://community.br-automation.com/t/how-to-open-and-view-a-systemdump/6006

Open-Source Repositories

  • brwatch: https://github.com/hilch/brwatch
  • brwatch manual: http://hilch.github.io/brwatch/manual.html
  • brsnmp: https://github.com/hilch/brsnmp
  • systemdump.py: https://github.com/hilch/systemdump.py
  • SystemDumpViewer: https://github.com/bee-eater/SystemDumpViewer
  • Pvi.py: https://github.com/hilch/Pvi.py
  • awesome-B-R: https://github.com/hilch/awesome-B-R
  • ListAllBurPLCs: https://github.com/Chihing/ListAllBurPLCs
  • B&R Automation Tools VS Code Extension: https://github.com/br-automation-community/vscode-brautomationtools

Third-Party Guides

  • DMC: Creating New Projects: https://www.dmcinfo.com/blog/24942/creating-new-projects-and-adding-hardware-modules-br-automation-studio-blog-series-part-one/
  • DMC: AR Configuration Changes: https://www.dmcinfo.com/blog/26437/br-automation-changing-automation-runtime-configurations/
  • IMD: PVI Variable Extraction: https://industrialmonitordirect.com/blogs/knowledgebase/extracting-variables-from-br-cp476-plc-without-source-code
  • IMD: CF Card Backup: https://industrialmonitordirect.com/blogs/knowledgebase/br-pcmcia-cf-card-backup-and-restore-procedure
  • Automation Studio Quick Start: https://instrumentacionycontrol.net/wp-content/uploads/2017/11/IyCnet_BR_AutomationStudio_QuickStart_MASYS2ASQS-E_240.pdf

Community Discussions

  • Reddit: Getting program from B&R X20: https://www.reddit.com/r/PLC/comments/1ja6zbk/problem_getting_program_from_a_plc_x20_br/
  • Reddit: Recover code from controller: https://www.reddit.com/r/PLC/comments/vtxc9b/help_request_with_rb_x20_plc_can_i_upload_the/
  • PLCtalk: X20CP1584 upload program: https://www.plctalk.net/forums/threads/b-r-plc-x20cp1584-v4-10-upload-program.144873/
  • PLCtalk: CP476 variable extraction: https://www.plctalk.net/forums/threads/b-r-cp476-visualisation-on-b-r-studio.96158/

Key Findings

  1. Full source code recovery is impossible — B&R compiles IEC 61131-3 code to object modules (*.BR files). You can upload configuration and variable names but NOT the original ladder/ST/FBD source code. Reconstruction means building a NEW project that matches the RUNNING behavior.
  2. The upload from target gives you ~80% of what you need — hardware configuration, IO mapping, variable declarations, task configuration, and library references are all recoverable. What’s lost is the program logic (the actual code).
  3. SDM is your first tool on any undocumented machine — it reveals the complete hardware tree, module firmware versions, task configuration, and system logs without any software installation.
  4. OPC-UA namespace browsing can expose the complete variable structure — if the OEM enabled OPC-UA, browsing the address space reveals all global variables, their data types, and even array structures.
  5. PVI variable extraction from a PC provides the variable list without AS — using the PVI API’s CmpObject interface to enumerate variable names and types gives you the data declarations needed for a new project.
  6. The process is: discover hardware → extract configuration → map IO → document behavior → write replacement logic. See documentation-reconstruction.md for the parallel documentation track.

Cross-References

Related DocumentContentRelevance
cp1584-forensics.mdForensic analysis without project filesThe primary reference for extracting data from an unknown CP1584
cf-card-boot.mdCF card contents, file layout, boot sequenceUnderstanding what’s on the CF card for upload/recovery
pvi-api.mdPVI API for variable access and enumerationProgrammatic variable discovery without Automation Studio
opcua.mdOPC-UA server browsing, namespace inspectionAlternative method for variable and data type discovery
config-file-formats.md.acp, .apj, Hardware.hwl format detailsUnderstanding the configuration files recovered from the CF card
execution-model.mdTask classes, cycle times, priority systemReconstructing task configuration from online observation
memory-map.mdIO mapping, addressing, direct memory accessReconstructing IO mapping when online monitoring is available
diagnostics-sdm.mdSDM for hardware/software discoveryFirst tool for discovering what’s running on an undocumented machine
program-reverse-engineering.mdBinary analysis, decompilation approachesFor analyzing compiled code when source is unrecoverable
ftp-web-interface.mdFTP access, remote file downloadPulling files from the CF card remotely
documentation-reconstruction.mdSystematic documentation methodologyBuilding the maintenance manual for the reconstructed project
firmware-version-mgmt.mdVersion identification, compatibilityEnsuring reconstructed project targets correct firmware version
access-recovery.mdPassword recovery, credential discoveryGetting access to the PLC when credentials are unknown

B&R Automation Configuration File Formats on CF Card

A comprehensive reference for all configuration file formats used by B&R Automation Studio and Automation Runtime (AR) on CompactFlash (CF) / CFast cards.


Table of Contents

  1. CF Card Partition Structure
  2. Automation Runtime Boot Process
  3. Key Data Objects on the CF Card
  4. Project Files (.apj, .acp, .aci, .arp)
  5. Hardware Configuration Files (Hardware.hwl, Hardware.hw)
  6. Software Configuration Files
  7. I/O Mapping Files
  8. Network Configuration (IP Address, Hostname, POWERLINK)
  9. mapp IO Template Files (Conf0.xml, .io, .ar)
  10. Source Project Storage (AsProject.br)
  11. Runtime Utility Center and .pil Files
  12. Configuration Backup and Restore
  13. Editing Files Manually
  14. Complete File Extension Reference

1. CF Card Partition Structure

B&R CF cards use a proprietary multi-partition layout. A standard B&R CF card typically contains 4 partitions:

PartitionPurposeFilesystemNotes
System / SYSROMAutomation Runtime OS imageProprietary / FATContains the AR operating system kernel, drivers, and boot loader. Often stored in System ROM on the controller itself rather than the CF card.
APPApplication binaries and configurationProprietary B&R formatContains compiled user programs (.br modules), data objects (arconfig, iomap, sysconf), and runtime binaries. This is the primary partition the AR OS reads at boot.
UserUser data / file storageFAT16 / FAT32Available for application file storage, recipes, logs, system dumps, and user-accessible files. Accessed via FileIO function blocks. Configurable minimum size in CPU properties.
Data / TransferSystemRuntime data and transfer buffersProprietaryUsed for data exchange, transfer system files, and intermediate runtime data.

Project Location on CF Card by Controller Series

Controller SeriesProject / APP Path on CF
X20 (e.g. X20CP1484, X20CP1585)/Mynte/X86/APP/
Power Panel (e.g. PP41)/Flash/Project/
Automation PC (APC)/Mynte/ACP/
Safe Series/Mynte/SAFETY/

Important Notes

  • B&R controllers require industrial-grade CF/CFast cards. Consumer cards often fail because they lack the controller needed to maintain separate partitions.
  • CF cards should be formatted FAT16 for older controllers; newer controllers support FAT32 on the User partition.
  • Never remove a CF card while the controller is powered on.
  • The 4-partition layout means a standard PC card reader may only show 1-2 partitions (typically the User partition), hiding the System and APP partitions.

2. Automation Runtime Boot Process

When a B&R controller powers on, the following sequence occurs:

  1. BIOS / Bootloader - The controller’s BIOS initializes hardware and locates the boot device (CF card or internal flash).
  2. AR Kernel Load - The Automation Runtime kernel is loaded from the System partition or System ROM. This is a real-time, deterministic, multitasking operating system.
  3. Partition Mount - AR mounts the APP partition and reads its contents.
  4. Data Object Loading - AR reads the critical data objects in sequence:
    • sysconf (system configuration) - task scheduling, bus configuration, timer device settings
    • arconfig (runtime configuration) - IP address, hostname, subnet mask, gateway, network parameters
    • iomap (I/O mapping) - mapping between hardware I/O points and software variables
    • cntrl (control configuration) - controller-specific settings
  5. Hardware Initialization - Based on sysconf, AR initializes communication buses (X2X, POWERLINK, EtherNet/IP, etc.) and enumerates connected hardware modules.
  6. SDM (System Diagnostic Manager) - Starts the SDM, which builds a hardware tree reflecting the physical topology. PNP (Plug and Play) generates communication devices.
  7. Task Execution - Cyclic tasks begin execution according to the task configuration defined in sysconf.
  8. Application Startup - User programs (.br modules) are loaded into their assigned tasks and begin executing.
  9. Transition to RUN State - The controller enters RUN mode once all initialization is complete.

Boot Modes

ModeBehavior
COLDSTARTFull initialization. All RAM is cleared, all hardware re-initialized, all tasks restarted. Corresponds to power-on or watchdog reset.
WARMSTARTSelective re-initialization. Retains persistent variables (RETAIN data), some hardware state preserved. Triggered by software command or configuration change.
INITInitialization mode used for firmware updates and system maintenance.

3. Key Data Objects on the CF Card

The APP partition contains several critical data objects. These are not plain text files in the traditional sense – they are compiled binary data objects generated by Automation Studio during the build process. However, they originate from XML-based source files in the AS project.

3.1 sysconf (System Configuration)

The sysconf data object is the master configuration for the entire controller. It is stored in the APP partition and defines:

  • Task scheduling - Task classes, priorities, cycle times, and which programs are assigned to each task
  • Bus configuration - X2X bus parameters, POWERLINK settings, bus cycle times
  • Timer device - I/O scheduler timer configuration (a timer device entry is required for each task class)
  • Hardware topology - The physical hardware tree (CPU, bus couplers, I/O modules, interface modules)
  • Communication device parameters - Settings for each communication interface
  • Watchdog configuration - Hardware and software watchdog timeouts

The sysconf originates from the Hardware.hwl and Hardware.hw files in the AS project, plus the CPU configuration in the Configuration View. It is compiled into a binary .syc (sysconf.syc) file.

Key limitation: The sysconf data object cannot be modified at runtime using mapp IO or AsIOMMan. These libraries only modify arconfig and iomap. Adding interface modules (e.g. FPSC, IF485, IFPLK) requires sysconf changes, which means those modules cannot be dynamically added via mapp IO alone.

3.2 arconfig (Automation Runtime Configuration)

The arconfig data object contains the network and runtime settings for the controller:

  • IP address (e.g. 192.168.1.10)
  • Subnet mask (e.g. 255.255.255.0)
  • Default gateway
  • Hostname
  • DNS server settings
  • Time server (NTP) configuration
  • Various runtime parameters

ArConfig is accessible in the Configuration View of Automation Studio under the CPU properties. It can also be read and written at runtime using the AsARCfg library functions:

(* Read IP address *)
CfgGetIPAddr_1.enable := 1;
CfgGetIPAddr_1.pDevice := ADR(pDevice);
CfgGetIPAddr_1.pIPAddr := ADR(IPString);
CfgGetIPAddr_1.Len := 20;
CfgGetIPAddr_1();

(* Write IP address *)
CfgSetIPAddr_1.enable := 1;
CfgSetIPAddr_1.pDevice := ADR(pDevice);
CfgSetIPAddr_1.pIPAddr := ADR(NewIPString);
CfgSetIPAddr_1();

Other AsARCfg functions include: CfgGetSubnetMask(), CfgSetSubnetMask(), CfgGetHostname(), CfgSetHostname(), etc.

3.3 iomap (I/O Mapping)

The iomap data object defines the mapping between physical I/O hardware and software variables. It maps:

  • Digital inputs (DI) and outputs (DO) to boolean variables
  • Analog inputs (AI) and outputs (AO) to integer/real variables
  • Bus coupler data points to structured variables
  • Module-specific data (e.g. temperature, counters, encoder values)

I/O mapping is configured in Automation Studio via the I/O register card view. Each module has a list of data points that can be assigned variable names.

The iomap can be modified at runtime using the mapp IO library (AsIOMMan) via the ASIOMMRemove and ASIOMMCreate functions, or by loading XML configuration templates.

Important: When replacing iomap, a warm restart is needed. I/O data point “not found” warnings occur if arconfig is removed before iomap, or if the new configuration is loaded without a warm restart.

3.4 cntrl (Control Configuration)

The cntrl data object contains controller-specific configuration including:

  • CPU operating parameters
  • Memory allocation settings
  • Safety-related parameters (on safety controllers)
  • Watchdog configuration

4. Project Files

4.1 .apj – Automation Studio Project File (XML)

The .apj file is the main project file for an Automation Studio project. It is an XML file that serves as the project manifest. When you open a project in Automation Studio, you open the .apj file.

Key characteristics:

  • XML format, human-readable with a text editor
  • Contains project metadata: name, target system, Automation Studio version
  • References all other project files (hardware trees, configuration files, software packages)
  • Defines the project structure (configurations, packages, referenced libraries)

Typical .apj XML structure (conceptual):

<?xml version="1.0" encoding="utf-8"?>
<Project Version="4.12" xmlns="...">
  <Name>MyMachineProject</Name>
  <Target>
    <Type>X20CP1585</Type>
    <RuntimeVersion>J4.25</RuntimeVersion>
  </Target>
  <Configurations>
    <Configuration Name="Config1" Default="true">
      <HardwareTree>Hardware/Hardware.hw</HardwareTree>
      <ConfigurationFile>Configuration.cfg</ConfigurationFile>
      <PackageRefs>
        <PackageRef Name="Software" />
      </PackageRefs>
    </Configuration>
  </Configurations>
  <Packages>
    <Package Name="Software" Path="Software/" />
  </Packages>
  <Libraries>
    <Library Name="AsBrStr" />
    <Library Name="AsIOMMan" />
  </Libraries>
</Project>

4.2 .acp – Automation Configuration Package

The .acp file is a configuration package that contains hardware and software configuration data for a specific configuration variant. Projects can have multiple configurations (e.g., different machine variants), each represented by its own .acp or set of configuration files.

  • Contains references to hardware configuration, I/O mapping, task configuration
  • One configuration can be selected as the active/default configuration for building and downloading

4.3 .aci – Configuration Index / Data

The .aci file stores configuration data and index information. It is used by Automation Studio to track configuration state and is part of the project’s configuration system.

4.4 .arp – Project Resources

The .arp file contains project-level resources such as:

  • Global variable definitions
  • User-defined data types shared across configurations
  • OPC-UA mapping configurations
  • Visualization resources

4.5 Project File Collection Summary

An Automation Studio project is a collection of:

ComponentDescription
Programs (POUs).st, .ld, .il, .sfc, .c source files (Structured Text, Ladder, etc.)
User filesCustom data types, global variables (.dat, .var)
Hardware treesHardware.hwl, Hardware.hw
Configuration files.acp, .aci, .arp, .cfg
I/O mappingsI/O mapping configuration linked to the hardware tree
Imported softwaremapp components, third-party libraries
Libraries.br binary library packages

5. Hardware Configuration Files

5.1 Hardware.hwl – Hardware Library (XML)

The Hardware.hwl file is an XML-based hardware library that defines the physical hardware components available in the project. It acts as a catalog of all hardware modules that can be used.

  • XML format
  • Lists hardware module types and their properties
  • Referenced by Hardware.hw to build the actual hardware tree
  • Generated and maintained by Automation Studio when modules are added/removed from the hardware catalog
  • Contains module type definitions, parameter ranges, default settings

Not typically edited manually – changes are made through the Automation Studio hardware catalog interface.

5.2 Hardware.hw – Hardware Tree (XML)

The Hardware.hw file is an XML file that defines the actual hardware tree for a specific configuration. It specifies:

  • The CPU model (e.g., X20CP1585)
  • Connected bus couplers (e.g., X20BC0087)
  • All I/O modules in their physical positions (stations/addresses)
  • Bus module types (X20BM05, X20BM11, X20BM15) for address assignment
  • Interface modules (e.g., X20IF10A1, X20IF1043, X20IF1081)
  • Power supply modules (e.g., X20PS9400)
  • Network topology and bus addressing

Conceptual Hardware.hw structure:

<?xml version="1.0" encoding="utf-8"?>
<Hardware xmlns="...">
  <Device Type="X20CP1585" Name="CPU">
    <BusCoupler Type="X20BC0087" Station="1">
      <Module Type="X20DI9371" Station="2" />
      <Module Type="X20DO8322" Station="3" />
      <Module Type="X20AI4322" Station="4" />
      <Module Type="X20PS4951" Station="5" />
      <Module Type="X20AI4222" Station="6" />
      <BusModule Type="X20BM11" Station="7" />
    </BusCoupler>
  </Device>
</Hardware>

How to edit Hardware.hw:

  1. Open the project in Automation Studio
  2. Use the hardware tree editor (left panel, Configuration View) to add/remove modules
  3. Modify station addresses by changing bus module types
  4. Automation Studio regenerates Hardware.hw automatically
  5. Manual XML editing is possible but risky – Automation Studio validates the structure

Important addressing rules:

  • Without addressable bus modules (X20BM15, X20BM05), stations are assigned sequentially
  • X20BM15 allows arbitrary station address assignment
  • Power supply modules (X20PS series) use bus modules just like I/O modules
  • The hardware tree in SDM on the target will reflect whatever Hardware.hw specifies, not necessarily the physical wiring

5.3 Relationship to sysconf

During the build process, Hardware.hw is compiled into the sysconf binary data object. Changes to the hardware tree require a full rebuild and redownload to the target.


6. Software Configuration Files

6.1 Task Configuration

Task configuration is part of the sysconf data object and defines how the controller’s CPU time is allocated:

Task classes in B&R AR (from highest to lowest priority):

ClassPriorityTypical UseDefault Cycle
Class 1HighestSafety functions, motion control100 us - 1 ms
Class 2HighFast I/O processing, positioning1 ms
Class 3MediumStandard cyclic programs10 ms
Class 4LowBackground processing, HMI100 ms
Class 5LowestNon-time-critical tasks1000 ms

Each task class has:

  • A cycle time (deterministic, guaranteed execution interval)
  • Assigned programs/POUs that execute within the task
  • A watchdog timeout (if the task exceeds its cycle time)

Task configuration is set in the Configuration View under the CPU properties, in the “Task Configuration” tab. It is compiled into sysconf.

6.2 Program References

Programs (POUs - Program Organization Units) are assigned to tasks in the Configuration View:

  • In the Logical View, programs are organized under the Software tree
  • In the Configuration View, programs are linked to specific task classes
  • Programs reference each other through the global variable/data object system
  • Program entry points are mapped to task classes via the task configuration

6.3 Software Tree Structure

The right panel of Automation Studio (Software tree) contains:

Software/
  Data Objects/
    GlobalVars.dat        -- Global variable declarations
    MachineConfig.var    -- Configuration data types
    RetainData.dat       -- Persistent variables
  Programs/
    Main/
      MainProgram.st     -- Entry program (Cyclic)
      AxisControl.st     -- Motion program
    Functions/
      CalculateSpeed.st
      FilterSignal.st
    Function Blocks/
      Motor.fb
  Libraries/
    AsBrStr.br            -- B&R standard library
    AsMath.br             -- Math functions
    mapp.br               -- mapp components

6.4 Configuration View Structure

The Configuration View provides a two-panel layout:

Left Panel (Hardware Tree)Right Panel (Software / Config)
CPU (with properties: IP, hostname, task config)Task Configuration
Bus CouplersData Objects
I/O Modules (with I/O register card)Program References
Interface ModulesOPC-UA Mapping
Network DevicesMemory Configuration
Additionally Supported Hardware

7. I/O Mapping Files

7.1 I/O Mapping Overview

I/O mapping connects physical hardware I/O points to software variables. In Automation Studio:

  1. Each hardware module has an I/O register card showing all available data points
  2. Variables are assigned to individual data points (e.g., DI1 -> gStopButton)
  3. The I/O mapping is stored as part of the configuration data
  4. At runtime, the iomap data object contains the compiled mapping

Data point types:

Module TypeTypical Data Points
X20DI9371 (Digital Input)DI1 through DI32 (BOOL)
X20DO8322 (Digital Output)DO1 through DO32 (BOOL)
X20AI4322 (Analog Input)AI1 through AI4 (INT, 16-bit)
X20AO4622 (Analog Output)AO1 through AO4 (INT, 16-bit)
X20AT4222 (Temp Input)AT1 through AT2 (REAL)
X20PS4951 (Power Supply)Status, diagnostics

7.2 I/O Mapping Configuration

I/O mapping is configured through:

  • Automation Studio GUI: Click on a module in the hardware tree to open its I/O register card, then assign variable names to data points
  • mapp IO Library: For runtime reconfiguration using XML templates
  • AsIOMMan Library: Programmatic I/O management using ASIOMMRemove / ASIOMMCreate function blocks

7.3 mapp IO Template Format (.io files)

For runtime I/O reconfiguration, mapp IO uses .io template files that define I/O mappings for specific module types:

  • Each module type can have a corresponding .io file
  • These files contain the I/O mapping definitions in a structured format
  • Referenced by Conf0.xml configuration files
  • Stored in the project or in a template directory

8. Network Configuration

8.1 IP Address and Network Parameters

Network configuration is stored in the arconfig data object and includes:

ParameterDescriptionExample
IP AddressController’s static IP192.168.1.10
Subnet MaskNetwork subnet255.255.255.0
Default GatewayRouter for external networks192.168.1.1
HostnameController name on networkX20CP1585-MyMachine
DNS ServerDomain name resolution192.168.1.100

Methods to change IP address:

  1. Automation Studio (Online Mode): Connect to PLC -> Online -> Settings -> Set IP Parameters (volatile, resets on reboot unless saved to arconfig)
  2. Configuration View: Edit the arconfig properties for the CPU, rebuild and redownload (persistent)
  3. Runtime API: Use AsARCfg library (CfgSetIPAddr()) from user program (persistent, writes to arconfig)
  4. brwatch utility: Use brwatch service tool to set IP addresses via command line

POWERLINK (Ethernet POWERLINK, EPL) is B&R’s real-time Ethernet protocol. Configuration includes:

Ethernet parameters:

  • IP address for the POWERLINK interface
  • Subnet mask
  • Cycle time (typically 200 us - 10 ms)
  • Poll timeout

POWERLINK-specific parameters:

  • Node address / station ID
  • IsManaging flag (MN = Managing Node / CNC = Controlled Node)
  • Asynchronous bandwidth allocation
  • Multi-phase cycle settings
  • Prescale factor

Configuration in Automation Studio:

  • POWERLINK settings are in the CPU’s network properties
  • The sysconf data object contains bus cycle timing
  • The arconfig data object contains the IP addressing
  • POWERLINK V2 requires a valid binding configuration

8.3 Additional Network Protocols

ProtocolConfiguration Location
EtherNet/IParconfig + specific module configuration
Modbus TCP/IPModule-specific configuration (e.g., X20IF1081)
CANopenInterface module parameters (e.g., X20IF1043)
OPC UAConfiguration View -> OPC-UA mapping
ANSL (Automation Network Service Layer)arconfig (auto-discovery settings)

9. mapp IO Template Files

The mapp IO technology enables runtime hardware reconfiguration. It uses a set of template files:

9.1 Conf0.xml – Configuration Definition

The Conf0.xml file defines a complete hardware configuration variant:

<?xml version="1.0" encoding="utf-8"?>
<Configuration Name="Conf0">
  <Modules>
    <Module Type="X20DI9371" Source="Template" Station="2" />
    <Module Type="X20DO8322" Source="Template" Station="3" />
    <Module Type="X20AI4322" Source="Template" Station="4" />
  </Modules>
  <IOMapping>
    <Mapping Module="X20DI9371" File="X20DI9371.io" />
    <Mapping Module="X20DO8322" File="X20DO8322.io" />
    <Mapping Module="X20AI4322" File="X20AI4322.io" />
  </IOMapping>
</Configuration>

Source attribute options:

  • Source="AR" – Use configuration from the currently running AR (default for mapp IO)
  • Source="Template" – Use template files (.io, .ar) from the project file system

9.2 .io Files – I/O Mapping Templates

.io files contain I/O mapping definitions for specific module types. Each file defines the data points and their variable mappings for a particular module.

9.3 .ar Files – Module Configuration Templates

.ar files contain module-specific configuration parameters for a particular module type. These are the AR-side configuration templates that complement the .io mapping files.

9.4 Using mapp IO at Runtime

To switch hardware configurations at runtime:

  1. Create template files (Conf0.xml, .io, .ar) for each configuration variant
  2. Use mapp IO function blocks to load a new configuration
  3. The system removes the current arconfig and iomap data objects
  4. New arconfig and iomap are generated from the template files
  5. A warm restart is required for the new configuration to take effect
  6. The SDM hardware tree updates to reflect the new configuration

Limitations:

  • Interface modules (FPSC, IF485, IFPLK) require sysconf changes, which mapp IO cannot do
  • Modules not listed in “Additionally Supported Hardware” in CPU properties will not work
  • The system must be designed with modular hardware support from the start

10. Source Project Storage

10.1 AsProject.br – Archived Source Project

When a project is downloaded to a B&R target (or via offline installation), the source project files can be stored as an AsProject.br module on the target’s CF card or onboard flash memory.

  • AsProject.br is a compressed archive of the complete Automation Studio project source
  • It includes all source code (.st, .ld files), configuration files, hardware trees, and libraries
  • This allows recovering the project from the target using Project -> Open from Target in Automation Studio

Enabling source storage on the target:

  1. In Automation Studio, open the project
  2. Switch to Configuration View
  3. Right-click the CPU folder -> Properties
  4. Navigate to the Comparison tab
  5. Enable “Source comparison on the target”
  6. Rebuild and download the project

Requirements:

  • Automation Runtime V3.08 or higher (SG4 targets)
  • The source comparison option must be enabled before the build that is downloaded
  • Offline Installation (Project -> Project Install -> Offline Installation, shortcut Alt+F8) explicitly transfers source files

10.2 Downloading Source from Target

To recover a project from a target’s CF card:

  1. Remove the CF card from the controller (power off first)
  2. Insert into a PC card reader
  3. Navigate to the APP partition directory
  4. Copy the project files or AsProject.br module
  5. In Automation Studio: File -> Open Project and select the .apj file
  6. Or use Project -> Open from Target via Ethernet connection

11. Runtime Utility Center and .pil Files

11.1 Runtime Utility Center (RUC)

B&R Runtime Utility Center is a standalone tool for CF/CFast card management:

  • Create CF card images: Backup entire CF card contents as .img files
  • Restore CF cards: Write image files to replacement cards
  • Create installation packages: Generate .pil files for offline installation
  • Format cards: Prepare new CF/CFast cards for B&R use

11.2 .pil Files – Program Installation Lists

.pil files are command list files used by the B&R Runtime to execute installation sequences. They are text-based instruction files that tell AR what to install from the CF card.

Creating a .pil file:

  • In Automation Studio: Project -> Project Install -> Offline Installation (Alt+F8)
  • This generates an installation package including the .pil file
  • The .pil file lists the sequence of binary modules to load

11.3 .abk Files – Backup Files

.abk files are Automation Studio backup files created through the online backup function:

  • Target -> Backup -> Create in Automation Studio
  • Contains the full runtime state including configuration and binaries
  • Can be restored via Target -> Backup -> Restore

12. Configuration Backup and Restore

12.1 Method 1: Automation Studio Online Backup

  1. Connect to the target via Ethernet (Online -> Connect)
  2. Target -> Backup -> Create
  3. Select backup scope: Full Backup (OS + runtime + data) or Application Only
  4. Save as .abk file
  5. Restore: Target -> Backup -> Restore -> select .abk file

12.2 Method 2: Runtime Utility Center (Offline)

  1. Power down controller, remove CF card
  2. Insert CF card into PC card reader
  3. Open Runtime Utility Center
  4. Create Image -> select CF card -> save as .img file
  5. Restore Image -> select .img -> write to new CF card

12.3 Method 3: Raw Disk Imaging

## Linux - Create backup
dd if=/dev/sdX of=BR_CF_Image.img bs=4M conv=noerror,sync

## Linux - Restore to new card
dd if=BR_CF_Image.img of=/dev/sdX bs=4M conv=noerror,sync

## Windows - Use Win32 Disk Imager or similar

12.4 Method 4: File-Level Copy

For accessible files on the User partition:

  1. Navigate to the User partition via PC card reader
  2. Copy relevant files (recipes, logs, user data)
  3. For APP partition files: use Runtime Utility Center or raw imaging (the APP partition is not directly accessible from a PC)

12.5 Backup Best Practices

  • Maintain multiple backup copies on separate media
  • Document backup date and controller firmware version with each backup
  • Test restore procedures on a spare controller
  • Use .abk files for version-matched restores (same AS version)
  • Use raw .img files for exact sector-by-sector clones
  • Never modify CF card contents while the controller is running

13. Editing Files Manually

13.1 What Can Be Edited Manually

FileEditable Manually?ToolRisk
.apj (project file)Yes (XML)Any text editorLow-Medium
Hardware.hwPossible (XML)Text editorHigh (validation needed)
Hardware.hwlNot recommendedVery High
arconfig (binary)NoAutomation Studio or AsARCfg API
iomap (binary)NoAutomation Studio or mapp IO
sysconf (binary)NoAutomation Studio only
Conf0.xmlYes (XML)Any text editorLow (for mapp IO templates)
.io templatesYesAutomation Studio or text editorLow
.pilYes (text)Text editorMedium
User partition filesYesAny file editorLow

13.2 Changing IP Addresses

Method A – Automation Studio (recommended):

  1. Configuration View -> CPU Properties -> arconfig
  2. Modify IP address, subnet mask, gateway, hostname
  3. Rebuild and download

Method B – AsARCfg library (at runtime):

CfgSetIPAddr_1.pIPAddr := ADR('192.168.1.20');
CfgSetIPAddr_1();

Method C – brwatch (command line):

brwatch -s <target_ip> -i <new_ip>

Method D – Online Settings (temporary): Automation Studio -> Online -> Settings -> Set IP Parameters (volatile, resets on reboot)

13.3 Inspecting Configuration Files via FTP (No Automation Studio)

When you have no AS project but need to understand or modify configuration, you can access files via FTP:

## Connect to the PLC FTP server
ftp 192.168.1.10
## Try: anonymous / (any email), or admin / admin, or admin / (blank)

## List the system partition root
ls -la
## Key files to look for:
##   BrWebSvr.ini        - Web server config
##   arlogsys.log        - System log
##   SysDir/*.cfg        - Runtime configuration files

## List the SysDir configuration directory
ls SysDir/

## Download the web server configuration for inspection
get BrWebSvr.ini

## Download the ARConfig (if accessible - typically binary)
## Note: arconfig, iomap, sysconf are binary data objects, NOT plain text
## They cannot be meaningfully edited with a text editor

What you CAN do via FTP:

  • Download and inspect .ini, .cfg, .xml, .txt files from the system partition
  • Download and modify user partition files (recipes, logs, CSV data)
  • Upload replacement configuration files for web server, OPC-UA, etc.
  • Download .log files for analysis

What you CANNOT do via FTP:

  • Modify binary data objects (arconfig, iomap, sysconf, cntrl) — these are compiled binaries
  • Modify the hardware tree or task configuration
  • Install new software modules

For modifying binary configuration, you need either Automation Studio or the AsARCfg/mapp IO runtime libraries. See ftp-web-interface.md for the complete FTP access guide and pvi-api.md for programmatic runtime configuration changes.

13.4 Changing I/O Mapping via mapp IO (Runtime)

When you need to change I/O mapping at runtime without Automation Studio:

  1. Create new Conf0.xml with modified .io template files
  2. Load via mapp IO function blocks (requires mapp IO license)
  3. Warm restart required for changes to take effect

Method A – Automation Studio:

  1. Open I/O register card for the module
  2. Change variable assignments
  3. Rebuild and download

13.6 Changing Program References / Task Configuration

  • Edit task configuration in Configuration View -> CPU Properties -> Tasks
  • Assign programs to different task classes
  • Rebuild and download (affects sysconf)
  • Cannot be changed at runtime – requires rebuild

13.5 Changing Hardware Configuration

  1. Modify Hardware.hw through the hardware tree editor
  2. Add/remove modules, change station addresses
  3. Rebuild (regenerates sysconf)
  4. Download to target (requires cold restart for hardware changes)

14. Complete File Extension Reference

ExtensionTypeDescription
.apjXMLMain Automation Studio project file
.acpXML/BinaryConfiguration package for a project variant
.aciBinaryConfiguration index / data
.arpBinary/XMLProject resources (globals, types, OPC-UA mapping)
.cfgTextConfiguration settings
.hwlXMLHardware library (module type definitions)
.hwXMLHardware tree (physical topology)
.stTextStructured Text program source
.ldTextLadder Diagram program source
.ilTextInstruction List program source
.sfcTextSequential Function Chart source
.cTextANSI C program source
.datTextData object (variable/type declarations)
.varTextVariable declarations
.fbTextFunction block definition
.brBinaryCompiled binary module (library, program, or data)
.pilTextProgram Installation List (offline install commands)
.abkBinaryAutomation Studio backup file
.imgBinaryRaw disk image of CF/CFast card
.ioText/XMLI/O mapping template (mapp IO)
.arText/XMLModule configuration template (mapp IO)
.xmlXMLGeneric XML configuration (mapp IO, OPC-UA, etc.)
.sycBinaryCompiled sysconf data object
.zpBinaryCompressed project archive (legacy format)
AsProject.brBinaryCompressed source project archive on target

Summary: What Each Major File Controls

File / Data ObjectControlsHow to Edit
Hardware.hwPhysical hardware topology, module placement, bus addressingAS hardware tree editor (or direct XML edit)
Hardware.hwlAvailable hardware module definitionsAS hardware catalog (not recommended manual edit)
sysconf (binary)Task scheduling, bus timing, hardware init, timer configAS Configuration View (CPU properties)
arconfig (binary)IP address, hostname, network parameters, runtime settingsAS Configuration View or AsARCfg API at runtime
iomap (binary)Physical I/O to software variable mappingAS I/O register card or mapp IO at runtime
cntrl (binary)Controller-specific parametersAS CPU properties
.apjProject structure, file references, target systemText editor (XML) or AS
Conf0.xmlRuntime hardware reconfiguration variantText editor (XML) for mapp IO
.pilOffline installation sequenceAS or text editor
AsProject.brSource project backup on targetAutomatically generated by AS build

Key Findings

  1. The CF card holds the complete system definition. Every configuration file on the CF card — from ARConfig.ini to hardware tree (.hw) files — collectively defines how the CP1584 operates. Understanding these files is the key to modifying a system without Automation Studio.

  2. Configuration files are plain text and editable. Most B&R configuration files use INI-style formats that can be edited with any text editor. This means IP addresses, IO mapping, and program references can be changed directly on the CF card via FTP or a card reader.

  3. Hardware configuration lives in .hw and .hwl files. The .hw file is the machine-specific instance; the .hwl is the template library. Modifying the .hw file changes what hardware the AR expects to find at boot — a wrong edit causes immediate module detection failures.

  4. Multiple configuration files reference each other. The project configuration (.acp), the AR configuration (ARConfig.ini), and the hardware tree files form an interconnected web. Changes to one often require corresponding changes to others.

  5. Configuration changes require a restart to take effect. Unlike online changes to variable values, modifications to configuration files on the CF card only take effect when the AR restarts. Plan configuration work accordingly.

  6. Backup the entire CF card before any configuration edits. A single incorrect edit to a critical configuration file can prevent the system from booting. Always have a complete CF card image as a rollback point.


References

Cross-References

Related FileRelevance
cf-card-boot.mdCF card partition structure, file system layout, and boot sequence
bootloader-recovery.mdRecovery procedures when configuration files are corrupted
firmware.mdFirmware architecture and how AR loads configuration files
ftp-web-interface.mdAccessing configuration files remotely via FTP
cp1584-forensics.mdUsing configuration files to reconstruct knowledge of an undocumented system
project-reconstruction.mdBuilding a new AS project from unknown configuration files
network-architecture.mdNetwork configuration files and device enumeration settings
powerlink-internals.mdPOWERLINK configuration parameters in ARConfig.ini
modbus-gateway.mdModbus configuration files and register mapping
opcua.mdOPC-UA server configuration in BrOpcUaSvr.ini
license-mgmt.mdLicense key files and Technology Guarding configuration
access-recovery.mdBOOT mode configuration access when credentials are lost
online-changes.mdHow runtime configuration changes persist (or don’t) across restarts

B&R Documentation

  • B&R Automation Runtime Training Module TM213TRE
  • B&R POWERLINK Configuration and Diagnostics TM950TRE
  • B&R Community Forum: https://community.br-automation.com
  • B&R Runtime Utility Center Documentation
  • mapp IO Online Help (Automation Studio)
  • AsARCfg Library Reference (Automation Studio)

B&R Automation X20 CP1584 – Bootloader and Recovery Procedures

Applies to: B&R X20 CP1484, CP1584, CP1585, CP1586 and related X20 Compact CPUs. Based on: B&R X20 System User’s Manual, X20CP148x/158x datasheets, B&R Community forums, and field experience. This is unofficial documentation compiled from publicly available sources. Always consult the official B&R manuals at br-automation.com for authoritative procedures.


Table of Contents

  1. Boot Sequence Overview
  2. What Happens When the CF Card Is Corrupted or Missing
  3. Bootloader Modes and Operating Mode Switch
  4. LED Indications During Boot Failure
  5. How to Enter Bootloader Mode on the CP1584
  6. Serial Console Access
  7. Firmware Recovery via Serial (B&R Service Utility)
  8. TFTP Recovery Procedure
  9. USB-Based Recovery
  10. Runtime Utility Center for Firmware Operations
  11. Automation Studio Offline Installation
  12. Creating Recovery Media
  13. Safe Mode and Diagnostic Mode
  14. Minimum Files Needed on CF Card for Boot
  15. How to Unbrick a CP1584 That Won’t Boot
  16. How to Reload the Entire System from Scratch
  17. Prevention and Best Practices
  18. References

1. Boot Sequence Overview

When power is applied to an X20 CP1584, the following boot sequence occurs:

  1. Hardware POST – The CPU performs power-on self-test. Internal flash boots the embedded bootloader firmware (stored in internal flash, not on the CF card).
  2. CF Card Detection – The bootloader checks the CompactFlash slot for a valid storage card. The CF LED illuminates green if a card is detected.
  3. Boot Mode Evaluation – The bootloader reads the operating mode switch position (BOOT / RUN / DIAG) and determines the startup strategy:
    • BOOT: Starts “Boot AR” – a minimal runtime environment that allows firmware installation via the online interface (Ethernet or RS-232). No user application runs.
    • RUN: Attempts to load Automation Runtime from the CF card, initialize the I/O bus, and start the user application.
    • DIAG: Boots into diagnostic mode. User RAM and User Flash contents are not initialized.
  4. Runtime Load – In RUN mode, the bootloader reads the SYSTEM partition on the CF card, loads Automation Runtime, and begins I/O bus initialization.
  5. Application Start – The user application (task classes) begins execution. The R/E LED turns solid green.
  6. Runtime to Run – Automation Runtime transitions from RUN state to normal operation. The full X2X bus and POWERLINK networks are brought up.

The embedded bootloader is stored in internal flash on the CPU itself. It cannot be erased by CF card corruption. This is the safety net that allows recovery even when the CF card is completely destroyed.


2. What Happens When the CF Card Is Corrupted or Missing

CF Card Missing (No Card Inserted)

ConditionBehavior
Switch in RUNCPU enters BOOT mode from internal flash. The internal embedded firmware starts a limited runtime that allows online connections for firmware transfer. R/E LED = red, RDY/F LED = yellow.
Switch in BOOTCPU enters BOOT mode normally (same as missing card in RUN).
Switch in DIAGCPU enters DIAG mode from internal flash.

The CPU does not become a brick when no CF card is present. The internal bootloader always fires and provides a minimal environment for recovery.

CF Card Corrupted

Corruption TypeBehavior
Invalid partition table (partition count = 0)CPU stays in BOOT mode. Automation Runtime cannot find a SYSTEM partition.
SYSTEM partition filesystem corruptionCPU may enter BOOT mode or, if Automation Runtime partially loads, may enter DIAG mode (Diagnostic). Automation Runtime has failed to boot correctly.
Missing or corrupted user applicationCPU boots Automation Runtime successfully but enters SERVICE mode – no task classes are running.
Firmware/B&R component files corruptedCPU may enter BOOT mode with error in the Logger. Automation Runtime fails to fully initialize.
RAW filesystem (unformatted)CF LED may light green (card detected) but the CPU cannot read it. Stays in BOOT mode.

Key Diagnostic: CF Card Recognition

  • CF LED off – No CF card detected at all (physical seating issue, dead card).
  • CF LED green – Card is detected and readable at the hardware level.
  • CF LED yellow – Card is being read from or written to (normal during boot).
  • CPU stays in BOOT mode after setting switch to RUN with CF card inserted – Strong indicator that CF card is not recognized, not formatted correctly (needs FAT16), or does not contain a valid operating system.

3. Bootloader Modes and Operating Mode Switch

The X20 CP1584 has a physical operating mode switch on the front panel:

Switch Positions

Switch PositionModeDescription
BOOTBoot ModeStarts “Boot AR” – the minimal embedded runtime. The online interface (Ethernet + RS-232) is initialized, allowing firmware download and initial installation via Automation Studio. No user application runs. User flash memory is erased only when the download begins.
RUNRun ModeNormal operation. CPU loads Automation Runtime from the CF card, initializes all bus systems and I/O modules, and starts the user application. If no valid CF card or runtime is found, falls back to BOOT behavior.
DIAGDiagnostic ModeCPU boots into diagnostic mode. Program sections in User RAM and User FlashPROM are not initialized. After diagnostic mode, the CPU always boots with a warm restart. Used for troubleshooting without affecting user program memory.

Important: A switch position between BOOT, RUN, and DIAG is not permitted. The switch has detents at these three positions only.

Reset Button Behavior

The reset button is located below the USB interfaces on the bottom of the CPU housing. It can be pressed with a small pointed object (e.g., paperclip).

ActionResult
Press < 2 secondsWarm restart (reboot). The CPU restarts.
Press 2 – 5 secondsStops all application programs, sets all outputs to zero, and the PLC starts up in SERVICE mode by default. The startup mode that follows can be configured in Automation Studio.
Press > 5 seconds (or hold through a short-press reboot cycle)On X20 Panel-based controllers: enters DIAGNOSTIC mode. On X20 CPUs: the behavior is similar – a full reset that stops all running programs. Some B&R documentation indicates holding through the initial reboot (< 2s pulse, then hold > 2s within 2 seconds) can force diagnostic entry.

Note: Pressing Reset does not erase the program from CF card. It stops execution and reboots.


4. LED Indications During Boot Failure

Primary CPU Status LEDs (CP1484 / CP1584 / CP1585 / CP1586)

LEDColorStateMeaning
R/EGreenOnApplication running (normal RUN)
R/EGreenBlinkingBoot mode – CPU is initializing application, all bus systems, and I/O modules. This can take several minutes.
R/EGreenDouble flashMode BOOT (during firmware update).
R/ERedOnSERVICE mode
R/ERedBlinkingLicense violation (R/E blinks red AND RDY/F blinks yellow)
RDY/FYellowOnCPU is active in SERVICE or BOOT mode
RDY/FYellowBlinkingLicense violation (with R/E red blink)
RDY/FRedOnOvertemperature shutdown (110°C CPU / 95°C board per B&R datasheet; error 9204 in logbook)
S/EGreenOnPOWERLINK/Ethernet link established
S/EGreenBlinkingEthernet activity
S/ERedOnSystem error (check logbook)
S/ERedBlinkingSystem stop with error code (see error codes below)
PLKGreenOnPOWERLINK link established
PLKGreenBlinkingPOWERLINK activity
ETHGreenOnEthernet link established
ETHGreenBlinkingEthernet activity
CFGreenOnCompactFlash inserted and detected
CFYellowOnCompactFlash read/write access
DCYellowOnCPU power supply OK
DCRedOnBackup battery empty

System Stop Error Codes (S/E LED Blinking Red)

The error code is indicated by the S/E LED blinking red. The pattern consists of 4 switch-on phases, each either short (150 ms) or long (600 ms), repeated every 2 seconds.

Code PatternErrorResolution
Short Short Short LongRAM errorDevice is defective and must be replaced.
Short Short Long LongHardware errorDevice or a system component is defective and must be replaced.
Short Short Short ShortNot an errorNormal startup blinking (several red blinks immediately after power-on are normal).

Power Supply LEDs

LEDColorStateMeaning
r (green)OffModule not supplied with power
r (green)Single flashMode RESET
r (green)BlinkingMode PREOPERATIONAL
r (green)OnMode RUN
e (red)OffEverything OK
e (red)OnError (single state)
e (red)Double flashX2X Link overload, I/O supply too low, or input voltage too low
e + rSolid red + single green flashInvalid firmware

Interpreting Common Boot Failure LED Patterns

LED PatternDiagnosis
R/E red ON, RDY/F yellow ONSERVICE mode (program crashed, missing, or fault)
R/E green blinking (stuck)BOOT mode – system initializing (could take minutes; if stuck, CF card issue)
R/E red blinking + RDY/F yellow blinkingLicense violation
CF LED OFFCF card not detected (remove and re-seat, or replace card)
DC LED redBackup battery empty (replace CR2477N battery)
S/E red blinking with code patternHardware or RAM error (device may need replacement)
No LEDs at allNo power to module (check power supply and wiring)

5. How to Enter Bootloader Mode on the CP1584

Method 1: Operating Mode Switch (Primary)

  1. Set the switch to BOOT – Slide the mode switch to the BOOT position.
  2. Power cycle – Power off the X20 system, wait 30 seconds, power back on.
  3. The CPU will start in BOOT mode. R/E LED = red, RDY/F LED = yellow.
  4. In BOOT mode, the embedded Boot AR runtime initializes the Ethernet and RS-232 interfaces, allowing you to connect for firmware download.

Method 2: Missing/Invalid CF Card with Switch in RUN

  1. Remove the CF card (or leave a corrupted card in place).
  2. Set switch to RUN.
  3. Power cycle – the CPU will fall back to BOOT mode since no valid runtime is found on the CF card.
  4. This gives you the same recovery environment as Method 1.

Method 3: Reset Button

  1. With the CPU running, press the reset button for less than 2 seconds to trigger a warm restart.
  2. Within 2 seconds of the restart, press and hold the reset button for more than 2 seconds (while R/E LED is red indicating reboot).
  3. This can force the CPU into diagnostic/reset mode, which also allows recovery operations.

Method 4: Software Stop Target

  1. Connect to the CPU via Automation Studio (Ethernet or serial).
  2. Use Online > Stop Target to halt the application.
  3. The CPU enters SERVICE mode. From here you can perform diagnostics and recovery.

6. Serial Console Access

Serial Port (IF1) Specifications

ParameterValue
InterfaceRS-232 (non-isolated)
Connector12-pin terminal block (X20TB12)
PinoutPower supply: GND, +24V I/O, +24V I/O, GND, +24V CP/X2X, +24V CP/X2X, I_r, S, (reserved). RS232: TX, RX, GND (bottom row, separate from power pins)
Max distance900 m (B&R rating; see note in cp1584-hardware-ref.md regarding standard RS232 limits)
Max baud rate115.2 kbit/s
Default baud rate57600 bps (factory default)
Default parityEven
Data bits8
Stop bits1 (8,E,1)
Flow controlNone (hardware flow control not typically used)

Connection Procedure

  1. Wire RS-232 correctly:

    PLC RX (Pin 5)  <--->  PC TX (Pin 3)
    PLC TX (Pin 3)  <--->  PC RX (Pin 2)
    PLC GND (Pin 7) <--->  PC GND (Pin 5)
    

    Double-check the pin assignments on your specific terminal block. The X20TB12 pin numbering follows B&R conventions shown in the datasheet.

  2. Configure terminal emulation software (e.g., PuTTY, Tera Term, HyperTerminal):

    • Baud: 57600
    • Parity: Even
    • Data: 8 bit
    • Stop: 1
    • Flow: None
  3. Open the serial connection. If using PVI Transfer Tool or Automation Studio, configure these same settings in the online connection settings.

  4. The RS-232 LED on the power supply module will light yellow when data is being transmitted or received.

RS-232 Serial Interface — Important Notes

  • The RS-232 interface is not electrically isolated from the PLC. Use caution with ground loops.
  • In BOOT mode, the RS-232 interface is initialized and ready for communication – this is the fallback path when Ethernet is unavailable.
  • If the default 57600 baud doesn’t work, try 9600 or 115200. The baud rate can be configured in the project’s serial interface settings (IF1) in Automation Studio. If someone changed it, you may need to cycle through baud rates.
  • USB interfaces (IF4/IF5) on the X20 CPUs are USB 1.1 and are only for B&R-approved devices (dongles, approved USB storage). They cannot be used for serial communication with a PC.

7. Firmware Recovery via Serial (B&R Service Utility)

The B&R Service Utility is a firmware installation tool that can set the embedded firmware of a B&R PLC via serial connection. It is typically provided by B&R service and is not part of the standard Automation Studio distribution.

When Serial Recovery Is Needed

  • The CF card is completely corrupted or missing.
  • You have no way to connect via Ethernet (no IP address, unknown subnet, etc.).
  • The embedded firmware itself needs to be reflashed (rare – this is the lowest-level firmware in the CPU’s internal flash).

Serial Recovery Procedure

  1. Obtain the B&R Service Utility and the appropriate firmware files from B&R support.
  2. Connect the RS-232 serial cable between your PC and the CPU’s IF1 terminal block.
  3. Set the CPU mode switch to BOOT.
  4. Power on the CPU.
  5. Launch the B&R Service Utility on your PC.
  6. Configure the serial port settings (57600, 8, E, 1).
  7. Select the firmware file(s) appropriate for your CPU model.
  8. Follow the utility’s prompts to begin the firmware transfer.
  9. After completion, the CPU should be able to boot from a properly prepared CF card.

Note: The B&R Service Utility and its firmware files are generally only available through B&R service/support channels, not through public download. Contact your local B&R support office if you need this tool.


8. TFTP Recovery Procedure

B&R X20 CPUs with the embedded Boot AR runtime in BOOT mode support firmware installation over the network. While B&R does not publicly document a “TFTP boot” command set in the same way consumer routers do, the recovery process uses the standard B&R online transfer mechanism which internally uses the B&R protocol (not raw TFTP).

Network-Based Firmware Installation (BOOT Mode)

This is the standard network recovery path:

  1. Prepare the CPU:

    • Set mode switch to BOOT.
    • Power on the CPU. Wait for BOOT mode (R/E red, RDY/F yellow).
  2. Establish Network Connectivity:

    • Connect an Ethernet cable from the CPU’s IF2 (Ethernet port) to your PC or network switch.
    • The CPU in BOOT mode may default to IP 0.0.0.0 until configured, or may have a previously configured IP.
    • Set your PC’s Ethernet interface to the same subnet (e.g., 192.168.0.10).
    • Optionally set the CPU’s IP via SNMP in Automation Studio’s Browse window, or use a DHCP server on the network.
  3. Browse for the Target:

    • Open Automation Studio.
    • Go to Online > Settings.
    • Click Browse targets – the CPU should appear in the list.
    • Right-click the CPU and select Set IP parameters if needed.
  4. Transfer Automation Runtime:

    • In Automation Studio, go to Project > Services > Transfer Automation Runtime.
    • Follow the wizard to select the target and transfer the runtime to the CF card.
    • This formats the SYSTEM partition, installs Automation Runtime, and prepares the card.
  5. Transfer Your Application:

    • After Automation Runtime is installed, transfer your application project:
    • Project > Transfer > Total (or configure individual transfer types).

What Happens Internally

The Boot AR runtime in the CPU listens on the configured network interface. Automation Studio connects using the B&R PVI (Process Visualization Interface) protocol, which internally manages file transfer. This is not a raw TFTP session but rather a proprietary B&R protocol running over TCP/IP.


9. USB-Based Recovery

X20 CPU USB Limitations

The USB interfaces (IF4 and IF5) on X20 CPUs are USB 1.1 host ports designed only for B&R-approved devices:

  • B&R dongles (license keys)
  • B&R-approved USB floppy drives
  • B&R-approved USB mass storage (DiskOnKey)

The USB ports cannot be used for:

  • Direct PC-to-PLC communication (online connection)
  • Serial-over-USB communication
  • Keyboard/mouse

USB Installation for Panel Controllers

For B&R Panel controllers with built-in HMI (e.g., PowerPanel, Panel PCs like the 4PPC70 series), USB installation is a supported recovery method:

  1. Format a USB stick as FAT32.
  2. In Automation Studio, go to Project > Project Installation > Offline Installation.
  3. Select USB as the target and generate the installation package.
  4. Insert the USB stick into the controller’s USB port.
  5. Set the mode switch to BOOT (press reset < 2s, then hold > 2s within 2 seconds).
  6. The installation should automatically execute.

Note: For the X20 CP1584 CPU (no built-in HMI display), USB installation may not be directly applicable in the same way. The primary recovery paths for X20 CPUs are: CF card (offline install to CF card reader), Ethernet online transfer, and RS-232 serial transfer.

Since X20 CPUs use removable CompactFlash, the standard “USB recovery” is:

  1. Remove the CF card from the CPU.
  2. Connect the CF card to your PC using a USB CF card reader.
  3. Use Automation Studio’s Offline Installation to write the CF card.
  4. Reinsert the CF card into the CPU and power on.

This is covered in detail in Section 11.


10. Runtime Utility Center for Firmware Operations

Overview

Runtime Utility Center (RUC) is part of the PVI Development Setup package, available for free download from B&R’s website under Software > Automation Runtime. It provides tools for creating, backing up, and restoring CompactFlash cards without needing an active PLC connection.

Key Functions

FunctionDescription
Create CompactFlash (F9)Generates a complete CF card image from a project/configuration, writing all necessary files to a CF card in a USB card reader.
Create Image (Backup)Creates a sector-level backup (.img file) of an existing CF card to your PC.
Restore ImageWrites a previously backed-up image (.img) to a CF card.
PVI TransferUpload/download program modules between PC and a connected PLC.
Format/PartitionPrepares CF card with correct partition structure.

Creating a CF Card with RUC

  1. Download and install PVI Development Setup from br-automation.com.
  2. Launch Runtime Utility Center from the Start menu.
  3. Insert a blank CF card into a USB card reader connected to your PC.
  4. Press F9 or use the menu to open Create CompactFlash.
  5. Click Select source and browse to your configuration/backup files.
  6. Select the CF card drive letter from the list.
  7. Click Create to generate the CF card.
  8. Wait for completion. The card will be formatted and populated with the required files.

Backing Up a CF Card

  1. Insert the source CF card into a USB card reader.
  2. Open Runtime Utility Center.
  3. Navigate to CF Card Tools.
  4. Select Create Image to save a backup (.img file) to your PC.
  5. Save with a descriptive name (e.g., CP1584_backup_2026-07-10.img).

Restoring a CF Card from Backup

  1. Insert a blank (or same-capacity/larger) CF card into the card reader.
  2. Open Runtime Utility Center.
  3. Navigate to CF Card Tools.
  4. Select Restore Image.
  5. Browse to your .img backup file.
  6. Confirm the restore operation.

Backup File Formats

RUC creates backup files named zp.1, zp.2, zp.3 etc. These are incremental sector images of the CF card. To restore, select the latest zp file.

CF Card Backup and Restore — Important Notes

  • Always use a quality card reader. Many CF card issues during backup/restore are caused by cheap or faulty readers.
  • For X20 CPUs, use B&R-approved CF cards (SLC type preferred): 5CFCRD series.
  • The CF card must have a valid FAT16 partition for the CPU to recognize it.
  • RUC may show “partitions = 0” if the card has no valid partition table or is in RAW format.

11. Automation Studio Offline Installation

The Offline Installation is the most common method for preparing a CF card for an X20 CPU. It does not require the CPU to be connected at all – you write the card on your PC.

Offline Installation Procedure

  1. Open your project in Automation Studio.
  2. Go to Project > Project Installation > Offline Installation (in some versions: Tools > Create CompactFlash or the wizard).
  3. Select the target:
    • CompactFlash card – requires a CF card reader connected to your PC.
    • USB stick – for controllers that support USB boot (Panel PCs).
  4. Configure the installation:
    • Select the Automation Runtime version to install.
    • Choose whether to create a USER partition for user files.
    • Select any additional files to include.
  5. Click Create or Install.
  6. Automation Studio will:
    • Format/prepare the CF card with correct partitions (SYSTEM partition formatted FAT16, then converted to the B&R raw filesystem for speed).
    • Install the Automation Runtime operating system.
    • Copy the application project files.
    • Set up the transfer folder with installation instructions.
  7. Insert the CF card into the CPU.
  8. Power on with the mode switch in RUN.
  9. On first boot, the CPU performs the initial installation:
    • The transfer folder contents are unpacked.
    • SYSTEM partition is finalized.
    • The CPU will reboot one or more times.
    • After several minutes, it should enter RUN mode (R/E green solid).

CF Card Preparation Requirements

Before offline installation:

  1. Windows Disk Management: The CF card should have its partitions removed (show as “Unallocated”) or have a single primary FAT16/FAT32 partition.
  2. If the card shows as RAW: Delete the volume first in Disk Management (right-click > Delete Volume), then create a new primary partition.
  3. Run Automation Studio as Administrator: This ensures partition-level access to the CF card.

Troubleshooting Offline Installation

ProblemSolution
“One or more partitions do not have assigned drive letters”Format the card first in Disk Management (FAT16 or FAT32).
“Invalid partitioning data (partition count = 0)”Card has no valid partition. Use Disk Management or diskpart to create one.
CPU doesn’t enter RUN after offline installCheck Logger on CF card (RPSHD folder). May need to update BIOS/MTCX on APC units. Verify the project was built successfully.
Card keeps reverting to RAWLikely a faulty card reader. Try a different reader or a different CF card.

12. Creating Recovery Media

What You Need

ItemDetails
CF card readerUSB CompactFlash card reader (quality brand recommended)
CF cardB&R SLC CF card (5CFCRD series). Minimum 512 MB recommended.
Automation StudioVersion matching your project (or newer, with migration).
PVI Development SetupFor Runtime Utility Center (backup/restore).
Project fileYour Automation Studio project (.apj) with the full configuration.
Automation Runtime installerThe AR version your project requires.

Creating a Recovery CF Card (Full Method)

  1. Obtain a new or known-good CF card of appropriate capacity.

  2. Connect the CF card to your PC via card reader.

  3. In Windows Disk Management, ensure the card has a clean partition layout:

    diskpart
    select disk X        (where X is the CF card disk number)
    clean
    create partition primary
    format fs=fat16
    assign letter=Z
    

    WARNING: Double-check the disk number. clean destroys all data on the selected disk.

  4. Open Automation Studio and load your project.

  5. Go to Project > Project Installation > Offline Installation.

  6. Select the CF card as target.

  7. Enable:

    • Automation Runtime installation
    • User partition creation (if needed)
    • Any user files to pre-populate
  8. Generate the installation.

  9. Label the CF card with the project name, date, and AR version.

  10. Store in a safe location as your recovery media.

Creating a Recovery Image (Backup Method)

  1. Take the working CF card from a running system.
  2. Back up using Runtime Utility Center Create Image.
  3. Save the .img file to your PC and external backup storage.
  4. To restore: Use RUC Restore Image to write to a new CF card.

Disk Image Method (Alternative)

If RUC is unavailable, use sector-level imaging:

  1. Backup: Use a disk imaging tool (e.g., dd on Linux, Clonezilla, or Win32DiskImager) to create a raw image of the entire CF card:

    dd if=/dev/sdX of=cp1584_backup.img bs=4M status=progress
    
  2. Restore: Write the image back:

    dd if=cp1584_backup.img of=/dev/sdX bs=4M status=progress
    

Warning: This creates a byte-for-byte clone. The destination card must be the same capacity or larger, and may need manual partition resizing if larger.


13. Safe Mode and Diagnostic Mode

Diagnostic Mode

Diagnostic mode is entered when:

  • The mode switch is set to DIAG.
  • The reset button is held for longer than 5 seconds (on some controller types).

In Diagnostic mode:

  • Program sections in User RAM and User FlashPROM are not initialized.
  • I/O modules are initialized and the bus system is checked.
  • You can connect via Automation Studio to run diagnostics, inspect I/O states, and read the logbook.
  • After leaving DIAG mode (power cycle or switch change), the CPU always performs a warm restart.

Service Mode

Service mode is entered when:

  • The reset button is pressed for 2-5 seconds.
  • The “Stop Target” command is sent from Automation Studio.
  • A critical runtime error occurs (cycle time violation, page fault, divide by zero, etc.).

In Service mode:

  • No task classes are running. The application program is halted.
  • Outputs are set to zero (or their configured safe state).
  • You can connect via Automation Studio to diagnose the fault.
  • Check the Logger (Open > Logger in Automation Studio) for error codes.
  • The Diagnostic buffer contains the fault information.

System Diagnostics Manager (SDM)

When Automation Runtime is running (or in SERVICE mode), the CPU runs a built-in web server for diagnostics:

  1. Connect your PC to the same network as the CPU.
  2. Open a web browser and navigate to http://<CPU_IP>/sdm (default: http://10.0.0.220/sdm for some configurations).
  3. The SDM web interface shows:
    • Hardware status
    • Software components and versions
    • Error and event log
    • I/O module status
    • Network diagnostics

Note: SDM may be disabled in some project configurations. Check the project’s Ethernet settings if you cannot reach the SDM page.

Safe Commissioning

B&R provides a SafeCommissioning mechanism for initial commissioning and recovery. This allows a controlled initial startup where the system can be verified before full operation:

  • The SafeCommissioning configuration is stored in the SYSTEM partition.
  • A backup of the modified SafeCommissioning file should be maintained separately from the SYSTEM partition.

Safety-Relevant Boot Behavior

  • The CPU does not silently ignore faults during boot.
  • Any unrecoverable error during boot causes the CPU to enter SERVICE or BOOT mode, not RUN mode.
  • The logbook records all boot errors with timestamps and error codes.

14. Minimum Files Needed on CF Card for Boot

CF Card Partition Structure

A properly formatted B&R X20 CF card has (at minimum) a SYSTEM partition containing the Automation Runtime:

[SYSTEM Partition - B&R Raw Filesystem]
  |-- Automation Runtime files
  |-- System configuration
  |-- Transfer folder (used during initial installation)
  |-- Logger data (RPSHD folder)
  |-- ...

[USER Partition - FAT16/FAT32] (optional)
  |-- User application data
  |-- Configuration files
  |-- Backups
  |-- ...

Minimum Requirements for Boot to RUN

  1. Valid partition table – At least one partition must exist.
  2. SYSTEM partition – Formatted with the B&R raw filesystem (created by Automation Studio during offline install).
  3. Automation Runtime files – The operating system components:
    • B&R Automation Runtime kernel
    • Required system libraries and drivers
    • Hardware support packages (for the specific CPU model)
  4. System configuration – Network settings, I/O configuration, task class definitions.
  5. Application project – At minimum, a project with configured task classes (even if empty tasks). Without any application, the CPU may enter SERVICE mode rather than RUN mode.

What the Boot AR Internal Firmware Provides

Even with no CF card, the CPU’s internal flash contains enough firmware to:

  • Initialize the Ethernet interface (limited functionality)
  • Initialize the RS-232 serial interface
  • Respond to network browsing from Automation Studio
  • Enter BOOT mode for firmware download
  • Display basic boot status via LEDs and serial console

CF Card Corruption Recovery: Decision Tree

When a CF card is suspected to be corrupted (PLC won’t boot to RUN, or keeps entering SERVICE mode), follow this decision tree:

PLC won't boot to RUN
|
|-- Are LEDs lit on power-up?
|   |-- NO LEDs at all → Check 24V power supply to CPU
|   |-- Only PWR LED → Internal firmware OK, CF card not being read
|   |   |-- Remove CF card → Clean contacts with isopropyl alcohol → reinsert
|   |   |-- Try known-good CF card → If boots → original card is faulty
|   |   `-- If still no boot with known-good card → CPU hardware fault
|   |
|   |-- RDY/F flashing rapidly → CF card is being read but system files are corrupt
|   |   |-- Check arlogsys.log via FTP (anonymous, C: partition may be partially readable)
|   |   |-- Image the CF card with dd for forensic analysis before any recovery attempt
|   |   |-- Restore from backup image → if works, card had logical corruption
|   |   `-- If backup fails → create new CF card via AS Offline Installation
|   |
|   |-- RDY/F solid red → SERVICE mode
|       |-- Connect via AS and check Logger → identifies the specific error
|       |-- If Logger shows "file system error" → CF card filesystem corruption
|       |-- If Logger shows cycle time violation (144/145) → application bug, not CF issue
|       `-- If Logger shows no error → may be retentive data corruption or battery issue
|
`-- CPU enters BOOT mode (RDY/F alternating red/green)
    |-- Mode switch is in BOOT position → move to RUN
    |-- CF card has only transfer folder (not yet installed) → normal for first-time install
    `-- CF card is blank or unrecognizable → need fresh Offline Installation

Community-sourced tip (B&R Community Forum): If the files on the CF card are corrupt, the PLC will boot into Diagnostic mode and Automation Runtime won’t start. You can still access the CF card contents via FTP (anonymous, read-only to C: partition) to pull the arlogsys.log and diagnose what went wrong. On some AR versions, a partial boot allows limited SDM access even with corrupted files — try browsing to http://<PLC_IP>/sdm before removing the CF card.

CF Card Write Endurance and Failure Patterns

B&R-branded SLC (Single-Level Cell) CF cards have significantly higher write endurance than consumer MLC cards. However, they still have finite lifespan:

Card TypeWrite EnduranceExpected Life in PLC ServiceFailure Mode
B&R SLC (5CFCRD series)~100,000 write cycles per block5-10 years typicalGradual — bad blocks detected and remapped
Consumer MLC~3,000-10,000 cycles per block1-2 years (often less)Sudden — card dies without warning
Consumer TLC~1,000-3,000 cycles per block< 1 yearSudden — unpredictable failure

Failure progression pattern for B&R SLC cards:

  1. Phase 1: Increased boot time (filesystem wear leveling overhead)
  2. Phase 2: Occasional file write errors (logged in arlogsys.log)
  3. Phase 3: Files becoming unreadable (0-byte files, corrupted data)
  4. Phase 4: Complete card failure — CPU cannot read any partition

The CP1584 bootloader is designed to handle Phase 1-3 gracefully:

  • In Phase 1-2, the PLC boots normally but may show slower startup
  • In Phase 3, the PLC may enter Diagnostic mode or fall back to BOOT mode
  • In Phase 4, the CPU enters BOOT mode and the system LED shows a solid pattern
  • At this point the bootloader still accepts firmware via serial/TFTP, so the CPU itself is not bricked — only the CF card is dead

Detection: Monitor arlogsys.log for filesystem-related errors (error codes related to file I/O, bad sectors). If you see increasing filesystem errors over weeks/months, the CF card is approaching end of life. Replace it proactively — do not wait for complete failure.

Use CaseMinimum Size
Automation Runtime only (no user data)512 MB
Automation Runtime + typical application1 GB
Automation Runtime + application + user data + logs2 GB
Full installation with user partition4 GB

Always use B&R SLC CF cards for reliability:

  • 5CFCRD.0512-06 (512 MB)
  • 5CFCRD.1024-06 (1 GB)
  • 5CFCRD.2048-06 (2 GB)
  • 5CFCRD.4096-06 (4 GB)

15. How to Unbrick a CP1584 That Won’t Boot

Diagnosis Flowchart

Power on CPU
  |
  +-- No LEDs at all?
  |     --> Check power supply (24VDC), wiring, fuse.
  |
  +-- CF LED off?
  |     --> Re-seat CF card. Try a known-good CF card. 
  |     --> If still off, possible CF slot hardware failure.
  |
  +-- Stuck in BOOT mode (R/E red, RDY/F yellow)?
  |     --> CF card issue. Proceed to "CF Card Recovery" below.
  |
  +-- Stuck in SERVICE mode (R/E red)?
  |     --> Application issue. Connect via AS, check Logger.
  |
  +-- S/E red blinking with error code?
  |     --> Hardware error. May need CPU replacement.
  |
  +-- DC LED red?
        --> Battery empty. Replace CR2477N battery.

Step-by-Step Unbrick Procedure

Phase 1: Quick Checks

  1. Check all LED states and document them before doing anything.
  2. Full power cycle: Power off, wait 30 seconds, power on.
  3. Check backup battery: Replace if DC LED is red. Use only Renata CR2477N.
  4. Re-seat the CF card: Remove it, inspect for damage/corrosion, reinsert firmly.
  5. Try a known-good CF card: If you have a spare, try it.

Phase 2: CF Card Recovery

If the CF card is suspected corrupted:

Option A: Recreate from Automation Studio (Preferred)

  1. Remove the CF card and connect it to your PC via card reader.
  2. Back up the card if possible (RUC Create Image or file copy).
  3. In Windows Disk Management, delete all partitions and create a single FAT16 primary partition.
  4. Use Automation Studio Offline Installation to write the CF card.
  5. Reinsert into CPU, power on with switch in RUN.

Option B: Total CF Card Replacement

  1. Obtain a new B&R CF card.
  2. Connect to PC via card reader.
  3. Format as FAT16 primary partition (via Disk Management or diskpart).
  4. Use Automation Studio Offline Installation.
  5. Insert and power on.

Option C: Restore from Backup Image

  1. If you have a backup .img or zp files, use RUC Restore Image.
  2. Write to a new CF card.
  3. Insert and power on.

Phase 3: Network Recovery (No Valid CF Card)

If you cannot prepare a CF card:

  1. Set mode switch to BOOT.
  2. Connect Ethernet cable directly from CPU to your PC.
  3. Set your PC’s IP to the same expected subnet.
  4. Open Automation Studio > Online > Settings > Browse.
  5. Find the CPU in the list (it appears in BOOT mode).
  6. Right-click > Set IP parameters if needed.
  7. Perform Transfer Automation Runtime (Project > Services > Transfer Automation Runtime).
  8. After AR is transferred to the CF card, perform Total Transfer of your project.

Phase 4: Serial Recovery (No Network)

If Ethernet is unavailable:

  1. Connect RS-232 cable from PC to CPU IF1 terminal block.
  2. Configure terminal: 57600, 8, E, 1, no flow control.
  3. Set mode switch to BOOT.
  4. Power on.
  5. In Automation Studio, configure a serial connection to the CPU.
  6. Transfer Automation Runtime and project via serial.
  7. Serial transfers are slow but reliable.

Phase 5: Hardware Failure

If none of the above works:

  1. Module swap test: Remove the CPU and test it in a different X20 rack/slot with a known-good power supply and CF card.
  2. Check for bent pins or corrosion on the backplane connectors.
  3. If S/E LED shows a RAM or Hardware error code (see Section 4), the CPU may be defective.
  4. Contact B&R support for RMA/repair.

Special Case: APC Panels (Automation PC)

For B&R Automation PCs (APC3100, APC910, etc.) that use CFast instead of CF:

  1. Check BIOS settings: Ensure “Realtime Environment” is enabled, “Hypervisor Environment” is disabled.
  2. Update BIOS and MTCX to the latest versions.
  3. Disable “Quick Boot” and “Quiet Boot” in BIOS to see boot messages.
  4. CFast cards can be prepared the same way as CF cards via Offline Installation.
  5. If the screen shows BIOS-level messages about SATA mass storage, the CFast card or BIOS may be the issue.

16. How to Reload the Entire System from Scratch

This procedure assumes you want to start from a completely blank state.

Prerequisites

  • PC with Automation Studio installed
  • CF card reader
  • New or wiped CF card
  • Your project file (.apj)
  • Automation Runtime installer package (matching your project’s AR version)

Step-by-Step

1. Prepare the CF Card

diskpart
list disk
select disk X       (your CF card -- double-check!)
clean
create partition primary
format fs=fat16
assign
exit

2. Create the Installation Media

  1. Open Automation Studio with your project loaded.
  2. Project > Project Installation > Offline Installation.
  3. Target: The CF card drive.
  4. Options:
    • Install Automation Runtime: Yes
    • Create USER partition: Yes (if you need persistent user data)
    • Include user files: Point to any configuration files to pre-load
    • SYSTEM partition size: Leave default (minimum ~488 MB)
  5. Click Create/Install.
  6. Wait for completion.

3. Install in the CPU

  1. Power off the X20 system.
  2. Insert the prepared CF card into the CPU.
  3. Set mode switch to RUN.
  4. Power on.
  5. The CPU will:
    • Boot from the CF card
    • Perform initial installation (unpack transfer folder)
    • Reboot one or more times
    • Transition through PREOPERATIONAL to RUN
  6. Watch the LEDs:
    • R/E green blinking: Initializing (wait)
    • R/E green solid: Application running (success)
    • If stuck red/yellow: Something went wrong – check the CF card or use the Logger

4. Verify

  1. Connect via Automation Studio (Ethernet).
  2. Go to Online > Settings and verify the CPU appears and is in RUN mode.
  3. Check the Logger for any warnings or errors.
  4. Verify all I/O modules are detected and operating.
  5. Verify POWERLINK/Ethernet communication.

5. Configure Network (if needed)

If you need to change the IP address after installation:

  1. Open the project in Automation Studio.
  2. Navigate to the CPU’s Ethernet configuration.
  3. Set the desired IP address, subnet mask, and gateway.
  4. Enable SNMP for future diagnostics.
  5. Transfer the updated configuration (Project > Transfer > Configuration or Total).

17. Prevention and Best Practices

Backup Strategy

What to Back UpHowFrequency
Automation Studio projectVersion control (Git) or file copiesEvery change
CF card imageRUC Create Image or sector clone (.img)After every successful commissioning
User data filesCopy from USER partitionRegularly
Logger dataExtract RPSHD folder from CF cardAfter fault events
Hardware configurationScreenshot or export from ASAfter changes

CF Card Handling

  • Never remove the CF card while the CPU is powered on.
  • Use only B&R SLC CF cards (5CFCRD series) for industrial environments.
  • Store spare CF cards in anti-static packaging.
  • Replace CF cards every 3-5 years in harsh industrial environments (SLC cards have limited write cycles).

Battery Maintenance

  • Replace the backup battery (CR2477N) every 4 years or whenever the DC LED shows red.
  • Only use Renata CR2477N batteries. Other brands may present fire/explosion hazards.
  • Replace within 1 minute if power is off to prevent data loss.
  • The battery buffers: remanent variables, user RAM, system RAM, and the real-time clock.

Firmware and Software

  • Keep Automation Studio and PVI updated to the latest stable version.
  • Keep Automation Runtime at the version specified by your project.
  • Test firmware upgrades on a spare CPU before deploying to production.
  • Use B&R’s Update tool for firmware upgrades to ensure compatibility.

Power Quality

  • Ensure proper 24VDC power conditioning.
  • Verify power supply can handle the full load of the X20 system.
  • Use slow-blow fuses (max 10A) as specified.
  • Protect against power surges and voltage sags.

Network Configuration

  • Always enable SNMP in the project for diagnostics.
  • Document all IP addresses and network settings.
  • Keep a record of the CPU’s station address (hex switches).
  • Ensure your PC can reach the CPU’s default IP before making changes.

Key Findings

  • The CP1584 cannot be bricked by CF card damage alone — the embedded bootloader in internal flash always provides a minimal recovery environment (Boot AR) with Ethernet and RS-232 access, even with no CF card inserted.
  • Serial console defaults to 57600 baud, 8 data bits, even parity, 1 stop bit (8,E,1) on the IF1 RS-232 terminal block — this is your fallback path when Ethernet is unavailable, and the baud rate may have been changed from default by a prior configuration.
  • BOOT mode vs. SERVICE mode are fundamentally different — BOOT mode means Automation Runtime failed to load from the CF card (firmware/OS issue); SERVICE mode means AR loaded successfully but the user application crashed or was stopped (application issue). The diagnostic approach for each is completely different.
  • The operating mode switch (BOOT/RUN/DIAG) is the primary recovery control — set to BOOT, power cycle, and the CPU enters the minimal Boot AR runtime ready for firmware transfer via Ethernet or serial.
  • CF card corruption is the most common failure cause — always re-seat the card first, then try a known-good spare before escalating to firmware reflash or hardware replacement. The CF LED being off immediately indicates a physical detection problem.
  • Three recovery paths exist in priority order: (1) prepare a new CF card via Automation Studio Offline Installation, (2) network recovery via BOOT mode and Transfer Automation Runtime, (3) serial recovery at 57600 baud as last resort.
  • USB ports on X20 CPUs cannot be used for PC communication or serial console — they are USB 1.1 host ports restricted to B&R-approved devices only; the serial-to-USB approach requires the RS-232 terminal block, not USB.
  • Always image a CF card before any recovery attempt using Runtime Utility Center (Create Image) or sector-level dd — the original card may contain the only copy of the safety configuration and application parameters.

18. Cross-References

Related FileRelevance
cf-card-boot.mdDetailed CF card partition structure, file types, boot stages, and imaging procedures
firmware.mdB&R firmware architecture, memory layout, and firmware update mechanisms
firmware-version-mgmt.mdFirmware version inventory, compatibility matrices, and update procedures without OEM access
config-file-formats.mdConfiguration file formats found on the CF card that control boot behavior
access-recovery.mdPassword recovery and admin access restoration when credentials are lost
cp1584-hardware-ref.mdPhysical switch settings, LED indicators, and connector pinouts for bootloader recovery
ar-rtos.mdAutomation Runtime OS internals relevant to understanding boot failures
retentive-data.mdBattery-backed SRAM data preservation during recovery and cold restarts
ftp-web-interface.mdFTP-based CF card access for backup before recovery attempts

19. References

Official B&R Documentation

DocumentSource
X20 System User’s Manualbr-automation.com
X20CP148x Data SheetB&R Downloads
X20CP158x Data SheetB&R Downloads
PVI Development Setupbr-automation.com
Automation Runtime Downloadsbr-automation.com
B&R Community Forumcommunity.br-automation.com

Community and Third-Party References

ResourceURL
B&R Community - Service Mode Diagnosticscommunity.br-automation.com/t/service-mode
B&R Community - Boot Mode Troubleshootingcommunity.br-automation.com/t/boot-mode
B&R Community - Offline Installationcommunity.br-automation.com/t/offline-installation
B&R Community - CF Card from Mapp Backupcommunity.br-automation.com/t/creating-cf
Johnson Controls - X20 CPU LED Referencedocs.johnsoncontrols.com

Cross-References

Related DocumentRelevance
cf-card-boot.mdCF card file layout, partition structure, and boot sequence stages
firmware.mdFirmware architecture, AR components, and firmware update procedures
firmware-version-mgmt.mdFirmware version identification, downgrade paths, and compatibility
config-file-formats.mdConfiguration files that the bootloader reads (ARConfig.ini, etc.)
access-recovery.mdGaining access to BOOT mode when passwords are unknown
cp1584-hardware-ref.mdCP1584 hardware specs, mode switch, LED indicators, serial console pinout
first-60-minutes.mdEmergency recovery playbook for immediate response to boot failures
diagnostics-sdm.mdUsing SDM to diagnose boot-related issues before resorting to bootloader recovery
license-mgmt.mdLicense reactivation after firmware reload or CF card replacement
remanufacturing.mdMigration planning when bootloader recovery is insufficient

Revision History

DateDescription
2026-07-10Initial document – compiled from public sources and B&R documentation

Physical Layer Fieldbus Sniffing with Oscilloscopes and Logic Analyzers

A practical guide to probing, diagnosing, and debugging the physical layers of industrial fieldbus systems — X2X, CAN bus, and Ethernet POWERLINK — at the wire level.


Table of Contents

  1. Probing X2X at the Physical Wire Level (RS-485 Differential Signaling)
  2. CAN Bus Physical Layer Probing (CAN-H, CAN-L)
  3. Ethernet POWERLINK Physical Layer (MII/RMII, Link Status)
  4. Signal Patterns That Indicate Cable/Connector/Termination Problems
  5. RS-485 Signal Integrity: Common-Mode Voltage, Differential Voltage
  6. CAN Bus Signal Analysis: Recessive/Dominant States, Bit Timing
  7. Ethernet Signal Quality: Eye Diagrams, Jitter
  8. Common Physical Layer Faults Causing Intermittent Sensor Failures
  9. Recommended Equipment: Oscilloscopes, Logic Analyzers, Protocol Analyzers
  10. Probe Techniques: Differential Probes, Current Probes, Near-Field Probes
  11. Termination and Biasing Verification
  12. EMC Testing at the Physical Layer
  13. Ground Loops and Their Effect on Signal Integrity

1. Probing X2X at the Physical Wire Level (RS-485 Differential Signaling)

X2X Protocol Overview

B&R Automation’s X2X is a proprietary serial backplane and extension bus used primarily for communication between X20/X67 I/O modules and B&R controllers. The physical layer of X2X is based on RS-485 differential signaling over twisted-pair copper cabling. Understanding this foundation is essential for any physical-layer investigation.

X2X operates as a multi-master serial line bus. In backplane configurations it rides on the PCB traces connecting I/O slices; in field extensions it runs over external RS-485 cable through interface modules such as the X20IF1030 (which includes an integrated terminating resistor for RS-485/RS422). The bus is half-duplex: at any moment one node transmits while all others listen.

RS-485 Differential Signaling Fundamentals

RS-485 uses a balanced differential driver (H-bridge topology) to drive complementary voltages onto two wires, labeled A and B:

  • Logic 1 (Mark): Line A is higher than line B by +1.5 V to +5 V. Example: A = 3.0 V, B = 1.0 V, differential = +2.0 V.
  • Logic 0 (Space): Line A is lower than line B by -1.5 V to -5 V. Example: A = 1.0 V, B = 3.0 V, differential = -2.0 V.

The absolute voltage on each wire varies, but the difference (V_A - V_B) is what the receiver decodes. The common-mode offset (the average of both lines with respect to ground) typically sits near V_CC/2 and can legally range from -7 V to +12 V per the EIA-485 standard, accommodating ground-potential differences between nodes.

Probing the X2X Bus

Method 1 — Two-Channel Single-Ended Probing:

Connect oscilloscope Channel 1 to line A and Channel 2 to line B, with both probe ground clips connected to the circuit ground reference of the device under test. Use the oscilloscope’s math function (Ch1 - Ch2) to display the true differential waveform. This is the most accessible approach but is only safe when the oscilloscope ground and the circuit ground are at the same potential.

Method 2 — Differential Probe:

Connect a differential probe directly across the A and B lines. The differential probe rejects common-mode voltage and provides a clean view of the differential signal without requiring a local ground reference. This is the preferred method when ground-potential differences exist between nodes — a common situation in industrial installations with distributed power supplies.

Method 3 — Protocol Decode:

Many modern oscilloscopes (Keysight, Tektronix, Rohde & Schwarz, Pico Technology) include built-in RS-485/UART decoders. Configure the decode to trigger on the start bit, set the baud rate, and overlay decoded hex data on the analog waveform. This allows you to correlate physical anomalies (ringing, reflections, amplitude droop) with the actual data being transmitted.

Practical Probing Checklist for X2X

StepAction
1Identify the X2X bus wires (A/B twisted pair) on the backplane or cable connector
2Verify power is applied and the bus is active (traffic present)
3Attach differential probe across A and B at a convenient tap point
4Set oscilloscope timebase to display 2–4 complete characters at the operating baud rate
5Verify differential amplitude is ≥ 1.5 V (minimum per EIA-485 under 54 Ω load)
6Check common-mode voltage is within -7 V to +12 V range
7Enable RS-485 protocol decode if available
8Look for ringing, reflections, overshoot, or amplitude sag on edges

X2X-Specific Considerations

  • Backplane probing requires fine-pitch probe tips or micro-hooks to contact the RS-485 traces between I/O module slots without shorting adjacent pins.
  • External X2X cables may be accessed via RJ-45 or proprietary B&R connectors; check pinout documentation for A/B pair assignment.
  • Termination resistors on B&R interface modules (e.g., X20IF1030) are often integrated and switchable. Verify the correct termination state for the bus length and configuration.

2. CAN Bus Physical Layer Probing (CAN-H, CAN-L)

CAN Physical Layer Overview

CAN (Controller Area Network) uses a two-wire half-duplex bus with lines CAN-High and CAN-Low. Unlike RS-485, CAN is a non-return-to-zero (NRZ) bitwise arbitration protocol where the physical state directly encodes bus access priority.

Voltage Levels

StateCAN-HCAN-LDifferential
Recessive (Logic 1)~2.5 V~2.5 V~0 V
Dominant (Logic 0)~3.5 V~1.5 V~2.0 V

During idle periods, both lines sit at the common-mode bias voltage (~2.5 V). When any node drives a dominant bit, CAN-H is pulled high and CAN-L is pulled low simultaneously. The dominant state always overwrites the recessive state, which is the foundation of CAN’s bitwise arbitration.

Oscilloscope Probing Procedure

  1. Connect Ch1 to CAN-H and Ch2 to CAN-L at a convenient access point (OBD-II connector, branch connector, or directly at a node’s transceiver pins).
  2. Reference both probe grounds to the local circuit ground of the node you are probing. If probing across nodes with different ground potentials, use a differential probe or a battery-powered portable oscilloscope to avoid ground loops.
  3. Set timebase to show several complete bit periods. For a 500 kbps CAN bus, one bit = 2 µs; set timebase to ~10 µs/div to see 5–10 bits.
  4. Trigger on CAN-H falling edge (dominant-to-recessive transition) or use the oscilloscope’s built-in CAN trigger/decode.
  5. Verify voltage levels: CAN-H should swing between ~2.5 V and ~3.5 V; CAN-L between ~2.5 V and ~1.5 V.

CAN Protocol Decoding on Oscilloscopes

Most modern oscilloscopes support CAN and CAN FD decoding:

  • Trigger on specific CAN ID to capture only messages of interest.
  • Decode the arbitration field, control field, data field, and CRC in real time on the waveform.
  • Search for error frames (dominant bits for 6+ consecutive bit times) to identify bus errors.
  • Measure bus load by analyzing the ratio of dominant-to-recessive time.

CAN Bus Diagnostic Measurements with a Multimeter

Before connecting an oscilloscope, perform these quick multimeter checks:

  1. Termination resistance: With bus powered off, measure resistance between CAN-H and CAN-L. A correctly terminated bus reads ~60 Ω (two 120 Ω termination resistors in parallel). If the reading is ~120 Ω, one termination is missing; if ~40 Ω, there may be an extra terminator.
  2. CAN-H to ground: With only one node powered on the bus, measure CAN-H to ground. Expect 2.5–3.0 V.
  3. CAN-L to ground: With only one node powered on, measure CAN-L to ground. Expect 2.0–2.5 V.
  4. Transceiver health: With device disconnected and powered off, measure CAN-H and CAN-L to ground. Both should read megaohms (open). A low resistance indicates a damaged transceiver (common after lightning or surge events).

CAN FD Considerations

CAN FD (Flexible Data-rate) supports two different bit rates within a single frame: a slower arbitration phase and a faster data phase (up to 8 Mbps). When probing CAN FD, the oscilloscope must have sufficient bandwidth (>40 MHz) and deep memory to capture the fast data phase while also showing the slower arbitration phase. Some oscilloscopes offer automatic CAN FD phase detection.


Ethernet POWERLINK is a real-time Ethernet protocol, originally developed by B&R and now managed by the EPSG (Ethernet POWERLINK Standardisation Group). It runs on standard IEEE 802.3 Ethernet hardware but adds a time-slot-based scheduling layer on top for deterministic communication.

The physical layer stack for POWERLINK typically follows:

Application Layer (POWERLINK protocol)
        |
Data Link Layer (Ethernet MAC)
        |
MAC-PHY Interface (MII or RMII)
        |
PHY Transceiver (100BASE-TX)
        |
Magnetics + RJ-45 Connector
        |
Cat5e/Cat6 Twisted Pair Cable

MII vs. RMII MAC-PHY Interface

The Media Independent Interface (MII) and Reduced MII (RMII) are the digital interfaces between the Ethernet MAC (in the MCU/FPGA) and the PHY transceiver:

ParameterMIIRMII
Data width4 bits (TXD[3:0], RXD[3:0])2 bits (TXD[1:0], RXD[1:0])
Clock25 MHz (independent TX/RX clocks)50 MHz (single reference clock)
Signal count~18 signals~9 signals
Pins on PHYTX_CLK, RX_CLK, TX_EN, TXD[3:0], RX_DV, RXD[3:0], COL, CRS, MDC, MDIOREF_CLK, TX_EN, TXD[1:0], RX_DV, RXD[1:0], CRS_DV, MDC, MDIO

Probing the MII/RMII Interface

These signals are internal to the PCB and typically not accessible without a test point or flying lead connection:

  1. Clock signals (TX_CLK / REF_CLK): Verify frequency (25 MHz for MII, 50 MHz for RMII) with minimal jitter. Clock quality is critical — jitter here translates directly to jitter on the transmitted Ethernet signal.
  2. TX data (TXD) and TX enable (TX_EN): Capture transmitted data bursts. The MAC asserts TX_EN and drives TXD synchronous to the clock.
  3. RX data (RXD) and RX valid (RX_DV): Capture received data. On RMII, CRS_DV combines carrier sense and data valid.
  4. MDIO/MDC: The management interface for configuring the PHY register space. Use a logic analyzer with MDIO decode to read/write PHY registers (including link status, speed, and duplex settings).

Probing the 100BASE-TX Physical Layer

At the RJ-45 connector, 100BASE-TX uses MLT-3 encoding over two pairs (TX+/TX- and RX+/RX-). The differential signal swings ±1 V nominal with a symbol rate of 125 Mbaud. Probing at this level requires:

  • Differential probe with ≥200 MHz bandwidth for 100 Mbps Ethernet.
  • Oscilloscope with ≥500 MHz bandwidth for accurate edge reproduction (5x rule).
  • Access through a TAP or directional coupler to avoid disrupting the active link.

PHY link status is typically reported via:

  • MDIO register 1 (Basic Status Register): Bit 2 = link status. Read with a logic analyzer monitoring MDIO transactions, or use PHY vendor diagnostic software.
  • LED indicators on the RJ-45 jack or PCB: Green = link, Amber = activity (exact meanings vary by PHY vendor).
  • Oscilloscope probing of the auto-negotiation fast link pulses (FLP): During link establishment, the PHY sends FLP bursts. Capturing these confirms the PHY is attempting to establish a link.
  • PHY-MAC clock domain issues: RMII’s 50 MHz reference clock must meet tight jitter specifications (<0.5 ns period jitter). A noisy clock causes intermittent CRC errors.
  • Magnetics saturation or damage: Ethernet magnetics (transformers in the RJ-45 module) can be damaged by surge events, causing asymmetric transmit waveforms and high bit-error rates.
  • Cable length and quality: POWERLINK over 100BASE-TX is limited to 100 m of Cat5e cable. Exceeding this or using degraded cable causes signal attenuation that manifests as FCS errors and lost packets.

4. Signal Patterns That Indicate Cable/Connector/Termination Problems

When probing a fieldbus with an oscilloscope, specific waveform signatures indicate specific physical-layer faults. Learning to recognize these patterns dramatically accelerates troubleshooting.

Reflections (Impedance Mismatch)

Appearance: Ringing or “ghost” transitions that follow the intended edge after a short delay. Multiple reflections may appear as a damped oscillation.

Cause: Missing, incorrect, or damaged termination resistors; incorrect cable impedance; stubs from T-connectors or long device taps.

Severity: At low data rates, reflections decay before the sample point and may be benign. At high data rates (where the bit time is comparable to the cable round-trip time), reflections interfere with subsequent bits, causing errors.

On RS-485: Visible on the differential waveform as damped oscillations on rising and falling edges. The reflection amplitude relative to the signal amplitude determines severity.

On CAN bus: Reflections cause the dominant/recessive edges to ring, potentially causing false dominant detections or corrupting the sample point.

Amplitude Attenuation / Sagging

Appearance: The differential voltage is below the specified minimum (e.g., <1.5 V for RS-485) or droops during a long run of identical bits.

Cause: Cable resistance over long runs; too many nodes loading the bus; damaged or corroded connections adding resistance; incorrect wire gauge.

On RS-485: The standard requires ≥1.5 V differential output across a 54 Ω load. If the measured differential voltage is below this threshold, receivers may not correctly decode data.

On CAN bus: A weak dominant level may be overwritten by noise, causing bit errors. The dominant differential should be ≥1.5 V per ISO 11898-2.

Edge Speed Abnormalities

Slow edges: Excessive rise/fall time caused by cable capacitance (too many stubs or long cables), damaged transceivers with degraded drive strength, or incorrect probe compensation.

Fast edges with overshoot: Excessively fast edges (relative to the data rate) cause EMI radiation and can indicate a missing slew-rate limiter or a transceiver operating beyond its specified data rate. Some RS-485 transceivers include adjustable slew rate for this reason.

Asymmetric Waveforms

Appearance: The positive differential level has a significantly different amplitude than the negative differential level, or rise time differs substantially from fall time.

Cause: Mismatched H-bridge output transistors in the transceiver; damaged transceiver output stage; one side of the twisted pair has higher series resistance (corroded contact, damaged wire).

On RS-485: The standard requires that the difference in |V_OD| between positive and negative output states be less than 200 mV. Large imbalances increase common-mode noise and radiated EMI.

Intermittent Dropouts

Appearance: Periodic or random complete loss of signal; the bus falls to the recessive/idle state unexpectedly.

Cause: Loose connectors; intermittent shorts due to vibration or flexing; failing transceiver thermal shutdown; power supply brownout to the transceiver.

Common-Mode Excursions

Appearance: The average voltage of both lines (relative to ground) drifts outside the specified range or follows a low-frequency oscillation.

Cause: Ground loops between nodes; heavy machinery switching injecting common-mode transients; cable shield carrying ground currents; missing or incorrect grounding.

Noise Patterns

Continuous high-frequency noise: EMI coupling from nearby power electronics, motor drives, or variable-frequency drives. Often correlated with machinery operation cycles.

Periodic noise bursts: Correlate with specific equipment (relay switching, contactor closure, welder firing). Use the oscilloscope’s persistence or infinite-persistence mode to capture infrequent transients.

Random single-event transients: ESD events, lightning-induced surges, or switching power supply noise. Capture with peak-detect acquisition mode and a long timebase.


5. RS-485 Signal Integrity: Common-Mode Voltage, Differential Voltage

Differential Voltage (V_OD)

The differential output voltage (V_OD) is the parameter that RS-485 receivers actually decode. Per the EIA-485 standard:

  • Minimum V_OD under load: ≥ 1.5 V across a 54 Ω differential load (which represents the parallel combination of two 120 Ω termination resistors = 60 Ω, approximately).
  • Typical V_OD: 2.0 V to 3.5 V in well-designed systems.
  • Maximum V_OD: 5.0 V (some transceivers produce up to 6 V unloaded).

Measurement technique: Use a differential probe across the A and B lines, or compute Ch1 - Ch2 from two single-ended channels. Measure peak-to-peak differential voltage during active transmission.

Common fault signatures:

Measured V_ODLikely Cause
< 1.0 VExcessive cable length, too many nodes, corroded connections, or failing transceiver
1.0–1.5 VMarginal — may work at low data rates but fail at higher speeds
1.5–5.0 VNormal operating range
> 5.0 VCheck for unloaded bus or non-standard transceiver

Common-Mode Voltage (V_CM)

The common-mode voltage is the average of the A and B line voltages with respect to local ground:

V_CM = (V_A + V_B) / 2

The EIA-485 standard specifies a common-mode input range of -7 V to +12 V for standard transceivers. Extended-range transceivers (e.g., Analog Devices ADM3095E) support up to ±25 V.

Why common-mode matters:

  • RS-485 receivers contain internal resistor-divider attenuators that bias the bus voltage toward V_CC/2. If the common-mode voltage exceeds the receiver’s input range, the attenuator cannot properly bias the comparator, and the receiver saturates — producing incorrect output regardless of the differential signal.
  • Common-mode voltage that exceeds ±7 V may cause permanent damage to unprotected transceivers.
  • Even within the specified range, large common-mode swings increase the error in the received differential voltage due to finite common-mode rejection ratio (CMRR) of the receiver.

Measurement technique: Measure V_A and V_B individually with respect to ground using two single-ended channels, then compute the math function (Ch1 + Ch2) / 2. Alternatively, set the oscilloscope to average mode.

The “silent killer” of RS-485 networks: Common-mode voltage excursions are the most common cause of mysterious RS-485 failures in industrial environments. They are often invisible to logic analyzers (which only see decoded bits) and can only be observed with an oscilloscope measuring the analog waveform.

Receiver Input Thresholds

The RS-485 receiver decodes the bus state based on the differential input voltage:

  • V_ID ≥ +200 mV → Output = HIGH (Logic 1, Mark)
  • V_ID ≤ -200 mV → Output = LOW (Logic 0, Space)
  • -200 mV < V_ID < +200 mVIndeterminate region — no defined output

This 400 mV indeterminate band is the noise margin. A well-designed system ensures that the differential signal at the receiver is well outside this zone (typically >1 V) even under worst-case conditions of cable attenuation, noise, and common-mode voltage.

Fail-Safe Biasing

When no node is actively driving the bus (all transceivers in high-impedance state), the termination resistors pull the differential voltage to 0 V — squarely in the indeterminate region. Two solutions:

  1. Internal fail-safe receivers: Transceivers with built-in bias current (e.g., TI THVD14xx family) that shifts the input threshold so that 0 V differential produces a known HIGH output. No external components needed, but every node on the network must have this feature.

  2. External bias resistors: A pull-up resistor from A to V_CC and a pull-down resistor from B to GND (typically ~645 Ω each for a 5 V system). This creates a known idle-state differential voltage of ~200 mV. Drawback: these resistors add common-mode load equivalent to approximately 18.6 unit loads, reducing the maximum number of nodes on the bus.


6. CAN Bus Signal Analysis: Recessive/Dominant States, Bit Timing

CAN Physical State Analysis

The CAN bus has only two physical states:

Recessive state (Logic 1):

  • CAN-H = CAN-L = ~2.5 V
  • Differential voltage ≈ 0 V
  • Driven by the network’s termination bias (internal or external)
  • The bus naturally returns to recessive through the termination resistors

Dominant state (Logic 0):

  • CAN-H ≈ 3.5 V, CAN-L ≈ 1.5 V
  • Differential voltage ≈ 2.0 V
  • Actively driven by one or more CAN transceivers
  • Any node can pull the bus dominant, overriding recessive

Oscilloscope Waveform Analysis

A healthy CAN bus waveform on an oscilloscope shows:

  • Clean transitions: Sharp edges with minimal ringing, settling within 10–20% of the nominal transition time.
  • Symmetrical voltage levels: CAN-H recessive ≈ CAN-L recessive (both at 2.5 V); dominant CAN-H peak - 3.5 V ≈ 2.5 V - dominant CAN-L trough ≈ 1.5 V.
  • Stable recessive baseline: During idle periods, both lines should sit quietly at 2.5 V with minimal noise (<100 mV p-p).
  • Consistent dominant levels: The dominant differential should remain above 1.5 V across the entire bus and all nodes.

Bit Timing and Sample Point

CAN bit timing is controlled by a programmable bit timing controller in each node. A single bit time is divided into time quanta (tq):

|<-------------- 1 Bit Time --------------->|
|--Sync--|--Prop Seg--|--Phase Seg 1--|--Phase Seg 2--|
         (PROG_SEG)   (PHASE_SEG1)   (PHASE_SEG2)
         [Sample Point]         [Transmit Point]
  • SYNC_SEG: 1 tq — synchronizes to the falling edge of the incoming bit
  • PROP_SEG: Programmed length — compensates for bus propagation delay
  • PHASE_SEG1: Programmable — used for resynchronization
  • PHASE_SEG2: Programmable — the sample point falls between PHASE_SEG1 and PHASE_SEG2

The sample point is where the receiver decides whether the bit is dominant or recessive. It is typically set at 75–87.5% of the bit time. If the signal has not settled by the sample point (due to reflections, slow edges, or noise), a wrong decision is made.

Timing Measurement with Oscilloscope

  1. Measure bit width: Should match the configured baud rate. At 500 kbps, one bit = 2.000 µs. Measure across several bits and average for accuracy.
  2. Measure bit timing error: Compare the measured bit width to the expected value. A deviation >2% may cause synchronization errors.
  3. Edge jitter: Measure the variation in edge positions relative to the ideal timing. CAN is resilient to small amounts of jitter (corrected by the resynchronization mechanism), but large jitter (>15% of a time quantum) causes errors.

CAN Error Frame Detection

An error frame on CAN appears as a sequence of 6 or more consecutive dominant bits — a violation of the normal bit-stuffing rule (which requires a complementary bit after 5 consecutive identical bits). On an oscilloscope, this looks like an extended period where CAN-H stays high and CAN-L stays low.

Common CAN error types visible on the oscilloscope:

  • Bit errors: The monitored bit value differs from what was transmitted.
  • Stuff errors: Expected stuff bit not found after 5 consecutive identical bits.
  • CRC errors: Calculated CRC does not match the received CRC in the frame.
  • Acknowledgment errors: No dominant bit received in the ACK slot (indicating no other node on the bus acknowledged the message).

CAN Bus Loading Analysis

Measure bus load by triggering on the CAN-H falling edge and using the oscilloscope’s histogram or measurement statistics:

  • Bus load < 30%: Normal, plenty of margin.
  • Bus load 30–70%: Increasing susceptibility to timing errors and message latency.
  • Bus load > 70%: Critical — message queues overflow, timing margins are exhausted, error frames become frequent.

7. Ethernet Signal Quality: Eye Diagrams, Jitter

Eye Diagrams

An eye diagram is the fundamental tool for evaluating Ethernet (and all high-speed serial link) physical layer signal quality. It is created by overlaying many unit intervals (UI) of the signal, typically triggered by a clock recovery circuit or the transmitted data clock.

How to generate an eye diagram:

  1. Connect the oscilloscope (≥500 MHz bandwidth for 100BASE-TX; ≥2.5 GHz for Gigabit Ethernet) with a differential probe to the TX+/TX- or RX+/RX- pair at the PHY output or RJ-45 test jack.
  2. Enable the oscilloscope’s eye diagram mode or use a clock-recovery trigger.
  3. Accumulate many thousands of transitions to build up the statistical overlay.

Reading the eye diagram:

        _____
       /     \          <- Eye opening (vertical)
      /  OPEN  \         (amplitude margin)
     /  CLEAR   \        <- Width indicates timing margin
    /     area    \
   |   +--------   |     <- Zero-crossing point
   |  /          \ |
   +_/____________\_+
        ^     ^
    Rise   Fall
    time   time

Key parameters:

ParameterGoodBad
Eye heightTall (large vertical opening)Collapsed (noise, attenuation)
Eye widthWide (large timing margin)Narrow (excessive jitter)
Zero-crossing widthNarrow jitter bandWide scatter (deterministic jitter)
Mask complianceNo mask violationsViolations at corners or crossings

Eye diagram mask testing: IEEE 802.3 defines mask templates for each Ethernet physical layer (10BASE-T, 100BASE-TX, 1000BASE-T). The oscilloscope overlays the template on the accumulated eye diagram; any sample points falling within the mask region indicate a compliance failure.

Jitter Analysis

Jitter is the deviation of signal edges from their ideal timing positions. For Ethernet, jitter analysis distinguishes several components:

  • Total Jitter (TJ): The peak-to-peak timing deviation of all edges. Includes all components.
  • Random Jitter (RJ): Unbounded, Gaussian-distributed timing noise from thermal effects, shot noise, and other stochastic sources. Characterized by the RMS value and grows with sqrt of the measurement bandwidth.
  • Deterministic Jitter (DJ): Bounded jitter with specific causes:
    • Inter-Symbol Interference (ISI): Pattern-dependent timing shifts caused by frequency-dependent attenuation and reflections.
    • Periodic Jitter (PJ): Correlated with a periodic source (clock crosstalk, switching power supply ripple).
    • Duty-Cycle Distortion (DCD): Unequal rise and fall times causing a systematic timing offset.

Measurement techniques:

  1. Time Interval Error (TIE) histogram: Plot the distribution of edge timing deviations from the ideal clock position. A Gaussian shape indicates random jitter; distinct peaks indicate deterministic jitter components.
  2. Jitter decomposition: Use the oscilloscope’s jitter analysis software (e.g., Tektronix DPOJET, Teledyne LeCroy SDA II) to separate RJ and DJ mathematically.
  3. Jitter trend: Plot jitter values over time to identify thermal drift, intermittent coupling events, or vibration-induced jitter.

100BASE-TX Physical Layer Testing

For 100BASE-TX (the physical layer used by most Ethernet POWERLINK installations):

  • MLT-3 encoding: Three-level signaling (+V, 0, -V). The eye diagram has three levels with four transition regions.
  • Link pulse verification: Verify the idle link pulses (NLP) and auto-negotiation fast link pulses (FLP) are present and correctly formatted.
  • Signal amplitude: Differential peak-to-peak should be ≥1.0 V at the transmitter output; ≥200 mV at the receiver input (after cable attenuation).
  • Overshoot: Should be <10% of signal amplitude per IEEE 802.3.
  • Rise/fall time: 1–5 ns for 100BASE-TX per IEEE 802.3 specification.

MII/RMII Signal Quality at the MAC-PHY Boundary

While MII and RMII signals are internal digital signals (not differential), their quality directly impacts the transmitted Ethernet signal:

  • Clock quality (TX_CLK / REF_CLK): Period jitter should be <500 ps for RMII, <1 ns for MII. Use the oscilloscope’s jitter measurement on the clock signal.
  • Setup/hold time verification: Measure the timing relationship between data signals and the clock to verify they meet the MAC and PHY timing specifications. This requires a logic analyzer or an MSO (Mixed Signal Oscilloscope) with high-timing-resolution digital channels.
  • Crosstalk between MII/RMII signals: Route length mismatches and tight parallel routing can cause crosstalk. Probe multiple signals simultaneously and look for correlated glitches.

8. Common Physical Layer Faults Causing Intermittent Sensor Failures

Fault Category 1: Cable Degradation

Symptoms: Sensor readings intermittently drop out or return invalid values, especially during temperature changes, vibration, or after cable flexing.

Root causes:

  • Conductor breakage: Especially in continuously flexing cables (drag chains, robot arms). The copper conductor develops micro-cracks that only separate under specific bend angles or thermal expansion.
  • Insulation degradation: Heat, UV exposure, chemical exposure, or mechanical abrasion degrades insulation, causing increased capacitance between conductors and leakage currents.
  • Water ingress: Moisture in cable jackets changes the dielectric properties, increases attenuation, and can cause intermittent shorts between conductors.

Detection: Oscilloscope capture during mechanical stress (wiggle test, bend test). Look for sudden amplitude drops, noise bursts, or complete signal loss correlated with cable movement.

Fault Category 2: Connector Problems

Symptoms: Communication failures that appear and disappear; failures correlated with vibration, thermal cycling, or connector mating/unmating cycles.

Root causes:

  • Contact oxidation: Tin-plated contacts oxidize over time, increasing contact resistance. Gold-plated contacts resist oxidation but can suffer from fretting corrosion under vibration.
  • Contact fretting: Micro-motion between mated contacts (caused by vibration or thermal cycling) wears away the contact plating and exposes the base metal, which oxidizes rapidly.
  • Insertion force loss: After many mating cycles, the spring force in female contacts decreases, reducing contact pressure and increasing resistance.
  • Backshell/cable strain relief failure: Mechanical stress transfers to the solder joints or crimp connections inside the connector, causing intermittent opens.

Detection: Probe on both sides of the connector simultaneously (one probe before, one after) and compare waveforms. Intermittent amplitude drops or noise on the downstream side indicate a connector issue.

Fault Category 3: Termination Problems

Symptoms: Communication works with few nodes but fails as devices are added; errors increase at higher baud rates; sporadic CRC errors or retransmissions.

Root causes:

  • Missing termination: One or both ends of the bus lack the required termination resistor (120 Ω for both RS-485 and CAN). This causes reflections that become more severe as data rate increases or cable length increases.
  • Incorrect termination value: Using 150 Ω resistors with 120 Ω cable, or vice versa. The mismatch causes partial reflections.
  • Dual termination at one end: Two devices at the same end of the bus both have termination enabled, producing an incorrect total termination (e.g., 60 Ω instead of 120 Ω).
  • Termination resistor failure: The resistor itself has drifted in value or opened due to overheating or surge damage.

Detection: Measure bus resistance with power off. RS-485 or CAN bus should read ~60 Ω between the differential pair (two 120 Ω terminators in parallel). Deviations indicate a termination fault.

Fault Category 4: Grounding and Shielding Issues

Symptoms: Errors that correlate with specific equipment operation (motors starting, heaters cycling, welders firing); errors that change with cable routing; different behavior when devices are powered from different circuits.

Root causes:

  • Ground loops: Different ground potentials between nodes cause common-mode currents to flow through the cable shield and signal reference, corrupting the differential signal.
  • Improper shield grounding: Shield grounded at both ends creates a ground loop; shield grounded at neither end provides no EMI protection.
  • Missing signal reference: RS-485 relies on a common ground reference between nodes (often a third wire in Modbus installations). Without it, ground-potential differences between nodes can exceed the receiver’s common-mode range.

Detection: Measure common-mode voltage on the bus with respect to local ground at each node. Large variations (>1 V) between nodes indicate ground potential differences that may cause intermittent failures.

Fault Category 5: Transceiver Degradation

Symptoms: A specific node or I/O module consistently causes bus errors when transmitting; errors worsen with temperature; device works when cold but fails after warm-up.

Root causes:

  • Thermal degradation: Semiconductor aging causes increased leakage current, reduced output drive strength, and degraded noise immunity.
  • ESD/surge damage: Prior transient events may have weakened (but not destroyed) the transceiver’s ESD protection structures, reducing noise immunity.
  • Supply voltage sag: A failing power supply or decoupling capacitor in the transceiver’s local power domain causes the output drive to weaken momentarily.

Detection: Compare the signal quality of a suspect node to a known-good node transmitting on the same bus. Reduced differential amplitude, increased edge jitter, or asymmetric waveform on the suspect node indicates transceiver degradation.

Fault Category 6: Electromagnetic Interference

Symptoms: Communication failures only during specific machinery operation; failures that follow a daily or shift-based pattern; seasonal failures (e.g., worse in winter when air is dry and ESD is more likely).

Root causes:

  • Radiated EMI: Motor drives, VFDs, welders, and other high-dI/dt sources radiate electromagnetic fields that couple into fieldbus cables acting as unintended antennas.
  • Conducted EMI: Noise on the power supply rails couples into transceiver circuits through inadequate decoupling.
  • Crosstalk: Fieldbus cables routed parallel to power cables pick up induced noise.

Detection: Use near-field probes (see Section 10) to identify radiation sources. Use the oscilloscope’s FFT or spectrum analyzer mode to identify the frequency of interfering signals. Correlate with machinery operation using external trigger inputs.


Oscilloscopes

The oscilloscope is the primary tool for physical-layer fieldbus analysis. Key specifications:

SpecificationRS-485/X2XCAN Bus100BASE-TXGbE
Minimum bandwidth100 MHz200 MHz500 MHz2.5 GHz
Minimum channels22+ (4 preferred)2+4
Sample rate500 MSa/s1 GSa/s2 GSa/s10 GSa/s
Memory depth10k+ points10M+ points10M+ points100M+ points
Decode supportRS-485/UARTCAN/CAN FDEthernetEthernet

Recommended oscilloscopes by tier:

  • Entry-level ($500–$2,000): Rigol DS1054Z (4-ch, 100 MHz, upgradeable), Siglent SDS1104X-E (4-ch, 100 MHz, WiFi). Sufficient for RS-485 and basic CAN analysis. Limited decode capabilities.
  • Mid-range ($2,000–$8,000): Keysight InfiniiVision 3000T (4-ch, up to 1 GHz, built-in serial decode), Tektronix MDO3000 series (mixed-signal with 16 logic channels), Rigol MSO5000 (4 analog + 16 digital). Full CAN/RS-485 decode, basic eye diagram, and jitter analysis.
  • Professional ($8,000–$25,000): Tektronix MDO4000C/5000B (4-6 analog + up to 64 digital), Keysight InfiniiVision 6000 X-Series, Rohde & Schwarz RTH1000 (ruggedized, handheld for field use). Full serial decode, eye diagrams, jitter analysis, spectrum analysis, near-field probe support.
  • High-end ($25,000+): Teledyne LeCroy WaveRunner 8000HD/9000HD (12-bit resolution), Tektronix DPO70000SX (real-time), Keysight UXR-Series (110 GHz). For Gigabit Ethernet and beyond, with advanced jitter decomposition and compliance testing.

For Ethernet POWERLINK specifically: A mid-range 4-channel scope with ≥500 MHz bandwidth and Ethernet/CAN/RS-485 decode is the minimum practical tool. An MSO (Mixed Signal Oscilloscope) with 16+ digital channels is ideal for simultaneously probing the MII/RMII signals and the PHY output.

Logic Analyzers

Logic analyzers capture digital states (high/low) across many channels simultaneously with deep memory. They excel at protocol-level analysis but provide no analog signal quality information.

FeatureLogic AnalyzerOscilloscope
Channel count8–136+2–8
Signal typeDigital onlyAnalog + Digital (MSO)
Memory depthVery deep (Gigabits)Limited (Megapoints)
TimebaseDiscrete clock/sampleContinuous analog capture
Analog detailNoneFull waveform
Protocol decodeExtensiveVaries

Recommended logic analyzers:

  • Entry-level ($15–$300): Saleae Logic (8-ch or 16-ch), DreamSourceLab DSLogic (16-ch), clones (sigrok-compatible). Ideal for protocol decode of RS-485 traffic, MDIO/MDC management interface analysis, and MII/RMII timing verification.
  • Mid-range ($500–$3,000): Saleae Logic Pro (8-ch at 500 MSa/s, 16-ch at 250 MSa/s), Keysight U1620A/U1670A (handheld). Good for long captures of high-speed serial data.
  • Professional ($3,000+): Keysight 16800 Series, Teledyne LeCroy Studio. Deep memory, advanced protocol analysis, multi-bus triggering.

Best practice: Use a logic analyzer and oscilloscope together. The logic analyzer captures long protocol traces (identifying what went wrong), while the oscilloscope captures the analog waveform detail (identifying why it went wrong).

Protocol Analyzers

Dedicated protocol analyzers are specialized instruments that provide deep protocol-level analysis for specific fieldbus types:

  • CAN bus analyzers: Peak System PCAN-USB, Vector CANalyzer, Kvaser CAN interfaces. These connect via USB to a PC and provide real-time CAN/CAN FD message monitoring, transmission, filtering, and logging. Some handheld units (e.g., Peak PCAN-Diag FD) also include physical-layer diagnostics: termination resistance measurement, voltage measurement, and an integrated two-channel oscilloscope.
  • Ethernet analyzers: Wireshark (software) with a dedicated tap; specialized industrial Ethernet analyzers that decode POWERLINK, EtherNet/IP, PROFINET, and other industrial protocols.
  • RS-485/Modbus analyzers: Dedicated RS-485 protocol analyzers that decode Modbus RTU/TCP, Profibus DP, and other RS-485-based protocols.
  • All-in-one handheld: Tools like the Peak PCAN-Diag 2 combine CAN physical-layer measurements (voltage, resistance, oscilloscope) with protocol-level analysis (message decode, bus load, error frame detection) in a single portable unit.

Equipment Selection Guide by Task

TaskPrimary ToolSupporting Tool
Verify RS-485 signal levels and qualityOscilloscope with diff probeLogic analyzer for protocol decode
Analyze CAN bus errorsCAN protocol analyzerOscilloscope for physical-layer
Check Ethernet link qualityOscilloscope with eye diagramPHY register access via MDIO
Probe MII/RMII timingMSO or logic analyzerOscilloscope for clock quality
Verify termination/biasingMultimeter + oscilloscope
Locate EMI sourcesOscilloscope + near-field probesSpectrum analyzer
Long-term bus monitoringProtocol analyzer with loggingOscilloscope on trigger

10. Probe Techniques: Differential Probes, Current Probes, Near-Field Probes

Differential Probes

Purpose: Measure the voltage difference between two points without requiring a ground reference. Essential for probing differential buses (RS-485, CAN, Ethernet) when the local circuit ground differs from the oscilloscope ground.

How they work: A differential probe has two high-impedance inputs and an internal differential amplifier that outputs the voltage difference (V+ - V-). The inputs are isolated from the oscilloscope ground, allowing safe measurement of floating signals.

Key specifications:

ParameterTypical ValueSignificance
Attenuation10x, 20x, 50xTrade-off between dynamic range and sensitivity
Bandwidth50 MHz – 1 GHzMust exceed the signal’s highest frequency component
CMRR60–80 dB @ DCCommon-mode rejection ratio; higher is better
Max input voltage±50 V to ±1400 V (HV models)Determines what circuits can be safely probed
Input impedance1 MΩ

Probing RS-485 with a differential probe:

  1. Connect the probe’s + input to line A and the - input to line B.
  2. Set attenuation to 10x (or appropriate for the voltage range).
  3. Set the oscilloscope channel scale to compensate (e.g., 50 mV/div at 10x = 500 mV/div actual).
  4. Verify the probe compensation using the oscilloscope’s calibration signal (follow the probe manufacturer’s procedure).

Probing CAN with a differential probe:

Same procedure as RS-485. The low common-mode voltage of CAN (~2.5 V) is easily within the range of any differential probe. However, for routine CAN work, two single-ended channels (Ch1 = CAN-H, Ch2 = CAN-L, math = Ch1-Ch2) may be more convenient since it also shows each line individually.

Current Probes

Purpose: Measure current flowing through a conductor without breaking the circuit. Used for:

  • Measuring the current consumption of transceivers during transmit/receive cycles
  • Detecting ground-loop currents flowing in cable shields
  • Measuring surge current events
  • Verifying power supply adequacy under load

Types:

  • AC current probes (transformer-based): Measure AC and transient currents. Cannot measure DC. Typical bandwidth: 10 kHz – 100 MHz. Suitable for detecting AC ground-loop currents and EMI-related currents.
  • DC/AC current probes (Hall-effect or hybrid): Measure both DC and AC currents. Typical bandwidth: DC – 50 MHz. Suitable for measuring transceiver supply current, steady-state ground-loop DC, and dynamic current consumption.
  • Cable current probes (clamp-on): Large aperture probes that clamp around entire cable bundles. Used for measuring common-mode currents flowing on cable shields. Essential for EMC troubleshooting (see Section 12).

Measuring common-mode cable current:

  1. Place a clamp-on current probe around the entire cable bundle (including all signal wires and the shield).
  2. The probe measures the net common-mode current — the current that flows on the cable bundle as a whole, which is the current that radiates as an antenna.
  3. Common-mode current should be <1 mA for compliant installations; higher values indicate ground loops or EMI coupling.

Near-Field Probes

Purpose: Detect and localize electromagnetic field emissions from circuits and cables at close range. Used for:

  • Identifying the specific component or trace that is radiating EMI
  • Finding sources of interference that couple into fieldbus cables
  • Pre-compliance EMC testing (before formal certification testing)
  • Debugging signal integrity issues caused by radiation

Types:

  • H-field (magnetic field) probes: Small loop antennas that detect magnetic fields from current flow. Available in various sizes:
    • Large diameter (10–30 mm): High sensitivity, low spatial resolution. Best for general surveying and finding the general area of radiation.
    • Small diameter (1–5 mm): Lower sensitivity, high spatial resolution. Best for pinpointing the exact trace, pin, or component generating the emission.
  • E-field (electric field) probes: Small rod antennas that detect electric fields from voltage changes. More sensitive to high-impedance, voltage-driven emissions.

Using near-field probes:

  1. Connect the near-field probe to a spectrum analyzer or oscilloscope with FFT/spectrum mode.
  2. Systematically scan the circuit board or cable with the probe, holding it close (1–5 mm) to the surface.
  3. Increase the signal level at the identified source by narrowing the probe size or repositioning.
  4. The frequency of the detected emission often correlates with the operating frequency of a specific circuit (e.g., RS-485 data rate, CAN baud rate, Ethernet clock harmonics).

Home-built near-field probes: A simple H-field probe can be made from a coaxial cable with the shield formed into a small loop (shield soldered to center conductor at the tip). This costs essentially nothing and works surprisingly well for frequencies above 10 MHz. For pre-compliance work, commercial probe sets (e.g., Rohde & Schwarz, Tektronix, Aaronia, Com-Power) provide calibrated probes with known transfer impedance, enabling quantitative measurements.

Probe Loading Considerations

Any probe connected to a circuit affects that circuit through its input impedance (resistance and capacitance):

  • Voltage probes: Input impedance of 10 MΩ || 8–15 pF (typical passive probe). This capacitance loads high-frequency signals; for a 10 MHz RS-485 signal, 10 pF at 120 Ω source impedance introduces a pole at ~130 MHz — usually acceptable. But for MII/RMII 50 MHz signals, the same 10 pF can cause noticeable edge degradation.
  • Differential probes: Higher input capacitance (typically 5–10 pF per input) but with the advantage of no ground reference needed.
  • Near-field probes: Minimal loading; essentially a receive-only antenna.

Best practice: Use the highest impedance probe available (lowest capacitance), and verify by comparing the signal with and without the probe connected (if possible).


11. Termination and Biasing Verification

RS-485 Termination Verification

Standard parallel termination:

Two 120 Ω resistors, one at each end of the bus, matched to the characteristic impedance of the twisted-pair cable.

Verification procedure:

  1. Power off all devices on the bus.
  2. Measure resistance between A and B at any point on the bus:
    • ~60 Ω: Correct (two 120 Ω terminators in parallel).
    • ~120 Ω: One terminator missing (measuring only one end’s resistor).
    • ~40 Ω: Possible extra terminator (three 120 Ω resistors in various parallel combinations produce ~40 Ω).
    • Very high (kΩ–MΩ): No termination present.
  3. Verify termination location: Disconnect devices one at a time and re-measure. The resistance should jump to ~120 Ω when each terminating device is removed, confirming the terminators are at the bus endpoints.

AC termination verification:

AC termination uses a series RC network (R = 120 Ω, C ≈ 0.1 µF) at each bus end instead of a plain resistor. This cannot be verified with a DC resistance measurement because the capacitor blocks DC. Instead:

  1. Probe the bus with an oscilloscope during active transmission.
  2. Verify signal edges are clean (no excessive ringing) while also verifying that the DC current through the termination is zero (measure current with a current probe — should be near-zero during idle state).
  3. Check the RC time constant: The capacitor and resistor form a low-pass filter with τ = R × C = 120 Ω × 0.1 µF = 12 µs. This time constant should be much shorter than the minimum bit time to avoid distorting the signal.

RS-485 Biasing Verification

External bias resistors:

If external fail-safe bias resistors are used (pull-up on A to V_CC, pull-down on B to GND):

  1. Power off all transceivers but leave the biasing node powered.
  2. Measure voltage on line A: Should be pulled to approximately V_CC × R_TERM / (R_TERM + R_PULLUP). For 120 Ω termination and 645 Ω pull-up, V_A ≈ 5 × 120 / (120 + 645) ≈ 0.79 V above the divider midpoint.
  3. Measure voltage on line B: Should be pulled correspondingly low.
  4. Measure differential voltage: Should be ≥200 mV (the minimum receiver threshold for a defined state).
  5. Verify bias current does not overload the driver: The parallel combination of the two bias resistors should present a common-mode load that, combined with all node loads, does not exceed the equivalent of 32 unit loads (375 Ω).

Internal fail-safe verification:

For transceivers with built-in fail-safe biasing (no external resistors):

  1. Power off all transceivers on the bus.
  2. With no driver active, measure the differential voltage. With only termination resistors present, V_diff should be 0 V. This is in the indeterminate zone.
  3. Verify the transceiver’s data sheet specifies internal fail-safe bias. If it does, the receiver output will be HIGH despite the 0 V differential input. This can only be verified by observing the receiver’s output (R pin), not at the bus itself.

CAN Bus Termination Verification

CAN bus uses the same 120 Ω parallel termination scheme as RS-485:

  1. Power off all CAN devices.
  2. Measure resistance between CAN-H and CAN-L at any point:
    • ~60 Ω: Correct (two 120 Ω terminators in parallel).
    • ~120 Ω: One terminator missing.
    • ~40 Ω: Extra terminator present.
    • Very high (kΩ–MΩ): No termination.

Split termination (optional):

Some CAN implementations use split termination: two 60 Ω resistors in series with a capacitor to ground at the midpoint. This provides both impedance matching and common-mode filtering. To verify:

  1. Measure CAN-H to CAN-L: should read ~120 Ω (two 60 Ω resistors in series).
  2. Measure CAN-H to GND and CAN-L to GND: each should read ~60 Ω to the midpoint.
  3. Verify the capacitor value with an LCR meter (if accessible) or verify proper common-mode filtering by checking for reduced common-mode noise on the bus during active communication.

Termination during operation:

A handheld CAN diagnostic tool (e.g., Peak PCAN-Diag FD) can measure termination resistance while the bus is running, by injecting a known test current and measuring the resulting voltage change. This catches intermittent termination faults (e.g., a resistor that opens under thermal stress).


12. EMC Testing at the Physical Layer

Why EMC Matters for Fieldbus

Industrial environments present severe electromagnetic challenges: variable-frequency drives, motor contactors, welders, power electronics, and switching power supplies all generate conducted and radiated emissions. Fieldbus cables running through these environments act as unintended antennas, picking up noise that corrupts signals. Conversely, poorly designed fieldbus interfaces can radiate emissions that interfere with other equipment.

Conducted Emissions Testing

Conducted emissions testing measures the noise current flowing on power supply lines and I/O cables in the frequency range of 150 kHz to 30 MHz.

Equipment needed:

  • LISN (Line Impedance Stabilization Network): Placed between the device under test and the power source to present a defined impedance (50 Ω) to the noise currents and couple them to the measurement instrument.
  • Spectrum analyzer or EMI receiver: Measures the amplitude of conducted noise at each frequency.
  • Current probe: Alternative to LISN for measuring common-mode current on cable bundles.

Procedure for fieldbus cables:

  1. Connect the LISN between the device’s power input and the power source.
  2. Connect the spectrum analyzer to the LISN measurement port.
  3. Scan 150 kHz to 30 MHz and record the conducted emission levels.
  4. Compare against the applicable EMC standard limits (e.g., IEC 61131-2 for industrial control equipment, EN 55032 for multimedia equipment).
  5. If emissions exceed limits, use current probes on individual cables to identify which cable carries the offending noise.

Common-mode current on fieldbus cables: Use a clamp-on current probe around the entire fieldbus cable bundle. Common-mode current should typically be below 5 mA in the 150 kHz – 30 MHz range for industrial environments. Higher values indicate inadequate filtering or grounding.

Radiated Emissions Testing

Radiated emissions testing measures the electromagnetic field strength radiated by the device and its cables at distances of 1, 3, or 10 meters in the frequency range of 30 MHz to 1 GHz (and beyond for some standards).

Pre-compliance testing (bench-level):

Near-field probing is the primary pre-compliance technique:

  1. Set up the spectrum analyzer with a near-field probe connected via a low-noise amplifier (LNA) if available.
  2. Scan the circuit board systematically with H-field and E-field probes to identify emission sources:
    • Start with a large H-field probe for a broad survey.
    • Narrow down with smaller probes for pinpointing.
    • Note the frequency and amplitude of each emission.
  3. Common emission sources on fieldbus hardware:
    • RS-485/CAN transceiver output stages (fast switching edges radiate at the data rate and its harmonics)
    • Crystal oscillator circuits (fundamental frequency and overtones)
    • Switching voltage regulators
    • MII/RMII clock traces (50 MHz fundamental + harmonics)
  4. Correlate emissions with bus activity: Toggle the bus traffic on/off and observe whether emission levels change. If emissions correlate with bus activity, the bus interface is a radiation source.

Mitigation techniques:

TechniqueApplication
Slew-rate limiting on RS-485 transceiversReduces high-frequency harmonics of the data signal
Common-mode chokes on bus cablesAttenuates common-mode current (the component that radiates)
Shielded twisted-pair cableProvides both differential-mode balance and common-mode shielding
Proper cable shield groundingSingle-point ground prevents ground loops; 360° termination at connectors
PCB layout improvementsMinimize loop areas, keep high-speed traces short, use ground planes
Ferrite beads on cablesAbsorbs high-frequency common-mode current

Radiated Immunity Testing

Radiated immunity testing verifies that the device continues to operate correctly when subjected to external electromagnetic fields.

Procedure:

  1. Place the device under test in the radiated field generated by a calibrated antenna.
  2. Apply a calibrated field strength (e.g., 3 V/m, 10 V/m, or higher per the applicable standard) at various frequencies.
  3. Monitor device operation: Watch for communication errors (using a protocol analyzer or the device’s own diagnostics), sensor reading anomalies, or system crashes.
  4. Identify susceptible frequencies: Note which frequencies cause errors and correlate with known clock frequencies, bus data rates, or resonances.

Fieldbus-specific immunity testing:

  • During radiated immunity testing, actively monitor the fieldbus traffic with a protocol analyzer or oscilloscope. Count error frames (CAN), CRC errors (RS-485/Modbus), or dropped packets (Ethernet).
  • Pay special attention to the frequency ranges near the bus operating frequency and its harmonics — these are often the most problematic.
  • Cable orientation matters: maximum susceptibility occurs when the cable is aligned with the electric field vector.

Electrostatic Discharge (ESD) Testing

ESD testing simulates human-touch discharges that can damage or upset fieldbus interfaces.

Test points for fieldbus systems:

  • RJ-45 connector pins (Ethernet)
  • DB-9 / terminal block contacts (RS-485/RS-422)
  • X2X backplane connectors
  • Cable shields
  • Device enclosures and panel cutouts

ESD levels per IEC 61000-4-2:

  • ±4 kV contact discharge (commercial)
  • ±8 kV contact discharge (industrial)
  • ±8 kV air discharge (commercial)
  • ±15 kV air discharge (industrial)

Monitoring during ESD testing: Use an oscilloscope with a high-voltage differential probe (isolated) to capture the transient on the bus lines during discharge. A properly protected transceiver will clamp the transient within its common-mode range; an unprotected transceiver may show voltage excursions far beyond the rated range, causing permanent damage or temporary corruption.


13. Ground Loops and Their Effect on Signal Integrity

What Is a Ground Loop?

A ground loop occurs when two or more devices that are connected by signal cables have their ground references at different potentials. The signal cable (and particularly its shield or ground reference wire) provides a path for current to flow from the higher-potential ground to the lower-potential ground. This circulating current is the ground loop.

   Device A (GND @ 0 V)                Device B (GND @ 2 V)
   ┌─────────────────┐                ┌─────────────────┐
   │                 │                │                 │
   │   GND ─────┐    │   Signal Cable │    ┌──── GND    │
   │            │    ├────────────────┤    │            │
   │            │    │  Shield/GND    │    │            │
   │            │    │  carries 2V     │    │            │
   └────────────┼────┘  ground loop   └────┼────────────┘
                │         current          │
                └──────────────────────────┘

How Ground Loops Affect Signal Integrity

Common-mode voltage shift:

The ground loop current flowing through the cable’s resistance creates a voltage drop that shifts the common-mode voltage seen by the receivers. If this shift pushes the common-mode voltage outside the receiver’s specified range (-7 V to +12 V for standard RS-485), the receiver fails to decode the signal correctly, even if the differential voltage is perfectly clean.

Noise injection:

Ground loop currents are rarely steady DC. They often carry AC noise from motors, power supplies, or other equipment operating on different ground potentials. This noise modulates the common-mode voltage, creating time-varying errors that are difficult to diagnose because they correlate with other machinery operation rather than the communication system itself.

Cable shield current:

When the cable shield is connected to ground at both ends, it forms a low-impedance path for ground-loop current. The shield current generates a magnetic field that couples into the signal conductors inside the cable, inducing noise voltage in the differential pair. This noise appears as common-mode interference (affecting both A and B equally) which the differential receiver should reject — but only if the common-mode voltage remains within the receiver’s specified range.

Cable heating:

In severe cases, large ground-loop currents can heat the cable, accelerating insulation degradation and potentially creating a fire hazard in installations with significant ground potential differences.

Identifying Ground Loops

Measurement technique:

  1. Measure the voltage difference between the ground terminals of two devices on the same bus using a multimeter:
    • < 0.5 V: Generally safe.
    • 0.5–3 V: May cause marginal issues; monitor for errors.
    • > 3 V: Likely causing communication problems; must be addressed.
  2. Measure the AC ground difference: Set the multimeter to AC mV mode. Significant AC voltage (>100 mV) between grounds indicates active ground-loop currents carrying noise.
  3. Oscilloscope measurement: Use a differential probe to measure the common-mode voltage on the bus relative to local ground. Set a long timebase (10–100 ms/div) with AC coupling and observe slow drift or noise in the common-mode level.

Correlation testing:

  • Connect and disconnect the shield at one end of the cable. If errors decrease when the shield is disconnected at one end, a ground loop on the shield path is likely.
  • Disconnect the signal ground reference wire (if present) at one end. If errors decrease, the ground wire is carrying ground-loop current.
  • Operate suspected noise-generating equipment (motors, heaters, drives) on/off while monitoring bus errors. If errors correlate, the equipment’s ground system is interacting with the fieldbus ground.

Preventing Ground Loops

Galvanic isolation:

The most effective solution. Isolated RS-485 transceivers (e.g., Analog Devices ADM2587E, TI ISO1540) provide electrical isolation between the bus side and the logic side using transformers or capacitive isolation barriers. This breaks the ground loop path entirely. Isolation ratings of 2.5 kV to 5 kV are common.

Single-point shield grounding:

Connect the cable shield to ground at only one end of the cable (typically the master/controller end). This prevents shield ground-loop currents while still providing EMI shielding. The unconnected end should be left floating or terminated with a capacitor to provide high-frequency EMI coupling without a DC ground path.

Signal ground reference (third wire):

For RS-485 networks, include a dedicated signal ground reference wire (often pin 1 of the DB-9 connector in Modbus installations). Connect this wire at both ends but through a resistor (e.g., 100 Ω) or a parallel combination of a 100 Ω resistor and a 0.1 µF capacitor. This limits the ground-loop current while providing a common reference for the receiver’s input attenuator.

Optical isolation:

For extreme ground potential differences, fiber-optic media converters can be used to completely eliminate the electrical connection between nodes. This is the ultimate solution but adds cost and complexity.

Star grounding:

In multi-device installations, use star grounding where each device has its own ground path back to a single common ground point, rather than daisy-chaining grounds through the devices. This prevents ground currents from one device from flowing through the ground path of another.

Ground Loop Effects on Specific Fieldbuses

RS-485/X2X:

  • Most susceptible due to the wide common-mode range (-7 V to +12 V) being frequently exceeded in industrial installations.
  • Ground loop effects manifest as intermittent character errors (wrong data bytes received) or complete communication failures.
  • The bus’s differential nature rejects common-mode noise, but only within the receiver’s specified range.

CAN bus:

  • CAN transceivers (ISO 11898-2) are specified for -2 V to +7 V common-mode range (tighter than RS-485). Some automotive-qualified CAN transceivers support extended ranges.
  • Ground loops cause error frames, increased error counters, and bus-off conditions in extreme cases.
  • The CAN bus’s non-return-to-zero (NRZ) coding and bit-stuffing rules make it relatively robust to moderate common-mode noise, but susceptible to large transients.

Ethernet POWERLINK:

  • Standard Ethernet PHYs use transformer coupling (magnetics) at the RJ-45 connector, which provides inherent galvanic isolation (~1500 V) between the cable and the device’s ground.
  • This makes Ethernet POWERLINK inherently resistant to ground loops through the cable.
  • However, ground loops can still affect the PHY’s power supply and the MII/RMII signals on the PCB side of the magnetics.
  • Ground potential differences between devices on the same Ethernet segment can stress the magnetics, potentially causing saturation and signal distortion.

Cross-References


Appendix A: Quick Reference — Oscilloscope Settings by Protocol

RS-485 / X2X

SettingRecommended Value
CouplingDC
Bandwidth limitOff (or 20 MHz for general survey)
Timebase5 × (1/baud_rate) per division
Volts/div1–2 V (adjust to fill ~80% of screen)
TriggerEdge on Ch1 or Ch2 (single-ended) or on math function (differential)
Trigger level50% of signal amplitude
AcquisitionNormal or Peak Detect (for intermittent events)
DecodeRS-485 / UART, set baud rate to match system
MathCh1 - Ch2 (differential), (Ch1 + Ch2) / 2 (common-mode)

CAN Bus — Oscilloscope Settings

SettingRecommended Value
CouplingDC
Bandwidth limitOff
Timebase2–5 µs/div (for 500 kbps); adjust proportionally for other rates
Volts/div1 V/div
TriggerCAN bus decode trigger (if available), or edge on CAN-H
AcquisitionNormal
DecodeCAN or CAN FD, set bit rate
MathCh1 - Ch2 (differential)
SettingRecommended Value
CouplingAC (for eye diagram), DC (for DC levels)
Bandwidth limitOff
Timebase2 ns/div for single transitions; eye diagram mode for composite
Volts/div200 mV/div
TriggerClock recovery (for eye diagram)
AcquisitionHigh-resolution (12-bit if available)
DecodeEthernet (if available)

Appendix B: Quick Reference — Multimeter Tests

RS-485 Bus

TestExpected ResultFault Indication
A-B resistance (power off)~60 ΩMissing/extra termination
A to GND resistance (power off)>1 kΩShorted receiver/transceiver
B to GND resistance (power off)>1 kΩShorted receiver/transceiver
A to GND voltage (powered, idle)Varies (depends on biasing)N/A
B to GND voltage (powered, idle)Varies (depends on biasing)N/A
Differential voltage during TX1.5–5.0 V<1.5 V indicates weak signal

CAN Bus — Multimeter Tests

TestExpected ResultFault Indication
CAN-H to CAN-L resistance (power off)~60 ΩMissing/extra termination
CAN-H to GND (single node, powered)2.5–3.0 VOut of range = damaged transceiver
CAN-L to GND (single node, powered)2.0–2.5 VOut of range = damaged transceiver
CAN-H to GND (power off, disconnected)MΩ (open)<100 kΩ = damaged transceiver
CAN-L to GND (power off, disconnected)MΩ (open)<100 kΩ = damaged transceiver

Appendix C: Further Reading

  • TI SLLA545 — RS-485 Basics Series (comprehensive RS-485 fundamentals)
  • TI SNLA266 — 10/100Mbps Industrial Ethernet PHY compliance and debug
  • Renesas AN-13335 — EMC and signal integrity for Ethernet PHYs
  • Analog Devices AN-1399 — Enhanced RS-485 receiver fail-safe performance
  • ISO 11898-2 — CAN bus physical layer specification
  • TIA/EIA-485-A — RS-485 electrical characteristics standard
  • IEEE 802.3 — Ethernet physical layer specifications (Clause 14: 10BASE-T, Clause 24: 100BASE-TX, Clause 35: 1000BASE-T)
  • IEC 61000-4-2 — Electrostatic discharge immunity test
  • IEC 61131-2 — EMC requirements for programmable controllers
  • EPSG DS 301 — Ethernet POWERLINK Communication Profile Specification

Key Findings

  1. RS-485/X2X differential voltage must be >= 1.5 V across a 54 ohm load per EIA-485. Typical healthy systems show 2.0-3.5 V. Values below 1.0 V indicate excessive cable length, too many nodes, corroded connections, or transceiver failure. Common-mode voltage must stay within -7 V to +12 V; excursions beyond this saturate the receiver’s internal bias network regardless of differential signal quality.

  2. CAN bus diagnostic multimeter checks (power off): CAN-H to CAN-L should read ~60 ohm (two 120 ohm terminators in parallel). Single-node powered: CAN-H to GND = 2.5-3.0 V, CAN-L to GND = 2.0-2.5 V. Disconnected and powered off: both lines to GND should be megaohms (lower = damaged transceiver, common after lightning/surge). Active differential must be >= 1.5 V per ISO 11898-2.

  3. Six categories of physical-layer faults cause intermittent sensor failures: (1) cable/connector issues (reflections from missing termination, ~120 ohm = one missing, ~40 ohm = extra), (2) signal integrity degradation (amplitude attenuation, slow edges from cable capacitance), (3) grounding/shielding problems (ground loops, improper shield grounding), (4) power supply issues (brownouts, inadequate decoupling), (5) transceiver degradation (thermal aging, post-ESD weakness), (6) EMI (radiated from VFDs/welders, conducted via power rails, crosstalk from parallel power cables).

  4. Oscilloscope minimum requirements by protocol: RS-485/X2X = 100 MHz bandwidth / 500 MSa/s; CAN bus = 200 MHz / 1 GSa/s; 100BASE-TX POWERLINK = 500 MHz / 2 GSa/s. For POWERLINK specifically, a 4-channel scope with >= 500 MHz bandwidth and Ethernet decode capability is the practical minimum. An MSO with 16+ digital channels enables simultaneous MII/RMII probing.

  5. Ethernet POWERLINK physical-layer issues: RMII 50 MHz reference clock jitter must be < 0.5 ns period jitter (noisy clock = intermittent CRC errors); magnetics (RJ-45 transformers) can be damaged by surge events causing asymmetric waveforms; cable length must not exceed 100 m of Cat5e. Probe the MII/RMII interface with a logic analyzer to verify clock quality and TX/RX data timing.

  6. Differential probes are essential when probing ground-referenced signals where the oscilloscope ground differs from the circuit ground (common in industrial installations with distributed power supplies). Key specs: CMRR 60-80 dB, bandwidth >= signal’s highest frequency component, input impedance 1 Mohm || 5-10 pF. For routine CAN work, two single-ended channels (Ch1 = CAN-H, Ch2 = CAN-L, math = Ch1-Ch2) may be more convenient.

  7. Termination verification procedure: power off all devices, measure A-B resistance at any bus point. RS-485: ~60 ohm = correct, ~120 ohm = one missing, ~40 ohm = extra terminator, very high = none present. CAN: same 60 ohm rule applies. If bias resistors are present (1:1 split, e.g., 560 ohm pull-up to Vcc, 560 ohm pull-down to GND), the idle-state voltage between A and B should be ~200 mV (ensuring defined recessive state).

  8. Near-field probes for EMI source identification: H-field loop probes detect magnetic fields from current flow (large loop = survey, small loop = pinpoint). Connect to spectrum analyzer or oscilloscope FFT mode. A home-built H-field probe from coaxial cable (shield formed into small loop, soldered to center conductor) costs nothing and works above 10 MHz. Common-mode cable current measured by clamp-on probe around the entire cable bundle should be < 1 mA for compliant installations.


Analog IO Signal Conditioning and Calibration on B&R Automation

Analog input and output signals are the most failure-prone signals in any B&R installation. Noise, grounding problems, aging sensors, and drifting calibration all produce symptoms that are difficult to distinguish from software bugs. This document covers how B&R analog IO cards handle 0-10V, 4-20mA, thermocouple, and RTD signals; how to perform calibration; how noise and grounding issues manifest as reading errors; and how to systematically determine whether a problem originates at the sensor, the cabling, or the IO card itself. Cross-references: io-card-hardware.md for IO card hardware internals, grounding-emc.md for grounding and EMC troubleshooting, and memory-map.md for direct memory access to analog channels.

Comprehensive Technical Reference


Table of Contents

  1. Analog Input Signal Types and Module Overview
  2. Signal Conditioning Circuits on B&R Analog Modules
  3. Calibration Procedures for Analog Inputs and Outputs
  4. Offset/Gain Adjustment Methods
  5. Noise and Grounding Issues as Analog Reading Errors
  6. Distinguishing Sensor Faults from IO Card Faults
  7. Resolution and Accuracy Specifications
  8. Sampling Rate and Aliasing Considerations
  9. Cold Junction Compensation for Thermocouple Inputs
  10. 3-Wire and 4-Wire RTD Measurement
  11. Current Loop (4-20 mA) Diagnostics
  12. Filter Settings and Response Time Trade-offs
  13. Grounding Best Practices for Analog Signals
  14. Calibration Certification and Traceability

1. Analog Input Signal Types and Module Overview

1.1 Voltage Inputs (0-10V, +/-10V)

B&R analog input modules support voltage measurement through differential input configurations. The front-end circuit presents a high input impedance (typically 20 MOhm on modules like the X20AI4622) to minimize loading on the signal source.

Supported modules and ranges:

ModuleChannelsVoltage RangeResolutionInput Impedance
X20AI22222+/-10V13-bit (incl. sign)20 MOhm
X20AI22372+/-10V16-bit20 MOhm
X20AI46224+/-10V13-bit (incl. sign)20 MOhm
X20AI46324+/-10V16-bit20 MOhm
X20AI46364+/-10V16-bit20 MOhm
X20AI80398+/-10V16-bitPer channel configurable

LSB resolution for voltage (13-bit modules):

  • +/-10V range: 1 LSB = 2.441 mV (INT format 0x8001 to 0x7FFF)

LSB resolution for voltage (16-bit modules):

  • +/-10V range: 1 LSB = 0.305 mV (finer granularity from higher resolution)

The conversion procedure on standard modules uses Successive Approximation Register (SAR) ADCs with conversion times as low as 400 us for all inputs (X20AI4622). Galvanically isolated variants (e.g., X20AI2237, X20AI2437) provide per-channel isolation with their own sensor power supply, eliminating channel-to-channel coupling.

Input protection: All B&R analog voltage inputs include protection against wiring with supply voltage, tolerating up to +/-30V on the input without damage.

1.2 Current Inputs (4-20 mA, 0-20 mA)

Current measurement on B&R modules is performed using an internal precision shunt resistor. The input circuit automatically switches between voltage and current measurement modes based on the terminal used and the software configuration (an integrated switch inside the module activates the appropriate signal path).

Supported current ranges:

ModuleChannelsCurrent RangeResolutionShunt/Load
X20AI232220-20 mA / 4-20 mA12-bit<400 Ohm
X20AI243724-20 mA16-bitIsolated per channel
X20AI243824-20 mA16-bitIsolated, HART support
X20AI462240-20 mA / 4-20 mA13-bit (incl. sign)<400 Ohm
X20AI463240-20 mA / 4-20 mA16-bit<400 Ohm
X20AI803980-20 mA / 4-20 mA16-bitPer channel

LSB resolution for current (13-bit modules):

  • 0-20 mA range: 1 LSB = 4.883 uA
  • 4-20 mA range: INT -8192 to +32767 (value 0 corresponds to 4 mA)

Input protection: Current inputs tolerate up to +/-50 mA without damage.

Galvanically isolated current modules (X20AI2437, X20AI2438) provide single-channel galvanic isolation with an independent sensor power supply, making them ideal for applications requiring isolation between measurement loops. The X20AI2438 additionally supports the HART protocol, enabling bidirectional digital communication superimposed on the 4-20 mA analog signal.

1.3 Thermocouple Inputs

B&R offers dedicated thermocouple input modules that support types J, K, N, S, B, and R:

ModuleChannelsTC TypesResolutionFilter Time
X20AT24022J, K, N, S, B, R16-bit (0.1C)1-66.7 ms configurable
X20AT64026J, K, N, S, B, R16-bit (0.1C or 0.01C)1-66.7 ms configurable

Measurement ranges per thermocouple type:

TypeRangeOutput Range (0.1C res.)
J (Fe-CuNi)-210 to 1200C-2100 to +12000
K (NiCr-Ni)-270 to 1372C-2700 to +13720
N (NiCrSi-NiSi)-270 to 1300C-2700 to +13000
S (PtRh10-Pt)-50 to 1768C-500 to +17680
B (PtRh30-PtRh6)0 to 1820C0 to +18200
R (PtRh13-Pt)-50 to 1664C-500 to +16640

The X20AT6402 supports dual resolution: 0.1C (INT, range +/-32767) and 0.01C (DINT, range +/-2,147,483,647). Raw value measurement without linearization is also available for custom sensor types.

Conversion procedure: Thermocouple modules use sigma-delta converters (as opposed to SAR on voltage/current modules). Conversion times depend on the number of enabled channels and the filter setting:

  • Function Model 0, n channels: (n + 1) * (2 * Filter time + 200 us)
  • Function Model 1, n channels: n * (2 * Filter time + 200 us)
  • Example: 6 channels with 50 Hz filter = 281.4 ms total conversion time

1.4 RTD Inputs (Pt100, Pt1000)

B&R provides both dedicated RTD modules and universal multi-signal modules:

ModuleChannelsSensor TypesWiringResolution
X20AT22222Pt100, Pt10002-wire, 3-wire16-bit (0.1C)
X20AI80398Pt100, Pt1000 (mixed with V/I)2-wire, 3-wire16-bit (0.1C)

Measurement method: RTD modules use a constant current source (250 uA +/-1.25% on X20AT2222) with a precision reference resistor (4530 Ohm +/-0.1%) to measure resistance. The sigma-delta ADC converts the voltage drop across the RTD element. Internal linearization follows IEC/EN 60751.

Measurement range: -200 to 850C for both Pt100 and Pt1000. The resistance measurement range is 0.1 to 4500 Ohm (gain=1) or 0.05 to 2250 Ohm (gain=2).

Key RTD specifications (X20AT2222):

  • Max. error at 25C: Gain 0.037%, Offset 0.0015%
  • Gain drift: 0.004%/C
  • Offset drift: 0.00015%/C
  • Non-linearity: <0.0010%
  • Crosstalk between channels: <-93 dB
  • Common-mode rejection: DC >95 dB, 50 Hz >80 dB

1.5 Universal/Multi-Signal Modules

The X20AI8039 is the most versatile analog input module, offering 8 configurable channels where each channel can independently be set to:

  • +/-10V voltage
  • 0-20 mA / 4-20 mA current
  • Pt100 / Pt1000 (2- or 3-wire)
  • ICTD measurement (integrated circuit temperature diode)

This makes it ideal for mixed-signal applications where temperature and process signals coexist on the same I/O node.

1.6 Strain Gauge / Load Cell Inputs

For precision measurement applications, B&R offers:

  • X20AI1744 (1 channel) and X20AIA744 (2 channels): Full-bridge strain gauge inputs, 24-bit resolution, 5 kHz input filter
  • X20AIB744 (4 channels): Full-bridge strain gauge inputs, 24-bit resolution, 2.5 kHz input filter

These support both 4-wire and 6-wire load cell connections, with internal compensation for lead wire resistance.

1.7 Specialty Modules

  • X20AP3111/3121/3131/3161/3171: Energy metering modules with 3 analog voltage inputs (up to 480 VAC) and 4 analog current inputs (20 mA / 1 A / 5 A / Rogowski), calculating RMS values, active/reactive/apparent power and energy.
  • X20CM4800X: Vibration measurement module with configurable sampling rate of 200 to 50,000 samples/second and 4 input channels.
  • X20RT8201/8381/8401: reACTION Technology modules with 500 kHz sampling frequency, 13-bit resolution analog inputs for ultra-fast control loops.
  • X20SA4430: Safe analog current input module (2x2 type A), 0.5 to 25 mA, individually galvanically isolated channels for safety-related applications.

2. Signal Conditioning Circuits on B&R Analog Modules

2.1 Input Stage Architecture

B&R analog input modules follow a consistent front-end architecture:

Terminal Block (field wiring)
    |
    v
Input Protection (PTC, clamping diodes)
    |
    v
Multiplexer / Analog Switch (channel selection)
    |
    v
Signal Conditioning
    |-- Voltage mode: Buffer amplifier (high-Z input, 20 MOhm)
    |-- Current mode: Precision shunt resistor + instrumentation amplifier
    |-- TC mode: Low-drift amplifier with high CMRR
    |-- RTD mode: Constant current source + differential amplifier
    |
    v
Anti-Aliasing Filter (3rd-order low-pass, 500 Hz - 1 kHz)
    |
    v
ADC (SAR for V/I, Sigma-Delta for TC/RTD)
    |
    v
Digital Filter (configurable first-order or third-order)
    |
    v
Linearization / Calibration Coefficients
    |
    v
Output Register (INT/DINT format)

2.2 Voltage Signal Conditioning

For voltage inputs, the conditioning chain consists of:

  1. High-impedance buffer amplifier (20 MOhm input impedance) prevents loading the signal source
  2. Third-order low-pass anti-aliasing filter with 1 kHz cutoff frequency (on X20AI4622)
  3. SAR ADC performs the digitization
  4. Digital output filter provides additional configurable smoothing (see Section 12)

The input circuit includes PTC thermistors and protection circuitry to guard against miswiring (connection to supply voltage up to +/-30V).

2.3 Current Signal Conditioning

Current measurement uses an internal shunt resistor topology:

AI+ (current in) --> [PTC] --> [Shunt Resistor < 400 Ohm] --> [GND reference]
                         |
                    [Amp to ADC]

The switch between voltage and current measurement is implemented via an integrated analog switch inside the module, automatically activated based on:

  1. Which terminal is used (U terminals for voltage, I terminals for current)
  2. The channel type configuration register setting

2.4 Thermocouple Signal Conditioning

Thermocouple modules use a significantly different architecture:

TC+ / TC- terminals
    |
    v
Multiplexer (channels 1-6)
    |
    v
Low-noise instrumentation amplifier (high CMRR >70 dB)
    |
    v
Sigma-Delta ADC (16-bit)
    |
    v
Digital filter (first-order low-pass, 500 Hz cutoff)
    |
    v
Linearization (polynomial approximation per TC type to EN 60584)
    |
    v
Cold Junction Compensation (internal PT1000 sensor)
    |
    v
Temperature output (C)

Key features of the TC conditioning chain:

  • Common-mode range: +/-15V (accommodates the high common-mode voltages that thermocouples may pick up)
  • Permissible input signal: Max +/-5V
  • Common-mode rejection: DC >70 dB, 50 Hz >70 dB (critical for rejecting ground-loop noise in TC wiring)

2.5 RTD Signal Conditioning

RTD measurement on the X20AT2222 uses constant-current excitation:

RTD+ terminal
    |
    v
[Constant Current Source: 250 uA]
    |
    v
[RTD Sensor element]
    |
    v
[3-wire compensation network]
    |
    v
[Reference Resistor: 4530 Ohm]
    |
    v
[Sigma-Delta ADC]
    |
    v
[IEC/EN 60751 Linearization]
    |
    v
Temperature output

The 3-wire measurement compensates for lead wire resistance by measuring the voltage drop on the sense leads and subtracting the lead resistance from the total measured resistance.

2.6 Galvanic Isolation

B&R offers modules with different isolation levels:

Isolation TypeExample ModulesIsolation Voltage
Channel to Bus (all modules)X20AI4622, X20AT6402500 Veff
Channel to Channel (none in standard)
Per-Channel IsolatedX20AI2237, X20AI2437, X20AI2438Channel isolated from bus
Safety-Rated IsolatedX20SA4430Individual galvanic isolation per channel

Standard X20 analog modules isolate all channels from the bus (500 Veff) but not from each other. For applications requiring channel-to-channel isolation, the galvanically isolated variants (X20AI2237 for voltage, X20AI2437/2438 for current) provide this with independent sensor power supplies per channel.


3. Calibration Procedures for Analog Inputs and Outputs

3.1 Factory Calibration

B&R analog modules are factory-calibrated at the B&R facility in Eggelsberg, Austria. The calibration is performed using traceable reference standards, and the calibration coefficients are stored in the module’s internal firmware.

Key points about B&R factory calibration:

  • Each module is individually calibrated; calibration data is stored in the module’s internal memory
  • No user-accessible calibration trim pots exist on the modules (calibration is digital)
  • Modules ship with a Certificate of Conformance confirming they meet published specifications
  • Factory calibration covers gain error, offset error, and linearity within the published specifications

3.2 Verification Procedure for Analog Inputs

To verify the accuracy of a B&R analog input module in the field:

Equipment required:

  • Calibrated multi-function process calibrator (e.g., Fluke 789, Beamex MC6)
  • Calibrated precision multimeter (for cross-checking)
  • Test leads and appropriate terminations

Procedure for voltage inputs (e.g., X20AI4632):

  1. Disconnect field wiring from the channel to be tested
  2. Configure the channel for the appropriate voltage range via Automation Studio
  3. Set the process calibrator to output 0.000V
  4. Apply the signal to the AI+/AI- terminals
  5. Read the value in Automation Studio (mapp View, online values in PLC program, or via the oscilloscope function on X20AI4632)
  6. Record the reading and compare to the expected value (should be near 0)
  7. Repeat at 25%, 50%, 75%, and 100% of the range (+/-2.5V, +/-5.0V, +/-7.5V, +/-10V)
  8. Calculate the error at each point as: Error (%) = [(Reading - Applied) / Full Scale] * 100

Acceptance criteria (X20AI4622, 13-bit, at 25C):

  • Gain error: < 0.08% of measured value
  • Offset error: < 0.015% of 20V range
  • Non-linearity: < 0.025% of 20V range

Procedure for current inputs (e.g., X20AI4622):

  1. Configure the channel for 4-20 mA mode
  2. Apply 4.000 mA from the calibrator in series with the input
  3. The reading should be near 0 (4 mA = 0 in 4-20 mA scaled mode)
  4. Step through 8 mA, 12 mA, 16 mA, and 20 mA
  5. Record readings and calculate error at each point

Acceptance criteria for 4-20 mA (X20AI4622):

  • Gain error: < 0.1% of measured value
  • Offset error: < 0.0375% of 20 mA range

3.3 Verification Procedure for Analog Outputs

Procedure for X20AO4622 (4 channels, +/-10V or 0-20 mA):

  1. Disconnect field wiring from the channel to be tested
  2. Connect the calibrated multimeter across AO+/AO-
  3. Configure the channel for the appropriate range
  4. Write known values to the output register in Automation Studio
  5. Measure the actual output voltage/current
  6. Compare measured vs. commanded values

Acceptance criteria (X20AO4622 at 25C):

  • Voltage gain error: < 0.08% of measured value
  • Voltage offset error: < 0.05% of full range
  • Current gain error: < 0.09% of measured value
  • Current offset error: < 0.05% of full range
  • Non-linearity: < 0.007% (voltage), < 0.005% (current)

3.4 Verification Procedure for Temperature Inputs

Thermocouple module (X20AT6402):

  1. Disconnect the field thermocouple
  2. Connect a thermocouple calibrator (cold-junction compensated) to the TC+/TC- terminals
  3. Set the sensor type in the module configuration (e.g., Type K)
  4. Set the calibrator to 0.0C and observe the module reading
  5. Step through temperature points (e.g., 100C, 250C, 500C, 1000C)
  6. Verify readings are within specifications

Acceptance criteria (X20AT6402 at 25C):

  • Gain error: +/-0.06%
  • Type K offset error: +/-0.05%
  • Non-linearity: +/-0.001%

RTD module (X20AT2222):

  1. Disconnect the field RTD
  2. Connect a precision decade resistance box (or RTD calibrator)
  3. Configure the channel for Pt100 (IEC 60751)
  4. Apply resistance values corresponding to known temperatures (e.g., 100 Ohm = 0C, 138.5 Ohm = 100C, 214.6 Ohm = 300C)
  5. Compare the module reading to the expected temperature

Acceptance criteria (X20AT2222 at 25C):

  • Gain error: 0.037% of current resistance value
  • Offset error: 0.0015% of full resistance range
  • Non-linearity: <0.0010%

3.5 Software-Based Calibration Correction

Since B&R modules do not have user-accessible trim adjustments, calibration correction (if needed beyond factory accuracy) must be performed in software:

Two-point calibration in Automation Studio (ST language):

FUNCTION AnalogCalibrate : LREAL
VAR_INPUT
    RawValue : INT;
    CalLow : INT;    (* Raw reading at zero/low calibration point *)
    CalHigh : INT;   (* Raw reading at span/high calibration point *)
    ScaleLow : LREAL; (* Engineering units at low point *)
    ScaleHigh : LREAL; (* Engineering units at high point *)
END_VAR

AnalogCalibrate := ScaleLow + (TO_LREAL(RawValue - CalLow) / TO_LREAL(CalHigh - CalLow)) * (ScaleHigh - ScaleLow);

mapp components: B&R’s mapp Control technology provides built-in scaling and linearization function blocks that can incorporate calibration offsets directly.

3.6 Recalibration and Repair

B&R modules that drift beyond specification should be returned to B&R for recalibration or repair through the B&R Support Portal or Material Return Portal. B&R offers repair services at their facilities with recalibration using traceable standards.


4. Offset/Gain Adjustment Methods

4.1 Understanding Offset and Gain Errors

In ADC systems, two fundamental errors affect measurement accuracy:

  • Offset error: A constant shift in the reading, present even when the input is zero. On B&R modules, offset is specified at 25C (e.g., X20AI4622 voltage offset: 0.015% of 20V range = 3 mV).

  • Gain error: The slope of the transfer function deviates from the ideal. A reading at full scale will be proportionally incorrect (e.g., X20AI4622 voltage gain error: 0.08% of measured value).

  • Linearity error: The transfer function is not perfectly straight between the calibrated endpoints. B&R specifies this separately (e.g., <0.025% for voltage on the X20AI4622).

4.2 Temperature Drift

Both offset and gain errors drift with temperature. B&R specifies maximum drift coefficients:

ParameterX20AI4622 (Voltage)X20AI4622 (Current 4-20mA)X20AT6402 (TC)X20AT2222 (RTD)
Gain drift0.006%/C0.0113%/C+/-0.01%/C0.004%/C
Offset drift0.002%/C0.005%/C+/-0.0024%/C (Type K)0.00015%/C
Non-linearity<0.025%<0.05%+/-0.001%<0.001%

Practical impact: For a X20AI4622 measuring +/-10V, operating in a 30C range (e.g., 10C to 40C ambient), the worst-case gain drift is:

  • 0.006%/C * 30C * 20V range = 0.036V = 36 mV

This is larger than the 1 LSB resolution (2.441 mV), demonstrating why temperature control in the cabinet matters for precision applications.

4.3 Software Offset/Gain Compensation

Since B&R modules have no hardware trim adjustments, compensation is done in software:

Method 1: Two-Point Calibration (offset + gain correction)

Apply two known reference signals and compute correction factors:

Apply ZERO reference -> Read RawZero
Apply SPAN reference -> Read RawSpan

CorrectedValue = (RawValue - RawZero) * (SpanReference / (RawSpan - RawZero)) + ZeroReference

Method 2: Single-Point Offset Correction

For applications where gain error is acceptable but offset drift needs correction:

Apply ZERO reference -> Read RawZero
CorrectedValue = RawValue - RawZero

Method 3: mapp Scaling Function Blocks

Use B&R’s mapp Control components (AsCal, AsScale) which provide integrated scaling with offset and gain parameters configurable through Automation Studio.

4.4 Using the Oscilloscope Function for Calibration

The X20AI4632 and X20AI4636 modules feature built-in oscilloscope functions that allow real-time visualization of analog signals directly in Automation Studio. This is useful during calibration to:

  • Observe signal stability and noise levels
  • Verify filter performance
  • Detect oscillations or interference
  • Capture transients that may affect calibration accuracy

4.5 Oversampling for Improved Resolution (X20AI4636)

The X20AI4636 supports oversampling functions, where multiple ADC conversions are averaged to effectively increase resolution and reduce noise:

  • Oversampling ratio is configurable
  • Effective resolution improvement follows: N_additional_bits = log2(oversampling_ratio) / 2
  • 4x oversampling yields approximately 1 additional bit of resolution
  • Trade-off: increased conversion time

5. Noise and Grounding Issues as Analog Reading Errors

5.1 How Noise Manifests in Analog Readings

Noise on B&R analog inputs appears in several characteristic patterns:

SymptomLikely CauseDiagnostic Approach
Random fluctuations of 1-5 LSBBroadband EMI, digital crosstalkUse oscilloscope function (X20AI4632) or monitor raw values
50/60 Hz periodic ripplePower line coupling, ground loopsFFT analysis; check shield grounding
Sudden spikes followed by recoveryMotor starting, relay switchingCorrelate with plant events
All channels drift togetherTemperature change affecting moduleMonitor CompensationTemperature register (TC modules)
Single channel noisy, others stableSensor or wiring issue for that channelSwap sensors between channels to isolate
Offset changes over timeGround potential shifts, corrosionMeasure ground potential difference

5.2 Noise Sources in B&R X20 Systems

External noise sources:

  • Variable frequency drives (VFDs) and motor inverters
  • Switching power supplies
  • Relay and contactor switching
  • Radio frequency interference (RFI) from wireless devices
  • Welding equipment
  • Power line harmonics

Internal noise sources:

  • X2X Link communication (between bus modules)
  • Digital I/O switching on adjacent modules
  • Power supply ripple on the internal I/O supply
  • ADC quantization noise

5.3 Crosstalk Between Channels

B&R specifies crosstalk between channels:

  • X20AI4622 (V/I): <-70 dB
  • X20AT6402 (TC): <-70 dB
  • X20AT2222 (RTD): <-93 dB

At -70 dB crosstalk, a 10V signal on one channel can induce up to approximately 3.16 mV on an adjacent channel (which is about 1 LSB on a 13-bit module). For high-precision applications, this is significant and requires careful signal routing and filtering.

5.4 Common-Mode Rejection

Common-mode noise (noise that appears equally on both input terminals) is rejected by the differential input architecture:

ModuleCMRR (DC)CMRR (50 Hz)Common-Mode Range
X20AI462270 dB70 dB+/-12V
X20AT6402>70 dB>70 dB+/-15V
X20AT2222>95 dB>80 dB>0.7V

70 dB CMRR means that 1V of common-mode noise is reduced to approximately 316 uV at the ADC input. For the RTD module (X20AT2222) with 95 dB CMRR at DC, 1V of common-mode noise is reduced to approximately 18 uV.

5.5 Ground Loops

Ground loops occur when there are multiple ground paths between the sensor and the I/O module, creating a current loop that introduces offset errors and noise:

Sensor Ground --> [Sensor Cable] --> AI- terminal
     |                                        |
     +------ [Earth Ground Path] -------> [Module Ground]

The resulting loop current flows through the cable shield or signal ground and creates voltage drops that appear as measurement error. A 10 mA ground loop current through a 1 Ohm ground path creates 10 mV of error, which exceeds the 0.015% offset specification of the X20AI4622.

Solutions:

  • Single-point shield grounding (see Section 13)
  • Use galvanically isolated modules (X20AI2237, X20AI2437) which break the ground loop path
  • Isolation amplifiers or signal conditioners at the sensor
  • Star-point grounding in the panel

6. Distinguishing Sensor Faults from IO Card Faults

6.1 Systematic Fault Isolation Approach

When an analog reading is incorrect, follow this systematic approach to isolate the fault:

Step 1: Check module diagnostics

B&R analog modules provide real-time diagnostics via:

  • LED indicators: Per-channel green LEDs (solid = OK, blinking = overflow/underflow/open), module status LEDs (green = RUN, red = error)
  • Status registers: StatusInput01 and StatusInput02 registers report per-channel status bits

Status bit interpretation for X20AI4622:

BitsMeaning
00No error
01Lower limit value undershot
10Upper limit value overshot
11Open circuit (voltage mode only)

For thermocouple modules (X20AT6402), additional status bits indicate:

  • Open circuit (wire break detection)
  • Range overshoot/undershoot
  • General fault

Step 2: Swap channels

Move the sensor to a different channel on the same module:

  • If the error follows the sensor –> sensor or wiring fault
  • If the error stays on the original channel –> IO card fault

Step 3: Apply known reference signal

Disconnect the sensor and apply a precision reference:

  • Voltage: Use a calibrated voltage source
  • Current: Use a calibrated current source (4-20 mA calibrator)
  • Thermocouple: Use a TC simulator with cold junction compensation
  • RTD: Use a precision decade resistance box

If the module reads the reference correctly, the fault is in the sensor or field wiring.

Step 4: Cross-check with another module

If a spare analog channel or module is available, connect the sensor to it:

  • Confirms whether the original module has degraded

6.2 Common Sensor Faults and Symptoms

Sensor TypeFault ModeSymptom on B&R Module
Voltage transmitterOutput driftReading shifts gradually over time; status bits normal
Current transmitterPower supply failureReading drops to 0 or shows open circuit; status bit = open circuit
ThermocoupleWire breakReading jumps to +32767 (0x7FFF); status bit = open circuit
ThermocoupleDegraded junctionReading offset by fixed amount at all temperatures
RTD (Pt100)Wire breakReading jumps to +32767 (0x7FFF); status bit = open line
RTDShort circuitReading drops to minimum or shows unexpected value
RTDLead wire corrosionMeasurement offset proportional to temperature (3-wire doesn’t fully compensate)

6.3 Common IO Card Faults and Symptoms

Fault ModeSymptomDiagnostic
ADC channel degradationAll readings on one channel offset; other channels correctSwap sensor to confirm; fails calibration verification
Reference voltage driftAll channels on module drift togetherCheck if error is consistent across channels
Input filter failureExcessive noise on one or all channelsCompare noise levels across channels
Multiplexer faultReadings cross-contaminated between channelsApply signal to one channel; observe others
Isolation breakdownOffset changes with common-mode voltageVary sensor ground potential and observe reading
Firmware corruptionInvalid values, status bits erraticModule LED shows error; invalid firmware indication

6.4 Using B&R Diagnostic Tools

B&R provides several diagnostic tools:

  • Automation Studio Diagnostics: Real-time I/O value monitoring, status register inspection
  • Oscilloscope function (X20AI4632): Visualize raw analog waveforms to detect noise, oscillations
  • mapp AlarmX: Configure alarms based on analog status bits (open circuit, limit violations)
  • mapp View: Create HMI screens showing real-time status with color-coded health indicators
  • Web browser diagnostics: Many B&R controllers expose diagnostic web pages for remote monitoring

7. Resolution and Accuracy Specifications

7.1 Understanding Resolution vs. Accuracy

Resolution is the smallest change in the analog input that can be represented in the digital output. It is determined by the ADC bit depth.

Accuracy is the combined effect of all errors (gain, offset, non-linearity, noise, drift) and describes how close the reading is to the true value. Accuracy is always worse than resolution.

7.2 Resolution by Module Type

Module FamilyADC ResolutionEffective ResolutionLSB Size (Voltage)LSB Size (Current)
13-bit (incl. sign)12-bit + sign = 13-bit12-bit2.441 mV (20V range)4.883 uA (20 mA range)
16-bit16-bit16-bit0.305 mV (20V range)0.305 uA (20 mA range)
24-bit (strain gauge)24-bit~20-22 effectiveSub-uVN/A
16-bit (thermocouple)16-bit0.1C or 0.01C1 uV or 2 uV rawN/A
16-bit (RTD)16-bit0.1C0.1 Ohm (Pt100)N/A

7.3 Accuracy Summary

Voltage measurement accuracy (25C):

ModuleGain ErrorOffset ErrorNon-linearityTotal (approx.)
X20AI4622 (13-bit)0.08%0.015%<0.025%~0.12% FS
X20AI4632 (16-bit)~0.1%~0.02%~0.02%~0.14% FS

Current measurement accuracy (25C):

ModuleGain Error (0-20 mA)Gain Error (4-20 mA)Offset Error
X20AI4622 (13-bit)0.08%0.1%0.0375%
X20AI4632 (16-bit)~0.08%~0.08%~0.03%

Thermocouple accuracy (25C, X20AT6402):

TC TypeGain ErrorOffset ErrorTemperature Error at 500C
Type K+/-0.06%+/-0.05%~ +/-0.55C
Type J+/-0.06%+/-0.04%~ +/-0.50C
Type S+/-0.06%+/-0.11%~ +/-0.85C
Type B+/-0.06%+/-0.13%~ +/-0.95C

RTD accuracy (25C, X20AT2222):

ParameterValue
Gain error0.037% of resistance value
Offset error0.0015% of range
Non-linearity<0.001%
Temperature error at 100C~ +/-0.1C

7.4 Total Error Budget

When calculating total measurement uncertainty, combine all error sources:

  1. Module errors (gain, offset, linearity) – from datasheet
  2. Temperature drift errors – calculated from drift coefficients and operating temperature range
  3. Sensor errors – from sensor datasheet (e.g., Class A Pt100: +/-0.15C + 0.002*|t|)
  4. Lead wire errors – for RTD, uncompensated lead resistance
  5. Noise and resolution – typically 1-2 LSB
  6. Calibration reference uncertainty – uncertainty of the calibration standard

Example total error calculation for Pt100 at 300C on X20AT2222:

  • Module gain: 0.037% of 212.05 Ohm = 0.078 Ohm = 0.2C
  • Module offset: 0.0015% of range = negligible
  • Sensor (Class A): +/-0.15C + 0.002*300 = +/-0.75C
  • Module non-linearity: <0.001% = negligible
  • Total (RSS): sqrt(0.2^2 + 0.75^2) = +/-0.78C

7.5 Accuracy Over Temperature

The derating curves in B&R datasheets specify how accuracy degrades at elevated temperatures. For example, the X20AO4622 shows reduced permissible load at temperatures above 50C (horizontal mounting) due to increased power dissipation in the output stage.

For the X20AI4622 operating between 0C and 55C:

  • Worst-case gain drift from 25C reference: 0.006%/C * 30C = 0.18%
  • Worst-case offset drift from 25C reference: 0.002%/C * 30C = 0.06%

8. Sampling Rate and Aliasing Considerations

8.1 Sampling Architecture

B&R analog input modules use two different sampling approaches:

Standard modules (X20AI4622, X20AI4632):

  • SAR ADC with fixed conversion time per channel
  • X20AI4622: 400 us conversion for all 4 inputs (channels sampled sequentially, 200 us offset between channels)
  • Conversion is asynchronous to the network cycle
  • Update rate is determined by bus cycle time (minimum 100 us without filter, 500 us with filter)
  • Minimum I/O update: 300 us (no filter), 1 ms (with filter)

Thermocouple/RTD modules (X20AT6402, X20AT2222):

  • Sigma-delta ADC with configurable filter time
  • All enabled channels are converted during each conversion cycle
  • Conversion time depends on filter setting and number of channels
  • Example: X20AT6402 with 50 Hz filter, 6 channels = 281.4 ms total update

8.2 High-Speed Modules

ModuleMax Sampling RateADC TypeNotes
X20RT8201500 kHz (2 channels)SAR, 13-bitreACTION Technology
X20RT8381500 kHz (2 AI + 1 AO)SAR, 13-bitreACTION Technology
X20CM4800X200-50,000 samples/sConfigurableVibration measurement
X20AI4636Standard + oversamplingSAR, 16-bitOversampling improves SNR
X20AI4632Standard + oscilloscopeSAR, 16-bitOscilloscope capture mode

8.3 Anti-Aliasing Filters

All B&R analog input modules include hardware anti-aliasing filters before the ADC:

Module TypeFilter OrderCutoff Frequency
X20AI4622 (V/I)3rd-order low-pass1 kHz
X20AT6402 (TC)1st-order low-pass500 Hz
X20AT2222 (RTD)1st-order low-pass500 Hz
X20AO4622 (Output)1st-order low-pass10 kHz

The hardware filter attenuates frequencies above the cutoff, preventing aliasing. For the standard 13-bit modules, the 1 kHz third-order filter provides approximately -18 dB/octave rolloff, which combined with the effective sampling rate (minimum 2.5 kHz for 400 us conversion), ensures adequate anti-aliasing for most industrial process signals.

8.4 Nyquist Considerations

For standard process control (voltage/current, 400 us conversion):

  • Effective sampling rate: ~2,500 samples/s per module (all 4 channels within 400 us)
  • Nyquist frequency: ~1,250 Hz
  • With 1 kHz hardware filter: signals up to ~500 Hz are accurately captured
  • Sufficient for virtually all process control applications

For thermocouple measurement (50 Hz filter):

  • Effective sampling rate: 1 channel = 80.4 ms = ~12.4 samples/s
  • Nyquist frequency: ~6.2 Hz
  • Temperature signals typically change at <1 Hz, so this is adequate

For vibration monitoring (X20CM4800X):

  • Configurable 200-50,000 samples/s
  • Anti-aliasing must be considered: with 50,000 samples/s, Nyquist = 25,000 Hz
  • External anti-aliasing filters may be needed if measuring signals above 10 kHz
  • Standard practice: use at least 2.56x oversampling relative to the highest frequency of interest

8.5 Practical Aliasing Mitigation

  1. Use the built-in digital filter to reject high-frequency noise (see Section 12)
  2. Ensure analog signals are bandwidth-limited before reaching the module (shielded cable acts as a low-pass filter for long runs)
  3. For the X20CM4800X vibration module: configure the sampling rate at least 2.56x the maximum frequency of interest
  4. Apply input ramp limiting (X20AI4622) to suppress transient spikes that could alias

9. Cold Junction Compensation for Thermocouple Inputs

9.1 Principle of Cold Junction Compensation

Thermocouples generate a voltage proportional to the temperature difference between the measurement junction (hot) and the reference junction (cold), where the thermocouple wires connect to the copper terminals of the IO module. To determine the absolute temperature at the measurement point, the temperature of the reference junction (the terminal block) must be known and added to the measured temperature difference.

B&R thermocouple modules (X20AT2402, X20AT6402) implement cold junction compensation (CJC) using an integrated PT1000 sensor mounted on the terminal block. The module measures the terminal temperature and applies the correction internally.

9.2 Internal Cold Junction Compensation

How it works on X20AT6402:

  1. The internal PT1000 sensor measures the terminal block temperature
  2. This value is available in the CompensationTemperature register (-250 to +850, representing -25.0 to +85.0C)
  3. During each conversion cycle, the module:
    • Converts all enabled TC channels
    • Measures the terminal temperature (one extra conversion in Function Model 0)
    • Applies the polynomial correction for the TC type (per EN 60584)
    • Adds the cold junction temperature correction
    • Outputs the linearized temperature value

Conversion time impact:

  • Function Model 0 (internal CJC): (n+1) conversions per cycle (n TC channels + 1 terminal temperature)
  • Function Model 1 (external CJC): n conversions per cycle (terminal temperature measurement skipped)

9.3 Cold Junction Compensation Accuracy

The CJC precision depends on thermal conditions:

ConditionCJC Precision (stabilized)
Natural convection+/-2C after 10 minutes
Artificial convection (fan)+/-4C after 10 minutes

Factors affecting CJC accuracy:

  • Self-heating: Other modules on the same X2X Link dissipating heat onto the TC module
  • Air currents: Fans or forced ventilation create temperature gradients across the terminal block
  • Ambient temperature fluctuations: Rapid changes in cabinet temperature cause lag in the CJC sensor
  • Module power dissipation: The X20AT6402 itself consumes 0.91 W (internal I/O)

9.4 Configuring Ambient Conditions

The X20AT6402 provides an “Ambient Conditions” configuration register to adapt the internal CJC thermal model:

ValueAmbient Condition
0000Default (no calculation for adjustment)
0001Power dissipation <0.2 W (neighboring modules)
0010Power dissipation <1 W (neighboring modules)
0011Power dissipation >1 W (neighboring modules)

How to configure: Check the power consumption of the modules immediately adjacent to the X20AT6402 on the X2X Link (from their datasheets). Use the higher value for the setting.

9.5 External Cold Junction Compensation

For improved accuracy or for long thermocouple cable runs, B&R supports external cold junction compensation:

When to use external CJC:

  1. Large distances between the controller and measurement point (copper extension wires from external junction to module)
  2. Adjacent high-power modules (>1 W) are connected to the same X2X Link
  3. Fluctuating ambient conditions (drafts, temperature cycling)
  4. No other modules connected near the TC module

Implementation (using X20AT6402 + X20AT4222):

Measurement Point
    |
    v
[Thermocouple]
    |
    v
External Cold Junction (copper wire extension)
    |
    +--> [X20AT4222 RTD module] measures cold junction temperature
    |         |
    |         v
    |    Register: ExternalCompensationTemperature
    |
    v
[X20AT6402 TC module] uses ExternalCompensationTemperature
    |
    v
Corrected temperature output

Configuration:

  1. Select Function Model 1 on the X20AT6402 (External Cold Junction Temperature)
  2. Measure the cold junction temperature with a separate RTD module (e.g., X20AT4222 with a Pt100 sensor)
  3. Write the cold junction temperature to the ExternalCompensationTemperature register of the X20AT6402
  4. The X20AT6402 will use this value for all channel corrections

B&R recommends connecting the minus input of the thermocouple to the minus input of the power supply module (e.g., X20PS2100) to prevent measurement errors from ripple voltage effects:

[Power Supply X20PS2100]
    |-
    |
    v
[X20AT6402]
    TC1- --> Connected to PS minus input
    TC2- --> Connected to PS minus input
    TC3-
    ...

10. 3-Wire and 4-Wire RTD Measurement

10.1 RTD Wiring Configurations

2-Wire Connection: The simplest but least accurate method. Both the current source and voltage measurement share the same lead wires, so lead wire resistance adds directly to the measured RTD resistance.

Module                    RTD
I+ -------- Lead Wire A --------+
                               RTD Element
I- -------- Lead Wire B --------+

Error = 2 * R_lead. For 10m of 0.5 Ohm/m cable: error = 10 Ohm = ~26C for Pt100.

3-Wire Connection (B&R X20AT2222, X20AI8039): The most common industrial configuration. Two wires carry the excitation current, and the third wire provides a sense connection. If all three wires have equal resistance, the lead resistance cancels out.

Module                    RTD
I+ -------- Lead Wire A --------+
                               RTD Element
Sense ----- Lead Wire B --------+
                               RTD Element (continued)
I- -------- Lead Wire C --------+

The module measures:

  • V1 = V across (RTD + 2 * R_lead) [using I+ and I-]
  • V2 = V across (RTD + R_lead) [using Sense and I-]
  • RTD_resistance = V2 - (V1 - V2) = 2*V2 - V1 (assuming equal lead resistances)

Residual error = R_lead_A - R_lead_C (difference in lead wire resistance). For matched wires: negligible.

4-Wire Connection: The most accurate method, using separate pairs for current excitation and voltage sensing. No lead resistance error.

Module                    RTD
I+ -------- Lead Wire A --------+
                               RTD Element
I- -------- Lead Wire B --------+

V+ -------- Lead Wire C --------+
                               RTD Element (continued)
V- -------- Lead Wire D --------+

Error = 0 (lead resistance fully eliminated). This is used in laboratory and calibration applications.

10.2 B&R Module RTD Wiring Support

Module2-Wire3-Wire4-WireNotes
X20AT2222YesYesNoDedicated RTD module, 2 channels
X20AI8039YesYesNoUniversal module, 8 configurable channels

Note: B&R X20 RTD modules do not natively support 4-wire RTD connections. For 4-wire measurement, a dedicated 4-wire RTD transmitter or signal conditioner can be used to convert to a 4-20 mA signal, which is then connected to a B&R current input module (e.g., X20AI2437).

10.3 RTD Measurement Parameters (X20AT2222)

ParameterValue
Measurement methodConstant current excitation
Excitation current250 uA +/-1.25%
Reference resistor4530 Ohm +/-0.1%
Resistance range (G=1)0.1 to 4500 Ohm
Resistance range (G=2)0.05 to 2250 Ohm
Resolution (Pt100)1 LSB = 0.1C
Resolution (Pt1000)1 LSB = 0.1C
Sensor standardIEC/EN 60751
Conversion procedureSigma-Delta
Filter timeConfigurable 1 ms to 66.7 ms

10.4 Conversion Time for RTD

ChannelsFilter SettingTotal Conversion Time
150 Hz (20 ms)20 ms (Function Model 1) or 40.2 ms (Model 0)
250 Hz (20 ms)80 ms (Function Model 0)

With 2 channels and 50 Hz filter, the update rate is 12.5 Hz, which is more than sufficient for temperature process control.

10.5 Self-Heating Considerations

The 250 uA excitation current causes self-heating in the RTD element. For a Pt100 sensor:

  • At 100C: R = 138.5 Ohm
  • Power dissipation: I^2 * R = (250e-6)^2 * 138.5 = 8.66 uW

This is negligible for most industrial Pt100 sensors in typical mounting configurations (sensor element to sheath thermal resistance is much larger than this would heat).

For Pt1000 sensors (10x the resistance), self-heating is 10x higher (~86.6 uW), still negligible.


11. Current Loop (4-20 mA) Diagnostics

11.1 Current Loop Fundamentals on B&R Modules

The 4-20 mA current loop provides inherent diagnostic capabilities because:

  • 4 mA = live zero (scale minimum): any reading below 4 mA indicates a problem
  • 0 mA = broken wire or no power: definitive open circuit
  • >20 mA = over-range: sensor fault or incorrect calibration

B&R modules leverage this by monitoring the input against configurable limits.

11.2 Open Circuit Detection

B&R analog modules detect open circuits differently depending on the signal type:

Voltage mode (X20AI4622):

  • Open circuit detection is supported via the status register
  • When the input is disconnected, the high-impedance input floats to an undefined voltage
  • The module detects this and sets the status bit to “Open circuit”
  • The analog value is frozen at +32767 (0x7FFF)
  • Per-channel green LED turns off (no green = no signal)

Current mode (X20AI4622):

  • Open circuit detection is based on limit monitoring
  • When the current loop is broken, the current drops to 0 mA
  • For 4-20 mA configuration: values <4 mA can be detected by setting the lower limit to 0 mA (corresponding to INT value -8192)
  • The status bit shows “Lower limit value undershot”

B&R recommended configuration for 4-20 mA open circuit detection:

  1. Set the channel type to “4 to 20 mA current signal”
  2. Set the lower limit value register to -8192 (corresponding to 0 mA)
  3. Monitor the StatusInput register for the “Lower limit value undershot” bit

11.3 Short Circuit Detection

On analog inputs:

  • A short circuit on a voltage input results in 0V reading
  • A short circuit on a current input may cause the current to exceed 20 mA (if the transmitter is not current-limited)
  • B&R modules tolerate up to +/-50 mA on current inputs without damage (input protection)
  • The upper limit monitoring detects readings above 20 mA

On analog outputs (X20AO4622):

  • Outputs are short-circuit proof with current limiting at +/-40 mA
  • This protects both the module and the field wiring
  • A short circuit on a current output will not damage the module

11.4 Diagnostic Status Values

When monitoring detects a fault, B&R modules freeze the analog value at defined error codes:

Error ConditionDigital Value (X20AI4622)
Open circuit+32767 (0x7FFF)
Upper limit exceeded+32767 (0x7FFF)
Lower limit undershot-32767 (0x8001)
Invalid value-32768 (0x8000)

For thermocouple modules (X20AT6402):

Error ConditionValue (0.1C)Value (0.01C)
Open circuit+32767 (0x7FFF)+2,147,483,647
Range overshoot+32767 (0x7FFF)+2,147,483,647
Range undershoot-32767 (0x8001)-2,147,483,647
Invalid value-32768 (0x8000)-2,147,483,648

11.5 Implementing Current Loop Diagnostics in Software

Example ST implementation for 4-20 mA channel monitoring:

FUNCTION CheckCurrentLoop : BOOL
VAR_INPUT
    RawValue : INT;
    Status : USINT;
    Channel : USINT;
END_VAR
VAR
    ChStatus : USINT;
    Shift : USINT;
BEGIN
    Shift := Channel * 2;
    ChStatus := SHR(Status, Shift) AND 16#03;

    CASE ChStatus OF
        0: (* No error - normal operation *)
            CheckCurrentLoop := FALSE;
        1: (* Lower limit undershot - possible open circuit *)
            CheckCurrentLoop := TRUE;
        2: (* Upper limit exceeded - possible short or over-range *)
            CheckCurrentLoop := TRUE;
        3: (* Open circuit - for voltage mode *)
            CheckCurrentLoop := TRUE;
    END_CASE;
END_FUNCTION

11.6 NAMUR NE43 Recommendation

For advanced current loop diagnostics, the NAMUR NE43 standard defines failure modes:

Signal LevelMeaning
< 3.6 mASensor failure / wire break
3.6 - 4.0 mABelow normal range
4.0 - 20.0 mANormal measurement range
20.0 - 21.0 mAAbove normal range
> 21.0 mASensor failure / over-range

To implement NAMUR NE43 on a B&R module:

  • Set the lower limit to detect <4 mA (or <3.6 mA for the first threshold)
  • Use software to check if the raw value is between 3.6 mA and 4 mA (warning zone)
  • The X20AI2438 (HART-capable) provides additional digital diagnostic data from smart transmitters

12. Filter Settings and Response Time Trade-offs

12.1 B&R Module Filter Architecture

B&R analog modules implement a two-stage filtering approach:

  1. Hardware anti-aliasing filter: Fixed 3rd-order (voltage/current modules) or 1st-order (temperature modules) low-pass filter at the ADC input
  2. Digital filter: Configurable first-order IIR filter or input ramp limiter applied after ADC conversion

12.2 Digital Filter on Voltage/Current Modules (X20AI4622)

The X20AI4622 provides a configurable digital filter with two components:

Component 1: Input Ramp Limiting (applied first)

Suppresses transient spikes by limiting the maximum change per cycle:

SettingLimit ValueLSB Change/Cycle
0No limitationUnlimited
116383Large step allowed
28191
34095
42047
51023
6511
7255Small step allowed (aggressive spike suppression)

Component 2: Averaging Filter (applied after ramp limiting)

First-order IIR filter with configurable time constant:

SettingFilter LevelEffective Time Constant
0OffNo filtering
1Level 2~2 bus cycles
2Level 4~4 bus cycles
3Level 8~8 bus cycles
4Level 16~16 bus cycles
5Level 32~32 bus cycles
6Level 64~64 bus cycles
7Level 128~128 bus cycles

Filter formula:

Value_New = Value_Old - (Value_Old / Filter_Level) + (Input_Value / Filter_Level)

This is equivalent to: Value_New = Value_Old * (1 - 1/N) + Input * (1/N), where N is the filter level.

Important constraint: The filter function is disabled for cycle times <500 us. The minimum cycle time with filtering is 500 us.

12.3 Filter Settings on Temperature Modules (X20AT6402, X20AT2222)

Temperature modules offer selectable hardware-level filter time constants:

ValueFilterFilter TimeConverter Resolution
015 Hz66.7 ms16-bit
125 Hz40 ms16-bit
230 Hz33.3 ms16-bit
350 Hz20 ms16-bit (default)
460 Hz16.7 ms16-bit
5100 Hz10 ms16-bit
6500 Hz2 ms16-bit
71000 Hz1 ms16-bit

Default setting: 50 Hz (20 ms) – this is tuned to reject 50 Hz power-line interference, which is the most common noise source in temperature measurements. For 60 Hz regions, use setting 4 (60 Hz, 16.7 ms).

12.4 Response Time Trade-offs

ApplicationRecommended FilterResponse TimeNoise Rejection
Fast process control (pressure, flow)Level 2-42-4 msModerate
Standard process control (level, temperature)Level 8-168-16 msGood
Slow processes (tank temperature)Level 32-6432-64 msVery Good
Very noisy environmentsLevel 64-12864-128 msExcellent
TC measurement (50 Hz rejection)50 Hz (20 ms)20 ms per channelRejects 50 Hz
TC measurement (60 Hz rejection)60 Hz (16.7 ms)16.7 ms per channelRejects 60 Hz

Key trade-off: Higher filter levels (longer time constants) provide better noise rejection but introduce latency. In closed-loop control systems, excessive filtering can cause instability or poor controller performance. The filter time constant should be significantly shorter than the process time constant.

12.5 Using Input Ramp Limiting for Spike Rejection

Input ramp limiting is particularly effective for suppressing:

  • Contact bounce from relay switching
  • Inverter switching noise
  • Electromagnetic pulses from nearby equipment

Example configuration for a noisy 4-20 mA pressure signal:

  • Input ramp limiting = 4 (limit 2047 LSB)
  • Filter level = 16 (16 bus cycles)

This combination will:

  1. Block any single-cycle spike >2047 LSB (approx. 10 mA instantaneous)
  2. Smooth remaining fluctuations over ~16 cycles

12.6 Minimum Cycle Time Impact

ConfigurationMin Cycle TimeMin I/O Update
No filter100 us300 us (all inputs)
With filter500 us1 ms (all inputs)
TC module (any filter)150 usDepends on channels + filter

13. Grounding Best Practices for Analog Signals

13.1 B&R Shield Grounding System

B&R provides a dedicated cable shield grounding clamp (model X20AC0SG1) that latches to the X20 terminal block and connects to the bus module’s ground connection using a cable lug. This provides a proper EMC ground path for cable shields.

Shield grounding clamp specifications:

  • Model: X20AC0SG1 (package of 10 pcs: X20AC0SG1.0010, package of 100: X20AC0SG1.0100)
  • Mounts to X20 terminal block
  • Accepts cable shields from 3 mm to 8 mm diameter (depending on variant)
  • Connects to bus module ground via cable lug

13.2 Shield Wiring Rules for B&R X20

Rule 1: Use shielded cables for all analog signals

The X20 system user’s manual mandates shielded cables for analog input modules. The ground connection for the shield is made on the terminal block shield connections provided on each module.

Rule 2: Single-point shield grounding (default)

Ground the cable shield at one end only – typically at the B&R I/O module (panel end). This prevents ground loops:

Field                      Panel
[Sensor] -- [Shielded Cable] -- [X20 Module]
              |                      |
           Floating              Shield clamp
                                  to bus module ground

Rule 3: Both-end grounding for high-frequency noise (with caution)

For RF interference above 10 MHz, grounding the shield at both ends provides better shielding. However, this creates a ground loop for low-frequency noise. If both-end grounding is required:

  • Use galvanically isolated modules (X20AI2237, X20AI2437) to break the ground loop
  • Or use a shield isolation barrier

Rule 4: Separate analog and digital cable routing

Route analog signal cables separately from:

  • Motor power cables
  • VFD output cables
  • Digital I/O cables with high switching rates
  • Power supply cables

Maintain at least 200 mm separation, or use grounded metallic cable trays as segregation.

Rule 5: Star-point grounding in the panel

All ground connections in the control panel should converge to a single star-point ground bar, which is then connected to the protective earth (PE) at one point. This prevents ground loop currents between different equipment grounds.

13.3 Grounding for Thermocouple Signals

Thermocouple wiring is particularly susceptible to ground loops because the TC junction itself may be grounded (welded to a metal pipe or vessel). B&R recommendations:

  1. Connect the TC minus terminal to the power supply minus (X20PS2100) to prevent ripple coupling
  2. Use shielded twisted-pair thermocouple extension wire
  3. Ground the shield at the module end only
  4. If the TC measurement junction is grounded, ensure the module’s common-mode range is not exceeded (check that the ground potential difference between the TC location and the panel is within +/-15V)

13.4 Grounding for RTD Signals

RTD wiring is less susceptible to noise than thermocouples due to the low impedance of the sensor. However:

  • Use shielded cables for runs >10m
  • Ground the shield at one end only
  • Ensure all three wires in a 3-wire connection have equal length and routing

13.5 Grounding for 4-20 mA Current Loops

Current loops are inherently immune to ground-loop-induced voltage noise (since the signal is a current, not a voltage). However:

  • The transmitter (sensor) and receiver (B&R module) may have different ground references
  • Use shielded twisted-pair cable
  • Ground the shield at the panel end (B&R module)
  • If using 2-wire transmitters, ensure the loop power supply can drive the total loop resistance

13.6 B&R Coated Modules (X20c) for Harsh Environments

B&R offers coated X20c modules with a protective conformal coating for the electronics. The coating protects against:

  • Condensation (certified per BMW GS 95011-4)
  • Corrosive gases (certified per EN 60068-2-60, method 4, 21 days exposure)

Coated modules are electrically and functionally identical to standard X20 modules. They require the same grounding practices but offer additional reliability in harsh environments.

13.7 EMC Installation Guide Reference

B&R publishes a dedicated Installation / EMC Guide (document MAEMV) that covers:

  • Panel layout and cable routing
  • Shield termination methods
  • Ground bar installation
  • Filter placement
  • EMC testing and verification

This document should be consulted for new installations and when troubleshooting EMC-related analog signal issues.


14. Calibration Certification and Traceability

14.1 B&R Factory Calibration and Certificates

B&R analog modules are calibrated during manufacturing with reference standards traceable to national and international standards (SI units). The calibration process includes:

  1. Gain calibration: Applying known reference signals at multiple points across the measurement range
  2. Offset calibration: Verifying the zero/offset point
  3. Linearity verification: Checking linearity across the full range
  4. Temperature testing: Verifying specifications over the operating temperature range
  5. EMC testing: Ensuring accuracy is maintained under electromagnetic stress

Documentation supplied with each module:

  • Certificate of Conformance (CoC): Confirms the module meets all published specifications
  • Test report: Available upon request, containing measured performance data
  • Traceability chain: Calibration standards used are traceable to national metrology institutes (e.g., PTB in Germany, BEV in Austria)

14.2 ISO/IEC 17025 Calibration

For applications requiring formal calibration certification (pharmaceutical, food & beverage, aerospace, nuclear):

Option 1: Third-party calibration laboratory

  • Send the B&R module to an ISO/IEC 17025 accredited calibration laboratory
  • The lab will verify all analog specifications using their traceable standards
  • A calibration certificate is issued with:
    • Measurement results (as-found and as-left data)
    • Uncertainty of measurement for each point
    • Traceability statement
    • Environmental conditions during calibration
    • Accreditation body and certificate number
    • Validity period and recommended recalibration interval

Option 2: B&R factory recalibration

  • Contact B&R Support Portal or Material Return Portal
  • B&R can recalibrate modules at their facility in Eggelsberg, Austria
  • Module firmware is updated with new calibration coefficients if needed

Option 3: In-house calibration (if accredited)

  • If your facility has an ISO 17025 accredited metrology lab
  • Perform verification per the procedures in Section 3 of this document
  • Issue calibration certificates under your lab’s accreditation scope

14.3 Calibration Intervals

Recommended recalibration intervals for B&R analog modules:

Module TypeRecommended IntervalNotes
Standard V/I (X20AI4622, X20AO4622)2-3 yearsStable SAR ADC technology
High-precision (X20AI4632, 16-bit)1-2 yearsHigher resolution shows drift sooner
Thermocouple (X20AT6402)1-2 yearsCJC sensor may drift
RTD (X20AT2222)2-3 yearsVery stable sigma-delta + current source
Strain gauge (X20AI1744)1 yearHighest precision, most sensitive to drift
Safety-rated (X20SA4430)Per SIL requirementsMay require annual verification

14.4 Traceability Chain

International Bureau of Weights and Measures (BIPM)
    |
    v
National Metrology Institute (e.g., NIST, PTB, BEV)
    |
    v
Calibration Laboratory (ISO 17025 accredited)
    |
    v
Reference Standards (multifunction calibrator, decade box, etc.)
    |
    v
B&R Analog Module Under Test
    |
    v
Process Measurement (connected to field sensor)

14.5 Calibration Record Keeping

Maintain calibration records including:

  • Module serial number and B&R ID code
  • Calibration date and next due date
  • Calibrating organization (with accreditation number)
  • As-found data (measurements before any adjustment)
  • As-left data (measurements after calibration)
  • Uncertainty of measurement at each test point
  • Environmental conditions during calibration
  • Reference standards used (with their calibration dates)
  • Technician name and approval signature

14.6 Uncertainty Budget for Analog Verification

When performing calibration verification, the total measurement uncertainty includes:

Source of UncertaintyTypical Value
Calibration standard (multifunction calibrator)0.01-0.05%
Resolution of standard0.001-0.01%
Connection/lead resistanceNegligible (voltage), 0.01% (current)
Environmental temperature effect on standard0.005-0.02%
Repeatability0.01-0.05%
B&R module resolution0.003% (16-bit) to 0.015% (13-bit)
Combined (RSS)0.02-0.08%

The calibration uncertainty should be significantly smaller than the module’s specification (typically at least a 4:1 TUR – Test Uncertainty Ratio).


Appendix A: B&R Analog Module Quick Reference

Voltage/Current Input Modules

ModelChSignalResolutionFilterSpecial
X20AI22222+/-10V13-bitConfigurable
X20AI22372+/-10V16-bitConfigurableGalvanically isolated, NetTime
X20AI232220-20/4-20mA12-bitConfigurable
X20AI243724-20mA16-bitConfigurableGalvanically isolated, NetTime
X20AI243824-20mA16-bitConfigurableGalvanically isolated, HART, NetTime
X20AI26222+/-10V, 0-20/4-20mA13-bitConfigurable
X20AI26322+/-10V, 0-20mA16-bitConfigurableOscilloscope
X20AI26362+/-10V, 0-20mA16-bitConfigurableOversampling
X20AI42224+/-10V13-bitConfigurable
X20AI432240-20/4-20mA12-bitConfigurable
X20AI46224+/-10V, 0-20/4-20mA13-bitConfigurable
X20AI46324+/-10V, 0-20mA16-bitConfigurableOscilloscope
X20AI46364+/-10V, 0-20mA16-bitConfigurableOversampling
X20AI80398+/-10V, 0-20/4-20mA, Pt100/100016-bitConfigurableUniversal

Voltage/Current Output Modules

ModelChSignalResolutionProtectionSpecial
X20AO46224+/-10V, 0-20/4-20mA13-bitShort-circuit proof
X20AO243724-20/0-20/0-24mA16-bitShort-circuit proofGalvanically isolated

Temperature Input Modules

ModelChSensor TypeResolutionFilterSpecial
X20AT22222Pt100/Pt100016-bit (0.1C)1-66.7 ms2 or 3-wire
X20AT24022J, K, N, S, B, R16-bit (0.1C)1-66.7 msInternal CJC
X20AT64026J, K, N, S, B, R16-bit (0.1/0.01C)1-66.7 msInternal CJC, external CJC

Appendix B: Common Error Codes and Troubleshooting

SymptomModule Status LEDChannel LEDRegister StatusLikely CauseAction
No readingOffOffNo powerCheck 24V supply and bus module
All channels maxedGreen (flashing)BlinkingUpper limit exceededCommon-mode overvoltageCheck input wiring
One channel stuck highGreenOff/BlinkingOpen circuit (11)Wire breakCheck sensor connection
One channel stuck lowGreenBlinkingLower limit undershot (01)Short circuitCheck sensor wiring
Erratic readingsGreenSolidNo error (00)Noise/groundingCheck shields, grounding
Module error LEDRed (solid)General faultFirmware/hardwareRestart, reflash firmware
Invalid firmwareRed + Green flashInvalidCorrupt firmwareReflash via Automation Studio

Appendix C: Register Quick Reference

X20AI4622 Key Registers

RegisterNameTypeAccessDescription
ConfigOutput01Input FilterUSINTR/WFilter level + ramp limiting
ConfigOutput02Channel TypeUSINTR/WVoltage/current per channel
ConfigOutput03Lower LimitINTR/WLower limit value (all channels)
ConfigOutput04Upper LimitINTR/WUpper limit value (all channels)
AnalogInput01-04Input ValuesINTRConverted analog values
StatusInput01Channel StatusUSINTRError status per channel

X20AT6402 Key Registers

RegisterNameTypeAccessDescription
ConfigOutput01Filter/AmbientUSINTR/WFilter setting + ambient conditions
ConfigOutput02Sensor TypeUSINTR/WTC type per channel (J/K/S/N/R/B/raw)
ConfigOutput03Channel DisableUSINTR/WEnable/disable individual channels
Temperature01-06TC ValuesINTRTemperature in 0.1C
Temperature01-06_H_ResTC High ResDINTRTemperature in 0.01C
StatusInput01Status Ch 1-4USINTRError status per channel
StatusInput02Status Ch 5-6USINTRError status per channel
CompensationTemperatureCJC ValueINTRInternal terminal temperature (-25.0 to 85.0C)

Cross-References


Document compiled from B&R Automation official datasheets, X20 system user’s manuals, and installation/EMC guides. All specifications are subject to change – refer to the latest B&R documentation at br-automation.com for current values.

Sources: X20(c)AI4622 Data Sheet V3.40, X20(c)AT6402 Data Sheet V3.22, X20AT2402 Data Sheet V3.09, X20AT2222 Product Page, X20(c)AO4622 Data Sheet V3.25, B&R X20 System User’s Manual, B&R Installation/EMC Guide.


Key Findings

  1. Analog card resolution ranges from 12-bit to 16-bit depending on module (e.g., X20AI4622 = 13-bit incl. sign, X20AI4632 = 16-bit, X20AI2322 = 12-bit). Higher resolution is critical for precision measurement but requires better signal conditioning. See Appendix A for the full module reference table.
  2. Distinguishing sensor faults from IO card faults requires a systematic approach: check with a known reference signal, swap channels on the same module, and inspect the analog LED diagnostic patterns.
  3. Noise and grounding issues are the most common cause of analog reading errors — always check shield termination and grounding before suspecting the IO card or sensor. See grounding-emc.md.
  4. B&R analog input modules use software-configurable ranges (0-10V, +/-10V, 0/4-20mA) — an incorrect range setting on an undocumented machine can cause readings to appear wrong when the hardware is fine.
  5. B&R analog modules are factory-calibrated with digital calibration coefficients stored in the module’s internal memory. When replacing a module, the new module has its own factory calibration — you verify it, you don’t re-program it. Document your verification results before and after any analog module replacement.
  6. Thermocouple cold junction compensation is built into B&R temperature modules — incorrect thermocouple type selection (J/K/S/R/T/B/N) produces readings that are wrong by a predictable offset, not random noise.

B&R Serial Communication Diagnostics — Complete Reference

Serial communication (RS232 and RS485) remains pervasive on legacy B&R machines, connecting the PLC to drives, scales, barcode readers, operator terminals, and other devices. When serial communication fails, the symptoms can range from intermittent data corruption to complete device unresponsiveness — and the original device specifications are almost never available. This document covers how to sniff serial traffic between the PLC and serial-connected devices, common B&R serial protocol patterns, how to decode the data streams, and how to replace or reconfigure serial connections when the original setup is unknown. Cross-references: cp1584-hardware-ref.md for RS232/RS485 hardware details, io-sniffing.md for general sniffing techniques, and modbus-gateway.md for Modbus serial gateway configuration.

Table of Contents

  1. Overview of B&R Serial Communication
  2. B&R Hardware Platforms and Serial Capabilities
  3. Serial Interface Modules: System 2003 / 2005
  4. Serial Interface Modules: X20 System
  5. Wiring and Pinouts for RS232 and RS485
  6. Baud Rate, Parity, and Stop Bit Configuration
  7. Flow Control and Handshake Issues
  8. B&R Software Libraries for Serial Communication
  9. How to Sniff Serial Traffic Between PLC and Serial-Connected Devices
  10. Tools for Serial Sniffing
  11. How to Decode Serial Data
  12. Protocol Analysis: MODBUS RTU Over Serial
  13. Protocol Analysis: Custom ASCII and Binary Protocols
  14. Reconfiguring or Replacing Serial Connections When Specs Are Unknown
  15. Serial-to-Ethernet Conversion Options
  16. Common Serial Communication Failures and Debugging
  17. Troubleshooting Matrices
  18. References and Further Reading

1. Overview of B&R Serial Communication

B&R Automation (Bernecker + Rainer) industrial controllers use serial communication (RS232, RS485, RS422) extensively for connecting to third-party devices — sensors, drives, HMIs, barcode readers, weigh scales, temperature controllers, and more. Understanding how to diagnose, sniff, and decode serial traffic is critical when commissioning systems, troubleshooting intermittent failures, or reverse-engineering undocumented connections.

B&R serial communication spans three major hardware families:

  • System 2003 — compact DIN-rail controllers with integrated or plug-in serial modules
  • System 2005 — modular rack-based controllers with interface modules (IF260, IF671, IF622, etc.)
  • X20 System — modular I/O with base modules providing integrated serial, plus dedicated communication interface modules (X20CS1020, X20IF1030, X20IF1082, etc.)

On the software side, two primary libraries handle serial I/O:

  • DV_Frame — general-purpose raw serial frame I/O (user-defined protocols, ASCII, binary)
  • DRV_mbus — Modbus RTU master/slave with automatic CRC and function code handling

2. B&R Hardware Platforms and Serial Capabilities

2.1 X20CP1584 / X20CP1585 / X20CP1586

The X20CP158x series are compact X20 CPUs with integrated serial and Ethernet:

InterfaceTypeConnectionMax DistanceMax Rate
IF1RS23212-pin terminal block X20TB1215 m115.2 kbit/s
IF2Ethernet (10/100/1000)RJ45100 m1 Gbit/s

IF1 RS232 Pinout on X20TB12 terminal block:

TerminalSignalDirection
9TxD (Transmit Data)Output from PLC
10RxD (Receive Data)Input to PLC
11GND (Signal Ground)Reference
12Shield / FE (Functional Earth)Chassis/shield

The RS232 interface is not electrically isolated from the PLC logic on most X20CP158x models. Use shielded cable with shield bonded at one end only to prevent ground loops.

2.2 X20CP1484 / X20CP1485 / X20CP1486

Similar to the 158x series but with Ethernet limited to 10/100 Mbit/s on IF2. IF1 is RS232 via the same X20TB12 terminal block pinout.

2.3 X20CP0482 / X20CP0484

Entry-level X20 CPUs. The serial interface is provided by the base module (X20BB52) and exposed on the power supply module’s (X20PS9600) terminal block. IF1 = RS232 at up to 115.2 kbit/s.

2.4 CP476 (System 2003)

Compact controller with integrated serial port. Uses DB9 connector for RS232:

  • Pin 2: TXD (Transmit)
  • Pin 3: RXD (Receive)
  • Pin 5: GND (Signal Ground)

Supports both RS232 and RS485 depending on model variant. Programmed using the DV_Frame library.

2.5 Base Modules with Integrated Serial (X20 System)

A critical architectural detail: on the X20 system, the integrated serial interface lives on the base module, not on the power supply module:

Base ModuleIntegrated SerialInterface TypeMax Rate
X20BB52COM1 (RS232)RS232115.2 kbit/s
X20BB62NonePower feed only
X20BB72COM1 (RS232)RS232115.2 kbit/s
X20BB82COM1 (RS232/RS422/RS485)Software-selectable115.2 kbit/s

The X20PS9600 power supply module passes the RS232 signals from the base module to its terminal block. A second X20PS9600 will not provide a second serial port — each X20 segment allows exactly one PS module.


3. Serial Interface Modules: System 2003 / 2005

3.1 IF260 — Programmable Interface Module

The IF260 (3IF260.60-1) is a System 2005 interface module that can function as either a CPU or as a programmable interface processor. The module auto-detects its operating mode from the slot position:

  • Slot 0 — operates as a CPU
  • Other slots — operates as a programmable interface processor

This allows the IF260 to offload serial communication processing from the main CPU. It runs its own Automation Basic program and can handle multiple serial protocols independently.

3.2 IF622 — Triple Serial Interface (1×RS232, 2×RS485/RS422)

The IF622 (3IF622.9) provides:

  • IF1: 1× RS232 interface
  • IF2, IF3: 2× RS485/RS422 interfaces

All interfaces are electrically isolated. Used in System 2005 racks for expanding serial connectivity beyond what the CPU provides natively.

3.3 IF671 — Triple Communication Module (RS232, RS485/RS422, CAN)

The IF671 (3IF671.9) provides three isolated communication interfaces on a single module:

  • IF1: RS232
  • IF2: RS485/RS422
  • IF3: CAN bus

This is the most versatile serial interface module for System 2005, covering RS232 point-to-point, RS485 multi-drop, and CAN bus in one card.

3.4 IF261 / IF262 / IF3xx Series

  • IF261 — CPU module variant for System 2003/2005
  • IF262 — Interface processor for serial protocols
  • IF3xx series — Various interface modules for specific fieldbus protocols (Profibus DP, CANopen, DeviceNet) with optional serial sub-interfaces

3.5 CP260 — Serial + CAN Interface Module

The CP260 (3CP260.60-1) provides:

  • 1× RS485/RS422 interface
  • 1× CAN interface

Used as a compact interface processor or standalone communication node.


4. Serial Interface Modules: X20 System

4.1 X20CS1020 — RS232/RS422/RS485 Communication Module

ParameterValue
Interface standardEIA-232-F / EIA-422 / EIA-485
ConfigurationSoftware selectable (no DIP switches)
Max baud rate115.2 kbit/s
HandshakeRTS/CTS or XON/XOFF (RS232 mode)
Bus connectionX2X Link to local controller
Electrical isolationYes

Device name in Automation Studio: CS1020_IF1

This is the standard choice for adding a second serial port to an X20 controller when the base module’s integrated port is already in use.

4.2 X20IF1030 — RS232 Interface Module

ParameterValue
Interface standardEIA-232-F
Max baud rate115.2 kbit/s
Connector9-pin D-Sub female
Electrical isolationNo

Designed for point-to-point RS232 serial connections. Note: The X20IF1030 is RS232 only — do not confuse it with the X20IF1031 (RS422/RS485) or X20IF1041 (RS422/RS485 isolated). For multi-drop RS485 networks, use X20IF1031 or X20IF1041. See modbus-gateway.md for the complete serial module comparison.

4.3 X20IF1082 — Configurable RS232/RS485

Single configurable channel supporting either RS232 or RS485 communication. Software-configurable interface standard.

4.4 X20IF1072 — RS485 Interface Module

Dedicated RS485 interface for the X20 system. Used for serial remote connection of complex devices.

4.5 X20PS9600 — Power Supply (Serial Pass-Through)

Not a serial module itself — the X20PS9600 passes RS232 signals from the base module (e.g., X20BB52) to its terminal block:

TerminalSignalDirection
1+24 VDCInput (field supply)
20 VDCInput (field return)
9TxD (RS232)Output
10RxD (RS232)Input
11GNDSignal ground
12Shield / FEFunctional Earth

5. Wiring and Pinouts for RS232 and RS485

5.1 RS232 DB9 Standard Pinout (Male Connector, DTE Side)

PinSignalAbbreviationDirection (DTE)
1Data Carrier DetectDCDInput
2Received DataRXDInput
3Transmitted DataTXDOutput
4Data Terminal ReadyDTROutput
5Signal GroundGND
6Data Set ReadyDSRInput
7Request To SendRTSOutput
8Clear To SendCTSInput
9Ring IndicatorRIInput

5.2 RS232 Wiring: Straight-Through vs Null-Modem

Straight-through cable (PC/PLC to modem/peripheral):

DTE (PLC)          DCE (Device)
Pin 3 (TXD)  →   Pin 2 (RXD)
Pin 2 (RXD)  ←   Pin 3 (TXD)
Pin 5 (GND)  —   Pin 5 (GND)

Null-modem cable (PLC to PLC, or PLC to PC configured as DTE):

Device A            Device B
Pin 3 (TXD)  →   Pin 2 (RXD)    (crossed)
Pin 2 (RXD)  ←   Pin 3 (TXD)    (crossed)
Pin 5 (GND)  —   Pin 5 (GND)    (straight)
Pin 7 (RTS)  →   Pin 8 (CTS)    (crossed)
Pin 8 (CTS)  ←   Pin 7 (RTS)    (crossed)

5.3 RS485 Wiring

RS485 uses differential signaling (A/B or +/−) and supports multi-drop (up to 32 devices on a single bus):

                    120Ω
Master ──── A ───────────────── A ──── Slave 1
         │                             │
         └──── B ───────────────── B ─┘
               │                     │
              GND                   GND
                                           120Ω (at far end)

RS485 connection rules:

  • Use twisted pair cable (e.g., 1 pair of Cat5e or dedicated RS485 cable)
  • 120 Ω termination resistors at both ends of the bus
  • Common ground connection recommended but keep ground currents minimized
  • Maximum cable length depends on baud rate (EIA-485 standard, twisted-pair cable, 120 Ω termination):
    • 115.2 kbit/s → max ~200 m (conservative: 100 m in noisy environments)
    • 19.2 kbit/s → max ~1000 m
    • 9600 baud → max ~1200 m

5.4 B&R X20 Terminal Block Serial Wiring

For X20CP1584 and similar CPUs using X20TB12:

  • TxD connects to terminal 9
  • RxD connects to terminal 10
  • GND connects to terminal 11
  • Shield connects to terminal 12 (FE)

Use shielded twisted pair cable (LiYCY 3×2×0.14 mm²). Bond shield to FE at the cabinet entry only — do not ground both ends.

5.5 RJ45 to DB9 RS232 Adapter (Common for B&R Field Wiring)

Some B&R installations use RJ45 connectors for serial field wiring. A common mapping:

RJ45 PinDB9 PinSignal
18 (CTS)Clear To Send
26 (DSR)Data Set Ready
32 (RXD)Receive Data
420 (DTR)Data Terminal Ready
53 (TXD)Transmit Data
65 (GND)Signal Ground
77 (RTS)Request To Send
84 (DTR)Data Terminal Ready

Note: RJ45-to-serial pinout varies by manufacturer. Always verify with a multimeter before connecting.


6. Baud Rate, Parity, and Stop Bit Configuration

6.1 Standard Configuration Parameters

ParameterStandard ValuesCommon Industrial Setting
Baud rate300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 1152009600 (most common), 19200, 38400
Data bits7, 88
ParityNone, Even, Odd, Mark, SpaceNone or Even
Stop bits1, 21 (or 2 with parity=Even at 9600 → “9600-8-E-1”)

6.2 Common Configurations

NotationBaudDataParityStopUse Case
9600-8-N-196008None1Most common default; Modbus RTU, generic sensors
19200-8-N-1192008None1Faster sensors, HMIs
9600-8-E-196008Even1Modbus RTU with error detection
9600-7-E-196007Even1Legacy serial devices
115200-8-N-11152008None1High-speed serial, programming ports

6.3 Configuring in B&R Automation Studio

In the IO Configuration view, set the serial port properties:

ParameterAutomation Studio Setting
Device nameIF1, CS1020_IF1, etc.
Baud rateInteger (9600, 19200, etc.)
Data bits8 (or 7)
ParitydvPARITY_NONE, dvPARITY_EVEN, dvPARITY_ODD
Stop bits1 (or 2)
HandshakedvHANDSHAKE_NONE, dvHANDSHAKE_RTSCTS

In code (DV_Frame):

openInfo.baudrate   := 9600;
openInfo.dataBits   := 8;
openInfo.parity     := dvPARITY_EVEN;
openInfo.stopBits   := 1;
openInfo.handshake  := dvHANDSHAKE_NONE;

In code (DRV_mbus for Modbus RTU):

openInfo.baudrate   := 9600;
openInfo.parity     := dvPARITY_EVEN;   (* Modbus RTU commonly uses Even parity *)

6.4 Maximum Baud Rates by B&R Hardware

HardwareMax Baud Rate
X20CP1584 IF1 (RS232)115.2 kbit/s
X20CS1020115.2 kbit/s
X20IF1030 (RS232)115.2 kbit/s
IF622, IF671115.2 kbit/s
System 2003 CP modules115.2 kbit/s

7. Flow Control and Handshake Issues

7.1 Types of Flow Control

TypeMethodUse Case
NoneNo flow controlMost industrial devices, short cables, well-matched speeds
Hardware (RTS/CTS)PLC asserts RTS when ready to receive; device asserts CTS when readyHigh-speed links, large data transfers, printers
Software (XON/XOFF)Embedded control characters (0x11/0x13) in data streamLegacy systems, avoid in binary protocols
DSR/DTRPeripheral signals ready stateModems, some legacy equipment

7.2 Common Handshake Problems

ProblemSymptomCauseFix
RTS/CTS not connectedPartial data, truncated framesMissing handshake lines in cableAdd RTS/CTS wires or disable handshake
CTS held lowNo data transmittedDevice not asserting CTSCheck device ready state, disable RTS/CTS
RTS/CTS polarity mismatchData flow stopsSome devices use inverted RTS/CTSUse null-modem adapter with crossed handshake lines
XON/XOFF in binary dataCommunication corruptionBinary data contains 0x11/0x13 bytesDisable XON/XOFF; use hardware handshake or none

7.3 B&R-Specific Flow Control Notes

  • X20BB52 base module exposes RTS and CTS on the PS9600 terminal block (check exact pin assignment in datasheet)
  • X20CS1020 supports RTS/CTS and XON/XOFF in RS232 mode
  • For Modbus RTU over RS485, flow control is typically None — the protocol handles framing via 3.5 character silent intervals
  • When using DV_Frame with dvHANDSHAKE_RTSCTS, the library manages RTS automatically

8. B&R Software Libraries for Serial Communication

8.1 DV_Frame Library

The DV_Frame library is the primary general-purpose serial communication library for B&R controllers. It provides raw frame-level access to serial ports.

Key Functions:

FunctionPurpose
DV_FrameOpenOpen serial port with configuration (baud, parity, data bits, stop bits, handshake)
DV_FrameWriteWrite raw bytes to serial port
DV_FrameReadRead bytes with configurable terminators (CRLF, timeout, length)
DV_FrameCloseClose serial port and release handle
DV_FrameIoctlIoctl-level control (line status, buffer flush, break signal)

Modes:

  • dvFRAME_MODE_RAW — raw byte I/O, no protocol framing
  • Terminator options: dvFRAME_TERMINATOR_CRLF, dvFRAME_TERMINATOR_LF, custom delimiter

Example — Opening a Serial Port:

VAR
    fbFrame   : DV_FrameOpen_Type;
    openInfo  : DV_FrameOpen_Info_Type;
    rxBuffer  : ARRAY[0..63] OF USINT;
    rxLen     : UDINT;
    handle    : UDINT;
END_VAR

openInfo.deviceName   := 'IF1';
openInfo.mode          := dvFRAME_MODE_RAW;
openInfo.baudrate      := 9600;
openInfo.dataBits      := 8;
openInfo.parity        := dvPARITY_NONE;
openInfo.stopBits      := 1;
openInfo.handshake     := dvHANDSHAKE_NONE;
openInfo.rxBufferSize  := SIZEOF(rxBuffer);
openInfo.rxBuffer      := ADR(rxBuffer);

DV_FrameOpen(fbFrame, openInfo);
IF fbFrame.status = 0 THEN
    handle := fbFrame.handle;
END_IF

Example — Sending a Query:

VAR
    fbWrite   : DV_FrameWrite_Type;
    query     : USINT := 16#52;  (* 'R' = ASCII 0x52 *)
END_VAR

DV_FrameWrite(fbWrite, handle, ADR(query), 1);

Example — Reading a CRLF-Terminated Response:

VAR
    fbRead : DV_FrameRead_Type;
END_VAR

DV_FrameRead(fbRead, handle, ADR(rxBuffer), SIZEOF(rxBuffer), rxLen,
             dvFRAME_TERMINATOR_CRLF);
IF fbRead.status = 0 THEN
    (* rxBuffer[0..rxLen-1] contains the response *)
END_IF

8.2 DRV_mbus Library (Modbus RTU)

The DRV_mbus library provides Modbus RTU master and slave functionality with automatic CRC-16 handling.

Key Functions:

FunctionPurpose
DRV_mbusOpenOpen Modbus RTU channel (master or slave mode)
DRV_mbusReadRegRead holding registers (FC03) or input registers (FC04)
DRV_mbusWriteRegWrite single register (FC06) or multiple registers (FC16)
DRV_mbusCloseClose Modbus channel

Example — Modbus RTU Master:

VAR
    fbMbus   : DRV_mbusOpen_Type;
    fbRead   : DRV_mbusReadReg_Type;
    openInfo : DRV_mbusOpen_Info_Type;
    regValue : UINT;
END_VAR

openInfo.deviceName := 'IF1';
openInfo.mode       := dvMBUS_MODE_RTU_MASTER;
openInfo.baudrate   := 9600;
openInfo.parity     := dvPARITY_EVEN;
openInfo.timeout    := 500;  (* ms *)

DRV_mbusOpen(fbMbus, openInfo);
IF fbMbus.status = 0 THEN
    DRV_mbusReadReg(fbRead, fbMbus.handle,
                    slaveAddr := 1,
                    funcCode  := dvMBUS_FC04_INPUT,
                    regAddr   := 16#0001,
                    regQty    := 1,
                    pData     := ADR(regValue),
                    dataLen   := SIZEOF(regValue));
END_IF

8.3 Choosing Between DV_Frame and DRV_mbus

CriterionUse DV_FrameUse DRV_mbus
ProtocolCustom/proprietary, ASCII, binaryModbus RTU
CRC handlingManualAutomatic
Frame delimitersConfigurable3.5 char silent interval
ComplexityHigher (you build the protocol)Lower (function call API)

9. How to Sniff Serial Traffic Between PLC and Serial-Connected Devices

9.1 Why Sniff Serial Traffic?

  • Determine unknown protocol parameters (baud rate, parity, framing)
  • Capture request/response patterns for reverse engineering
  • Debug intermittent communication failures
  • Verify PLC program behavior against expected protocol
  • Identify timing issues, bus contention, or signal integrity problems

9.2 Methods for Sniffing

Method 1: Hardware Tap (Non-Intrusive — RS232 Only)

For RS232 point-to-point connections, insert a Y-cable or hardware tap between the PLC and the device:

PLC TXD ────────────────────── Device RXD
          │
          └──── Sniffer RXD

PLC RXD ────────────────────── Device TXD
          │
          └──── Sniffer TXD

Hardware needed:

  • Passive RS232 monitor Y-cable (3-plug DB9)
  • Or build one: connect sniffer’s RXD to both TXD lines (with diodes for isolation)

Limitations: RS232 only (voltage levels must be compatible). Cannot easily tap RS485 mid-bus without disturbing differential signaling.

Method 2: RS485 Tap (Intrusive but Low-Impact)

For RS485 multi-drop buses:

  • Connect the sniffer as an additional node on the bus with a high-impedance RS485 transceiver
  • The sniffer listens only (never transmits) to avoid disturbing bus traffic
  • Ensure proper 120 Ω termination is maintained

Method 3: Oscilloscope / Logic Analyzer (Non-Intrusive)

Connect probes to the TXD/RXD (RS232) or A/B (RS485) lines. This is the best method because:

  • No electrical loading of the bus
  • Captures exact timing and signal integrity
  • Can detect electrical noise, reflections, and voltage levels
  • Works for both RS232 and RS485

Method 4: Software Sniffer (Windows PC)

If the serial traffic passes through a PC (e.g., USB-to-serial adapter):

  • Install a serial port monitor driver that intercepts IOCTL calls
  • Tools: HHD Serial Port Monitor, COM Sniffer, Serial Port Monitor (eltima)
  • These capture all read/write operations at the driver level
  • Non-intrusive to the application but requires the traffic to pass through the monitored PC

9.3 Sniffing B&R PLC Serial Traffic

B&R PLCs run their own real-time OS, so software-based sniffing directly on the PLC is not possible with standard tools. To sniff traffic from a B&R controller:

  1. Hardware approach (recommended): Use a logic analyzer or oscilloscope on the serial lines
  2. Y-cable approach (RS232): Insert a passive tap between PLC and device, connect to a PC running serial terminal software
  3. B&R diagnostic approach: Add logging in the PLC program using DV_Frame to echo both TX and RX data to a second serial port or to Ethernet
  4. Modbus diagnostic: Use DRV_mbus built-in error counters to track CRC errors, timeouts, and exception codes

10. Tools for Serial Sniffing

10.1 Software Tools

ToolPlatformKey FeaturesBest For
HHD Serial Port MonitorWindowsNon-intrusive driver-level sniffing, multiple view modes (table, dump, terminal), Modbus RTU/ASCII decoding, session recordingGeneral RS232/RS485 debugging on PC
Serial Port Monitor (eltima)WindowsCOM port interception, data filtering, IRP/IOCTL tracking, Modbus RTU decodeDeep protocol analysis on Windows
COM SnifferWindowsLogs data, IOCTLs, and signals; works on ports already in useMonitoring already-open COM ports
SerialToolmacOS/Linux/WindowsCOM sniffer with multi-platform support, data loggingCross-platform serial monitoring
Free Serial AnalyzerWindowsNon-intrusive RS232/RS422/RS485 packet snifferBudget option
PuTTY / TeraTermWindows/LinuxTerminal emulation for raw serial monitoringSimple connect-and-observe
RealTermWindowsSerial terminal with hex display, logging, macro scriptingBinary protocol debugging

10.2 Hardware Tools

ToolKey FeaturesBest For
Saleae Logic / Logic 28–16 channel digital logic analyzer with async serial protocol decode, Modbus RTU analyzer, export to CSVTiming analysis, protocol decode, baud rate verification
Sigrok / PulseViewOpen-source logic analyzer software supporting many hardware probesBudget logic analysis, open-source workflow
PicoScopeOscilloscope with serial protocol decoding (RS232, RS485, Modbus, CAN)Signal integrity + protocol decode in one tool
Bus PirateMulti-protocol tool supporting UART, SPI, I2C, raw binary; can sniff and injectReverse engineering, protocol exploration
RS232 / RS485 breakout boxInline connector with LEDs for TXD/RXD/CTS/RTS statusQuick visual verification of signal activity
USB-to-Serial adapter + software snifferFTDI/CH340 adapter to capture traffic on PCSoftware-level monitoring when traffic routes through PC

10.3 Saleae Logic Analyzer for Serial Protocol Decode

Saleae Logic analyzers (Logic 4, Logic 8, Logic Pro 8/16) can read and decode RS232, RS485, and RS422 signals up to ±25V:

Setup steps:

  1. Connect ground probe to circuit ground
  2. Connect channel probes to TXD and RXD (RS232) or A and B (RS485 differential pair)
  3. For RS232: Use the “Async Serial” analyzer with correct baud rate, parity, stop bits
  4. For RS485: May require RS485-to-TTL receiver chip to convert differential to logic levels
  5. Set up “Modbus RTU” analyzer on top of the async serial decode for Modbus devices

What you get:

  • Decoded hex/ASCII data in real time
  • Timing measurements between frames
  • Protocol-level decode (Modbus function codes, register addresses, CRC)
  • Export to CSV, JSON, or screenshot for documentation

11. How to Decode Serial Data

11.1 Step-by-Step Decode Process

Step 1: Capture Raw Data

Use a logic analyzer or serial sniffer to capture the raw bitstream. Record:

  • All bytes in hex format
  • Timestamps between bytes
  • Direction (TX vs RX)

Step 2: Determine Baud Rate

If baud rate is unknown:

  1. Measure bit duration with oscilloscope: Connect to TXD line, trigger on falling edge, measure one bit width. Baud rate = 1 / bit_width_seconds.
  2. Common baud rates to try: 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200
  3. Auto-detect approach: Set logic analyzer to each common baud rate and see which produces valid ASCII or consistent framing
  4. Bit-width reference table:
Baud RateBit Duration (μs)Character Time (10 bits)
3003333 μs33.3 ms
1200833 μs8.33 ms
2400417 μs4.17 ms
4800208 μs2.08 ms
9600104 μs1.04 ms
1920052 μs0.52 ms
3840026 μs0.26 ms
5760017.4 μs0.174 ms
1152008.68 μs0.087 ms

Step 3: Determine Frame Format

Standard UART frame: [Start bit (0)] [5-9 data bits] [Parity bit (optional)] [1-2 Stop bits (1)]

If the data looks garbled, try:

  • 8-N-1 (most likely)
  • 8-E-1 (common for Modbus RTU)
  • 7-E-1 (legacy devices)
  • 8-O-1, 7-N-2

Step 4: Identify Protocol Type

IndicatorsProtocol Type
Readable ASCII text (letters, numbers, CR, LF)ASCII/text protocol
Hex bytes with fixed-length blocks and checksumBinary protocol
Byte patterns: [addr][FC][data][CRC_lo][CRC_hi]Modbus RTU
Fixed header + length byte + payload + checksumCustom binary protocol
<STX>...<ETX><LRC>Start/stop delimited protocol
$GP...*CS<CR><LF>NMEA 0183 (GPS, marine)

Step 5: Analyze Message Structure

For each captured message:

  1. Identify the master request (PLC sends) and slave response (device replies)
  2. Look for fixed patterns in the first few bytes (address, command)
  3. Look for repeating structures in the data payload
  4. Look for the last 1-2 bytes — often a checksum (CRC-16, LRC, sum)
  5. Note timing between request and response

Step 6: Verify Checksums

Common checksum algorithms:

  • CRC-16 (Modbus): Polynomial 0x8005, init 0xFFFF — used in Modbus RTU
  • LRC (Longitudinal Redundancy Check): XOR of all bytes — used in Modbus ASCII
  • Sum checksum: Add all bytes, take lower byte
  • CRC-CCITT (0x1021): Used in various industrial protocols

Use an online CRC calculator or embedded code to verify.

11.2 Example: Decoding a Custom ASCII Protocol

Captured hex dump (PLC → Sensor):

52 0D 0A

Decoded: R\r\n (ASCII “R” + CRLF) — this is a read request.

Captured hex dump (Sensor → PLC):

2B 32 33 2E 34 35 20 43 0D 0A

Decoded: +23.45 C\r\n — temperature reading in ASCII.

11.3 Example: Decoding a Binary Protocol

Captured hex dump (PLC → Device):

01 03 00 00 00 0A C5 CD

Decoded as Modbus RTU:

  • 01 = Slave address (1)
  • 03 = Function code (Read Holding Registers)
  • 00 00 = Starting register address (0x0000)
  • 00 0A = Quantity of registers (10)
  • C5 CD = CRC-16 (Modbus)

12. Protocol Analysis: MODBUS RTU Over Serial

12.1 Modbus RTU Frame Structure

┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐
│ Address  │ Function │  Data    │  Data    │ CRC Low  │ CRC High │
│ (1 byte) │ (1 byte) │ (N bytes)│ (N bytes)│ (1 byte) │ (1 byte) │
└──────────┴──────────┴──────────┴──────────┴──────────┴──────────┘
  • Address: Slave device address (1–247)
  • Function code: Operation type (01–06, 15–16 most common)
  • Data: Register address, quantity, write values
  • CRC-16: CRC-16/Modbus (polynomial 0x8005, initial value 0xFFFF)

12.2 Common Function Codes

FCNameDirectionData Bytes
01Read CoilsMaster → Slave → MasterAddr (2) + Qty (2) → Coil status (N)
02Read Discrete InputsMaster → Slave → MasterAddr (2) + Qty (2) → Input status (N)
03Read Holding RegistersMaster → Slave → MasterAddr (2) + Qty (2) → Register values (2×N)
04Read Input RegistersMaster → Slave → MasterAddr (2) + Qty (2) → Input register values (2×N)
05Write Single CoilMaster → Slave → MasterAddr (2) + Value (2)
06Write Single RegisterMaster → Slave → MasterAddr (2) + Value (2)
15Write Multiple CoilsMaster → Slave → MasterAddr (2) + Qty (2) + Outputs (N)
16Write Multiple RegistersMaster → Slave → MasterAddr (2) + Qty (2) + Values (2×N)

12.3 Modbus RTU Timing

The end of a Modbus RTU frame is defined by a 3.5 character silent interval on the bus:

Baud Rate3.5 Char Time
9600 (11 bits/char)~4.0 ms
19200 (11 bits/char)~2.0 ms
38400 (11 bits/char)~1.0 ms
115200 (11 bits/char)~0.3 ms

The inter-frame delay must be at least this long. The inter-character delay must be less than 1.5 character times or the frame is considered incomplete.

12.4 Modbus Exception Response

If a slave cannot process a request, it returns an exception response:

┌──────────┬──────────┬──────────┬──────────┬──────────┐
│ Address  │ FC + 0x80│Exception │ CRC Low  │ CRC High │
│ (1 byte) │ (1 byte) │  Code    │ (1 byte) │ (1 byte) │
└──────────┴──────────┴──────────┴──────────┴──────────┘

Common exception codes:

CodeMeaning
01Illegal Function
02Illegal Data Address
03Illegal Data Value
04Server Device Failure

12.5 Analyzing Modbus RTU with B&R DRV_mbus

When using DRV_mbus, the library handles CRC and framing automatically. To debug:

  1. Monitor fbRead.status after each DRV_mbusReadReg call
  2. Check for CRC errors: dvMBUS_ERR_CRC indicates electrical noise or baud rate mismatch
  3. Check for timeouts: dvMBUS_ERR_TIMEOUT means the slave didn’t respond
  4. Check for exception codes: Non-zero slave response with error code indicates addressing or register problems
  5. Log all reads/writes: Echo the request parameters and responses to a log file or HMI for pattern analysis

12.6 Tools for Modbus RTU Analysis

ToolTypeCapabilities
QModMasterFree Windows GUIModbus RTU master/slave simulator, register read/write
PicoScope + Modbus decodeOscilloscopePhysical-layer decode with timing analysis
Saleae Logic 2 + Modbus RTU analyzerLogic analyzerProtocol-level decode with function code parsing
HHD Serial Port MonitorSoftware snifferDriver-level capture with Modbus RTU decoding overlay
CAS Modbus ScannerFree scannerScans slave addresses and registers on a serial bus
Python pyModbusScriptingProgrammatic Modbus RTU scanning and testing

13. Protocol Analysis: Custom ASCII and Binary Protocols

13.1 ASCII Protocols

Many industrial sensors use simple ASCII request/response patterns:

Pattern 1: Command-Response (read request)

PLC sends:  "R\r\n"        (request reading)
Device:     "+23.45 C\r\n" (response with value)

Pattern 2: Addressed Multi-Drop

PLC sends:  "$01RD\r\n"   (address 01, read command)
Device 01: "!01+23.45\r\n" (addressed response)

Pattern 3: Set-Command

PLC sends:  "SET 100\r\n"  (set value to 100)
Device:     "OK\r\n"        (acknowledgment)

Analysis approach for ASCII:

  1. Capture traffic and view as ASCII text
  2. Identify request vs response by direction
  3. Look for delimiters (CR, LF, CRLF, semicolon, comma)
  4. Identify data format (decimal, hex, scientific notation)
  5. Map command set by observing different PLC operations

13.2 Binary Protocols

Binary protocols use structured byte sequences with headers, addresses, commands, data, and checksums:

Typical structure:

┌───────┬───────┬───────┬───────┬───────┬──────────┐
│ STX   │ ADDR  │ CMD   │ LEN   │ DATA  │ CHECKSUM │
│ 0x02  │ (1B)  │ (1B)  │ (1B)  │ (nB)  │ (1-2B)  │
└───────┴───────┴───────┴───────┴───────┴──────────┘

Analysis approach for binary:

  1. Capture multiple transactions and align them by frame boundaries
  2. Look for fixed byte values in position 0 (start marker: 0x02, 0xAA, 0x55)
  3. Look for the length field — count data bytes to confirm
  4. Verify the checksum against candidate algorithms
  5. Correlate known values (e.g., if you know a sensor reads 25.3°C, find 0x0199 or 0x9919 in the data)
  6. Determine byte order (big-endian vs little-endian) by comparing known values

13.3 Mixed Protocols

Some devices use a mix of ASCII commands and binary data (e.g., text headers with binary payloads). Look for transitions between printable and non-printable byte ranges.


14. Reconfiguring or Replacing Serial Connections When Specs Are Unknown

14.1 Systematic Approach to Unknown Serial Connections

When you inherit a system with undocumented serial connections:

Phase 1: Physical Investigation

  1. Identify the hardware: Locate the serial module (IF1, CS1020, IF622, etc.)
  2. Trace the wiring: Follow cables from the PLC serial port to the connected device
  3. Identify the connector type: DB9, terminal block, RJ45
  4. Note the cable type: Shielded/unshielded, twisted pair count
  5. Check for RS485 termination: Look for 120 Ω resistors on the bus ends

Phase 2: Capture Traffic

  1. Use a logic analyzer to capture raw serial data
  2. Determine baud rate by measuring bit width (see Section 11)
  3. Determine frame format (8-N-1, 8-E-1, etc.)
  4. Save hex dumps of multiple request/response cycles

Phase 3: Protocol Identification

  1. Check if the traffic matches Modbus RTU (address + FC + data + CRC pattern)
  2. Check for ASCII patterns (readable text, CR/LF delimiters)
  3. Check for known vendor protocols (Mitsubishi MC Protocol, Siemens S7, Omron Host Link, Allen-Bradley DF1)
  4. Search online for the connected device’s protocol documentation

Phase 4: Replication

  1. Once the protocol is understood, implement it in B&R using DV_Frame (custom) or DRV_mbus (Modbus)
  2. Test with the captured device to verify matching behavior
  3. Document the protocol for future maintenance

14.2 Common Vendor Serial Protocols Found in B&R Installations

ProtocolVendorDetection Pattern
Modbus RTUMany vendors[addr][FC 01-16][data][CRC-16]
Modbus ASCIIMany vendorsColon start :, LRC end, CRLF
DF1Rockwell/Allen-BradleyACK 0x06, NAK 0x15, DLE 0x10 escape
MC ProtocolMitsubishi[ENQ][station][PC][command][data][SUM]
Host LinkOmron@xx[cmd][data][FCS]*\r\n
S7-200 PPISiemensStart 0x10, dest/src address, function, CRC
CompoWay/FOmron[STX 0x02][station][SID][data][ETX 0x03][FCS]

14.3 Practical Tips for Unknown Protocol Reverse Engineering

  1. Start with the defaults: Try 9600-8-N-1 first (covers ~80% of industrial devices)
  2. Leverage the device manual: Even partial documentation helps identify the protocol family
  3. Correlate with known I/O: If you know what the PLC is controlling (e.g., a drive speed), look for that value in the captured data
  4. Use pattern matching: Many binary protocols use fixed headers or sync bytes (0x55AA, 0x0243, etc.)
  5. Test with a Bus Pirate: Send known bytes and observe the device response to build a command set
  6. Check B&R source code: If you have the Automation Studio project, search for DV_Frame or DRV_mbus calls to understand the current implementation

14.4 Migrating from Serial to Ethernet

When replacing a serial connection:

  1. Keep the serial link operational during migration
  2. Install serial-to-Ethernet converters (see Section 15)
  3. Configure the converter for the exact serial parameters (baud, parity, etc.)
  4. Test Ethernet-side connectivity before cutting over
  5. Update the B&R PLC program to use TCP/UDP or Modbus TCP instead of serial

15. Serial-to-Ethernet Conversion Options

15.1 Why Convert Serial to Ethernet?

  • Extend serial device reach beyond 1200 m (RS485) or 15 m (RS232)
  • Centralize serial devices on an Ethernet network for SCADA/PC access
  • Replace aging serial infrastructure while keeping legacy devices
  • Enable remote monitoring of serial traffic over IP
  • Add redundancy and easier troubleshooting via network tools

15.2 Serial-to-Ethernet Device Servers

Moxa NPort Series (Industry Standard)

ModelPortsSerial TypesFeatures
NPort 51101RS232Basic, cost-effective
NPort 51501RS232/422/485 selectableSoftware selectable
NPort 52102RS232/422/485Multi-port
NPort 52502RS232/422/485Industrial-grade
NPort 61101RS232Basic
NPort 62502RS232/422/485Advanced
NPort DE-2111RS232/422/485Compact

Operating modes:

  • Virtual COM mode: Presents serial ports as virtual COM ports on a remote PC — transparent to existing software
  • TCP Server mode: Device server listens for TCP connections — PLC or PC initiates connection
  • TCP Client mode: Device server initiates TCP connection to a specified IP:port
  • UDP mode: Connectionless datagram mode for low-latency applications
  • Pair connection: Two device servers form a transparent serial tunnel

Other Manufacturers

ManufacturerProduct LineNotes
LantronixXPort, UDS1100Compact embedded solutions
Digi InternationalPortServer, ConnectPortWide range of port counts
PerleIOLANIndustrial-grade, DIN-rail mount
Silex TechnologySX-DS SeriesCost-effective alternatives
USR IOTUSR-TCP232Budget-friendly

15.3 B&R-Specific Integration

B&R X20 controllers can communicate with serial-to-Ethernet converters using:

MethodLibraryConfiguration
Modbus TCP → Modbus RTU conversionNPort in “Modbus Gateway” modeConfigure NPort to translate Modbus TCP to Modbus RTU; PLC uses Modbus TCP library
TCP Socket (raw)B&R Socket libraries (AsTCP, AsUDP)B&R opens TCP connection to NPort in TCP Server mode; sends/receives raw serial data
Virtual COM (Windows)DV_Frame via USB/COM portIf B&R Gateway PC is used, NPort creates virtual COM; PC software uses COM port

15.4 Serial-to-Serial Conversion

When the PLC has the wrong serial type:

ConverterConvertsNotes
RS232 → RS485 converterSingle-ended to differentialEnables RS485 multi-drop from RS232 port
RS485 → RS232 converterDifferential to single-endedIsolates RS485 device from RS232 PLC
RS422 → RS232 converterDifferential to single-endedFor RS422 sensors
RS485 → Ethernet (Moxa)Serial to IPFull protocol conversion

15.5 Configuration Considerations

When setting up serial-to-Ethernet converters:

  1. Match serial parameters exactly: Baud rate, parity, data bits, stop bits, flow control must match the device
  2. Set TCP timeouts: Configure idle timeout, connection retry, and reconnection behavior
  3. Latency: Add inter-character delay if the converter sends too fast for the serial device
  4. Buffering: Configure FIFO size for burst data
  5. Termination: If converting RS485, maintain proper 120 Ω bus termination
  6. Network redundancy: Use dual-NIC converters (e.g., Moxa NPort 6000 series) for redundant Ethernet

16. Common Serial Communication Failures and Debugging

16.1 Physical Layer Problems

FailureSymptomsCauseDebug Method
No signal on TXDNo response from devicePort not opened, wrong device name, hardware faultProbe TXD with oscilloscope; check DV_FrameOpen status
Garbled dataRandom/wrong charactersBaud rate mismatch, parity mismatchTry all common baud rates; check parity settings
Intermittent failuresCommunication works sometimesLoose connector, noise, ground loop, cable too longReseat connectors; add ferrite chokes; check shielding
No signal on RXDDevice sends but PLC doesn’t receiveRXD/TXD swapped, cable fault, wrong pinoutVerify pin-to-pin mapping; swap TXD/RXD; test with null-modem
Signal reflection / corruptionErrors increase with cable lengthMissing termination resistors on RS485Add 120 Ω resistors at both ends of RS485 bus
Ground loopErratic behavior, equipment resetsShield grounded at both endsGround shield at one end only; use isolated serial modules

16.2 Protocol Layer Problems

FailureSymptomsCauseDebug Method
Timeout errorsdvFRAME_ERR_TIMEOUT or dvMBUS_ERR_TIMEOUTDevice not responding, wrong slave address, wiring faultVerify device power; check slave address; probe bus activity
CRC errorsdvMBUS_ERR_CRCParity mismatch, electrical noise, baud rate errorSet correct parity; add termination; reduce cable length
Framing errorsWrong byte valuesBaud rate close but not exact (e.g., 4800 vs 9600)Verify baud rate precisely with oscilloscope
Buffer overrundvFRAME_ERR_OVERRUNPLC not reading fast enough, high baud rateIncrease read frequency; lower baud rate; increase buffer size
Wrong register valuesDevice responds but data is wrongIncorrect register address, wrong data type, byte orderVerify register map; check big/little endian interpretation

16.3 Configuration Problems

FailureSymptomsCauseFix
Port won’t openDV_FrameOpen returns errorPort already in use by another taskCheck for duplicate open calls; close unused ports
Wrong device nameCannot open serial portIncorrect device name stringVerify name in IO configuration: IF1, CS1020_IF1
PS9600 red overload LEDSegment power faultOvervoltage, short circuit, second PS moduleCheck 24 V supply; inspect for shorts; remove duplicate PS
Second serial port not workingOnly one port activeAdded second PS9600 instead of CS1020Replace second PS9600 with X20CS1020
Flow control mismatchPartial data transferRTS/CTS enabled on one side onlySet flow control to None on both sides, or wire all handshake lines

16.4 Environmental Problems

ProblemImpactMitigation
EMI/RFI interferenceCorrupted frames, CRC errorsUse shielded cable; route away from VFDs and motors; add ferrite chokes
Temperature extremesIntermittent failures, connector corrosionUse industrial-rated connectors; proper cabinet ventilation
VibrationLoose connections, intermittent open circuitsUse screw terminals with lock-washers; avoid relying on friction-fit connectors
MoistureShort circuits, corrosionUse IP-rated enclosures; sealed connectors; desiccant in cabinet

17. Troubleshooting Matrices

17.1 Quick Diagnostic Flowchart

Serial Communication Failure
│
├─ No data at all?
│   ├─ Probe TXD with oscilloscope → No signal?
│   │   ├─ Check DV_FrameOpen / DRV_mbusOpen status
│   │   ├─ Verify device name (IF1 vs CS1020_IF1)
│   │   └─ Check if port is already open by another task
│   │
│   └─ TXD active but no response?
│       ├─ Verify RXD wiring (swap TXD/RXD)
│       ├─ Check device power
│       ├─ Verify slave address (Modbus)
│       └─ Check signal ground connection
│
├─ Garbled/wrong data?
│   ├─ Try 9600-8-N-1 (most common)
│   ├─ Try 9600-8-E-1 (Modbus RTU)
│   ├─ Try 19200-8-N-1
│   ├─ Measure bit width with oscilloscope for exact baud rate
│   └─ Check parity on both sides
│
├─ Intermittent failures?
│   ├─ Check RS485 termination (120 Ω at both ends)
│   ├─ Check for ground loops (shield grounded at both ends)
│   ├─ Inspect connectors for looseness
│   ├─ Measure cable length vs baud rate limits
│   └─ Check for EMI sources near cable run
│
└─ CRC / framing errors?
    ├─ Verify parity matches on both sides
    ├─ Reduce baud rate
    ├─ Replace cable with shielded twisted pair
    ├─ Add RS485 termination if missing
    └─ Check for signal reflections with oscilloscope

17.2 B&R-Specific Troubleshooting Matrix

SymptomLikely Root CauseAction
No characters on TxD (terminal 9)DV_FrameOpen/DRV_mbusOpen never reached status 0Check function block status in watch window; verify IO config of COM port
Garbage charactersBaud rate / parity mismatchCompare device DIP/settings with IO config; measure bit width
dvFRAME_ERR_TIMEOUTNo response from deviceSwap TXD/RXD; verify GND; check shield termination; verify device power
dvFRAME_ERR_OVERRUNBaud rate too high or noisy cableLower baud rate; use shielded twisted pair cable
DRV_mbus CRC errorParity mismatch or electrical noiseSet parity to Even; add 120 Ω termination on RS485 legs
PS9600 red overload LEDOvervoltage or short on busCheck 24 V supply; inspect terminals for shorts
Second PS9600 fittedBus conflict (one PS per segment)Remove second PS9600; install X20CS1020 for additional serial
Intermittent communicationGround loop from double-grounded shieldGround shield at cabinet entry only

17.3 Field Commissioning Checklist

#StepExpected ResultPass Criteria
1Power segment with 24 VDCPS green LED solidNo red overload LED
2Measure +24 V on PS terminals23.5–28.0 VDCWithin input spec
3Verify TxD idle voltage-5 V to -12 V (RS232)RS232 spec compliant
4Send test byte; probe RxD at deviceCorrect byte on scopeSignal polarity matches
5Trigger query; capture response on RxDExpected data pattern visibleNo framing errors
6Run cyclic programValues update correctlyStatus = 0 in watch window
7Run for 1 hourNo intermittent errorsError counter remains 0

18. References and Further Reading

B&R Documentation

  • B&R Automation Help Portal: https://help.br-automation.com — DV_Frame library reference, DRV_mbus library reference, X20 system manuals
  • X20CP158x / X20CP358x Datasheet: Available from br-automation.com — IF1/IF2 interface specifications and pinouts
  • X20 System User’s Manual: Comprehensive X20 hardware and configuration guide
  • B&R Automation Studio Online Help: Integrated in IDE; covers IO configuration, serial port setup, library functions
  • System 2005 User’s Manual: Covers IF260, IF622, IF671 interface modules

Serial Communication References

  • TIA-232-F (RS-232) Standard: Official electrical specification
  • TIA-485 (RS-485) Standard: Differential multi-point serial specification
  • Modbus Protocol Specification: https://www.modbus.org — Free download of Modbus RTU/TCP specification
  • Saleae Logic Analyzer Documentation: Protocol decode guides, async serial analyzer setup
  • PicoScope Modbus Decoding Guide: https://www.picotech.com/library/knowledge-bases/oscilloscopes/modbus-serial-protocol-decoding

Tools and Software

  • HHD Serial Port Monitor: https://hhdsoftware.com/serial-port-monitor
  • Saleae Logic Analyzer: https://www.saleae.com
  • COM Sniffer: https://comsniffer.com
  • Moxa NPort Configuration Guide: https://www.moxa.com
  • QModMaster (free Modbus tool): Available on SourceForge
  • RealTerm (serial terminal): https://realterm.sourceforge.io
  • PuTTY (terminal emulator): https://www.putty.org

Community Resources

  • B&R Community Forum: https://community.br-automation.com — Search for serial communication topics
  • PLCtalk.net: https://www.plctalk.net — Industrial automation forums with B&R discussions
  • EEVblog Forum: https://www.eevblog.com/forum — Reverse engineering and protocol analysis discussions
  • Stack Overflow / Electronics Stack Exchange: Serial protocol debugging Q&A

Cross-References


Document covers B&R serial communication diagnostics for System 2003, System 2005, and X20 platforms. Compiled from B&R official documentation, community forums, and industrial automation reference materials.


Key Findings

  1. B&R serial interfaces (IF1030/IF1041/IF1051) are standard RS232/RS485 — any serial sniffer or protocol analyzer can capture the traffic. The challenge is decoding the application-layer protocol, not the physical layer.
  2. The RS232 interface (IF1) factory default is 57600 bps, not 115200 bps — always try 57600 first when connecting to an unknown PLC. The baud rate can be configured higher but the default must be assumed.
  3. Non-invasive serial tapping requires a Y-cable or tap adapter — never break the serial connection on a running machine. Use a 3-port RS232/RS485 tap that monitors traffic passively. See diagnostic-workstation.md for hardware recommendations.
  4. B&R has no proprietary serial protocol documentation for serial-connected devices — the protocol implementation is in the PLC program (which you don’t have). Reverse-engineer the protocol by capturing traffic and correlating with known device behavior.
  5. Serial baud rate auto-detection is feasible using statistical analysis — capture raw byte traffic at a high sample rate and use Python to identify the most likely baud rate by analyzing inter-byte timing patterns.
  6. Modbus RTU over RS485 is the most common serial protocol on B&R systems — if the OEM used Modbus RTU, standard Modbus tools can decode the traffic immediately. See modbus-gateway.md for details.

B&R Automation: Alarm and Event Logging Internals

Understanding how B&R Automation Runtime (AR) stores, structures, and exposes alarm and event data is essential for diagnosing problems on legacy machines where the OEM left no documentation. This document covers where alarms live on the CF card and in AR memory, the internal record format, how to bulk-export alarm history without the original Automation Studio project, and how to set up remote alarm notification when you have no OEM support. Cross-references: diagnostics-sdm.md for SDM-based alarm diagnostics, hmi-integration.md for HMI alarm display, and iiot-retrofit.md for modern alarm forwarding via MQTT/SNMP.

Table of Contents

  1. Where Alarms Are Stored
  2. Alarm Record Format and Fields
  3. Bulk-Exporting Alarm History Without the Original Project
  4. Remote Alarm Notification: Email, OPC-UA, SNMP
  5. Alarm Severity Classification
  6. mapp Alarm Configuration
  7. Alarm Groups and Categories
  8. How Alarms Relate to IO States and System Variables
  9. Custom Alarm Generation from User Programs
  10. Alarm Visualization on HMI
  11. Alarm History Analysis and Trending
  12. Archiving Alarm Data for Compliance
  13. Alarm Acknowledgment Workflow
  14. Resetting / Clearing Alarm Buffers

1. Where Alarms Are Stored

1.1 CF Card / CFast Card

B&R controllers store persistent runtime data on CompactFlash (CF) or CFast cards. The card contains multiple partitions:

PartitionPurpose
System partitionAutomation Runtime (AR) operating system, logger data, system logbook ($$arlogsys), safety logbook ($$safety)
User partitionUser application data, custom file exports, CSV files generated by FileIO library calls
ConfigurationRuntime configuration parameters, network settings, OPC UA certificates

The CF card also stores AR logbooks in a binary format (*.br files). Logbooks can be retrieved by:

  • Plugging the CF card into a PC reader and copying files directly (pre AR 4.91)
  • Using Runtime Utility Center (RUC): Tools > Back up files from Compact Flash / Image file
  • Using MO_info() function block (AR 4.91+) to copy logbook modules to the USER partition as .br files, then downloading via FTP

Important: Since AR version A4.91, the System partition is protected. Direct FileCopy from the FileIO library no longer works for system logbooks. You must use MO_info() to identify the module’s memory address and length, create a file on the USER partition, then transfer it.

1.1.1 AR Logbook Binary Format (.br files)

The .br logbook files on the CF card are B&R proprietary binary format — there is no public specification for this format. What is known from community reverse-engineering and B&R documentation:

  • Header: Contains a magic number/version identifier, creation timestamp, logbook name, and a record count
  • Records: Variable-length records, each containing:
    • Timestamp (8 bytes: 4-byte date + 4-byte time, B&R format with millisecond resolution on newer AR versions)
    • Message severity level (1 byte)
    • Message category/code (2 bytes)
    • Message text (variable length, null-terminated UTF-8 or ASCII string)
    • Additional data fields (depending on logbook type)
  • Endianness: Little-endian (x86 native for the CP1584’s Intel Atom)
  • No compression: Files are stored uncompressed (unlike some B&R object files)

Practical implications:

  • You cannot reliably parse .br logbook files without B&R’s proprietary tools (Runtime Utility Center, Automation Studio Logger view)
  • For custom log analysis, use ArEventLog or FileIO to write log data in CSV or text format to the user partition
  • If you need to extract logbook contents programmatically from a running PLC, use the PVI API or OPC UA connection to read the logger data, rather than trying to parse the .br binary format
  • The MO_info() function block can copy logbook modules to the user partition as .br files, but you’ll need Automation Studio’s Logger or the RUC to read them

1.2 AR Memory (Runtime Logger)

Automation Runtime maintains an in-memory Logger system accessible from Automation Studio via Ctrl+L or Open > Logger. There are multiple logbook modules:

Logbook NameIdentifierDescription
System logbook$$arlogsysGeneral system events, state changes, errors
User logbook(custom name)Application-specific log messages via ArEventLog or UserLog library
Safety logbook$$safetySafety-related events and diagnostics
Alarm logbookMpAlarmX managedAlarm events (raise, acknowledge, clear)

The ArEventLog library allows user programs to write custom entries into these logbooks. The logger is a ring buffer in memory; older entries are overwritten when the buffer is full. Capacity is configurable in the Runtime configuration.

1.3 Alarm Buffers (MpAlarmX)

The MpAlarmXCore component maintains the live alarm buffer in AR memory. This buffer contains:

  • Active alarms: Currently triggered/unresolved alarms
  • Acknowledged alarms: Alarms that were raised and acknowledged but the condition still persists
  • History ring buffer: A configurable-size circular buffer storing past alarm events

The history buffer size is set during MpAlarmX configuration in Automation Studio. When the buffer fills, oldest entries are overwritten. For persistent history, MpAlarmXHistory exports records to non-volatile storage.

1.4 Storage Architecture Summary

  [PLC Program]
       |
       v
  [MpAlarmXCore] -----> In-memory alarm buffer (active + acknowledged)
       |                        |
       |                        v
       |                 [MpAlarmXHistory] -----> CF Card: /AlarmHistory/*.csv
       |
       v
  [ArEventLog / UserLog] -----> AR Logger ring buffer (in-memory)
       |
       v
  [MO_info()] -----> USER partition: *.br files (binary logbook export)

2. Alarm Record Format and Fields

2.1 MpAlarmX Alarm Configuration Fields

Each alarm configured in MpAlarmX has the following properties:

FieldTypeDescription
NameSTRINGUnique alarm identifier within the alarm list
Description / TextSTRING (localizable)Human-readable alarm description, supports .tmx translation files
GroupMpAlarmXGroupIdentThe alarm group this alarm belongs to
CategoryMpAlarmXCategoryNumeric category code for classification
CodeUDINTUnique alarm code within the system
SeverityMpAlarmXSeveritySeverity level (Info, Warning, Error)
PriorityUSINTNumeric priority for sorting/display ordering
MultipleInstancesBOOLIf TRUE, the same alarm can appear multiple times simultaneously
CommentSTRINGOptional static comment text
SnippetSTRINGDynamic text placeholder for runtime-variable content

2.2 Alarm Record (History Entry) Fields

When an alarm event is recorded (raise, acknowledge, clear), the history record typically contains:

FieldDescription
TimestampDate and time of the event (AR system clock)
AlarmNameThe configured alarm name
AlarmCodeNumeric alarm code
GroupAlarm group identifier
CategoryCategory code
SeveritySeverity level at time of event
StateCurrent state: Inactive, Active, Acknowledge Required, Acknowledged
PreviousStateState before this transition
Event TypeWhat happened: Raise, Acknowledge, Clear, Reset
DescriptionLocalized alarm text (with snippet variables resolved)
InstanceInstance index (when MultipleInstances = TRUE)
PV (Process Value)The monitored value that triggered the alarm
OperatorUser who acknowledged (if applicable)

2.3 CSV Export Format

The MpAlarmXHistory component exports to CSV with semicolon-separated values (typical European format). The column set is fixed and cannot be customized through the standard configuration. Community reports indicate that the standard CSV columns are:

Timestamp;AlarmName;Code;Category;Severity;State;Description;Group;...

If custom column content is needed, users must build their own export using FileIO and reading from the alarm list via the MpAlarmX API.


3. Bulk-Exporting Alarm History Without the Original Project

3.1 Via CF Card Direct Access

If you have physical access to the controller:

  1. Power down the controller
  2. Remove the CF/CFast card
  3. Insert into a PC card reader
  4. Navigate to the alarm history directory on the USER partition
  5. Copy CSV files directly

This works if MpAlarmXHistory was configured to periodically export to the CF card’s file system.

3.2 Via Runtime Utility Center (No Project Required)

  1. Connect to the controller via Ethernet
  2. Open Runtime Utility Center
  3. Select Tools > Back up files from Compact Flash / Image file
  4. Browse the file system to locate alarm history CSVs
  5. Download files to PC

This method does not require the original Automation Studio project.

3.3 Via FTP

B&R controllers run an FTP server by default:

ftp <controller-ip>
Username: admin (default)
Password: (configured)

Alarm history CSVs are typically located under:

  • /User/AlarmHistory/ (if MpAlarmXHistory was configured with a file device path)
  • /User/ (user-defined paths)

3.4 Via OPC UA Client

If OPC UA is active on the controller:

  1. Connect with any OPC UA client (UA Expert, Prosys, etc.)
  2. Browse to the alarm node hierarchy under MpAlarmXList / MpAlarmXCore
  3. The OPC UA Alarm and Events server exposes alarm history that can be queried
  4. Export the queried events to CSV or database using the client tool

3.5 Programmatic Export via User Program on Controller

If you can load any program (not necessarily the original), you can:

(* Example: Read alarm list and write to CSV using FileIO *)
PROGRAM _ExportAlarms
VAR
    fbFileOpen   : FileOpen;
    fbFileWrite  : FileWrite;
    fbFileClose  : FileClose;
    sFileName    : STRING := '/User/AlarmExport.csv';
    bExecute     : BOOL;
    sLine        : STRING;
END_VAR

The MpAlarmXList function block provides access to alarm data programmatically. You iterate through the alarm list, build CSV strings, and write using the FileIO library.

3.6 Important Caveat

Without the original project, you lose the alarm configuration context (alarm name meanings, severity mappings, group definitions). The exported data will contain raw alarm codes and names. Having the .tmx translation files from the CF card helps decode alarm descriptions.


4. Remote Alarm Notification: Email, OPC-UA, SNMP

4.1 Email Notification (mapp Tweet)

B&R offers mapp Tweet (product code 1TGMPTWEET.20-01) for sending alarm notifications directly from the machine to service technicians via:

  • SMS text messages
  • Email

Configuration in Automation Studio:

  1. Add MpTweet mapp component to the project
  2. Configure SMTP server settings (server address, port, authentication)
  3. Define recipient lists (phone numbers for SMS, email addresses)
  4. Link alarm events to tweet triggers using function block calls

Typical trigger pattern:

(* When critical alarm is raised, send notification *)
IF MpAlarmXCore.AlarmState[ALARM_CRITICAL_OVERTEMP].bActive THEN
    MpTweet.Send(
        sRecipient := '+1234567890',
        sMessage   := 'ALARM: Critical overtemperature detected on Unit 3'
    );
END_IF

4.2 OPC UA Alarm and Events

B&R provides native OPC UA Alarm and Events (A&E) server functionality:

  1. MpAlarmXCore is the core alarm management instance
  2. MpAlarmXList provides the list interface linked to the core
  3. Link MpAlarmXList to MpAlarmXCore in the mapp Services configuration view
  4. The OPC UA server automatically exposes alarms as OPC UA condition objects

Any standard OPC UA client can subscribe and receive real-time alarm notifications. The OPC UA A&E model supports:

  • Alarm severity
  • Acknowledge/confirm methods
  • Alarm condition state transitions
  • Historical alarm queries

To activate OPC UA on the target:

  • Enable OPC UA in the Runtime configuration
  • Configure certificates (B&R’s user role system manages OPC UA access rights)
  • Ensure the MpAlarmXList and MpAlarmXCore are properly linked

Note: Activating OPC UA can cause exceptions on some controllers (particularly X20 CP 0482) if memory or configuration parameters are not properly set.

4.3 SNMP

B&R controllers support SNMP v1 for monitoring. While B&R does not have a built-in mapp component specifically for SNMP alarm traps, you can:

  1. Use the controller’s SNMP agent (configured in Runtime network settings)
  2. Send SNMP traps via custom program logic using the MpSNMP library or third-party approaches
  3. Use mapp Tweet as the primary notification mechanism instead of SNMP traps
  4. For APROL systems, the alarm system integrates with SNMP notifications natively

In practice, most B&R alarm remote notification is done through OPC UA (for SCADA/DCS integration) or mapp Tweet (for email/SMS to service technicians).

B&R SNMP OIDs relevant to alarm/system monitoring:

The B&R Enterprise MIB root is 1.3.6.1.4.1.2706 (B&R’s PEN). Known OID branches include:

OID BranchDescriptionAlarm Relevance
1.3.6.1.4.1.2706.1B&R products system groupController identification
1.3.6.1.4.1.2706.1.1System descriptionFirmware version, model
1.3.6.1.4.1.2706.1.2System statusCPU load, memory, temperature
1.3.6.1.4.1.2706.1.3IO system statusIO module health indicators

Important: B&R does not publish a formal alarm-specific SNMP MIB for the CP1584. The standard MIB provides hardware health metrics but not individual alarm instances. For alarm-level SNMP notifications, you must implement custom trap generation in the PLC program using the AsSnmp library (if available) or use a PLC-to-SCADA bridge (OPC UA to SNMP).

Quick SNMP health check:

snmpwalk -v1 -c public <CP1584_IP> 1.3.6.1.4.1.2706.1

4.4 Notification Architecture

[MpAlarmXCore]
      |
      +---> [MpAlarmXList] -- OPC UA Server -- OPC UA Clients (SCADA, Historian)
      |
      +---> [User Program Logic]
              |
              +---> [MpTweet] -- SMTP -- Email / SMS
              |
              +---> [Custom SNMP] -- SNMP Traps -- NMS
              |
              +---> [HTTP Client] -- REST API -- Custom endpoints

5. Alarm Severity Classification

5.1 Severity Levels in mapp AlarmX

B&R’s mapp AlarmX uses a severity-based classification system with three primary levels:

SeverityLevelTypical ColorMachine Response
InfoLowBlue / CyanInformational notification only; no machine reaction
WarningMediumYellow / OrangeWarning message displayed; machine may enter reduced operation mode
ErrorHigh / CriticalRedControlled shutdown sequence; safety stop may be triggered

5.2 Severity in Practice

Alarm severity determines how the machine should respond. The AlarmX Framework (mapp Framework 6) provides a complete reaction-mapping template using these three severity groups:

  • Info reactions: Log event, display on HMI, optional notification
  • Warning reactions: Warning banner on HMI, reduced operation mode, alert operator
  • Error reactions: Emergency stop, safe shutdown, mandatory acknowledgment, alert service

5.3 Severity as Numeric Value

Internally, severity is represented as a numeric value. B&R enumerations are always internally a DINT (32-bit signed integer). The MpAlarmXSeverity enumeration values used in the mapp AlarmX API are:

Enum ValueNameSeverity LevelOPC UA RangeTypical Use
0MpAlarmXSeverityInfoInfo / Low1-399Informational events, cycle counters, state changes
1MpAlarmXSeverityWarningWarning / Medium400-699Threshold warnings, approaching limits, reduced operation
2MpAlarmXSeverityErrorError / High700-999Faults, shutdown events, safety violations

Note: These are the native B&R enumeration values. When alarms are exposed via OPC UA, B&R applies a severity scaling factor to map into the OPC UA 1-999 range. The OPC UA severity for a B&R Error alarm is typically 700-800, Warning is 400-500, and Info is 100-200. The exact OPC UA mapping depends on the mapp AlarmX configuration (severity can be customized per alarm instance).

Using severity in program code:

// Filtering alarms by severity in a PLC program
IF alarm.eSeverity >= MpAlarmXSeverityError THEN
    // Critical alarm: trigger safe shutdown
    bEmergencyStop := TRUE;
ELSIF alarm.eSeverity >= MpAlarmXSeverityWarning THEN
    // Warning: log and notify operator
    nWarningCount := nWarningCount + 1;
ELSE
    // Info: log only
    nInfoCount := nInfoCount + 1;
END_IF;

// Comparing severity numerically (since enum is DINT internally)
IF alarm.eSeverity = 2 THEN
    // Error-level alarm
END_IF

5.4 OPC UA Severity Mapping

When alarms are exposed via OPC UA, B&R severity levels map to OPC UA severity fields:

  • OPC UA defines severity as a UInt16 where:
    • 1-399: Low (informational)
    • 400-699: Medium (warning)
    • 700-999: High (critical/error)

The B&R mapping typically places:

  • Info = low severity range
  • Warning = mid range
  • Error = high range

6. mapp Alarm Configuration

6.1 Core Components

The mapp AlarmX system consists of several key components configured in Automation Studio:

ComponentRole
MpAlarmXCoreCentral alarm management engine; processes alarm states, maintains buffer
MpAlarmXListAlarm list instance; defines a collection of alarms linked to a core
MpAlarmXConfigRuntime alarm configuration function block for dynamic alarm creation
MpAlarmXConfigAlarmUsed to create/modify individual alarms programmatically
MpAlarmXHistoryAlarm history export to persistent storage (CSV)
MpAlarmXSetFunction to manually set/trigger an alarm
MpAlarmXResetFunction to manually reset/clear an alarm
MpAlarmXAcknowledgeFunction to acknowledge an alarm

6.2 Configuration in Automation Studio

  1. Create MpAlarmXCore in the mapp Services configuration tree
  2. Create MpAlarmXList and link it to the core instance
  3. Add alarms to the list using the configuration editor:
    • Right-click the alarm list > Add Alarm
    • Configure Name, Description, Group, Category, Code, Severity
    • Set monitoring type (discrete, analog limit, etc.)
  4. Configure history by adding MpAlarmXHistory and specifying the export path (e.g., /User/AlarmHistory/)
  5. Configure snippets for dynamic text content (e.g., showing the actual process value in the alarm text)

6.3 Performance Considerations

MpAlarmXConfigAlarm opens, loads, and writes the configuration every time you save an alarm (new or modified). For large alarm counts (100+), configuration save time increases exponentially. Solutions:

  • Use the AS6 Alarm List configuration (more modular, avoids programmatic creation overhead)
  • Batch alarm creation during initialization, not at runtime
  • Use the MpAlarmXConfigAlarm sparingly

6.4 Alarm Types

TypeDescription
Discrete Value MonitoringMonitors a Boolean variable; alarm triggers on FALSE-to-TRUE (or TRUE-to-FALSE) transition
Analog Limit MonitoringMonitors a numeric variable against high/low limits
Deviation MonitoringDetects when a value deviates from a setpoint by a configured threshold
Rate-of-Change MonitoringTriggers when a value changes too quickly
User Alarm (Manual Trigger)Alarms set/reset programmatically via MpAlarmXSet / MpAlarmXReset

7. Alarm Groups and Categories

7.1 Alarm Groups

Alarm groups provide organizational structure for alarms. In the configuration:

  • Group names are defined per group for display, acknowledgment, and blocking purposes
  • Alarms are assigned to a group via the Group property
  • The APROL alarm system uses groups extensively: “The group names used in the alarm modules are defined for a group with regard to display, acknowledgment and blocking”
  • Groups enable:
    • Bulk acknowledge all alarms in a group
    • Filter alarm lists by group on HMI
    • Group-based blocking/inhibition during maintenance

7.2 Categories

Categories provide a numeric classification separate from severity:

  • Category is a UDINT value assigned per alarm
  • Used for additional filtering and classification beyond severity
  • Can represent alarm source (IO module, axis, safety system, etc.)
  • The Code field combined with Category uniquely identifies an alarm across the system
  • In OPC UA, category maps to the alarm’s condition type

7.3 Multiple Instances

When MultipleInstances is set to TRUE in the MpAlarmX configuration:

  • The same alarm definition can appear multiple times simultaneously
  • Each instance tracks its own state independently
  • Useful for array-based monitoring (e.g., 100 identical sensors with the same alarm definition)
  • Each instance is identified by an instance index

8. How Alarms Relate to IO States and System Variables

8.1 Discrete Alarm Binding to Digital IO

The most direct binding uses Discrete Value Monitoring:

Alarm configuration:
  Monitoring type: Discrete Value Monitoring
  PV (Process Variable): gAxis[1].stStatus.Error (BOOL)
  Trigger: Rising edge (FALSE -> TRUE)

When the linked variable transitions from FALSE to TRUE, the alarm is automatically raised. No explicit MpAlarmXSet call is required. When the variable returns to FALSE, the alarm clears automatically.

8.2 Analog Limit Binding

For analog inputs (e.g., temperature, pressure):

Alarm configuration:
  Monitoring type: Analog Limit Monitoring
  PV: gTempSensor[3].rValue (REAL)
  High limit: 85.0
  Low limit: 10.0
  Hysteresis: 2.0

The alarm triggers when the process value crosses the configured limits. Hysteresis prevents chattering near the limit boundary.

8.3 Array-Based Alarm Checking

For systems with many similar IO points, B&R supports efficient array-based monitoring:

FOR i := 1 TO MAX_CONVEYORS DO
    gConveyorAlarm[i].bTrigger := gConveyor[i].stIO.bError;
END_FOR

Link each array element to its corresponding alarm via the alarm configuration, avoiding manual configuration of hundreds of individual alarms.

8.4 IO Module Diagnostics as Alarm Sources

B&R IO modules provide diagnostic datapoints that can feed alarms:

  • SerialNumber and ModuleID datapoints for module-specific diagnostics
  • Module status registers (wire-break, short-circuit, overload)
  • X20/X67 bus diagnostics
  • Temperature monitoring of the IO module itself

8.5 System Variable Monitoring

Any AR global variable can be monitored:

  • Motion control status (mcAxis state, following error)
  • Communication status (EtherCAT, POWERLINK, OPC UA connection state)
  • Timer and counter values
  • Computed process values

9. Custom Alarm Generation from User Programs

9.1 Using MpAlarmXSet / MpAlarmXReset

For alarms that require complex trigger logic beyond simple limit monitoring:

(* Manual alarm trigger from application logic *)
IF (gMotor[1].stStatus.bOverload AND gMotor[1].bEnabled) THEN
    MpAlarmXSet(
        xListIdent := gAlarmListIdent,
        wAlarmName := 'MotorOverload',
        xMultipleInstance := FALSE
    );
END_IF

(* Clear the alarm when condition resolves *)
IF NOT gMotor[1].stStatus.bOverload THEN
    MpAlarmXReset(
        xListIdent := gAlarmListIdent,
        wAlarmName := 'MotorOverload'
    );
END_IF

9.2 Using ArEventLog for Custom Log Messages

For logging custom messages (not formal alarms) to the system logbook:

(* Using the ArEventLog library *)
ArEventLogWriteLog(
    pLogName := 'UserLog',
    eLogLevel := AR_EVENT_LOG_LEVEL_WARNING,
    sMessage := 'Maintenance mode activated by operator'
);

The UserLog library also provides user-specific logging:

  • Creates custom logger instances in the PLC
  • Accessible via the standard Logger in Automation Studio (Ctrl+L)
  • Supports different log levels (Info, Warning, Error, Fatal)

9.3 Advanced: MpAlarmXConfigAlarm for Dynamic Alarms

For scenarios where alarms must be created at runtime (e.g., after configuration is loaded from a recipe):

MpAlarmXConfigAlarm(
    xListIdent   := gAlarmListIdent,
    sAlarmName   := sDynamicAlarmName,
    sDescription := sDynamicDescription,
    udiCode      := udiAlarmCode,
    eSeverity    := MpAlarmXSeverity#Error,
    eCategory    := 10,
    xEnable      := TRUE
);

Warning: This approach has significant performance implications for large alarm counts. Use sparingly.

9.4 The AlarmX Framework Approach

The open-source AlarmX Framework (mapp Framework 6) provides a cleaner pattern:

  • 100 preconfigured discrete monitoring alarms
  • Unified Boolean trigger interface
  • Localizable text templates
  • Built-in severity-based reaction mapping
  • Per-alarm inhibition logic (for maintenance/commissioning modes)

10. Alarm Visualization on HMI

10.1 Standard mapp View Widgets

WidgetPurpose
AlarmListPrimary alarm list display; shows active and historical alarms with filtering
AlarmBannerHorizontal bar showing count of unacknowledged/active alarms
AlarmPopupPop-up dialog when a new alarm is raised
AlarmDetailsDetailed view of a selected alarm with all fields

10.2 AlarmList Widget Configuration

The AlarmList widget subscribes to the OPC UA alarm node set and renders:

  • Active alarms (unacknowledged)
  • Acknowledged alarms (condition still present)
  • Historical alarms (cleared)

Configuration options:

  • Link to a MpAlarmXList instance
  • Filter by group, category, severity
  • Sort by timestamp, severity, name
  • Column visibility
  • Item selection events (returns severity, index)

10.3 Severity-Based Styling

Alarm items’ color/icon changes based on severity:

  • Error: Red background/icon
  • Warning: Yellow/orange background/icon
  • Info: Blue background/icon

Custom styling is possible:

  • Use the configuration dialogue to set severity-dependent colors
  • For advanced customization beyond the standard dialogue, connect widgets directly to MpAlarmXListUIConnectType for full programmatic control

10.4 Custom Alarm UI (MpAlarmXListUIConnectType)

For requirements beyond the standard widgets (role-based acknowledge, custom comments):

(* Connect to alarm list UI *)
gAlarmUIConnect.xListIdent := gAlarmListIdent;
gAlarmUIConnect.bAcknowledge := bAckButton AND bUserHasPermission;

(* Check selected alarm properties *)
IF gAlarmUIConnect.wSelectedSeverity >= 400 AND gCurrentUserRole >= ROLE_SHIFT_LEADER THEN
    bAckEnabled := TRUE;
ELSE
    bAckEnabled := FALSE;
END_IF

10.5 mapp View Pages for Alarm Interaction

The AlarmX Framework includes prebuilt mapp View pages:

  • Active alarm display
  • Alarm history browsing
  • Alarm query execution and results viewing
  • Acknowledge and reset actions

11. Alarm History Analysis and Trending

11.1 MpAlarmXHistory Component

The MpAlarmXHistory function block manages alarm history export:

  • Configured as a separate component in the mapp Services tree
  • Exports alarm events to CSV files on persistent storage
  • Configurable export path (e.g., /User/AlarmHistory/)
  • Supports periodic or on-demand export
  • CSV format is fixed (cannot customize columns through standard configuration)

11.2 Accessing History Data

On the controller:

  • CSV files in the configured directory on the CF card USER partition
  • Accessible via FTP for download
  • Can be read programmatically with FileIO library

In Automation Studio:

  • Logger view (Ctrl+L) shows real-time alarm events
  • Alarm events from MpAlarmX are visible in the logger alongside system events

Via OPC UA:

  • OPC UA historical alarm queries supported by the alarm server
  • OPC UA clients can browse, filter, and aggregate historical alarm data

11.3 AlarmX Framework Query Architecture

The AlarmX Framework provides a built-in alarm query system:

  • State machine for query execution
  • Preconfigured ActiveAlarms query
  • Support for adding additional queries (e.g., “all Error-severity alarms from the last 24 hours”)
  • mapp View pages for selecting and viewing query results

11.4 External Analysis

For deeper trending and analysis:

  1. Export CSV via MpAlarmXHistory or FTP
  2. Import into analysis tools (Excel, Python/pandas, Grafana, etc.)
  3. Typical analyses:
    • Alarm frequency by severity over time
    • Most frequently occurring alarms
    • Mean time between alarm occurrences (MTBA)
    • Alarm flood detection (rate-of-change analysis)
    • Correlation with process data
    • Root cause analysis via alarm sequence patterns

11.5 APROL Alarm System

For B&R’s APROL process control system, the AlarmMonitor provides the logged-in operator with a clear display of all alarms assigned based on the authorization system, with advanced filtering, grouping, and analysis capabilities beyond the standard mapp AlarmX.


12. Archiving Alarm Data for Compliance

12.1 Regulatory Requirements

Industrial compliance standards (FDA 21 CFR Part 11, ISA-18.2, IEC 62682) require:

  • Tamper-proof alarm records
  • Time-stamped audit trail
  • Retention for defined periods (typically 1-5 years)
  • Operator identification for acknowledgments
  • Complete alarm lifecycle recording (raise, acknowledge, clear)

12.2 B&R Archiving Strategies

Level 1 - On-Controller Archiving:

  • Use MpAlarmXHistory with regular CSV export to CF card
  • Implement file rotation (by date) to manage storage
  • Copy files to USB via AsUSB library for physical offload
(* Daily alarm history export *)
IF gClock.bNewDay THEN
    MpAlarmXHistory.Export(
        sFilePath := CONCAT('/User/AlarmHistory/', gClock.sDateStr, '.csv')
    );
END_IF

Level 2 - Network Archiving:

  • FTP alarm history files to a central server
  • Use OPC UA subscription for real-time alarm logging to a historian database
  • SNMP traps to a network management system with logging

Level 3 - Enterprise Archiving:

  • OPC UA A&E integration with SCADA/historian (e.g., APROL, Wonderware, Ignition)
  • MpAudit integration for audit-trail compliance
  • Automated backup of CF card contents via Runtime Utility Center scripting

12.3 Using MpAudit for Compliance

B&R’s MpAudit system provides audit-trail logging:

  • “User Defined Events” can be sent to the audit log
  • Operator actions (acknowledgments, resets) can be logged with user identity
  • Audit data includes timestamp, user, action description
  • Can be combined with alarm acknowledgment workflows

Example pattern:

"Service - John Doe acknowledged error 558 by changing broken sensor"

12.4 Data Integrity

  • CF cards use SLC or MLC NAND flash with error detection and correction
  • System partition is protected since AR 4.91
  • Binary logbook exports via MO_info() preserve data integrity
  • OPC UA communication is secured with X.509 certificates

12.5 Backup and Retention

  • Regular CF card backup via Runtime Utility Center
  • Network-based backup to file server (FTP/SMB)
  • Consider CF card replacement schedule (flash memory has finite write cycles)
  • SLC cards offer significantly longer endurance than MLC

13. Alarm Acknowledgment Workflow

13.1 Alarm Lifecycle States

  [Inactive] --(condition TRUE)--> [Active / Unacknowledged]
                                      |
                                      v
                              [Acknowledged] --(condition FALSE)--> [Inactive]
                                      |
                                      v
                              (condition remains TRUE)
                                      |
                                      +---> stays [Acknowledged]

State transitions:

  1. Inactive -> Active: Alarm condition detected (variable change, limit exceeded, manual set)
  2. Active -> Acknowledged: Operator acknowledges the alarm
  3. Acknowledged -> Inactive: Alarm condition clears (variable returns to normal, manual reset)
  4. Active -> Inactive: Condition clears before acknowledgment (flash alarm)

13.2 Acknowledgment Methods

HMI Acknowledgment:

  • Click acknowledge button on the AlarmList widget
  • Built-in acknowledge button in the alarm viewer
  • Individual alarm acknowledge (select alarm, then press acknowledge)
  • AcknowledgeAll button to acknowledge all active alarms simultaneously

Programmatic Acknowledgment:

(* Acknowledge a specific alarm *)
MpAlarmXAcknowledge(
    xListIdent := gAlarmListIdent,
    wAlarmName := 'MotorOverload'
);

(* Acknowledge all alarms in a list *)
MpAlarmXAcknowledgeAll(
    xListIdent := gAlarmListIdent
);

Role-Based Acknowledgment (Custom Implementation): B&R does not natively support role-based acknowledgment within MpAlarmX. Workarounds:

  1. Widget event binding: Use the AlarmList widget’s ItemClick event (returns severity), combine with current user role to conditionally enable/disable the acknowledge button
  2. Custom UI with MpAlarmXListUIConnectType: Build your own alarm table with full control over acknowledge permissions
  3. Application-level control: Disable HMI acknowledge entirely; use MpAlarmXAcknowledge() in application code after checking user role:
    IF bAckButtonPressed AND gCurrentUser.eRole >= ROLE_SERVICE THEN
        MpAlarmXAcknowledge(...);
    END_IF
    

13.3 Acknowledgment with Comments

Native operator comments on individual alarms are not built into MpAlarmX. Workarounds:

  1. Snippets: Add comment-like text via configured snippets in the alarm definition (set when alarm activates, not by operator later)
  2. MpAudit integration: Before acknowledging, let operator select a reason from a dropdown/text input, then send the combined message (alarm ID + operator + reason) to the audit log as a “User Defined Event”

13.4 Acknowledgment Persistence

  • Acknowledgment state is maintained in the MpAlarmXCore buffer
  • If the controller restarts, acknowledgment state may be lost (alarms return to “Active” state)
  • For persistent acknowledgment tracking, use MpAlarmXHistory export or external logging

14. Resetting / Clearing Alarm Buffers

14.1 Clearing Individual Alarms

(* Reset a specific alarm manually *)
MpAlarmXReset(
    xListIdent := gAlarmListIdent,
    wAlarmName := 'SensorFault_42'
);

This transitions the alarm from any state back to Inactive, regardless of the underlying condition.

14.2 Clearing All Alarms in a List

(* Reset all alarms *)
MpAlarmXResetAll(
    xListIdent := gAlarmListIdent
);

Caution: This clears all alarm states, including those that may still have active conditions. The alarms will be re-triggered on the next cycle if the condition persists.

14.3 Deleting Alarm History

The MpAlarmXHistory component supports deleting alarm history:

  • History can be cleared/deleted through the MpAlarmXHistory function block
  • Typically done via a maintenance-mode routine
  • Confirm before executing as this is irreversible

Community guidance: Use MpAlarmXHistory.DeleteAlarmHistory() or equivalent method through the history component configuration.

14.4 Clearing the AR Logger / Logbook

The AR system logbooks are ring buffers in memory. To clear:

  • In Automation Studio: Open Logger (Ctrl+L), right-click a logbook module, select “Clear”
  • Programmatically: Not directly supported; the ring buffer is managed by AR

14.5 Resetting the MpAlarmXCore Buffer

To reset the entire in-memory alarm buffer (not history):

  1. Stop the MpAlarmXCore cyclic task
  2. Clear all alarms using MpAlarmXResetAll
  3. Restart the cyclic task
  4. Or simply perform a warm restart of the controller

14.6 Maintenance Mode Considerations

The AlarmX Framework provides per-alarm inhibition logic:

  • Alarms can be disabled based on a shared condition
  • Common conditions: maintenance mode, commissioning mode, tool change, manual jogging
  • This is preferred over clearing buffers, as it preserves alarm configuration while suppressing false triggers during maintenance
(* Inhibit all alarms during maintenance *)
gAlarmInhibit := gSystemMode = MODE_MAINTENANCE;

(* Each alarm checks the inhibit flag before triggering *)
IF gAlarmInhibit THEN
    (* Alarm is suppressed, not triggered, not logged *)
ELSE
    (* Normal alarm processing *)
END_IF

14.7 CF Card File Management

For managing accumulated alarm history CSVs on the CF card:

(* Delete alarm files older than 90 days *)
IF gClock.bNewDay THEN
    FileDelete(sFileName := CONCAT('/User/AlarmHistory/', sOldDate, '.csv'));
END_IF

Use the FileIO library for file operations:

  • FileOpen, FileRead, FileWrite, FileClose
  • FileDelete, FileRename
  • DirGetFirstEntry, DirGetNextEntry for directory listing

Appendix A: Key Function Blocks Reference

Function BlockLibraryPurpose
MpAlarmXCoremapp AlarmXCore alarm management engine
MpAlarmXListmapp AlarmXAlarm list instance linked to core
MpAlarmXSetmapp AlarmXManually trigger an alarm
MpAlarmXResetmapp AlarmXManually reset/clear an alarm
MpAlarmXAcknowledgemapp AlarmXAcknowledge a specific alarm
MpAlarmXAcknowledgeAllmapp AlarmXAcknowledge all alarms in a list
MpAlarmXResetAllmapp AlarmXReset/clear all alarms
MpAlarmXConfigAlarmmapp AlarmXCreate/modify alarm at runtime
MpAlarmXHistorymapp AlarmXExport alarm history to file
ArEventLogWriteLogArEventLogWrite to AR system logbook
MO_infoRuntimeGet logbook module address/length for export
MpTweetmapp ServicesSend SMS/email notifications

Appendix B: Key File Paths

PathDescription
/System/AR system files, logbooks (protected since AR 4.91)
/User/User partition for application data
/User/AlarmHistory/Default location for MpAlarmXHistory CSV exports
/User/*.brExported binary logbook files

Appendix C: Runtime Utility Center Quick Reference

  1. Connect to controller via Ethernet
  2. Tools > Back up files from Compact Flash / Image file
  3. Select target CF card or image
  4. Browse file system, select files, download

Appendix D: Useful B&R Community Links

  • MpAlarmX - Complete alarm management (Automation Studio Help)
  • mapp AlarmX video tutorials (YouTube: B&R Industrial Automation channel)
  • mapp Framework 6: AlarmX Framework (open source, B&R Community CoLab)
  • OPC UA Alarm and Events with MpAlarmXList & MpAlarmXCore (Community thread)
  • Role-Based Acknowledge Permissions (Community thread)
  • ArEventLog example code (Community thread)
  • Saving logbook to file device (Community thread)
  • Retrieving log book from CF/CFast (Community thread)

Cross-References


Key Findings

  1. B&R alarm management is split across multiple systems: MpAlarmX (mapp framework), Visual Components (legacy HMI), and OPC-UA alarms. On an undocumented machine, check which system is in use by examining the running program’s libraries.
  2. Alarms are stored on the CF card in non-volatile memory and persist across power cycles, but buffer capacity is finite — oldest entries get overwritten. Extract alarms proactively via FTP or SDM system dumps.
  3. The SDM system dump is the single most valuable alarm artifact for undocumented machines — it captures the full alarm history, logger output, and configuration without needing Automation Studio.
  4. Remote alarm notification (email, OPC-UA, SNMP, MQTT) requires configuration that the OEM may not have set up. The IIoT retrofit path in iiot-retrofit.md covers bridging alarms to modern protocols.
  5. Alarm severity classification follows the MpAlarmX priority levels (Info, Warning, Error, Critical), and each alarm instance carries timestamps, acknowledge status, and optional parameter data.
  6. Legacy Visual Components alarms use a different architecture than mapp MpAlarmX — when working with older AR versions, alarm access patterns differ significantly.

B&R Safe I/O and Safety System Diagnostics

Safety systems on B&R installations — including Safe I/O modules, SafeLOGIC controllers, and openSAFETY communication — operate independently of the standard control program and enforce SIL-rated safety functions. When a safety system faults, the machine stops, and diagnosing the root cause without OEM documentation or safety engineering expertise is extremely challenging. This document covers how B&R safe I/O modules work, SIL rating verification, safety program structure, how to diagnose safety system faults, and how to back up and restore safety parameters when the OEM is no longer available. Cross-references: io-card-hardware.md for general IO card architecture, diagnostics-sdm.md for SDM diagnostic integration, and cp1584-hardware-ref.md for CP1584 hardware specifications relevant to safety.

Comprehensive Technical Reference


Table of Contents

  1. B&R Safe I/O Modules (Safe I/O, SafeLOGIC)
  2. SIL Rating Verification
  3. Safety Program Structure in B&R
  4. Diagnosing Safety System Faults
  5. Safety Parameter Backup/Restore When OEM is Unavailable
  6. SafeLOGIC Configuration Files on CF Card
  7. FSoE (Fail Safe over EtherCAT/Ethernet) on B&R
  8. Safety-Rated I/O Modules and Their Diagnostics LEDs
  9. How to Replace a Safe I/O Module
  10. Safety System Reset Procedures
  11. Diagnostic Events and Error Codes for Safe Systems
  12. Certification Requirements and Documentation
  13. Black Channel Concept and Safety Communication

1. B&R Safe I/O Modules (Safe I/O, SafeLOGIC)

1.1 Architecture Overview

B&R’s integrated safety technology eliminates the need for standalone safety relays by embedding safety functions directly into the standard automation controller and I/O infrastructure. The B&R safety system architecture comprises:

  • SafeLOGIC Controllers — dedicated safety processing units that execute the safety application independently from the standard PLC program.
  • Safe I/O Modules — safety-rated input and output modules that connect physical safety devices (E-stops, light curtains, guard switches, safety mats) to the SafeLOGIC controller.
  • SafeLOGIC-X Controllers — intelligent programmable safety modules that integrate SafeLOGIC functionality directly into an I/O slice, enabling decentralized safety logic at the I/O station level.
  • SafeDESIGNER — the integrated development tool within Automation Studio for programming safety functions.
  • openSAFETY — B&R’s open, TUV-certified safety protocol for transmitting safety data over industrial Ethernet.

1.2 SafeLOGIC Controller Families

ControllerSystemNetworkMax Safe NodesKey Features
X20SL8001X20POWERLINK100Base SafeLOGIC, 1 ms cycle, SIL 3 / PL e
X20SL8100X20POWERLINK100Extended SafeLOGIC, integrated on X2X link
X20SL811X20POWERLINK100SafeLOGIC with SafeKEY hardware key
X20SLX811X20X2XStation-levelSafeLOGIC-X, decentralized safety at I/O station, SIL 3 / PL e, ATEX
X67 SafeLOGICX67X2X/IP67Station-levelIP67-rated decentralized safety controller

1.3 Safe I/O Module Families

X20 Safe Digital Input Modules:

ModuleChannelsRatingFeatures
X20SI910020 DI + 4 pulseSIL 3 / PL e, Cat. 4Safe digital inputs with pulse evaluation
X20SI41004 DISIL 3 / PL e, Cat. 4Compact safe digital input
X20SD51414 DISIL 3 / PL e, Cat. 4Safe digital input, compact form

X20 Safe Digital Output Modules:

ModuleChannelsRatingFeatures
X20SO911020 DOSIL 3 / PL e, Cat. 4Safe digital outputs for actuator control
X20SO41104 DOSIL 3 / PL e, Cat. 4Compact safe digital output
X20SO41114 DO (dual-ch)SIL 3 / PL e, Cat. 4Dual-channel test output

X20 Safe Mixed I/O Modules:

ModuleChannelsRatingFeatures
X20SM51434 DI + 4 DOSIL 3 / PL e, Cat. 4Mixed safe I/O for guard monitoring + safe stop

X67 Safe I/O Modules (IP67):

ModuleChannelsRatingFeatures
X67SB41004 DISIL 3 / PL eIP67 safe digital input
X67SB41104 DOSIL 3 / PL eIP67 safe digital output
X67SC41224 DI + 4 DOSIL 3 / PL eIP67 mixed safe I/O

1.4 Safe I/O and Standard I/O Coexistence

Safe I/O modules can be freely combined with standard I/O modules on the same X2X or POWERLINK bus. Each SafeLOGIC controller is assigned a unique SafeLOGIC ID (safety domain number) that defines which safe I/O modules belong to its safety domain. This allows multiple SafeLOGIC controllers to operate on the same physical network without interference.

1.5 SafeLOGIC-X Technology

SafeLOGIC-X is B&R’s decentralized safety concept where the safety controller is integrated directly into the I/O slice (e.g., X20SLX811). This approach:

  • Reduces response times by processing safety logic locally at the I/O station
  • Eliminates the need for a central SafeLOGIC controller for distributed machines
  • Supports up to SIL 3 / PL e
  • Communicates over the X2X link (bus module backplane)
  • Maintains the same SafeDESIGNER programming environment

2. SIL Rating Verification

2.1 Applicable Standards

B&R safety products are certified to the following functional safety standards:

StandardScopeApplicability
IEC 61508Functional safety of E/E/PE systemsSIL 1–3 for system design
IEC 62061Safety of machinery — functional safetySIL 1–3 for machine safety
ISO 13849-1Safety of machinery — safety-related parts of control systemsPL a–e, Cat. B/1/2/3/4
IEC 61800-5-2Adjustable speed electrical power drive systems — safety functionsSTO, SS1, SS2, SLS, SOS, SBC, SSM, SLI, STI, SLP
EN ISO 25119Safety of agricultural machineryAgPL a–d

2.2 B&R Safety Ratings

B&R’s X20 SafeLOGIC controllers and Safe I/O modules achieve:

  • SIL 3 per IEC 61508 (hardware) and IEC 62061 (system)
  • PL e, Category 4 per ISO 13849-1
  • Certified by TUV Rheinland and TUV SUD

These ratings apply to the complete safety channel (SafeLOGIC + Safe I/O module + safe application programmed in SafeDESIGNER). The achieved SIL/PL must be verified for each individual safety function in the machine risk assessment.

2.3 How to Verify SIL Rating on a B&R Safety System

  1. Check the module datasheet: Every B&R Safe I/O module and SafeLOGIC controller datasheet states the maximum achievable SIL/PL/Cat. rating. Datasheets are available from the B&R product page or via the Automation Studio help system.

  2. Review the safety report: After compiling a safety project in SafeDESIGNER, a *.safetcreport file is generated. This report documents:

    • PFHd (Probability of Dangerous Failure per Hour) for each safety function
    • Achieved SIL/PL for the complete safety function chain
    • Diagnostic coverage (DC) per channel
    • Mean Time to Dangerous Failure (MTTFd) values
    • Common Cause Failure (CCF) metrics
    • Architecture class (A, B, C, D) per ISO 13849-1
  3. Verify with the module status: Each SafeLOGIC controller provides diagnostic datapoints accessible in Automation Studio:

    • ModuleOk — indicates hardware health of the safety controller
    • ConfigMatch — verifies that the downloaded safety configuration matches the hardware
    • SafetyState — shows the current state of the safety application
  4. Cross-reference the TUV certificate: B&R publishes TUV certificates for safety products. The certificate number and scope are listed on the product page at br-automation.com.

  5. Automation Studio verification workflow:

    SafeDESIGNER > Safety Project > Build
    → Check the .safetcreport output
    → Verify PFHd ≤ required threshold for target SIL
    → Confirm architecture meets Cat. 3 or Cat. 4 requirements
    → Verify DCavg ≥ 99% for SIL 3 / PL e
    

2.4 SIL Verification During Commissioning

During commissioning, SIL verification involves:

  • Confirming all safety components in the bill of materials are certified to the required level
  • Verifying wiring meets dual-channel requirements for Cat. 3/4
  • Running the safety acceptance test (SAT) documented in the machine’s safety design report
  • Recording all test results and comparing against the safety requirements specification (SRS)

3. Safety Program Structure in B&R

3.1 SafeDESIGNER — The Safety Programming Tool

SafeDESIGNER is B&R’s integrated safety engineering tool, embedded within Automation Studio. It provides:

  • Graphical Function Block programming (CFC — Continuous Function Chart) with virtual wiring of certified safety function blocks
  • PLCopen-certified safety function blocks — a TUV Rheinland-certified library of 20+ function blocks for machine automation
  • IEC 61131-3 language support — ST (Structured Text) for safety logic alongside graphical CFC
  • Strict data type separation — safe data types (prefixed SAFE) cannot be mixed with standard data types, enforced by the compiler
  • Integrated simulation — ARsim supports safety program simulation offline
  • Safety project compilation — the AR safety compiler generates a signed safety configuration that is transferred to the SafeLOGIC controller

3.2 Safe Task Classes

B&R safety programs execute in dedicated task classes, separate from standard PLC task classes:

Task Class TypeTypical Cycle TimePurposeNotes
Safety Task1 ms (minimum)Executes the safety application on the SafeLOGIC controllerConfigured in SafeDESIGNER, not in the standard task configuration
Cyclic Task1–100 msStandard PLC application, exchanges data with safety task via I/O mappingPriority hierarchy: Safety > high-priority cyclic > normal cyclic

The safety application cycle time is a critical parameter:

  • Configured via the Cycle_Time_us parameter in SafeDESIGNER (in microseconds)
  • Minimum cycle time is 1 ms (1000 us)
  • The safety cycle time directly affects the safety response time of the overall system
  • Safety response time = input filter time + cycle time * 0.05 + cycle time of safety application + output reaction time

3.3 Safe IEC Functions — PLCopen Safety Library

B&R provides a TUV-certified library of safety function blocks conforming to the PLCopen standard. Function blocks are identified by a red “S” on a yellow background in the SafeDESIGNER palette.

Core Safety Function Blocks:

Function BlockStandardDescription
SF_EmergencyStopPLCopenEmergency stop evaluation with dual-channel monitoring
SF_SafetyDoorPLCopenGuard door / safety gate monitoring with interlock
SF_LightCurtainPLCopenSafety light curtain Type 2/4 monitoring
SF_TwoHandControlPLCopenTwo-hand control station evaluation (Type IIIC)
SF_SafetyMatPLCopenSafety mat and edge evaluation
SF_ESPEPLCopenEmergency stop evaluation (type-dependent)
SF_SSDPLCopenSafety standstill detection
SF_SLSPLCopenSafely limited speed monitoring
SF_SLPPLCopenSafely limited position
SF_STOPLCopenSafe torque off
SF_SS1PLCopenSafe stop 1
SF_SS2PLCopenSafe stop 2
SF_TimerESTOPPLCopenEmergency stop timer for Category 0/1 stop
SF_LatchResetPLCopenLatch with reset (acknowledge required)
SF_Gate_2ChPLCopenTwo-channel gate switch monitoring
SF_BypassPLCopenManual bypass for maintenance mode
SF_DiagnosticsPLCopenDiagnostic code output for each safety function block

User-defined function blocks (green background) can also be created for reusable safety logic patterns.

3.4 Data Mapping Between Safety and Standard Programs

The safety application and standard PLC application are strictly separated. Data exchange occurs through mapped variables:

SafeDESIGNER I/O Mapping:
  Safe Application Variable  →  Mapped Variable  →  Standard Application Variable
  ────────────────────────     ──────────────     ────────────────────────────
  SF_EmergencyStop.SafeOut   →  mapp Safety →     bEStop_Active (BOOL)
  DiagCode                   →  mapp Safety →     nDiagCode (USINT)

SafeLOGIC controller channels can transfer diagnostic codes from PLCopen function blocks to the standard application. Diagnostic data flows unidirectionally from safe to standard — the standard program can read safety status but cannot write to safety inputs.

3.5 Safety+ — Next Generation Safety Programming

B&R’s Safety+ platform extends the traditional SafeDESIGNER model with:

  • Open code base with digital fingerprint protection — the safety configuration is versioned and traceable, enabling Git-based workflows
  • CLI “headless” architecture — safety projects can be built, verified, and deployed without the full AS GUI, enabling CI/CD pipelines
  • Third-party tool integration — static analysis (e.g., SCA tools), version control (Git), and automated testing can validate safety changes
  • Automatic safety configuration updates — when hardware is replaced, Safety+ automatically downloads the correct safety configuration to the replacement module, eliminating manual parameter transfer
  • Remote maintenance and integrated diagnostics — remote safety system monitoring with structured diagnostic output
  • mapp Safety components — mapp Safety components for rapid safety function development ( alarms, diagnostics, parameter management)

Safety+ and the OEM-unavailable scenario:

Safety+ addresses several critical pain points for engineers maintaining undocumented systems:

  • The automatic configuration download feature means that replacing a safe I/O module of the same type does not require SafeDESIGNER access — the controller pushes the safety configuration to the new module automatically (see Section 9.2 for SafeLOGIC-X replacement)
  • The CLI headless build capability enables automated safety validation pipelines that check safety configuration integrity without manual GUI interaction
  • Digital fingerprints allow you to verify that a safety configuration hasn’t been tampered with by comparing fingerprints before and after maintenance

Safety+ vs SafeDESIGNER comparison:

FeatureSafeDESIGNER (Traditional)Safety+ (Next Gen)
ProgrammingGUI-only (CFC)CLI + GUI
Version controlManual file managementGit-native with digital fingerprints
Module replacementMay require re-download of configAutomatic config download
CI/CD integrationNot supportedHeadless CLI build
Static analysisManualTool-integrated
Remote maintenanceLimitedBuilt-in remote diagnostic
Automation Studio versionAS 4.xAS 6.x (with mapp Framework 6)

Important: Safety+ requires Automation Studio 6.x and mapp Framework 6. These are incompatible with AS 4.x. If the CP1584 runs AS4, Safety+ features are not available — you must use traditional SafeDESIGNER. However, if you migrate to newer B&R hardware (X20CP3484+), Safety+ becomes available and significantly simplifies safety system maintenance. See firmware-version-mgmt.md for AS6 migration details and remanufacturing.md for hardware migration planning.


4. Diagnosing Safety System Faults

4.1 B&R Diagnostic Toolchain

B&R provides a layered diagnostic approach for safety system troubleshooting. Use tools in this priority order:

ToolAccess MethodBest ForSafety Relevance
Module LEDsVisual inspectionFirst-pass hardware healthPrimary safety fault indicator
System Diagnostics Manager (SDM)http://<plc-ip>/sdmSystem dump, log files, drive I&M dataSafety subsystem logs, SBC errors
Automation Studio Online DiagnosticsAS > Online > DiagnosticsReal-time error trace, variable monitoringSafety variable states, diagnostic codes
SafeDESIGNER DiagnosticsAS > SafeDESIGNER > OnlineSafety function block states, diagnostic outputsPer-FB diagnostic codes
mapp Alarm / mapp LoggerAS > mapp componentsStructured event capture, severity classificationSafety alarm events
Network Command TraceAS > Configuration > NetworkTelegram-level POWERLINK/EtherCAT analysisSafety communication integrity
ARsimAS > SimulationOffline testing of safety logicLogic verification before deployment

4.2 Systematic Fault Diagnosis Procedure

Step 1 — Identify the fault indicator:

  • Which LED is in error state on the SafeLOGIC controller or Safe I/O module?
  • Is the ModuleOk datapoint FALSE in Automation Studio?
  • Is there a safety diagnostic code from a PLCopen function block?
  • Is the SDM Logger showing a SafetyError entry?

Step 2 — Determine fault domain:

                      Safety Fault?
                     /             \
                   Yes              No
                  /                   \
          Safety Hardware?        Standard PLC fault
          /           \            (not safety-related)
    SafeLOGIC?     Safe I/O?
    (controller    (module LEDs,
     LEDs/SDM)     module OK)

Step 3 — Check the SDM Logger:

  1. Open browser → http://<plc-ip>/sdm
  2. Navigate to System > Logger
  3. Filter by SafetyError, SafetyWarning, SBC
  4. Download as CSV for analysis
  5. Cross-reference timestamps with operator actions and safety I/O events

Step 4 — Check Safety Function Block Diagnostics:

  1. In SafeDESIGNER, go Online
  2. Monitor the diagnostic output of each safety function block (typically a USINT diagnostic code)
  3. Cross-reference the diagnostic code against the PLCopen function block documentation

Step 5 — Verify Safety Configuration:

  1. In Automation Studio, check if the I/O configuration matches the physical hardware
  2. Verify that the SafeLOGIC ID matches the expected safety domain
  3. Confirm the safety CRC checksum matches (displayed in the SDM)
  4. Check for firmware/parameter version mismatch

4.3 Common Safety Fault Patterns

SymptomLikely CauseDiagnostic MethodResolution
ModuleOk = FALSE on SafeLOGICHardware fault or power issueCheck SDM Logger, verify 24V supplyReplace SafeLOGIC controller, check power
ModuleOk = FALSE on Safe I/O moduleModule fault, wiring error, or config mismatchSDM Logger, physical LED checkReplace module, verify wiring, re-download config
Safety outputs stuck in safe stateSafety input active, or internal latchCheck which FB diagnostic code is nonzeroClear safety input, acknowledge latch
Safety configuration CRC mismatchConfiguration downloaded but hardware changedSDM > System > I&M dataRe-download safety configuration
Safety communication timeoutopenSAFETY/FSoE connection lostSDM Logger, Network Command TraceCheck cabling, verify network topology
Safe task class cycle violationSafety program exceeds cycle timeAS > Online > Task Class MonitorOptimize safety logic, increase cycle time

4.4 SDM (System Diagnostics Manager) — Deep Dive

The SDM is the on-board web server embedded in every B&R controller. It is the primary diagnostic tool when safety faults are not visible in the standard PLC Logger.

Access: http://<controller-ip>/sdm

Key SDM Features for Safety Diagnostics:

  • System Dump: Bundles logger entries, runtime measurements, and I&M data for all connected devices including safety modules
  • Logger: Historical log of all events including safety subsystem events (SafetyError, SafetyWarning, SBC entries)
  • I&M (Identification & Maintenance): Serial numbers, firmware versions, module type, operating hours for each safety module
  • Network Topology: Shows all connected modules and their communication status

Important: The safety subsystem writes diagnostic entries to the SDM Logger even when the standard PLC Logger is empty. When investigating safety faults, always check the SDM Logger first.


5. Safety Parameter Backup/Restore When OEM is Unavailable

5.1 The Challenge

When the original OEM is unavailable and the Automation Studio project file is lost, the safety configuration (parameters, I/O mapping, safety program logic) must be recovered from the running system. B&R safety systems store safety configurations on the controller’s CompactFlash (CF) card, but there are important constraints.

5.2 What Can Be Backed Up

DataBackup MethodRestore Method
Standard PLC program + configurationAutomation Studio: Target > Backup > Create (produces .abk file)Target > Backup > Restore
CF card raw imagedd disk imaging (sector-by-sector copy)dd restore to identical CF card
Safety configuration (compiled)Downloaded to SafeLOGIC via SafeDESIGNER — embedded in the AS backupRe-upload via SafeDESIGNER from backup
Safety parameter setsStored on CF card as part of the configurationCF card imaging restores them
I&M data and loggerSDM > System > Dump (downloadable)Not directly restorable (informational)

5.3 Method 1 — Automation Studio Online Backup (Preferred)

Requirements: Automation Studio software installed, Ethernet connection to PLC.

  1. Connect to the B&R PLC via Ethernet (target IP address)
  2. Open Automation Studio → Online > Connect
  3. Select the target device and establish communication
  4. Navigate to Target > Backup > Create
  5. Select Full Backup (includes OS, runtime, user data, and safety configuration)
  6. Save to local PC (e.g., Machine1_FullBackup_20260710.abk)
  7. Verify backup completes without errors

Restore:

  1. Connect to target PLC in Online mode
  2. Target > Backup > Restore
  3. Select the .abk backup file
  4. Confirm — this overwrites all runtime data
  5. Controller restarts automatically

5.4 Method 2 — Direct CF Card Imaging (When AS Project is Unavailable)

Requirements: Card reader, disk imaging software, replacement CF card.

Backup:

  1. Power down the B&R controller
  2. Remove the CF card
  3. Connect CF card to PC via card reader
  4. Create raw image:
    # Linux
    dd if=/dev/sdX of=BR_Safety_CF_Backup_20260710.img bs=4M conv=noerror,sync
    
    # Windows (via Win32 Disk Imager or WSL dd)
    dd if=\\.\E: of=BR_Safety_CF_Backup.img bs=4M conv=noerror,sync
    
  5. Verify the image by mounting it and checking contents
  6. Store the image file with documentation of: controller model, firmware version, date, machine ID

Restore:

  1. Insert replacement CF card (same capacity or larger, same type)
  2. Write the image:
    dd if=BR_Safety_CF_Backup_20260710.img of=/dev/sdX bs=4M conv=noerror,sync
    
  3. Safely eject and insert into B&R controller
  4. Power on and verify boot sequence completes

5.5 Method 3 — CF Card File-Level Backup

The B&R CF card typically contains these directories and files relevant to safety:

/ (CF card root)
├── System/
│   ├── ARconfig          — Automation Runtime configuration
│   ├── Safety/           — Safety configuration files (SafeLOGIC)
│   │   ├── SafetyConfig.dat
│   │   ├── SafetyCRC.chk
│   │   └── SafetyParams/
│   │       └── *.par      — Safety parameter sets
│   └── I&M/              — Identification & Maintenance data
├── User/
│   └── <project_name>/   — User application files
└── Log/                   — Runtime logger files

Note: Safety configuration files on the CF card are compiled and signed by the SafeDESIGNER safety compiler. They cannot be edited directly — they can only be replaced by a new compilation from SafeDESIGNER or by restoring the raw image.

5.6 Critical Limitations

  • Safety program source code cannot be recovered from a compiled safety configuration. Without the original SafeDESIGNER project, you cannot modify the safety logic — you can only restore an exact copy.
  • CF card imaging preserves the running configuration but does not allow viewing or editing the safety program.
  • Version matching is critical: The Automation Studio version used to restore must match the runtime version on the PLC.
  • After restore, a full safety acceptance test must be performed before returning the machine to production.

5.7 Best Practices for OEM-Unavailable Scenarios

  1. Always perform a raw CF card backup immediately upon receiving a machine with unknown history
  2. Document the current safety state before any changes: capture SDM dump, logger output, and I&M data
  3. Store backups on multiple media (network drive, USB, cloud)
  4. Record the controller firmware version, AS version, and module serial numbers with each backup
  5. If modifications are needed and no AS project exists, contact B&R support or a certified B&R integrator for project recovery options

6. SafeLOGIC Configuration Files on CF Card

6.1 CF Card Directory Structure for Safety

The B&R CompactFlash card stores both the standard Automation Runtime image and the safety-related configuration. The safety-specific files reside under the System/Safety/ directory tree.

6.2 Key Safety Files

File/DirectoryDescription
System/Safety/SafetyConfig.datCompiled safety configuration generated by SafeDESIGNER (binary, signed)
System/Safety/SafetyCRC.chkCRC checksum of the safety configuration — verified by SafeLOGIC at startup
System/Safety/SafetyParams/*.parSafety parameter sets including SafeLOGIC IDs, cycle time, safety response time defaults
System/Safety/SafeLOGIC_X/SafeLOGIC-X specific configuration (for decentralized safety controllers)
System/Safety/FSoE/FSoE / openSAFETY configuration files for safety communication
System/ARconfigAutomation Runtime master configuration (references safety module placement)
System/Safety/SafeKEY.datSafeKEY hardware key data (for X20SL811 controllers)

6.3 SafeLOGIC ID Configuration

The SafeLOGIC ID is a unique identifier that defines the safety domain. It is configured:

  • In SafeDESIGNER under Safety Project Properties
  • Written to the CF card as part of the safety parameter set
  • Each safe I/O module must be assigned to a SafeLOGIC ID to be part of that safety domain
  • The SafeLOGIC ID is verified at startup — a mismatch between the CF card configuration and the physical module placement will cause a configuration fault

6.4 Safety Response Time Parameters

Critical safety timing parameters stored on the CF card:

ParameterLocationDefault/RangeDescription
Cycle_Time_usSafetyParams1000 us (min 1000)Safety application cycle time
Response_Time_DefaultSafetyParamsConfigurableDefault safety response time for the safety domain
SBC_t_diagSafeMOTION config200 ms (typical)Safe Brake Control diagnostic time
Filter_TimePer-module configConfigurableInput filter time for safe digital inputs

6.5 Configuration Verification at Startup

When the SafeLOGIC controller boots, it performs these verification steps:

  1. Read the safety configuration from the CF card
  2. Verify the CRC checksum against SafetyCRC.chk
  3. Verify the SafeLOGIC ID matches the configured hardware topology
  4. Verify each safe I/O module’s position matches the expected configuration
  5. Initialize the safety communication (openSAFETY / FSoE) connections
  6. If all checks pass, transition to SafeOperational state
  7. If any check fails, transition to SafeFault state (safe outputs de-energized)

6.6 Protecting Safety Configuration Files

  • Safety configuration files are signed by the SafeDESIGNER safety compiler
  • Modifying safety files outside SafeDESIGNER invalidates the signature
  • The SafeLOGIC controller will reject unsigned or CRC-failed configurations
  • For X20SL811, the SafeKEY hardware token provides an additional layer of protection — the safety configuration is encrypted to the specific SafeKEY

7. FSoE (Fail Safe over EtherCAT/Ethernet) on B&R

7.1 FSoE Overview

Safety over EtherCAT (FSoE) is the open protocol for transmitting safety data over EtherCAT, developed within the EtherCAT Technology Group (ETG). FSoE uses the Black Channel principle (see Section 13) and is certified to SIL 3 per IEC 61508, standardized in IEC 61784-3.

B&R supports both openSAFETY (B&R’s own open safety protocol) and FSoE (EtherCAT safety protocol), depending on the communication infrastructure:

ProtocolTransportStandardMax SIL/PL
openSAFETYPOWERLINK, Ethernet, X2X, EtherCATIEC 61784-3 Ed. 2SIL 3 / PL e
FSoEEtherCATIEC 61784-3 Ed. 2 (profile)SIL 3 / PL e

7.2 FSoE Frame Structure

The FSoE protocol embeds safety data as a container within standard EtherCAT process data:

FSoE Frame (minimum 6 bytes):
┌─────────┬───────────┬───────┬───────┬─────────────┐
│  CMD    │ Safe Data │ CRC_0 │ CRC_1 │  ConnID     │
│ (1 byte)│ (N bytes) │(2 b)  │(2 b)  │ (1 byte)    │
└─────────┴───────────┴───────┴───────┴─────────────┘
  • CMD: Command byte (init, data, acknowledge, etc.)
  • Safe Data: Actual safety payload (every 2 bytes protected by CRC)
  • CRC_0 / CRC_1: 16-bit CRC checksums for data integrity verification
  • ConnID: Connection identifier (1-byte) to prevent cross-connection errors

The maximum Safe Data length is not restricted by the protocol itself.

7.3 FSoE on B&R — Topology

B&R supports two FSoE topology models:

Decentralized Safety Logic:

  • The FSoE MainInstance (safety logic) is implemented in an EtherCAT SubDevice (e.g., SafeLOGIC-X on X2X link)
  • The EtherCAT MainDevice (B&R CPU) handles standard data and routes FSoE frames
  • SubDevice-to-SubDevice communication is required — the MainDevice copies relevant input data blocks between SubDevices
  • Configuration defined in the ENI file (EtherCAT Network Information) via CopyInfos elements

Centralized Safety Logic:

  • The FSoE MainInstance is integrated into the EtherCAT MainDevice (B&R SafeLOGIC controller)
  • Simpler configuration — no SubDevice-to-SubDevice communication needed
  • The controller must be safety-certified
  • Reduced cycle time overhead for safety data

7.4 openSAFETY on B&R

openSAFETY is B&R’s contribution to open safety communication:

  • Runs on POWERLINK, standard Ethernet, EtherCAT, and X2X link
  • Supports up to 100 openSAFETY nodes per SafeLOGIC controller
  • Features deterministic safety communication with guaranteed cycle times
  • TUV-certified, IEC 61508 SIL 3
  • Configuration via SafeDESIGNER within Automation Studio

7.5 Configuring FSoE/openSAFETY Communication

  1. In Automation Studio, add the SafeLOGIC controller to the I/O configuration
  2. Assign SafeLOGIC IDs to define safety domains
  3. Connect safe I/O modules to the appropriate SafeLOGIC ID
  4. Configure safety communication parameters (guard time, watchdog time)
  5. In SafeDESIGNER, map safety variables to FSoE/openSAFETY communication objects
  6. Build and transfer the safety configuration to the SafeLOGIC controller

7.6 Safety Communication Monitoring

The SafeLOGIC controller continuously monitors safety communication integrity:

  • Watchdog timer: If an FSoE frame is not received within the watchdog time, a communication fault is declared
  • CRC verification: Every received frame’s CRC is verified
  • Connection ID check: Prevents frames from being misinterpreted between different connections
  • Sequence monitoring: Detects dropped, duplicated, or out-of-sequence frames
  • Guard time: Minimum time between consecutive FSoE frames (detects overrun)

8. Safety-Rated I/O Modules and Their Diagnostics LEDs

8.1 LED Layout on Safe I/O Modules

B&R X20 Safe I/O modules use a consistent LED layout for at-a-glance diagnostics:

LEDColor/StateMeaning
Run (R/E)Green steadyModule operational, no fault
Run (R/E)Green blinkingModule booting / firmware loading
Run (R/E)Red blinkingClass 1 warning (non-safety warning)
Run (R/E)Red steadyClass 2/3 error (hardware or configuration fault)
Run (R/E)OffNo 24V control supply
Error (ERR)Green steadySafety communication active (FSoE/openSAFETY OK)
Error (ERR)Red steadySafety fault — configuration mismatch, CRC error, or safety latch
Error (ERR)OffNo safety communication established
Channel LEDs (DI)Green/Yellow/RedPer-channel input state and diagnostic status
Channel LEDs (DO)Green/RedPer-channel output state and short-circuit diagnostic

8.2 SafeLOGIC Controller LEDs

LEDColor/StateMeaning
RDYGreen steadySafeLOGIC ready, in SafeOperational state
RDYGreen blinkingSafeLOGIC booting, loading safety configuration
RDYRed steadySafeLOGIC fault — safe outputs de-energized
R/EGreenRun state (SafeLOGIC-X)
R/ERedError state (SafeLOGIC-X)
SEGreenSafety stop active (STO requested)
SERed steadySafety latch — SafeMOTION/SBC fault (for SafeMOTION controllers)

8.3 ACOPOS-Multi SAFE Drive LEDs

R/ESEL/AState
OffOffOffNo 24V control supply / DC bus not powered
Green blinkOffGreen blinkBooting / firmware load
Green steadyOffGreen/OffRun, no safety fault
Green steadyGreen steadyGreenRun with safe stop active (STO requested)
Red blinkOff*Class 1 drive warning
Red steadyOff*Class 2/3 drive fault (non-safety)
Red steadyRed steady*SafeMOTION latch (STO/SBC/SS1/SS2/SOS/SDI/SLS)
Red steadyOffOffCommunication loss

8.4 Interpreting LED Patterns for Safety Diagnosis

Algorithm for Safe I/O Module LED Diagnosis:

IF Run = RED steady AND Error = RED steady:
    → Safety configuration fault (CRC mismatch, module position wrong, or config not downloaded)
    → Action: Re-download safety configuration from SafeDESIGNER, verify module placement

IF Run = RED steady AND Error = OFF:
    → Standard hardware fault or 24V supply issue (not safety-related)
    → Action: Check 24V supply, replace module if hardware fault

IF Run = GREEN steady AND Error = GREEN steady:
    → Normal operation with active safety communication
    → No action needed

IF Run = GREEN steady AND Error = RED steady:
    → Safety communication established but safety function in fault state
    → Action: Check SafeDESIGNER diagnostics for FB diagnostic codes

IF Channel LED = RED on a safe DI:
    → Channel diagnostic fault (wire break, short circuit, or cross-channel error)
    → Action: Check wiring to that channel, verify dual-channel integrity

IF Channel LED = RED on a safe DO:
    → Output diagnostic fault (short circuit or overload)
    → Action: Check load wiring, verify load does not exceed module rating

9. How to Replace a Safe I/O Module

9.1 Prerequisites Before Replacement

  1. Verify the replacement module is identical: Same part number, same hardware revision, same firmware version
  2. Have the safety configuration available: The safety configuration (from SafeDESIGNER) must be ready to download after the hardware swap
  3. Document the current state: Record module serial number, position in the I/O station, LED states, and any diagnostic codes
  4. Perform a full backup: Use Method 1 (Automation Studio backup) or Method 2 (CF card imaging) before touching the hardware

9.2 Replacement Procedure (SafeLOGIC System)

For SafeLOGIC (centralized safety controller):

  1. Stop the machine and place it in a safe state per the machine’s lockout/tagout procedure
  2. Do NOT power down the controller if the system supports hot-swap of I/O modules (X20 system supports hot-swap for standard I/O; verify support for the specific safe I/O module type)
  3. Note the exact module position (station number, slot number within the X20 slice assembly)
  4. Remove the old module:
    • Release the terminal block from the electronics module
    • Release the electronics module from the bus module
    • Remove the bus module from the DIN rail (if required)
  5. Install the new module:
    • Insert the bus module onto the DIN rail
    • Attach the electronics module to the bus module
    • Reconnect the terminal block (verify wiring matches the terminal diagram)
    • Ensure the module clicks into place
  6. In Automation Studio, go Online and verify the new module is detected:
    • Check ModuleOk for the replacement module
    • Verify the module appears in the correct position in the I/O tree
    • Check the SDM for any configuration mismatch errors
  7. If configuration mismatch occurs (CRC error after module swap):
    • Re-download the safety configuration from SafeDESIGNER
    • The SafeLOGIC controller will re-verify the configuration against the new hardware
    • If using SafeLOGIC-X (X20SLX811), the configuration verification happens automatically — B&R guarantees consistent module configuration across replacements
  8. Clear any safety latches (see Section 10)
  9. Run the safety acceptance test:
    • Test each safety function connected to the replaced module
    • Verify E-stops, guard doors, light curtains, and safe outputs respond correctly
    • Document the test results

For SafeLOGIC-X (decentralized safety at I/O station):

SafeLOGIC-X controllers (X20SLX811) provide automatic configuration verification on module replacement. The system guarantees:

  • Automatic safety parameter download to replacement modules
  • CRC verification of the safety configuration
  • Configuration consistency check across the safety domain
  • No manual parameter transfer required for same-type module replacements

9.3 Module Replacement for SafeMOTION Drives (ACOPOS-Multi SAFE)

  1. Power down the drive section (disable DC bus via supply module, wait for capacitor discharge)
  2. Replace the 8BVI inverter module (match the module variant exactly)
  3. Re-download the safety configuration — the safety CRC must match
  4. Execute SafeMOTION acknowledge sequence: McAcknowledge (mappMotion) or NC.Ack (ACP10)
  5. Re-run the full safety acceptance test (STO, SBC, SS1, SLS)

9.4 Post-Replacement Verification Checklist

  • All module LEDs show expected state (green run, no error)
  • ModuleOk is TRUE for all safety modules in Automation Studio
  • ConfigMatch is TRUE for the SafeLOGIC controller
  • No SafetyError entries in the SDM Logger
  • All safety inputs respond correctly (E-stops, guards, light curtains)
  • All safety outputs switch correctly (contactors, STO on drives)
  • Safety response time meets the required specification
  • SDM system dump captured and stored with maintenance log

10. Safety System Reset Procedures

10.1 Understanding Safety Latches

B&R safety systems use intentional latching for safety faults. When a safety fault occurs:

  • The safety outputs are de-energized (safe state)
  • The fault is latched — it persists even after the cause is removed
  • The latch must be explicitly acknowledged before the safety system can resume operation

This is by design: It forces the operator to investigate the fault cause before resuming, preventing automatic recovery that could mask a dangerous condition.

10.2 Reset Methods

MethodWhen to UseProcedure
SafeDESIGNER AcknowledgeAfter clearing the physical cause of a safety faultIn SafeDESIGNER, use the SF_LatchReset function block or acknowledge via the standard HMI reset button mapped to the safety acknowledge input
McAcknowledge (mappMotion)SafeMOTION safety latch on ACOPOS drivesCall McAcknowledge from the HMI or PLC code on the affected safety axis
NC.Ack (ACP10/ACP10M)SafeMOTION safety latch in ACP10 projectsUse NC.Ack with the safety error class enabled
SafeLOGIC Reset (via rotary switch)SafeLOGIC controller restartSet rotary switch to position 2, press ENTER; SafeLOGIC restarts and re-initializes
Power CycleOnly as last resortPower cycle the controller; note that safety latches are retentive — power cycling alone does NOT clear them

Important: Power cycling does not clear safety latches. The SE LED on ACOPOS-Multi SAFE drives, for example, remains solid red after a power cycle if the fault was not acknowledged. This is intentional.

10.3 Safe Reset Procedure (Step-by-Step)

  1. Identify and resolve the root cause of the safety fault (check wiring, fix sensor, correct configuration)
  2. Verify the physical cause is eliminated (measure voltage, check sensor state, confirm wiring)
  3. Acknowledge the safety fault using the appropriate method above
  4. Confirm all safety LEDs return to normal state (green run, error off)
  5. Verify the safety function operates correctly by testing the safety input/output pair
  6. Resume machine operation only after confirming the safety system is fully operational

10.4 Emergency Safety Reset (Machine-Level)

For machines with a safety reset button (hardware acknowledge):

  1. Ensure all guard doors are closed
  2. Ensure all E-stops are released (pulled out)
  3. Ensure no safety devices are active
  4. Press and release the safety reset button
  5. The SafeLOGIC controller verifies all safety inputs are in the permissive state
  6. Safety outputs are re-energized if all conditions are met

10.5 SafeLOGIC Controller Restart

To fully restart the SafeLOGIC controller:

  1. Set the rotary switch on the SafeLOGIC module to position 2
  2. Press the ENTER button
  3. The SafeLOGIC controller restarts, re-reads the safety configuration from the CF card
  4. Re-verifies the CRC checksum and module topology
  5. If all checks pass, transitions to SafeOperational
  6. If any check fails, remains in SafeFault state

Note: For SafeLOGIC-X (X20SLX811), the procedure is different — it uses the X2X station-level reset procedure. Refer to the module-specific manual.


11. Diagnostic Events and Error Codes for Safe Systems

11.1 PLCopen Safety Function Block Diagnostic Codes

Each PLCopen safety function block in SafeDESIGNER provides a diagnostic code output (typically USINT). These codes indicate the specific state and error condition of each safety function:

Common Diagnostic Code Patterns:

Code (hex)Code (dec)DescriptionTypical FB
0x000No fault, function operating normallyAll FBs
0x011Input channel A wire breakSF_EmergencyStop, SF_Gate_2Ch
0x022Input channel B wire breakSF_EmergencyStop, SF_Gate_2Ch
0x033Both channels wire break / cross-channel errorSF_EmergencyStop, SF_Gate_2Ch
0x044Input test pulse errorAll dual-channel input FBs
0x1016Output test pulse errorSF_STO, SF_SS1, SF_SS2
0x2032Safety function timeoutSF_TimerESTOP, timers
0x4064Bypass activeSF_Bypass
0x80128Internal fault (processor, memory)Any FB

11.2 SafeLOGIC Controller Error Codes

Error CodeCategoryDescriptionResolution
SafetyConfigMismatchFatalSafety CRC on CF card does not match SafeLOGIC checksumRe-download safety configuration
ModulePositionMismatchFatalModule is not in the expected positionVerify module placement, re-download config
SafeLOGIC_ID_MismatchFatalSafeLOGIC ID on module does not match safety domainReassign SafeLOGIC ID in SafeDESIGNER
CycleTimeViolationWarningSafety task exceeded configured cycle timeOptimize safety logic, increase cycle time
CommunicationTimeoutFatalopenSAFETY/FSoE communication lostCheck network cabling, verify topology
WatchdogExpiredFatalSafety communication watchdog timer expiredCheck bus load, verify cycle time
FirmwareMismatchFatalSafety firmware version incompatibleUpdate firmware via Automation Studio
SafeKEY_ErrorFatalSafeKEY hardware key not detected or invalid (X20SL811)Verify SafeKEY insertion

11.3 SafeMOTION / ACOPOS-Multi Error Codes

Error CodeCategoryDescriptionResolution
0xFB02SBC ErrorBrake feedback open circuitCheck brake wiring at X6 connector
0xFB03SBC ErrorBrake voltage out of range (< 21.6V or > 26.4V)Check 24V brake supply
0xFB10SBC ErrorBrake driver overtemperatureWait for cooldown, then acknowledge
0xFB20SS1 ErrorSafe stop 1 timeout exceededCheck drive and motor, verify load
0xFB30SLS ErrorSpeed exceeded safely limited speedReduce speed, check encoder
0xFB40SOS ErrorSafe operating stop position violatedCheck encoder, verify positioning
0xFB50SDI ErrorSafe direction violation detectedCheck motor wiring, verify direction config
0xFB60SLP ErrorSafely limited position exceededCheck encoder, verify position config
SafetyConfigMismatchFatalDrive safety CRC does not match projectRe-download safety config to drive

11.4 Safe I/O Module Error Codes (SDM Logger)

The SDM Logger reports safety errors with the following pattern entries:

  • SafetyError — critical safety fault that has de-energized safety outputs
  • SafetyWarning — non-critical safety anomaly that does not affect safety outputs
  • SBC_WARN — Safe Brake Control warning (approaching threshold)
  • SafetyError SBC — Safe Brake Control fault (has latched safety outputs)
  • SafetyError STO — Safe Torque Off activated
  • SafetyError SS1 — Safe Stop 1 activated
  • SafetyError SLS — Safely Limited Speed violation
  • SafetyError SOS — Safe Operating Stop violation

11.5 Reading Diagnostic Codes in Automation Studio

To monitor safety diagnostic codes online:

  1. Open Automation Studio, go Online > Connect
  2. Navigate to the SafeDESIGNER safety project
  3. Add the diagnostic output variables of each safety function block to a watch window
  4. Monitor the DiagCode outputs in real-time
  5. Cross-reference diagnostic codes with the PLCopen function block documentation (AS Help > Safety technology > SafeDESIGNER > Function blocks)

Alternatively, transfer diagnostic codes to the standard application via the I/O mapping and display them on the HMI using mapp Alarm.


12. Certification Requirements and Documentation

12.1 B&R Safety Product Certifications

Certification BodyScopeCertificate Reference
TUV RheinlandX20 SafeLOGIC, Safe I/O modules, SafeDESIGNER safety compilerTUV certificate per product family
TUV SUDACOPOS drive safety functions (STO, SS1, SS2, SLS, SOS, SBC, SSM, SLI, STI, SLP)Z10 16 06 20080 004
TUV SUD Rail GmbHSIL 3 per IEC 61508, PL e/Cat. 4 per ISO 13849-1, SIL 3 per IEC 62061Rail-specific certificate

12.2 Standards Compliance Matrix

StandardTitleB&R Compliance
IEC 61508Functional safety of E/E/PE safety-related systemsSIL 3 (product level)
IEC 62061Safety of machinery — functional safetySIL CL 3 (system level)
ISO 13849-1Safety of machinery — safety-related parts of control systemsPL e, Category 4
IEC 61800-5-2Safety functions of power drive systemsSTO, SS1, SS2, SLS, SOS, SBC, SSM, SLI, STI, SLP
IEC 61784-3Functional safety communication profilesopenSAFETY, FSoE
EN ISO 25119Tractors and machinery for agriculture — safetyAgPL a–d (X90 mobile)
IEC 61131-3Programmable controllers — programming languagesSupported (ST, CFC, LD, FBD)
IEC 62443Industrial communication networks — IT securitySupported (mapp Security)

12.3 Required Documentation for Safety Systems

For compliance with IEC 61508 / ISO 13849-1, the following documentation must be maintained:

DocumentPurposeOwner
Safety Requirements Specification (SRS)Defines all safety functions, their required SIL/PL, and safety integrity requirementsMachine builder / integrator
Safety Design ReportDocuments the safety architecture, component selection, and verification calculationsMachine builder
Safety Validation ReportRecords the results of the safety acceptance test (SAT)Machine builder / integrator
PFHd Calculation / SIST ReportDocuments the probability of dangerous failure calculations for each safety functionMachine builder
Safety Circuit DiagramsDetailed wiring diagrams showing safety-rated connections (dual-channel)Machine builder
B&R Safety Report (.safetcreport)Auto-generated by SafeDESIGNER, documents achieved SIL/PL for each safety functionAutomation engineer
Firmware Version LogRecords firmware versions of all safety componentsMaintenance / commissioning
Certificate of ConformityB&R’s product-level certificate (TUV)B&R (product documentation)
Operational Manual (Safety Chapter)Safety-specific operating and maintenance instructions for the end userMachine builder
Proof Test ProcedurePeriodic proof test instructions to verify safety function integrity over the machine lifecycleMachine builder

12.4 Periodic Proof Testing

Per IEC 61508 and ISO 13849-1, safety functions must be periodically tested to detect latent faults that could cause a dangerous failure. The proof test interval is determined during the PFHd / SIST calculation and depends on:

  • The PFHd achieved by the safety function
  • The required SIL/PL target
  • The diagnostic coverage of the safety components
  • The mean time to dangerous failure (MTTFd)

B&R SafeDESIGNER supports proof test configuration:

  • Automatic proof testing via the safety application (test pulses on inputs)
  • Manual proof test procedures documented in the safety validation report
  • Proof test results logged via mapp Audit for traceability

12.5 Safety Acceptance Test (SAT) Checklist

At commissioning or after any safety system modification, execute this minimum test set:

  1. Emergency Stop Test: Activate each E-stop → verify all motion stops, all safety outputs de-energize
  2. Guard Door Test: Open each guard door → verify safe state; close and reset → verify normal operation resumes
  3. Light Curtain Test: Break the light curtain beam → verify safe state; restore beam and reset
  4. Two-Hand Control Test: Verify both buttons must be pressed within 0.5s; verify release stops motion
  5. STO Test: Trip STO from safety input → verify drive enters SafeTorqueOff
  6. SBC Test: Activate STO → verify brake engages (if brake installed)
  7. SLS Test: Exceed safely limited speed → verify safe stop
  8. Communication Fault Test: Disconnect safety communication → verify safe state
  9. Single-Channel Fault Test: Simulate single-channel wire break on a dual-channel input → verify fault detected
  10. Response Time Test: Measure actual safety response time → verify within specification

13. Black Channel Concept and Safety Communication

13.1 Black Channel Principle

The Black Channel concept is the foundational principle of modern safety communication protocols (FSoE, openSAFETY, PROFIsafe, CIP Safety). It dictates that:

  1. The communication channel is not trusted: The underlying transport network (EtherCAT, POWERLINK, Ethernet) is treated as unreliable and potentially unsafe (“black”).
  2. Safety integrity is added on top: Safety-specific mechanisms (CRC, watchdog, connection IDs, sequence numbers) are layered on top of the standard communication to guarantee data integrity and detect all possible communication errors.
  3. The transport layer does not need to be safety-certified: Because the safety protocol handles all error detection, the underlying network infrastructure can be standard, non-certified hardware and software.

This approach dramatically reduces cost and complexity:

  • No need for redundant safety networks
  • Standard Ethernet cabling and switches can be used
  • Safety data and standard data coexist on the same physical network
  • Network equipment does not require safety certification

13.2 Safety Communication Mechanisms (How Black Channel Works)

To achieve SIL 3 integrity over a black channel, the safety protocol implements these mechanisms:

MechanismPurposeDetects
CRC (Cyclic Redundancy Check)Data integrity verification for each safety frameData corruption, bit errors, byte errors
Connection ID (ConnID)Prevents frames from being misrouted between different safety connectionsCross-connection, address confusion
Watchdog TimerDetects loss of communication or excessive delayCommunication timeout, frozen device
Sequence Number / Toggle BitDetects dropped, duplicated, or reordered framesFrame loss, duplication, reordering
Guard TimeMinimum interval between consecutive framesFrame injection, replay attacks
AcknowledgmentConfirms each safety frame was received by the communication partnerUnacknowledged frames
Timeout DetectionDetects if the safety cycle is not completed in timeCycle time overrun, device stall

13.3 FSoE Black Channel Implementation

In the FSoE protocol specifically:

  1. The FSoE MainInstance sends an FSoE frame to each FSoE SubInstance within the standard EtherCAT process data
  2. Each SubInstance responds with its own FSoE frame
  3. The safety cycle consists of a MainInstance Frame confirmed by a SubInstance Frame
  4. Each frame includes CMD, Safe Data, CRC_0, CRC_1, and Connection ID
  5. Every 2 bytes of Safe Data are protected by a 2-byte CRC
  6. The minimum FSoE frame is 6 bytes

The safety integrity is mathematically proven to detect:

  • All single-bit errors
  • All double-bit errors in any data unit
  • All errors affecting an odd number of bits
  • All burst errors up to 16 bits
  • Frame duplication, omission, insertion, and reordering

13.4 openSAFETY Black Channel Implementation

B&R’s openSAFETY protocol provides equivalent safety integrity:

  • Runs on POWERLINK, Ethernet, EtherCAT, and X2X link
  • Uses a similar CRC + sequence number + connection ID + watchdog approach
  • Supports up to 100 safety nodes per SafeLOGIC controller
  • Safety data is transmitted within standard POWERLINK/Ethernet frames
  • Deterministic cycle time guarantees

13.5 Practical Implications for B&R Safety Systems

Network Design:

  • Use standard EtherCAT or POWERLINK network infrastructure for safety communication
  • No need for special safety switches or redundant network cabling
  • Safety data and standard process data share the same network

Commissioning:

  • Verify the safety communication watchdog time is set correctly (typically 2-3x the safety cycle time)
  • Verify the guard time is appropriate for the network topology
  • Confirm the safety CRC is verified at startup (check SDM Logger)

Troubleshooting:

  • Communication timeouts are safety faults — check network cabling and topology
  • FSoE/openSAFETY connection ID mismatches indicate a configuration error
  • Network overload can cause safety communication watchdog expirations — monitor cycle time

Maintenance:

  • Standard network switches and cables can be replaced without affecting safety integrity
  • Replacing a safety node requires the safety configuration to be re-verified (automatic for SafeLOGIC-X)
  • Network changes (adding/removing nodes) may affect safety communication timing — verify after changes

Key Findings

  • SafeLOGIC executes safety logic independently from the standard PLC program — safety applications run in dedicated task classes (minimum 1 ms cycle) with strict data type separation (SAFE-prefixed types cannot mix with standard types), ensuring safety integrity even if the standard program crashes.
  • Centralized vs. decentralized safety is a critical architectural distinction — centralized (X20SL8001/SL8100/SL811) concentrates safety logic in one controller; decentralized (SafeLOGIC-X, X20SLX811) embeds safety processing at the I/O station for faster local response and eliminates the single point of failure.
  • FSoE and openSAFETY both use the Black Channel principle — safety integrity (CRC, watchdog, connection ID, sequence numbering) is layered on top of standard POWERLINK/EtherCAT/EtherNET, meaning standard network switches and cabling require no safety certification and can be replaced without affecting safety integrity.
  • SIL 3 / PL e / Category 4 verification requires checking the SafeDESIGNER .safetcreport output — this auto-generated report documents PFHd, diagnostic coverage, MTTFd, and architecture class for each safety function and is the primary evidence for compliance with IEC 61508 and ISO 13849-1.
  • Safety configuration files on the CF card are compiled and cryptographically signed — they reside under System/Safety/ (SafetyConfig.dat, SafetyCRC.chk) and cannot be edited with a text editor; modifying them outside SafeDESIGNER invalidates the signature and the SafeLOGIC controller will reject them.
  • Back up safety parameters before any hardware or configuration change — the only ways to preserve the safety configuration are Automation Studio’s full backup (.abk) or raw CF card imaging (dd); without the original SafeDESIGNER project source, the safety logic cannot be modified, only restored as an exact copy.
  • Safety latches are intentional and persist through power cycles — a safety fault latch requires explicit acknowledgment (McAcknowledge, NC.Ack, or SF_LatchReset) after the root cause is resolved; power cycling alone will not clear a latched fault, which is by design to prevent masking dangerous conditions.
  • After any safety module replacement, a full safety acceptance test must be performed covering all connected safety functions (E-stops, guards, light curtains, STO, SBC) and documented before returning the machine to production — this is mandatory per IEC 61508 / ISO 13849-1.

Appendix A: Quick Reference — Common B&R Safety Part Numbers

Part NumberDescriptionSIL/PL
X20SL8001SafeLOGIC controller (POWERLINK)SIL 3 / PL e
X20SL8100SafeLOGIC controller (extended)SIL 3 / PL e
X20SL811SafeLOGIC controller with SafeKEYSIL 3 / PL e
X20SLX811SafeLOGIC-X (decentralized, ATEX)SIL 3 / PL e
X20SI9100Safe digital input module (20 DI + 4 pulse)SIL 3 / PL e, Cat. 4
X20SO9110Safe digital output module (20 DO)SIL 3 / PL e, Cat. 4
X20SM5143Safe mixed I/O (4 DI + 4 DO)SIL 3 / PL e, Cat. 4
X67SB4100IP67 safe digital input (4 DI)SIL 3 / PL e
X67SB4110IP67 safe digital output (4 DO)SIL 3 / PL e

Appendix B: Quick Reference — Diagnostic LED Summary

ModuleRun LEDError/SE LEDDiagnosis
Safe I/OGreenOffNormal
Safe I/ORed steadyRed steadyConfiguration/CRC fault
Safe I/ORed steadyOffHardware fault
SafeLOGICGreen (RDY)SafeOperational
SafeLOGICRed (RDY)SafeFault
ACOPOS SAFERed steadyRed steadySafeMOTION latch (SBC/STO/etc.)
ACOPOS SAFERed steadyOffStandard drive fault
ACOPOS SAFEGreenGreenSTO active (normal safe stop)

Appendix C: Key B&R Safety Software Tools

ToolPurposeAccess
SafeDESIGNERSafety program development (CFC + ST)Automation Studio (integrated)
Safety+Next-gen safety programming with DevOps supportAutomation Studio (mapp Safety)
SafeMOTION EditorSafe drive function configuration (STO, SBC, SLS, etc.)Automation Studio (integrated)
SDM (System Diagnostics Manager)On-board web diagnosticshttp://<plc-ip>/sdm
ARsimOffline simulation including safetyAutomation Studio
Task Class MonitorReal-time cycle time monitoring per taskAutomation Studio > Online > Diagnostics
mapp AlarmSafety alarm management and HMI displayAutomation Studio (mapp component)
mapp AuditAudit trail for safety-related operator actionsAutomation Studio (mapp component)
mapp LoggerStructured event logging with severity classificationAutomation Studio (mapp component)

Appendix D: Safety Troubleshooting Flowchart

START: Safety system fault detected
  │
  ├─ Check module LEDs (visual inspection)
  │   ├─ All green → Check SDM Logger for SafetyWarning entries
  │   ├─ Run=Red, Error=Red → Configuration fault → Re-download safety config
  │   ├─ Run=Red, Error=Off → Hardware fault → Replace module
  │   └─ SE=Red (drive) → SafeMOTION latch → Check SDM Logger for SBC/STO/SLS codes
  │
  ├─ Open SDM (http://<plc-ip>/sdm)
  │   ├─ System > Logger → Search for SafetyError, SafetyWarning, SBC
  │   ├─ System > I&M → Check firmware versions and serial numbers
  │   └─ System > Dump → Download full system dump for analysis
  │
  ├─ Open Automation Studio > Online > Diagnostics
  │   ├─ Check ModuleOk for all safety modules
  │   ├─ Check ConfigMatch for SafeLOGIC controller
  │   ├─ Monitor safety function block diagnostic codes
  │   └─ Check Task Class Monitor for cycle time violations
  │
  ├─ Identify root cause (wiring, configuration, hardware, communication)
  │
  ├─ Fix the root cause
  │
  ├─ Acknowledge safety latch (McAcknowledge / NC.Ack / LatchReset)
  │
  ├─ Verify all LEDs return to normal (green)
  │
  └─ Run safety acceptance test → Document results

Appendix E: Cross-References

Related FileRelevance
diagnostics-sdm.mdSDM web interface for monitoring safety system status and retrieving logbook entries
online-changes.mdOnline change limitations for safety programs — safety modifications cannot be made online
alarm-logging.mdAlarm and event logging including safety alarm severity classification
system-variables.mdSystem variables related to safety module status and diagnostics
config-file-formats.mdSafeLOGIC configuration file formats on the CF card
cf-card-boot.mdCF card backup and restore for safety parameter preservation
access-recovery.mdPassword recovery for SafeDESIGNER and safety program access
license-mgmt.mdSafety software licensing (SafeDESIGNER, mapp Safe)
acopos-drives.mdSafeMOTION integration with ACOPOS drives via FSoE
grounding-emc.mdEMC and grounding requirements for safety-rated IO wiring
io-card-hardware.mdIO module hardware architecture relevant to safety module diagnostics
time-sync.mdTimestamp correlation for safety event analysis
program-reverse-engineering.mdAnalyzing safety program binaries when source is unavailable
hmi-integration.mdSafety HMI display requirements and operator acknowledgment workflows
cp1584-hardware-ref.mdCP1584 hardware specs relevant to safety system integration
remanufacturing.mdSafety system migration considerations during control system replacement
encoder-diagnostics.mdEncoder feedback diagnostics relevant to SafeMOTION SLS/SDI/SOS speed and position monitoring
io-sniffing.mdX2X and fieldbus traffic interception for diagnosing safety communication integrity
plc-to-plc.mdPLC-to-PLC communication patterns that affect inter-controller safety data exchange
execution-model.mdTask class scheduling and cycle time constraints affecting safety task execution

Document generated: July 2026 Sources: B&R Industrial Automation documentation, TUV certificates, ETG FSoE specification, PLCopen safety function block standard, IEC 61508 / ISO 13849-1 / IEC 62061 standards Community tools: SafeDODiag (github.com/br-automation-community/SafeDODiag), openSAFETYLogbrowser (github.com/banickn/openSAFETY-logbrowser)

Online Changes and Runtime Patching on B&R Automation

A comprehensive guide to modifying running PLC programs on B&R (ABB) Automation platforms using Automation Studio, covering safe production techniques, limitations, and best practices.


Table of Contents

  1. Modifying a Running PLC Program Without Stopping the Machine
  2. Online Force/Override Techniques in Automation Studio
  3. Changing Setpoints, Timers, and Parameters at Runtime
  4. Saving Modified Programs Back to the CF Card for Persistence
  5. Online Change Limitations: What Can/Cannot Be Changed Online
  6. Hot-Connecting: Adding/Removing Hardware at Runtime
  7. Using PVI/OPC-UA to Write Variables on a Running PLC
  8. Runtime Parameter Modification from HMI
  9. Online Monitoring and Cross-Reference
  10. Rollback Procedures if an Online Change Causes Problems
  11. Change Management for Safety-Critical Systems
  12. Using mapp View for Runtime Parameter Changes

1. Modifying a Running PLC Program Without Stopping the Machine

Online Program Modification Overview

B&R Automation Studio supports downloading modified program code to a running controller without requiring a full machine stop. This is one of B&R’s key production-engineering capabilities, allowing engineers to push bug fixes, logic adjustments, and parameter tuning to machines in active production.

How Online Download Works

Automation Studio communicates with the target controller over Ethernet (or USB). When you trigger a download to a running system, Automation Studio evaluates whether the change requires only an online change (hot swap of code/data in memory) or a warm restart (reinitialization of variables and tasks). The download dialog indicates this with a red exclamation mark when a warm restart is needed.

Key mechanism:

  • Automation Runtime (AR) keeps track of the memory layout of all tasks, programs, and libraries.
  • When new code is downloaded, AR patches the in-memory binary of affected programs without stopping the cyclic tasks that are not impacted.
  • Tasks that are impacted may be briefly suspended, reloaded, and resumed.

When Online Download is Possible

Online download (no restart) is possible when:

  • Only program logic within existing function blocks or programs changes.
  • Constant values (e.g., timer presets, setpoints declared as VAR CONSTANT) are modified.
  • Internal variable initial values change, but the variable’s data type and scope remain the same.
  • The AR version is >= G4.33 (transfer configuration options were significantly improved starting from this version).

Prerequisites

  1. The project in Automation Studio must match the installed configuration on the PLC (same hardware tree, same task structure).
  2. The controller must be in RUN or SERVICE mode.
  3. An online connection must be established via the Online Settings dialog (configured under Tools > Options > Online Settings or via the project’s Logical View > Controller > Online Settings).
  4. Ensure the correct PVI line (TCP) is configured pointing to the controller’s IP address.

Download Procedure

  1. Make the desired code changes in Automation Studio.
  2. Compile the project (F7). Resolve any compilation errors.
  3. Open the Transfer to Target dialog (Application > Transfer to Target or the toolbar icon).
  4. Select the target controller and check the transfer options:
    • Transfer Configuration: Available from AR >= G4.33, this lets you configure whether a change requires a warm restart, an INIT cycle, or if it can be applied fully online.
  5. Look for the red exclamation mark (!) in the download window. If present, Automation Studio is warning that a warm restart will occur.
  6. Click Transfer to begin the download.

Risks and Caveats

Online download to a running system carries risks, primarily page faults (memory access violations) that can crash the controller. Key risk areas identified by the B&R community:

  • Pointer-based code: If code uses pointers to absolute memory addresses, those addresses may shift when new code is loaded, causing invalid memory access.
  • Global variables shared across tasks: If a global variable is written by one cyclic task and read by another with different cycle times, an online change that shifts the variable’s memory location can cause corrupted reads.
  • Library changes: Downloading after modifying a library without a full rebuild is risky. Always perform a Rebuild All before downloading to a running system.
  • String manipulation: String concatenation and buffer operations can overflow if buffers were resized or relocated during the transfer.
  • Communication cleanup: Protocols like OPC UA clients must be correctly handled in the task’s EXIT routine to prevent orphaned connections during online code replacement.

Mitigation Strategies

  • Use the IECCheck library in your project. It provides runtime checks for pointer access, division by zero, array bounds violations, and other common errors, stopping the PLC gracefully before a page fault can cause uncontrolled behavior.
  • Refresh pointers every cycle or protect shared data with semaphores (B&R provides the AsSem library for this purpose).
  • Avoid writing to the same global variable from multiple tasks without synchronization.
  • Always perform a full Rebuild All (not just Build) before downloading to a running system, especially when library changes are involved.

Remote Online Downloads

Online downloads can be performed remotely over a VPN or plant network. The procedure is identical; the only difference is that the PVI line configuration must reference the controller’s remote IP address. Ensure network latency is acceptable (preferably < 50 ms) to avoid transfer timeouts.


2. Online Force/Override Techniques in Automation Studio

Force/Override Techniques Overview

Forcing (also called overriding) is the technique of overriding the logical value of a variable in the PLC, regardless of what the program logic computes. This is essential for troubleshooting, testing, and temporarily overriding sensor states or outputs without changing the program code.

Forcing in the LAD Monitor

Automation Studio’s Ladder (LAD) Monitor provides a built-in force function:

  1. Open the LAD Monitor for the program you want to debug (Online > LAD Monitor).
  2. Locate the variable you want to force (e.g., a digital input contact).
  3. Right-click the variable and select Force.
  4. Set the forced value (TRUE/FALSE for booleans, numeric values for integers/reals).
  5. The variable will now hold the forced value regardless of the program logic driving it.

The forced state is visually indicated in the LAD diagram — forced contacts and coils are typically shown in a distinct color or with a force icon overlay.

Forcing in the Watch Window

The Watch Window is the primary tool for forcing variables in B&R:

  1. Open the Watch Window (Online > Watch Window).
  2. Add variables by dragging them from the program editor or typing variable names.
  3. Each variable row shows:
    • PV Value: The current process value (what the PLC logic computed).
    • ForceActivated: A checkbox to enable/disable forcing for this variable.
    • ForceActivated Value: The value to force the variable to.
  4. To force a variable:
    • Check the Force On checkbox (or right-click and select “Force On”).
    • Enter the desired value in the ForceActivated Value column.
    • The variable will now be overridden.
  5. To release the force, right-click and select Force Off, or use Force All Off to release all forced variables at once.

Important: The “Force On” button is context-sensitive. If a variable is already forced, the button appears greyed out and only “Force Off” and “Force All Off” are active.

Prerequisites for Forcing

  • The project in Automation Studio must match the program installed on the target PLC. If there is a mismatch, the PV Value column shows an error indicator (warning triangle), and forcing may not work correctly. Perform a Transfer to Target to synchronize the project before attempting to force.
  • An active online connection to the controller must be established.

Programmatic Forcing via AsIO Library

B&R provides the AsIO library for enabling/disabling forcing from within PLC code itself:

Function BlockPurpose
AsIOEnableForcingEnables forcing for a specific I/O data point
AsIODisableForcingDisables forcing for a specific I/O data point
AsIOGlobalDisableForcingDisables all forcing globally
AsIODPStatusReads the status of a data point, including force status flags

This is useful for automated testing scenarios where you need to programmatically override inputs/outputs.

Forcing via PVI (External Applications)

External applications can interact with the force mechanism through PVI’s link nodes (via the ANSL variable object). The Python PVI wrapper (Pvi.py) supports writing to force values using the 'F+' syntax:

var = Variable(task, "AF_AI[6].ModuleOk")
var.value = True  # writes to force value via 'F+' syntax

Limitations of PVI forcing:

  • You can write the force value and read the force status via POBJ_ACC_STATUS.
  • You cannot enable/disable forcing status itself through PVI writes — forcing must be activated either through Automation Studio or the AsIOEnableForcing function block.

Safety Considerations for Forcing

  • Always document forced variables. B&R’s watch window shows forced variables, but if the online connection is lost, there may be no visible indication on the HMI.
  • Never leave forces active on a production machine after troubleshooting. Use “Force All Off” before disconnecting.
  • Forcing outputs can cause unexpected machine motion. Always follow your plant’s lockout/tagout (LOTO) procedures when working on active machinery.
  • Forcing on safety I/O is restricted by the SafeLOGIC safety controller. Standard forcing does not affect safety-rated signals.

3. Changing Setpoints, Timers, and Parameters at Runtime

Runtime Parameter Changes Overview

Runtime parameter modification is the most common and safest form of online change. Unlike code modifications (which carry page-fault risk), changing the values of variables at runtime simply writes new data to the controller’s memory without altering the executable code.

Methods for Runtime Parameter Changes

Method 1: Watch Window (Engineering Tool)

The simplest method, available directly in Automation Studio:

  1. Establish an online connection to the PLC.
  2. Open the Watch Window.
  3. Add the setpoint, timer preset, or parameter variable.
  4. Double-click the PV Value column and enter the new value.
  5. Press Enter to write the value to the PLC.

This is a temporary change — the value will revert to its initialized value after a warm/cold restart unless persisted (see Section 4).

Method 2: Programmatic (Internal PLC Logic)

Parameters can be changed by PLC logic itself, for example:

(* Change a timer preset based on a recipe selection *)
IF gRecipeSelect = 10 THEN
    tonCycleDelay.PT := T#5s;
ELSIF gRecipeSelect = 20 THEN
    tonCycleDelay.PT := T#8s;
END_IF

(* Change a temperature setpoint *)
rTempSetpoint := rOperatorSetpoint + rCalibrationOffset;

This is the preferred method for production systems, as the logic is deterministic, traceable, and version-controlled.

Method 3: ArConfig (Runtime Configuration Parameters)

For system-level parameters (IP address, hostname, subnet mask), B&R provides the AsARCfg library:

(* Example: Change IP address at runtime *)
IF IPSet THEN
    CfgSetIPAddr_1.enable := 1;
    CfgSetIPAddr_1.pDevice := ADR(pDevice);
    CfgSetIPAddr_1.pIPAddr := ADR(NewIPTemp);
    CfgSetIPAddr_1();

    IF CfgSetIPAddr_1.status = 0 THEN
        (* Read back to confirm *)
        CfgGetIPAddr_1.enable := 1;
        CfgGetIPAddr_1.pDevice := ADR(pDevice);
        CfgGetIPAddr_1.pIPAddr := ADR(NewIP);
        CfgGetIPAddr_1.Len := 20;
        CfgGetIPAddr_1();
    END_IF

    IF CfgGetIPAddr_1.status = 0 AND CfgSetIPAddr_1.status = 0 THEN
        IPSet := FALSE;
        CfgGetIPAddr_1.enable := 0;
        CfgSetIPAddr_1.enable := 0;
    END_IF
END_IF

The AsARCfg library also provides functions for:

  • CfgGetSubnetMask / CfgSetSubnetMask
  • CfgGetHostName / CfgSetHostName
  • And many more configuration parameters

Method 4: Persistent Variable Initialization

Variables can be initialized from files or recipes loaded at startup:

(* Load parameters from a configuration file *)
fbFileOpen(
    enable := TRUE,
    pDevice := ADR('CF'),
    pFileName := ADR('config/setpoints.csv'),
    mode := fmRead
);

This approach ensures parameters survive power cycles and are managed as data files rather than hardcoded values.

Timer Modification Specifics

B&R timers (TON, TOF, TP from the IEC_Timers library) have:

  • PT (Preset Time): Can be changed at runtime simply by writing to timerName.PT.
  • IN: The trigger input, also writable at runtime.
  • ET (Elapsed Time): Read-only (computed by the timer block).
  • Q: The output, also writable at runtime (though forcing is the preferred override method).

When you change PT while the timer is running, the new preset takes effect immediately. If PT is shortened below the current elapsed time, the timer may or may not expire immediately depending on the timer type and implementation.

Best Practices

  • Centralize parameters in a dedicated data structure (e.g., ST_MachineConfig) to make runtime tuning systematic and auditable.
  • Validate all operator-entered setpoints with range checks before applying them.
  • Log parameter changes to a data file or the AR event log for traceability.
  • Use the mapp Recipe framework for managing sets of parameters that change together (e.g., product changeovers).

4. Saving Modified Programs Back to the CF Card for Persistence

The Persistence Problem

When you make changes to a running PLC via the watch window, force, or online download, those changes exist only in the controller’s volatile DRAM. After a power cycle or warm restart, all non-persisted values revert to their initialized state. To make changes permanent, you must write them back to the CF card (CompactFlash) or CFast card.

Method 1: Transfer to Target (Full Program Persistence)

The standard way to persist program changes is through the Transfer to Target operation:

  1. Compile the project with the desired changes.
  2. Transfer to Target (Application > Transfer to Target).
  3. Automation Studio writes the new program to the controller’s non-volatile storage (CF/CFast card or internal flash).

After transfer, the program will survive power cycles. The controller boots from the non-volatile storage on each startup.

Method 2: Save/Upload from PLC to CF Card

When you modify variables online (via watch window) and want those values to persist:

  1. In the Logical View, right-click the controller and select Save or use the Transfer > Upload from Target option.
  2. Automation Studio reads the current state of all process variables and writes them to the project.
  3. You then transfer the updated project back to the target.

Caveat: Simply changing a variable via the watch window does NOT automatically save it to the CF card. The B&R community has reported issues where a CF card stops functioning after variable changes via the watch window — this is typically caused by the project getting out of sync with the installed configuration.

Method 3: CF Card Image Backup (Binary Level)

For complete persistence and backup, use the Runtime Utility Center:

  1. Open Runtime Utility Center (installed with Automation Studio).
  2. Connect to the target controller.
  3. Navigate to CF Card Tools.
  4. Select Create Image to create a binary image of the entire CF card.
  5. Save the image file to your PC (.img format).

To restore:

  1. Insert a blank CF card into your PC’s card reader.
  2. In Runtime Utility Center, select CF Card Tools > Restore Image.
  3. Select the saved image file and write it to the blank card.

This method captures:

  • The complete Automation Runtime installation.
  • All user programs and configurations.
  • All persistent data (recipes, logs, parameter files).
  • The AR configuration (IP settings, hostname, etc.).

Method 4: Offline Installation (AS Compile to CF)

Automation Studio can compile and write a project directly to a CF card without a running controller:

  1. Connect a CF card reader to the engineering PC.
  2. Insert the target CF card.
  3. In Automation Studio, use Application > Transfer > Install CF/SD Card (Offline Install).
  4. Select the CF card drive letter and the target partition.
  5. Automation Studio formats the card, installs AR if needed, and writes the compiled program.

Method 5: Persistent Data Files

For parameter data that changes frequently, store it in files on the CF card:

(* Save current parameters to file *)
fbFileWrite(
    enable := bSaveTrigger,
    pDevice := ADR('CF'),
    pFileName := ADR('config/params.dat'),
    data := ADR(stCurrentParams),
    datalen := SIZEOF(stCurrentParams)
);

This approach separates program code from operational data, allowing frequent parameter updates without recompiling.

  1. Before any online change: Create a CF card image backup using Runtime Utility Center.
  2. After confirming the change works: Transfer the updated project to the target to persist the code changes.
  3. Periodically: Upload PVs (process variables) using Runtime Utility Center to capture the current state of all runtime values.
  4. For critical machines: Keep a spare CF card with a known-good image at the machine site for rapid recovery.

5. Online Change Limitations: What Can/Cannot Be Changed Online

Changes That CAN Be Made Online (No Restart)

Change TypeDescription
Constant valuesChanging the value of a VAR CONSTANT declaration
Internal logicModifying expressions, comparisons, math operations within existing code
Variable initial valuesChanging the initial value (not the data type or scope)
Timer/counter presetsChanging PT values of IEC timers
Adding new variablesAdding new VAR declarations (may require INIT cycle depending on task config)
Adding new function blocksAdding new FB instances in existing programs (non-structural change)
Modifying existing FB instancesChanging the logic inside a function block that is already instantiated

Changes That REQUIRE a Warm Restart

Change TypeDescription
Data type changesChanging a variable from INT to REAL, adding array dimensions, changing STRING length
Task configuration changesChanging task cycle time, priority, or phase
Adding/removing tasksCreating or deleting a cyclic, freewheeling, or event-triggered task
Adding new programsAdding a new program file to the project
Hardware configurationChanging the I/O tree (adding/removing modules in the hardware configuration)
Library version changesUpgrading a library version (may require full rebuild and warm restart)
Memory layout changesAny change that shifts the absolute memory address of existing variables or code

Changes That REQUIRE a Cold Restart (Power Cycle)

Change TypeDescription
Automation Runtime upgradeInstalling a new AR version on the controller
Firmware updatesUpdating controller or module firmware
Network interface changesChanging the IP configuration of the controller’s primary interface (sometimes)
System partition changesModifying the AR system configuration (partition sizes, boot parameters)

Detecting What Requires a Restart

Automation Studio provides visual indicators:

  1. Transfer Configuration Dialog (AR >= G4.33): Before downloading, Automation Studio analyzes the differences between the installed and compiled code and indicates which changes will require a restart.
  2. Red Exclamation Mark: In the download dialog, a red ! icon warns that a warm restart is required. The controller will briefly leave RUN mode and execute INIT cycles for affected tasks before resuming.
  3. No Warning: If no warning is displayed, the change can be applied purely online without any task interruption.

Structural vs. Non-Structural Changes

The distinction between structural and non-structural changes is critical:

  • Non-structural changes (logic within existing functions, constant values, initial values) can typically be applied online.
  • Structural changes (new data types, new tasks, hardware tree changes, library upgrades) require a warm or cold restart because they alter the memory layout that AR uses to manage running tasks.

Guidelines by Scenario

ScenarioCan You Stop the Machine?Can You Restart the Machine?Recommended Approach
Urgent bug fix (logic only)NoNoOnline change (non-structural)
Urgent bug fix (new variable type)NoYesWarm restart (download with ! warning)
New feature (new task)NoYesWarm restart after changeover
Major update (library upgrade)YesYesFull cold restart, test thoroughly
Parameter tuningNoNoWatch window or HMI input

6. Hot-Connecting: Adding/Removing Hardware at Runtime

Hot-Connecting Overview

B&R’s Automation Runtime supports hot-connecting — the ability to add or remove I/O modules from the X20 bus while the controller is running. This is primarily facilitated through the mappIO service and the AsIO library.

Enabling/Disabling Hardware Modules at Runtime with mappIO

The mappIO mapp service provides a high-level interface for modifying the hardware configuration at runtime:

  1. Configure all possible hardware modules in the Automation Studio hardware tree (include optional modules even if they are not physically installed).
  2. Instantiate the mappIO component in your project.
  3. Use the mappIO API to enable or disable specific modules based on runtime conditions:
(* Enable a specific I/O module based on a machine configuration *)
MappIO.EnableModule(
    moduleIdent := 'X20DO9321',
    slot := 3,
    enable := bModuleRequired
);

Use Cases:

  • Machines with optional equipment where modules are installed for some configurations but not others.
  • Module replacement during operation (e.g., swapping a failed analog input module).
  • Configuration-driven machines where the hardware setup depends on a recipe or model selection.

AsIO Library for Hardware Configuration

For lower-level control, the AsIO library allows creating and removing hardware configurations programmatically:

FunctionPurpose
AsIOCreateConfigurationCreate a new hardware configuration at runtime
AsIORemoveConfigurationRemove an existing hardware configuration
AsIOReadConfigurationRead current configuration status
AsIOEnableForcingEnable I/O forcing for specific data points

The AsIO approach was the traditional method before mappIO became available. It is more flexible but less user-friendly than mappIO.

X20 Bus Module Hot-Swap Behavior

The X20 bus system has specific hot-swap characteristics:

  • Bus modules (X20BM01, X20BM11, etc.) are the backbone of the X20 I/O system. They provide the X2X backplane connection between modules.
  • I/O modules can typically be inserted or removed while the bus is powered, provided the bus module supports hot-swap and the software configuration accounts for the change.
  • When a module is physically removed, the AR runtime detects the absence and sets the module’s ModuleOk flag to FALSE. The mappIO service can then handle the diagnostic and optionally reconfigure the system.
  • When a module is inserted, AR detects the new hardware and initializes it. If the module matches the configured hardware tree, it becomes operational automatically. If it does not match, a diagnostic alarm is generated.

Practical Example: Optional Machine Configurations

(* Configuration 1: Standard machine *)
IF iConfig = 1 THEN
    (* Enable standard I/O, disable optional modules *)
    MappIO.SetModuleState('AI_Option', MODULE_DISABLED);
    MappIO.SetModuleState('AO_Option', MODULE_DISABLED);
END_IF

(* Configuration 2: Machine with optional sensor package *)
IF iConfig = 2 THEN
    (* Enable optional modules *)
    MappIO.SetModuleState('AI_Option', MODULE_ENABLED);
    MappIO.SetModuleState('AO_Option', MODULE_ENABLED);
END_IF

Limitations

  • CPU modules cannot be hot-swapped — they are the core of the system.
  • Bus modules that are in the middle of the rack chain (between two other modules) cannot be removed without breaking the X2X connection for downstream modules.
  • Power supply modules obviously cannot be removed while the system is running.
  • Hot-swap behavior depends on the specific module type — check the module’s datasheet for hot-swap support.
  • For safety-rated modules (SafeLOGIC, SafeI/O), hot-swap is handled differently and must comply with safety standards (see Section 11).

7. Using PVI/OPC-UA to Write Variables on a Running PLC

PVI — Process Visualization Interface

PVI is B&R’s native communication middleware for accessing process variables. It abstracts the physical connection (Ethernet, USB, serial) behind a uniform API.

PVI Architecture

ComponentLocationFunction
PVIServerOn the controller (AR)Exposes process variables from running tasks
PVI ManagerWindows hostCentralized line configuration and routing
PVI OPC ServerWindows hostTranslates OPC calls into PVI calls
PVI Client LibrariesApplicationC/C++, .NET, VBS, Python access via PVI DLL

Configuring a PVI Line

PVI is configured via the PVI Lines tree in Automation Studio or standalone PVI Manager:

[TCP]
Driver    = TCPIP
StationA  = PC_Main
StationB  = PLC_01
IP_StationB = 192.168.10.50
Port_StationB = 11160

Default PVI TCP port: 11160. Modern controllers (AR >= B4.0) also expose OPC UA on port 4840.

Writing Variables via PVI (Python Example)

Using the Pvi.py wrapper (available at github.com/hilch/Pvi.py):

from pvi import *

# Connect to the PLC
line = Line()
line.connect("TCP", "PLC_01")

# Access a task
task = Task(line, "Task1")

# Write a setpoint variable
temp_setpoint = Variable(task, "gRecipe.rTemperatureSetpoint")
temp_setpoint.value = 85.5

# Write a boolean
pump_enable = Variable(task, "gMachine.bPumpEnable")
pump_enable.value = True

PVI Forcing

PVI supports writing to the force value of a variable using the 'F+' syntax:

var = Variable(task, "AF_AI[6].ModuleOk")
var.value = True  # Writes to force value

## Read the force status
status = var.read_status(POBJ_ACC_STATUS)

Limitation: PVI cannot change the force activation status itself — only Automation Studio or the AsIOEnableForcing function block can enable/disable forcing.

OPC UA — Standardized Access

OPC UA is the recommended communication method for new projects. It is supported natively on B&R controllers running AR >= 4.0.

Enabling OPC UA on the Controller

  1. In Automation Studio, open the Logical View > Controller > Configuration.
  2. Navigate to OPC UA settings.
  3. Enable the OPC UA Server.
  4. Configure:
    • Endpoint URL: opc.tcp://<controller-ip>:4840
    • Security Policy: None, Basic128Rsa15, Basic256, Basic256Sha256
    • Max Sessions: Default 50, adjustable for SCADA fan-out
    • Publishing Interval: Default 100 ms (minimum practical: 50 ms)
  5. Mark variables as OPC UA accessible: In the variable properties dialog, enable the OPC UA accessibility flag.
  6. Recompile and download.

Writing Variables via OPC UA (Python Example)

import asyncio
from asyncua import Client

async def write_setpoint():
    url = "opc.tcp://192.168.10.50:4840"
    async with Client(url=url) as client:
        setpoint_node = client.get_node("ns=2;s=Task1.gRecipe.rTemperatureSetpoint")
        await setpoint_node.write_value(85.5)
        print("Setpoint written successfully")

asyncio.run(write_setpoint())

OPC UA Parameters

ParameterDefaultNotes
Endpoint URLopc.tcp://<ip>:4840Configurable
Security PoliciesNone, Basic128Rsa15, Basic256, Basic256Sha256Use Basic256Sha256 in production
Max Sessions50Adjust for large SCADA systems
Publishing Interval100 msLower = more CPU load
Sampling Interval50 msMust be <= publishing interval

PVI vs OPC UA Decision Guide

CriterionPVIOPC UA
StandardizationB&R proprietaryIEC 62541 (international standard)
Encryption/AuthNoneCertificate-based, user tokens
Typical Latency5-20 ms10-50 ms
SCADA SupportVia PVI OPC bridgeNative
Effort to expose variableLow (auto-exposed)Low (mark as accessible)
Safety I/O AccessYes (with restrictions)Must exclude safety task variables

Rule of thumb: Use OPC UA for new projects. Use PVI when integrating with B&R HMI panels or legacy systems.

Performance Considerations

Server CPU load scales approximately as:

ServerLoad ≈ N_variables × (1000 / Sampling_ms) × Payload_bytes

For 500 variables at 100 ms sampling with 8-byte payloads on an X20CP3584:

  • CPU consumption: ~0.3-0.8 ms per 100 variables per cycle
  • Bandwidth: ~40 KB/s (negligible on 100 Mbit Ethernet)

8. Runtime Parameter Modification from HMI

HMI Parameter Modification Overview

HMI-based parameter modification is the most operator-friendly method for runtime changes. B&R provides several HMI technologies, with mapp View being the current standard.

Architecture

The typical parameter modification chain is:

Operator → HMI Screen (mapp View) → OPC UA → PLC Variable → Machine Logic

mapp View communicates with the PLC via OPC UA internally. When an operator enters a new value in an HMI widget, the value is written through OPC UA to the corresponding PLC variable.

Designing HMI Screens for Parameter Changes

Input Widgets

mapp View provides several widgets for parameter input:

WidgetUse Case
TextFieldFree-form numeric or text entry (setpoints, filenames)
NumericInputNumeric entry with min/max limits and unit display
SliderAnalog value adjustment with visual feedback
ToggleButtonBoolean on/off switches
RadioButton GroupSelection among predefined options
ListBox / ComboBoxSelection from a list (recipe names, mode selections)
DateTimePickerDate/time parameter entry

Binding Variables to Widgets

In mapp View, widgets are bound to PLC variables through the Content property:

  1. In the mapp View page editor, select the widget.
  2. In the Properties panel, set the Content to reference the PLC variable (e.g., MainTask.gMachine.rSpeedSetpoint).
  3. Configure input constraints:
    • Minimum/Maximum: Numeric range limits.
    • Format: Decimal places, unit display.
    • Access Level: Restrict modification to authorized operators.

Implementing Access Levels

B&R provides the mapp User service for managing operator access:

(* In PLC code: define access levels *)
VAR_GLOBAL CONSTANT
    ACCESS_LEVEL_OPERATOR   : UINT := 10;
    ACCESS_LEVEL_SUPERVISOR : UINT := 20;
    ACCESS_LEVEL_ENGINEER  : UINT := 50;
END_VAR

In mapp View, bind the widget’s Access Level property to the user’s current access level. When the user’s access level is insufficient, the widget is displayed as read-only.

Validation and Confirmation

For critical parameter changes, implement validation in the PLC:

FUNCTION fbSetSpeedSetpoint : BOOL
VAR_INPUT
    rNewSpeed : REAL;
    rMinSpeed : REAL;
    rMaxSpeed : REAL;
    bConfirm  : BOOL;
END_VAR

IF bConfirm THEN
    IF rNewSpeed >= rMinSpeed AND rNewSpeed <= rMaxSpeed THEN
        gMachine.rSpeedSetpoint := rNewSpeed;
        fbSetSpeedSetpoint := TRUE;
    ELSE
        (* Log error, reject change *)
        fbSetSpeedSetpoint := FALSE;
    END_IF
END_IF

Feedback to the Operator

Always provide visual feedback when a parameter is changed:

  • Status indicators (green checkmark for success, red X for error).
  • Current value display alongside the input field.
  • Audit log visible to operators showing who changed what and when.

9. Online Monitoring and Cross-Reference

Online Monitoring Tools

Watch Window

The Watch Window (Online > Watch Window) is the primary monitoring tool:

  • Displays real-time values of selected variables.
  • Shows variable type, scope (global/local), and current value.
  • Supports forcing (see Section 2).
  • Can display values in different formats (decimal, hex, binary, float).

LAD Monitor

The LAD Monitor (Online > LAD Monitor) provides graphical monitoring of ladder logic:

  • Shows real-time power flow through contacts and coils.
  • Displays the current value of each variable in the rung.
  • Supports forcing directly in the ladder diagram.
  • Color-coded indicators show TRUE/FALSE states.

Trace (Oscilloscope)

The Trace tool (Online > Trace) is a digital oscilloscope for PLC variables:

  • Record up to 4 channels of data simultaneously.
  • Configure trigger conditions (rising edge, falling edge, value threshold).
  • Variable time base from microseconds to hours.
  • Export data to CSV for analysis.
  • Essential for debugging timing-sensitive issues.

Scope View

The Scope provides real-time graphical display of variables over time, similar to an analog oscilloscope, but in a live view without recording.

I/O Monitoring

The I/O Monitor (Online > I/O Status) shows the state of all physical I/O points:

  • Digital inputs and outputs with status LEDs.
  • Analog input/output values with engineering units.
  • Module status (ModuleOk, diagnostics).
  • Bus module communication status.

Cross-Reference Tools

Go to Definition / Go to Reference

In the Automation Studio code editor:

  • F12 (or right-click > Go to Definition): Jumps to where a variable is declared.
  • Shift+F12 (or right-click > Show References): Shows all locations where the variable is used (read or written).

Cross-Reference View

The Cross-Reference window (View > Cross-Reference) provides a comprehensive list:

  • All variables in the project with their usage locations.
  • Filterable by read/write reference type.
  • Shows which task/program accesses each variable.
  • Essential for understanding the impact of a variable change before making an online modification.

Online Cross-Reference

When connected online, the cross-reference information is enriched with runtime data:

  • Actual memory addresses of variables.
  • Current values (via Watch Window integration).
  • Task cycle time impact assessment.

Using Cross-Reference for Safe Online Changes

Before making an online change:

  1. Identify the variable you want to change using Cross-Reference.
  2. Check all read locations: Will any code behavior change unexpectedly if the value changes?
  3. Check all write locations: Will another task overwrite your change? Are there race conditions?
  4. Check for forcing: Is the variable currently forced? If so, your change will be overridden.
  5. Check task assignments: Which tasks access this variable? Different task cycle times can cause race conditions when modifying shared data.

10. Rollback Procedures if an Online Change Causes Problems

Immediate Response: Force All Off

If an online change causes unexpected behavior:

  1. Immediately click Force All Off in the Watch Window to release all forced values.
  2. If the problem was caused by a forced value, releasing it should restore normal operation.

Recovery via Online Download (Rollback Code)

If the problem is in the code itself:

  1. Revert the code changes in Automation Studio (use version control — Git, SVN, etc.).
  2. Recompile the project.
  3. Download to the running controller using Transfer to Target.
  4. If the download requires a warm restart, the controller will briefly execute INIT cycles before resuming RUN mode.

Recovery via Warm Restart

If the controller is in an inconsistent state:

  1. In Automation Studio, switch the controller to SERVICE mode:
    • Online > Set Mode > SERVICE
  2. This stops all cyclic tasks and initializes variables.
  3. Fix the code, recompile, and download.
  4. Switch back to RUN mode: Online > Set Mode > RUN

Recovery via CF Card Swap (Cold Restart)

If the controller is unresponsive or in a fault state:

  1. Power off the controller.
  2. Replace the CF card with a known-good backup (created with Runtime Utility Center).
  3. Power on the controller.
  4. The controller boots from the known-good CF card with the previous working program.

Recovery via AR System Reset

If the controller is in SERVICE mode and will not start:

  1. Place the PLC into BOOT mode (via the hardware mode switch or by deleting the system partition).
  2. Connect via Automation Studio.
  3. Delete partitions using the HDD/CF Utility.
  4. Cycle power.
  5. Reinstall AR and the program from scratch (Offline Install to CF card).

Preventive Measures

MeasureDescription
CF Card Image BackupCreate a binary image before any online change using Runtime Utility Center
Version ControlUse Git/SVN to track all code changes; tag known-good versions
Upload PVsUpload current process variables before changes using Runtime Utility Center
Test in SimulationUse ARsim (Automation Runtime Simulation) to test changes before applying to hardware
Document ChangesMaintain a change log with date, description, who, and rollback version
Spare CF CardKeep a known-good CF card at the machine for rapid recovery

CF Card Backup Procedure (Detailed)

  1. Connect to the PLC via Runtime Utility Center.
  2. Navigate to Tools > Back up files from Compact Flash / Image file.
  3. Select Create Image to create a complete binary backup.
  4. Save to a PC with a meaningful filename (e.g., MachineA_backup_2026-07-10.img).
  5. Store the backup in a versioned directory alongside the source code.

Restore Procedure (Detailed)

  1. Insert a blank CF card into the PC card reader.
  2. Open Runtime Utility Center.
  3. Navigate to CF Card Tools > Restore Image.
  4. Select the backup image file.
  5. Write the image to the CF card.
  6. Install the CF card in the PLC and power on.

11. Change Management for Safety-Critical Systems

Safety-Critical Change Management Overview

Modifying safety-related PLC programs requires strict adherence to IEC 61508, ISO 13849, and other applicable functional safety standards. B&R’s safety platform (SafeLOGIC, SafeI/O, openSAFETY) has specific rules for runtime modifications.

B&R Safety Architecture

B&R safety technology is built on:

  • SafeLOGIC controllers: Dedicated safety PLCs (e.g., X20SL81xx, X20(c)SL81xx).
  • SafeI/O modules: Safety-rated input/output modules.
  • openSAFETY: B&R’s open safety protocol over POWERLINK or other fieldbuses.
  • Safety+: B&R’s next-generation safety software framework with an open, digitally fingerprint-protected code base.

Rules for Online Changes to Safety Programs

  1. Standard forcing does NOT affect safety I/O. The forcing mechanism in Automation Studio applies only to standard (non-safety) process variables. Safety-rated inputs and outputs are protected by the SafeLOGIC hardware and cannot be overridden through standard force functions.

  2. Safety program changes require re-certification. Any modification to safety-related logic (programs running in the SafeLOGIC task) invalidates the current safety certification. The machine must undergo:

    • Risk re-assessment
    • Re-verification of safety functions
    • Updated safety documentation
    • Sign-off by a competent safety engineer
  3. Safety tasks are isolated. Safety programs run in a dedicated task with higher priority and are protected from interference by standard tasks. Online changes to standard tasks do not affect safety task execution.

  4. OPC UA must not expose safety variables. When configuring OPC UA on a controller that also runs safety programs, the OPC UA address space must be filtered to exclude variables in the safety task. Exposing safety variables to external systems violates IEC 62443 security requirements.

Management of Change (MoC) Procedure

For safety-critical systems, follow a formal Management of Change process:

  1. Request: Document the proposed change, including justification and scope.
  2. Risk Assessment: Evaluate the impact on safety functions. Identify any new hazards introduced by the change.
  3. Review: Have the change reviewed by a safety engineer and the machine builder’s quality team.
  4. Approval: Obtain sign-off from all relevant stakeholders (safety, engineering, production management).
  5. Implementation: Apply the change using a controlled procedure:
    • Create a CF card backup before the change.
    • Test in simulation first (ARsim).
    • Apply the change during a planned downtime window.
    • Verify all safety functions after the change.
  6. Verification: Test all affected safety functions (E-stop, light curtains, guard interlocks, etc.) to confirm they operate correctly.
  7. Documentation: Update all safety documentation, including:
    • Safety requirements specification
    • Safety validation report
    • Operating manual
    • Maintenance procedures
  8. Release: Only after successful verification, return the machine to production.
  • Never make online changes to safety programs while the machine is running. Always stop the machine, apply lockout/tagout, and work in a controlled environment.
  • Use Safety+ for safety development where possible. It provides an open code base with digital fingerprinting that protects safety-critical code while enabling collaborative development.
  • Separate safety and standard logic. Keep safety functions in dedicated SafeLOGIC programs, not mixed with standard machine control logic.
  • Maintain a safety change log. Every modification to safety-related code must be recorded with date, description, who performed it, and verification results.
  • Keep safety backups separate. Store CF card images of safety-related configurations with restricted access and formal version control.

Safety+ Considerations

B&R’s Safety+ framework introduces modern safety development practices:

  • Open code base: Safety functions can be developed with third-party tools, enabling better collaboration and flexibility.
  • Digital fingerprint: Protects the integrity of safety-critical code, ensuring unauthorized modifications are detected.
  • Headless architecture: Supports CLI interaction for automated safety validation.
  • Automatic safety configuration updates: Reduces maintenance effort and ensures consistency across machine variants.

12. Using mapp View for Runtime Parameter Changes

mapp View Runtime Changes Overview

mapp View is B&R’s HMI framework built on web technology (HTML5, CSS, JavaScript). It communicates with the PLC through OPC UA and provides a powerful, modern interface for operators to modify runtime parameters.

Setting Up mapp View for Parameter Changes

Step 1: Add mapp View to the Project

  1. In Automation Studio’s Logical View, right-click the controller.
  2. Select Add > mapp Component > mapp View.
  3. Configure the mapp View settings (web server port, default page, etc.).

Step 2: Create an OPC UA Variable Mapping

  1. In the Logical View, expand the OpcUa node under the controller.
  2. An OPC UA default view file is automatically added.
  3. Mark variables as OPC UA tags by checking the OPC UA accessible property in the variable’s properties dialog.

Step 3: Design the HMI Page

  1. Open the mapp View page editor.
  2. Create a new page or open an existing one.
  3. Add widgets from the widget palette for each parameter you want to expose:
+------------------------------------------+
|  Temperature Control                      |
|                                           |
|  Setpoint: [  85.5  ] °C                 |
|            ^^^^^^^^                       |
|       NumericInput widget                 |
|       bound to gTemp.rSetpoint           |
|                                           |
|  Actual:    82.3 °C                        |
|  Status:    HEATING                       |
|                                           |
|  [Apply]  [Reset to Default]              |
+------------------------------------------+

Step 4: Bind Widgets to PLC Variables

For each widget:

  1. Select the widget.
  2. In the Properties panel, set the Content property to the PLC variable path (e.g., MainTask.gMachine.rSpeedSetpoint).
  3. Configure constraints:
    • Minimum/Maximum: Prevent out-of-range entries.
    • Step size: Define increment granularity for the widget.
    • Unit: Display engineering units.
    • Decimal places: Set display precision.

mapp Recipe for Parameter Groups

For managing groups of parameters that change together (e.g., product changeovers), use the mapp Recipe framework:

  1. Add the mapp Recipe component to your project.
  2. Define recipe structures in your PLC code:
TYPE ST_Recipe :
STRUCT
    rTemperature    : REAL;
    rSpeed          : REAL;
    rPressure       : REAL;
    iDwellTime      : TIME;
    bEnableOption   : BOOL;
END_STRUCT
END_TYPE
  1. Link recipe variables to mapp Recipe component.
  2. In mapp View, add recipe management widgets:
    • RecipeSelector: Choose a recipe by name.
    • RecipeEditor: Edit individual parameters within a recipe.
    • RecipeSave/Load: Store or recall recipe data.

Changing Setpoints Through mapp View (Complete Example)

PLC Side:

PROGRAM Main
VAR
    rTemperatureSetpoint : REAL := 25.0;
    rTemperatureActual   : REAL;
    bHeaterEnabled       : BOOL;

    (* mapp View widget status *)
    bSetpointChanged     : BOOL;
    bApplySetpoint       : BOOL;
END_VAR

(* Apply new setpoint when operator confirms *)
IF bApplySetpoint THEN
    IF rTemperatureSetpoint >= 0.0 AND rTemperatureSetpoint <= 200.0 THEN
        (* Valid range — accept the change *)
        bSetpointChanged := TRUE;
        bApplySetpoint := FALSE;
    ELSE
        (* Invalid — reject and notify *)
        bSetpointChanged := FALSE;
        bApplySetpoint := FALSE;
    END_IF
END_IF

(* Temperature control logic *)
IF rTemperatureActual < rTemperatureSetpoint THEN
    bHeaterEnabled := TRUE;
ELSE
    bHeaterEnabled := FALSE;
END_IF

mapp View Side (Widget Configuration):

WidgetPropertyValue
NumericInput (Setpoint)ContentMainTask.rTemperatureSetpoint
NumericInput (Setpoint)Minimum0.0
NumericInput (Setpoint)Maximum200.0
NumericInput (Setpoint)Decimal Places1
Button (Apply)ContentMainTask.bApplySetpoint
TextDisplay (Status)ContentMainTask.bSetpointChanged
Rectangle (Heater)Fill ColorMainTask.bHeaterEnabled (TRUE = red, FALSE = gray)

Dynamic Page Content

mapp View supports dynamic page changes at runtime:

  • Use NavigationButton widgets to switch between pages.
  • Pages can be selected programmatically through a PLC variable bound to the navigation widget’s content.
  • This enables context-sensitive displays (e.g., showing different parameter pages based on the selected machine mode or recipe).

Advanced: Runtime Image Positioning

While mapp View is designed for static widget layouts, dynamic visual changes can be achieved through:

  • Visibility toggling: Show/hide widgets based on PLC variables.
  • Color changes: Bind fill/stroke colors to status variables.
  • Value formatting: Display different text based on ranges.
  • Page switching: Load completely different pages for different operating modes.

For truly dynamic positioning (e.g., moving an image based on a variable), additional JavaScript can be used in the page’s client-side scripts, though this is an advanced technique that goes beyond standard mapp View practice.

Performance Tips

  • Limit widget count per page: Each widget adds OPC UA subscription overhead. Keep pages under ~100 active widgets for optimal performance.
  • Use polling vs. subscription: For slowly changing parameters, use a longer sampling interval to reduce controller CPU load.
  • Optimize update rates: Set the refresh rate of each widget appropriately. Status indicators need 100-500 ms, while trend displays can use 1-5 seconds.
  • Test with real data: Use ARsim to test the HMI with realistic data volumes before deploying to the target hardware.

Appendix A: Quick Reference Card

Online Change Decision Matrix

What do you want to change?MethodRestart Required?Risk Level
A constant valueOnline downloadNoLow
Logic inside an existing FBOnline downloadNo (if non-structural)Medium
A variable value temporarilyWatch Window writeNoLow
A variable value permanentlyWatch Window + TransferNoLow
A setpoint from HMImapp View widget bindingNoLow
An I/O module configurationmappIO / AsIONo (if supported)Medium
A variable data typeOnline downloadWarm restartMedium
A task cycle timeOnline downloadWarm restartMedium
A library versionRebuild + downloadWarm restartHigh
The hardware treeRebuild + downloadWarm restartHigh
The AR firmwareInstall ARCold restartHigh
Safety program logicN/A — not allowed onlineFull stop + recertificationCritical

Key B&R Libraries for Runtime Operations

LibraryPurpose
AsIOI/O configuration, forcing, hardware management
AsARCfgRuntime configuration (IP, hostname, etc.)
AsSemSemaphore-based synchronization for shared variables
IECCheckRuntime error detection (pointer errors, division by zero, etc.)
mappIOHigh-level I/O management and hot-connect
mapp RecipeRecipe management for parameter groups
mapp UserOperator access level management
mapp ViewHMI framework for runtime parameter display and modification

Key Automation Studio Shortcuts

ShortcutFunction
F7Build/Compile
Ctrl+F7Rebuild All
F12Go to Definition
Shift+F12Show References
F9Generate CF/SD Card
Ctrl+DTransfer to Target

Appendix B: References and Sources


Key Findings

  1. Online download to a running B&R controller requires AR >= G4.33 for transfer configuration options. Automation Studio indicates whether a change needs a warm restart (red exclamation mark) or can be applied fully online. Always perform Rebuild All (Ctrl+F7, not just Build/F7) before downloading to a running system, especially when library changes are involved.

  2. The primary risk of online code changes is page faults from shifted memory addresses. Pointer-based code, global variables shared across tasks with different cycle times, and string buffer operations are the highest-risk areas. Use the IECCheck library for runtime bounds checking and AsSem for semaphore-protected access to shared variables.

  3. Variable forcing is available through three mechanisms: Automation Studio Watch Window (right-click variable, set Force On/Off), the AsIO library (AsIOEnableForcing/AsIODisableForcing function blocks for programmatic control), and PVI external writes using the F+ syntax. PVI can write force values but cannot enable/disable forcing itself.

  4. Runtime parameter changes (setpoints, timers, configuration) are safest when done via PLC logic (deterministic, traceable, version-controlled), AsARCfg library (for IP/hostname/subnet changes), mapp Recipe (for parameter groups), or mapp View HMI with access level controls (mapp User service). Watch Window changes are temporary and revert after restart unless persisted.

  5. Hot-connecting IO hardware at runtime is supported by B&R via the mappIO library and the AsIO library’s hot-connect function blocks. The IO processor automatically detects newly inserted/removed modules. This requires AR >= G4.0 and proper module initialization in the hardware tree configuration.

  6. Safety program logic cannot be changed online – any safety modification requires a full machine stop, safety program re-download, and recertification. The SafeLOGIC safety controller’s forcing mechanisms are separate from standard IO forcing and require SafeDESIGNER software plus password.

  7. OPC UA (port 4840) is the recommended communication method for new projects for external variable access, with certificate-based security and up to 50 sessions at 100 ms publishing interval. PVI (port 11160, ANSL protocol) remains necessary for B&R HMI panels and legacy systems. PVI does not auto-reconnect – implement retry logic for error code 11020.

  8. Rollback procedure: (a) stop all forced variables with Force All Off, (b) download the last known-good version via Transfer to Target, (c) if a warm restart occurs, verify all tasks have re-entered RUN state, (d) if problems persist, perform a cold restart (power cycle) to restore from the CF card image. The CF card image is updated only when explicitly transferred with Application > Generate CF/SD Card (F9).


Cross-References

Related FileRelevance
execution-model.mdTask class scheduling, cycle times, and watchdog behavior affected by online changes
cf-card-boot.mdCF card persistence — how programs are saved to CF for persistence across power cycles
config-file-formats.mdConfiguration files that control program loading and runtime parameters
pvi-api.mdPVI API for external variable writes and forcing from Python/C applications
opcua.mdOPC-UA variable subscriptions and writes for runtime parameter modification
safe-io-diagnostics.mdSafety system constraints — what cannot be changed online in safety programs
memory-map.mdIO memory mapping relevant to understanding force/override targets
firmware.mdAR version requirements for online change support (G4.33+)
diagnostics-sdm.mdMonitoring system health after online changes via SDM
hmi-integration.mdmapp View HMI parameter access levels and runtime modification workflows
retentive-data.mdHow retentive variables are affected by warm restarts during online changes
access-recovery.mdAccess level requirements for making online changes to a running system

Document compiled from B&R official documentation, B&R Community Forum discussions, Automation Studio online help, and field engineering best practices. Always consult the official B&R documentation for your specific Automation Runtime version and controller model.

Building Custom Diagnostic Tools ON the B&R PLC (CP1584)

Overview

One of the most powerful (and underutilized) capabilities of the B&R Automation Runtime (AR) platform is the ability to write custom C/C++ programs that execute directly on the PLC itself. The CP1584 runs Automation Runtime with a built-in GNU C/C++ compiler accessible through Automation Studio. This means you can build diagnostic tools, data loggers, custom monitors, and analysis programs that run in the real-time environment with direct access to IO, system variables, and the file system — all without any external PC connection.

This is critical when you are the sole maintainer of a machine built by a defunct OEM: you need tools that can run autonomously on the PLC, capturing data and diagnosing problems 24/7 without a laptop plugged in.

Why Build Tools ON the PLC?

  • Autonomous monitoring: Capture intermittent faults that happen at 3 AM with no one watching
  • No external dependencies: Works without a PC, OPC-UA client, or Python script running somewhere
  • Deterministic timing: Your diagnostic code runs in the real-time cycle with microsecond precision
  • Direct IO access: Read raw IO data at the bus cycle level, before any software filtering
  • Persistence: Log data to CF card or USB stick for later retrieval
  • Zero-intrusion: Can monitor the running program without modifying it (read-only access to variables)

Programming Languages Available

Automation Studio supports the following languages that execute on the PLC:

LanguageUse CaseNotes
ANSI CLow-level system access, performance-critical codeMost powerful for diagnostics; full POSIX-like API
C++Object-oriented design, complex data structuresRequires C++ options package in AS 3.0+
Structured Text (IEC 61131-3)Quick logic, calling function blocksCan mix freely with C programs
Ladder DiagramRelay logic, simple sequencingLimited for diagnostics
Sequential Function ChartState machine logicUseful for diagnostic state machines

For diagnostic tools, ANSI C is the strongest choice — it provides direct memory access, file system operations, and can call any function block in the system.

See ar-rtos.md for details on the underlying OS and execution-model.md for how tasks are scheduled.

Creating a C Program in Automation Studio

Step 1: Create a C POU

  1. In Automation Studio, right-click ProgramsAdd ObjectProgram
  2. Select ANSI C as the language
  3. Choose Function or Cyclic Cyclic type
  4. Name it (e.g., DiagnosticTool)

Step 2: Understand the C POU Structure

A cyclic C POU has three sections:

/* DiagnosticTool.c - Runs every cycle in its assigned task class */

#include <bur/plc.h>
#include <bur/plctypes.h>
#include <sys_lib.h>
#include <FileIO.h>
#include <ArEventLog.h>

#ifdef _DEFAULT_INCLUDES
    #include <AsDefault.h>
#endif

/* ============================================================
   INIT - Runs once on PLC startup (warm/cold start)
   ============================================================ */
void _INIT DiagnosticToolInit(void)
{
    /* Initialize diagnostic buffers, open log files, etc. */
}

/* ============================================================
   CYCLIC - Runs every cycle (main diagnostic loop)
   ============================================================ */
void _CYCLIC DiagnosticToolCyclic(void)
{
    /* This is your main diagnostic loop.
       It runs at the task class rate you assign.
       Keep it fast - don't block! */
}

/* ============================================================
   EXIT - Runs on PLC stop / program download
   ============================================================ */
void _EXIT DiagnosticToolExit(void)
{
    /* Close log files, flush buffers, cleanup */
}

Step 3: Assign to a Task Class

In the Logical View, assign your C POU to a task class:

  • Task Class 1 (typically 10 ms): For high-speed IO monitoring
  • Task Class 2 (typically 100 ms): For general diagnostics
  • Task Class 8 or background: For slow logging (avoid impacting control)

Critical rule: Your diagnostic code must complete within its cycle time. If it exceeds the watchdog time, the entire PLC will fault. Keep cyclic logic lean — do file I/O and complex processing in lower-priority tasks.

Step 4: Add Required Libraries

In the Configuration ViewLibraries, add the libraries you need:

  • sys_lib — System-level functions (time, string, memory)
  • FileIO — File operations on CF card / USB
  • ArEventLog — Write to the PLC’s event log
  • AsArSdm — SDM diagnostic data
  • AsOpcUac — OPC-UA client functionality
  • AsTcp — TCP/IP client/server
  • AsUdp — UDP communication

Accessing IO Data from C Programs

The safest and simplest way — map IO in the hardware configuration, then access the global variables directly from C:

/* If you have a digital input mapped to variable gDiSensor1 */
extern unsigned short gDiSensor1;
extern unsigned short gDoActuator1;

void _CYCLIC DiagnosticToolCyclic(void)
{
    static unsigned long cycle_count = 0;
    static unsigned long sensor_changes = 0;
    static unsigned short last_state = 0;

    if (gDiSensor1 != last_state) {
        sensor_changes++;
        last_state = gDiSensor1;

        /* Log the edge transition */
        LogSensorEdge(cycle_count, 0, gDiSensor1);
    }
    cycle_count++;
}

Method 2: Direct IO Data Pointers via AsIO Library

For accessing IO without mapped variables — useful when you don’t have the project’s IO mapping:

#include <AsIO.h>

void _CYCLIC ReadDirectIO(void)
{
    /* Enumerate all IO data points and read their values */
    PLCCHECKSUCCESS(AsIOListDP());

    /* After listing, you can iterate through IO data points
       using the AsIO data structures. Each DP has:
       - pVariable: pointer to the data value
       - dwIdent: the IO identifier
       - byDirection: input/output
       - szName: data point name
    */
}

The AsIOFListDP() variant filters to specific IO data points. See memory-map.md for the complete memory mapping scheme and io-card-hardware.md for IO module internals.

Method 3: Direct Memory Access (Advanced)

For the deepest access — reading raw memory addresses where IO is mapped:

#include <sys_lib.h>

/* Access IO via hardware addressing (software addressing must be
   configured in the CPU hardware configuration) */
void _CYCLIC ReadMemoryMappedIO(void)
{
    /* Access a known IO address - format depends on addressing mode
       Software addressing: %IX0.0.1.0 (input, module 0, channel 0)
       Hardware addressing: %IW0 (direct word access)

       In C, use the PV identifier from the variable declaration */
}

Reading System Variables (CPU Health, Timing, etc.)

B&R Automation Runtime exposes numerous system variables that give you insight into the PLC’s health. These are accessible from C as global structures:

Key System Variable Structures

#include <sys_lib.h>

void _CYCLIC ReadSystemHealth(void)
{
    /* CPU temperature (available on CP1584 with hardware monitoring) */
    /* Access via sys_br structure or mapped system variables */

    /* Task cycle time monitoring */
    /* Each task class has cycle time data available through
       the sys_task system variables */

    /* Watchdog status */
    /* Available through system diagnostic variables */

    /* Memory usage */
    /* SRAM/flash usage stats available at runtime */
}

Common System Variables to Monitor

Variable / StructureDescriptionNormal Range
sys_br.bWarmStartWarm start counterIncrement on restart
sys_br.bColdStartCold start counterIncrement on full reboot
Task cycle time varsActual cycle time per task classShould be < configured max
CPU temperatureHardware sensor readingTypically < 70°C
Memory utilizationHeap/stack usageMonitor for leaks
Network interface statsEthernet error countersZero errors ideal
Powerlink node statusEPL bus communication healthAll nodes present
IO module diagnosticsPer-module status bitsAll modules OK

See system-variables.md for the complete list and hardware-monitoring.md for temperature and voltage monitoring details. For CPU specs and physical hardware details, see cp1584-hardware-ref.md.

File System Operations (Logging to CF Card / USB)

Using the FileIO Library

The FileIO library provides function blocks for file operations on the PLC’s file system (CF card, USB stick, or network share):

#include <FileIO.h>

/* FileIO uses function blocks, not direct C calls.
   Declare and call them from your C POU: */

FileCreate    fcCreate;
FileOpen      foOpen;
FileWrite     fwWrite;
FileClose     fclClose;

static int log_file_open = 0;
static unsigned long log_handle = 0;

void _INIT OpenLogFile(void)
{
    fcCreate.pDevice = (UDINT)"/CF_CARD";
    fcCreate.pFileName = (UDINT)"diag_log.csv";
    fcCreate.ulOption = FILE_CREATE_ALWAYS;  /* Overwrite each restart */
    fcCreate.enable = 1;
    FCCreate(&fcCreate);  /* Call the function block */

    if (fcCreate.status == 0) {
        foOpen.pDevice = (UDINT)"/CF_CARD";
        foOpen.pFileName = (UDINT)"diag_log.csv";
        foOpen.ulOption = FILE_OPEN_WRITE;
        foOpen.enable = 1;
        FOOpen(&foOpen);

        if (foOpen.status == 0) {
            log_file_open = 1;
            log_handle = foOpen.ident;

            /* Write CSV header */
            fwWrite.ident = log_handle;
            fwWrite.pData = (UDINT)"Timestamp,Sensor1,Sensor2,Actuator1,CycleTime\n";
            fwWrite.ulLen = 52;
            fwWrite.enable = 1;
            FWWrite(&fwWrite);
        }
    }
}

void _CYCLIC LogDiagnosticData(void)
{
    static unsigned long write_counter = 0;
    static char buffer[256];

    if (log_file_open && (write_counter++ % 100 == 0)) {
        /* Log every 100th cycle to reduce file I/O overhead */
        snprintf(buffer, sizeof(buffer), "%lu,%d,%d,%d,%d\n",
                 cycle_count, gDiSensor1, gDiSensor2,
                 gDoActuator1, current_cycle_time);

        fwWrite.ident = log_handle;
        fwWrite.pData = (UDINT)buffer;
        fwWrite.ulLen = strlen(buffer);
        fwWrite.enable = 1;
        FWWrite(&fwWrite);
    }
}

File System Paths

DevicePathNotes
Internal CF card/CF_CARDDefault storage, limited write cycles
USB port 1/USB0 or /DEVICE0Hot-pluggable, good for log export
USB port 2/USB1 or /DEVICE1If available on CPU
Network shareConfigured mount pointRequires network share setup
RAM disk/RAMFast, volatile — lost on power cycle

Gotchas with File I/O on PLC

  1. CF Card Write Endurance: CompactFlash cards have finite write cycles. Do NOT log at high frequency to the CF card. Use RAM disk for high-speed logging, then periodically copy to CF card or USB.

  2. File Handle Limits: The PLC has a limited number of open file handles (typically 32-64). Always close files you’re not actively using.

  3. Blocking I/O: File writes block the calling task. Keep writes short and infrequent, or use a dedicated low-priority task for all file I/O.

  4. File System Synchronization: The AR file system buffers writes. Data may not be physically written to CF card immediately. Use FileFlush or close/reopen files to force a sync before power cycling.

  5. USB Stick Detection: The PLC may take 1-3 seconds to detect a newly inserted USB stick. Check for device availability before writing.

Using USB Sticks for Data Export

#include <FileIO.h>

void _CYCLIC CheckUSBAndLog(void)
{
    static int usb_available = 0;
    static int file_copied = 0;

    /* Check if USB stick is available by attempting to open a file */
    if (!usb_available) {
        foOpen.pDevice = (UDINT)"/USB0";
        foOpen.pFileName = (UDINT)"test.dat";
        foOpen.ulOption = FILE_OPEN_READ;
        foOpen.enable = 1;
        FOOpen(&foOpen);

        usb_available = (foOpen.status == 0);
        if (usb_available) {
            fclClose.ident = foOpen.ident;
            fclClose.enable = 1;
            FClose(&fclClose);
        }
    }

    /* When USB appears, copy diagnostic logs to it */
    if (usb_available && !file_copied) {
        /* Use FileCopy function block to copy from CF_CARD to USB0 */
        file_copied = 1;
    }
}

Community libraries simplify this:

  • FindUsbStickOnBAndRPlc — Automatically detects USB sticks and mounts them as FileIO devices
  • CSVFileLib — Easy CSV file read/write interface
  • mappCleanUp — Delete old log files by age or size

Writing to the PLC Event Log (ArEventLog)

The ArEventLog library lets you write custom diagnostic messages that appear in the PLC’s built-in Logger (visible in Automation Studio, SDM web interface, and downloadable via FTP).

#include <ArEventLog.h>

ArLogCreate       logCreate;
ArLogWriteMessage logWrite;
ArLogDelete       logDelete;

static unsigned long log_handle = 0;

void _INIT InitEventLogger(void)
{
    logCreate.pName = (UDINT)"MachineDiagnostic";
    logCreate.ulLogLevel = 0x00000001;  /* Level: Info */
    logCreate.enable = 1;
    ArLogCreate(&logCreate);

    if (logCreate.status == 0) {
        log_handle = logCreate.hLog;
    }
}

void _CYCLIC WriteDiagnosticEvents(void)
{
    static unsigned short last_module_ok = 1;

    if (gModuleOk != last_module_ok) {
        logWrite.hLog = log_handle;
        if (gModuleOk) {
            logWrite.ulLogLevel = 0x00000001;  /* Info */
            logWrite.pMessage = (UDINT)"Module recovered - status OK";
        } else {
            logWrite.ulLogLevel = 0x00000010;  /* Error */
            logWrite.pMessage = (UDINT)"Module fault detected!";
        }
        logWrite.enable = 1;
        ArLogWriteMessage(&logWrite);

        last_module_ok = gModuleOk;
    }
}

Log Levels

LevelHex ValueUse Case
Debug0x00Detailed trace info (usually filtered)
Info0x01Normal operational events
Warning0x08Recoverable anomalies
Error0x10Faults requiring attention
Fatal0x20Critical failures

Community Logging Libraries

  • LogThat — Simplified wrapper around ArEventLog with single-call functions
  • UserLog — Synchronous write to user logbooks (avoids async issues)
  • MyDiag — Combines ArEventLog with AsArSdm for comprehensive diagnostic logging

Exposing Diagnostic Data via OPC-UA

If you need external tools (Python scripts, SCADA, dashboards) to access your diagnostic data, expose it through OPC-UA:

#include <AsOpcUac.h>

/* Configure OPC-UA variables in the CPU configuration,
   then reference them in your C code as globals.

   The AsOpcUac library handles the server side automatically
   when OPC-UA is enabled in the hardware configuration.

   Your diagnostic variables just need to be declared as
   global PV (process variable) types, and they appear in
   the OPC-UA namespace. */

Simplified Approach Using Variable Declaration

The easiest way to expose diagnostic data via OPC-UA is to declare global variables with proper attributes. In the Variables tab of your C POU:

/* These globals are automatically exposed via OPC-UA
   if the variable has PV attributes set in the
   OPC-UA server configuration */

GLOBAL DiagData_t gDiagData;

Then in the OPC-UA server configuration (CPU properties → OPC-UA), add these variables to the namespace. External clients can subscribe to changes.

For more details on OPC-UA configuration, see opcua.md.

Exposing Diagnostic Data via Built-in Web Server

The CP1584 has an integrated HTTP server that can serve custom HTML/JS pages. You can build a diagnostic dashboard accessible from any web browser on the network.

Setting Up the Web Server

  1. In Automation Studio, open CPU ConfigurationWeb Server
  2. Enable the web server on the desired port (default 80)
  3. Configure the Web Server Directory (typically on the CF card)
  4. Place your HTML/CSS/JS files in the web directory

HTML + PV_Access.js Example

<!-- /CF_CARD/WebServer/diag.html -->
<!DOCTYPE html>
<html>
<head>
    <title>Machine Diagnostics</title>
    <script src="PV_Access.js"></script>
</head>
<body>
    <h1>CP1584 Live Diagnostics</h1>
    <div>Cycle Count: <span id="cycleCount">--</span></div>
    <div>Sensor 1: <span id="sensor1">--</span></div>
    <div>CPU Temp: <span id="cpuTemp">--</span>°C</div>
    <div>Task 1 Cycle: <span id="task1Cycle">--</span> ms</div>
    <div>Module OK: <span id="moduleOk">--</span></div>

    <script>
        // Connect to PLC PV access
        var pv = new PVAccess();

        // Read variables by name (must be configured in OPC-UA or PV access)
        pv.readVariable("gDiagData.cycleCount", function(value) {
            document.getElementById("cycleCount").textContent = value;
        });

        pv.readVariable("gDiagData.sensor1", function(value) {
            document.getElementById("sensor1").textContent = value;
        });

        // Poll every 1 second
        setInterval(function() {
            pv.readVariable("gDiagData.cycleCount", function(value) {
                document.getElementById("cycleCount").textContent = value;
            });
        }, 1000);
    </script>
</body>
</html>

Community Resources

  • br-plc-as-webserver (GitHub) — Complete demo project for using the PLC as a web server with live data
  • Loupe UX — JavaScript library for web-based HMI on B&R PLCs
  • OMJSON — WebSocket + JSON interface for PLC communication

Network Communication (TCP/UDP)

For custom protocol diagnostics or sending data to external systems:

TCP Client/Server

#include <AsTcp.h>

/* AsTcp library provides TCP client and server function blocks
   Use TCP client to push diagnostic data to a remote server,
   or TCP server to allow external tools to query the PLC */

/* Example: Send diagnostic data to a remote monitoring server */
AsTcpClient tcpClient;

void _CYCLIC SendDiagToServer(void)
{
    static int connected = 0;

    if (!connected) {
        tcpClient.pServerAddr = (UDINT)"192.168.1.100";
        tcpClient.ulServerPort = 9000;
        tcpClient.enable = 1;
        AsTcpClient(&tcpClient);

        if (tcpClient.status == 0) connected = 1;
    }

    if (connected) {
        tcpClient.pData = (UDINT)diag_buffer;
        tcpClient.ulDataLen = buffer_length;
        tcpClient.enable = 1;
        AsTcpClient(&tcpClient);
    }
}

UDP Communication

#include <AsUdp.h>

/* UDP is lower overhead than TCP - good for broadcast diagnostics */

AsUdpSend udpSend;

void _CYCLIC BroadcastDiagStatus(void)
{
    static unsigned long counter = 0;

    if (++counter % 1000 == 0) {  /* Every 1000 cycles */
        snprintf((char*)diag_buffer, sizeof(diag_buffer),
                 "DIAG|%lu|%d|%d|%d",
                 cycle_count, gDiSensor1, gModuleOk, current_temp);

        udpSend.pRemoteAddr = (UDINT)"192.168.1.255";  /* Broadcast */
        udpSend.ulRemotePort = 9876;
        udpSend.pData = (UDINT)diag_buffer;
        udpSend.ulDataLen = strlen((char*)diag_buffer);
        udpSend.enable = 1;
        AsUdpSend(&udpSend);
    }
}

Community Libraries

  • TCPComm — Simplified TCP wrapper around AsTCP
  • UDPComm — Simplified UDP wrapper around AsUDP
  • AsUdp AsTcp demo1 — Official demo project for both libraries
  • paho.mqtt.c-ar — MQTT client for AR (publish diagnostic data to MQTT brokers)

Practical Diagnostic Tool Patterns

Pattern 1: High-Speed IO Edge Detector

Captures every state change on a digital input with microsecond timestamps:

#define MAX_EDGES 10000

typedef struct {
    unsigned long cycle_count;
    unsigned long timestamp_us;
    unsigned short old_state;
    unsigned short new_state;
} EdgeRecord_t;

static EdgeRecord_t edge_buffer[MAX_EDGES];
static unsigned long edge_index = 0;
static unsigned short last_state = 0;

void _CYCLIC EdgeDetectorCyclic(void)
{
    if (gDiSensor1 != last_state) {
        if (edge_index < MAX_EDGES) {
            edge_buffer[edge_index].cycle_count = cycle_count;
            edge_buffer[edge_index].timestamp_us = sys_br.ulCycleTime;  /* System tick */
            edge_buffer[edge_index].old_state = last_state;
            edge_buffer[edge_index].new_state = gDiSensor1;
            edge_index++;
        }
        last_state = gDiSensor1;
    }
}

/* Save to file in a lower-priority task when buffer is full
   or on a periodic basis (every N seconds) */
void _CYCLIC FlushEdgeBuffer(void)
{
    if (edge_index > 0 && (edge_index >= MAX_EDGES || flush_timer_expired)) {
        /* Open file and write edge buffer */
        for (unsigned long i = 0; i < edge_index; i++) {
            snprintf(line_buf, sizeof(line_buf), "%lu,%lu,%d,%d\n",
                     edge_buffer[i].cycle_count,
                     edge_buffer[i].timestamp_us,
                     edge_buffer[i].old_state,
                     edge_buffer[i].new_state);
            /* FileWrite... */
        }
        edge_index = 0;
    }
}

Pattern 2: Analog Signal Quality Monitor

Continuously tracks analog input statistics (min, max, average, noise, dropout detection):

#define ANALOG_SAMPLE_COUNT 1000

typedef struct {
    double min_val;
    double max_val;
    double avg_val;
    double noise_rms;      /* RMS of (value - avg) = noise floor */
    unsigned long dropout_count;  /* Number of times value dropped to zero */
    unsigned long spike_count;    /* Number of sudden large changes */
    double last_rate_of_change;
} AnalogStats_t;

static AnalogStats_t stats;
static double samples[ANALOG_SAMPLE_COUNT];
static unsigned long sample_idx = 0;

void _CYCLIC AnalogMonitorCyclic(void)
{
    double current = (double)gAiTemperature;  /* Read analog input */
    static double prev = 0.0;

    samples[sample_idx++] = current;
    if (sample_idx >= ANALOG_SAMPLE_COUNT) sample_idx = 0;

    /* Simple running statistics */
    if (current == 0.0) stats.dropout_count++;

    double rate = current - prev;
    if (fabs(rate) > (stats.noise_rms * 5 + 1.0)) {
        stats.spike_count++;
    }
    stats.last_rate_of_change = rate;
    prev = current;

    /* Recalculate full stats periodically (every 1000 cycles) */
    if (sample_idx == 0) {
        double sum = 0.0, min_v = 999999.0, max_v = -999999.0;
        for (unsigned long i = 0; i < ANALOG_SAMPLE_COUNT; i++) {
            sum += samples[i];
            if (samples[i] < min_v) min_v = samples[i];
            if (samples[i] > max_v) max_v = samples[i];
        }
        stats.avg_val = sum / ANALOG_SAMPLE_COUNT;
        stats.min_val = min_v;
        stats.max_val = max_v;

        double sq_sum = 0.0;
        for (unsigned long i = 0; i < ANALOG_SAMPLE_COUNT; i++) {
            double diff = samples[i] - stats.avg_val;
            sq_sum += diff * diff;
        }
        stats.noise_rms = sqrt(sq_sum / ANALOG_SAMPLE_COUNT);
    }
}

Pattern 3: Task Cycle Time Watchdog

Monitors all task classes for cycle time violations:

typedef struct {
    char task_name[32];
    unsigned long configured_cycle_us;
    unsigned long actual_cycle_us;
    unsigned long max_cycle_us;
    unsigned long watchdog_violations;
    unsigned long last_violation_cycle;
} TaskMonitor_t;

static TaskMonitor_t task_monitors[8];  /* Up to 8 task classes */

void _CYCLIC TaskCycleMonitor(void)
{
    /* Task cycle time data is available through system variables.
       The exact variable names depend on AR version, but typically:
       - sys_task[0].ulCycleTime (actual cycle time in microseconds)
       - sys_task[0].ulCycleTimeMax (maximum cycle time observed)
       - sys_task[0].ulWatchdogTime (configured watchdog limit)

       Check each task class every cycle. */
    for (int i = 0; i < 8; i++) {
        unsigned long actual = /* sys_task[i].ulCycleTime */;
        unsigned long limit = /* sys_task[i].ulWatchdogTime */;

        if (actual > task_monitors[i].max_cycle_us) {
            task_monitors[i].max_cycle_us = actual;
        }

        if (actual > limit * 80 / 100) {  /* 80% of limit = warning */
            task_monitors[i].watchdog_violations++;
            task_monitors[i].last_violation_cycle = cycle_count;

            /* Log warning */
            LogWriteMessage(LOG_WARN, "Task %d near watchdog: %lu us",
                          i, actual);
        }
    }
}

Pattern 4: Periodic Diagnostic Report Generator

Writes a comprehensive diagnostic snapshot to file every N minutes:

void _CYCLIC DiagnosticReportGenerator(void)
{
    static unsigned long report_timer = 0;
    static const unsigned long REPORT_INTERVAL_CYCLES = 60000; /* ~10 min at 10ms */

    report_timer++;
    if (report_timer < REPORT_INTERVAL_CYCLES) return;
    report_timer = 0;

    char report[2048];
    int offset = 0;

    offset += snprintf(report + offset, sizeof(report) - offset,
        "=== DIAGNOSTIC REPORT ===\n"
        "Timestamp: %lu\n"
        "Cycle Count: %lu\n"
        "Uptime: %lu seconds\n\n",
        GetSystemTime(), cycle_count, uptime_seconds);

    offset += snprintf(report + offset, sizeof(report) - offset,
        "--- Digital Inputs ---\n"
        "Sensor1: %d  Sensor2: %d  Sensor3: %d\n"
        "E-Stop: %d  SafetyOK: %d\n\n",
        gDiSensor1, gDiSensor2, gDiSensor3,
        gDiEStop, gSafetyOK);

    offset += snprintf(report + offset, sizeof(report) - offset,
        "--- Analog Inputs ---\n"
        "Temperature: %.1f °C  (min:%.1f max:%.1f noise:%.3f)\n"
        "Pressure: %.1f bar\n"
        "Level: %.1f mm\n\n",
        gAiTemperature, stats.min_val, stats.max_val, stats.noise_rms,
        (double)gAiPressure, (double)gAiLevel);

    offset += snprintf(report + offset, sizeof(report) - offset,
        "--- IO Module Status ---\n"
        "Module OK: %d  Module ID: %d\n"
        "X2X Bus Status: %d  EPL Status: %d\n\n",
        gModuleOk, gModuleID, gX2XStatus, gEPLStatus);

    offset += snprintf(report + offset, sizeof(report) - offset,
        "--- Task Health ---\n"
        "Task1 cycle: %lu us (max: %lu us)\n"
        "Task2 cycle: %lu us (max: %lu us)\n"
        "Watchdog violations: %lu\n\n",
        task_monitors[0].actual_cycle_us, task_monitors[0].max_cycle_us,
        task_monitors[1].actual_cycle_us, task_monitors[1].max_cycle_us,
        total_watchdog_violations);

    /* Write to file */
    FileWrite(...report, offset...);
}

Building a Complete Diagnostic Task Architecture

Task Class 1 (1 ms or 10 ms) - CONTROL LOGIC + Edge Detection
  ├── Machine control program (existing)
  └── Edge detector (minimal overhead, just captures transitions)

Task Class 2 (10 ms or 100 ms) - MAIN DIAGNOSTICS
  ├── Analog signal monitor
  ├── Task cycle time monitor
  ├── IO module health check
  └── Statistics accumulator

Task Class 4 or 8 (1000 ms) - LOGGING & REPORTING
  ├── File I/O (CSV logging, report generation)
  ├── Event log writing (ArEventLog)
  ├── UDP broadcast of status
  └── USB stick check and data export

Data Flow

IO Hardware → Task 1 (raw capture) → Task 2 (analysis) → Task 8 (storage/output)
                                         ↓
                                    OPC-UA Server (external access)
                                    Web Server (browser access)
                                    UDP Broadcast (network monitoring)

Working Without the Original Project

When you don’t have the original Automation Studio project, building diagnostic tools requires extra steps. See project-reconstruction.md for the full process, but here’s the diagnostic-specific approach:

Step 1: Create a Minimal Project

  1. Install Automation Studio (any version compatible with the AR version on the PLC)
  2. Create a new project with just the CPU (X20CP1584) configured
  3. Set the correct IP address and hardware configuration
  4. Download this minimal project — it won’t run the machine, but it gives you AR access

Step 2: Use Online Browsing

Connect to the running PLC and browse:

  • Online → Variables: See all variables with their current values
  • Online → IO Mapping: See all mapped IO points
  • Online → Task Configuration: See all running task classes and their cycle times
  • SDM (web browser): See complete hardware and software diagnostics

Step 3: Reconstruct IO Mapping

Use brwatch or PVI to read IO values and map them to meaningful names based on:

  • Physical inspection of the machine
  • Wire labeling
  • Behavior observation
  • Cross-referencing with similar B&R machines

Step 4: Add Your Diagnostic C Program

Add your diagnostic C POU to this minimal project. Configure it in a task class. Download with online changes if the machine must keep running.

Step 5: Use OPC-UA or Web Server for Data Access

Since you can’t add your variables to the original program’s OPC-UA namespace easily, expose your diagnostic data through:

  • Your own OPC-UA server instance
  • The built-in web server with PV_Access
  • UDP broadcast
  • Direct file logging to CF card / USB

External Tools That Complement On-PLC Diagnostics

These tools run on a PC but work with data your on-PLC tools produce:

ToolDescriptionSource
brwatchCommand-line variable watch/change/log toolGitHub
SystemDumpViewerViewer for SystemDump.xml files from PLCCommunity
simple data traceRecords PLC variables in high-priority task, saves to CSVCommunity
PVI.pyPython wrapper for B&R PVI APICommunity
systemdump.pyCLI tool to create/load system dumpsCommunity

See pvi-api.md for external PC-based programmatic access and python-diagnostics.md for Python-based diagnostic scripting.

Advanced Techniques

Ring Buffer Data Capture

For capturing high-speed data before a fault (like a flight data recorder’s black box):

#define RING_BUFFER_SIZE 100000
#define TRIGGER_CHANNELS 4

typedef struct {
    unsigned long timestamp;
    unsigned short values[TRIGGER_CHANNELS];
} RingSample_t;

static RingSample_t ring_buffer[RING_BUFFER_SIZE];
static unsigned long ring_write_idx = 0;
static unsigned long ring_full = 0;

void _CYCLIC RingBufferCapture(void)
{
    ring_buffer[ring_write_idx].timestamp = cycle_count;
    ring_buffer[ring_write_idx].values[0] = gDiSensor1;
    ring_buffer[ring_write_idx].values[1] = gDiSensor2;
    ring_buffer[ring_write_idx].values[2] = gDoActuator1;
    ring_buffer[ring_write_idx].values[3] = gModuleStatus;

    ring_write_idx++;
    if (ring_write_idx >= RING_BUFFER_SIZE) {
        ring_write_idx = 0;
        ring_full = 1;
    }
}

/* Trigger: save ring buffer to file when a fault is detected */
void _CYCLIC FaultTrigger(void)
{
    if (gFaultDetected) {
        SaveRingBufferToFile();
        gFaultDetected = 0;  /* Reset trigger */
    }
}

JSON Diagnostic Output (via OMSQL/OMJSON)

The OMJSON community library lets you build JSON strings on the PLC, useful for REST API-like diagnostic output:

/* Using OMSQL/OMJSON to build structured diagnostic output
   that can be consumed by external systems */

void _CYCLIC BuildJsonDiagnostic(void)
{
    /* Build JSON: {"sensor1":true,"temp":23.5,"cycle":1234567,"faults":0} */
    /* OMJSON library provides serialize/deserialize functions */
}

MQTT Diagnostic Publishing

The paho.mqtt.c-ar library (Eclipse Paho MQTT ported to Automation Runtime) lets you publish diagnostic data to an MQTT broker:

/* Using paho.mqtt.c-ar library:
   - Connect to an MQTT broker (local or cloud)
   - Publish diagnostic topics:
     machine/cp1584/digital_inputs
     machine/cp1584/analog_inputs
     machine/cp1584/task_health
     machine/cp1584/io_status
   - Subscribe to commands:
     machine/cp1584/commands/reset_counters
     machine/cp1584/commands/force_output
*/

This is especially useful for IIoT retrofit scenarios.

Safety and Caution

What Can Go Wrong

  1. PLC crash from bad pointers: A NULL pointer dereference or invalid memory access in your C code will cause a page fault. The PLC will stop all task classes and enter service mode. Always validate pointers before accessing them.

  2. Watchdog violation from slow code: If your diagnostic code takes too long in a high-priority task, the hardware watchdog will trigger and reboot the PLC. Profile your code carefully.

  3. CF card wearout from excessive logging: CompactFlash cards have limited write cycles (typically 10,000-100,000 per sector). Log to RAM disk or reduce logging frequency.

  4. Memory exhaustion: Dynamic memory allocation (malloc) on a PLC is dangerous. Memory leaks accumulate and eventually crash the PLC. Use static buffers with fixed sizes.

  5. Interference with control logic: Your diagnostic code runs in the same AR environment as the machine control program. Never modify outputs or control variables from diagnostic code unless absolutely necessary.

Best Practices

  • Read-only access: Design all diagnostic tools as read-only monitors. Never write to outputs from diagnostic code unless it’s a deliberate override with safety interlocks.
  • Static allocation: Avoid malloc()/free(). Use static arrays with known sizes.
  • Error handling: Every function block call should check its status. Never assume success.
  • Graceful degradation: If file I/O fails, continue monitoring in memory. If memory is full, stop capturing but keep the most recent data.
  • Minimal overhead: A diagnostic tool on a production machine should use < 5% of the CPU’s processing capacity.
  • Isolation: Put diagnostic code in its own task class, not mixed into the control task.

Key Findings

  1. ANSI C is the most powerful tool for on-PLC diagnostics — it gives you direct memory access, file system operations, and the ability to call any function block in the system.

  2. Use the layered task architecture — fast capture in high-priority tasks, analysis in mid-priority, file I/O and networking in low-priority background tasks.

  3. File I/O is the biggest risk — CF card wearout and blocking I/O in cyclic tasks are the two most common causes of problems. Always use a dedicated low-priority task for file operations.

  4. The ecosystem is surprisingly rich — community libraries (CSVFileLib, LogThat, UserLog, paho.mqtt.c-ar, TCPComm, OMJSON, Persist, FindUsbStickOnBAndRPlc, PLC-data-trace, mappRemoteShell) fill most gaps that the standard libraries don’t cover.

  5. VS Code can replace Automation Studio for editing — the community B&R Automation Tools extension (github.com/br-automation-com/vscode-brautomationtools) provides IntelliSense for C/C++ programs, build tasks via BR.AS.Build.exe, and PLC transfer via PVITransfer.exe. Combined with the Structured Text VS Code extension, you can develop and deploy diagnostic programs entirely from VS Code. See remanufacturing.md §“Development Tools Update” for the full tool list.

  6. The awesome-B-R community repository was archived in April 2025 — the curated list at github.com/hilch/awesome-B-R is now read-only. Active development continues in individual repositories. Use the archived list as a starting reference, then check individual repos for current status.

  7. You can build a complete diagnostic dashboard using the built-in web server with PV_Access.js — no external software needed, just a web browser.

  8. Ring buffers are your friend for intermittent faults — capture high-speed data continuously and dump to file only when a fault is detected (black box approach).

  9. Without the original project, create a minimal AS project, connect online, browse variables, reconstruct IO mapping, and add your diagnostic program as an additional task. The existing program will continue to run alongside it.

Cross-References

B&R ACOPOS Drive Communication and Diagnostics (CP1584)

Overview

ACOPOS servo drives are B&R’s primary motion control platform for precision servo applications. On a CP1584-based machine, the PLC communicates with ACOPOS drives primarily over ETHERNET Powerlink (EPL) or CAN bus, using B&R’s proprietary ACP10/ACPOSmotion firmware. When you inherit a machine with no documentation, understanding how to monitor, diagnose, back up, and replace these drives is essential.

This document covers the ACOPOS drive family (8V1 single-axis, 8BVE ACOPOSmulti, and 8I7 ACOPOSinverter), communication architecture, fault diagnosis, parameter management, and replacement procedures — all from the perspective of a sole maintainer with zero OEM support.

ACOPOS Drive Family Overview

SeriesModel FormatPower RangeKey Feature
8V1 ACOPOS8V1010, 8V1016, 8V1022, 8V1045, 8V11801-18 kWSingle-axis, modular, most common on CP1584 systems
8BVE ACOPOSmulti8BVE0500…Up to 30 kW shared busMulti-axis, common DC bus, compact multi-axis
8I7 ACOPOSinverter8I74… (A/B/C/D frame)0.37-15 kWCompact, integrated EMC filter, for conveyor/fan applications
ACOPOS P3Various (1/2/3-axis)0.6-64 kW per axisNewest generation, 1-3 axes in single compact module

ACOPOS P3 Details (Newer Generation)

The ACOPOS P3 is B&R’s latest servo drive platform. If you’re maintaining a newer CP1684 or CP3686 system (or upgrading from a CP1584), you may encounter P3 drives:

  • Form factors: 1-axis, 2-axis, and 3-axis in a single compact housing
  • Power range: 0.6 kW to 64 kW per axis (up to 48A continuous)
  • Communication: POWERLINK (primary), EtherCAT (optional)
  • Key advantage: Up to 3 axes in one housing saves cabinet space significantly
  • Firmware: Uses acp10sys same as 8V1 — configuration methodology is identical
  • Safety: Integrated SafeMOTION (STO, SLS, SDI, SLP, SS1, SS2)
  • Not backward compatible with 8V1 hardware — different form factor, different power connector
  • Migration path: If upgrading from 8V1 to P3, motor and encoder cables may need adapters; acp10sys must be regenerated for P3 hardware targets

Note for CP1584 maintainers: The CP1584 can communicate with ACOPOS P3 drives via POWERLINK, but the combined cycle time budget may be tighter. The P3’s higher bandwidth demands more from the MN. Monitor cycle time carefully when mixing 8V1 and P3 drives on the same POWERLINK segment.

ACOPOSmulti (8BVE) Details

ACOPOSmulti uses a shared DC bus architecture for multi-axis systems:

  • Common DC bus: Multiple axes share a single DC bus, allowing regenerative energy from one axis (decelerating) to feed another (accelerating)
  • Module format: Power supply module + axis modules in a rack
  • Communication: POWERLINK or CAN, same acp10sys approach
  • Diagnostic note: A fault on one axis module does NOT necessarily indicate a problem with that specific axis — a DC bus overvoltage (7200) or undervoltage (7211) affects ALL axes on the shared bus
  • Spare parts: Axis modules can be individually replaced without replacing the power supply module, but firmware versions must match across all modules in the rack

Performance Characteristics

  • Communication cycle time: as low as 400 µs over POWERLINK
  • Control loop update: as fast as 50 µs (8V1), faster on P3
  • Peak current: typically 3x continuous for 2 seconds
  • Auto-recognition of B&R motor parameters via embedded chip (HIPERFACE DSL encoders)
  • Non-B&R motors: Manual parameter entry required — backup parameters from existing drive before replacement

Communication Architecture

How the CP1584 Talks to ACOPOS Drives

The CP1584 communicates with ACOPOS drives through one of these protocols:

  1. ETHERNET Powerlink (EPL) — Most common on X20 systems. The CP1584 acts as the POWERLINK Managing Node (MN), and each ACOPOS drive is a Controlled Node (CN). Configuration happens through the acp10sys system file.

  2. CAN bus — Used on older B&R systems (PP100, PP015 Power Panels). Requires a CAN interface module (8AC110.60-2) and node addressing.

  3. EtherCAT (CoE) — Available on newer 8V1 drives as an alternative protocol.

The acp10sys Configuration File

This is the most critical file for ACOPOS drive operation. The acp10sys file contains:

  • Drive-specific parameters (axis configuration, encoder settings, current limits)
  • CAN/POWERLINK network node assignments
  • Motor and encoder interface configurations
  • Safety and limit parameters
  • All drive parameters as a monolithic configuration blob

The CP1584 automatically downloads acp10sys to all connected ACOPOS drives on startup. Without a valid acp10sys, drives will not operate.

Critical gotcha: When replacing a drive, the new drive has factory defaults and NO configuration. It needs acp10sys downloaded from the controller before it will function. If the controller doesn’t have the correct acp10sys, you have a chicken-and-egg problem.

See powerlink-internals.md for EPL protocol details and cf-card-boot.md for how acp10sys fits into the boot sequence.

Hardware Interface: X2 Connector

The X2 connector on ACOPOS drives provides:

PinSignalDirectionDescription
X2.10V DCReferenceControl ground
X2.224V DC (optional reference)InputMay be used as reference
X2.5ReadyOutputDrive is ready (24V when OK)
X2.6Enable+InputEnable the drive (24V = enabled)
X2.7Run+InputStart motion (optional hardwire run)

LED Status Diagnostics

ACOPOS drives have multi-color LEDs for quick visual diagnosis:

ACOPOS Error Code Reference

B&R ACOPOS drives generate numeric error/fault codes that identify the root cause of a failure. These codes are displayed on the drive’s front panel, logged by the PLC, and accessible via SDM.

Comprehensive error code reference: brtschi.ch/automation — This reference documents over 60 error codes (1 through 6047) with descriptions of the drive’s reaction, cause, and correction for each. It is one of the most complete publicly-available ACOPOS error code resources.

Common error code categories:

Code RangeCategoryExamplesTypical Cause
1-99Parameter/configuration errors1: Invalid parameter ID, 2: Data block erroracp10sys mismatch, wrong parameter address
100-999Communication errors6021: Enable unstable, 7100: POWERLINK timeoutCable fault, enable signal noise, bus timing
1000-1999Drive initialization1234: Firmware mismatch, 1721: Hardware faultWrong firmware, hardware damage
2000-2999Motion/control faults29203: Drive not enabled, 2105: Position errorFollowing error, encoder fault, overload
3000-3999Power system faults3235: Overcurrent, 32399: Manual restart neededShort circuit, overvoltage, motor stall
7000-7999Bus/power supply7210: DC bus unstable, 7215: Phase failureInput power fault, regeneration fault

Community resources for ACOPOS troubleshooting:

LED States

LED StateMeaningAction
Green - steadyNormal operation, no errorsNone
Green - blinkingNo error but drive cannot enableCheck X2.6 enable signal and three-phase power
Red - steadyActive fault presentIdentify fault code, fix cause, reset
Red - blinkingNon-fatal warning or config errorCheck parameters and input signals
Red/Green - alternatingBootloader mode or firmware update in progressWait — do not power off
OffNo power or deep sleepCheck 24V DC supply and main power

No LEDs Lit

If no LEDs are lit at all, the drive is not receiving 24V DC control power. Check:

  • 24V DC supply to the X2 connector
  • DC breaker or fuse for the 24V control circuit
  • Wiring continuity from the 24V power supply

Complete ACOPOS Fault Code Reference

ACOPOS fault codes are numeric identifiers organized by category. Below is the comprehensive reference extracted from B&R error text modules. This is the complete list — when diagnosing a drive fault, look up the code here first.

Diagnostic/Status Codes (Low-Level)

These are returned during parameter access, data block operations, and firmware download:

CodeDescriptionDiagnostic Action
1Invalid parameter IDCheck parameter number in program or acp10sys
2Data block for upload not availableacp10sys missing or corrupted — re-download
3Write access for a read-only parameterSoftware bug — remove write attempt
4Read access for a write-only parameterSoftware bug — remove read attempt
8Data block read access already initializedDouble-init bug in NC manager
9Data block write access already initializedDouble-init bug in NC manager
10Data block read access not initializedMissing init call before read
11Data block write access not initializedMissing init call before write
16Data segment is already last (read)Expected more segments
17Data segment is already last (write)Expected more segments
21Checksum after data block write invalidCorrupted data transfer — retry download
23Parameter ID in data block invalidacp10sys corruption — regenerate
25Burn system module only allowed immediately after downloadTiming issue during firmware update
27OS not able to start (not on FPROM)Flash corruption — recovery needed
40Value higher than maximumParameter out of range
52Value lower than minimumParameter out of range
64Hardware ID in BR module invalidWrong target hardware
65Hardware version in BR module invalidVersion mismatch
66Drive OS incompatible with existing networkDowngrade/upgrade drive firmware
67Necessary parameter missing or invalidCheck motor/encoder configuration
68Data block length invalidacp10sys corruption
69Command interface is occupiedWait and retry
72Firmware version below minimum necessaryUpdate drive firmware
73Invalid R4 floating point formatData corruption in parameter block

1000-Series: Communication and Parameter Errors

CodeDescriptionDiagnostic Action
1001Error-FIFO overflowToo many errors — check network/drive health
1002Parameter outside valid rangeCheck value being written
1003Parameter cannot be written while loop control is activeStop controller first, then write
1004Timeout in network life sign monitorPOWERLINK/CAN communication lost — check cable, node
1005Parameter cannot be written while movement is activeStop axis first
1006Invalid parameter for trigger event (digital input + edge)Check trigger configuration
1007Network coupling master deactivated — another master sendingCheck multi-master configuration
1008Network coupling master deactivated — Encoder errorCheck encoder on coupled axis
1009Error during memory allocationRAM issue or memory leak
1011Quickstop input activeQuickstop is asserted — release it
1012Breakdown of cyclic network communicationPOWERLINK/CAN bus failure — critical
1013Station not available for network communicationDrive offline — check power, cable, node assignment
1014Network command interface is occupiedWait and retry
1016Maximum cycle time exceeded — CPU load too highReduce CPU load or increase cycle time
1017Invalid parameter ID for cyclic read accessCheck PDO mapping configuration
1018Invalid parameter ID for cyclic write accessCheck PDO mapping configuration
1021Parameter cannot be written: Function block activeDeactivate FB first
1022Timeout in life sign monitoring of cyclic data to driveCheck POWERLINK cable and timing
1025Value incompatible with holding brake configCheck brake parameter settings
1026Value incompatible with SAFETY modulesCheck SafeMOTION configuration
1027Function not available for this hardwareHardware does not support feature

4000-Series: Position Controller Errors

CodeDescriptionDiagnostic Action
4005Controller cannot be switched on: Drive in error stateClear drive fault first
4007Lag error stop limit exceededMost common motion fault — increase tolerance, check load, check encoder
4008Positive limit switch reachedCheck physical limit switch and wiring
4009Negative limit switch reachedCheck physical limit switch and wiring
4010Controller cannot be switched on: Both limit switches closedWiring fault or both switches triggered
4011Controller cannot be switched off: Movement activeWait for axis to stop
4012Controller cannot be switched on: Init parameters missingacp10sys incomplete — motor data missing
4014Two encoder control: Stop limit of position difference exceededCheck second encoder alignment

5000-Series: Motion, Homing, and Cam Errors

CodeDescriptionDiagnostic Action
5001Target position exceeds positive SW limitCheck target position in program
5002Target position exceeds negative SW limitCheck target position in program
5003Positive SW limit reachedSoftware limit hit — check setpoint
5004Negative SW limit reachedSoftware limit hit — check setpoint
5005Start not possible: Position controller inactiveEnable controller first
5006Start not possible: Axis not referencedRun homing procedure first
5010Move positive not possible: Pos limit switch closedRelease limit switch
5011Move negative not possible: Neg limit switch closedRelease limit switch
5015Start not possible: Homing procedure activeWait for homing to complete
5022Second limit switch signal: Reference switch not foundHoming failed — check reference switch
5024Cyclic set value mode aborted: Set positions missingPOWERLINK data missing
5034Homing not possible: Encoder errorFix encoder before homing
5035Reference marks not detectedCheck encoder and reference switch
5037Homing not possible: Wrong encoder typeCheck encoder configuration
5038Homing not possible: Restore data invalidRe-initialize drive parameters
5039Function not possible: Encoder errorFix encoder first

6000-Series: Power Stage, Controller Enable, and Hardware Errors

CodeDescriptionDiagnostic Action
6011Controller is not in speed modeSwitch to correct mode
6015CAN bus disturbance (receive error counter > 96)Check CAN bus wiring, termination, interference
6016CAN bus disturbance (transmit error counter > 96)Check CAN bus wiring, termination, interference
6017Software watchdog activeCPU overload — check task class timing
6018Hardware: 15V power supply failCheck internal power supply
6019ACOPOS: OvercurrentCheck motor wiring, IGBT stage
6020Hardware: 24V power supply failCheck 24V supply to drive
6021Low level at controller enable inputCheck enable wiring (X2.6) — marginal 24V or noise
6023Voltage sag at controller enable inputEnable signal dropping during operation
6026Holding brake: Stator current limit exceeded during releaseCheck brake mechanism and supply
6028Holding brake: Undervoltage/wire breakageCheck 24V to brake
6032Interface: FPGA configuration errorDrive hardware fault — may need replacement
6033Servo amplifier type not supported by firmwareUpdate drive firmware
6036Motor parameters missing or invalidRe-enter motor parameters from nameplate
6045Power stage X5: No current flowCheck motor connection at X5
6049Power stage X5: Current measurement faultyCalibration or hardware fault
6052Power stage: High-side overcurrentIGBT or motor fault
6053Power stage: Low-side overcurrentIGBT or motor fault
6054Power stage: OvercurrentIGBT or motor fault — check motor insulation
6057Position loop: Load encoder errorCheck load-side encoder
6060Power stage: Limit speed exceededCheck for mechanical binding or runaway

7000-Series: Encoder and Feedback Errors

CodeDescriptionDiagnostic Action
7012Encoder: HIPERFACE error bitCheck encoder cable and connections
7013Encoder: Status messageRead encoder status register for detail
7014Encoder: CRC error during parameter transferCable issue — replace encoder cable
7015Encoder: Timeout during parameter transferCheck cable length and termination
7021Encoder: Timeout reading absolute positionEncoder not responding — check cable/power
7029Encoder: Incremental signal amplitude too smallCable or connector issue — check all connections
7030Encoder: Incremental signal amplitude too largeEncoder fault or wrong encoder type
7032Encoder: Incremental signal too small (disturbance, no connection)Disconnected or broken cable
7033Encoder: Incremental position step too largeInterference or mechanical shock
7036Encoder: Interface ID invalidCheck module slot and EEPROM
7039Incremental encoder: Cable disturbance track ADamaged cable — track A signal degradation
7040Incremental encoder: Cable disturbance track BDamaged cable — track B signal degradation
7041Incremental encoder: Cable disturbance track RDamaged cable — reference track degradation
7042Incremental encoder: Edge distance too smallSpeed too high or encoder damage
7043Encoder: Cable disturbance track DData track issue — HIPERFACE encoder
7045Resolver: Signal disturbanceCheck resolver connections
7046Resolver: Cable disturbanceReplace resolver cable
7047Invalid distance of reference marksMechanical encoder fault
7050Incremental encoder: Illegal AB signal changeSevere cable damage or EMC interference
7051Encoder: Acceleration too large (disturbance)Mechanical shock or vibration
7052Encoder is not supportedWrong encoder type configured
7053Encoder: Power failureCheck encoder power supply

7200-Series: DC Bus and Power Supply Errors

CodeDescriptionDiagnostic Action
7200DC bus: OvervoltageBraking resistor failure or excessive regen energy
7210DC bus: Charging — voltage unstableCheck mains supply quality
7211DC bus: Voltage dipMains sag — check supply, add line reactor
7212DC bus: Large voltage dipSevere mains issue or DC bus capacitor degradation
7214DC bus: Charging resistor hot (too many power fails)Cycling power too often — let cool
7215Power mains: At least one phase failedCheck three-phase input
7217DC bus: Nominal voltage too highCheck mains voltage
7218DC bus: Nominal voltage too lowCheck mains voltage
7219DC bus: Charging voltage too lowCheck precharge circuit
7221Mains: FailureNo three-phase power to drive
7222Power stage: Summation current X5 overcurrentGround fault — check motor insulation
7223DC bus: Overvoltage DC-GNDIsolation issue
7225DC bus: OvervoltageSame as 7200 — braking issue
7226DC bus: OvercurrentInternal fault — may need replacement
7227Bleeder: OvercurrentBraking transistor fault

9000-Series: Temperature and Overload Errors

CodeDescriptionDiagnostic Action
9000Heatsink: Overtemperature — Movement stoppedCheck cooling fan and ambient temperature
9001Heatsink: Overtemperature — Limiter activeThermal throttling — reduce duty cycle
9002Heatsink temp sensor not connected/damagedReplace drive or sensor
9010Motor/choke/external temp: OvertemperatureCheck motor cooling
9030Junction temperature model: Overtemperature — StoppedInternal thermal fault
9031Junction temperature model: Overtemperature — LimitedReduce load
9050ACOPOS peak current: Overload — StoppedReduce peak load or acceleration
9051ACOPOS peak current: Overload — LimitedReduce acceleration/torque demand
9060ACOPOS continuous current: Overload — StoppedMotor or drive undersized for application
9061ACOPOS continuous current: Overload — LimitedReduce continuous load
9070Motor temperature model: Overload — StoppedCheck motor cooling and load
9078Power stage: Temp sensor 1 overtemp — StoppedInternal overheating
9080Charging resistor: OvertemperaturePower cycling too fast
9300Current controller: OvercurrentMotor or drive fault

32000-Series: NC Manager and Network Configuration Errors

These are critical for diagnosing POWERLINK/CAN communication between the CP1584 and ACOPOS drives:

CodeDescriptionDiagnostic Action
32001Error calling CAN_xopen()CAN driver failure
32010Drive not responding to Read RequestDrive offline on network — check cable, node number
32011Drive not responding to Write RequestDrive offline on network — check cable, node number
32013No operating system on driveDrive firmware not loaded — download via acp10sys
32014Drive OS not compatible with NC manager versionFirmware version mismatch — update drive or NC manager
32020System module data could not be read from driveCommunication failure
32036Different system module data after downloadDownload corruption — retry
32037Error messages lost: FIFO overflowNetwork instability
32047CAN node number in acp10cfg is invalidFix node assignment in configuration
32048CAN node number used repeatedlyFix duplicate node numbers
32077POWERLINK node number in acp10cfg is invalidFix EPL node assignment
32078POWERLINK node number used repeatedlyFix duplicate node numbers
32084NC configuration has no ACOPOS moduleMissing drive in acp10cfg
32085Module acp10cfg invalid (AS V2.2+ required)Update Automation Studio
32098Module acp10cfg version not compatibleUpdate NC manager library
32213Timeout for POWERLINK interfaceEPL communication failure — check cable, switch, MN
32225ACOPOS POWERLINK node not in AR configurationDrive node not configured in AS project
32398acp10sys has no OS for this ACOPOS hardware typeWrong acp10sys version for drive model
32399Manual ACOPOS restart needed after NCSYS downloadPower cycle drive after firmware update

35000-Series: SMC Fail Safe (Safety) Errors

CodeDescriptionDiagnostic Action
35000Internal error: Program flowSafety controller firmware fault
35004Internal error: EnDat communicationCheck safety encoder communication
35005Internal error: ACOPOS communicationSafety communication failure
35006Internal error: Encoder communicationCheck encoder cable
35035Internal state machine in Fail Safe StateSafety system tripped — check all safety inputs
35036Deactivated safety function was requestedSoftware tried to use disabled safety function
35037–35041SLS1-SLS4 speed limit out of rangeCheck Safe Limited Speed configuration
35085Safe output: Stuck at high detectedSafety output fault — possible hardware failure
35087Encoder: Speed limit exceeded (safety)Safety speed limit violated

Quick Diagnostic Flowchart

When an ACOPOS drive faults on a CP1584 system:

Drive Fault?
├── Green blink (can't enable)?
│   ├── Check X2.6 enable signal (24V present?)
│   ├── Check three-phase power at power terminals
│   └── Check drive 24V DC supply
├── Red steady (active fault)?
│   ├── Note the fault code (SDM, AS online, or OPC-UA)
│   ├── Error 1012/1013? → Network communication lost
│   │   ├── Check POWERLINK cable
│   │   ├── Check drive node number
│   │   └── Check MN (CP1584) POWERLINK status
│   ├── Error 4007? → Following error / lag error
│   │   ├── Check encoder cable (codes 7029, 7032, 7039?)
│   │   ├── Check mechanical load (binding?)
│   │   ├── Check acceleration/torque settings
│   │   └── Check encoder alignment
│   ├── Error 7200/7225? → DC bus overvoltage
│   │   ├── Check braking resistor (open circuit?)
│   │   ├── Check deceleration rate
│   │   └── Check mains voltage
│   ├── Error 6021? → Enable signal unstable
│   │   ├── Check X2.6 wiring
│   │   ├── Check for ground loop
│   │   └── Add debouncing if noisy
│   ├── Error 70xx? → Encoder fault
│   │   ├── Replace encoder cable (most common fix)
│   │   ├── Check encoder power supply
│   │   ├── Check connector seating
│   │   └── See [encoder-diagnostics.md](encoder-diagnostics.md)
│   ├── Error 9000/9030? → Temperature
│   │   ├── Check cooling fan
│   │   ├── Check ambient temperature
│   │   ├── Reduce duty cycle
│   │   └── Check drive mounting/ventilation
│   └── Error 32013/32014? → Firmware mismatch
│       ├── Check drive firmware version
│       ├── Check acp10sys version
│       └── See [firmware-version-mgmt.md](firmware-version-mgmt.md)
├── Red blink (warning)?
│   ├── Check parameters in SDM
│   ├── May indicate approaching thermal or current limits
│   └── Review drive configuration
└── No LEDs?
    ├── Check 24V DC control power
    ├── Check DC breaker/fuse
    └── Check wiring from power supply

Common Error Scenarios

  1. “ERROR IN PALA DRIVE” on the HMI — acp10sys is missing or corrupted, firmware version mismatch, or hardware failure. Error code 32013 (no OS) or 32014 (version mismatch).
  2. Drive enables then immediately faults — Motor phasing wrong (6044), encoder disconnected (7032, 7053), or power supply issue (7215, 7221).
  3. Drive won’t enable (green blink) — Enable signal (X2.6) not present (6021) or three-phase power missing (7215).
  4. 24V breaker trips when enable applied — Enable input short circuit, internal drive fault, ground loop (6054, 7222).
  5. Drive works intermittently, faults under load — Lag error (4007) from encoder cable degradation (7039, 7040), or thermal overload (9000, 9050).
  6. All drives fault simultaneously — POWERLINK MN failure on CP1584 (1012), or DC bus issue (7200).
  7. Drive faults only after warm-up — Thermal fault (9000, 9030) — check cooling, or encoder cable expanding with heat (7039).
  8. PLCopen error 6021 (“Enable unstable”) — The enable signal at X2.6 is fluctuating. Common causes: marginal 24V supply at the enable input, ground loop causing voltage sag, loose terminal connection, or wiring running parallel to motor power cables picking up noise. Measure the enable voltage with a scope while the fault is active — it must be stable above the threshold (typically >18V). See grounding-emc.md for noise mitigation.
  9. PLCopen error 29203 (“Drive not enabled”) — The PLC program is commanding motion (MC_MoveAbsolute, MC_MoveVelocity, etc.) but the drive’s enable chain is not complete. Check: (a) MC_Power function block has Enable=TRUE and Status=TRUE, (b) no active fault on the drive, (c) safety chain allows enable, (d) STO is released. This error means the software is trying to move before the hardware is ready.
  10. Error 32280 (“Timeout during drive initialization”) — The ACOPOS drive is taking too long to boot on the POWERLINK network. This can be caused by excessive network traffic during startup, a damaged POWERLINK cable, or a drive with corrupted firmware. If it happens intermittently, check cable quality and POWERLINK cycle timing.

Monitoring Drive Status Without the Original Project

Method 1: SDM (System Diagnostics Manager)

Open a web browser and navigate to the CP1584’s IP address. The SDM web interface shows:

  • Drive status (online/offline/fault)
  • POWERLINK node status for each drive
  • DC link voltage
  • Motor current (per phase)
  • Drive temperature
  • Encoder feedback status
  • Fault history

Method 2: Automation Studio Online Monitoring

Even without the project source, you can connect Automation Studio to the running PLC:

  1. Create a minimal project with just the CP1584 CPU
  2. Set the correct IP address
  3. Go to Online → Login
  4. Browse available variables in the Watch window
  5. Look for motion-related variables (axis status, position, velocity, torque)

Method 3: OPC-UA Browsing

If OPC-UA is configured on the CP1584, use any OPC-UA client (UaExpert, Prosys) to browse the address space. Drive data typically appears under motion-related namespaces.

See opcua.md for setup details and cp1584-forensics.md for extracting information from an unknown PLC.

Method 4: PVI API

Use the B&R PVI library from a PC to programmatically access drive variables:

## Using PVI.py
from pvi import *

pvi = PviConnection()
line = pvi.add_line('LN1', 'TCP')
cpu = line.add_device('CP1584', 'TCP', '192.168.1.10')

## Browse available variables
vars = cpu.list_variables()

## Read axis position
pos = cpu.read_variable('gAxis1.Position')

See pvi-api.md for the complete PVI programming reference.

Parameter Backup and Restore

Backup Parameters Before Anything Else

If you do nothing else from this document, BACK UP YOUR DRIVE PARAMETERS NOW.

Method A: Export via Automation Studio

  1. Connect to the PLC with the project that contains the drive configuration
  2. Navigate to Hardware Configuration → Drive Parameters
  3. Select all parameters → File → Export → XML
  4. Save the XML file with the drive model number, serial number, date, and machine identifier

Method B: Export Individual Drive Parameters

  1. In Automation Studio, expand Physical View → ACOPOS → Parameters
  2. Right-click → Export Parameters
  3. This creates a .par or .xml file specific to each drive

Method C: Backup the acp10sys File

The acp10sys file IS your complete drive system configuration. It’s stored in the Automation Studio project under:

Physical View → ACOPOS → System Files → acp10sys

Also found on the CF card as part of the deployed project. Make a copy of the entire CF card image (see cf-card-boot.md).

Method D: Backup via SDM

Some drive parameters can be exported through the SDM web interface under the drive diagnostics section.

What Parameters Are Critical to Back Up

CategoryExamplesWhy Critical
Motor dataRated current, pole pairs, inertiaWithout these, drive won’t match motor
Encoder configType, resolution, commutation offsetWrong encoder = no position control
Controller gainsKp, Ki, Kd (position, velocity, current)Tuning lost = poor or unstable motion
LimitsMax velocity, acceleration, torqueSafety limits must be preserved
Home positionHoming mode, offset, directionMachine zero reference
Network configNode address, cycle time, PDO mappingCommunication won’t work otherwise
Safety paramsSTO configuration, safe limitsRequired for safety system compliance

Drive Replacement Procedure

Complete Step-by-Step Replacement

WARNING: Always de-energize and wait 5+ minutes for DC link capacitors to discharge before servicing servo drives. Measure DC link voltage to confirm < 50V.

Step 1: Backup Everything

  1. Export all drive parameters to XML (see above)
  2. Image the CF card from the CP1584
  3. Photograph all wiring connections
  4. Document the drive model number, firmware version, and slot configuration
  5. Record the CAN/POWERLINK node address

Step 2: Remove the Failed Drive

  1. Remove AC mains power
  2. Wait 5 minutes, verify DC link < 50V
  3. Disconnect: motor power, encoder cable, communication bus, X2 control signals, 24V supply
  4. Label ALL cables with their source/destination
  5. If the drive has a CF card or option modules in slots, remove them carefully and note slot positions

Step 3: Install the Replacement Drive

  1. Verify the replacement drive is the exact same model (8V1016.00-2, etc.)
  2. Install any option modules (encoder interface, communication) in the same slots as the original
  3. Mount the drive and reconnect all cables per your labels
  4. Do not apply power yet

Step 4: Restore Configuration

Option A — You have the Automation Studio project with acp10sys:

  1. Power on the CP1584 and all drives
  2. Download the project (including acp10sys) from Automation Studio
  3. The acp10sys automatically provisions all drives
  4. Verify: no error LEDs on the ACOPOS, SDM shows all nodes online

Option B — You don’t have the project (worst case):

  1. If you have an XML parameter backup, you can load it via Automation Studio to a minimal project
  2. If you only have the CF card image, you may be able to reconstruct a project from the configuration files (see project-reconstruction.md)
  3. As a last resort, you can download acp10sys directly to the drive using a CAN interface (PCAN-USB or 8AC110.60-2), but the drive must be in bootloader mode (cycle power while holding MODE button)

Step 5: Verify and Re-zero

  1. Check all drive LEDs — green steady is the target
  2. Verify DC link voltage in SDM (should be ~1.35 × line voltage for 3-phase)
  3. Verify motor nameplate data matches drive configuration
  4. If using an absolute encoder (EnDat 2.2), position is retained — no re-zeroing needed
  5. If using an incremental encoder, run the homing routine (MC_Home) to re-establish zero
  6. Test axis movement in manual/jog mode at low speed
  7. Verify emergency stop (STO) functions correctly

Re-zeroing Methods

MethodWhen to UseProcedure
Software ZeroEncoder position known, small offset neededAutomation Studio → Motion → Zero Position → Set Software Zero
Hardware HomingIncremental encoder, standard homing switchExecute MC_Home in the PLC program
Absolute EncoderEnDat/Hiperface absolute encoderPosition retained automatically — no action needed

Verification Checklist

TestProcedureAcceptance Criteria
DC Link VoltageMeasure on power-up or read in SDMWithin ±10% of expected (1.35 × line voltage)
Motor Current BalanceMonitor per-phase in SDM at rated loadBalanced within 5%
Position AccuracyMove to known reference positionWithin ±1 encoder count
Velocity ControlJog at constant speedSteady velocity, no hunting
E-Stop ResponseActuate STO inputDrive de-energizes immediately
Following ErrorMove at production speedWithin configured following error limit

Motor Parameter Recognition

B&R motors have an embedded parameter chip (EEPROM/HIPERFACE DSL memory) that contains:

  • Motor type and model number
  • Rated current and voltage
  • Pole pairs
  • Thermal time constants
  • Inertia and friction data
  • Encoder type and resolution
  • Commutation offset (for EnDat 2.2 encoders) — stored in the encoder’s non-volatile memory

When an ACOPOS drive is connected to a B&R motor and powered on, the drive reads this chip and automatically configures the motor parameters. This auto-recognition feature means:

  1. If you’re replacing a motor with an identical B&R motor, the drive will auto-configure
  2. If you’re using a non-B&R motor, you MUST enter parameters manually (including commutation offset)
  3. If the motor’s parameter chip is corrupted, the drive won’t recognize the motor
  4. Commutation offset is critical for torque control — it defines the electrical angle relationship between the encoder zero position and the motor’s magnetic poles. For B&R EnDat 2.2 motors, this offset is stored in the encoder memory and is read automatically. For non-B&R motors or when using incremental/resolver encoders, the commutation offset must be determined via a phasing routine.

Commutation Offset for Non-B&R Motors

When using motors without embedded commutation data (e.g., third-party motors with incremental encoders), the ACOPOS drive must perform a phasing routine to determine the commutation offset:

  1. Via Automation Studio: Motion → Axis → Parameters → Motor → Commutation Offset — set to 0 for resolver-based motors (commutation offset is always 0 for resolvers because resolver zero aligns with the magnetic pole)
  2. Via acp10sys parameter: The commutation offset is stored as a signed integer in the motor parameter block
  3. Phasing procedure: The drive energizes the motor windings in a known pattern, measures the rotor position from the encoder, and calculates the offset. This is done automatically by the ACOPOS during initial commissioning when “Auto Phasing” is enabled

Important: Per B&R training module TM460, phasing is NOT necessary when using B&R motors because the commutation offset is either 0 (resolver) or stored in the EnDat encoder memory. This is a significant advantage of B&R motors — if you need to replace a motor and can source a B&R equivalent, you avoid the entire commutation alignment process.

HIPERFACE DSL (HDSL) Single-Cable Technology

B&R motors with HIPERFACE DSL encoders use a single cable for both motor power and encoder communication:

  • Encoder data is transmitted digitally over the same two cores that carry motor power
  • Eliminates the separate encoder cable — reduces wiring complexity and failure points
  • Fully digital signal transmission, immune to analog interference
  • Supports safety data transmission (HDSL Safety) with a firmware update on the drive
  • Cable length up to 100m supported

Diagnostic note: If an HDSL motor shows encoder errors (70xx codes), the single-cable design means the fault could be in either the power cable or the encoder itself. Test with a known-good cable to isolate. See encoder-diagnostics.md for full procedures.

Manual Motor Parameter Entry

In Automation Studio, navigate to:

Hardware Configuration → ACOPOS → Parameters → Motor

Enter: rated current, rated voltage, pole pairs, encoder resolution, inertia. The drive will use these for current control and commutation.

Drive Firmware Management

Checking Firmware Version

  1. Via SDM: Browse to the drive in the SDM web interface — firmware version displayed
  2. Via Automation Studio: Online → System Diagnostics → ACOPOS firmware version
  3. Via drive LEDs: bootloader mode shows version during startup (red/green alternating)

Updating Firmware

Firmware updates are distributed as part of the Automation Studio installation or from B&R’s download portal. The update process:

  1. Download the new firmware files to the CF card or via Automation Studio
  2. Power cycle the drive while holding the MODE button (enters bootloader)
  3. Automation Studio detects the drive in bootloader mode
  4. Online → Download → Firmware Update
  5. Wait for completion (red/green alternating LEDs)
  6. Do not power off during update — this can brick the drive

Version Compatibility

Automation Studio Versionacp10sys VersionACOPOS Firmware
3.0.x1.x - 2.x1.x - 2.x
3.5.x - 3.9.x3.x3.x
4.x+4.x+4.x+

Mismatched versions are a common cause of “drive won’t work after replacement.” Always match the Automation Studio version to the original project version.

Encoder Diagnostics

Supported Encoder Types

Encoder TypeInterfaceNotes
Incremental TTL/RS422Standard differentialCommon, requires homing
Sin/Cos (1Vpp)AnalogHigher resolution than TTL
HiperfaceDigital (RS485)Absolute, single-turn
EnDat 2.1/2.2DigitalAbsolute, multi-turn, B&R preferred
ResolverAnalogRugged, used in harsh environments
TamagawaDigitalAbsolute, used on some Japanese motors

Diagnosing Encoder Problems

  1. Encoder loss fault — Check encoder cable continuity, connector seating, and cable routing (keep away from motor power cables)
  2. Position jumping — Signal interference (EMC issue) or failing encoder — see grounding-emc.md
  3. Wrong direction — Encoder A/B channels swapped or commutation offset incorrect
  4. Following error exceeds limit — Encoder resolution mismatch, mechanical binding, or tuning issue

See encoder-diagnostics.md for detailed encoder troubleshooting procedures.

Common ACOPOS Problems and Solutions

Problem: Drive Won’t Enable

Symptoms: Green blinking LED, Ready output (X2.5) not active

Diagnosis sequence:

  1. Verify 24V DC at X2.1/X2.6 (enable input)
  2. Verify three-phase power is present at the drive input
  3. Check that acp10sys is loaded and valid
  4. Check the PLC program is asserting the enable (MC_Power function block)
  5. Check safety chain — STO may be preventing enable
  6. Verify no active faults on the drive (check SDM)

Problem: Drive Faults Immediately After Enable

Symptoms: Green briefly, then red steady with fault code

Diagnosis sequence:

  1. Note the fault code — look it up in the ACOPOS manual or error code list
  2. Check motor cable connections (U, V, W phases) for correct order
  3. Verify encoder cable is connected and seated
  4. Check that motor parameters match the actual motor
  5. Measure motor insulation resistance (megger test)
  6. If fault code indicates DC link issue, check braking resistor

Problem: Following Error / Position Deviation

Symptoms: Drive moves but position error grows, or motor oscillates

Diagnosis sequence:

  1. Reduce velocity and acceleration to see if it stabilizes
  2. Check mechanical system for binding or excessive friction
  3. Verify load inertia settings match actual load
  4. Check encoder signal quality (scope the encoder signals if possible)
  5. Verify controller gains haven’t been accidentally changed
  6. Check for EMC interference on encoder cables

Symptoms: Fault on deceleration or during rapid speed changes

Diagnosis sequence:

  1. Check braking resistor — measure resistance (should not be open circuit)
  2. Verify braking resistor is connected to the correct terminals
  3. Check that regenerative energy isn’t exceeding drive capacity
  4. Reduce deceleration rate or add external braking resistor

Problem: Phase Current Imbalance

Symptoms: Motor runs rough, excess heat, vibration

Diagnosis sequence:

  1. Measure motor current per phase in SDM or with clamp meter
  2. If imbalance > 5%, suspect:
    • Motor winding fault (megger test)
    • IGBT failure in drive (need drive repair)
    • Loose connection in motor cable
  3. Run motor disconnected from mechanical load to isolate drive vs mechanical issue

Safety Features

Safe Torque Off (STO)

Most ACOPOS drives support STO (STO per IEC 61800-5-2). When STO is activated:

  • Drive power stage is disabled immediately
  • Motor coasts to stop (no regenerative braking from drive)
  • This is NOT the same as an emergency stop — the drive does not actively brake

SafeMOTION (B&R Extended Safety)

Newer ACOPOS drives and the CP1584 with SafeLOGIC support:

  • Safe Limited Speed (SLS)
  • Safe Direction (SDI)
  • Safe Stop (SS1, SS2)
  • Safe Position (SLP)

See safe-io-diagnostics.md for safety system diagnostics.

Finding Spare Parts and Replacement Drives

Identifying the Drive

B&R part numbers follow the pattern: 8V1016.00-2

  • 8V = ACOPOS single-axis series
  • 1016 = Current rating (10A continuous, 16A model)
  • .00-2 = Version/revision

Sourcing Replacements

When the OEM is gone:

  1. B&R direct — Requires active service contract or B&R portal account
  2. Third-party refurbishers — Companies like Wake Industrial, Roc Industrial, and various servo repair shops stock and repair ACOPOS drives
  3. Used/surplus market — eBay, industrial surplus dealers — verify firmware compatibility
  4. Cross-reference — No direct cross-reference exists to other brands; ACOPOS is proprietary

Firmware Matching Is Critical

A replacement drive from stock may have different firmware than your system. You MUST:

  1. Check the replacement drive’s firmware version (SDM or bootloader mode)
  2. If it doesn’t match your system, update firmware BEFORE installing
  3. Or use an Automation Studio version that supports the drive’s firmware

ACOPOS D1 — Next-Generation Servo Drive (2026)

B&R announced the ACOPOS D1 servo drive at Innovation Days 2026 (Pune, India, March 2026). This is a new generation of servo drives positioned alongside (not replacing) the ACOPOS P3. As of mid-2026, detailed technical specifications have not been publicly released beyond marketing announcements. Key information known:

What We Know

AspectDetail
Launch dateMarch 2026, Innovation Days Pune
Market focusIndia-first launch, global rollout expected
Key themesCompact form factor (“shrinking cabinets”), scalable multi-axis, edge computing intelligence for predictive maintenance
Executive quoteFlorian Schneeberger (ABB Division President): “Intelligent ecosystems over silos — agile, sustainable factories”
ContextPart of B&R’s 2026 “adaptive automation” strategy — moving from rigid production to flexible modular systems

What This Means for CP1584 Machine Maintainers

  1. ACOPOS D1 does NOT replace your existing 8V1/P3 drives — it is a new product line. Existing 8V1 drives remain supported and available.
  2. If sourcing replacement 8V1 drives becomes difficult (long-term), the D1 may become an alternative. However, migration from 8V1 to D1 will require:
    • New drive hardware with different form factor
    • Updated acp10sys (or equivalent configuration methodology)
    • Possible motor/encoder cable changes
    • Automation Studio version that supports D1 (likely AS 6.x+)
  3. Edge intelligence is a key differentiator — the D1’s built-in “predictive uptime” capabilities suggest integrated condition monitoring that could reduce unplanned downtime. If this proves valuable, retrofitting may justify the migration cost.
  4. Monitor the B&R product catalog for D1 specifications. When detailed technical data (power range, communication protocols, safety certifications, form factor dimensions) becomes available, this section will be updated.

Status: This section will be updated as B&R releases technical specifications for the ACOPOS D1. Check B&R’s product page at br-automation.com/en-us/products/motion-control/acopos/ and the B&R Community forum for announcements.

Sources: B&R Innovation Days 2026 Pune (press coverage), LinkedIn posts from Florian Schneeberger (B&R/ABB), Industrial Automation Magazine India.

Key Findings

  1. The acp10sys file is everything — Without it, ACOPOS drives are paperweights. Back it up religiously. It’s part of the Automation Studio project and also on the CF card.

  2. LEDs tell you 90% of the story — Green steady = good. Green blink = no enable. Red steady = fault (look up the code). Red blink = warning. Off = no power.

  3. Drive replacement is plug-and-play ONLY if you have the configuration — Move CF card, move option modules to same slots, reload acp10sys. Without configuration, you’re doing reverse engineering.

  4. Version matching is the #1 cause of replacement failure — The new drive’s firmware must match the acp10sys version from the original project. Mismatched versions cause communication failures.

  5. Motor auto-recognition only works with B&R motors — If you’re using third-party motors, you must have the manual parameter values. Back them up.

  6. Encoder problems are the most common intermittent fault — Signal degradation, cable damage, and EMC interference cause position errors that manifest as drive faults. See encoder-diagnostics.md and grounding-emc.md.

  7. SDM is your best friend without the project — The System Diagnostics Manager web interface shows drive status, fault history, and live data without needing Automation Studio or any project files.

Cross-References

B&R Network Architecture and Device Enumeration

Overview

B&R X20 systems use a multi-layer network architecture: ETHERNET Powerlink (EPL) for real-time control communication, standard Ethernet/TCP-IP for IT-level traffic, X2X for local IO bus expansion, and optional CAN bus. Understanding this architecture is essential when you inherit an undocumented machine — you need to map out what devices exist, how they’re connected, and what data flows between them.

Network Topology Types

POWERLINK supports any combination of the following topologies without manual configuration:

TopologyDescriptionWhen Used
StarAll devices connect to a central hub/switchClean installations, easy isolation
Daisy ChainDevices connected in series using built-in 2-port switchesMost common — minimizes cabling
TreeHierarchical branching from central hubLarge machines with multiple sections
RingDaisy chain with last device connected back to firstRedundancy — automatic failover on cable break

B&R POWERLINK hubs (e.g., X20HB8880) support all these topologies. The Compact Link Selector enables ring redundancy for critical applications.

X2X Bus Topologies

The X2X bus (backplane bus connecting X20 IO modules) is always a daisy chain:

CPU/BC → [Module 1] → [Module 2] → [Module 3] → [Terminal Module]

Each module has an X2X in and X2X out connector. The terminal module provides termination.

Typical Machine Network Layout

                          Standard Ethernet (TCP/IP)
                          ┌──────────────────────┐
                          │  Engineering PC      │
                          │  HMI / SCADA          │
                          │  SDM (web browser)    │
                          └──────────┬───────────┘
                                     │
                              ┌──────┴──────┐
                              │  Ethernet   │
                              │  Switch     │
                              └──────┬──────┘
                                     │
┌────────────┐   POWERLINK    ┌──────┴──────┐   POWERLINK    ┌────────────┐
│  ACOPOS    │◄──────────────►│  CP1584      │◄──────────────►│  ACOPOS    │
│  Drive 1   │               │  (MN node)   │               │  Drive 2   │
└────────────┘               └──────┬──────┘               └────────────┘
                                     │ X2X Bus
                              ┌──────┴──────┐
                              │  X20 IO     │
                              │  Modules    │
                              └──────┬──────┘
                                     │ X2X Bus
                              ┌──────┴──────┐
                              │  X20 IO     │
                              │  Modules    │
                              └─────────────┘

Device Discovery on an Unknown Network

Method 1: Automation Studio Browse

  1. Open Automation Studio
  2. Go to Online → Settings
  3. Toggle Browse ON
  4. Automation Studio broadcasts on the local subnet and discovers all B&R devices
  5. Devices appear with: IP address, device name, model number, serial number

Method 2: Standard Network Scan

Since B&R devices respond to standard Ethernet protocols:

## ARP scan - finds all devices on the local subnet
arp -a

## Nmap scan - detailed device discovery
nmap -sn 192.168.1.0/24

## Ping sweep
for i in {1..254}; do ping -c 1 -W 1 192.168.1.$i | grep "bytes from" & done; wait

## DNS reverse lookup (some B&R devices register their name)
nmap -sL 192.168.1.0/24

Method 3: B&R Community Tools

ToolDescriptionSource
brsnmpSNMP commands for B&R PLCs — list/search PLCs, change IPawesome-B-R GitHub
ListAllBurPLCsLists all B&R PLCs on the networkawesome-B-R GitHub
brwatchService tool — watch variables, change IPawesome-B-R GitHub
  1. Install Wireshark with the POWERLINK plugin
  2. Connect your PC to the same network segment
  3. Start capture on the Ethernet interface
  4. Filter: epl for POWERLINK frames
  5. The Managing Node (MN) — your CP1584 — will be visible in SoC (Start of Cycle) frames
  6. All Controlled Nodes (CNs) respond with their node addresses

The POWERLINK MN node is typically node 240 (0xF0). CNs are assigned sequentially.

See powerlink-internals.md for detailed POWERLINK protocol analysis.

Method 5: SDM Web Interface

  1. Open a browser to the PLC’s IP address (default often 192.168.1.10)
  2. The SDM shows all connected POWERLINK nodes, their status, and firmware versions
  3. Navigate to System → Network for full device enumeration

Method 6: Finding a PLC with Unknown IP

If you don’t know the PLC’s IP address:

  1. Connect directly with an Ethernet cable (no switch)
  2. Set your PC to DHCP
  3. B&R PLCs often have DHCP enabled by default, or respond to ARP from any IP
  4. In Wireshark, look for ARP packets from the PLC’s MAC address (B&R OUI prefix)
  5. In Automation Studio, enable Browse — it discovers devices via UDP broadcast
  6. Reset to factory IP: hold the MODE button during power-on for 5 seconds (resets IP to 192.168.1.10)

Network Addressing

IP Address Configuration

B&R devices have IP addresses configured via:

  1. Automation Studio — set in the CPU’s Ethernet configuration
  2. SDM web interface — accessible via browser
  3. SNMP — using brsnmp tool
  4. Hardware reset — MODE button during power-on (factory default: 192.168.1.10)

POWERLINK uses node IDs (1-239 for CNs, 240 for MN):

  • MN (Managing Node): Always node 240 — this is the CP1584
  • CN (Controlled Node): Assigned sequentially 1, 2, 3… by the MN
  • Node addresses are automatically assigned during POWERLINK startup (SoC phase)
  • No manual IP configuration needed for POWERLINK communication — it uses MAC-based addressing

X2X Station Addressing

X2X stations are addressed by their position in the daisy chain:

  • Station 0: The bus controller (BC module on the CPU)
  • Station 1: First IO module after the BC
  • Station 2: Second IO module, etc.

Addresses are automatic — the bus controller enumerates stations during initialization.

Network Diagnostic Tools

Built-in Diagnostics

ToolAccess MethodWhat It Shows
SDMWeb browser → PLC IPAll devices, faults, firmware, network stats
Automation Studio OnlineAS → Online → LoginVariable values, task status, IO mapping
PLC LoggerAS → Tools → LoggerSystem events, warnings, errors with timestamps

External Network Tools

ToolUseNotes
Wireshark + EPL pluginCapture POWERLINK trafficFilter by node, analyze cycle timing
nmapNetwork discovery and port scanningStandard TCP/IP layer
pingBasic connectivity testCheck if PLC responds
ARPFind devices on local subnetQuick scan without tools
brsnmpB&R-specific SNMP commandsChange IP, list PLCs
brwatchReal-time variable monitoringCommand-line, lightweight

Common Network Issues

Symptoms: Drives/IO modules show as offline, red LEDs on modules

Diagnosis:

  1. Check SDM — which nodes are missing?
  2. Verify POWERLINK cable connections (daisy chain: each module has IN and OUT)
  3. Check termination — the last device in the chain needs a terminator or the bus controller must have termination enabled
  4. Verify the bus controller (BC) module is correctly configured in the project
  5. Check cable continuity with a cable tester
  6. Look for the POWERLINK activity LEDs on the bus controller and hub modules

Ethernet Connectivity Problems

Symptoms: Can’t reach PLC from PC, HMI disconnected

Diagnosis:

  1. Verify IP address is correct and on the same subnet
  2. Check physical Ethernet cable and link LEDs on the PLC and switch
  3. Ping the PLC — if no response, check cabling and IP configuration
  4. Verify subnet mask and gateway settings
  5. Check if the PLC’s Ethernet interface is enabled in the hardware configuration

IP Address Conflicts

Symptoms: Intermittent connectivity, PLC appears and disappears from network

Diagnosis:

  1. Check for duplicate IPs using arp -a — look for the same IP with different MAC addresses
  2. Ensure no other device is using the PLC’s IP
  3. Change the PLC’s IP if needed (via SDM, brsnmp, or Automation Studio)

Network Performance Degradation

Symptoms: POWERLINK cycle time violations, intermittent timeouts

Diagnosis:

  1. Check POWERLINK cycle time configuration — is it too fast for the number of nodes?
  2. Verify cable quality — damaged cables cause retransmissions
  3. Check for excessive non-real-time traffic on the same Ethernet segment
  4. Separate real-time (POWERLINK) and IT (TCP/IP) traffic onto different VLANs or physical networks if possible
  5. Monitor POWERLINK timing in Wireshark — look for cycle time jitter

Documenting an Unknown Network

When you inherit an undocumented machine, systematically document the network:

Step 1: Physical Inspection

  1. Follow every cable from the PLC to each device
  2. Note cable types (Ethernet, X2X flat cable, motor power, encoder)
  3. Label every cable at both ends
  4. Photograph the cabinet layout

Step 2: Software Discovery

  1. Connect to the PLC’s SDM web interface
  2. Use Automation Studio Browse to find all B&R devices
  3. Run a network scan (nmap or arp) to find non-B&R devices (switches, HMIs)
  4. Capture POWERLINK traffic in Wireshark to see all active nodes

Step 3: Create a Network Map

Document:

  • Device model, serial number, firmware version
  • IP address / POWERLINK node address / X2X station address
  • Cable connections (what port connects to what)
  • Network configuration (subnet, gateway, cycle time)

Step 4: Record Network Configuration

DeviceModelIP AddressPLK NodeX2X StationFirmwareStatus
CPUX20CP1584192.168.1.10240 (MN)V4.10OK
Bus ControllerX20BC00830V2.xOK
IO Module 1X20DI93711V1.xOK
IO Module 2X20DO93212V1.xOK
Drive 18V1016.00-21 (CN)V3.xOK
Drive 28V1016.00-22 (CN)V3.xOK
HMI4PPC70…192.168.1.11V3.xOK

Ethernet Switching Requirements for POWERLINK

Why Switches Matter

POWERLINK is a time-sliced protocol that requires deterministic Ethernet frame delivery. Standard managed switches can interfere with POWERLINK timing. Understanding this is critical for network design.

RuleDetails
Dedicated segment recommendedPOWERLINK should have its own physical Ethernet segment when possible
No IGMP snooping neededPOWERLINK uses directed frames (not multicast in the traditional sense)
Managed switchesCan be used but must not introduce latency spikes. Avoid spanning tree, QoS reshaping, or storm control
B&R POWERLINK hubsX20HB8880 hubs are purpose-built — 2-port, non-blocking, no processing delay
Standard switches (daisy chain)Each switch adds ~1-5 µs latency; acceptable for cycle times > 1 ms
Full-duplex switchesAcceptable for POWERLINK V2 with some implementations; not for V1 real-time domain

Network Segregation Strategies

GOOD: Separate physical networks
┌──────────────┐     ┌──────────────┐
│  IT Network  │     │ POWERLINK    │
│  (Switch)    │     │ (Hub chain)  │
│  HMI/SCADA   │     │ Drives/IO    │
└──────┬───────┘     └──────┬───────┘
       │                    │
       └────────┬───────────┘
                │
         ┌──────┴──────┐
         │   CP1584     │
         │ IF2=Ethernet │
         │ IF3=POWERLINK│
         └─────────────┘

ACCEPTABLE: Same switch with VLANs
┌──────────────────────┐
│  Managed Switch      │
│  VLAN 10: IT traffic │
│  VLAN 20: POWERLINK  │
└──────────┬───────────┘
           │
    ┌──────┴──────┐
    │   CP1584     │
    └─────────────┘

Important: When POWERLINK and TCP/IP share IF3 (same physical port), they are time-multiplexed. The POWERLINK real-time phase has absolute priority. Non-real-time traffic fills the remaining time slots. If the cycle time is very tight, TCP/IP performance on IF3 will be severely degraded. Use IF2 (dedicated Ethernet) for IT traffic.

OPC UA Network Integration

Port and Protocol

ParameterDefault
OPC UA endpointopc.tcp://<PLC_IP>:4840
Discovery URLopc.tcp://<PLC_IP>:4840
SecurityNone (default), Basic128Rsa15, Basic256, Basic256Sha256
Max sessions50 (configurable)

OPC UA on the Network

  • OPC UA runs on IF2 (Ethernet), not IF3 (POWERLINK)
  • If IF2 is on the same subnet as POWERLINK address range (192.168.100.x), there may be routing issues
  • OPC UA traffic is standard TCP — works through routers, VPNs, and firewalls
  • See opcua.md for detailed configuration and client access

Network Security Considerations

B&R systems from defunct OEMs often have minimal security:

RiskMitigation
No authentication on OPC UAAdd firewall rules; restrict port 4840 to trusted IPs
FTP access with default/no passwordDisable FTP service if not needed; restrict via firewall
SDM web interface open to allRestrict port 80/443; use VPN for remote access
SNMP community strings default (“public”)Change SNMP community in AR configuration
Telnet/SSH accessDisable if not needed; check AR configuration for remote shell

Remote Access Options

For monitoring machines remotely:

MethodProsCons
VPN tunnel to plant networkSecure, full accessRequires IT infrastructure
OPC UA via port forwardingStandard protocol, works through NATSecurity risk if not secured
MQTT bridge (via OPC UA→MQTT gateway)Lightweight, IoT-friendlyRequires additional hardware/software
SDM via HTTPSNo extra software neededLimited to SDM capabilities

See iiot-retrofit.md for detailed remote monitoring setup.

Compact Link Selector (Ring Redundancy)

B&R POWERLINK supports automatic ring redundancy via the Compact Link Selector:

  • Connect the last node in the daisy chain back to the first (forming a ring)
  • If any cable in the ring breaks, communication continues via the alternate path
  • Failover is automatic and typically completes within 1-2 POWERLINK cycles
  • Requires compatible B&R hubs (X20HB8880 with Compact Link support)
  • Configured in Automation Studio’s POWERLINK network configuration

When to Use Ring Redundancy

  • High-availability applications (continuous processes)
  • Long cable runs where damage risk is elevated
  • Multi-machine lines where one cable break would stop the entire plant
  • Not typically needed for standalone machines

Subnet Design Guidelines

Default Address Ranges

InterfaceTypical DefaultNotes
IF2 (Ethernet)192.168.1.xConfigurable via AS or SDM
IF3 (POWERLINK)192.168.100.xReserved for POWERLINK; do not overlap with IF2

Best Practices

  1. Keep POWERLINK on its own subnet (192.168.100.x)
  2. IT traffic on a separate subnet (192.168.1.x)
  3. Use a dedicated VLAN if sharing physical switches
  4. Document all IP addresses — use the network map template above
  5. Reserve IP ranges for future expansion (spare PLCs, new drives)

DHCP and IP Configuration

MethodDescription
Static (default)IP set in AS project or SDM; persistent across reboots
DHCPCan be enabled; PLC requests IP from DHCP server at boot
BOOTPLegacy protocol; some older configurations use this
INA2000 formulaIP = 192.168.1.<hex_switch_value> (when INA mode is active)

For an undocumented machine: check if DHCP is enabled by connecting a PC to the same switch and running a DHCP discovery. If the PLC responds, you’ll find its IP. Otherwise, use ANSL discovery (nmap port 11169/11160) or factory reset (hold MODE button during power-up).

DNS Configuration

Why DNS Matters in B&R Automation

DNS is required for several B&R system services, even on isolated plant networks:

ServiceDNS DependencyNotes
NTP time synchronizationNTP servers resolved by hostname (e.g., pool.ntp.org)Without DNS, NTP sync fails and PLC clocks drift
OPC-UA endpoint discoveryServer certificates may reference DNS namesClient certificate validation can fail without proper DNS
PLC hostname resolutionOther devices reference PLCs by hostnameCross-device communication may break
Software updatesB&R update servers resolved by hostnameNot relevant for isolated networks, but DNS is still configured
ANSL discoveryUses UDP broadcasts, not DNSWorks without DNS

DNS Configuration in Automation Runtime

DNS servers are set in the CPU properties under Ethernet Interface → TCP/IP → DNS:

ParameterDescriptionExample
Primary DNS ServerFirst DNS server queried8.8.8.8 or plant DNS (e.g., 10.0.0.2)
Secondary DNS ServerFallback if primary is unreachable8.8.4.4 or secondary plant DNS
DNS DomainAppended to unqualified hostnamesplant.local or company.com
Get DNS from DHCPAutomatically receive DNS settings via DHCPEnabled or disabled

DNS Servers for Industrial Use

ServerAddressUse Case
Plant DNS serverPlant-specific (e.g., 10.0.0.2)Preferred — resolves internal hostnames
Google Public DNS8.8.8.8 (primary), 8.8.4.4 (secondary)Internet-connected networks, reliable fallback
Cloudflare DNS1.1.1.1Alternative public DNS
B&R defaultNone configuredMust be set manually for NTP

On isolated plant networks without internet access, configure DNS to point at the plant’s internal DNS server. If no internal DNS exists and NTP is required, either use IP addresses directly for NTP or set up a local DNS resolver.

“Get DNS from DHCP” Option

When enabled, the PLC obtains DNS server addresses from the DHCP response alongside the IP address. This is convenient but has caveats:

  • Only works on interfaces configured for DHCP (typically IF2)
  • DNS settings are lost if the DHCP server is unreachable at boot
  • The PLC may boot with stale DNS if the DHCP lease expires during a network outage
  • For critical systems, use static DNS configuration for reliability

DNS Troubleshooting for B&R Networks

SymptomDiagnosisFix
NTP sync failsDNS cannot resolve NTP server hostnameCheck DNS server reachability from PLC; try IP address for NTP server
OPC-UA certificate errorsCertificate CN does not match resolved IPConfigure proper DNS or use IP-based endpoint URLs
PLC hostname not resolvingDNS not configured or hostname not registered in DNSAdd PLC to plant DNS or use hosts file on client machines
Slow network operationsDNS timeout before fallbackConfigure reachable DNS servers or disable DNS if unused

For detailed NTP and DNS interdependencies, see time-sync.md.

Ethernet Interface Configuration

IF2 vs IF3 on X20CP1584

The X20CP1584 has two independent Ethernet interfaces, each serving a different purpose:

InterfaceNamePurposeConnector
IF2ETHx (Ethernet)Standard TCP/IP — OPC UA, SDM, FTP, SNMP, NTPRJ45
IF3ETHx+1 (POWERLINK)POWERLINK real-time bus + multiplexed TCP/IPRJ45

Critical distinction: IF3 can carry both POWERLINK real-time frames and non-real-time TCP/IP traffic in a time-division multiplexed manner. The POWERLINK cycle owns the isochronous phase; TCP/IP traffic fills the remaining asynchronous phase slots. If the POWERLINK cycle time is tight (e.g., 200 µs), very little bandwidth remains for TCP/IP on IF3. For heavy IT traffic, use IF2 exclusively.

Interface Configuration in CPU Properties

Each interface is configured independently in Automation Studio under the CPU’s hardware configuration:

SettingIF2 (Ethernet)IF3 (POWERLINK)
IP AddressStatic or DHCPStatic (POWERLINK uses MAC-based addressing)
Subnet MaskConfigurable255.255.255.0 typical
Default GatewayConfigurableRarely set (used for multiplexed TCP/IP)
DNS ServersConfigurableInherited or separate
MAC AddressHardware-fixedHardware-fixed
Speed/DuplexAuto-negotiate or forcedAuto-negotiate or forced

Speed and Duplex Settings

SettingOptionsRecommendation
Speed10 Mbps, 100 Mbps, AutoAuto-negotiate for standard installations; force 100 Mbps Full if auto-negotiation fails
DuplexHalf, Full, AutoAlways Full Duplex — Half Duplex causes collisions and retransmissions
Auto-NegotiationEnabled/DisabledLeave enabled unless troubleshooting duplex mismatches

Forcing speed/duplex on one end without matching the other causes a duplex mismatch, leading to late collisions, CRC errors, and severe performance degradation. If forcing is necessary, both the PLC port and the switch port must match exactly.

MAC Address Format (B&R OUI)

B&R Automation assigns MAC addresses from their registered OUI (Organizationally Unique Identifier):

PrefixOUI OwnerExample MAC
00:07:6CB&R Industrial Automation00:07:6C:XX:XX:XX
08:00:06B&R (legacy assignment)08:00:06:XX:XX:XX

When scanning a network, filtering by B&R OUI prefixes identifies B&R devices among all network endpoints:

# Find all B&R devices by MAC prefix in ARP table
arp -a | grep -i "00:07:6c"

The X20CP1584 does not support IEEE 802.3ad link aggregation (LACP) natively. However, multi-homing — using both IF2 and IF3 simultaneously on different subnets — is fully supported and is the standard operating mode:

  • IF2: Connected to the IT/SCADA network (192.168.1.x)
  • IF3: Connected to the POWERLINK real-time bus (192.168.100.x)

Each interface routes independently. The PLC maintains separate routing tables per interface. Traffic for the POWERLINK subnet goes out IF3; traffic for the IT subnet goes out IF2. If both subnets overlap, ambiguous routing occurs and connectivity becomes unpredictable.

Interface LED Indicators

LEDStateMeaning
Link/ACT (Green)OnPhysical link established
Link/ACT (Green)BlinkingData transmission active
Link/ACT (Green)OffNo physical link — check cable
Speed (Amber/Yellow)On100 Mbps connection
Speed (Amber/Yellow)Off10 Mbps connection
Error (Red)OnCRC error, duplex mismatch, or collision detected

On POWERLINK hubs (X20HB8880), additional LEDs indicate POWERLINK bus activity and ring redundancy status. See cp1584-hardware-ref.md for complete LED reference.

Latency and Performance Analysis

A single POWERLINK cycle is divided into phases, each contributing to overall latency:

PhaseDuration (typical)Contribution
SoC (Start of Cycle)Broadcast from MN to all CNs~10-20 µs
PReq (Poll Request)MN polls each CN sequentially~2-5 µs per CN
PRes (Poll Response)CN responds to MN~2-5 µs per CN
Async PhaseNon-real-time data exchangeRemaining time
SoA (Start of Async)Signals async phase beginning~2 µs

Total cycle time = sum of all phases. For a system with 5 CNs at 200 µs cycle time, the isochronous portion consumes approximately 50-75 µs, leaving the remainder for asynchronous traffic.

Ethernet Switch Latency

Each switching element in the POWERLINK path adds latency:

DevicePer-Hop LatencyNotes
B&R POWERLINK hub (X20HB8880)< 1 µsStore-and-forward at wire speed; essentially transparent
Unmanaged switch1-5 µsFast switching, minimal overhead
Managed switch (no features)2-10 µsDepends on switching ASIC
Managed switch (IGMP/STP)5-50 µsProcessing features add jitter; avoid on POWERLINK
Router50-500 µsNever route POWERLINK traffic; use bridges only

X2X Bus Latency Contribution

The X2X backplane bus adds latency for IO data to reach the CPU:

ParameterValueNotes
X2X bus cycle time200-500 µsConfigurable in Automation Studio
Per-module propagation~1-2 µsDaisy chain delay accumulates
Typical 10-module chain~20-30 µs totalIncluding bus controller processing
Bus controller processing~10-15 µsCPU reads/writes IO image

X2X latency is independent of POWERLINK cycle time. The CPU updates the IO image at the X2X rate and maps it into the POWERLINK cycle. If X2X cycle time exceeds POWERLINK cycle time, IO data may be stale by one cycle.

End-to-End Latency Budget Calculation

For a signal traveling from a digital input to a drive command output:

StageLatency
Input module debounce + X2X transport~300 µs (X2X cycle)
CPU program scan (logic processing)~100-500 µs (depends on program)
POWERLINK cycle (MN sends command to drive)~200 µs (one cycle)
Drive processing and motor response~500 µs - 2 ms (drive-dependent)
Total (typical)~1.1 - 3.0 ms
Total (best case)~0.6 ms

This budget explains why cycle time configuration is critical — reducing POWERLINK cycle time from 1 ms to 200 µs saves 800 µs per cycle in the command path.

Measuring Latency with Wireshark

To measure actual POWERLINK latency from captures:

  1. Capture POWERLINK traffic on the MN’s interface
  2. Apply filter: epl && epl.soc
  3. Calculate time delta between consecutive SoC frames — this is the actual cycle time
  4. Apply filter: epl && epl.preq && epl.node == 1
  5. Measure time from PReq to matching PRes — this is the round-trip to CN 1
  6. Compare actual cycle times against configured cycle time to detect jitter

Wireshark column setup for latency analysis:

ColumnDisplay Filter FieldPurpose
Frame Deltaframe.time_deltaCycle-to-cycle timing
EPL Serviceepl.serviceIdentify SoC, PReq, PRes
EPL Nodeepl.nodeIdentify which CN
Frame Lengthframe.lenDetect oversized frames

Acceptable Latency Thresholds

ApplicationAcceptable E2E LatencyPOWERLINK Cycle Time
Simple on/off control< 50 ms10 ms (not latency-critical)
Conveyor synchronization< 10 ms2-5 ms
Motion coordination (multi-axis)< 5 ms1-2 ms
High-dynamic servo control< 2 ms200-400 µs
Registration/cutting applications< 1 ms100-200 µs
Electronic camming< 0.5 ms100 µs

When the application requires cycle times below 200 µs, the number of nodes in the POWERLINK chain must be carefully managed — each additional CN consumes time in the isochronous phase.

Network Troubleshooting Deep Dive

Packet loss in POWERLINK manifests as drives going to fault state, IO modules showing communication errors, or cycle time violations. Use Wireshark to diagnose:

## Wireshark capture filter for POWERLINK traffic
## Capture on the interface connected to the POWERLINK segment

## Display filter: show only Poll Requests to detect missing responses
epl && epl.preq

## Display filter: show only Start of Cycle to check cycle consistency
epl && epl.soc

## Display filter: show errors
epl && epl.error

## Display filter: isolate a specific node
epl && epl.node == 3

Steps to diagnose packet loss:

  1. Start Wireshark capture on the POWERLINK segment
  2. Apply epl && epl.soc — verify SoC frames arrive at the configured interval
  3. Apply epl && epl.preq — for each PReq, confirm a matching PRes follows within the timeout window
  4. Missing PRes frames indicate the CN is not responding — check cabling and power to that node
  5. Late PRes frames (arriving outside the isochronous window) indicate switch latency or cable issues
  6. Count total frames over 60 seconds; compare expected vs. actual to calculate loss percentage

Cycle Timing Violation Analysis

When the PLC logs POWERLINK cycle time violations, the actual cycle exceeded the configured maximum. Diagnose by:

  1. Capture a 10-second Wireshark trace with filter epl
  2. Export to CSV and calculate the time delta between consecutive SoC frames
  3. Plot the cycle times — look for outliers and patterns
  4. Common causes:
    • Too many CNs for the configured cycle time
    • Async phase overflow — too much TCP/IP traffic on IF3
    • Switch latency spikes from managed switch features
    • Cable integrity issues causing retransmissions
    • Competing traffic from a misconfigured VLAN

Duplex Mismatch Detection

Duplex mismatch causes late collisions, FCS errors, and severe throughput degradation (often 40-60% packet loss):

SymptomDiagnostic
High FCS/CRC error count on switch portCheck port statistics on managed switch
Late collisions (after 64 bytes)Duplex mismatch almost certain
Intermittent POWERLINK node dropsMismatch causes frame loss at line rate
Works at 10 Mbps, fails at 100 MbpsOne end forcing speed without matching duplex

Fix: configure both ends to the same speed/duplex, or ensure both are set to auto-negotiate. Never mix auto-negotiate on one end with forced settings on the other.

Cable Quality Testing

MethodToolWhat It Tests
Continuity testBasic cable testerPin-to-pin connectivity
Cable certificationFluke DSX or equivalentCat5e/Cat6 compliance, NEXT, return loss, length
TDR (Time Domain Reflectometry)Cable certifier or network switchCable length, impedance mismatches, open/short locations
Bit Error Rate TestManaged switch port statisticsBER over extended test period

For POWERLINK networks, use Cat5e minimum (Cat6 preferred). Maximum cable run: 100 meters per segment. Longer runs require repeaters or fiber media converters. B&R fiber optic POWERLINK modules (X20ET001) are available for runs up to 2 km.

Network Storm Detection and Prevention

A network storm occurs when broadcast or multicast traffic floods the segment, blocking POWERLINK frames:

Storm TypeCauseDetection
Broadcast stormSpanning tree loop, misconfigured mirror portSwitch port statistics show >1000 broadcasts/sec
Multicast stormIGMP misconfiguration, POWERLINK floodingWireshark shows excessive POWERLINK SoC frames
ARP stormDuplicate IP, rogue DHCP serverWireshark filter arp shows continuous ARP requests

Prevention: enable broadcast storm control on managed switches (~100 pps threshold), disable unused ports, avoid creating loops without spanning tree, and use B&R POWERLINK hubs which do not propagate broadcasts.

Spanning Tree Issues with Managed Switches

Spanning Tree Protocol (STP/RSTP/MSTP) can disrupt POWERLINK:

ProblemImpactFix
STP blocking portPOWERLINK nodes behind blocked port unreachableConfigure port as edge/portfast
STP reconvergence30-50 second outage during topology changeDisable STP on POWERLINK ports
RSTP rapid reconvergence1-3 second outageStill disruptive for real-time; disable on POWERLINK ports
BPDU guard violationPort shuts downConfigure BPDU guard appropriately

For POWERLINK segments, disable spanning tree on the relevant ports or use “edge port” / “portfast” designation to skip the listening/learning phases.

Auto-Negotiation Failures

Auto-negotiation can fail between B&R devices and certain switches, resulting in:

Failure ModeSymptomFix
Speed mismatchNo link or 10 Mbps instead of 100 MbpsForce both ends to 100 Mbps Full
Duplex mismatchLink up but high CRC errorsForce both ends to same duplex
Link not establishedNo LED activityForce speed/duplex; try different cable
Intermittent linkLink drops under loadReplace cable; check connector seating

B&R Ethernet interfaces generally implement IEEE 802.3ab auto-negotiation correctly. Issues typically arise with older switches or non-standard Ethernet implementations. When auto-negotiation fails, forcing 100 Mbps Full Duplex on both the PLC and the switch port resolves the issue.

Firewall and Security Configuration

Ports Used by B&R Systems

PortProtocolServiceDirectionNotes
4840TCPOPC UAInboundDefault OPC UA endpoint port
80TCPSDM (HTTP)InboundSystem Diagnostics Manager web interface
443TCPSDM (HTTPS)InboundEncrypted SDM access
11169TCP/UDPANSLInboundAutomation NET Service Layer — device discovery
11160UDPANSL DiscoveryInboundBroadcast discovery protocol
20-21TCPFTPInboundFile transfer — transfer projects, firmware
161UDPSNMPInboundSimple Network Management Protocol
162UDPSNMP TrapOutboundSNMP trap notifications
22TCPSSHInboundSecure shell access (if enabled)
23TCPTelnetInboundUnencrypted remote access (disable if unused)
123UDPNTPOutboundTime synchronization (client)
502TCPModbus TCPInboundIf Modbus gateway configured

Firewall Rule Recommendations for B&R PLC Isolation

A minimum-viable firewall configuration for a B&R PLC:

RuleSourceDestinationPortActionPurpose
1SCADA ServerPLC4840AllowOPC UA access
2Engineering PCPLC80, 443AllowSDM web interface
3Engineering PCPLC20-21AllowFTP for project transfer
4Engineering PCPLC11169AllowANSL device discovery
5NTP ServerPLC123AllowTime synchronization
6SNMP ManagerPLC161AllowSNMP monitoring
7AnyPLCAnyDenyDefault deny all other traffic

For outbound traffic from the PLC, allow: NTP to NTP Server (123/UDP), Syslog to Log Server (514/UDP), and default deny all other outbound.

Network Segmentation for Security

Deploy B&R PLCs in a dedicated automation zone separated from the corporate IT network:

Corporate IT ──► Firewall (rules above) ──► Automation Zone (VLAN)
                                              ├── PLC 1 (192.168.1.10)
                                              ├── PLC 2 (192.168.1.11)
                                              ├── HMI (192.168.1.20)
                                              ├── SCADA Server (192.168.1.30)
                                              └── Engineering PC (192.168.1.100)

Key segmentation principles:

  • All traffic between IT and automation traverses a firewall
  • The automation zone has no direct internet access
  • Engineering PCs are dual-homed or access the automation zone via VPN
  • SNMP community strings are unique per device and not “public”
  • OPC UA uses certificate-based security (not “None” mode)

PLC-to-PLC Firewall Rules

When PLCs communicate directly (PLC-to-PLC, see plc-to-plc.md):

RuleSourceDestinationPortAction
1PLC 1PLC 211169Allow (ANSL)
2PLC 1PLC 24840Allow (OPC UA)
3PLC 1PLC 211160Allow (ANSL Discovery)

Restrict PLC-to-PLC communication to only the required ports. If PLCs only use POWERLINK for inter-communication (via shared bus), no TCP/IP firewall rules between them are needed.

SCADA/IT Network Demilitarized Zone (DMZ)

For plants requiring SCADA connectivity to both the automation zone and the corporate network, place SCADA servers in a DMZ between two firewalls: Corporate IT -> Firewall A -> DMZ (SCADA Server, Historian, OPC UA Gateway) -> Firewall B -> Automation Zone.

  • The SCADA server sits in the DMZ with two network interfaces
  • Firewall A allows SCADA-specific ports from corporate IT to the DMZ
  • Firewall B allows only SCADA-to-PLC ports from DMZ to automation zone
  • OPC UA gateways in the DMZ can bridge protocols (OPC UA to MQTT, OPC UA to REST)
  • The DMZ provides a buffer — if the corporate network is compromised, the attacker cannot directly reach PLCs

Multicast and Broadcast Handling

POWERLINK uses destination addresses that appear as multicast or broadcast on the wire:

Frame TypeDestination MACPurpose
SoC (Start of Cycle)01:EF:00:00:00:01 (POWERLINK multicast)MN signals start of new cycle to all CNs
PReq (Poll Request)Target CN’s unicast MACMN polls individual CN
PRes (Poll Response)MN’s unicast MACCN responds to MN
SoA (Start of Async)01:EF:00:00:00:01 (POWERLINK multicast)Signals async phase

POWERLINK SoC and SoA frames use a reserved multicast MAC address (01:EF:00:00:00:01) to simultaneously reach all CNs. This is not standard IPv4 multicast — it is an Ethernet-level multicast specific to POWERLINK.

IGMP Snooping Interaction

IGMP snooping on managed switches can interfere with POWERLINK:

ScenarioBehavior
IGMP snooping OFFPOWERLINK multicast floods all ports — works correctly for POWERLINK
IGMP snooping ON (no IGMP queries)Switch may block POWERLINK multicast after aging timeout — nodes go offline
IGMP snooping ON with queriesPLC does not respond to IGMP queries (not IP multicast) — multicast gets pruned

Recommendation: Disable IGMP snooping on all POWERLINK ports. If the switch requires IGMP snooping for other VLANs, place POWERLINK on a separate VLAN with snooping disabled, or use B&R POWERLINK hubs.

Broadcast Domain Sizing

The POWERLINK segment should be sized appropriately:

ParameterRecommended LimitMaximum
Nodes per MN10-20 CNs239 CNs (theoretical)
Nodes per hub chain4-8 devicesLimited by cable length and hub ports
Cable length (total chain)< 100 m per segment100 m per segment (Cat5e/6)
Cycle time with many nodesScale cycle time with node countEach CN adds ~5 µs to isochronous phase

Large POWERLINK networks (>50 nodes) require careful planning: use tree or star topology to reduce cable length per chain, increase cycle time proportionally to node count, consider multiple MNs for very large installations, and use ring topology for redundancy on critical paths.

ANSL Discovery Broadcast

ANSL (Automation NET Service Layer) uses broadcast for device discovery:

ProtocolPortDirectionPurpose
ANSL DiscoveryUDP 11160BroadcastLocates B&R devices on the subnet
ANSL ServiceTCP 11169UnicastDevice information retrieval

ANSL discovery broadcasts from Automation Studio (engineering PC) and from SDM. These broadcasts are limited to the local broadcast domain and do not traverse routers. If the engineering PC and PLC are on different subnets, ANSL discovery will not work — use direct IP connection or configure a DHCP relay. For network scanning:

# Scan for B&R devices using ANSL discovery
nmap -sU -p 11160 192.168.1.0/24 --open

# Check ANSL service on a known PLC
nmap -sT -p 11169 192.168.1.10

Key Findings (Updated)

  1. POWERLINK topology is auto-configuring — star, daisy chain, tree, ring, any combination works without manual setup. The MN (CP1584) automatically discovers and addresses all CNs.

  2. SDM is your first stop for network discovery — the web interface shows every device, its status, firmware version, and connection topology without needing any tools or software.

  3. B&R community tools are invaluable — brsnmp, ListAllBurPLCs, and brwatch give you command-line access to discover and manage B&R devices without Automation Studio.

  4. Physical cable tracing is essential — no software tool can tell you where cables actually run. Get your hands on the cabinet and follow every cable.

  5. POWERLINK and TCP/IP can share the same physical network, but separating them improves performance for critical applications.

  6. Node addressing is automatic for both POWERLINK and X2X — you don’t need to configure addresses manually (unless using specific addressing modes).

  7. POWERLINK requires deterministic switching — avoid standard managed switches with spanning tree or storm control. B&R POWERLINK hubs (X20HB8880) are purpose-built for zero-delay frame forwarding.

  8. Always keep POWERLINK on its own subnet (192.168.100.x) separate from Ethernet/IT traffic (192.168.1.x) to prevent routing conflicts and performance degradation.

  9. Default PLC IP is often 192.168.1.10 — if you can’t find the PLC, try this address. Factory reset restores it.


Cross-References

PLC-to-PLC Communication on B&R Systems: Discovery, Interception, and Reverse Engineering Without Project Files

Overview

You have inherited a machine built by a now-defunct OEM. It has multiple B&R CP1584 PLCs, zero documentation, and no Automation Studio project files. The PLCs are clearly talking to each other — production halts when one goes down, and fault codes propagate across stations — but you have no idea how they communicate or what data they share.

This guide covers every practical method for discovering, tapping into, and understanding inter-PLC communication on B&R Automation systems when you are starting from scratch. It assumes familiarity with basic PLC concepts but no prior B&R-specific knowledge.

Related files in this repository:

FileWhy It Matters Here
opcua.mdOPC-UA is the most accessible inter-PLC protocol; that file covers server config, namespace browsing, and certificate management
powerlink-internals.mdPOWERLINK is B&R’s native deterministic bus; PDO mapping and cycle timing are covered in depth there
network-architecture.mdNetwork topology, device enumeration, and physical layer layout for B&R systems
pvi-api.mdPVI is B&R’s proprietary middleware; the file covers programmatic variable access without project files
x2x-protocol.mdX2X is the backplane bus; relevant if PLCs share I/O through bus couplers

Communication Mechanisms Between B&R PLCs

B&R PLCs can exchange data through at least six distinct mechanisms. On a multi-PLC machine, more than one may be active simultaneously. Your first job is to figure out which ones are in use.

Summary of Inter-PLC Communication Paths

MechanismLatencyDeterministic?Requires Project Config?Discoverable Without Project?
POWERLINK (PDO exchange)0.1–10 msYesYesPartially (Wireshark capture)
POWERLINK CN-to-CN cross-traffic0.1–4 msYesYesPartially (Wireshark capture)
OPC-UA (server/client)10–200 msNoYesYes (browse namespace)
Modbus TCP50–500 msNoYesYes (port scan + sniff)
Ethernet/IP10–100 msNoYesYes (port scan + sniff)
Raw TCP/UDP socketsVariableNoYes (custom code)Yes (port scan)
PVI/INA200010–100 msNoAutomaticYes (port 11160)
CAN / CANopen1–10 msYesYesYes (bus analyzer)
Serial (RS-232/485)VariableNoYes (custom code)Yes (serial sniffer)

POWERLINK is B&R’s native real-time Ethernet protocol. It uses a Managing Node (MN) / Controlled Node (CN) architecture. For PLC-to-PLC communication, one PLC acts as the MN and the others as CNs, or all PLCs operate as CNs with a dedicated MN device.

There are two POWERLINK patterns for inter-PLC data exchange:

  1. MN-mediated exchange: The MN collects data from all CNs and redistributes it. PLC-A sends its data to the MN in its PRes frame, the MN copies relevant data into PLC-B’s PReq, and PLC-B receives it. This is the simplest and most common pattern.

  2. CN-to-CN direct cross-traffic: PRes frames are multicast. PLC-B can directly read PLC-A’s PRes payload without going through the MN. This requires explicit configuration in Automation Studio (both PLCs must be in the same project or referenced together) and the receiving CN must support cross-traffic (B&R iCNs do; third-party CNs may not).

What You’ll See on the Wire

POWERLINK uses ethertype 0x88AB. A typical cycle looks like:

[MN SoC] → [PReq to CN1] → [CN1 PRes] → [PReq to CN2] → [CN2 PRes] → [SoA] → [ASnd...]
  • SoC (Start of Cyclic): MN initiates the isochronous phase
  • PReq (Poll Request): MN polls a specific CN by NodeID
  • PRes (Poll Response): CN responds with its process data (PDOs)
  • SoA (Start of Asynchronous): Opens the async phase
  • ASnd (Asynchronous Send): Non-real-time data (SDO, NMT commands)

Wireshark Capture

# Capture POWERLINK traffic on interface eth0
wireshark -i eth0 -f "ether proto 0x88AB"

# Or use BPF filter
tcpdump -i eth0 -w powerlink.pcap "ether[12:2] = 0x88AB"

Useful Wireshark display filters:

epl.src == 1          # All packets from NodeID 1 (typically the MN)
epl.dest == 3         # All packets addressed to NodeID 3
epl.type == 0x0001    # SoC frames only
epl.type == 0x0013    # PReq frames only
epl.type == 0x0014    # PRes frames only
epl.type == 0x0016    # SoA frames only
epl.type == 0x0017    # ASnd frames only
  1. Connect a PC to the POWERLINK network (any tap point works — see physical-layer-sniffing.md for methods)
  2. Capture traffic for 5–10 seconds
  3. In Wireshark, look at the epl.src and epl.dest fields
  4. NodeID 0 is broadcast, NodeID 240 (0xF0) is the MN by convention
  5. Other NodeIDs (1–239) are CNs — each is a PLC or drive

Understanding the PDO Payload

The PRes frame payload contains the mapped process data objects (PDOs). Without the project file, you won’t know the data layout, but you can:

  • Count the payload bytes in each PRes frame to determine the data width per CN
  • Create a custom column in Wireshark: right-click a PRes payload field → “Apply as Column” → rename to “PRes-Payload”
  • Watch for patterns: If a payload has a section that changes only when a specific physical event occurs (e.g., a conveyor starts), you can correlate it

For detailed PDO mapping internals, see powerlink-internals.md Section 8.

Determining MN vs CN Role for Each PLC

  • The MN sends SoC, PReq, and SoA frames. It never sends PRes.
  • CNs only send PRes and ASnd frames.
  • If you see a PLC sending SoC frames, it is the MN.
  • If PLCs are using an X20ET8819 network analysis module or similar dedicated MN hardware, none of the PLCs will be the MN.

Method 2: OPC-UA Server/Client Communication

OPC-UA How It Works

OPC-UA is the most “modern” and most accessible inter-PLC mechanism. One PLC runs an OPC-UA server (exposing its variables), and other PLCs run OPC-UA client components (OpcUa_Any hardware object in Automation Studio) that subscribe to those variables.

B&R supports both:

  • Configuration-only OPC-UA (no code required): Using the OpcUa_Any hardware object in Physical View
  • Code-based OPC-UA: Using AsOpcUac library or the community EasyUaClnt wrapper for complex types (strings, structs, methods)

Discovering OPC-UA Communication

This is the one mechanism you can fully discover without any project files:

Step 1: Find the servers

# Scan for OPC-UA discovery servers on the control network
nmap -p 4840 --open 192.168.1.0/24

# Or use opcua-commander if available
# python3 -m opcua  opc.tcp://192.168.1.50:4840

The default OPC-UA port is 4840. If a PLC has OPC-UA enabled, it will respond.

Step 2: Browse the namespace with UAExpert

  1. Download UAExpert (Unified Automation) — free client
  2. Add a new server: opc.tcp://<PLC-IP>:4840
  3. If security is configured, you may need certificates. Try “None” security first.
  4. Browse the address space tree

B&R OPC-UA namespace structure:

Objects
└── PLC
    ├── Modules
    │   ├── Default
    │   │   ├── <TaskName>
    │   │   │   ├── Variable1 (BOOL)
    │   │   │   ├── Variable2 (REAL)
    │   │   │   └── Variable3 (DINT)
    │   │   └── <OtherTask>
    │   └── Global PV
    │       ├── gVar1 (USINT)
    │       └── gVar2 (BOOL)
    └── Server
        └── (diagnostic info)

Step 3: Identify inter-PLC variables

Look for variables whose names suggest inter-PLC data exchange. Common naming patterns from OEMs:

  • StationX_... / CellX_... — station/cell identifiers
  • From_PLC1_... / To_PLC1_...
  • Handshake_... / HS_...
  • Command_... / Status_...
  • Interlock_... / Safety_...
  • Recipe_... / Setpoint_...
  • Heartbeat_... / Watchdog_...

Step 4: Monitor values in real-time

In UAExpert, subscribe to suspected inter-PLC variables. Watch how they change when you:

  • Cycle the machine through different states
  • Trigger faults on one station
  • Change recipes or product types

Critical Limitation: Variables Must Be Explicitly Enabled

OPC-UA does not automatically expose all variables. Each variable must be explicitly marked as an OPC-UA tag by the OEM in the OpcUaMap configuration. If the OEM didn’t enable a variable, it won’t appear in the namespace — even if it exists in the running PLC program. See opcua.md for details on the enable/disable mechanism.

OPC-UA Browse Path Syntax (B&R to B&R)

When configuring a B&R OPC-UA client to connect to a B&R OPC-UA server, the browse path syntax is:

# Local variables (inside a specific task):
/0:Root/0:Objects/4:PLC/6:Modules/6:&:&:/6:/6:

# Global variables (PV scope):
/0:Root/0:Objects/4:PLC/6:Modules/6:&:&:/6:Global PV/6:

If the server uses Information Models (PV 2.00), replace 6:Modules with 4:Modules.

Checking if a PLC Is an OPC-UA Client

You cannot directly determine from outside whether a PLC is running an OPC-UA client. Indirect evidence:

  • Port scan shows TCP connections to port 4840 on other PLCs
  • The PLC has an OpcUa_Any object in its configuration (requires project file to confirm)
  • OPC-UA server logs on the target PLC show active sessions from the suspect PLC’s IP

Method 3: Modbus TCP

Modbus TCP How It Works

Modbus TCP is widely supported on B&R SG4 controllers via the AsMbTCP (master) and AsMbTCPS (slave) libraries. It runs on standard Ethernet (not POWERLINK). Any PLC with an Ethernet port can act as a Modbus master or slave.

Discovering Modbus TCP

# Modbus TCP uses TCP port 502 by default
nmap -p 502 --open 192.168.1.0/24

# Attempt to read holding registers from a suspected slave
# (requires modbus client tool like mbpoll or pymodbus)
mbpoll -m tcp -t 3 -1 192.168.1.50

# Scan a range of register addresses
pymodbus.console -m tcp --host 192.168.1.50 --port 502
> client.read_holding_registers(0, 100)
> client.read_input_registers(0, 100)
> client.read_coils(0, 100)
> client.read_discrete_inputs(0, 100)

Identifying Register Maps

Without the project, you’ll need to brute-force the register space:

import modbus_tk.modbus_tcp as modbus_tcp
import modbus_tk.defines as defines

master = modbus_tcp.TcpMaster(host='192.168.1.50', port=502)
master.set_timeout(5.0)

# Scan holding registers in blocks
for base in range(0, 10000, 100):
    try:
        result = master.execute(1, defines.READ_HOLDING_REGISTERS, base, 100)
        if any(v != 0 for v in result):
            print(f"Active registers at {base}: {result}")
    except:
        pass

Watch which registers change when you manipulate different parts of the machine.


Method 4: Ethernet/IP (CIP)

Ethernet/IP How It Works

B&R controllers support EtherNet/IP via the AsEthIP library. This is common when integrating with Rockwell/Allen-Bradley equipment, but B&R-to-B&R communication over EIP is also possible.

Discovering EtherNet/IP

# EIP discovery uses TCP port 44818 and UDP port 44818
nmap -p 44818 -sU -sS --open 192.168.1.0/24

# EIP explicit messaging uses TCP 44818
nmap -p 44818 --open 192.168.1.0/24

Method 5: PVI/INA2000 (Legacy Proprietary)

PVI/INA2000 How It Works

PVI (Process Visualization Interface) is B&R’s proprietary middleware. The INA2000 protocol runs on TCP port 11160 by default. Every B&R controller running Automation Runtime has a PVIServer that responds to INA2000 connections.

This is not typically used for PLC-to-PLC data exchange in production, but it IS used for:

  • HMI panels connecting to PLCs
  • SCADA systems via the PVI OPC bridge
  • Automation Studio online connections

Discovering PVI/INA2000

# Scan for INA2000/PVI servers
nmap -p 11160 --open 192.168.1.0/24

If a PLC responds on port 11160, you can connect using:

  • Automation Studio (Connection → Set Target)
  • PVI Browser (part of PVI installation)
  • Custom PVI client (see pvi-api.md)

Browsing Variables via PVI

Using the PVI API from a PC, you can enumerate variables on a running PLC without project files:

# Pseudo-code using PVI .NET API
# See pvi-api.md for full examples
line = PviConnection("TCP", "192.168.1.50", 11160)
cpu = line.CPU("PLC")
variables = cpu.Variables.Browse()  # Lists all PV variables
for v in variables:
    print(f"{v.Name}: {v.Read()}")

For complete PVI reference, see pvi-api.md.


Method 6: Raw TCP/UDP Sockets

Raw TCP/UDP How It Works

OEMs sometimes implement custom inter-PLC communication using B&R’s AsTcp library (part of the AsEth family). This gives complete flexibility but is the hardest to reverse-engineer because there is no standard protocol — the data format is entirely up to the programmer.

Discovering Custom TCP Communication

# Comprehensive TCP port scan
nmap -sS -p- --open 192.168.1.0/24

# After identifying open ports, capture traffic:
tcpdump -i eth0 -w custom-tcp.pcap "host 192.168.1.50 and host 192.168.1.51"

Analyzing Custom Protocols

  1. Capture traffic while the machine runs through different states
  2. Look for periodic traffic with consistent message sizes (likely cyclic data exchange)
  3. Look for request/response patterns (likely command/status)
  4. Check if payloads are ASCII (text-based protocol) or binary
  5. Correlate payload changes with physical machine events

Common patterns you might encounter:

  • Fixed-size binary frames with a header byte, data payload, and checksum
  • ASCII-based protocols using delimiter characters (CR/LF, semicolons)
  • Length-prefixed messages with a 2-byte or 4-byte length header

Step-by-Step Discovery Procedure

When you are starting with zero knowledge, follow this systematic approach:

Phase 1: Physical Network Mapping

  1. Trace cables from each PLC’s Ethernet ports (IF1, IF2, IF3)
    • IF1 / IF2: Standard Ethernet (TCP/IP, OPC-UA, Modbus, etc.)
    • IF3: POWERLINK (or configurable as Ethernet)
  2. Note which PLCs share switches/hubs
  3. Draw a physical topology map showing every PLC, switch, and cable

See network-architecture.md for detailed enumeration procedures.

Phase 2: Network Scanning

# Discover all B&R devices on the network
# B&R controllers respond to SNMP on UDP port 161 (if enabled)
nmap -sU -p 161 --open 192.168.1.0/24

# Scan for all common B&R service ports
nmap -p 80,443,11160,4840,502,44818,4000-4100 --open 192.168.1.0/24
PortServiceIndicates
80/443SDM web interfaceAutomation Runtime web server
11160PVI/INA2000PVIServer — always present on AR
4840OPC-UAOPC-UA server enabled in project
502Modbus TCPModbus slave configured
44818EtherNet/IPEIP communication active
4000-4100Custom TCPAsTcp socket servers

Phase 3: Protocol Identification

For each pair of PLCs that you suspect communicate:

# Monitor all traffic between two specific PLCs
tcpdump -i eth0 -w plc-pair.pcap "host 192.168.1.50 and host 192.168.1.51"

# Run for 60 seconds during normal operation, then review in Wireshark

In Wireshark, check:

  • Ethertype 0x88AB → POWERLINK traffic (if on shared PLK segment)
  • TCP to port 4840 → OPC-UA
  • TCP to port 502 → Modbus TCP
  • TCP to port 11160 → PVI/INA2000
  • TCP to other ports → Custom socket communication
  • UDP traffic → Could be POWERLINK async or custom UDP

If POWERLINK is present:

# Capture POWERLINK frames
tcpdump -i eth0 -w powerlink-dump.pcap "ether proto 0x88AB"

In Wireshark:

  1. Identify the MN: Look for SoC frames (type 0x0001). The source is the MN.
  2. List all CNs: Every unique NodeID in PRes frames is a CN (PLC or drive).
  3. Map the cycle: Sort by time to see the polling sequence.
  4. Extract PRes payloads: Create a custom column for the payload data.
  5. Identify which CNs are PLCs vs drives: Drives typically have larger payloads with motion-related data patterns.

Phase 5: OPC-UA Namespace Mining

For each PLC with port 4840 open:

  1. Connect UAExpert to opc.tcp://<IP>:4840
  2. Browse the full namespace tree
  3. Export the variable list (UAExpert: File → Export → CSV)
  4. Compare exported lists between PLCs — overlapping variable names suggest shared data
  5. Subscribe to variables and monitor value changes during machine operation
  6. Document every variable with: name, data type, observed value range, what machine event changes it

Identifying What Data Is Being Shared

Once you know how the PLCs communicate, you need to figure out what they’re exchanging. This is the hardest part without documentation.

Approach 1: OPC-UA Variable Mining (Best Case)

If OPC-UA is enabled and the OEM exposed inter-PLC variables, this is straightforward:

  1. Export the full namespace from each PLC
  2. Sort variables by name patterns
  3. Create a correlation matrix
PLC-1 Variable          PLC-2 Variable           Relationship
------------------      ------------------        -----------
Station1_Ready          Station2_StartReq         Handshake
Conv1_Speed_Setpoint    Conv1_Speed_Actual        Setpoint/Feedback
Heartbeat_Timer         Heartbeat_Watchdog        Liveness check
Recipe_Number           Recipe_Active             Recipe propagation

Without OPC-UA visibility into the mapped variables:

  1. Capture POWERLINK traffic during a controlled test sequence
  2. Force specific machine states one at a time
  3. For each state, compare PRes payloads to identify which bytes change
  4. Build a byte-level map of each CN’s payload

Practical procedure:

Test Sequence:
1. Machine idle (all stations stopped)
2. Station 1 running alone
3. Station 2 running alone
4. Both stations running
5. Fault on Station 1
6. Fault on Station 2
7. E-stop
8. Recipe change

For each test: capture 10 seconds of PRes data
Compare payloads between tests to isolate station-specific data regions

Approach 3: TCP Payload Pattern Analysis

For Modbus TCP or custom socket communication:

  1. Capture all traffic between PLC pairs during a full production cycle
  2. Use Wireshark’s “Follow TCP Stream” feature
  3. Look for repeating patterns in payload data
  4. Try common industrial data encoding:
    • Big-endian or little-endian 16/32-bit integers
    • IEEE 754 floating point
    • BCD-encoded values
    • Packed bits (bit 0 = status1, bit 1 = status2, etc.)

Approach 4: SDM Web Interface (Limited)

B&R’s SDM (Service and Diagnosis Management) web interface (port 80/443) provides:

  • System Overview: Running tasks, CPU load, memory usage
  • I/O Status: Digital and analog I/O states
  • POWERLINK status: Node states, error counters
  • File browser: CF card contents (can reveal configuration files)

Access via: http://<PLC-IP> in a web browser.

Configuration files on the CF card that may contain communication setup:

/System/
  OpcUa.Config.xml          # OPC-UA server configuration
  PLC_Configuration.xml    # Hardware and software configuration
  AR_Config.xml            # Runtime configuration
  /Powerlink/
    mn_config.xml          # MN configuration with node list
    cn_config.xml          # CN configuration

Approach 5: Firmware Object Dictionary SDO Read

If you can access a PLC via SDO (Service Data Object) over POWERLINK or CANopen, you can read the object dictionary to discover communication parameters:

  • Object 0x1A000x1AFF: TPDO (Transmit PDO) mapping — what this node sends
  • Object 0x16000x16FF: RPDO (Receive PDO) mapping — what this node receives
  • Object 0x14000x14FF: TPDO communication parameters — timing and destination
  • Object 0x14000x14FF: RPDO communication parameters

SDO access is available through:

  • Automation Studio’s “Object Configurator” online mode
  • B&R PVI API with POWERLINK line
  • Custom tools using the POWERLINK SDO protocol

Building an Inter-PLC Communication Map

After completing discovery, document your findings in a structured format:

Template

INTER-PLC COMMUNICATION MAP
Machine: [Machine Name]
Date: [Date]
Engineer: [Your Name]

=== PLC INVENTORY ===
PLC-1: X20CP1584 @ 192.168.1.50, NodeID=240 (MN), Role: Main Controller
PLC-2: X20CP1584 @ 192.168.1.51, NodeID=1 (CN), Role: Station 2 Controller
PLC-3: X20CP1584 @ 192.168.1.52, NodeID=2 (CN), Role: Station 3 Controller

=== COMMUNICATION CHANNELS ===
Channel 1: PLC-1 ↔ PLC-2
  Protocol: POWERLINK (MN-mediated)
  Direction: Bidirectional
  Cycle: 2 ms
  Data: [Describe payload bytes and what they mean]
  Payload size: 64 bytes TX / 64 bytes RX

Channel 2: PLC-1 ↔ PLC-3
  Protocol: OPC-UA (PLC-1 server, PLC-3 client)
  Endpoint: opc.tcp://192.168.1.50:4840
  Variables:
    - PLC-1.gConv_Speed_Setpoint → PLC-3.localConvSpeed (REAL, 100ms)
    - PLC-3.gStation_Status → PLC-1.gStation3Status (UDINT, 50ms)

Channel 3: PLC-2 ↔ PLC-3
  Protocol: Modbus TCP (PLC-2 master, PLC-3 slave)
  Port: 502
  Registers:
    - Holding Register 0-9: PLC-2 → PLC-3 (command/status)
    - Holding Register 100-109: PLC-3 → PLC-2 (feedback)

Tapping Into Existing Communication (Read-Only)

Monitoring Without Disruption

The safest approach to understanding inter-PLC data is passive monitoring:

POWERLINK:

  • Use a hub (not a switch) to tap into the POWERLINK segment — hubs broadcast all frames to all ports
  • Or use a managed switch with port mirroring (SPAN) configured
  • The B&R X20ET8819 network analysis tool provides hardware-timestamped captures with nanosecond accuracy
  • Important: POWERLINK V1 used half-duplex, but POWERLINK V2 (the version supported by CP1584) uses full-duplex. When monitoring a V2 segment, set your NIC to auto-negotiate or 100 Mbit/s full-duplex. Only use half-duplex if you know the segment is running V1 (rare on CP1584 systems). See network-architecture.md for details.
  • Recommended NIC settings: 100 Mbit/s, auto-negotiate (or full-duplex for V2), auto-crossover

OPC-UA:

  • Connect UAExpert as an additional client — OPC-UA servers support multiple simultaneous sessions
  • Set a high sampling interval (1000 ms) to minimize server load
  • Never write to a variable you don’t understand

Modbus TCP:

  • Capture traffic with tcpdump — Modbus requests and responses are plaintext
  • Use a protocol-aware switch to mirror traffic without disrupting timing

Custom TCP:

  • tcpdump with full payload capture: tcpdump -i eth0 -s 0 -w full-capture.pcap

Adding Your Own Monitoring Point

If you need ongoing visibility, consider adding a sniffer PLC or OPC-UA aggregation point:

Option A: OPC-UA Client on a Raspberry Pi

import asyncio
from asyncua import Client

servers = [
    "opc.tcp://192.168.1.50:4840",
    "opc.tcp://192.168.1.51:4840",
    "opc.tcp://192.168.1.52:4840",
]

async def browse_plc(server_url):
    async with Client(url=server_url) as client:
        root = client.get_root_node()
        children = await root.get_children()
        for child in children:
            print(f"  {await child.get_browse_name()}")

async def main():
    for url in servers:
        try:
            await browse_plc(url)
        except Exception as e:
            print(f"Failed to connect to {url}: {e}")

asyncio.run(main())

Option B: Wireshark + tshark Continuous Capture

# Capture all inter-PLC traffic to PCAP files with rotation
tshark -i eth0 -w /captures/inter-plc-%H%M%S.pcap \
       -f "ether proto 0x88AB or port 4840 or port 502" \
       -b duration:300 -b files:10

Common Inter-PLC Data Patterns on B&R Machines

Based on common OEM practices, these are the data types you are likely to find being exchanged:

Handshake Protocols

The most common pattern is a four-signal handshake between stations:

Station A sends:          Station B responds:
  Command_Ready ──────►    Status_Ready
  Command_Go    ──────►    Status_Busy
                           Status_Done  ──►  (Station A reads this)
  Command_Ack   ──────►    

Implemented as:

  • POWERLINK: 4 BOOLs in the PDO payload
  • OPC-UA: 4 BOOL variables
  • Modbus: 4 coils or 2 registers (packed BOOLs)

Heartbeat/Watchdog

Almost every multi-PLC machine has a heartbeat:

  • One PLC increments a counter every N ms
  • Other PLCs check that the counter changes within a timeout
  • If the counter stops changing, the watching PLC triggers a fault

Look for variables named: Heartbeat, HB, LifeCounter, Watchdog, CommOK

Recipe/Setpoint Distribution

One “master” PLC distributes recipe parameters to “slave” PLCs:

  • Recipe number or name
  • Process setpoints (temperature, speed, pressure targets)
  • Product type selectors
  • Batch identifiers

Safety Interlock Signals

Critical safety signals between PLCs:

  • E-stop propagation (one E-stop stops all stations)
  • Safety gate status sharing
  • Light curtain acknowledgment
  • Guard locking status

These may run on a separate safety PLC or through openSAFETY over POWERLINK. See safe-io-diagnostics.md for safety-specific considerations.


Reconstructing Project-Level Configuration

Using Automation Studio Online Mode

If you can get Automation Studio connected to a running PLC (see cp1584-forensics.md):

  1. Connection → Set Target → Enter PLC IP
  2. The physical view populates with the hardware tree from the running configuration
  3. Logical View shows task names, program names, and library references
  4. Variable Overview shows all PV variables with their types and current values
  5. Hardware Configuration shows POWERLINK node list, PDO mappings, and module configuration

This is the single most valuable step for understanding inter-PLC communication. Even without the project source code, the online view reveals the entire hardware and communication configuration.

Extracting Configuration from the CF Card

If you can access the CF card (via SDM file browser, FTP, or physical card reader):

Key files to examine:

/System/PLC_Configuration.xml    # Full hardware tree
/System/AR_Config.xml             # Runtime config with task list
/System/OpcUa.Config.xml         # OPC-UA server config with variable list
/System/Powerlink/mn_config.xml   # POWERLINK MN node list and PDO map
/System/Powerlink/cn_config.xml   # POWERLINK CN parameters

The PLC_Configuration.xml file contains the entire physical and logical hardware tree, including all communication interfaces and their configuration. This is the closest thing to having the project file.


Troubleshooting Inter-PLC Communication Failures

Symptom: One PLC Shows “Communication Lost” Fault

Diagnostic steps:

  1. Check physical connectivity (link LEDs on Ethernet ports)
  2. Ping from the faulting PLC to its communication partner
  3. Check POWERLINK node state in SDM (System Diagnosis → POWERLINK)
  4. If POWERLINK: check if the faulted CN is in OPERATIONAL state
  5. If OPC-UA: check if the ModuleOk flag is TRUE in the client PLC’s I/O mapping
  6. If Modbus: check for timeout errors in the master PLC’s diagnostic variables

Symptom: Intermittent Data Corruption

  1. Capture POWERLINK traffic and look for timing violations (SoC-to-SoC jitter)
  2. Check for cyclic redundancy errors in the POWERLINK diagnostic counters
  3. Verify cable lengths and termination
  4. Check for electromagnetic interference sources near POWERLINK cables
  5. Look for duplicate NodeIDs on the POWERLINK segment

Symptom: All PLCs Go Down Simultaneously

  1. The MN has likely failed — no MN means no POWERLINK communication
  2. Check if the MN PLC is running (power LED, run/fault LED)
  3. If the MN is running but POWERLINK is down, check the IF3 port link status
  4. Consider whether a POWERLINK ring redundancy failover has occurred

Symptom: New PLC Replacement Won’t Communicate

  1. Verify the replacement PLC has the correct firmware version (AR version)
  2. Check NodeID configuration — must match the original
  3. The MN needs to recognize the new CN’s device description
  4. If using cross-traffic configuration, the project on the MN must reference the new CN
  5. Without the project, you may need to reconfigure the MN (see project-reconstruction.md)

Key Findings

  1. POWERLINK is the most likely inter-PLC mechanism on B&R machines. Check for ethertype 0x88AB first. The MN-mediated exchange pattern is standard; CN-to-CN cross-traffic requires explicit project configuration.

  2. OPC-UA is the most accessible discovery path when you have no project files. Port 4840, browse with UAExpert. Variable names alone tell you what data is shared — if the OEM exposed them.

  3. PVI/INA2000 (port 11160) is always available on running B&R controllers and provides variable enumeration via the PVI API, even without project files.

  4. Wireshark is your primary discovery tool for POWERLINK and custom TCP communication. The B&R POWERLINK dissector provides full protocol decoding including NodeID, frame type, and payload.

  5. Variable naming conventions reveal purpose. OEMs typically use prefixes like Station_, Cell_, From_, To_, HS_ (handshake), HB_ (heartbeat) for inter-PLC variables.

  6. Four-signal handshakes are the dominant pattern for inter-PLC coordination: Ready/Go/Done/Ack or equivalent BOOL exchanges.

  7. The heartbeat/watchdog pattern is nearly universal in multi-PLC machines — one PLC increments a counter that others monitor for liveness.

  8. Automation Studio online mode reveals the full hardware configuration of a running PLC, including POWERLINK node lists and PDO mappings — connect before anything else if you can get AS.

  9. CF card configuration files (especially PLC_Configuration.xml and OpcUa.Config.xml) contain the entire communication setup. Access these via SDM, FTP, or physical card reader.

  10. You cannot discover cross-traffic or custom TCP socket communication from outside — only through traffic capture and pattern analysis. These require the most effort to reverse-engineer.

  11. Modbus TCP and EtherNet/IP are easy to discover via port scanning but hard to fully map without brute-forcing register spaces or CIP object models.

  12. The SDM web interface (port 80/443) provides POWERLINK diagnostic status, I/O states, and file browser access — use it before reaching for Wireshark.


Sources

  • B&R POWERLINK Communication Profile Specification (EPSG)
  • B&R Automation Studio Online Help — POWERLINK configuration, OPC-UA server, and PVI settings
  • B&R OPC-UA Server Configuration Guide — namespace, security, and endpoint configuration
  • B&R PVI (Process Visualization Interface) Reference — variable enumeration and data exchange
  • openPOWERLINK Wireshark Dissector Documentation — protocol decoding reference
  • Wireshark Protocol Reference — ethertype 0x88AB (POWERLINK) filtering and analysis
  • B&R Community Forum (community.br-automation.com) — inter-PLC communication discussions

SNMP, MQTT, and IIoT Retrofits for Legacy B&R CP1584 Systems

Overview

This document covers how to add modern monitoring protocols (SNMP, MQTT, OPC-UA to MQTT bridging, time-series data logging, and dashboard visualization) to aging B&R X20CP1584 PLCs on machines built by defunct OEMs with zero documentation. The CP1584 is an Intel Atom 0.6 GHz CPU with 256 MB DDR2 RAM, 1 MB SRAM, CompactFlash storage, two independent network interfaces (IF2 = Ethernet 10/100/1000BASE-T, IF3 = POWERLINK V1/V2), and one X20 interface module slot. Its hardware constraints – limited RAM, CF card storage – shape every retrofit decision. See network-architecture.md for the full network interface details.

The goal is to achieve remote visibility into machines never designed for it, without touching the running PLC program, without the original Automation Studio project, and without vendor support.

AS6 / PVI 6.x Compatibility Note

If you are setting up your engineering workstation fresh, note that Automation Studio 6 ships PVI 6.x, which drops support for the legacy INA2000 protocol entirely. Only ANSL and SNMP lines remain. Since most IIoT retrofits in this document use OPC-UA or SNMP (not INA2000), this mainly affects PVI-based diagnostic scripts. Ensure any external tools connecting via PVI use ANSL, not INA2000. See pvi-api.md §2 and firmware-version-mgmt.md §5.3.1 for details.

DocumentRelevance
opcua.mdOPC-UA server configuration, namespace layout, certificate management
custom-diagnostic-tools.mdBuilding C/C++ tools that run ON the PLC – data loggers, custom monitors
python-diagnostics.mdPython-based diagnostics from external PC — OPC-UA and PVI scripts
ftp-web-interface.mdFTP and web interface access to CF card and SDM
cf-card-boot.mdCF card boot process, firmware, and runtime system details
pvi-api.mdPVI (Process Visualization Interface) for external programmatic access
diagnostics-sdm.mdSystem Diagnostics Manager built into Automation Runtime
cp1584-forensics.mdForensic analysis techniques for undocumented CP1584 systems

The Retrofit Problem: Why These Machines Are Hard

Machines built by defunct OEMs share common characteristics that make IIoT retrofits non-trivial:

  1. No Automation Studio project: The compiled binary runs on the CF card but there is no source code. You cannot modify the PLC program.
  2. OPC-UA tags not enabled: Even if the OPC-UA server is running, each variable must be explicitly enabled as a tag. On machines where the OEM never intended remote monitoring, zero variables are exposed. See opcua.md for the full explanation of this limitation.
  3. No network architecture documentation: IP addresses, VLANs, firewall rules – all unknown.
  4. Single Ethernet port: The CP1584 has only one RJ45 interface (IF2). POWERLINK (IF3) is a separate RJ45 but runs a different protocol. Adding a second network path requires an interface module (X20IF10xx series) in the single expansion slot.
  5. CF card storage is limited: Logging must be carefully budgeted. Write wear on CF cards is a real concern.
  6. CPU load budget: At 0.6 GHz with 256 MB RAM, adding a data pipeline on the PLC itself is feasible only if it is lightweight.

Retrofit Constraints Summary

ResourceCP1584 CapabilityRetrofit Impact
CPUAtom 0.6 GHzMQTT client on-PLC is feasible but budget cycles carefully
RAM256 MB DDR2, 1 MB SRAMOPC-UA server + MQTT client simultaneously possible on AR 4.x
StorageCompactFlash (512 MB - 8 GB SLC)Rotate log files aggressively; avoid FAT fragmentation
Network1x Ethernet + 1x POWERLINKGateway/Bridge approach keeps traffic off PLC
Expansion1 slot for interface moduleAdd a second Ethernet module if network segmentation needed

Protocol Stack Overview

Where Each Protocol Fits

   Cloud / MES / Dashboard
          |
      MQTT Broker          <-- Lightweight pub/sub, fan-out to N consumers
          |
    OPC-UA to MQTT        <-- Bridge/gateway layer
    Bridge (Gateway)
          |
      OPC-UA Server       <-- Built into B&R Automation Runtime
          |
      B&R X20CP1584       <-- PLC running the machine program
  • SNMP: Used for infrastructure-level monitoring (CPU temperature, battery status, network interface state, IP configuration). Read-only, poll-based. Does NOT access process variables.
  • OPC-UA: The native B&R protocol for structured access to PLC process variables. Requires variables to be explicitly enabled as tags.
  • MQTT: The IIoT distribution protocol. Lightweight, pub/sub, supports QoS levels, works over constrained networks. The CP1584 can run an MQTT client directly via the paho.mqtt.c-ar library.
  • Gateway/Bridge pattern: For machines where you cannot modify the PLC program, an edge gateway (small PC, Raspberry Pi, or Docker container) sits between the PLC’s OPC-UA server and the MQTT broker.

SNMP Monitoring on B&R Systems

B&R SNMP Architecture

B&R PLCs expose a PVI-SNMP agent that provides infrastructure-level data. This is NOT the same as an OPC-UA server – SNMP cannot read process variables. What it CAN read:

Data CategoryExamples
Device identificationModel name, serial number, MAC address, firmware version
Network configurationIP address, subnet mask, gateway, DNS, hostname
POWERLINK statusNode number, MN/CN role, INA settings
Runtime stateAR version, AR state, boot phase, process control state
Interface propertiesDevice name, baudrate, port numbers

Enabling SNMP Discovery

SNMP is active on B&R PLCs by default for PVI communication. The community string for PVI-SNMP is typically public (B&R-specific implementation, not standard SNMPv2c security).

Using brsnmp – Open-Source PVI-SNMP Tool

The brsnmp tool (https://github.com/hilch/brsnmp) is a free Windows utility that wraps PVI-SNMP commands for B&R PLCs. It does not require Automation Studio.

Installation: Requires PVI 4.x Development Setup. Download binary from the GitHub releases.

Basic discovery:

brsnmp --list

Returns JSON array of MAC addresses for all reachable B&R PLCs on the network.

Detailed inventory:

brsnmp --details

Returns JSON with full properties for each PLC:

{
  "targetTypeDescription": "X20CP1584",
  "serialNumber": "D45B0168612",
  "cfSerialNumber": "000060076643A1000085",
  "arVersion": "B04.45",
  "arVersionNorm": "04.45.2",
  "arState": "4",
  "arBootPhase": "40",
  "macAddress": "00-60-65-16-fd-da",
  "ipAddress": "192.168.0.14",
  "subnetMask": "255.255.255.0",
  "hostName": "br-automation",
  "deviceName": "IF2",
  "snmpMode": "2",
  "processCtrlState": "65535"
}

Filtering to a specific PLC:

brsnmp --filter=X20CP1584 --details
brsnmp --filter=macAddress.+00-60-65-3a-39-10 --details

Setting IP address remotely (CPU must be in BOOT or SERVICE state):

brsnmp --filter=macAddress.+00-60-65-3a-39-10 --ipAddress=192.168.1.50 --subnetMask=255.255.255.0

Critical warning: Always use --filter when writing parameters. Without a filter, brsnmp targets ALL reachable PLCs.

B&R ADI SNMP Agent

B&R also provides a formal ADI SNMP Agent (download: 1SWHMADS from br-automation.com) that runs on B&R PC-based panels and controllers (Automation Panel 800, Power Panel, etc.). This is separate from the PVI-SNMP agent used by brsnmp. The ADI SNMP Agent provides:

  • Temperature readings from B&R PC hardware
  • Device information and health status
  • Standard MIB-II support plus B&R enterprise MIB

The ADI SNMP Agent is designed for Windows-based B&R panels and may not run directly on the CP1584’s Automation Runtime. It is relevant if you have a B&R panel HMI alongside the CP1584.

SNMP for Infrastructure Monitoring (Non-B&R Specific)

Standard SNMP monitoring of the CP1584 Ethernet interface can be done with any SNMP manager (PRTG, Zabbix, Observium, LibreNMS) using standard MIB-II OIDs:

OIDDescription
1.3.6.1.2.1.1.1sysDescr (system description)
1.3.6.1.2.1.1.3sysUpTime (uptime)
1.3.6.1.2.1.2.1ifNumber (interface count)
1.3.6.1.2.1.2.2.1.1ifIndex
1.3.6.1.2.1.2.2.1.5ifSpeed
1.3.6.1.2.1.2.2.1.6ifPhysAddress (MAC)
1.3.6.1.2.1.2.2.1.8ifOperStatus (up/down)
1.3.6.1.2.1.2.2.1.10ifInOctets
1.3.6.1.2.1.2.2.1.16ifOutOctets

Step-by-Step: SNMP Infrastructure Setup

  1. Discover the PLC on the network using brsnmp:

    brsnmp --list
    brsnmp --filter=X20CP1584 --details > cp1584_inventory.json
    
  2. Record all discovered parameters (IP, MAC, AR version, serial number) for your asset database.

  3. Set up SNMP polling with Telegraf (see Section on Time-Series Pipeline) pointing at the PLC’s IP address using standard MIB-II OIDs.

  4. Add B&R-specific checks: Use brsnmp in a scheduled script (Windows Task Scheduler or cron on WSL) to poll arState and processCtrlState for runtime health.

  5. Set up alerting: When arState changes from normal (4 = RUN) to SERVICE (2) or ERROR, trigger an alert.


MQTT on the B&R CP1584 (On-PLC Approach)

paho.mqtt.c-ar: B&R Community MQTT Library

The B&R community maintains a port of the Eclipse Paho MQTT C client for Automation Runtime, available at: https://github.com/br-automation-community/paho.mqtt.c-ar

What it provides:

  • IotMqtt – Function Block (FUB) library for IEC programs. This is the recommended interface. Supports Publish, Subscribe, RegParPublish, RegParSubscribe.
  • PahoMQTT – Static C library for direct API access. Use only for special cases.

Runtime compatibility (built versions available):

  • A4.73, C4.63, D4.53, N4.34, M4.26, H3.10 (Intel and ARM)

Key characteristics:

  • Based on OpenSSL 1.1.1g and paho.mqtt.c 1.3.8 (rev.05)
  • Supports MQTT v3.1.1 and v5.0 (rev.05 added LastWillDelayInterval, SessionExpiryInterval, CleanStart)
  • Supports TLS/SSL with certificates
  • Supports WebSocket transport
  • Up to 50 Publish/Subscribe FUBs per client
  • Multiple simultaneous connections supported (MQTTAsync-based)
  • QoS 0, 1, and 2
  • Offline message buffering (publishes stored internally until connection established)
  • JSON serialization of PLC structures via IotMqttRegParPublish/Subscribe

Critical Limitation: Requires Automation Studio Project

The paho.mqtt.c-ar library must be compiled into the PLC program using Automation Studio. You cannot deploy it to a running PLC without source code. This means:

  • If you HAVE the Automation Studio project: Add IotMqtt to your program, configure broker connection, publish your variables.
  • If you DO NOT have the project: You CANNOT add MQTT to the PLC itself. Use the edge gateway approach (Section “OPC-UA to MQTT Bridge”) instead.

Code Examples

Minimal Publish (IEC ST)

PROGRAM _CYCLIC
    IotMqttParameters.ServerUri     := 'broker.hivemq.com';
    IotMqttParameters.Port          := 1883;
    IotMqttParameters.ClientID      := 'BR_CP1584_Machine01';

    IotMqttClient_0.Enable          := TRUE;
    IotMqttClient_0.Connect         := TRUE;
    IotMqttClient_0.IotMqttLink     := ADR(IotMqttLink);
    IotMqttClient_0.Parameters      := IotMqttParameters;
    IotMqttClient_0();

    PublishMessage                  := 'Machine01: running';
    IotMqttPublish_0.Enable         := TRUE;
    IotMqttPublish_0.IotMqttLink    := IotMqttClient_0.IotMqttLink;
    IotMqttPublish_0.Topic          := ADR('factory/line1/machine01/status');
    IotMqttPublish_0.Buffer         := ADR(PublishMessage);
    IotMqttPublish_0.BufferLength   := brsstrlen(ADR(PublishMessage));
    IotMqttPublish_0();
END_PROGRAM

JSON Structure Publishing (RegParPublish)

The IotMqttRegParPublish FUB serializes an entire PLC structure to JSON and publishes it on a configurable trigger (on change, on interval, or on trigger event):

PROGRAM _CYCLIC
    IotMqttParameters.ServerUri             := '192.168.1.100';
    IotMqttParameters.Port                  := 1883;
    IotMqttParameters.ClientID              := 'BR_CP1584_Machine01';

    IotMqttClient_0.Enable                  := TRUE;
    IotMqttClient_0.Connect                 := TRUE;
    IotMqttClient_0.IotMqttLink             := ADR(IotMqttLink);
    IotMqttClient_0.Parameters              := IotMqttParameters;
    IotMqttClient_0();

    IotMqttRegParPublish_0.Enable           := TRUE;
    IotMqttRegParPublish_0.IotMqttLink      := IotMqttClient_0.IotMqttLink;
    IotMqttRegParPublish_0.Topic            := ADR('factory/line1/machine01/telemetry');
    IotMqttRegParPublish_0.PvName           := ADR('MachineData');
    IotMqttRegParPublish_0.PublishMode      := IOTMQTT_PUB_MODE_TRIGGER;
    IotMqttRegParPublish_0.DataFormat       := IOTMQTT_VAR_JSON;
    IotMqttRegParPublish_0();
END_PROGRAM

Publish modes available:

  • IOTMQTT_PUB_MODE_TRIGGER – publish on trigger event
  • IOTMQTT_PUB_MODE_TIME – publish on time interval
  • IOTMQTT_PUB_MODE_CHANGED – publish on value change
  • Combinations supported (e.g., time OR changed)

Subscribe Example

PROGRAM _CYCLIC
    IotMqttSubscribe_0.Enable           := TRUE;
    IotMqttSubscribe_0.IotMqttLink      := IotMqttClient_0.IotMqttLink;
    IotMqttSubscribe_0.Topic            := ADR('factory/line1/machine01/commands');
    IotMqttSubscribe_0.QueueSize        := 50;
    IotMqttSubscribe_0.Buffer           := ADR(ReceiveBuffer);
    IotMqttSubscribe_0.BufferSize       := SIZEOF(ReceiveBuffer);
    IotMqttSubscribe_0();
END_PROGRAM

DNS and Network Configuration for MQTT

The CP1584 needs DNS configured to reach external MQTT brokers (e.g., AWS IoT, HiveMQ Cloud):

  1. In Automation Studio, open CPU Configuration
  2. Navigate to the Ethernet interface (IF2)
  3. Enable DNS service
  4. If using DHCP: check “Get DNS from DHCP server”
  5. If using static IP: manually enter DNS server addresses (e.g., 8.8.8.8, 8.8.4.4)
  6. Set the default gateway if the broker is outside the local network

MQTT File Device and Logging Configuration

IotMqtt generates log files to the IOTMQTT file device by default. Create this in CPU configuration:

  1. In Automation Studio, CPU Configuration, add a File Device named IOTMQTT
  2. Point it to a directory on the CF card or a mounted USB stick
  3. Configure logging in _INIT:
PROGRAM _INIT
    IotMqttConfigParams.UseLogger             := TRUE;
    IotMqttConfigParams.LoggerName            := 'IotMqtt';
    IotMqttConfigParams.UseFile               := TRUE;
    IotMqttConfigParams.LogFileDevice         := 'USER';
    IotMqttConfigParams.LogFileName           := 'IotMqttLog';
    IotMqttConfigParams.OverwritteLogs        := TRUE;
    IotMqttConfigParams.LogLevel              := IOTMQTT_LOG_LEVEL_PROTOCOL;
    IotMqttConfig(ADR(IotMqttConfigParams));
END_PROGRAM

Certificates for TLS Connections

MQTT over TLS (port 8883) requires certificates. On B&R AR, certificates can be stored in:

  • Certificate store (project-level, accessed with container prefix like TaskName: or CertStore:)
  • File system (accessed with file device prefix like USER: or default device = no prefix)

For AWS IoT, Azure IoT Hub, or Google IoT Cloud connections, sample projects are provided in the paho.mqtt.c-ar repository under the Samples directory.


OPC-UA to MQTT Bridge (Edge Gateway Approach)

When to Use This Approach

Use the edge gateway when:

  • You do NOT have the Automation Studio project (cannot modify PLC program)
  • The OPC-UA server is running with variables already exposed
  • You want to keep data pipeline traffic off the PLC
  • You need protocol translation (OPC-UA to MQTT) without touching the control system

Architecture

   [Grafana Dashboard]
          |
   [InfluxDB / TimescaleDB]
          |
   [Telegraf]
          |
   [MQTT Broker (Mosquitto)]
          |
   [OPC-UA to MQTT Gateway]    <-- Small PC or Raspberry Pi
          |
   [OPC-UA Server on CP1584]   <-- Built into Automation Runtime

Option 1: Frankenstein Automation Gateway (Open Source)

The Frankenstein Gateway (https://github.com/vogler75/automation-gateway) is a Java-based open-source OPC-UA to MQTT bridge. Key features:

  • Connects as an OPC-UA client to any OPC-UA server
  • Exposes values via MQTT publish and GraphQL (HTTP)
  • Supports subscription-based data change notifications
  • Includes a data logger that publishes statistics
  • Maps OPC-UA node IDs to MQTT topics
  • No cost, community-maintained

Setup steps:

  1. Install Java 11+ on the edge PC
  2. Download the latest release from GitHub
  3. Configure application.properties:
    opcua.server.url=opc.tcp://192.168.0.14:4840
    opcua.namespace.index=3
    mqtt.broker.url=tcp://localhost:1883
    mqtt.topic.prefix=factory/line1/machine01
    
  4. Run the gateway: java -jar frankenstein-gateway.jar

Verification: Subscribe to the MQTT topic to confirm data flow:

mosquitto_sub -h localhost -t 'factory/line1/machine01/#' -v

Option 2: EMQX Neuron (Open Source, Docker)

Neuron (https://github.com/emqx/neuron) is an industrial IoT connectivity server from EMQX that supports 100+ industrial protocols including OPC-UA. It runs in Docker and is designed for edge deployment.

Key features:

  • OPC-UA client (southbound) to MQTT publish (northbound)
  • Supports subscription to OPC-UA monitored items (report-by-exception)
  • Group configuration for organizing tags
  • Data processing (scale, offset, JSON formatting)
  • Web UI for configuration
  • Docker container: docker pull emqx/neuron

Docker Compose for Neuron + Mosquitto:

version: '3.8'
services:
  neuron:
    image: emqx/neuron:latest
    ports:
      - "9000:9000"   # Neuron web UI
    volumes:
      - neuron_data:/neuron/data
    restart: unless-stopped

  mosquitto:
    image: eclipse-mosquitto:2
    ports:
      - "1883:1883"
      - "9001:9001"   # WebSocket
    volumes:
      - mosquitto_data:/mosquitto/data
      - mosquitto_config:/mosquitto/config
    restart: unless-stopped

volumes:
  neuron_data:
  mosquitto_data:
  mosquitto_config:

Configuration steps:

  1. Access Neuron web UI at http://<edge-pc>:9000
  2. Add a southbound device with protocol “OPC-UA Client”
  3. Set endpoint URL: opc.tcp://<CP1584-IP>:4840
  4. Configure security: None for initial testing, certificate-based for production
  5. Browse the OPC-UA address space to discover available nodes
  6. Create a group of tags to subscribe to
  7. Add a northbound application with protocol “MQTT”
  8. Set MQTT broker URL: tcp://mosquitto:1883
  9. Map the group to the MQTT application with topic template
  10. Start the pipeline

Option 3: Custom Python Bridge

For maximum control, write a lightweight Python script using asyncua (async OPC-UA client) and paho-mqtt:

import asyncio
import json
import paho.mqtt.client as mqtt
from asyncua import Client

OPCUA_URL = "opc.tcp://192.168.0.14:4840"
MQTT_BROKER = "localhost"
MQTT_PORT = 1883
TOPIC_PREFIX = "factory/line1/machine01"
SUBSCRIBE_NODES = [
    "ns=3;s=MachineData.Temperature",
    "ns=3;s=MachineData.Pressure",
    "ns=3;s=MachineData.RPM",
    "ns=3;s=MachineData.Status",
]

mqtt_client = mqtt.Client()
mqtt_client.connect(MQTT_BROKER, MQTT_PORT)

async def main():
    async with Client(OPCUA_URL) as client:
        nodes = []
        for node_path in SUBSCRIBE_NODES:
            node = client.get_node(node_path)
            nodes.append(node)

        sub = await client.create_subscription(500)
        handlers = DataChangeHandler(mqtt_client, TOPIC_PREFIX)
        for node in nodes:
            await sub.subscribe_data_change(node, handlers)

        while True:
            await asyncio.sleep(1)

class DataChangeHandler:
    def __init__(self, mqtt_client, prefix):
        self.mqtt_client = mqtt_client
        self.prefix = prefix

    def datachange_notification(self, node, val, data):
        topic = f"{self.prefix}/{node.nodeid.Identifier}"
        payload = json.dumps({
            "value": val,
            "timestamp": data.source_timestamp.isoformat() if data.source_timestamp else None,
            "quality": "good" if not data.status.is_bad() else "bad",
        })
        self.mqtt_client.publish(topic, payload, qos=1)

asyncio.run(main())

Option Comparison

FeatureFrankensteinEMQX NeuronCustom Python
Setup effortMediumLow (Docker)High (code)
OPC-UA versionClientClientClient
MQTT publishYesYesYes
Data processingLimitedScale/offset/JSONUnlimited
Web UINoYesNo
Docker supportNoYesYes
MaintenanceCommunityActive (EMQX)Your responsibility
CostFreeFreeFree
Best forQuick POCProduction edgeCustom logic

Time-Series Data Logging

Strategy 1: Log on the PLC (CF Card / USB)

If you have the Automation Studio project, the most reliable approach is to log data directly on the PLC using the built-in Logger function or custom C code. See custom-diagnostic-tools.md for details on building on-PLC tools.

B&R Logger configuration:

  1. In Automation Studio, open the Logger configuration
  2. Create a new data log
  3. Select variables to log (must be in scope)
  4. Configure trigger: cyclic (every N ms) or event-based
  5. Configure storage: file device path on CF card
  6. Set maximum file size and rotation policy

File device setup for logging:

  • Use the USER file device pointing to a directory on the CF card
  • Mount a USB stick as a separate file device for log export
  • Implement log rotation to prevent CF card exhaustion

CF card write considerations:

  • Use SLC (Single-Level Cell) CF cards only (B&R part numbers 5CFCRD.xxxx-06)
  • Avoid frequent small writes – buffer data and flush periodically
  • Rotate files before they exceed 50 MB to keep FAT defragmentation manageable
  • Monitor CF card health via the PLC’s CF LED and software status register

Strategy 2: Log via OPC-UA Subscription (External)

When you cannot modify the PLC program but the OPC-UA server has tags enabled:

  1. Run an OPC-UA client on an edge PC (Python asyncua, or a dedicated logger)
  2. Subscribe to monitored items with a 1000 ms sampling interval
  3. Write values to a local InfluxDB or CSV files
  4. The CP1584 handles the subscription without additional CPU load (OPC-UA server handles sampling internally)

InfluxDB line protocol output:

machine01,location=line1 temperature=72.3,pressure=14.7,rpm=1200,status=1 1718035200000000000

Strategy 3: Log via MQTT (External Subscriber)

When data flows through the MQTT broker (via on-PLC MQTT client or OPC-UA bridge):

  1. Run Telegraf with the MQTT consumer input plugin
  2. Parse JSON payloads from MQTT topics
  3. Write to InfluxDB

Telegraf configuration:

[[inputs.mqtt_consumer]]
  servers = ["tcp://localhost:1883"]
  topics = [
    "factory/line1/machine01/telemetry",
  ]
  data_format = "json"
  json_string_fields = []
  tags = {source = "cp1584", machine = "machine01"}

[[outputs.influxdb_v2]]
  urls = ["http://localhost:8086"]
  token = "your-token"
  organization = "factory"
  bucket = "machine_data"

Building Monitoring Dashboards

This is the standard open-source IIoT monitoring stack:

[B&R CP1584]
     |
     | OPC-UA or MQTT
     |
[Edge Gateway / Telegraf]
     |
[Mosquitto MQTT Broker]
     |
[Telegraf --> InfluxDB --> Grafana]

Step-by-Step: Full Stack Setup on an Edge PC

1. Install Mosquitto MQTT Broker

sudo apt install mosquitto mosquitto-clients
sudo systemctl enable mosquitto
sudo systemctl start mosquitto

Test with:

mosquitto_sub -h localhost -t 'test/#' -v
mosquitto_pub -h localhost -t 'test/hello' -m 'world'

2. Install InfluxDB

sudo apt install influxdb2
sudo systemctl enable influxdb
sudo systemctl start influxdb

Create organization and bucket:

influx setup \
  --username admin \
  --password adminpassword \
  --org factory \
  --bucket machine_data \
  --retention 30d

3. Install Telegraf

sudo apt install telegraf

Configure Telegraf with both MQTT and SNMP inputs:

[[inputs.mqtt_consumer]]
  servers = ["tcp://localhost:1883"]
  topics = ["factory/#"]
  data_format = "json"
  name_override = "plc_data"

[[inputs.snmp]]
  agents = ["udp://192.168.0.14"]
  version = 2
  community = "public"
  interval = "60s"
  [[inputs.snmp.field]]
    name = "uptime"
    oid = "1.3.6.1.2.1.1.3.0"
  [[inputs.snmp.field]]
    name = "ifOperStatus"
    oid = "1.3.6.1.2.1.2.2.1.8.1"

[[outputs.influxdb_v2]]
  urls = ["http://localhost:8086"]
  token = "your-api-token"
  organization = "factory"
  bucket = "machine_data"

4. Install Grafana

sudo apt install -y apt-transport-https
sudo apt install grafana
sudo systemctl enable grafana-server
sudo systemctl start grafana-server

Access at http://<edge-pc>:3000 (default admin/admin).

5. Configure Grafana Data Source

  1. Add InfluxDB as a data source
  2. URL: http://localhost:8086
  3. Auth: Token-based
  4. Organization: factory
  5. Bucket: machine_data

Dashboard Panels for Undocumented Machines

For machines with no documentation, build dashboards around these themes:

Infrastructure Health Panel

MetricSourceVisualization
PLC uptimeSNMP sysUpTimeStat panel
Ethernet link statusSNMP ifOperStatusStatus indicator (green/red)
Network trafficSNMP ifInOctets/ifOutOctetsGraph (bytes/sec)
AR statebrsnmp arStateStat panel with conditional colors
Battery statusPLC BatteryInfo functionStatus indicator

Process Telemetry Panel

MetricSourceVisualization
Key temperaturesOPC-UA / MQTTTime series graph
PressuresOPC-UA / MQTTTime series graph
Speeds / RPMsOPC-UA / MQTTGauge + time series
Machine stateOPC-UA / MQTTStatus panel (Running/Idle/Fault)
Cycle countsOPC-UA / MQTTCounter (totalize)

Alert Rules

Alert ConditionSeverityAction
PLC goes to SERVICE modeCriticalEmail/page on-call
Ethernet link downCriticalEmail + dashboard red panel
Temperature exceeds thresholdWarningDashboard amber + email
OPC-UA connection lostWarningDashboard indicator + log
MQTT broker unreachableWarningDashboard indicator

Practical Retrofit Procedures

Procedure 1: Zero-Documentation Discovery (Start Here)

When you inherit a B&R CP1584 machine with no documentation:

  1. Physical inspection: Read the model number, serial number, AR version from the CPU label
  2. Network discovery: Run brsnmp on a PC on the same subnet:
    brsnmp --list
    brsnmp --details > machine_inventory.json
    
  3. OPC-UA probe: Install UaExpert (free from Unified Automation). Try connecting to opc.tcp://<PLC-IP>:4840 with no security and anonymous login
  4. SDM check: Open a browser to http://<PLC-IP> – the System Diagnostics Manager web interface may be running
  5. Network scan: Use nmap to identify open ports on the PLC:
    nmap -sV -p 1-65535 <PLC-IP>
    
    Key ports to look for: 4840 (OPC-UA), 11159 (INA/ANSI), 80 (HTTP/SDM), 21 (FTP), 161 (SNMP)
  6. CF card dump: See cf-card-boot.md for safely reading the CF card contents to discover the project structure

Procedure 2: Add OPC-UA Data Export (Server Already Running)

If the OPC-UA server is already running with some tags enabled:

  1. Connect with UaExpert and browse the full namespace tree
  2. Document all exposed variables: node IDs, data types, current values
  3. Export the node list from UaExpert (File > Export Address Space)
  4. Set up an OPC-UA subscription in your data pipeline (Python asyncua, Telegraf OPC-UA input, or Neuron)
  5. Validate data types and ranges before connecting to your time-series database

Procedure 3: Full MQTT Pipeline (Have Automation Studio Project)

  1. Add IotMqtt library to the Automation Studio project
  2. Configure broker parameters in a persistent variable structure
  3. Create publish FUBs for each data group (telemetry, alarms, status)
  4. Use RegParPublish for structured data – it serializes entire PLC structures to JSON
  5. Configure QoS 1 for critical data (alarms), QoS 0 for telemetry
  6. Set up offline buffering so messages are stored if broker is unreachable
  7. Build and transfer to the PLC
  8. Set up the broker (Mosquitto or EMQX) on an edge PC
  9. Validate with mosquitto_sub before connecting Telegraf/InfluxDB

Procedure 4: Full MQTT Pipeline (No Automation Studio Project)

  1. Verify OPC-UA server is running and has tags enabled (use UaExpert)
  2. Set up edge gateway (Neuron recommended for easiest setup)
  3. Configure OPC-UA connection from gateway to PLC
  4. Browse and select variables in Neuron web UI
  5. Configure MQTT output to local Mosquitto broker
  6. Add Telegraf to consume MQTT and write to InfluxDB
  7. Build Grafana dashboards

Procedure 5: Add a Dedicated Monitoring Network Interface

The CP1584 already has IF2 (Ethernet 10/100/1000) and IF3 (POWERLINK V1/V2). If IF2 is already used for PLC control and you need a dedicated IT monitoring interface, you can add a third NIC:

  1. Purchase an X20 Ethernet interface module (e.g., X20IF1061-1)
  2. Install in the CP1584’s single expansion slot
  3. Configure in Automation Studio under Physical View
  4. Assign the third interface to a different subnet
  5. Configure the MQTT broker connection to use the third interface
  6. This requires a project rebuild – not possible without Automation Studio source

Alternative: If IF2 is free, simply configure it for monitoring traffic and use IF3 (POWERLINK) for PLC control, or use an external managed switch with VLANs on IF2 to segment OT and IT traffic.


Topic Naming Convention

Use ISA-95 / UNS (Unified Namespace) conventions for MQTT topics:

enterprise/site/area/line/cell/equipment/measurement

Example for a B&R CP1584-controlled machine:

factory/line1/cnc01/telemetry/temperature
factory/line1/cnc01/telemetry/pressure
factory/line1/cnc01/telemetry/rpm
factory/line1/cnc01/status/mode
factory/line1/cnc01/status/faults
factory/line1/cnc01/alarms/#
factory/line1/cnc01/config/#

Sparkplug B (MQTT) adds structure to payloads with timestamps, quality, and sequence numbers. If using EMQX or HiveMQ, consider Sparkplug B as the payload format for interoperability with MES/SCADA systems.


Security Considerations

Network Segmentation

  • Never expose OPC-UA (port 4840) or MQTT (port 1883) directly to the internet
  • Use a firewall between OT (PLC network) and IT (monitoring network)
  • The edge gateway should be dual-homed: one NIC on OT network, one on IT network
  • Or use a VPN for remote access to the monitoring stack

OPC-UA Security

  • Default: No security, anonymous access. This is common for internal OT networks but unacceptable for IT crossover
  • Enable X.509 certificate-based security for production deployments
  • The CP1584 generates self-signed certificates; see opcua.md for certificate management including the ArMcsRecreateCert function block

MQTT Security

  • Use TLS (MQTT over port 8883) for any data crossing network boundaries
  • Configure username/password authentication on Mosquitto
  • Use ACLs to restrict which topics each client can publish/subscribe to
  • For cloud connections (AWS IoT, Azure), use mutual TLS (client certificates)

SNMP Security

  • B&R PVI-SNMP uses a proprietary mechanism, not standard SNMPv3 security
  • Standard SNMP to the CP1584 Ethernet interface (MIB-II) uses community string “public” by default
  • Restrict SNMP access with firewall rules if the PLC is on a shared network
  • Never expose SNMP to untrusted networks

Troubleshooting

OPC-UA Server Not Reachable

SymptomCauseFix
Connection refused on port 4840OPC-UA server not activatedServer requires activation in AR configuration. Without project, check if the running firmware has it enabled
Certificate errorExpired or self-signed certUse ArMcsRecreateCert function block or accept self-signed in client settings
No variables visibleTags not enabledVariables must be explicitly enabled as OPC-UA tags. Without project, you cannot add new ones
Connection timeoutFirewall blockingOpen port 4840 on intermediate switches/firewalls

MQTT Connection Issues on PLC

SymptomCauseFix
Cannot resolve broker hostnameDNS not configuredEnable DNS service in AR configuration with valid DNS server
Connection drops frequentlyNetwork quality or broker overloadCheck cabling; reduce publish rate; use QoS 1 with offline buffering
Messages not arrivingWrong topic or QoS mismatchVerify topic strings match between publish and subscribe; check broker logs
Library won’t compileAR version mismatchUse IotMqtt version matching your AR version (see compatibility table)
Certificate error on TLSMissing or wrong certificateCheck certificate path prefix (task:, certstore:, or file device name:)

SNMP Discovery Issues

SymptomCauseFix
brsnmp finds no PLCsWrong subnet or PVI not installedEnsure PC is on same broadcast domain; install PVI 4.x
Can list but not set parametersPLC in wrong statePLC must be in BOOT or SERVICE state to accept IP changes via SNMP
Filter matches nothingRegex syntax errorTest regex on https://regex101.com with ECMA syntax

Key Findings

  1. Three viable retrofit paths exist for the CP1584: (a) on-PLC MQTT via paho.mqtt.c-ar (requires Automation Studio project), (b) OPC-UA to MQTT bridge via edge gateway (works without project), (c) SNMP polling for infrastructure health only.

  2. The OPC-UA to MQTT bridge is the most practical approach for undocumented machines. It does not require the Automation Studio project, does not add load to the PLC, and works with the OPC-UA server already built into Automation Runtime. The open-source Neuron gateway (Docker) provides the lowest-friction deployment.

  3. paho.mqtt.c-ar is mature and well-documented but fundamentally requires source code access. It supports MQTT v5.0, TLS, WebSocket transport, offline buffering, and JSON serialization of PLC structures. The library is built for AR versions from H3.10 through A4.73.

  4. SNMP on B&R PLCs is PVI-SNMP, not standard SNMPv3. The brsnmp open-source tool provides the most practical access. Standard MIB-II OIDs work for the Ethernet interface but B&R-specific data (AR state, firmware version, serial number) requires the PVI-SNMP mechanism.

  5. The CP1584 already has two built-in network interfaces (IF2 = Ethernet, IF3 = POWERLINK), so network segmentation for OT/IT separation is possible without any expansion module. However, if you need a third interface (e.g., a dedicated IT monitoring NIC), the X20IF1061-1 can fill the single expansion slot. An external switch with VLANs is a simpler alternative. See network-architecture.md for details on the built-in interfaces.

  6. OPC-UA variable exposure is the critical gating factor. Even with a perfect MQTT pipeline, if the OEM did not enable OPC-UA tags, you have zero process data. This is the first thing to check when inheriting an undocumented B&R machine. See opcua.md for the full discovery procedure.

  7. The Grafana + InfluxDB + Telegraf + Mosquitto stack is the de facto standard for IIoT monitoring dashboards. All components are open-source, well-supported, and run on modest hardware (a Raspberry Pi 4 or any small PC is sufficient).

  8. Security at the OT/IT boundary is non-negotiable. The edge gateway pattern naturally provides a security boundary point. Implement TLS on MQTT, certificate-based security on OPC-UA, and firewall rules to restrict access to the PLC’s Ethernet interface.

  9. CF card longevity must be managed. When logging on the PLC, use SLC cards only, implement log rotation, buffer writes, and monitor card health. Industrial CF cards from B&R (5CFCRD series) are rated for extended temperature and higher write cycles.

  10. The Frankenstein Automation Gateway and EMQX Neuron are the two best open-source OPC-UA to MQTT bridges. Frankenstein is Java-based and simpler for small deployments. Neuron runs in Docker, has a web UI, and is better suited for production edge deployments. Both are free and actively maintained.

  11. brwatch provides an alternative no-code discovery and monitoring tool for initial IIoT assessment. Before building any pipeline, use brwatch (github.com/hilch/brwatch) to enumerate all visible variables, log their values to CSV, and validate that the OPC-UA server is actually exposing process data. This 5-minute assessment determines whether the bridge approach is even viable. See access-recovery.md §12 and python-diagnostics.md §Community Tools.

  12. The awesome-B-R repository (github.com/br-automation-community/awesome-B-R) catalogs all community tools for B&R PLCs. Key tools for IIoT retrofits: paho.mqtt.c-ar (on-PLC MQTT), brsnmp (SNMP discovery), demo-br-asyncua (OPC-UA examples), and as6-migration-tools (for AR 6.x migration planning).

  13. OMJSON (github.com/loupeteam/OMJSON) provides WebSocket + JSON communication from the PLC — an alternative to MQTT/OPC-UA for lightweight data exchange when you need a simple JSON-based API from the PLC to a web server or custom application.

  14. OMSQL (github.com/loupeteam/OMSQL) provides SQL database communication from the PLC — useful for writing diagnostic data, alarm histories, or production records directly to MySQL/PostgreSQL databases from the PLC without an external gateway.

  15. mappRemoteShell (github.com/br-automation-community/mappRemoteShell) demonstrates bidirectional OPC-UA communication for remote diagnostics — the PLC sends commands via OPC-UA that trigger shell scripts on a remote PC, enabling complex diagnostic sequences orchestrated from the PLC.


Document updated: July 2026 (added OMJSON, OMSQL, mappRemoteShell community tools)

B&R CP1584 FTP and Web Server Interface Reference

Overview

Every B&R CP1584 (X20CP1584) running Automation Runtime ships with two built-in network services that are invaluable when maintaining machines from defunct OEMs with no documentation: an FTP server for direct file system access to the Compact Flash card, and a web server hosting the System Diagnostics Manager (SDM) and optionally custom HTML/ASP pages with live process variable access.

Neither service requires Automation Studio to use. A laptop on the same subnet with any FTP client or web browser is sufficient to pull configuration files, extract logs, download system dumps, and inspect live PLC data. This makes them critical survival tools when you have no AS project and no OEM support.

The CP1584 uses a PCMCIA Compact Flash card that holds the Automation Runtime OS and all application data. The FTP server exposes the CF card partitions directly. The web server runs on the same Ethernet interface as SDM and any custom pages the OEM may have deployed.


FTP Server

Connection Basics

ParameterValue
ProtocolFTP (plain text, no encryption)
Default Port21
FTPS SupportAvailable in AR 4.x via configuration (not SFTP)
Port ChangeAR P4.93+ via CfgSetFTPServerPort FB; AS UI from AS 4.12.9
AuthenticationConfigured in Automation Studio (CPU > FTP settings)
Anonymous AccessC: partition only (read-only); F: requires credentials
RBAC (AR 6.5+)Role-based access control for authentication and permissions (AS 6.5 / AR 6.5)

Access Levels and Partitions

The FTP server presents two root-level directories corresponding to CF card partitions:

C: – System Partition (Anonymous / Read-Only)

  • Anonymous FTP login grants access to the C: partition in read-only mode.
  • Contains the Automation Runtime OS files, system configuration, and log files.
  • Attempting CWD F: while anonymous returns 550 Guest access denied.
  • You cannot write to C: via FTP under any circumstances.

F: – User Partition (Requires Credentials)

  • The F: (user) partition stores application data, project backups, recipe files, CSV logs, and anything the PLC program writes via FileIO.
  • Access requires the username and password configured in the AS project under CPU > FTP configuration.
  • If no credentials were configured by the OEM, common defaults reported in the field include admin/admin or empty credentials.
  • On very old B&R systems, any username/password combination reportedly worked.
  • Read/write access level is also configured per-file-device in the AS project.

File System Layout

Key directories typically found via FTP:

C:\
  BrWebSvr.ini          -- Web server configuration
  BrWebSvr.cfg          -- Web server user/group definitions (legacy)
  arlogsys.log          -- System logger output
  SysDir\               -- System configuration directory
    *.cfg               -- Runtime configuration files
    *.ini               -- Initialization files
  AS\                   -- Automation Runtime module libraries
    WebServer\          -- Web server binary and support files
  Temp\                 -- Temporary files
  web\                  -- Default web server root directory
    index.htm           -- Default start page
    PV_Access.js        -- JavaScript library for process variable access
    *.asp               -- Active Server Pages (if deployed)
  mappView\             -- mappView HMI files (if mappView is used)
    *.widget            -- Widget definitions
    *.page              -- Page definitions
    *.css               -- Stylesheets

F:\
  (user files - varies by OEM project)
  *.csv                 -- Data logs, recipes, production records
  *.txt                 -- Text log files
  *.zip                 -- Project backups (if OEM stored them here)
  *.dat                 -- Parameter or recipe files
  TimLogger\            -- If mapp TimLogger is used
    *.csv               -- Time-stamped log files
  DataXfer\             -- File transfer directories
  UserDir\              -- Custom user data directory

The USER_PATH keyword in Automation Runtime automatically resolves to the F: partition root.

Practical FTP Commands

Connecting with FileZilla (recommended over WinSCP for B&R):

Host: <PLC_IP_ADDRESS>
Username: <configured_username or "anonymous" for C: only>
Password: <configured_password or blank for anonymous>
Port: 21

FileZilla works reliably across all AR versions. WinSCP has known compatibility issues with AR P4.93+ due to FTP server implementation changes.

Connecting with curl (command line, for scripting):

# List system partition files (anonymous)
curl -s ftp://192.168.0.1/ --user anonymous:

# Download a configuration file
curl -s ftp://192.168.0.1/SysDir/Config.cfg --user anonymous: -o Config.cfg

# Download a file from the user partition
curl -s ftp://192.168.0.1/data/recipe.csv --user admin:admin -o recipe.csv

# Upload a file to the user partition
curl -s -T local_file.csv ftp://192.168.0.1/data/ --user admin:admin

# List user partition contents
curl -s ftp://192.168.0.1/ --user admin:admin

# Download the entire web directory for offline inspection
curl -s ftp://192.168.0.1/web/ --user admin:admin --list-only

Bulk backup with lftp (mirrors the entire user partition):

lftp -e "mirror --verbose / /path/to/local_backup" -u admin,admin ftp://192.168.0.1

Python script for automated log retrieval:

import ftplib

ftp = ftplib.FTP("192.168.0.1")
ftp.login("admin", "admin")
ftp.cwd("TimLogger")
filenames = ftp.nlst()
for f in filenames:
    with open(f, "wb") as fh:
        ftp.retrbinary(f"RETR {f}", fh.write)
ftp.quit()

FTP Configuration in Automation Studio

If you have access to an AS project (or can obtain one), the FTP server is configured under:

CPU > Properties > FTP Server

Key settings:

  • FTP Server Enabled: Checkbox to enable/disable
  • Password: Sets the FTP access password
  • File Device Access: Per-device read/write permissions under the File Device configuration
  • User Partition Minimum Size: Must be > 0 for F: to exist (check CPU > Module system on target)

FTP Gotchas and Known Issues

  1. WinSCP incompatibility with AR P4.93: The FTP server implementation changed in P4.93, breaking WinSCP directory listing. Use FileZilla instead. This is a known regression.

  2. No SFTP: B&R supports FTPS (FTP over SSL/TLS) but not SFTP (SSH-based). For AR 4.x, configure FTPS in the CPU properties. For security on plant networks, consider tunneling FTP through an SSH tunnel or VPN rather than relying on FTPS.

  3. Minimum user partition size: If the “Minimum user partition size” in CPU > Module system on target is set to 0, the F: partition will not exist and FTP access to user data will fail. This must be set > 0 and the CF card must be re-initialized (offline installation).

  4. Concurrent connection limits: The FTP server supports limited concurrent connections (typically 4-8 sessions). Excessive simultaneous sessions may cause connection refused errors or intermittent timeouts.

  5. File locking: Files currently open by the PLC program (via FileIO) cannot be overwritten via FTP. This is particularly relevant for active log files. Lock duration is typically until the FileIO handle is closed or the PLC program cycle ends.

  6. Path navigation quirk: The FTP root shows a .. entry (parent directory) that returns “Permission denied” when clicked. This is normal – you are already at the partition root.

  7. Timeout behavior: Long-running transfers may timeout on slow networks. The FTP server does not support resume/partial transfers reliably on older AR versions.

  8. Case sensitivity: The B&R file system is case-insensitive on C: but this can vary on F: depending on AR version. Use exact case when in doubt.

FTP Active vs Passive Mode

FTP uses two channels: a control channel (port 21, always used for commands) and a data channel (for file transfers). The data channel can be established in two ways:

Active Mode (PORT):

Client → Server: PORT command with client IP and port number
Server → Client: Server initiates data connection TO the client
Problem: The server connects back to the client on an unpredictable port (typically 20).
         Most firewalls and NAT routers block incoming connections on arbitrary ports.

Passive Mode (PASV):

Client → Server: PASV command
Server → Client: Server responds with IP and port number
Client → Server: Client initiates data connection TO the server
Solution: The client connects to a known server port. Only outbound connections from client needed.
          Works through firewalls and NAT.

For B&R FTP on plant networks:

ScenarioRecommended ModeWhy
Direct connection (same subnet)Either mode worksNo firewall in path
Through corporate firewallPassiveFirewall blocks server-to-client data connections
Behind NAT/DSL modemPassiveNAT cannot forward server’s data connection
VPN tunnelPassive preferredSome VPNs block active mode data connections
Automation Studio “Transfer to target”Active (AS default)AS manages the connection automatically

Configuring passive mode in clients:

# curl (useful for scripted FTP operations)
curl --ftp-pasv ftp://admin:[email protected]/F:/logfile.txt -o logfile.txt

# FileZilla: Edit > Settings > Connection > FTP > Transfer Mode > Passive

# Python ftplib
from ftplib import FTP
ftp = FTP('192.168.1.10')
ftp.login('admin', 'password')
ftp.set_pasv(True)  # Force passive mode

# lftp
lftp -e "set ftp:passive-mode on; ls" admin:[email protected]

Passive port range on B&R controller: B&R’s FTP server uses a default passive port range (typically ports 49152-65535). If a firewall sits between the client and controller, open this port range for TCP traffic. The range cannot be reconfigured on AR 4.x controllers.

FTPS Configuration

B&R supports FTPS (FTP over SSL/TLS) for encrypted file transfers. This is distinct from SFTP (which B&R does not support — confirmed on B&R Community).

Configuration in Automation Studio:

  1. CPU > Properties > FTP Server

  2. Enable FTPS checkbox

  3. Select SSL/TLS mode:

    • Explicit FTPS (AUTH TLS): Client requests TLS upgrade via AUTH TLS command on port 21. Most compatible option.
    • Implicit FTPS: TLS is assumed from the start on port 990. Less compatible, deprecated by RFC.
  4. Certificate management: FTPS requires an SSL/TLS certificate on the controller.

    • For AR 4.x: Certificates are managed in CPU > Properties > SSL/TLS
    • Self-signed certificates can be generated in Automation Studio
    • Certificate is stored on the CF card and loaded at startup

FTPS gotchas:

  • FTPS requires multiple ports — the control connection on 21 AND the data connection ports must both allow TLS. Active mode adds another connection direction.
  • Minimum TLS version should be set to TLS 1.0 or higher in client settings (some B&R AR versions may have issues with TLS 1.2 negotiation — check community posts for your specific AR version).
  • Certificate validation may fail with self-signed certificates unless the client is configured to accept them.

Using FTPS with FileZilla:

Host: ftps://192.168.1.10
Username: admin
Password: [configured password]
Port: 21
Protocol: Require explicit FTPS

SFTP is NOT available:

B&R Community confirmed: “SFTP Support — B&R does not provide SFTP (SSH-based file transfer). FTPS (FTP + TLS/SSL) is the only encrypted file transfer option.” Source: https://community.br-automation.com/t/sftp-support/8247


Web Server and System Diagnostics Manager (SDM)

Web Server Overview

B&R Automation Runtime includes an integrated web server that serves multiple purposes:

  1. System Diagnostics Manager (SDM) – Built-in diagnostic web interface
  2. Custom HTML/ASP pages – OEM-deployed web pages for monitoring/control
  3. PV_Access – JavaScript-based live process variable read/write from the browser
  4. mappView – HTML5 HMI served directly from the PLC

SDM Access

ParameterValue
URL (AR 4.x default)http://<PLC_IP>/sdm
URL (AR 6.x default)https://<PLC_IP>/sdm (HTTPS by default)
Port80 (HTTP) or 443 (HTTPS)
Alternative port81 sometimes used for web app separation
AuthenticationNone by default (AS 6.x can enable auth)
AR Version RequiredV3.0+ for SDM; V3.08+ for System Dump
Enabled by defaultYes in AR 4.x; No in AS 6.0+ (must enable manually)

Accessing SDM

  1. Configure your laptop’s Ethernet adapter to the same subnet as the PLC
  2. Open a web browser (Chrome recommended)
  3. Navigate to http://<PLC_IP>/sdm
  4. If HTTP fails, try https://<PLC_IP>/sdm

SDM remains accessible even when the PLC is in SERVICE mode, as long as the network configuration is intact.

SDM Capabilities

The SDM provides:

  • Hardware Overview: All connected modules, firmware versions, serial numbers
  • Task Monitor: Real-time cycle time monitoring for all task classes (Cyc0-Cyc3)
  • Logger: View system log entries (arlogsys) without needing Automation Studio
  • System Dump: Download a complete diagnostic archive (.tar.gz) over HTTP
  • Network Configuration: View IP, subnet, gateway, DNS settings
  • CF Card Status: Partition sizes, free space, file system health
  • User Partition Status: Monitor F: partition usage

Downloading a System Dump via SDM

This is the single most valuable diagnostic procedure available without Automation Studio:

  1. Open http://<PLC_IP>/sdm in Chrome
  2. Click the System Dump icon (center of the SDM interface)
  3. Select Parameters + Data-Files
  4. Click OK on the confirmation dialog
  5. Click Upload from target
  6. Wait for the download to complete (Chrome may show a “Keep” warning – click Keep)
  7. The file will be named BuR_SDM_Sysdump_<timestamp>.tar.gz

The system dump contains:

  • arlogsys.log – System logger output
  • Configuration files from SysDir
  • Hardware topology information
  • Task and module status data
  • Memory usage snapshots

To analyze the dump, open it in Automation Studio Logger (File > Load Data) or use the third-party SystemDumpViewer tool. The AS version must match the AR major version on the PLC.

Custom Web Pages (Legacy ASP/HTML)

Older B&R systems (AR 2.x/3.x era) used the legacy BrWebSvr web server with ASP-like pages. The configuration file is C:\BrWebSvr.ini:

BaseDir = C:           ; Base directory on the CF card
WebDir = web            ; Subdirectory containing web pages
StartPage = index.htm   ; Default start page

The web server binary is located at C:\AS\WebServer\i386\webserv.br.

Complete Legacy ASP Function Reference

These functions are available in .asp files on the legacy web server. The web server binary is located at C:\AS\WebServer\i386\webserv.br (or C:\AS\WebServer\Y0200\i386\webserv.br on newer AR versions).

FunctionSyntaxPurpose
ReadPLC<% ReadPLC("varname"); %>Insert the current value of a global PLC variable. Only global variables are accessible. If the variable does not exist, “Unknown variable” is displayed. Supports array indexing: <% ReadPLC("Program:array[0]"); %>
WebPrint<% WebPrint("param"); %>Insert the value of an HTTP GET/POST parameter into the page output. Used with form submissions and the ReadWrite action.
UserGroup<% UserGroup(rights); %>Conditional display — HTML after this tag only renders if the logged-in user has the required rights bitmask. Rights are checked as bitwise AND. Call with UserGroup(0) to re-enable display for all users.
ErrorMsg<% ErrorMsg(); %>Display the authorization error message from the last UserGroup() check. Shows why access was denied.
ReadALARM<% ReadALARM("Errorstr", index); %>Display alarm history from Visual Components. Index: 1=date/time, 2=group number, 3=alarm number, 4=alarm text, 5=alarm status. The errorstring comes from VA_GetAlarmList or VA_GetExAlarmList VISAPI calls.
UserLogin/goform/UserLogin?username=X&password=Y&redirect=page.asp&error_redirect=err.aspAuthenticate a user. Credentials are defined in BrWebSvr.cfg. Only one user per IP address can be logged in simultaneously. Login persists until logout or web server restart.
UserLogout/goform/UserLogout?redirect=page.aspLog out the current user. Must be from the same IP as login.
UserGroup Rights Bitmask System

The UserGroup function uses a bitmask to check authorization. Rights values are summed from individual permission bits:

BitDecimalMeaning
Bit 01Permission level 1
Bit 12Permission level 2
Bit 24Permission level 3
Bit 38Permission level 4
Bit 416Permission level 5

Example: UserGroup(20) checks if the user has bits 3 and 4 set (8 + 16 = 24, or 4 + 16 = 20). The user’s rights bitmask in BrWebSvr.cfg is ANDed with the parameter.

BrWebSvr.cfg Configuration File Format

The BrWebSvr.cfg file defines web server users, passwords, and rights:

[User1]
Name=admin
Password=mypassword
Rights=31

[User2]
Name=operator
Password=operator
Rights=1
  • One user per IP address can be logged in simultaneously
  • If no BrWebSvr.cfg exists or it contains no users, no login is required
  • Passwords are stored in plaintext in the configuration file (not hashed)
Read/Write Variables via HTTP Forms (goform/ReadWrite)

The /goform/ReadWrite endpoint is the primary mechanism for bidirectional variable access from web pages:

/goform/ReadWrite?variable=VarName&value=NewValue&write=1&redirect=result.asp

Parameters:

ParameterDescription
variablePLC variable name to read/write (indexed arrays supported: myArray[5])
valueValue to write (for write operations)
writeSet to 1 to write, or omit/0 for read-only
readSet to 1 to read the variable
redirectPage to redirect to after the operation
varName of the variable in the redirect (echoes back the variable name)
valValue of the variable in the redirect (echoes back the value)

Batching multiple variables in a single call: The goform/ReadWrite endpoint supports up to 10 variables per call. Additional variables use suffixed parameter names:

/goform/ReadWrite?redirect=target.html
  &variable=myVar[0]&value=none&read=1
  &variable__1__=myVar[1]&value__1__=none&read=1
  &variable__2__=myVar[2]&value__2__=none&read=1
  ...
  &variable__9__=myVar[9]&value__9__=none&read=1

This is critical for performance — reading 10 variables in one request is roughly 10x faster than 10 individual requests.

Read result page example (result.asp):

<%-- Display the variable name and value from the redirect parameters --%>
Variable: <% WebPrint("var"); %> = <% WebPrint("val"); %>

PV_Access (Modern JavaScript API)

For AR 4.x systems, the modern approach uses PV_Access.js located in the web server root (C:\web\PV_Access.js). This JavaScript library provides real-time read/write access to PLC process variables directly from the browser using HTTP or WebSocket connections.

How PV_Access.js Works Internally

PV_Access.js wraps the legacy goform/ReadWrite ASP endpoint. Under the hood, every readVariable() or writeVariable() call from PV_Access.js generates an HTTP request to /goform/ReadWrite with the appropriate parameters. This means:

  • PV_Access is not a WebSocket or binary protocol — it is HTTP-based
  • Each variable read/write is a separate HTTP request by default
  • The 10-variable batching limit of goform/ReadWrite applies to PV_Access as well
  • Port 80 is used by default; port 81 is recommended to separate web application traffic from SDM

Basic PV_Access Usage

<html>
<head>
    <script src="PV_Access.js"></script>
</head>
<body>
    <script>
        var pv = new PVAccess("192.168.0.1");
        pv.readVariable("gMachineStatus", function(value) {
            document.getElementById("status").innerText = value;
        });
        pv.writeVariable("gCmd_Start", 1);
    </script>
    <div>Machine Status: <span id="status">--</span></div>
</body>
</html>

Reading variables one-by-one via PV_Access is slow for large datasets (100 variables via PV_Access can take 15+ seconds). A much faster approach uses ASP pages that output JSON data, loaded via fetch():

Step 1: Create an ASP page with all variables as a JSON array (C:\web\data.asp):

[
    "<%ReadPLC("Program:array[0]");%>",
    "<%ReadPLC("Program:array[1]");%>",
    "<%ReadPLC("Program:array[2]");%>",
    "<%ReadPLC("Program:temperature");%>",
    "<%ReadPLC("Program:pressure");%>",
    "<%ReadPLC("Program:status_word");%>"
]

Step 2: Fetch with JavaScript:

function cyclicFetch(url, interval) {
    function fetchData() {
        fetch(url)
            .then(response => response.json())
            .then(data => {
                // Process array data
                document.getElementById("temp").innerText = data[3];
                document.getElementById("pressure").innerText = data[4];
                document.getElementById("status").innerText = data[5];
                setTimeout(fetchData, interval);
            })
            .catch(error => console.error('Error:', error));
    }
    fetchData();
}

// Refresh every 200ms
cyclicFetch("/data.asp", 200);

Performance comparison (measured on B&R 4PPC30, local network):

Method100 INT variables10 INT variables
PV_Access.js (one-by-one)>15 seconds~2 seconds
JSON ASP + fetch()<80 ms<20 ms

The JSON approach is roughly 200x faster than individual PV_Access reads because:

  1. A single HTTP request retrieves all variables
  2. The web server processes all <%ReadPLC()%> tags server-side in one pass
  3. No per-variable HTTP overhead
  4. The fetch() API is non-blocking and efficient

Important considerations:

  • This technique works on AR 4.x with the legacy web server (not mappView)
  • The ASP page must be served from the B&R web server (not a local file)
  • Array variables use the syntax Program:array[index] where Program is the task/library name
  • Global variables (no program prefix) are also accessible: <%ReadPLC("gVarName");%>

Custom Web Services via AsHTTP Library

For maximum control over web server responses, B&R provides the AsHTTP library for creating custom HTTP endpoints in IEC/C code running on the PLC:

  • Build custom REST/JSON APIs entirely within PLC tasks
  • Define URL routes, request parsing, and response formatting
  • No dependency on goform/ReadWrite limitations
  • Full control over data formatting, caching, and access control
  • Requires more development effort but provides the best performance and flexibility

This approach is preferred when:

  • You need to expose structured data (JSON/XML) to external systems
  • You need authentication beyond what BrWebSvr.cfg provides
  • You need to serve large datasets efficiently
  • You are building custom dashboards or IIoT integrations

mappView (HTML5 HMI)

Modern B&R systems use mappView, an HTML5-based HMI framework built on OPC UA FX. If the CP1584 is running a mappView application, the HMI will be accessible via:

http://<PLC_IP>/mappView/       (AR 4.x)
https://<PLC_IP>/mappView/      (AR 6.x)

mappView requires the OPC UA server to be running on the PLC. The HMI loads in any modern browser and provides the full visualization that was deployed by the OEM.

The mappView files are typically stored in C:\mappView\ on the CF card and can be inspected via FTP for understanding the HMI structure without AS.


Using FTP and Web Server for Diagnostics and Data Extraction

Procedure: Full Remote Backup Without Automation Studio

This procedure captures everything available without AS:

PLC_IP="192.168.0.1"
BACKUP_DIR="./cp1584_backup_$(date +%Y%m%d)"
mkdir -p "$BACKUP_DIR/system" "$BACKUP_DIR/user" "$BACKUP_DIR/web" "$BACKUP_DIR/sdm"

# 1. Download SDM system dump (via browser or curl)
curl -k -o "$BACKUP_DIR/sdm/sysdump.tar.gz" \
  "https://$PLC_IP/sdm/systemdump" 2>/dev/null || \
curl -o "$BACKUP_DIR/sdm/sysdump.tar.gz" \
  "http://$PLC_IP/sdm/systemdump" 2>/dev/null

# 2. Mirror system partition (C:) via anonymous FTP
lftp -e "mirror --verbose / '$BACKUP_DIR/system'" \
  -u anonymous, "ftp://$PLC_IP"

# 3. Mirror user partition (F:) via authenticated FTP
#    Replace credentials with those from the AS project or try common defaults
lftp -e "mirror --verbose / '$BACKUP_DIR/user'" \
  -u admin,admin "ftp://$PLC_IP/F:"

# 4. Mirror web directory
lftp -e "mirror --verbose /web '$BACKUP_DIR/web'" \
  -u admin,admin "ftp://$PLC_IP"

Procedure: Extracting Configuration Files

Key configuration files to retrieve for understanding a PLC setup:

# Network configuration
curl "ftp://$PLC_IP/SysDir/Config.cfg" --user anonymous: -o Config.cfg
curl "ftp://$PLC_IP/SysDir/ARConfig.ini" --user anonymous: -o ARConfig.ini

# Web server configuration (if custom pages exist)
curl "ftp://$PLC_IP/BrWebSvr.ini" --user anonymous: -o BrWebSvr.ini
curl "ftp://$PLC_IP/BrWebSvr.cfg" --user anonymous: -o BrWebSvr.cfg

# Runtime parameters
curl "ftp://$PLC_IP/SysDir/Param.cfg" --user anonymous: -o Param.cfg

# System log
curl "ftp://$PLC_IP/arlogsys.log" --user anonymous: -o arlogsys.log

Procedure: Pulling Data Logs and Production Records

OEMs commonly store production data, alarm logs, and recipes on the F: partition:

# List all CSV files on the user partition
curl "ftp://$PLC_IP/" --user admin:admin --list-only | grep -i csv

# Download all CSV files
curl "ftp://$PLC_IP/" --user admin:admin --list-only | while read f; do
  [[ "$f" == *.csv ]] && curl "ftp://$PLC_IP/$f" --user admin:admin -o "$f"
done

# Download TimLogger archives (if mapp TimLogger is used)
curl "ftp://$PLC_IP/TimLogger/" --user admin:admin --list-only

Procedure: Checking if a Project Backup Exists on the CF Card

OEMs sometimes store project files on F: for recovery:

# Search for zip files (project archives)
curl "ftp://$PLC_IP/" --user admin:admin --list-only | grep -i zip

# Search for AS project files
curl "ftp://$PLC_IP/" --user admin:admin --list-only | grep -i "\.apj\|\.at2\|\.at4"

If a project archive exists on F:, it can be downloaded via FTP and opened in the matching version of Automation Studio to recover full source code.

Procedure: Real-Time Variable Monitoring via Web

If PV_Access pages exist (check for .asp or .htm files with PV_Access.js references in the web\ directory):

  1. Browse to http://<PLC_IP>/ or http://<PLC_IP>/web/
  2. Check the page source for PV_Access.js script tags
  3. If custom monitoring pages exist, they provide live variable readout without any software

Procedure: Checking Hardware State via SDM

Without any software installed:

  1. Open http://<PLC_IP>/sdm
  2. Navigate through each tab:
    • Overview: Lists all X20 I/O modules, their order in the X2X bus, firmware versions, and status
    • Logger: Shows runtime errors, warnings, and info messages with timestamps
    • Task Monitor: Reveals task class assignments and cycle times
    • Memory: Shows RAM and Flash utilization
  3. Use this information to document the hardware configuration for a machine with no existing documentation

Default Credentials and Discovery

Finding the IP Address

When no documentation exists:

  1. B&R Automation Studio “Project Configuration”: Can auto-detect controllers on the network
  2. B&R Service Tool (RUC - Runtime Utility Center): Can scan for devices
  3. Wireshark: Capture DHCP requests or B&R discovery packets on startup
  4. Default IP: Many B&R X20 controllers ship with 192.168.0.1 as the default IP address with DHCP enabled
  5. Physical inspection: Check the front panel display (if equipped) or the AS project backup on the CF card

FTP Credentials Recovery

If FTP credentials are unknown:

  1. Check C:\BrWebSvr.cfg for legacy web server credentials (may hint at password patterns)
  2. Check C:\SysDir\*.cfg files for configuration references
  3. Try common defaults: admin/admin, br/br, operator/operator, empty/empty
  4. On legacy systems, any username/password was reported to work
  5. If you have the AS project file (.apj), open it in Automation Studio and check CPU > FTP settings

SDM Authentication

SDM typically requires no authentication in AR 4.x. In AR 6.x, it may require login if configured by the OEM. There is no standard default credential for SDM – if locked, the AS project must be modified to reset it.


Undocumented Features and Gotchas

Undocumented Behaviors

  1. Anonymous C: access persists even when FTP is “disabled”: On some AR versions, disabling the FTP server in the AS project only disables authenticated access. Anonymous read-only access to C: may still function.

  2. BrWebSvr.ini overrides AS project settings: If a BrWebSvr.ini file exists on C:, it takes precedence over AS project web server settings. Deleting or renaming this file reverts to project-configured behavior.

  3. Multiple web servers can coexist: The legacy BrWebSvr and the modern SDM web server can run simultaneously on different ports (e.g., 80 and 443). Check both.

  4. PV_Access port 81 convention: While not enforced, B&R documentation recommends using port 81 for PV_Access application traffic to separate it from SDM on port 80. Check if the OEM configured this.

  5. CF card partition scheme: B&R typically creates 4 partitions on CF cards. Standard consumer CF cards may not support the multi-partition layout, which is why B&R branded cards are often required. Attempting to clone to a generic card may fail.

  6. FTP file device path must use USER_PATH: When configuring file devices in AS, the path for the user partition device must be set to USER_PATH (not USER_PATH:\ or F:\). An incorrect path causes FTP directory listing to fail with “Permission denied”.

  7. System dump requires SDM enabled: If the OEM disabled SDM, you cannot download system dumps via the web interface. As a fallback, pull arlogsys.log directly via FTP from C:.

  8. Logger buffer wraps: The system logger (arlogsys.log) has a fixed buffer size. On long-running systems, old entries are overwritten. If a fault occurred days ago, the log entry may already be gone. Extract logs proactively.

  9. AR 6.x drive mapping changes: In Automation Runtime 6, the drive mappings C: through F: no longer correspond to the same partitions as in AR 4.x. If the CP1584 was upgraded from AR 4.x to AR 6.x, file locations change. See cf-card-boot.md for details.

  10. Web server start page: If no custom pages exist, browsing to http://<PLC_IP>/ may return a generic B&R page, a 404, or the SDM redirect depending on AR version and configuration.

Security Warnings

  • The FTP server transmits credentials in plain text. On shared plant networks, anyone with a network sniffer can capture passwords.
  • SDM has no authentication by default in AR 4.x, exposing full hardware and diagnostic information.
  • Custom ASP pages with ReadWrite forms can modify PLC variables from any browser – a potential safety hazard on process equipment.
  • If the machine controls physical equipment, verify that web-accessible variables cannot cause unintended motion or state changes.

Known Security Vulnerabilities (CVEs)

The following CVEs affect the FTP and web server interfaces on CP1584 systems. Check your AR version against the B&R security advisories:

CVEComponentSeverityStatus in AR 4.93Mitigation
CVE-2025-11044Multiple (AR core)CriticalPatchedUpgrade to AR R4.93
CVE-2025-3450Multiple (AR core)HighPatchedUpgrade to AR R4.93
CVE-2023-3242FTP weak TLSMediumNot patchedUse VPN or isolated network segment; FTPS if available
Webserver buffer overflowBrWebSvrHighNot patchedDisable custom web pages; restrict web server access via firewall
SDM XSSSDM web UIMediumNot patchedRestrict SDM access to trusted networks; do not click untrusted links
SDM session fixationSDMMediumNot patchedClear browser session after SDM access
SDM CSV injectionSDM exportLowNot patchedOpen exported CSV files in a sandboxed viewer

Practical recommendations for undocumented machines:

  1. Place the CP1584 on an isolated VLAN, not the corporate network
  2. If FTP must be used across network segments, tunnel through SSH or a VPN
  3. Disable custom web pages (remove .asp files from C:\web\) if not needed
  4. Consider the OPC-UA to MQTT bridge pattern from iiot-retrofit.md to expose data without exposing the FTP/web attack surface

Sources

Official Documentation

  • B&R AR WebServer Technical ManualPDF (infoPLC) — Complete BrWebSvr ASP function reference, configuration files, and deployment guide
  • B&R Automation Studio Online Help — Web server configuration, FTP settings, SDM configuration

B&R Community Forum Discussions

  • cf-card-boot.md: CF card partition layout, boot sequence, AR installation files, and CF card cloning procedures
  • config-file-formats.md: Detailed format reference for BrWebSvr.ini, BrWebSvr.cfg, ARConfig.ini, and other configuration files accessible via FTP
  • diagnostics-sdm.md: Comprehensive SDM usage guide, log interpretation, system dump analysis, and error code reference
  • iiot-retrofit.md: Building modern monitoring dashboards using B&R web server, OPC-UA, and custom REST endpoints
  • custom-diagnostic-tools.md: Building custom diagnostic tools on the PLC including AsHTTP-based web services

Key Findings

  1. FTP and SDM are the primary no-software-required access methods for undocumented B&R CP1584 systems. Together they provide full file system access, complete hardware diagnostics, and all system logs over a standard Ethernet connection.

  2. FileZilla is the safest FTP client choice. WinSCP breaks on AR P4.93+ due to a known FTP server regression. The root cause is a change in the FTP server’s directory listing response format.

  3. Anonymous FTP gives read-only access to C: – the system partition containing configuration files, logs, and web pages. Authenticated FTP (credentials from the AS project) is required for F: (user partition) access.

  4. The SDM is accessible at http://<PLC_IP>/sdm and works even when the PLC is in SERVICE mode. It provides hardware overview, task monitoring, logger output, and system dump downloads – all from a web browser.

  5. System dumps are the single most valuable diagnostic artifact. Downloadable as a .tar.gz file via SDM, they contain everything needed for B&R support to diagnose issues without physical access to the machine.

  6. OEM project backups may exist on F:. Always check for .zip or .apj files in the user partition – they can contain the full Automation Studio project with source code, enabling complete system recovery.

  7. PV_Access.js enables browser-based live variable monitoring without any installed software. If the OEM deployed custom web pages, they provide real-time process data access from any device on the network.

  8. FTP credentials are not recoverable from the PLC if the AS project is lost. The password is stored in the compiled project binary, not in a plain-text configuration file. Common defaults may work on legacy systems.

  9. AR 6.x changes defaults to HTTPS and disables SDM by default. For systems running AR 6.x, use https:// URLs and check that SDM is enabled in the AS project configuration under “System diagnostics”.

  10. The combined FTP + SDM approach covers approximately 90% of remote maintenance needs for undocumented B&R machines: configuration extraction, log retrieval, hardware inventory, data backup, and live diagnostics are all achievable without Automation Studio.

  11. The legacy BrWebSvr ASP system provides complete bidirectional PLC variable access via the /goform/ReadWrite endpoint. Up to 10 variables can be batched in a single HTTP request. The UserGroup/UserLogin/UserLogout system provides role-based page protection via BrWebSvr.cfg. On undocumented machines, checking for .asp files in the C:\web\ directory can reveal OEM-built monitoring pages with live variable displays.

  12. The JSON ASP + fetch() approach is ~200x faster than PV_Access.js for bulk variable reads. Creating an ASP page that outputs <%ReadPLC()%> tags as a JSON array, then fetching it with JavaScript fetch(), can retrieve 100 INT variables in under 80ms compared to 15+ seconds via individual PV_Access calls. This is the recommended approach for any data-rich custom monitoring pages.

  13. PV_Access.js wraps the goform/ReadWrite protocol — it is not a WebSocket or binary protocol. Each read/write generates a standard HTTP request. This means PV_Access is subject to the same 10-variable-per-request batching limit and HTTP overhead as direct goform calls.

  14. B&R provides the AsHTTP library for custom REST/JSON endpoints running directly on the PLC. For advanced IIoT integrations, this provides full control over HTTP responses without the limitations of the legacy ASP system. See iiot-retrofit.md and custom-diagnostic-tools.md for implementation approaches.

  15. Community GitHub resource: B&R expert Christoph Hilchenbach maintains github.com/hilch/br-plc-as-webserver with demonstration projects for the built-in web server. This is a practical reference for understanding web server configuration and deploying custom pages to the PLC.

  16. The web server binary location differs by AR version: C:\AS\WebServer\i386\webserv.br (older) or C:\AS\WebServer\Y0200\i386\webserv.br (newer). The Y0200 path corresponds to AR version 2.2+ module structure. Both binaries serve the same ASP/HTTP functionality.

  17. SystemDumpViewer provides GUI analysis of downloaded system dumps. After downloading a system dump via SDM (http://<PLC_IP>/sdm), use the community SystemDumpViewer Java tool or systemdump.py CLI (github.com/hilch/systemdump.py) to parse the SystemDump.xml file. This extracts logger entries, task cycle statistics, memory usage, and hardware status in a structured view. See ebpf-telemetry.md for the analysis workflow.

  18. Multiple unpatched CVEs affect FTP and web server on AR 4.93. Even the latest AR 4.x does not patch FTP weak TLS, webserver buffer overflow, or SDM XSS/session vulnerabilities. Isolate the PLC on a dedicated VLAN and restrict FTP/web access to trusted hosts. See ar-rtos.md §Security for the complete CVE table.

B&R Modbus Gateway Configuration on the CP1584

Overview

When you inherit a machine built by a defunct OEM with a B&R CP1584 PLC and zero documentation, Modbus is often your fastest path to data extraction and integration. The CP1584 (B&R Automation PC) runs Automation Runtime and supports both Modbus TCP (over Ethernet) and Modbus RTU (over serial). This guide covers every approach to using the CP1584 as a Modbus gateway, mapping variables to registers, integrating legacy field devices, and extracting data when OPC-UA is unavailable.

Two distinct Modbus strategies exist on the B&R platform:

  • Software-based Modbus (AsMbTCP / AsMbRTU libraries running on the CPU itself) — the CP1584 acts as Modbus master or slave directly from its application code.
  • Hardware-based Modbus (X20BC0087 bus controller on the X2X bus) — a dedicated module speaks Modbus TCP/UDP and exposes its I/O process image to any Modbus master. No B&R CPU is required.

Both strategies can coexist. The CP1584 can run AsMbTCP for programmatic data exchange and host an X20BC0087 for independent I/O gateway access.

Prerequisites:

  • Automation Studio 4.x or 6.x (downloadable free from br-automation.com with an evaluation license)
  • Physical Ethernet link and an IP plan on the same subnet
  • For serial RTU: an X20IF1030/X20IF1031/X20IF1041 serial interface module

Modbus Protocol Reference

Function Codes

FCCodeNameData TypeAccess
010x01Read CoilsBit (1-bit)Read
020x02Read Discrete InputsBit (1-bit)Read
030x03Read Holding Registers16-bit WORDRead/Write
040x04Read Input Registers16-bit WORDRead
050x05Write Single CoilBit (1-bit)Write
060x06Write Single Register16-bit WORDWrite
150x0FWrite Multiple CoilsBit (1-bit)Write
160x10Write Multiple Registers16-bit WORDWrite

Register Address Conventions

ObjectFunction CodeB&R BaseCommon SCADA Prefix
Coils01/05/150-based00001, 1xxxx
Discrete Inputs020-based10001, 2xxxx
Holding Regs03/06/160-based40001, 4xxxx
Input Registers040-based30001, 3xxxx

B&R maps are 0-based. If upstream SCADA/HMI uses 1-based addressing (e.g., register 40001 = holding register address 0), subtract 1 when configuring the B&R side.

Byte Ordering

Modbus TCP defines Big-Endian (network order) within each 16-bit register: high byte first, low byte second. B&R internally uses little-endian. When bridging to Modbus, apply a ROL/ROR or explicit byte swap before exposing data to the Modbus map. This is especially critical for 4-byte (UDINT, REAL) and 8-byte (LREAL) types.

Unit ID (Slave Address)

ValueUsage
1–247Device-specific addressing for RTU-over-TCP gateways
255Recommended for Modbus TCP-only (no serial gateway)
0Valid per spec; some devices treat same as 255

When routing through a Modbus RTU-to-TCP gateway, the Unit ID selects the downstream serial slave. For direct Modbus TCP communication between peers, set Unit ID to 255.


X20BC0087 Modbus TCP Bus Controller

Hardware Details

The X20BC0087 is a dedicated bus controller that bridges X2X Link I/O nodes to Modbus TCP/UDP. It operates as a Modbus slave and does not require a B&R CPU — any Modbus TCP master (PLC, SCADA, Python script) can read/write its process image.

ParameterValue
B&R ID Code0x227C
Interface2x shielded RJ45 (integrated switch)
Transfer Rate10/100 Mbit/s, auto-negotiation
Cable LengthMax 100 m per segment
Default IP192.168.100.1 (switches set to 0xFF)
Default Port502
Power Consumption2 W (bus)
I/O Cycle Time0.5 to 4 ms (configurable)
Response Time<1 to 8 ms
Required AccessoriesX20BB80 (bus base), X20PS9400 (power), X20TB12 (terminal block)

Network Address Switches

Set via flat-head screwdriver on the module body. Changes apply after power cycle.

Switch PositionBehavior
0x00Factory default; uses flash memory parameters
0x01–0x7FOverwrites last octet of IP address from flash
0x80–0xEFDHCP mode; hostname = brmb + switch value (3 digits)
0xF0Auto-store: DHCP/BOOTP values saved to flash
0xFEInitialize all params to defaults (no flash read)
0xFFDefault IP 192.168.100.1, port 502; other params from flash

LED Indicators

LEDColorPatternMeaning
S/EGreenOnAt least one client connection active
S/EGreen2 pulsesNo client connections
S/EGreenBlinkingI/O module initialization in progress
S/EGreen4 pulsesDuplicate IP address detected
S/EGreen5 pulsesMissing, defective, or wrong I/O module
S/EGreen6 pulsesFlash memory error (incomplete save)
S/ERedOnMajor unrecoverable fault
L/A IFxGreenOnLink established, no activity
L/A IFxGreenBlinkingEthernet activity on RJ45 port

Register Layout (Configuration Space)

The X20BC0087 exposes configuration data in holding registers starting at address 0x1000:

Address RangeContentLength
0x1003–0x100EIP address, subnet, gateway4 words each
0x1140Write 0xC1 to apply IP save1 word

Process data (live I/O values) is mapped in the process image section. The exact layout depends on the I/O modules connected and the configuration loaded via the ModbusTCP Toolbox (see ModbusTCP Toolbox below).


ModbusTCP Toolbox

The ModbusTCP Toolbox is B&R’s free Windows application for configuring and diagnosing the X20BC0087. Download it from the B&R website (search “ModbusTCP Toolbox” in Downloads).

Connecting to the X20BC0087

  1. Connect a laptop Ethernet port directly to either RJ45 on the X20BC0087.
  2. Set your laptop IP to the same subnet (e.g., 192.168.100.10/24 for the default 192.168.100.1).
  3. Verify with ping 192.168.100.1.
  4. If the IP is unknown, set the network address switches to F/F (0xFF) and power cycle to force factory default IP.

Network Configuration via Toolbox

  1. Open ModbusTCP Toolbox → Tools > Configure Network Parameters.
  2. Enter the IP address and port (default: 192.168.100.1, 502).
  3. If the connection succeeds, the wizard shows MAC address and current network parameters.
  4. Modify IP, subnet, gateway as needed. Click Next.
  5. Choose whether to save to flash and reboot. Click Finish.

Error 12092 indicates a network connectivity issue — verify the IP and physical link.

Loading a New Configuration from Automation Studio

  1. Create an Automation Studio project with CPU type “ModbusCPU”.
  2. In the Physical View, add the X20BC0087 to the Modbus interface and add I/O modules to the X2X interface in the exact physical order they appear on the bus.
  3. Configure I/O module channels (enable/disable, filter settings, ranges) by right-clicking each module → Configuration.
  4. Build the project. When prompted to Transfer, select “Don’t Transfer”.
  5. Note the output path containing ModbusConfig.xml (inside Temp\Objects\Config1\ModbusCPU\AsFDOutput\).
  6. Open ModbusTCP Toolbox → File > Open → navigate to ModbusConfig.xml.
  7. Select the bus controller → Transfer Configuration.

Device Diagnostics

In the Toolbox, use Tools > Device Diagnostic → connect with IP/port. This displays:

  • Register spaces (configuration and process image)
  • Live data from all connected I/O modules
  • Module status and identification

Watchdog Considerations

If the watchdog timer expires (controlled by Watchdog Mode and Threshold settings), write commands return error code 0x0004 (slave device failure). Reads continue to work regardless. Use the watchdog_reset() method or periodic write-refresh to keep the watchdog satisfied.


Software-Based Modbus on the CP1584 (AsMbTCP / AsMbRTU)

AsMbTCP Library Architecture

The AsMbTCP library is B&R’s standard Modbus TCP implementation, bundled with the Automation Net package in Automation Studio.

Function BlockRoleUse Case
FB_MbTcpMasterTCP ClientPolling remote Modbus slaves
FB_MbTcpSlaveTCP ServerExposing a Modbus data map for external masters
MbTCPSlave (data type)Server InstanceBound to ETH via ModbusTCP_any config
ModuleOk flagDiagnosticTRUE = service running and accepting connections

Configuration Procedure: Both Logical and Physical Views Required

This is the single most common failure mode — omitting the Physical View step causes ModuleOk to stay FALSE with no compile errors.

Step 1 — Logical View: Add the Library

  1. Open the CP1584 configuration in Automation Studio.
  2. In the Logical View, right-click Libraries → Add Library → select AsMbTCP from the Automation Net package.
  3. Confirm no yellow warning icons.

Step 2 — Physical View: Bind to an Ethernet Interface

  1. Open the Physical View of the same configuration.
  2. Double-click the ETH interface (e.g., IF2 on the CP1584).
  3. Set IP address, subnet mask, gateway.
  4. Click Add → ModbusTCP_any. This places a Modbus TCP server on the interface at port 502.
  5. Assign a unique name (e.g., MbSlave1).
  6. Set Unit ID (255 for typical TCP-only, or 1–247 for RTU gateway routing).

Step 3 — Instantiate the Function Block

PROGRAM _CYCLIC
    VAR
        mbSlave : FB_MbTcpSlave;
        modbusMap : ARRAY[0..99] OF WORD;
    END_VAR

    mbSlave.Enable     := TRUE;
    mbSlave.Interface  := 'MbSlave1';
    mbSlave.UnitId     := 255;
    mbSlave.HoldingReg := ADR(modbusMap);
    mbSlave.HoldingCnt := SIZEOF(modbusMap) / 2;
    mbSlave();

    IF mbSlave.ModuleOk THEN
        (* healthy — external masters can read/write modbusMap *)
    ELSE
        diagMsg := mbSlave.DiagString;
    END_IF
END_PROGRAM

For a master, instantiate FB_MbTcpMaster with the remote slave IP, port 502, Unit ID, and a poll request structure.

Ethernet Interface Parameters

ParameterTypical ValueNotes
IP Address192.168.10.1 (master)Must be unique on the subnet
Subnet Mask255.255.255.0Required for broadcast behavior
Default Gateway192.168.10.254Leave empty for isolated networks
Modbus Port502IANA-registered standard port
Unit ID1 or 255255 = ignore for TCP-only
Connection Timeout5000 msTune for WAN links
Max ConnectionsApplication-dependentShared across master FB instances

Master Configuration (Reading External Devices)

To configure the CP1584 as a Modbus TCP master reading external field devices:

  1. In the Physical View, open the ETH port Configuration.
  2. Under Modbus parameters, set Activate Modbus communication = on and Use as Modbus master = on.
  3. Add ModbusTcp_any devices to the ETH interface — each represents one remote slave.
  4. Configure each ModbusTcp_any:
    • Mode: Internet address
    • IP address: The slave’s IP
    • Unit identifier: 255 (or matching the slave’s Unit ID)
    • TCP port: 502 (or slave-specific)
    • Number of pending requests: 1 (default)
  5. Configure Channel Configuration blocks matching the slave’s register map:
    • Register type (Holding Register FC03, Input Register FC04, Coil FC01, Discrete Input FC02)
    • Starting address
    • Number of items (set to 0 for auto-calculation based on channel datatypes)
    • Channel datatypes (USINT, UINT, UDINT, REAL, LREAL — note byte swap warnings for multi-byte types)
  6. Open I/O Mapping of each ModbusTcp_any → assign Process Variables to channels.

Limitation

Slave IP addresses configured in the Physical View cannot be changed at runtime. If dynamic IP discovery is required, use the community modbusTCP-Automation-Studio library (GitHub: br-automation-community/modbusTCP-Automation-Studio) which provides programmatic IP control.


Mapping B&R Variables to Modbus Registers

Dynamic Channel Mode

When configuring the CP1584 as a Modbus TCP slave in dynamic channel mode, the system sequentially maps variables to registers based on their position in the hardware tree. Add an I/O channel → it gets the next available register address automatically.

In this mode, a Holding Register is defined as an Input IO Channel — this means the data flows into the Modbus map from the application. Use AsMbTCPS (slave function block) WordPut() / WordGet() methods to programmatically read and write holding registers from your application code.

Fixed Memory Mode

Fixed mode creates a static memory space. You define the address range and manually copy data in/out using pointer arithmetic or the AsMbTCPS block methods. This gives explicit control over register placement but requires manual management.

Mapping Pattern for Common Data Types

Data TypeRegisters OccupiedByte Order Consideration
USINT1None (fits in single register)
UINT1None
DINT2Swap register order for little-endian devices
UDINT2Swap register order; watch high/low word placement
REAL2Same as UDINT; IEEE 754 float split across two registers
LREAL4Four registers; verify endianness with remote device

Practical Example: Exposing Machine Data via Modbus

PROGRAM _CYCLIC
    VAR
        mbSlave : FB_MbTcpSlave;
        holdingRegs : ARRAY[0..49] OF WORD;
        machineTemp    : LREAL;
        machineSpeed   : DINT;
        faultCode      : UINT;
    END_VAR

    (* Map application variables into the holding register image *)

    (* LREAL machineTemp at registers 0-3 (raw memory copy, 8 bytes) *)
    MemCpy(ADR(holdingRegs[0]), ADR(machineTemp), 8);

    (* DINT machineSpeed at registers 4-5 *)
    (* B&R is big-endian: register 4 = high word, register 5 = low word *)
    MemCpy(ADR(holdingRegs[4]), ADR(machineSpeed), 4);

    (* UINT faultCode at register 6 (single register, no byte-order issue) *)
    holdingRegs[6] := faultCode;

    mbSlave.Enable     := TRUE;
    mbSlave.Interface  := 'MbSlave1';
    mbSlave.UnitId     := 255;
    mbSlave.HoldingReg := ADR(holdingRegs);
    mbSlave.HoldingCnt := 50;
    mbSlave();
END_PROGRAM

Note on endianness: B&R PLCs use big-endian word order for Modbus registers by default. A DINT (32-bit) occupies two consecutive registers, with the most significant word in the lower register number. The MemCpy approach above preserves the PLC’s native byte order — the remote device must be configured to expect big-endian (ABCD) word order. If connecting to a little-endian device, swap the two registers manually.

Cross-Reference to Memory Map

For the full CP1584 internal memory layout (global variables, persistent storage, retentive memory), see memory-map.md. When building a Modbus register map, cross-reference the memory map to avoid conflicts with system-reserved addresses.


Integrating Legacy Modbus Devices into the B&R System

Scenario: Adding a Modbus RTU Device to the CP1584

When a legacy sensor, drive, or instrument speaks only Modbus RTU over RS485, you need:

  1. An X20 serial interface module (X20IF1030 = RS232, X20IF1031 = RS422/485, X20IF1041 = RS422/485 isolated)
  2. The AsMbRTU library (separate from AsMbTCP)

RTU Configuration Steps

  1. Add the serial IF module to the X2X bus in the Physical View.
  2. Configure the serial port: baud rate, parity, stop bits, character timeout to match the legacy device.
  3. In the Logical View, add the AsMbRTU library from the Automation Net package.
  4. Instantiate FB_MbRtuMaster in your cyclic task.
  5. Configure the Modbus RTU request structure (slave address, function code, register address, count).
  6. Read responses into Process Variables via I/O mapping or directly from the FB’s output data.

Scenario: RTU-to-TCP Gateway (B&R PLC as Protocol Bridge)

A powerful pattern for undocumented machines: the B&R PLC acts simultaneously as Modbus RTU master (talking to legacy serial devices) and Modbus TCP server (exposing that data to modern SCADA/IIoT systems).

  1. Configure ETH port as Modbus TCP server (ModbusTCP_any).
  2. Configure serial IF as Modbus RTU master (AsMbRTU).
  3. In application code, poll RTU devices cyclically.
  4. Copy received data into the TCP server’s holding register image.
  5. External systems connect to the CP1584 via Modbus TCP on port 502.

This eliminates the need for a separate hardware gateway (e.g., Moxa MB3180, Anybus AB7702). The CP1584 IS the gateway.

Cross-Reference to Network Architecture

For detailed network topology patterns including VLAN segmentation and firewall placement for Modbus networks, see network-architecture.md.


Extracting Data via Modbus When OPC-UA Is Not Available

When to Use Modbus Instead of OPC-UA

ConditionRecommended Protocol
OPC-UA server already configuredOPC-UA (preferred)
No OPC-UA license, no AS projectModbus TCP
Third-party SCADA requires ModbusModbus TCP
Quick data grab without B&R toolsModbus TCP + Python
Legacy device only supports RTUModbus RTU
Network isolation / no OPC-UA portModbus TCP

Approach 1: X20BC0087 Standalone Gateway

If the CP1584 has X20 I/O on its X2X bus, an X20BC0087 can be inserted (or may already be present). Any Modbus TCP master can then read the I/O process image directly — no B&R application code changes required.

  1. Verify X20BC0087 presence in the X2X bus (green LED activity).
  2. Set IP via network address switches or ModbusTCP Toolbox.
  3. Use any Modbus TCP client (Modbus Poll, Python pymodbus, Node-RED) to connect.
  4. Read input registers for analog inputs, coils for digital inputs.

Approach 2: AsMbTCP Slave on the CP1584

If you have the Automation Studio project (or can upload from the running CPU):

  1. Add the AsMbTCP library and ModbusTCP_any binding.
  2. Expose key variables as holding registers.
  3. Connect external systems to the CP1584 IP on port 502.

Approach 3: AsMbTCP Master from External System

If you only know the CP1584 IP and have no AS project access:

  1. If the CPU was configured as a Modbus TCP slave by the OEM, attempt connection with a generic Modbus TCP client on port 502.
  2. Scan holding register address ranges (0–100, 100–500, 1000+) to discover live data.
  3. Use pymodbus for automated scanning:
from pymodbus.client import ModbusTcpClient

client = ModbusTcpClient('192.168.1.10', port=502)
client.connect()

# Scan holding registers
for start in range(0, 2000, 100):
    result = client.read_holding_registers(start, count=100)
    if not result.isError():
        vals = [v for v in result.registers if v != 0]
        if vals:
            print(f"Holding registers {start}-{start+99}: {result.registers}")

client.close()

Cross-Reference to OPC-UA

For the full OPC-UA server configuration on the CP1584, including certificate management and namespace setup, see opcua.md. Modbus is the fallback when OPC-UA is not licensed or not configured.

Cross-Reference to PVI API

For programmatic data access from a PC using the B&R PVI (Process Visualization Interface) library — which does not require Modbus — see pvi-api.md. PVI provides direct access to B&R process variables via a proprietary protocol and may be available even when Modbus is not configured.


Diagnostic Verification

Four-Layer Check

Always verify connectivity in this order:

  1. PHY layer: LinkActive must be TRUE on both endpoints. Check LED link lights.
  2. IP layer: Ping the peer from Automation Studio (Online → Diagnostic Tools) or command line.
  3. Modbus layer: ModuleOk on the FB must be TRUE. Verify outbound/inbound byte counters incrementing.
  4. Application layer: Write a known test value (e.g., holding register 0 = 0xAA55) and read it back.

Troubleshooting Matrix

SymptomLikely CauseFix
ModuleOk stays FALSE, ping OKModbusTCP_any not added in Physical ViewAdd ModbusTCP_any to ETH port; re-download
No traffic on WiresharkIP misconfigured or VLAN taggedVerify IP settings, switch VLAN compatibility
Master connection timeoutSlave firewall blocks TCP/502Open port 502 inbound on slave / fix VLAN
Holding registers return swapped bytesEndian mismatch with remote deviceApply byte-swap or explicit converter
ModuleOk toggles after restartIP conflict on subnetFree conflicting address or change local IP
“Unit ID not supported” errorRemote gateway requires specific Unit IDSet master’s UnitId to match the gateway
Multiple masters cannot connectConnection pool exhaustedIncrease Max Connections or rate-limit polls
Watchdog timeout (error 0x0004)Write commands fail; reads workReset watchdog periodically; check Watchdog Mode/Threshold
Error 12092 in ModbusTCP ToolboxCannot reach X20BC0087Check physical link, IP address, switch settings

Logger and Communication Diagnostics

In Automation Studio, check the Logger (specifically the “Communication” module) for error messages. Use Online → Diagnostic Tools for real-time ETH port status (LinkActive, Speed, Duplex).


Community Libraries and Tools

GitHub: br-automation-community/modbusBR-Python

A Python class for interacting with the X20BC0087 bus controller. Provides:

  • Connect(ip, port) / Disconnect()
  • ReadDigitalInputs(module_nr, size, offset) → list of bools
  • WriteDigitalOutputs(module_nr, values, offset) → bool
  • ReadAnalogInputs(module_nr, size, offset) → list of ints
  • WriteAnalogOutputs(module_nr, values, offset) → bool
  • MasterMDinfo() — enumerate connected X20 hardware modules
  • MasterBRBCinfo — bus controller info (IP, MAC, firmware, watchdog, process data counts)
  • ctrl_save(), ctrl_load(), ctrl_reboot(), ctrl_erase(), ctrl_reset_cfg()

Repository: https://github.com/br-automation-community/modbusBR-Python

This is the fastest way to script data extraction from an X20BC0087 without Automation Studio.

GitHub: br-automation-community/modbusTCP-Automation-Studio

A community Modbus TCP library for Automation Studio supporting legacy runtimes that don’t support native Modbus TCP. Supports both master and slave modes. Version 3.0 targets AS6.x.

Key advantage over built-in AsMbTCP: runtime-configurable IP addresses — slave IPs can be changed programmatically at runtime.

Repository: https://github.com/br-automation-community/modbusTCP-Automation-Studio

Other Useful Tools

ToolPurposePlatform
ModbusTCP ToolboxConfigure/diagnose X20BC0087Windows
Modbus PollGeneric Modbus master test clientWindows
pymodbusPython Modbus TCP/RTU client libraryCross-platform
CDP StudioThird-party IDE with native X20BC0087 supportWindows/Linux
Node-REDFlow-based Modbus integrationCross-platform
WiresharkProtocol analysis on TCP/502Cross-platform

Security Considerations

Modbus TCP has no native authentication or encryption. For industrial environments:

  • Isolate Modbus TCP on a dedicated VLAN or back-to-back IP segment
  • Disable Modbus on ETH ports not in use; remove unused ModbusTCP_any bindings
  • Front the network with a stateful firewall; allow only known peer IPs on TCP/502
  • For new deployments, prefer OPC-UA with certificate-based security (see opcua.md)
  • Consider tunneling Modbus TCP inside a VPN for remote access scenarios
  • Follow IEC 62443 network zoning rules for critical infrastructure

Performance and Timing

ParameterTypical Value
TCP round-trip2–8 ms (100 Mbit/s, same subnet)
I/O cycle (X20BC0087)0.5–4 ms configurable
Max holding registers65536 (0-based addressing)
Max registers per read125 words (FC03/FC04 spec limit)
Recommended task cycle5 ms (small maps) to 20 ms (large maps)
Watchdog timeoutConfigurable via ModbusTCP Toolbox

Verification Checklist

  • AsMbTCP library added in Logical View for the target CPU
  • ModbusTCP_any element added in Physical View of the same CPU
  • ETH interface IP / mask / gateway configured and saved
  • FB instance declared in cyclic program with Enable = TRUE
  • ModuleOk = TRUE observed within 2 s of download
  • Wireshark shows TCP/502 PDUs in both directions
  • End-to-end read/write test passes (write holding register, read back)
  • Disconnect test: unplug cable → ModuleOk = FALSE within timeout
  • Byte ordering verified for multi-register data types (UDINT, REAL, LREAL)
  • Watchdog configuration checked (if writing to X20BC0087)

Modbus Exception Codes: Complete Reference

Understanding exception codes is critical when scanning unknown devices or debugging communication failures. Every Modbus slave returns an exception response (function code + 0x80, followed by a single-byte exception code) when it cannot fulfill a request.

Exception Response Format

TCP Response: [MBAP Header 7 bytes] [FC + 0x80] [Exception Code]
Example: 00 01 00 00 00 03 01 83 02
         ← MBAP Header →            FC  ExcCode
         (Exception: FC03 + 0x80 = 0x83, Code 02 = Illegal Data Address)

All Standard Exception Codes

Code (Hex/Dec)NameWhen It Happens on a B&R System
0x01 / 1Illegal FunctionThe register type (FC03 holding, FC04 input) does not match what the slave exposes
0x02 / 2Illegal Data AddressRegister address out of range – most common when scanning unknown devices
0x03 / 3Illegal Data ValueQuantity exceeds FC limits (FC03/04 max=125, FC16 max=123) or quantity=0
0x04 / 4Slave Device FailureInternal error – on X20BC0087, this is the watchdog timeout error code
0x05 / 5AcknowledgeLong operation in progress (rare in normal polling)
0x06 / 6Slave Device BusySlave processing another request
0x08 / 8Memory Parity ErrorOnly with FC20/21 file record functions (not typical)
0x0A / 10Gateway Path UnavailableRTU-to-TCP gateway has no route to target Unit ID
0x0B / 11Gateway Target No ResponseGateway forwarded but target slave did not answer

Codes 07 and 09 are not assigned in the Modbus specification.

B&R-Specific Exception Behavior

  • X20BC0087 Watchdog Timeout: Write commands return exception code 0x04 (Slave Device Failure) when the watchdog expires. Read commands continue to work regardless of watchdog state. Reset the watchdog periodically or adjust the watchdog threshold in the ModbusTCP Toolbox.
  • AsMbTCP Slave Bounds: If the master requests registers beyond the configured HoldingCnt size, the CP1584 returns exception 0x02.
  • AsMbTCP Dual Role: One ETH port can host both master and slave simultaneously by adding two ModbusTCP_any elements with distinct names.

Detecting Exception Responses in Wireshark

FilterPurpose
modbus.func_code >= 128Show all exception responses
modbus.exception_code == 2Show only Illegal Data Address
modbus.exception_code == 4Show only Slave Device Failure
modbus && tcp.port == 502All Modbus TCP traffic

Exception Code vs. Communication Failure

ConditionWhat HappensMaster Sees
Exception responseSlave heard the request but cannot fulfill itResponse frame with FC + 0x80 + error code
Communication errorRequest lost, slave offline, or CRC errorTimeout after configured period

An exception means the slave heard the request. A timeout means it did not. These require different troubleshooting approaches.


Wireshark Deep-Dive for Modbus TCP on B&R Systems

Capture Setup

Modbus TCP runs on TCP port 502. Modern managed switches forward unicast traffic only to the destination port, so a laptop connected to a mirror port or a cheap unmanaged hub is required for visibility.

# Capture filter on the mirror port
tcpdump -i eth0 -w modbus_capture.pcap port 502

# Or in Wireshark capture options: "tcp port 502"

Wireshark Display Filters

# All Modbus TCP traffic
modbus

# Only requests (master → slave)
modbus.func_code <= 16

# Only responses (slave → master)
modbus.func_code > 16 && modbus.func_code < 128

# Only exception responses
modbus.func_code >= 128

# Traffic to/from specific B&R device
modbus && ip.addr == 192.168.10.1

# Timing analysis: show round-trip times
modbus && tcp.time_delta > 0.05

# Identify connection problems
tcp.analysis.flags

MBAP Header Structure

Every Modbus TCP frame starts with the MBAP header (7 bytes):

FieldBytesDescription
Transaction ID2Matches request/response pairs (incremented by master)
Protocol ID2Always 0x0000 for Modbus
Length2Number of following bytes (Unit ID + PDU)
Unit ID1Slave address (1-247 for RTU gateways, 255 for TCP-only)

Diagnostic Patterns in Packet Captures

PatternMeaningLikely Cause
Duplicate Transaction IDsMaster retransmittingSlave not responding; timeout too short
TCP retransmissions at L2Network congestion or duplex mismatchCheck switch settings; verify cable
Response delay > 100 msSlave processing slowlyTask cycle too long; CPU overloaded
Exception 0x02 in every responseRegister map mismatchWrong addressing convention (0-based vs 1-based)
RST packets after idle periodConnection timeoutFirewall or NAT killing idle connections
TCP zero-windowSlave buffer fullMaster polling too fast; increase poll interval

Port Mirroring Configuration

When the B&R PLC and Modbus devices are connected through a managed switch (typical), configure SPAN/mirroring:

# Cisco-like managed switch example
monitor session 1 source interface gi1/0/1  (B&R PLC port)
monitor session 1 dest   interface gi1/0/10 (laptop port)

# Alternatively: use a cheap 5-port unmanaged hub (not switch)
# between the PLC and the first Modbus device for guaranteed visibility

Advanced Python Scripting for B&R Modbus Data Extraction

Automated Register Map Discovery

When connecting to an unknown CP1584 that may have Modbus TCP enabled, use this script to discover the active register map:

#!/usr/bin/env python3
"""B&R Modbus TCP register map discovery tool.
Scans a Modbus TCP slave for active holding registers and input registers.
"""

import time
from pymodbus.client import ModbusTcpClient

def discover_registers(ip, port=502, unit_id=255, max_addr=2000, batch_size=100):
    client = ModbusTcpClient(ip, port=port, timeout=3)
    if not client.connect():
        print(f"Cannot connect to {ip}:{port}")
        return {}

    active_ranges = {}
    for start in range(0, max_addr, batch_size):
        for fc_name, fc in [("holding_registers", 3), ("input_registers", 4)]:
            try:
                if fc == 3:
                    result = client.read_holding_registers(start, count=batch_size,
                                                           slave=unit_id)
                else:
                    result = client.read_input_registers(start, count=batch_size,
                                                         slave=unit_id)
                if not result.isError():
                    non_zero = [i for i, v in enumerate(result.registers) if v != 0]
                    if non_zero:
                        key = f"{fc_name}[{start}-{start + batch_size - 1}]"
                        active_ranges[key] = result.registers
                        print(f"  FOUND {key}: {len(non_zero)} non-zero registers")
                elif result.isError():
                    exc_code = getattr(result, 'exception_code', None)
                    if exc_code == 2:
                        break  # past end of register map
                    elif exc_code == 4:
                        print(f"  ERROR {fc_name}[{start}]: Slave Device Failure (0x04)")
                        break
            except Exception as e:
                print(f"  Error at {fc_name}[{start}]: {e}")
        time.sleep(0.05)

    client.close()
    return active_ranges


if __name__ == "__main__":
    import sys
    ip = sys.argv[1] if len(sys.argv) > 1 else "192.168.10.1"
    print(f"Scanning {ip}:502 for Modbus TCP registers...")
    results = discover_registers(ip)
    print(f"\nFound {len(results)} active register ranges")

Continuous Data Logger with Timestamps

#!/usr/bin/env python3
"""B&R Modbus TCP continuous data logger.
Polls specified registers at a fixed interval and logs to CSV.
Cross-references [time-sync.md](time-sync.md) for timestamp accuracy.
"""

import csv
import time
from datetime import datetime, timezone
from pymodbus.client import ModbusTcpClient

REGISTERS = {
    "machine_temp": (0, 4, "LREAL"),
    "machine_speed": (4, 2, "DINT"),
    "fault_code":   (6, 1, "UINT"),
    "run_status":   (7, 1, "UINT"),
}

def read_registers(client, addr, count, unit_id=255):
    result = client.read_holding_registers(addr, count, slave=unit_id)
    if result.isError():
        return None
    return result.registers

def decode_lreal(words):
    if len(words) < 4:
        return None
    import struct
    bytes_data = struct.pack('>HH', words[0], words[1]) + \
                 struct.pack('>HH', words[2], words[3])
    return struct.unpack('>d', bytes_data)[0]

def decode_dint(words):
    if len(words) < 2:
        return None
    val = (words[0] << 16) | words[1]
    if val >= 0x80000000:
        val -= 0x100000000
    return val

def main(ip, output_file, poll_interval=1.0):
    client = ModbusTcpClient(ip, port=502, timeout=3)
    if not client.connect():
        print(f"Cannot connect to {ip}")
        return

    print(f"Connected to {ip}. Logging every {poll_interval}s to {output_file}")
    print("Press Ctrl+C to stop.")

    with open(output_file, 'w', newline='') as f:
        writer = csv.writer(f)
        headers = ["timestamp_iso", "timestamp_epoch"] + list(REGISTERS.keys())
        writer.writerow(headers)

        try:
            while True:
                ts = datetime.now(timezone.utc)
                row = [ts.isoformat(), ts.timestamp()]
                for name, (addr, count, dtype) in REGISTERS.items():
                    words = read_registers(client, addr, count)
                    if words is None:
                        row.append("ERROR")
                    elif dtype == "LREAL":
                        row.append(f"{decode_lreal(words):.2f}")
                    elif dtype == "DINT":
                        row.append(decode_dint(words))
                    else:
                        row.append(words[0])
                writer.writerow(row)
                f.flush()
                print(f"  {ts.isoformat()} | {' | '.join(str(v) for v in row[2:])}")
                time.sleep(poll_interval)
        except KeyboardInterrupt:
            print("\nLogging stopped.")
        finally:
            client.close()

if __name__ == "__main__":
    import sys
    ip = sys.argv[1] if len(sys.argv) > 1 else "192.168.10.1"
    main(ip, "modbus_log.csv")

Using the modbusBR-Python Community Library

The modbusBR-Python library (GitHub: br-automation-community/modbusBR-Python) is purpose-built for the X20BC0087 and provides direct methods for I/O module enumeration and data access without needing to know register addresses:

from modbusBR import ModbusBR

br = ModbusBR()
br.Connect("192.168.100.1", 502)

# Enumerate all connected X20 modules
info = br.MasterMDinfo()
for module in info:
    print(f"Module: {module}")

# Read analog inputs from first I/O module
ai_values = br.ReadAnalogInputs(module_nr=0, size=8, offset=0)
print(f"Analog inputs: {ai_values}")

# Read digital inputs
di_values = br.ReadDigitalInputs(module_nr=0, size=16, offset=0)
print(f"Digital inputs: {di_values}")

# Write digital outputs
br.WriteDigitalOutputs(module_nr=0, values=[True, False, True], offset=0)

# Get bus controller info
bc_info = br.MasterBRBCinfo()
print(f"IP: {bc_info.ip}, MAC: {bc_info.mac}")
print(f"Firmware: {bc_info.firmware_version}")
print(f"Process data in: {bc_info.process_data_in_count}")
print(f"Process data out: {bc_info.process_data_out_count}")

br.Disconnect()

Modbus RTU Deep-Dive: AsMbRTU on the CP1584

Serial Interface Modules

ModuleInterfaceIsolationUse Case
X20IF1030RS232Non-isolatedPoint-to-point, short distances, legacy devices
X20IF1031RS422/485Non-isolatedMulti-drop RS485 networks, longer distances
X20IF1041RS422/485Galvanically isolatedElectrically noisy environments, long cable runs

AsMbRTU Function Blocks

Function BlockRoleKey Parameters
FB_MbRtuMasterRTU Master (poller)Interface, BaudRate, SlaveAddr, FC, RegAddr, RegCnt
FB_MbRtuSlaveRTU SlaveInterface, BaudRate, CoilRef, InputRef, HoldingRef, InputRegRef

RTU Master Configuration Example

PROGRAM _CYCLIC
    VAR
        rtuMaster : FB_MbRtuMaster;
        request   : MbRtuRequest;
        response  : MbRtuResponse;
        slaveData : ARRAY[0..49] OF WORD;
        errorCount: UDINT;
    END_VAR

    (* Configure the RTU request *)
    request.SlaveAddr  := 1;
    request.FunctionCode:= 3;  (* Read Holding Registers *)
    request.DataAddr   := 0;
    request.DataCnt    := 50;
    request.Timeout    := T#500MS;

    rtuMaster(
        Enable    := TRUE,
        Interface := 'IF1.Serial1',
        BaudRate  := 9600,
        Parity    := 0,      (* 0=None, 1=Odd, 2=Even *)
        StopBits  := 1,
        Request   := request,
        Response  := response
    );

    IF rtuMaster.ModuleOk THEN
        IF NOT rtuMaster.Busy AND rtuMaster.Done THEN
            IF rtuMaster.Error THEN
                errorCount := errorCount + 1;
            ELSE
                MemCpy(ADR(slaveData), ADR(response.Data), SIZEOF(slaveData));
            END_IF
        END_IF
    END_IF
END_PROGRAM

Multi-Drop RTU Wiring

For RS485 multi-drop networks with multiple slave devices:

                    120 Ohm               120 Ohm
CP1584 ── IF1031 ────┤├──── Slave 1 ──────┤├──── Slave 2 ──── (open)
(Terminated)            (not terminated)     (terminated)
  • Terminate only the first and last devices on the bus with 120 ohm resistors
  • Maximum 32 devices per RS485 segment (standard)
  • Max cable length: 1200 m at 9600 baud, decreasing with higher baud rates
  • Use twisted pair cable (Cat5e shielded works well)
  • Bias resistors (if required): 1 kohm pull-up to V+ and pull-down to GND at the master

RTU Timing Parameters

ParameterRecommended ValueNotes
Character timeout1.5 × character time at current baud3.5 character times per Modbus spec
Inter-frame delaySilent interval ≥ 3.5 character timesModbus RTU frame delimiter
Response timeout100-500 msDepends on slave processing time
Poll interval2 × max response time minimumAvoid flooding slow slaves

RTU vs. TCP Decision Matrix

FactorModbus RTUModbus TCP
Physical layerRS232/RS422/485Ethernet
Speed9600-115200 baud10/100/1000 Mbit/s
DistanceUp to 1200 m100 m per segment
Devices per segmentUp to 32 (RS485)Unlimited (IP addressing)
Noise immunityGood (differential signaling on RS485)Excellent (Ethernet PHY)
Additional hardwareSerial IF module neededNo extra hardware
DiagnosticsLimited (no ACK from protocol itself)TCP ACK, Wireshark visibility
Best forLegacy field devices, long cable runsNew installations, high speed, IIoT

Modbus-to-MQTT Bridge with Node-RED

For IIoT retrofits, bridging Modbus data to MQTT enables cloud connectivity and modern dashboards. See iiot-retrofit.md for the full IIoT architecture guide.

Node-RED Flow for B&R Modbus TCP to MQTT

[Modbus TCP Read] → [Function: Decode] → [MQTT Out]
       ↓                                         ↑
  Poll every 1s                          topic: machine/br/{var}

Sample Node-RED Configuration

[
    {
        "id": "modbus_poll",
        "type": "modbus-flex-getter",
        "server": "br_modbus_tcp",
        "fc": 3,
        "address": 0,
        "quantity": 10
    },
    {
        "id": "decode_and_publish",
        "type": "function",
        "func": "var words = msg.payload;\nmsg.topic = 'machine/br/registers';\nmsg.payload = words.map(function(w) { return w; });\nreturn msg;"
    },
    {
        "id": "mqtt_out",
        "type": "mqtt out",
        "broker": "mqtt_broker",
        "topic": "machine/br/registers"
    }
]

Performance Considerations for Bridges

ParameterRecommended Setting
Poll interval≥ task cycle time of the B&R Modbus FB
MQTT QoS0 for telemetry, 1 for alarms
Batch sizeKeep ≤ 125 registers per Modbus read (FC03 limit)
Payload formatJSON array or individual MQTT messages per register
TLS/SSLEnable on MQTT if crossing network boundaries

Dual Master/Slave Configuration on a Single Port

One CP1584 ETH port can simultaneously be a Modbus TCP master (polling external devices) and a server (exposing data to SCADA). This is powerful for undocumented machines where the PLC bridges legacy field devices to modern monitoring.

Configuration Steps

  1. In the Physical View, add two ModbusTCP_any elements to the same ETH interface with distinct names (e.g., MbSlave1 and MbMaster1).
  2. In the program, instantiate both FB_MbTcpSlave and FB_MbTcpMaster:
PROGRAM _CYCLIC
    VAR
        mbSlave  : FB_MbTcpSlave;
        mbMaster : FB_MbTcpMaster;
        holdingRegs : ARRAY[0..99] OF WORD;
        masterResp  : MbTcpResponse;
        masterReq   : MbTcpRequest;
    END_VAR

    (* Slave: expose holding registers to SCADA *)
    mbSlave.Enable     := TRUE;
    mbSlave.Interface  := 'MbSlave1';
    mbSlave.UnitId     := 255;
    mbSlave.HoldingReg := ADR(holdingRegs);
    mbSlave.HoldingCnt := 100;
    mbSlave();

    (* Master: poll an external device and copy into holding registers *)
    masterReq.IP       := '192.168.10.50';
    masterReq.Port     := 502;
    masterReq.UnitId   := 1;
    masterReq.FC       := 3;
    masterReq.Addr     := 0;
    masterReq.Cnt      := 20;
    masterReq.Timeout  := T#2000MS;

    mbMaster(
        Enable    := TRUE,
        Interface := 'MbMaster1',
        Request   := masterReq,
        Response  := masterResp
    );

    IF mbMaster.Done AND NOT mbMaster.Error THEN
        (* Copy polled data into holding register area for SCADA access *)
        MemCpy(ADR(holdingRegs[20]), ADR(masterResp.Data), SIZEOF(masterResp.Data));
    END_IF
END_PROGRAM

Modbus Gateway for Spare Parts Replacement

When a legacy third-party device that communicated via Modbus fails and must be replaced:

Register Map Reconstruction from Packet Capture

  1. Capture Modbus traffic with Wireshark before the device fails (if possible)
  2. Export the capture as CSV: File → Export Packet Dissections → As CSV
  3. Parse to build a register map:
import csv

def build_register_map(csv_file):
    registers = {}
    with open(csv_file, 'r') as f:
        reader = csv.DictReader(f)
        for row in reader:
            if 'Modbus' in row.get('Protocol', ''):
                func_code = int(row.get('Function Code', '0'), 0)
                address = int(row.get('Reference Number', '0'), 0)
                quantity = int(row.get('Quantity', '0'), 0)
                key = f"FC{func_code:02d}"
                if key not in registers:
                    registers[key] = set()
                for i in range(quantity):
                    registers[key].add(address + i)
    return registers
  1. Cross-reference the register map with the replacement device’s documentation
  2. If the replacement device uses different addressing, create a mapping table in the CP1584 program

See Also


Key Findings

  1. Two-step configuration trap: The most common failure on B&R Modbus is adding the AsMbTCP library in the Logical View but forgetting to add ModbusTCP_any in the Physical View. The program compiles cleanly, but ModuleOk never goes TRUE. Both registrations are mandatory.

  2. X20BC0087 is self-contained: It does not need a B&R CPU. Any Modbus TCP master (SCADA, Python script, HMI) can read/write its I/O process image. This makes it the ideal gateway for undocumented machines — if one is on the X2X bus, you may not need to touch the PLC at all.

  3. Default IP is 192.168.100.1: Set network address switches to FF and power cycle to recover the factory default. The MAC address is printed on the housing and also serves as the NetBIOS name (br + MAC).

  4. ModbusTCP Toolbox is free and essential: Download from B&R (current version V1.5.0). It configures IP, loads XML configurations from Automation Studio, and provides live diagnostic access to the process image and module configuration.

  5. Watchdog blocks writes on timeout: The X20BC0087 watchdog does not affect reads, but expired watchdog causes all write FCs to return error 0x0004. Periodic watchdog resets are required if you need to write to I/O.

  6. Community Python library exists: The modbusBR-Python library on GitHub provides a complete interface to the X20BC0087 including module enumeration, analog/digital I/O read/write, and configuration management.

  7. Runtime IP change limitation: The built-in Modbus master configuration uses static IPs from the Physical View and cannot change them at runtime. The community modbusTCP-Automation-Studio library bypasses this limitation for dynamic IP scenarios.

  8. Byte order is the silent killer: B&R is little-endian internally; Modbus is big-endian. Always verify byte ordering with a known value when reading/writing multi-register types. This is the second most common field issue after the Physical View omission.

  9. Modbus is the OPC-UA fallback: When OPC-UA is not available or not licensed on the CP1584, Modbus TCP over the built-in Ethernet port is the most practical data extraction method.

  10. Exception 0x02 is your friend when scanning: When probing an unknown register map, exception code 02 (Illegal Data Address) tells you the slave heard the request but the address is out of range — use this to binary-search for the boundaries of the register map. Exception 0x04 (Slave Device Failure) on the X20BC0087 specifically indicates watchdog expiration on writes.

  11. Dual master/slave on one port: The CP1584 can simultaneously be a Modbus TCP master (polling legacy devices) and server (exposing data to SCADA) on the same ETH interface by adding two ModbusTCP_any elements. This makes the PLC itself a protocol bridge.

  12. Wireshark visibility requires port mirroring: Modern managed switches do not forward unicast traffic to other ports. Use a managed switch SPAN/mirror port or insert a cheap unmanaged hub to capture Modbus TCP traffic between PLC and slaves.

  13. RTU termination rules: Only terminate the first and last devices on an RS485 multi-drop network with 120 ohm resistors. The master (CP1584) should be terminated if it is at one end of the bus.

  14. Modbus-to-MQTT bridge is trivial with Node-RED: A few nodes connect Modbus TCP polling to MQTT publishing, enabling cloud dashboards for machines never designed for remote monitoring. See iiot-retrofit.md.


Sources

  • B&R Automation Studio AsMbTCP / AsMbRTU Library Online Help
  • B&R X20BC0087 Bus Controller Data Sheet and ModbusTCP Toolbox documentation
  • Modbus Protocol Specification (Modbus.org) — function codes, register types, and exception codes
  • B&R Community Forum (community.br-automation.com) — Modbus TCP configuration and troubleshooting discussions
  • GitHub: community Modbus libraries for B&R (modbusBR-Python, modbusTCP-Automation-Studio)
  • Industrial Monitor Direct: Configuring AsMbTCP Library for Modbus TCP on B&R PLC/IPC (July 2026)
  • SCADA Protocols: Modbus Exception Codes Explained (April 2026)
  • FlowFuse: How to Bridge Modbus to MQTT with Node-RED (December 2024)

Battery-Backed SRAM and Retentive Data on the B&R CP1584

Scope: X20CP1584, Automation Runtime (AR), IEC 61131-3 on B&R, retentive/permanent variable semantics, battery maintenance, and data recovery.

Audience: Automation engineers maintaining B&R X20 PLCs on machines from defunct OEMs with zero documentation.

Last updated: July 2026


Table of Contents

  1. Overview
  2. Memory Hierarchy Relevant to Retentive Data
  3. What the Battery Actually Backs Up
  4. Battery Hardware on the X20CP1584
  5. VAR RETAIN vs VAR PERSISTENT: Critical Semantics
  6. Cold Start vs Warm Start vs INIT: What Survives
  7. Battery Status Monitoring
  8. Battery Replacement Procedure (Without Data Loss)
  9. Backing Up Retentive Data
  10. Restoring Retentive Data
  11. Recovery After Battery Death and Total Data Loss
  12. Function Block RETAIN Memory Trap
  13. Identifying All Retentive Variables in an Unknown Project
  14. Best Practices for Long-Term Maintenance
  15. Key Findings
  16. Sources
  17. Cross-References

1. Overview

The X20CP1584 uses a lithium backup battery to maintain the contents of 1 MB of SRAM when main power is removed. This SRAM holds retentive (remanent) variables, the real-time clock, and working data buffers. If the battery dies or is removed for too long, every value in SRAM is lost irreversibly.

B&R Automation Runtime provides two distinct mechanisms for data survival across restarts: VAR RETAIN (battery-backed SRAM) and VAR PERSISTENT (stored on CompactFlash). Understanding the difference is critical because each behaves differently during cold starts, program transfers, and battery failures.

See also: memory-map.md for the full CPU memory layout, cf-card-boot.md for CF card partition structure, ar-rtos.md for AR internals and boot states.


2. Memory Hierarchy Relevant to Retentive Data

+----------------------------------------------------------+
|  CompactFlash (removable)                                 |
|  +------------------------------------------------------+ |
|  |  User Flash / User ROM                                 | |  Application code, configuration
|  |  (Non-volatile)                                        | |
|  +------------------------------------------------------+ |
|  |  Cpu.per / persistent data area                        | |  VAR PERSISTENT values live here
|  |  (File-based, non-volatile)                            | |  Survives everything except CF loss
|  +------------------------------------------------------+ |
|  +------------------------------------------------------+ |
|  |  Automation Runtime / OS files                         | |
|  |  (Non-volatile)                                        | |
|  +------------------------------------------------------+ |
+----------------------------------------------------------+
+----------------------------------------------------------+
|  SRAM — 1 MB (User RAM)          [BATTERY-BACKED]        |
|  +------------------------------------------------------+ |
|  |  Retentive variables (VAR RETAIN)                      | |  Max 256 KB on CP1584
|  |  (Remanent data area)                                  | |
|  +------------------------------------------------------+ |
|  |  User RAM buffers, working data                       | |
|  +------------------------------------------------------+ |
|  |  Real-time clock data                                 | |
|  +------------------------------------------------------+ |
+----------------------------------------------------------+
+----------------------------------------------------------+
|  DDR2 SDRAM — 256 MB (System RAM)  [NOT battery-backed]  |
|  OS, task memory, heap, I/O image                        |
+----------------------------------------------------------+
+----------------------------------------------------------+
|  System Flash (internal)          [NOT battery-backed]   |
|  Boot loader, AR kernel, hardware drivers                 |
+----------------------------------------------------------+

Key distinction: Only the SRAM layer is battery-backed. Everything in DDR SDRAM is volatile and is discarded on every restart. See memory-map.md Section 13 for the full CP1584 memory layout with address ranges.


3. What the Battery Actually Backs Up

The lithium backup battery maintains the following areas during power loss:

AreaSizeDescription
Retentive variables (VAR RETAIN)Max 256 KBAll variables declared with VAR RETAIN
User RAM (SRAM)1 MB totalWorking data buffers
System RAMRuntime system buffers
Real-time clockTime-of-day (non-volatile on CP1584, but battery prevents drift during power loss)

The battery voltage is monitored cyclically by Automation Runtime. A load test is performed that does not significantly shorten battery life but provides early warning of weakened capacity. See Section 7.

What Is NOT Battery-Backed

  • DDR2 SDRAM (256 MB) — all task memory, I/O images, non-retained variables
  • CompactFlash contents — application code, persistent variable files, configuration
  • System Flash — bootloader and AR firmware

4. Battery Hardware on the X20CP1584

4.1 Battery Specifications

PropertyValue
TypeLithium button cell
Voltage3 V
Capacity950 mAh
Part number (single)4A0006.00-000
Part number (4-pack)0AC201.91
Recommended replacement intervalEvery 4 years
Minimum service life2 years at 23 degrees C ambient
Storage temperature-20 to +60 degrees C
Max storage time3 years at 30 degrees C
Humidity tolerance0 to 95% (non-condensing)

4.2 Battery Location

The lithium battery is located in a separate compartment on the CPU module, protected by a sliding cover. It is positioned under the USB interface IF4 (the left USB port when looking at the front of the CPU).

The battery compartment is on the CPU module itself — not on the power supply module or any bus module.

4.3 Battery Status LED

The X20CP1584 has a dedicated battery status indicator:

LED LabelColorStateMeaning
DC OKGreenOnCPU power supply OK
DC OKRedOnBackup battery is EMPTY or MISSING

If the DC OK LED is red, the battery is depleted or absent. The SRAM is at risk of data loss during any power interruption. Replace the battery immediately.

Important: The DC OK LED being red does NOT mean the CPU is failing. The CPU runs fine on main power. The red LED only warns that the battery cannot maintain SRAM during a power loss.

4.4 Capacitor Bridge

In addition to the lithium battery, the CPU board has a capacitor (condensator) that provides a short-term SRAM bridge during very brief power interruptions. This capacitor holds SRAM for a short duration (seconds, not minutes). It is NOT a substitute for a functional battery.


5. VAR RETAIN vs VAR PERSISTENT: Critical Semantics

B&R Automation Runtime uses distinct terminology from CODESYS and other IEC 61131-3 systems. Understanding these differences is essential when reverse-engineering an unknown project.

5.1 VAR RETAIN (Remanent Variables)

VAR RETAIN
    PartCounter   : UDINT;
    MachineHours   : TIME;
    LastFaultCode  : USINT;
END_VAR
PropertyValue
Storage locationBattery-backed SRAM (remanent data area)
Max size on CP1584256 KB
Survives warm restartYes
Survives cold restartNo — reset to 0/default
Survives program download/transferNo — reset to 0/default
Survives battery failure + power lossNo — all values lost
Survives CF card replacementNo (SRAM is on the CPU, not the CF)
ScopeCan be local (inside function blocks) or global
Declaration fileAny .var file in the project

RETAIN variables live entirely in SRAM. They survive as long as the CPU has power (or battery backup). Any cold restart, program transfer, or battery death resets them to their initial values (typically zero unless explicitly initialized).

5.2 VAR PERSISTENT (Permanent Variables)

(* In Cpu.per or global persistent variable list *)
VAR PERSISTENT
    CalOffset_Axis1   : LREAL;
    Recipe_SetPoint    : REAL;
    StationEnabled     : ARRAY[1..16] OF BOOL;
END_VAR
PropertyValue
Storage locationCompactFlash file system (Cpu.per area)
Survives warm restartYes
Survives cold restartYes — values preserved
Survives program download/transferUsually yes (see caveat below)
Survives battery failure + power lossYes — values preserved
Survives CF card replacementNo — lost with the CF card
ScopeGlobal only — cannot be local to a function block
Declaration fileCpu.per or persistent global variable list

PERSISTENT variables are written to the CF card. They survive everything except CF card removal, formatting, or physical failure.

Caveat: There is a known issue where PERSISTENT variables can be reset to zero after certain program transfer operations in Automation Studio. Always back up PERSISTENT variable values before any software transfer.

5.3 Quick Comparison

ScenarioVAR RETAINVAR PERSISTENT
Normal power cycle (warm start)KeptKept
Cold restart / INITLostKept
Program download (AS transfer)LostUsually kept (risk of reset)
Battery dead + power lossLostKept
CF card removed/replacedKept (in SRAM)Lost
Both battery dead AND CF replacedLostLost

6. Cold Start vs Warm Start vs INIT: What Survives

Automation Runtime defines distinct restart types. See ar-rtos.md for operating state details and cf-card-boot.md Section 7 for runtime operating states.

6.1 Warm Restart

A warm restart preserves the current state of the runtime system. This is what normally happens when the PLC is rebooted (power cycle with battery intact, software restart command).

  • VAR RETAIN: Values preserved
  • VAR PERSISTENT: Values preserved
  • Non-retained variables: Re-initialized to defaults
  • I/O image: Reset

Triggered by: normal power cycle, software restart via Automation Studio or operator panel.

6.2 Cold Restart

A cold restart reinitializes the runtime system from scratch. The application is loaded from CF and all runtime state is discarded.

  • VAR RETAIN: Reset to initial values (0 unless explicitly set)
  • VAR PERSISTENT: Values preserved (loaded from CF)
  • All other variables: Initialized to defaults
  • I/O image: Reset

Triggered by: operating mode switch to DIAG then back to RUN, certain runtime commands, Service Mode operations.

6.3 INIT Routines

The INIT routine of each task is executed once during startup. INIT is NOT executed on a warm restart — only on cold restart or after a program download.

  • Use INIT routines to set up default states for RETAIN variables that should start at known values after a cold start
  • Do NOT rely on INIT to restore values that must survive cold starts — use PERSISTENT for those

6.4 Operating Mode Switch Behavior

Switch PositionBehavior
RUNNormal operation; warm restart after power cycle
BOOTDefault AR starts; ready for OS download; User Flash is deleted on new download
DIAGDiagnostics mode; program sections NOT initialized; always followed by warm restart when returning to RUN

Warning: DIAG mode does NOT clear retentive data. When the switch is returned to RUN, a warm restart is performed, meaning RETAIN variables keep their values. DIAG mode is safe for inspecting the system without losing retentive data.


7. Battery Status Monitoring

7.1 Hardware Indicator: DC OK LED

The simplest battery check requires no software at all:

  • DC OK = Green — Battery OK
  • DC OK = Red — Battery empty or missing

Check this LED during every routine machine inspection.

7.2 Software: BatteryInfo Function

B&R provides a system library function called BatteryInfo that returns battery status information. This function is available in the B&R System library.

(* Pseudocode — exact syntax depends on AR version *)
BatteryInfo(
    wStatus => wBatteryStatus,    (* Battery OK / not OK *)
    ...
);

The BatteryInfo function reads the cyclically-monitored battery voltage and load-test results. The battery monitoring system performs periodic load testing that does not significantly reduce battery life.

7.3 I/O Mapping

Battery status is also available through the CPU’s I/O mapping. The “Battery OK” flag appears as a digital input in the CPU I/O mapping. This can be read in your program or monitored via the watch window in Automation Studio.

For undocumented machines, add a simple cyclic task that:

  1. Calls BatteryInfo every cycle
  2. Logs a warning when BatteryOK = FALSE
  3. Triggers a HMI alarm or sets a status bit visible to operators
  4. Optionally writes a timestamp to a PERSISTENT variable recording when the battery was first detected as low

8. Battery Replacement Procedure (Without Data Loss)

The X20CP1584 battery can be replaced with the PLC either powered on or powered off. However, local safety regulations in some jurisdictions prohibit battery replacement while the module is energized. Follow your facility’s lockout/tagout procedures.

8.1 Method A: Hot-Swap (PLC Powered On) — Preferred

This is the safest method for data preservation. The SRAM remains powered by main supply during the swap.

Steps:

  1. Ensure the PLC is running normally (RUN mode, no faults)
  2. Confirm DC OK LED is green (battery still has some charge — if red, proceed anyway as main power will maintain SRAM)
  3. Discharge electrostatic charge — touch the DIN rail or a ground connection (NOT the power supply terminals)
  4. Slide the battery cover down to remove it from the CPU
  5. Remove the old battery from the holder using fingers or insulated tweezers. Do NOT use uninsulated metal pliers — risk of short-circuit
  6. Insert the new battery with correct polarity: “+” side up, positioned under USB interface IF4 (left USB port). Press the left side of the holder to secure the battery
  7. Replace the cover
  8. Verify DC OK LED returns to green within a few seconds

8.2 Method B: Power-Off Swap

If you must power down the PLC to change the battery, the on-board capacitor provides a brief SRAM hold-up time, but you must work quickly.

Steps:

  1. Ensure the machine is in a safe state and locked out
  2. Prepare the new battery — have it unwrapped and ready
  3. Power off the PLC
  4. Immediately (within 1 minute) perform steps 3-7 from Method A
  5. Power the PLC back on
  6. Verify all retentive values are correct
  7. Verify DC OK LED is green

Critical: The 1-minute limit is generous, but the actual hold-up time depends on the on-board capacitor condition and temperature. Work as fast as possible. If you exceed the time window, all RETAIN variables will be lost.

8.3 Post-Replacement Verification

After any battery replacement:

  1. Check DC OK LED is green
  2. Compare critical RETAIN variable values against your last backup
  3. Check the real-time clock is correct (if it drifted, set it via Automation Studio or NTP)
  4. Log the replacement date for your maintenance records
  5. Set a calendar reminder for the next replacement (4 years)

8.4 Battery Disposal

Lithium batteries are hazardous waste. Dispose of used batteries according to local regulations. Do not incinerate or puncture.


9. Backing Up Retentive Data

There is no single “export all retentive data” button. You need a strategy that covers both VAR RETAIN and VAR PERSISTENT variables. Use multiple methods for redundancy.

9.1 Method 1: Runtime Utility Center (RUC) Variable Lists

RUC can read and write variables from a running PLC via the PVI interface.

Steps:

  1. Connect to the PLC via Runtime Utility Center (Ethernet or serial)
  2. Create a template variable list containing all RETAIN and PERSISTENT variable names
  3. Use RUC to read all values from the PLC and save to a .varlist file
  4. Store the backup file with a timestamp

The template can be built by copying variable names from Cpu.per (for PERSISTENT) and scanning .var files for VAR RETAIN declarations (see Section 13).

9.2 Method 2: CF Card Image Backup

A full CF card image preserves everything — application, configuration, PERSISTENT variables, and runtime files. This is the most comprehensive backup.

See cf-card-boot.md Section 14 for detailed CF card imaging procedures.

Quick procedure:

  1. Power off the PLC
  2. Remove the CF card
  3. Create a binary image using dd or a disk imaging tool:
    dd if=/dev/sdX of=cp1584_backup_YYYY-MM-DD.img bs=4M status=progress
    
  4. Store the image in multiple locations
  5. Reinsert the CF card and power on

9.3 Method 3: Service Mode Export

If the application provides PV (Persistent Variable) backup functionality, use it. Alternatively, restart the PLC in Service Mode and export all PVs whose value differs from zero. This captures meaningful runtime data while avoiding default-initialized values.

9.4 Method 4: MpRecipeXml (If Available)

If the machine uses the B&R mapp framework, the MpRecipeXml component can save/load any set of variables as XML files on the PLC’s CF card.

MpRecipeXml(
    xSave := bTriggerSave,
    sFileName := 'RetentiveBackup',
    ...
);

9.5 Method 5: Python Script with PVI.py

For automated or scheduled backups, a Python script using the PVI.py library can:

  1. Parse Cpu.per to get PERSISTENT variable names
  2. Parse all .var files to find VAR RETAIN declarations
  3. Connect to the PLC via PVI
  4. Read all retentive variable values
  5. Save to a CSV or structured file

The Pvi.py library is available at: https://github.com/hilch/Pvi.py

9.6 Method 6: Automation Studio Watch Window Export

As a manual fallback, use the Automation Studio Watch window to:

  1. Add all known RETAIN/PERSISTENT variables to the watch list
  2. Connect online
  3. Export the values (right-click, Export)

This is slow but requires no special tools beyond Automation Studio.


10. Restoring Retentive Data

10.1 Restoring VAR PERSISTENT Values

Since PERSISTENT values live on the CF card, they typically survive most disruptions. If they need to be restored from backup:

  1. Connect via Runtime Utility Center
  2. Load your saved variable list
  3. Write values back to the PLC
  4. Verify all values

10.2 Restoring VAR RETAIN Values After Data Loss

RETAIN variables must be written back one at a time (or via a variable list) since their SRAM contents were lost:

  1. Ensure the battery is good and the PLC is running
  2. Connect via RUC or Automation Studio
  3. Write each RETAIN variable back to its known-good value
  4. If you have no backup, you must manually re-enter all values from production records, calibration sheets, or last-known-good documentation

10.3 Restoring from a Full CF Image

If you have a full CF card backup:

  1. Power off the PLC
  2. Remove the current CF card
  3. Write the backup image to a spare CF card (same model/spec):
    dd if=cp1584_backup_YYYY-MM-DD.img of=/dev/sdX bs=4M status=progress
    
  4. Insert the restored CF card
  5. Power on the PLC
  6. Verify application loads and all values are correct

Warning: This restores the entire CF including the application binary. If the CF card has been updated since the backup, you will lose those changes. Use this method only when recovering from total data loss.


11. Recovery After Battery Death and Total Data Loss

This is the worst-case scenario: the battery died while the machine was powered off and unattended for an extended period. All RETAIN variables are zeroed. The machine may behave erratically or fail to start production cycles.

11.1 Immediate Actions

  1. Replace the battery using the procedure in Section 8
  2. Power on the PLC and verify it boots
  3. Check the DC OK LED — it should now be green
  4. Check the real-time clock — if wrong, correct it

11.2 Assess the Damage

  1. Identify all RETAIN variables (see Section 13)
  2. Determine which RETAIN variables are critical for machine operation
  3. Check PERSISTENT variables — these should be intact on the CF card

11.3 Restore Critical Values

Priority order for restoration:

PriorityVariable TypeWhy
1Calibration offsets, scaling factorsMachine produces out-of-spec product without these
2Axis positions / homing flagsMotion system may crash without correct home references
3Production counters / part countsNeeded for traceability and maintenance schedules
4Recipe parametersProduction cannot proceed with correct settings
5Diagnostic counters / fault logsLower priority — these will accumulate again

11.4 Sources for Restoration Values

If you have no backup file:

  • Calibration certificates — may have recorded calibration offsets
  • Last batch records — may show recipe parameters and setpoints
  • HMI screenshots — if anyone photographed the HMI before the failure
  • Similar machines — if you have identical machines, read their RETAIN values as a starting point (NOT a perfect match, but better than zero)
  • OEM documentation — if any manuals survived, they may list default values
  • Source code inspection — the .var files may contain initial values that serve as reasonable defaults

11.5 Preventing This From Happening Again

After recovery, implement the monitoring and backup procedures described in Section 7 and Section 9. Set calendar reminders for battery replacement.


12. Function Block RETAIN Memory Trap

When you declare a function block instance and mark any variable inside it with RETAIN, B&R stores the entire function block instance in the remanent (SRAM) memory area — including variables NOT marked RETAIN.

FUNCTION_BLOCK fbMotor
VAR RETAIN
    TotalRuns     : UDINT;   (* This is RETAIN *)
END_VAR
VAR
    CurrentSpeed  : REAL;    (* This is NOT RETAIN — but still stored in remanent area *)
    IsRunning      : BOOL;    (* This is NOT RETAIN — but still stored in remanent area *)
END_VAR

In this example, all three variables occupy remanent memory even though only TotalRuns needs to be retained. The non-RETAIN variables will not actually retain their values on a cold restart, but they consume remanent memory space.

Impact: If you create many instances of this function block, you can exhaust the 256 KB remanent memory limit on the CP1584 quickly. Automation Studio reports the total remanent memory usage per task — check this if you see “not enough remanent memory” errors.

Workaround: Move RETAIN variables out of the function block into global variable declarations, and pass them to the FB via references or input/output parameters.


13. Identifying All Retentive Variables in an Unknown Project

When you inherit a machine with no documentation, you need to find every variable whose value matters after a restart.

13.1 Find All VAR RETAIN Declarations

Search all .var files in the project for the VAR RETAIN keyword:

## Linux/macOS
grep -rn "VAR RETAIN" /path/to/project/ --include="*.var"

## Output example:
## /Logical/AxisControl/Variables.var:17:VAR RETAIN
## /Logical/Recipe/Variables.var:9:VAR RETAIN
## /Logical/Conveyor/Variables.var:23:VAR RETAIN

For each match, read the file to find the actual variable names and types declared after the VAR RETAIN line and before the END_VAR.

13.2 Find All VAR PERSISTENT Declarations

Open Cpu.per in the project root. All PERSISTENT variables are declared here:

grep -A 50 "VAR PERSISTENT" /path/to/project/Cpu.per

13.3 Find All RETAIN Variables Inside Function Blocks

Function blocks may declare RETAIN variables internally. Search all program files:

grep -rn "VAR RETAIN" /path/to/project/ --include="*.var" --include="*.st" --include="*.txt"

13.4 Check Automation Studio Remanent Memory Usage

In Automation Studio, the task configuration shows the total remanent memory used. This helps you understand the scale of retentive data in the project even without identifying every variable.

13.5 Build a Master Variable List

Combine all found variables into a single list with:

  • Variable name and full path
  • Data type
  • Declaration type (RETAIN or PERSISTENT)
  • Current value (read from running PLC)
  • Expected/default value (from source code)
  • Criticality rating

This list becomes your backup checklist and recovery reference.


14. Best Practices for Long-Term Maintenance

14.1 Preventive Maintenance

ActionFrequencyNotes
Check DC OK LEDWeeklyTakes 2 seconds during walkthrough
Battery replacementEvery 4 yearsRegardless of LED status
Full RETAIN variable backupMonthlyUse Method 1 or 5 from Section 9
CF card image backupQuarterlyBefore any software changes
Review retentive variable listAfter any program changeNew RETAIN variables may have been added

14.2 Before Any Software Transfer

Before downloading new software to the PLC:

  1. Back up all RETAIN and PERSISTENT variable values (Method 1 or 5)
  2. Back up the CF card image (Method 2)
  3. Document the current software version on the PLC
  4. Download the new software
  5. Verify all retentive values after the transfer
  6. If values changed unexpectedly, restore from backup

14.3 Before Any Planned Power Outage

  1. Back up all retentive variable values
  2. Verify the battery is good (DC OK = green)
  3. If battery is questionable, replace it before the outage
  4. After power is restored, verify all values

14.4 Spare Parts Inventory

Keep on hand:

  • At least 2 spare batteries (part number 4A0006.00-000)
  • At least 1 spare CF card (same capacity and industrial grade as the installed card)
  • A copy of your latest CF card image on a USB drive stored near the machine

15. Key Findings

  1. The CP1584 battery (3 V / 950 mAh lithium, part 4A0006.00-000) backs up 1 MB of SRAM holding all VAR RETAIN variables, the RTC, and system RAM buffers. It does NOT back up the application code (on CF) or the DDR SDRAM.

  2. VAR RETAIN and VAR PERSISTENT are fundamentally different. RETAIN lives in battery-backed SRAM and is lost on cold restarts, program transfers, and battery death. PERSISTENT lives on the CF card and survives everything except CF card loss.

  3. The DC OK LED is your first warning. Red = battery empty/missing. Green = battery OK. Check it weekly.

  4. Battery replacement every 4 years is mandatory. The recommended interval is not the maximum — the actual lifespan depends on temperature and load testing patterns.

  5. You have approximately 1 minute to swap the battery with power off before the on-board capacitor can no longer maintain SRAM. Hot-swap with the PLC powered on is preferred and safer.

  6. Function block RETAIN wastes memory. If any variable in a function block is RETAIN, the entire instance goes into remanent memory. The CP1584 has a 256 KB remanent limit.

  7. There is no built-in “export all retentive data” function. You must use RUC variable lists, PVI scripts, MpRecipeXml, or CF card imaging to back up retentive data.

  8. PERSISTENT variables can be silently reset to zero during program transfers. Always back up before any software download.

  9. When you inherit an undocumented machine, scan all .var files for VAR RETAIN and read Cpu.per for PERSISTENT declarations to build your variable master list.

  10. The worst-case scenario (battery dead + no backup) means manual re-entry of all calibration offsets, recipe parameters, axis references, and production counters from whatever records survive. Implement automated backup immediately after recovery.


16. Cross-References

Related DocumentContentRelevance
cp1584-hardware-ref.mdCP1584 hardware specs, battery compartment locationPhysical details for battery replacement
cf-card-boot.mdCF card file layout, where persistent data is storedUnderstanding the storage medium for retentive data
memory-map.mdMemory architecture, SRAM layout, addressingHow retentive memory fits in the overall memory map
firmware.mdFirmware architecture, program storage locationsRelationship between retentive data and firmware
bootloader-recovery.mdRecovery procedures when data is lostWhat to do after a dead battery causes data loss
ftp-web-interface.mdFTP backup of configuration and dataUsing FTP to back up persistent variables before battery replacement
online-changes.mdRuntime parameter modificationHow to restore values at runtime after data loss
documentation-reconstruction.mdDocumenting retentive variable valuesRecording calibration offsets and setpoints for disaster recovery
python-diagnostics.mdPython scripts for automated backupBuilding automated retentive data backup and restore scripts
hardware-monitoring.mdTemperature sensors, voltage rails, and hardware health monitoringHardware conditions that affect battery-backed SRAM longevity and reliability

17. Sources

  • B&R Official Product Page: X20CP1584 technical data (br-automation.com)
  • B&R Community Forum: “Do permanent variables work properly when the PLC battery is low?” (2025)
  • B&R Community Forum: “Retain Tag and Remanent Memory Usage” (2024)
  • B&R Community Forum: “Storing remanent memory values in a file” (2025)
  • B&R Community Forum: “Easy and quick way to save/restore values of permanent variables?” (2024)
  • B&R Community Forum: “Guideline: Minimizing Information Loss Risks During PLC Software Updates” (2026)
  • B&R Community Forum: “Retain variable reset to zero” (multiple replies)
  • B&R Community Forum: “In userdefined Library, Function Block to Reset Variables to FALSE on Cold or Warm Restart” (2024)
  • X20CPx58x Hardware Manual (B&R, V1.56) — battery replacement procedure, data sheet
  • X20CP148x/348x Hardware Manual (B&R, V1.00) — battery compartment details, DC OK LED table
  • Pvi.py Python Library: github.com/hilch/Pvi.py
  • Runtime Utility Center documentation (B&R)

B&R Firmware Version Management on B&R X20 Systems Without OEM Access

Overview

Maintaining B&R Automation hardware on machines from defunct OEMs means you have no service contract, no project source files, no Automation Studio license tied to the machine, and no support portal credentials. This guide covers how to inventory firmware versions, obtain firmware without a B&R customer account, understand compatibility between Automation Studio (AS), Automation Runtime (AR), and module firmware, safely update firmware on a production machine, and troubleshoot version mismatches.

The primary hardware target is the B&R X20CP1584 CPU (Atom 0.6 GHz, 256 MB DDR2, CompactFlash, POWERLINK V1/V2, Ethernet) and its associated X20 I/O modules, bus controllers, and ACOPOS drives. The CP1584 has been supported since Automation Studio V3.0.90.20 and runs AR versions in the standard (non-SGC, non-Embedded) track.

Audience: Automation engineers maintaining B&R X20 systems on machines where the OEM is gone and no documentation exists.

Related documents:


1. Understanding B&R Version Architecture

1.1 The Three-Layer Firmware Stack

B&R systems have three interdependent firmware/version layers:

LayerWhat It IsWhere It LivesExample
Automation Studio (AS)Development IDE running on your PCWindows workstationV4.10, V4.12, V6.0
Automation Runtime (AR)Real-time OS on the target CPUCompactFlash (target)E4.10, I4.12, D4.80
Hardware FirmwareModule-level firmware on I/O, bus controllers, drivesFlash inside each moduleX20BC0088 V1.05, ACOPOS V2.47

A mismatch at any layer prevents downloads, causes errors, or bricks modules.

1.2 Automation Runtime (AR) Version Naming Convention

AR versions use a prefix letter + version number format:

PrefixSystem GenerationTypical Hardware
No prefix (e.g., 4.10)Standard / Industrial PC / Power PanelX20CP1584, Power Panel 500
E (e.g., E4.10)EmbeddedPanel PCs with embedded runtime
D (e.g., D4.80)Different platform targetOlder B&R hardware
I (e.g., I3.10)Intel-based legacy platformOlder PLC systems
N (e.g., N4.02)Another platform variantSpecific Power Panel models
F (e.g., F2.33)SGC (System Generation Compact)X20CP0291 and similar compact CPUs
T (e.g., T2.80)SG4 platformSpecific target systems

For the X20CP1584: The runtime version will typically be in the standard track (no prefix, e.g., 4.10, 4.12, 4.90, 4.93) or may display as E4.xx on the boot screen depending on the firmware generation. Check the CPU’s boot screen or the System Diagnostics Manager to confirm the exact AR version string.

1.3 AS-to-AR Compatibility Rules

  • Each AS version ships with a set of AR “upgrades” (runtime packages). The project specifies which AR version the target runs.
  • AS version must be >= the minimum AS version that supports the chosen AR version.
  • Newer AS versions can generally target older AR versions (backward compatible), but older AS versions cannot target newer AR versions.
  • The AR upgrade must be installed on the development PC (via Tools > Upgrades in AS) before you can build a project targeting that AR version.
  • Automation Studio 4.x targets AR 4.x. Automation Studio 6.x targets AR 6.x. These are NOT cross-compatible — an AS6 project cannot be downloaded to an AR4 target.

2. Determining Firmware Versions on an Existing System

2.1 CPU / Automation Runtime Version

Method 1: Boot Screen (No Tools Required)

When the X20CP1584 powers on, the boot screen displays the AR version briefly. Connect a monitor/keyboard or observe via serial console (IF1 RS232 at 115.2 kbps). Look for a line like:

B&R Automation Runtime N4.02

or

B&R Automation Runtime E4.10

This is the fastest way to identify the runtime version with zero tooling.

Method 2: System Diagnostics Manager (SDM) via Web Browser

  1. Determine the CPU’s IP address (check any network scanner, or try the default B&R range 192.168.1.x)
  2. Open a web browser and navigate to http://<CPU-IP>
  3. SDM shows detailed hardware/software info including:
    • AR version
    • CPU model and hardware revision
    • All connected I/O modules and their firmware versions
    • X2X Link topology and module status
    • Battery status
  4. SDM works even when the PLC is in SERVICE mode

Method 3: Automation Studio — Online > Device Information

With AS connected to the target over Ethernet:

  1. Online > Settings — confirm IP connectivity
  2. Online > Device Information — shows target AR version, CPU model, serial number
  3. Physical View shows each module with its firmware version in the properties panel

Method 4: Read AR Version from the CompactFlash Card

If you have the CF card removed from the CPU (see cf-card-boot.md):

  • Mount the CF card on a PC
  • The AR version is embedded in the boot configuration files on the card
  • Look for the BrAppData directory and configuration files that reference the runtime version

2.2 I/O Module Firmware Versions

X20 I/O modules receive their firmware from the CPU during the download process. The CPU pushes the correct firmware to each module via the X2X Link bus.

Via http://<CPU-IP> in SDM, the I/O tree shows each X20 module with its current firmware version and hardware revision.

Method 2: Automation Studio Physical View

When connected online (Online > Go Online), the Physical View displays each module. Right-click a module > Properties to see the firmware version running on the target vs. the version in the project.

Method 3: Module LEDs

While not version-specific, I/O module LED behavior indicates firmware mismatch:

  • Blinking r (red) LED: The module is in an error state, which can include firmware mismatch with the CPU’s expected version
  • Solid r LED: Fatal error; module will not operate

2.3 Bus Controller Firmware (X20BC0083, X20BC0088)

Method 1: Web Server on the Bus Controller

For EtherNet/IP bus controllers (X20BC0088):

  1. Connect to the bus controller’s IP address via web browser
  2. Navigate to the Adapter Status page — Version Information section shows firmware version
  3. Login: default username admin, password X20BC0088 (case sensitive, model-specific)

Method 2: Automation Studio

When the bus controller is part of the AS project, its firmware version appears in the Physical View. If the BC is a standalone gateway not managed by a CPU, use the web interface.

2.4 ACOPOS Drive Firmware Versions

Method 1: ACOPOS Service Menu

On the drive front panel:

  1. Access the ACOPOS Service menu (procedure varies by drive model — consult acopos-drives.md)
  2. Navigate to the firmware/software version parameter
  3. The display shows the current drive firmware (e.g., V2.47)

Method 2: Automation Studio — Drive Parameters

When connected to the CPU controlling the drives:

  1. Open Hardware Configuration > Drive Parameters
  2. The parameter tree shows the drive firmware version
  3. Compare against the .GDM file version — open the GDM as text (right-click > Open With > Notepad) and search for the V prefix version string

Method 3: SDM

If drives are connected via POWERLINK, SDM at http://<CPU-IP> may show drive status including firmware versions in the motion diagnostic section.


3. Obtaining Firmware Without an Active Service Contract

3.1 The Access Problem

B&R’s download portal (br-automation.com/downloads) requires a login for most firmware files. Many downloads show “Login for download.” Without an OEM relationship, you face:

  • No portal credentials
  • No support ticket channel
  • No access to firmware upgrade packages through official channels

3.2 Obtaining Automation Studio (Development Tooling)

  1. Go to br-automation.com > Service > Software Registration
  2. Register for an evaluation license — provides unrestricted AS functionality for 90 days
  3. After 90 days, you can request a new 90-day extension repeatedly
  4. The evaluation license gives you full AS access including Tools > Upgrades to download AR packages
  5. Limitation: Commercial use is technically not permitted under the evaluation license. For emergency maintenance on a machine with no OEM, this is your practical option.

Important: AS Version Selection

  • AS 4.12 is the last version in the AS4 product line and supports all AR 4.x versions
  • AS 6.x requires an AR 6.x target — incompatible with older X20 hardware running AR 4.x
  • For the X20CP1584 running AR 4.x, install Automation Studio 4.12 (latest AS4)
  • AS4.12 includes all hardware upgrades for X20 modules up to the AS4 end-of-life

Automation Studio 6.x Ecosystem (2024-2025)

B&R released Automation Studio 6.0 in mid-2024 as a major overhaul with a reimagined user interface and revised editing rules. Subsequent releases through AS 6.3 (June 2025) added significant new capabilities. AS 6.x does NOT replace AS 4.x — it is a parallel product line with a separate license. Projects from AS 4.x cannot be opened directly in AS 6.x; they must be ported using community migration tools.

ReleaseDateKey Changes
AS 6.0Mid-2024Complete UI overhaul, revised editing rules, compatibility mode for AS 4.x projects
AS 6.1Late 2024Stability fixes, expanded hardware support
AS 6.2Early 2025Multicore processing support for AR 6.x targets (core assignment per task)
AS 6.3June 30, 2025AS Code (VS Code-based editor, open beta), AS Copilot (AI assistant), hybrid library import, CLI tool for 3rd party device import, ST-OOP support
AS 6.4Late 2025Multicore ANSL communication tasks, hypervisor Windows 11 + efficiency cores, GPOS driver 2.1.0, FTP server port config, ManagedCertificateStore with ArMcsRecreateCert, Reader/Writer Locks, SMB 1.0 permanently disabled
AS 6.5Dec 18, 2025Hard real-time multicore (task classes assignable to specific cores), ST-OOP inheritance/polymorphism/access specifiers/abstract methods, FTP RBAC, ManagedCertificateStore extended to ANSL/FTP/HTTP/SMTP, TFTP default Off, self-signed certificate warning dialog, CLI library exporter (BR.AS.LibraryExporter.exe), SNI support in AsHttp, ArCert CSR generation, warnings-as-errors build option, removal of source file encryption, telemetry data collection
AS 6.5.1Feb 4, 2026Bugfix release. Fixes ST-OOP issues in PV Watch, ARM configuration build fixes for ST-OOP migration. Known issue: upgrade menu may not show latest upgrades (workaround: use “Local” tab). Some users report build crashes (6.5.1.17) — update to 6.5.2 if affected.
AS 6.5.2Mar 2026Bugfix release. Fixes upgrade service connectivity issues (AS 6.5.1 upgrade server problems), additional ST-OOP stability fixes. If using AS 6.5.x, update to 6.5.2 as minimum — 6.5.0 and 6.5.1 have known upgrade service issues documented in the B&R Community.

AS Code is a VS Code-based editor fully compatible with AS 6 projects, offering modern editors for ST and C/C++, syntax error highlighting, minimap, multiline edit, dark/light themes, references/refactoring, and Git integration. It includes an AI assistant (AS Copilot) for code generation and commenting (ST only as of 6.3). AS Code requires PVI License (1TG0500.01) for smooth debug/transfer. AS 6.3 installs as an update to AS 6.1 — both versions coexist in compatibility mode.

Multicore processing (AS 6.2+): On multi-core AR 6.x controllers, cores can be assigned dynamically to AR or GPOS (Linux via exOS). Not applicable to single-core CP1584, but relevant for migration planning to newer B&R hardware.

Sources: B&R Community — AS 6.3 release, B&R Community — Multicore in AS6, B&R Community — AS 6 features

3.3 Obtaining AR Upgrades and Hardware Upgrades

Once you have AS installed with an evaluation license:

  1. Open Automation Studio
  2. Tools > Upgrades
  3. The Upgrade Manager connects to B&R’s server and downloads available:
    • AR upgrades (runtime versions for the CPU)
    • HW upgrades (firmware for individual hardware modules — I/O modules, bus controllers, interface modules)
  4. Install the upgrades you need — they are stored locally and can be used offline afterward
  5. Save these upgrade packages to external media for archival. If your evaluation license lapses before you need them again, having the upgrade files stored locally means you can install them on a fresh AS instance without re-downloading.

3.4 Downloading Specific Module Firmware Files

Some firmware files are available on the B&R website without login:

  • Browse to br-automation.com > Downloads and filter by hardware type
  • Power Panel firmware upgrades are sometimes publicly downloadable
  • Bus controller firmware (for web-update method) may be available via B&R support ticket or community

For firmware not available publicly:

  • B&R Community Forum (community.br-automation.com): Search for your module and firmware version. Community members sometimes share links or guidance.
  • Third-party industrial parts suppliers (EU Automation, all4sps, etc.): Sometimes provide firmware with refurbished modules
  • B&R local sales office: Even without a service contract, a local B&R office may provide firmware files as a courtesy, especially for safety-related hardware

3.5 The CF Card as Firmware Carrier

When you download a project from Automation Studio to a target via Transfer, AS writes:

  • The AR runtime image
  • The application program
  • All module firmware files

The resulting CF card contains everything the target needs. Back up every CF card you encounter — it is a complete firmware snapshot of the system.


4. Firmware Downgrade Paths

4.1 Can You Downgrade?

ComponentDowngrade Possible?MethodNotes
CPU AR versionYesCF card rebuild with older AR, or Change Runtime in ASMay erase user data; re-transfer required
I/O module firmwareYes (automatic)CPU pushes firmware during downloadNewer modules may not support very old firmware
Bus controllerDependsWeb interface (X20BC0088) or via CPU downloadSome versions block downgrade
ACOPOS drivesGenerally noNot typically supportedDrive firmware is usually forward-only

4.2 Downgrading the CPU Runtime

  1. In Automation Studio, open the project
  2. Physical View > Right-click CPU > Change Runtime
  3. Select the older AR version from the installed upgrades
  4. Re-transfer the project to the target — this will re-flash the CF card with the older runtime
  5. The CPU will reboot with the downgraded runtime

Warning: Downgrading the runtime may clear retentive data. Back up all parameters and recipes first.

4.3 Downgrading I/O Module Firmware

When you transfer a project to the CPU, the CPU automatically pushes the correct firmware to all modules on the X2X Link. If the project specifies an older firmware version for a module, the CPU will downgrade it during the transfer.

Known issue: Some very old firmware versions of bus controllers (X20BC0083, X20BC0088) are incompatible with modern web browsers. If you need to access the web interface for diagnostics after a downgrade, use an older browser or access via Automation Studio instead.

4.4 Interface Module Upgrade Requirements for CP1584

When replacing an X20CPx48x with an X20CPx58x, certain interface modules require a minimum hardware upgrade AND hardware revision. Key modules that may need upgrades:

ModuleMinimum UpgradeMinimum HW Revision
X20IF10201.1.5.1H0
X20IF10301.1.5.1I0
X20IF1061E0
X20IF10631.1.5.0
X20IF10721.0.5.1
X20IF10821.2.2.0
X20IF27721.0.6.1
X20IF27921.0.5.1

Modules not listed (X20IF1041-1, X20IF1043-1, X20IF1051-1, etc.) work without upgrade requirements.


5. Compatibility Matrix: AS, AR, and Module Firmware

5.1 How the Matrix Works

There is no single publicly-published table that maps every AS version to every AR version and every module firmware version. The compatibility information is distributed across:

  1. AS Release Notes — lists supported AR versions
  2. Hardware Upgrade Descriptions — each HW upgrade package specifies which AS version it requires and what modules it covers
  3. Product Data Sheets — show first/last supported AS version for each hardware item
  4. Automation Studio Upgrade Dialog — filters available upgrades by AS version

5.2 Practical Compatibility for X20CP1584

AS VersionAR Versions AvailableNotes
AS 3.0.90+AR 3.xEarliest AS supporting CP1584
AS 4.x (4.1–4.12)AR 4.x (4.10, 4.12, 4.90, 4.93)Primary target for CP1584
AS 6.xAR 6.xIncompatible with AR 4.x targets

Key principle: The CP1584 is a legacy X20 CPU. Its latest supported AR versions are in the 4.x series (up to 4.93). Automation Studio 4.12 is the last AS version that can target it.

5.3.1 AS4 to AS6 Migration (When Upgrading Hardware)

B&R has released Automation Studio 6 as the successor to AS4. AS6 targets AR 6.x and introduces a new project format, updated IDE, and shared upgrades. Migration from AS4 to AS6 is a one-way process — AS6 projects cannot be opened in AS4.

Community migration tools (free, open-source):

ToolURLPurpose
as6-migration-toolsgithub.com/br-automation-community/as6-migration-toolsPython scripts that analyze AS4 projects and generate migration reports highlighting deprecated libraries, unsupported function blocks, and syntax changes
AS6 Conversion ToolBuilt into AS6Official B&R conversion tool (File > Convert); requires AS4.12 project as input
BRLibToHelpgithub.com/br-automation-community/BRLibToHelpParses B&R Automation Studio libraries and generates CHM help files — useful for documenting library dependencies before migration
SBOM Generatorgithub.com/br-automation-communityGenerates CycloneDX 1.5 SBOMs from AS6 projects — useful for inventorying library usage

Migration path for CP1584 users upgrading to newer X20 hardware (e.g., X20CP3484):

  1. Install AS4.12 (your current version) and AS6 side by side on the same PC
  2. Use as6-migration-tools on your existing AS4 project to generate a migration report
  3. In AS4.12, ensure the project is at the latest AS4 version (4.12)
  4. Open AS6 and use File > Convert to import the AS4.12 project
  5. Address any migration issues flagged by the conversion tool
  6. The converted AS6 project targets AR 6.x, which runs on newer X20 CPUs (CP3484, CP3584)
  7. See remanufacturing.md for the full hardware migration workflow

Key AS4 → AS6 changes affecting migration:

5.3 Checking Compatibility for Your System

  1. Determine the CPU’s current AR version (Section 2.1)
  2. Install AS 4.12 with evaluation license
  3. Install all available upgrades via Tools > Upgrades — click the “Legacy” button to show older/supported packages
  4. Create a matching project: In AS, when you add the CPU to the Physical View, the available runtime versions shown in Change Runtime are those compatible with that CPU
  5. For each I/O module: The HW upgrade installed on the PC determines what firmware the project will push to the module. Ensure the HW upgrade for each module is installed

5.4 Safety Module Firmware Constraints

Safety I/O modules (X20SLx, X20SLXx) have additional firmware constraints:

  • Only firmware versions listed in the FS certificates (Funktionssicherheit / Functional Safety certificates) are permitted
  • FS certificates are available from the B&R website
  • Using uncertified firmware on safety modules violates safety compliance — do NOT update safety module firmware without the correct FS certificate documentation
  • If you encounter firmware mismatch warnings on safety I/O during bootup, check B&R community — some firmware versions generate false mismatch messages during boot that can be ignored if the module runs normally afterward

6. Safely Updating Firmware on a Production Machine

6.1 Pre-Update Checklist

Before any firmware update on a running production machine:

  • Back up the existing CF card — image the entire CF card to a file using a card reader. This is your recovery path. See cf-card-boot.md for the backup procedure.
  • Document all current versions — CPU AR version, every I/O module firmware, bus controller firmware, drive firmware. Use SDM or AS Physical View.
  • Back up all parameters — ACOPOS drive parameters, recipe data, any retentive variables. Use AS to upload from target if possible.
  • Verify AS version compatibility — the AS version on your PC must support the target AR version you plan to use
  • Install required upgrades — AR upgrade and all HW upgrades on the development PC
  • Schedule downtime — firmware updates require a full download cycle, which stops the application
  • Notify operations — the machine will be unavailable during the update
  • Have a fallback plan — the CF card backup allows you to restore the previous state if the update fails

6.2 Hot Download vs. Cold Download

Hot Download (Online Transfer Without Restart)

B&R supports downloading to a running system without stopping, under these conditions:

  • The download does NOT require a runtime change
  • The download does NOT require hardware configuration changes
  • Only application code/logic is being updated
  • Automation Studio determines whether a hot download is possible

When a hot download is possible, AS performs the transfer while the system continues running. The new code is activated on the next cycle boundary.

Cold Download (Full Download With Restart)

Required when:

  • Changing the AR version
  • Adding/removing/changing hardware configuration
  • Updating module firmware
  • Initial installation

The PLC will restart and re-initialize all I/O. Expect machine downtime of 2–10 minutes depending on configuration complexity.

6.3 Step-by-Step Firmware Update Procedure

Updating the CPU Runtime and Application

  1. Verify connectivity — AS Online > Settings, confirm you can reach the target
  2. Stop the targetOnline > Stop Target (or schedule during a maintenance window)
  3. Change runtime if neededPhysical View > Right-click CPU > Change Runtime
  4. Install upgradesTools > Upgrades, install AR and HW upgrade packages
  5. TransferOnline > Transfer > Create File and Transfer (or Transfer All)
  6. Monitor — watch the CPU LEDs:
    • Green RDY/F double flash = system startup / firmware update in progress (can take several minutes)
    • Solid green RDY/F = application running
    • Red R/E = SERVICE mode (error or intentional stop)
  7. Warm restartOnline > Warm Restart to start the application
  8. Verify — confirm all I/O modules are online (check via SDM), check for error log entries

Updating Bus Controller Firmware (Web Method — X20BC0088)

  1. Connect to bus controller’s web server at http://<BC-IP>
  2. Navigate to Advanced > BC Firmware Update
  3. Login (default: admin / X20BC0088)
  4. Select the firmware file and click Start Download
  5. Wait for Download Progress to reach 100%
  6. Click Restart Bus Controller
  7. Verify on the Adapter Status page

Updating I/O Module Firmware

I/O module firmware is managed by the CPU during the download process. There is no separate firmware update procedure for X20 I/O modules:

  1. Ensure the correct HW upgrade is installed in AS
  2. Transfer the project to the CPU
  3. The CPU automatically pushes firmware to all X2X-connected modules
  4. If a module shows a firmware mismatch after transfer, verify the HW upgrade matches

Updating ACOPOS Drive Firmware

  1. Via Automation Studio: Connect to the CPU, open Drive Configuration, the firmware update happens as part of the download
  2. Via ACOPOS Service Tool: Direct serial connection to the drive for firmware updates independent of the CPU
  3. Warning: Drive firmware updates are typically one-directional (upgrade only). Confirm the new firmware is compatible with your ACP10/ACP10MC configuration before proceeding.

6.4 Recovery from a Failed Update

  1. Restore the backed-up CF card — insert the original CF card and power cycle. The machine should return to its pre-update state.
  2. If the CF card was corrupted during the update, use the CF card backup image to create a new card.
  3. If the CPU will not boot at all, set the mode switch to BOOT position and retry the transfer from AS.

7. Version Mismatch Symptoms and Resolution

7.1 Common Version Mismatch Scenarios

ScenarioSymptomRoot CauseResolution
AS project AR != target ARTransfer fails with version errorProject specifies a different AR than what is installedChange Runtime to match target, or update target AR
Module firmware mismatchRed blinking r LED on module; PLC logbook error 123416Module firmware doesn’t match what CPU expectsTransfer project again; install correct HW upgrade in AS
Standard library version mismatchCompile error: “Module mtfilter has version V5.16 instead of required range V5.12”Library version in project doesn’t match AS/AR versionUpdate library packages via Tools > Upgrades, or use correct AS version
AS version too new for ARTarget not found, or “No hardware” errorNewer AS cannot manage older AR targetsInstall older AS version matching the AR generation
AS version too old for modulesModules not listed in hardware catalogHW upgrades for newer modules require newer ASInstall latest AS in the same major version line (e.g., AS 4.12 for AR 4.x)
Safety I/O false mismatchWarning during boot but module runs normallyKnown issue with certain safety module firmware versionsVerify in B&R community; ignore if module is operational and no real fault exists
Bus controller web interface issuesCannot access BC web interfaceOld BC firmware incompatible with modern TLS/browsersUpdate BC firmware via Automation Studio download, or use older browser

7.2 The “No Certificate” Problem

After upgrading AS (especially from v4.11 to v4.12.6 or to AS6), you may see a “No Certificate” status when trying to upgrade targets. This is related to B&R’s Technology Guarding cryptographic system. Resolution:

  • Ensure the AS upgrade service has internet access (known issue in AS 6.5.2, fixed in 6.5.3)
  • Reinstall the Technology Guard component
  • Check that the evaluation license is active and valid

7.3 License Violation on Target

If the CPU’s RDY/F LED blinks yellow and the R/E LED blinks red simultaneously, this indicates a license violation. The application will not run. This typically occurs when:

  • The AR version requires a license not present on the target
  • The evaluation/runtime license has expired on the target
  • A runtime feature (e.g., mapp components) requires additional licensing

Resolution: Upload the existing project from the target first (if possible), resolve the license issue, then re-transfer.

7.4 Configuration Version Mismatch

When trying to go online with a project that doesn’t match the target, AS will refuse the connection. The fix:

  1. Upload the configuration from the target (Online > Upload)
  2. Compare with the project offline
  3. Align the project to match the target, or vice versa

8. B&R Download Portal Access Issues for Non-Customers

8.1 What Requires Login

Most firmware files on br-automation.com require a B&R portal account. This includes:

  • HW upgrade packages (module firmware)
  • AR runtime upgrades
  • Safety certificates
  • Some product documentation

8.2 Workaround Strategies

StrategyHowLimitations
90-day eval licenseRegister at br-automation.com/software-registrationGrants AS download; upgrade downloads work within AS
B&R Community Forumcommunity.br-automation.com — ask for guidanceCommunity members may provide firmware links or files
Local B&R officeContact directly, explain the situation (defunct OEM, no support contract)May provide files as a goodwill gesture
Industrial parts suppliersEU Automation, all4sps, UsedBrAutomationSome include firmware with module purchases
CF card archivalBack up every CF card you encounterPre-loaded CF cards contain the firmware that was running
Third-party forumsPLCTalk.net, Reddit r/PLCOccasional file sharing, use at your own risk

8.3 Self-Registration for Portal Access

As of recent B&R policy, anyone can register on br-automation.com for a basic account. The registration provides access to:

  • Software downloads (including AS evaluation)
  • Some firmware upgrade packages
  • Product documentation and data sheets
  • Automation Help (online documentation)

Register at: br-automation.com > Service > Software Registration

8.4 Downloading Firmware Via Automation Studio Tools > Upgrades

The primary method for obtaining AR runtime and hardware firmware packages is through Automation Studio itself, not the B&R website. This is a critical workflow for engineers without OEM support contracts:

How it works:

  1. Install Automation Studio (any version — evaluation license is sufficient for this purpose)
  2. Launch AS and go to Tools > Upgrades
  3. The upgrades dialog connects to B&R’s server and downloads a catalog of all available upgrades
  4. Select the target platform (e.g., “PPC5x” for X20CP1584) and browse available AR versions
  5. Click “Download Selected Upgrades” to download firmware packages to your local PC
  6. The downloaded packages are installed locally and become available for use in projects and online transfers

Important details from B&R Community (community.br-automation.com):

  • The upgrade service accesses https://www.br-automation.com to download files — your IT firewall must allow this
  • Downloaded files are temporarily stored in C:\Temp (or extracted from https://www.br-automation.com/addons_xml.zip)
  • The Windows service running the upgrade process needs rights to: access B&R homepage, download files to C:\Temp, unzip files, and install them
  • If Tools > Upgrades shows outdated or missing upgrades, delete everything in C:\Temp and restart the PC — this is the standard fix per B&R support
  • AS versions older than V4.6 have discontinued upgrade servers — if you need very old AR versions (3.0.x), you must use AS 3.0.90 or manually locate the upgrade files

Local upgrade installation:

If Tools > Upgrades > Online doesn’t work (no internet access, firewall issues, or discontinued service for older versions):

  1. Obtain the upgrade .exe or .zip files from another source (colleague, archived backup, CF card extraction)
  2. In AS, go to Tools > Upgrades > Local
  3. Point to the directory containing the upgrade files
  4. Install manually

With evaluation license: Per the B&R Community, with an evaluation version of AS you can still download upgrades via Tools > Upgrades. The evaluation license is sufficient for this purpose. You must manually select and download the correct upgrade files.

8.5 Long-Term Firmware Archival Strategy

8.6 Known AR Version History for CP1584

This is a partial reconstruction of the AR version history relevant to the CP1584, compiled from community discussions, release notes, and field reports:

AR VersionAS Version RequiredKey ChangesStatus
3.0.90AS 3.0.90Initial CP1584 support (CPx58x migration from CPx48x)Obsolete
4.10AS 4.xMajor feature release for X20; widely deployed on CP1584 machinesClassic
4.33AS 4.xEnhanced OPC-UA, performance improvementsClassic
4.80AS 4.xOPC-UA FX, mappView improvementsClassic
4.93AS 4.x (4.3.5+)Latest AR 4.x; security patches (CVE-2025-11044, CVE-2025-3450)Active
6.xAS 6.xNext generation; requires hardware migration (CP1684 or newer)Active

Note: The jump from AR 4.x to AR 6.x is a generational change, not an incremental update. AR 6.x does NOT run on CP1584 hardware. The CP1584 maxes out at AR 4.93 (the latest AR 4.x release).

AR 4.93 is the recommended target for all CP1584 machines — it is the final AR 4.x release and includes all security patches. If your machine is running an older AR 4.x version, upgrading to 4.93 should be your first priority.

AR 4.93 upgrade packages for CP1584 (known filenames):

PackageFilenameAR VersionDateSizeNotes
Standard upgradeAS4_AR_G0493_X20CP1584.exe4.93.x07/25/2023~13 MBStandard (no prefix) AR upgrade
Embedded upgradeAS4_AR_E0493_X20CP1584.exeE4.93.5.204/14/2023~13 MBEmbedded variant (same hardware, different prefix)

Note: Both G (standard) and E (embedded) prefix variants exist for the CP1584 AR 4.93 upgrade. The correct one depends on which AR version string your CF card currently reports. Use the boot screen or SDM to check before downloading. If unsure, the G (no prefix) variant is the standard track for X20CP1584.

Since portal access can be revoked and OEM relationships don’t exist:

  1. Download and archive all upgrade packages from Tools > Upgrades while you have AS access
  2. Image every CF card immediately upon receiving a machine — store as .img or .iso files
  3. Document the upgrade chain — which AS version, which AR version, which HW upgrade versions for each module
  4. Store offline copies of Automation Studio installers — the installer contains the base upgrade set
  5. Maintain a version compatibility spreadsheet for each machine documenting the exact stack

9. Quick Reference Procedures

9.1 Complete Firmware Inventory (No Project Files)

1. Power cycle the machine, watch the boot screen — note AR version
2. Connect PC to machine network, scan for B&R devices (try 192.168.1.x)
3. Open browser to CPU IP — use SDM to catalog all I/O modules and firmware versions
4. If bus controllers are present, connect to their web interfaces for firmware info
5. For ACOPOS drives, check Service Menu for firmware version
6. Record everything in a firmware inventory log

9.2 Preparing a Development Environment From Scratch

1. Register for B&R evaluation license at br-automation.com
2. Download and install Automation Studio 4.12 (for AR 4.x targets)
3. Activate evaluation license via CodeMeter
4. Open AS, go to Tools > Upgrades
5. Click "Legacy" button to show all upgrade packages
6. Install the AR upgrade matching the target's current version
7. Install all HW upgrades — these cover module firmware
8. Create a new project matching the hardware configuration
9. Connect to the target and verify online access

9.3 Emergency Firmware Recovery

1. Power down the machine
2. Remove the CF card from the CPU
3. Insert the CF card into a PC card reader
4. Image the card (dd or Win32DiskImager) — save as backup
5. If you have a known-good CF image, restore it to the card
6. Reinsert CF card into CPU
7. Set mode switch to RUN
8. Power up — machine should return to the last known state

10. Troubleshooting Table

ProblemFirst CheckResolution Path
Cannot connect AS to targetPing target IPCheck Ethernet cable, IP subnet, firewall
Target not found in ASOnline > SettingsVerify IP; mode switch must be in RUN
“No hardware” when going onlineAS version vs AR versionAS version must match AR generation
Module r LED blinking after transferModule firmware mismatchInstall correct HW upgrade; re-transfer
Transfer fails with version errorProject AR vs target ARChange Runtime to match target
CF card not detectedCF LED on CPUTry known-good CF card; check CF slot contacts
CPU stuck in SERVICE modeCheck PLC logbook via SDMAddress the error; warm restart from AS
Bus controller web interface not loadingFirmware too old for modern browsersUpdate BC firmware via AS transfer
ACOPOS drive fault after AS transferDrive parameter mismatchRe-transfer drive parameters; check .GDM version
Battery LED redBackup battery depletedReplace CR2477N battery within 1 minute

Key Findings

  1. The 90-day evaluation license is the primary access path. B&R’s self-service evaluation registration provides unrestricted AS functionality including Tools > Upgrades for downloading AR and HW packages. The 90-day window can be renewed indefinitely. This is the most practical method for non-customers to obtain firmware.

  2. Firmware lives in three layers. CPU (AR), I/O modules (HW firmware pushed by CPU via X2X), and drives (separate firmware). All three must be compatible for the system to function. Mismatches at any layer cause errors.

  3. The CF card is a complete firmware snapshot. Backing up the CF card preserves the AR runtime, application, and module firmware references. This is your most important recovery asset. Archive every CF card image.

  4. I/O module firmware is managed by the CPU, not individually. You cannot update a single X20 I/O module’s firmware in isolation — the CPU pushes firmware during the project transfer. The correct HW upgrade must be installed on the development PC.

  5. AS 4.12 is the end of the line for X20CP1584. The CP1584 runs AR 4.x, and AS 4.12 is the last AS version in the 4.x product line. AS 6.x targets AR 6.x and is not backward compatible with AR 4.x targets. Always use AS 4.12 for these systems.

  6. Version mismatches generate specific error patterns. Red blinking module LEDs, PLC logbook error 123416 for firmware mismatch, compile errors citing exact version ranges for library mismatches. Learn these patterns to diagnose quickly.

  7. Downgrades are possible for CPU and I/O modules but not drives. CPU runtime can be changed via Change Runtime in AS. I/O modules are automatically downgraded by the CPU during transfer. ACOPOS drives generally do not support firmware downgrade.

  8. Safety module firmware has legal constraints. Only firmware versions listed in the FS (Functional Safety) certificates are permitted. Never update safety module firmware without the correct certificate documentation. Some versions generate false mismatch warnings during boot — verify via B&R community before taking action.

  9. The System Diagnostics Manager (SDM) is your best friend. Accessible via web browser at the CPU’s IP address, SDM provides complete firmware inventory, I/O topology, drive status, logbook access, and diagnostic tools without requiring Automation Studio or any B&R account. It works even when the PLC is in SERVICE mode.

  10. Archive everything offline. Portal access, evaluation licenses, and community resources may not be available when you need them most. Store AS installers, upgrade packages, CF card images, and documentation on local media that is independent of any B&R infrastructure.

  11. AR R4.93.5.2 is the latest available patch for CP1584. The V4.12 AR Upgrade package AS4_AR_E0493_X20CP1584.exe (version 4.93.5.2, dated 2023-04-14) is the last known AR upgrade specifically for the X20CP1584. After applying this, the system is protected against CVE-2025-11044 (ANSL DoS), CVE-2025-3450 (SDM DoS), CVE-2023-3242 (Portmapper DoS), and CVE-2022-4286 (SDM XSS). However, CVE-2024-0323 (FTP weak TLS), CVE-2021-22275 (webserver buffer overflow), and the SA25P003 CVEs (CVE-2025-3449/3448/11498 — SDM session takeover, XSS, CSV injection) remain unpatched on all AR 4.x versions.

  12. B&R software lifecycle follows Active → Classic → Limited → Obsolete phases. Software/firmware maintenance starts during Active phase and continues through Classic. During Classic, B&R recommends not deploying new instances. The Limited phase ends production. See spare-parts.md for lifecycle details and remanufacturing.md for migration planning.

11. Complete CVE and Security Advisory Reference for AR 4.x

The CP1584 runs AR 4.x, which is the end-of-life firmware branch. Security patches are no longer being produced for AR 4.x. The following CVEs are known to affect AR 4.x systems. This is the definitive reference for understanding your security exposure.

11.1 CVEs Patched in AR 4.93.5.2 (Last AR 4.x Patch)

The AR upgrade package AS4_AR_E0493_X20CP1584.exe (version 4.93.5.2, dated 2023-04-14) is the last security update for AR 4.x on the CP1584. It addresses:

CVECVSSComponentVulnerabilityStatus on AR 4.93.5.2
CVE-2025-110447.5 (High)ANSL ServiceDenial of Service via crafted packetPatched
CVE-2025-34507.5 (High)SDMDenial of Service via improper resource lockingPatched
CVE-2023-32427.5 (High)PortmapperDenial of Service via crafted requestPatched
CVE-2022-42866.1 (Medium)SDMCross-site scripting (stored XSS)Patched

11.2 CVEs UNPATCHED on All AR 4.x Versions

These vulnerabilities remain unpatched on the CP1584 regardless of what AR 4.x version is installed. B&R has confirmed fixes only exist in AR 6.x+.

CVECVSSComponentVulnerabilityImpactMitigation
CVE-2025-34494.2 (Medium)SDMSession ID prediction — predictable session tokens allow session takeoverNetwork attacker can hijack SDM sessionDisable SDM if not needed; place on isolated network segment
CVE-2025-34486.1 (Medium)SDMReflected XSS — arbitrary JavaScript execution in browserAttacker can execute code in victim’s browser via crafted URLUse WAF; do not follow untrusted links to SDM
CVE-2025-114986.1 (Medium)SDMCSV injection — formula injection in exported CSV filesAttacker can inject formulas via crafted link to exported dataDo not open SDM CSV exports in Excel; use text editor
CVE-2024-03239.8 (Critical)FTP ServerUse of broken/risky cryptographic algorithm (SSLv3, TLSv1.0, TLSv1.1)Man-in-the-middle can decrypt FTP traffic including credentials and CF card backupsDisable FTP; use VPN for any FTP access; use SFTP tunnel
CVE-2021-222759.8 (Critical)Web ServerBuffer overflow in web serverRemote code execution via crafted HTTP requestDisable web server; place on isolated network; use firewall
SA25P002 (ICSA-26-125-03)7.5 (High)ANSL ServerDoS via insufficient throttling (newly disclosed)Network attacker can cause ANSL service denialIsolate ANSL traffic; use network firewall rules
SA25P007 (ICSA-26-141-03)9.8 (Critical)Automation Studio25 SQLite CVEs (heap overflow, out-of-bounds read, use-after-free, NULL pointer deref) in bundled SQLite library. Criticals: CVE-2025-3277 (heap buffer overflow CVSS 9.8), CVE-2025-6965 (numeric truncation CVSS 9.8), CVE-2019-8457 (OOB read CVSS 9.8). Exploitation requires opening a crafted project fileCode execution via malformed .apj/.ar filesUpgrade AS to 6.5; do not open untrusted project files
SA24P011VariesMultipleSeveral vulnerabilities (see B&R advisory PDF)Varies by componentApply AR 4.93.5.2 if not already installed

11.3 CVEs Patched in Earlier AR 4.x Versions

These were addressed in intermediate AR 4.x patches. If you are running an AR version earlier than 4.93.5.2, these also affect your system.

CVECVSSPatched In ARComponentVulnerability
CVE-2020-282079.8 (Critical)~4.80OPC-UA ServerRemote code execution via crafted OPC-UA message
CVE-2020-282089.8 (Critical)~4.80OPC-UA ServerHeap overflow in OPC-UA binary message decoder
CVE-2020-282099.8 (Critical)~4.80OPC-UA ServerInteger overflow in OPC-UA message processing

11.4 Risk Assessment for CP1584 on Production Networks

Given the unpatched vulnerabilities, the CP1584 on a production network presents the following risk profile:

Attack VectorSeverityLikelihoodImpactMitigation
FTP credential capture (CVE-2024-0323)CriticalHigh (any network attacker)Full CF card access including credentials, configuration, and program backupsDisable FTP service; use VPN if FTP must be used; enforce network segmentation
Web server RCE (CVE-2021-22275)CriticalMedium (requires crafted request)Full system compromiseDisable web server; place CPU on isolated control network; use PLC-side firewall
SDM session takeover (CVE-2025-3449)MediumLow (requires network access + active session)Read diagnostic data; no write impactDisable SDM; monitor SDM access logs; use only from trusted workstations
SDM XSS (CVE-2025-3448)MediumLow (requires user to click crafted link)Browser session compromiseEducate operators; do not follow untrusted links to PLC IP
ANSL DoS (CVE-2025-11044, SA25P002)HighMediumLoss of AS connectivity; inability to download/upload; no program changesAR 4.93.5.2 patches CVE-2025-11044; isolate ANSL traffic for SA25P002
OPC-UA RCE (CVE-2020-28207/208/209)CriticalLow (requires OPC-UA enabled + network access)Full system compromiseAR 4.80+ patches these; ensure AR >= 4.80 if OPC-UA is used; use OPC-UA security policies

11.5 Practical Security Hardening for Legacy AR 4.x CP1584

Since no more patches are coming for AR 4.x, implement these compensating controls:

Network Segmentation (Most Important)

                    ┌─────────────────────────────┐
                    │  Plant Ethernet Switch       │
                    │  (managed, VLAN-capable)      │
                    └──────────┬──────────────────┘
                               │
                    ┌──────────┴──────────────────┐
                    │  Firewall / ACL Rules:       │
                    │  - Block all inbound to PLC   │
                    │  - Allow only ANSL (30303/11169 UDP)
                    │  - Allow OPC-UA (4840) from SCADA only
                    │  - Block FTP (21) at switch    │
                    │  - Block HTTP (80/443) at switch│
                    └──────────┬──────────────────┘
                               │
                    ┌──────────┴──────────────────┐
                    │  CP1584 Control Network       │
                    │  (isolated VLAN or physical    │
                    │   network segment)           │
                    └─────────────────────────────┘

Service Disabling Checklist

ServicePortDisable IfHow to Disable
FTP Server21Not needed for operationsCPU > FTP settings > uncheck (requires AS project download)
Web Server / SDM80/443SDM not needed for operationsCPU > System diagnostics > uncheck (requires AS project download)
OPC-UA Server4840OPC-UA not usedCPU > OPC-UA settings > disable (requires AS project download)
ANSL Discovery30303, 11169 UDPOnly needed during AS developmentCPU > Ethernet > disable ANSL (requires AS project download)
VNC Server5900VNC not configuredN/A (only active if configured in project)

Important limitation: Disabling services requires modifying the Automation Studio project and re-downloading. If you have no AS project and no credentials, the services remain active. In that case, network-level blocking is your only option.

Firewall Rules for PLC Protection

## iptables example for Linux-based firewall protecting a CP1584
## Block all inbound to PLC except required services
iptables -A INPUT -s <PLC_IP> -j DROP

## Allow ANSL from Automation Studio workstation only
iptables -A INPUT -s <AS_WORKSTATION_IP> -d <PLC_IP> -p udp --dport 30303 -j ACCEPT
iptables -A INPUT -s <AS_WORKSTATION_IP> -d <PLC_IP> -p udp --dport 11169 -j ACCEPT

## Allow OPC-UA from SCADA server only (if used)
iptables -A INPUT -s <SCADA_IP> -d <PLC_IP> -p tcp --dport 4840 -j ACCEPT

## Block FTP at the network level (CVE-2024-0323 mitigation)
iptables -A INPUT -d <PLC_IP> -p tcp --dport 21 -j DROP

## Block web server at the network level (CVE-2021-22275 mitigation)
iptables -A INPUT -d <PLC_IP> -p tcp --dport 80 -j DROP
iptables -A INPUT -d <PLC_IP> -p tcp --dport 443 -j DROP
AdvisorySourceURL
SA25P003 (SDM session takeover, XSS, CSV injection)ABB PSIRT / CISAICSA-26-141-04
SA25P002 (SDM DoS)ABB PSIRTSA25P002 PDF
SA25P003 CSAF JSONGitHubcisagov/CSAF
CVE-2025-3450NVDNVD
CVE-2025-3449NVDNVD
CVE-2025-3448NVDNVD
CVE-2025-11498NVDNVD
CVE-2024-0323TenableTenable OT Plugin 503274
CVE-2021-22275B&R / NVDSearch NVD
ANSL DoS (ICSA-26-125-03)CISAICSA-26-125-03
B&R Cyber Security Advisories PortalB&Rbr-automation.com/cyber-security
Community Cyber Security FAQB&R Communitycommunity.br-automation.com

Cross-References

Related DocumentContentRelevance
firmware.mdFirmware architecture, CF card boot, update mechanismThe companion document covering firmware internals and the boot process
cf-card-boot.mdCF card file layout, boot sequence, firmware partitionsUnderstanding where firmware files live on the CF card
bootloader-recovery.mdRecovery mode, unbrick procedures, TFTP firmware reloadWhat to do when a firmware update fails
ar-rtos.mdAR internals, CVE table, OS architectureUnderstanding which CVEs are fixed in which AR version
cybersecurity-hardening.mdSecurity hardening, unpatchable CVEs, network isolationWhy firmware updates matter for security
cp1584-hardware-ref.mdCP1584 hardware specs, LED codes, DIP switchesHardware identification for firmware compatibility checks
remanufacturing.mdMigration paths, hardware replacement, platform changesWhen to upgrade firmware vs replace hardware
ftp-web-interface.mdFTP access to CF card, remote firmware backupUsing FTP to back up firmware before updating

Sources: B&R AR Upgrade download page (br-automation.com), B&R SA25P003/ICSA-26-141-04, B&R SA25P002, B&R Lifecycle Policy, CISA ICS Advisories, NVD vulnerability database, B&R Community Forum

Documentation Reconstruction for Undocumented B&R Machines

Overview

When an OEM goes out of business or abandons support, automation engineers are left maintaining machines built on B&R CP1584 hardware with zero documentation: no source code, no wiring diagrams, no IO maps, no maintenance manuals, and no explanation of program logic. This guide provides a systematic methodology for reconstructing a complete documentation set from scratch using physical inspection, runtime observation, forensic extraction, and reverse-engineering techniques specific to B&R Automation Studio and the X20 ecosystem.

The reconstruction process follows five parallel tracks:

  1. Physical infrastructure documentation — wiring, panel layouts, field devices
  2. IO mapping reconstruction — linking every physical wire to every software address
  3. Program behavior documentation — recording what the logic does at runtime
  4. Communication mapping — documenting every network connection and data exchange
  5. Maintenance manual assembly — combining all findings into actionable procedures

None of these tracks requires the original source code. Together they produce a documentation package that enables safe maintenance, troubleshooting, and eventual reprogramming.

Audience: Automation engineers maintaining B&R CP1584 machines from defunct OEMs.

Prerequisites:

  • Network access to the CP1584 (see cp1584-forensics.md Section 1 for discovery)
  • Automation Studio installed (any version 4.x or newer)
  • Physical access to the machine control panel
  • Multimeter, label maker, camera, and a laptop

Related documents:


1. Phase 0: Preservation and Safety

Before any reconstruction begins, preserve every piece of existing information and establish safe working conditions.

1.1 Capture Everything That Exists

Even an undocumented machine often has fragments of information scattered across nameplates, stickers, hand-written labels, and old drawings stuffed inside cabinet doors.

Procedure:

  1. Photograph every nameplate, label, and marking on every component in the control cabinet — DIN rail modules, power supplies, circuit breakers, contactors, VFDs, terminals, and the PLC itself.
  2. Photograph the inside of every cabinet door — OEMs sometimes tape drawings or cheat sheets inside.
  3. Photograph the front and back of every HMI screen — note any model numbers, firmware versions visible in settings menus.
  4. Check for any paperwork in the machine area: operator manuals (even for sub-assemblies), startup checklists, calibration certificates, maintenance logs left by previous technicians.
  5. If any USB drives, CF cards, or backup media are found, image them immediately with dd before any other access:
    dd if=/dev/sdX of=cf_card_backup.img bs=4M status=progress
    
  6. Extract the CF card from the CP1584 and image it — it may contain source code, configuration files, or logs. See cf-card-boot.md for the extraction procedure and config-file-formats.md for file format analysis.

1.2 Lockout/Tagout and Safety Documentation

Before any hands-on work, document the safety systems present on the machine.

  1. Identify every emergency stop button (physical location, color, type — mushroom-head, pull-to-release, key-release).
  2. Trace the E-stop chain: follow the hardwired safety circuit from each E-stop through safety relays to the PLC safety inputs. Document every intermediate contact.
  3. Document every safety-rated device: light curtains, safety mats, interlock switches, guard door sensors, two-hand stations.
  4. Record the part numbers and models of all safety relays and safety controllers.
  5. Create a Safety Interlock Table — even without the original drawing, you can build this by:
    • Cycling each guard door / interlock one at a time while observing which inputs change on the PLC
    • Recording the machine’s response (immediate stop, controlled stop, warning only)
    • Documenting which actuators are disabled by each interlock

2. Phase 1: Physical Infrastructure Documentation

2.1 Control Panel Inventory

Create a complete inventory of every component in the electrical cabinet.

Equipment Inventory Table Template:

TagDescriptionManufacturerModelPart NumberQtyVoltageNotes
PS1Main Power SupplyMean WellNDR-240-24NDR-240-24124VDC10A, DIN rail
K1Main ContactorSchneiderLC1D18LUCA18BD1120VAC coilMotor M1
PLC1CPUB&RX20CP1584X20CP1584124VDCSN: xxx
VFD1Variable Freq DriveABBACS580ACS580-01-012A-31480VAC 3phMotor M1

For B&R X20 modules specifically, record:

  • Module type and order on the DIN rail (left to right)
  • Serial numbers (visible on module label)
  • Hardware revision
  • Firmware version (visible in Automation Studio online view or via SDM)
  • LED state at power-on and during normal operation

This information is critical for replacement ordering and is covered in detail in io-card-hardware.md Section 8.

2.2 Wire Tracing and Numbering

Wire tracing is the most time-consuming phase but produces the most valuable output. Every wire in the cabinet must be accounted for.

Tools Required:

  • Digital multimeter with continuity mode
  • Wire tracer / tone generator (for long conduit runs)
  • Cable identifier set (for multi-core cables)
  • Label printer (Brady BMP21 or equivalent)
  • Camera for documenting routing before disconnecting

Wire-by-Wire Tracing Procedure:

  1. Establish a numbering scheme before starting. Recommended convention:

    • XX-Y where XX = page/drawing number, Y = wire number
    • Example: 01-001, 01-002 — sequential per power rail
    • For B&R terminal blocks: use the terminal number as the primary identifier
  2. Start with power distribution:

    • Trace every incoming power line from the main disconnect through breakers to transformers to power supplies.
    • Document voltage at every stage (L1, L2, L3, N, PE, 24VDC+, 24VDC-, 120VAC, etc.).
    • Mark every ground/PE connection.
  3. Trace every IO wire:

    • At the field terminal block (where wires leave the cabinet), note the wire number.
    • Follow it to the IO module terminal.
    • Record the IO module slot position and terminal pin.
    • Cross-reference with the device it connects to in the field.
  4. Apply temporary labels as you go. Use self-laminating wire markers that wrap around the wire.

  5. Photograph every row of terminals before and after labeling to create a photographic record.

2.3 Creating Wiring Diagrams from Physical Inspection

Since there are no original drawings, you must create them. Use CAD software (AutoCAD Electrical, EPLAN, or even draw.io for initial drafts).

Diagram Types to Create:

DiagramContentsPriority
Power DistributionMain disconnect, breakers, transformers, power supplies, PE routingCritical
IO Wiring MatrixEvery field device → terminal block → IO module pin → slot positionCritical
Safety CircuitE-stops, safety relays, guard interlocks, hardwired safety chainsCritical
Motor ControlContactors, overloads, VFDs, motor connectionsHigh
Panel LayoutPhysical component placement with dimensionsMedium
Network TopologyEthernet, POWERLINK, serial connections between devicesHigh

IO Wiring Matrix Template:

Field DeviceLocationDevice TagWire #TB TermIO ModuleSlotChannelSignal Type
Proximity SensorStation 3B1-PS101-042X20TB12/T3X20DI93714Ch 324VDC PNP NO
Cylinder Ext.Cylinder AB1-LS101-087X20TB12/T7X20DI93714Ch 724VDC PNP NO
Heater ControlOven Zone 1DR102-015X20TB06/T2X20DO93226Ch 224VDC SSR

2.4 B&R X20 Specific: Reading the Hardware Tree

The CP1584 maintains a complete hardware configuration that can be read without source code. This gives you the IO module layout, addressing, and module types — the software side of the wiring matrix.

Procedure (see cp1584-forensics.md Section 5 and project-reconstruction.md Section 8):

  1. Connect via Automation Studio: Online → Settings → enter PLC IP → Connect
  2. In the System Tree (left panel), expand the hardware configuration to see every module:
    • CPU model and firmware
    • Bus couplers
    • IO stations
    • Every IO module with slot, channel count, and type
  3. Use Target Settings → Runtime → System Dump to export a complete text dump of all hardware info
  4. Cross-reference the hardware tree with your physical inspection — every module in software should exist on the DIN rail, and vice versa

Any discrepancy between the hardware tree and physical reality indicates a module was added, removed, or replaced after commissioning.


3. Phase 2: IO Mapping Reconstruction

IO mapping is the bridge between the physical wiring and the program logic. Without it, you cannot correlate field behavior with PLC behavior.

3.1 Generating the IO Map from Automation Studio

The IO map on a B&R CP1584 is partially determined by the hardware tree and partially by the programmer’s variable naming. Two approaches are needed.

Approach A: Hardware-Derived IO Addresses

B&R X20 modules are automatically mapped to IO ranges based on slot position. See memory-map.md Section 5 for the automatic addressing rules.

  1. In Automation Studio, connect to the PLC and open the IO Configuration view.
  2. Document the base address assigned to each IO module based on its position in the station.
  3. For each module, list every channel’s automatic address.

Approach B: Variable Name Discovery via PVI/OPC-UA

The compiled program’s variable names are accessible even without source code, provided the OEM did not disable symbol export.

  • OPC-UA browse (see cp1584-forensics.md Section 6): Connect an OPC-UA client and enumerate all variable nodes. Names like gMachine.nState, gAxis[1].bHome, gDI_Cylinder_A_Extend reveal the naming convention and purpose.
  • PVI enumeration (see cp1584-forensics.md Section 7 and pvi-api.md): Use PVI Manager to dump all accessible variables with names, types, and current values.

3.2 IO Mapping from Online Observation

When variable names are unhelpful (e.g., DI_01, DO_05), you must determine what each IO point does by observing the machine.

Procedure:

  1. Create a blank IO mapping spreadsheet with columns:

| IO Address | Auto Address | Module | Slot/Ch | Variable Name | Physical Wire | Field Device | Observed Behavior | State Normal | Verified |

  1. For digital inputs — the actuation test:

    • Manually operate each sensor, switch, and button on the machine one at a time.
    • In Automation Studio, open the Watch window and monitor all digital input variables simultaneously.
    • When an input changes state, note which variable toggled.
    • Record the field device that caused the change.
  2. For digital outputs — the force test:

    • In Automation Studio, use the Force function on output variables.
    • Force each output ON one at a time.
    • Walk the machine and observe what physical device activates (solenoid valve clicks, relay pulls in, indicator lights up, motor starts).
    • WARNING: Only force outputs when it is safe to do so. De-energize actuators, ensure personnel are clear, and verify no interlocks will be violated. Use the safety circuits to prevent unexpected machine motion.
  3. For analog inputs — the stimulus test:

    • Apply known signals to each analog input:
      • For 4-20mA inputs: use a process calibrator to inject 4mA, 12mA, 20mA and observe the variable value at each point.
      • For 0-10V inputs: use a variable DC power supply.
      • For thermocouple/RTD: use a temperature simulator or a known-temperature source (ice bath, boiling water).
    • Record the scaling: raw ADC value → engineering units.
    • See analog-calibration.md for detailed calibration procedures.
  4. For analog outputs — the measure test:

    • Use a multimeter to measure the signal at each analog output terminal.
    • If possible, vary the output variable value in the Watch window (or force it to known values) and measure the resulting current/voltage.
    • Document the scaling relationship.

3.3 IO Mapping Table: Final Format

After completing all tests, compile the comprehensive IO map:

VariableAuto AddrModule TypeSlotChWire #Field DeviceLocationSignalRange/ScaleVerified Date
gDI_EStop_Chain%IX0.0.3X20DI93713301-012E-Stop PB-1Op. Station24VDC NC2026-07-10
gAI_Temp_Oven1%IW4X20AT64028103-005PT100Oven Zone 14-20mA0-500 C2026-07-10
gDO_Heater1%QX0.2.1X20DO93226102-015SSROven Panel24VDC2026-07-10

4. Phase 3: Program Logic Documentation from Runtime Behavior

Since source code is not available (see program-reverse-engineering.md and project-reconstruction.md Section 2), program logic must be documented through behavioral observation.

4.1 Variable Discovery and Categorization

Before tracing logic, build a complete variable dictionary.

Procedure:

  1. Dump all variables via PVI or OPC-UA (see cp1584-forensics.md Sections 6-7).
  2. Categorize by naming convention:
    • Prefix gDI_ or _DI → digital input
    • Prefix gDO_ or _DO → digital output
    • Prefix gAI_ or _AI → analog input
    • Prefix gAO_ or _AO → analog output
    • Prefix gAxis or _Axis → motion axis reference
    • Prefix gTimer or _Tmr → timer reference
    • Suffix _Set / _Reset → latch/unlatch
    • Suffix _Cmd / _Cmd → command
    • Suffix _Sts / _Fb → status / feedback
  3. Record data types and initial values for every variable.

4.2 Machine Sequence Documentation

Document the complete machine operating sequence by observation.

Step-by-step procedure:

  1. Record the normal operating cycle:

    • Start the machine from cold start (power-on).
    • Record every observable state change in order:
      T+0s: Power ON → all outputs OFF, homing required
      T+2s: Auto sequence initiated → conveyor M1 starts
      T+5s: Part detected at sensor B1-PS1 → cylinder A extends
      T+7s: Cylinder A extended (B1-LS2 asserted) → heater energizes
      ...
      
    • Use a video camera recording synchronized with Automation Studio trace data.
  2. Use Automation Studio Trace:

    • Configure a Trace (Automation Studio → Tools → Trace) to record key variables at high resolution.
    • Record during one complete machine cycle.
    • Export the trace to CSV for analysis.
    • This gives you the exact timing and ordering of state transitions.
  3. Build a State Transition Diagram:

[IDLE] --Start Cmd AND All Safeties OK--> [HOMING]
[HOMING] --All Axes Homed--> [AUTO_READY]
[AUTO_READY] --Cycle Start--> [CYCLE_RUNNING]
[CYCLE_RUNNING] --Sequence Complete--> [AUTO_READY]
[CYCLE_RUNNING] --E-Stop OR Fault--> [ESTOPPED]
[ESTOPPED] --Reset AND All Safeties OK--> [IDLE]
  1. Document error/fault sequences:
    • Trigger each known fault condition (sensor failure, timeout, overload).
    • Record the machine’s response: which outputs turn off, which alarms activate, what the HMI displays.
    • Document the recovery procedure: what must be done to clear the fault and restart.

4.3 Logic Tracing via Forced Inputs

For critical logic paths, use forced inputs to trace cause-and-effect relationships.

Procedure:

  1. In the Watch window, identify a variable that changes during a specific machine operation (e.g., a motor start command).

  2. Force the input conditions that should trigger that output:

    • Force the start button input ON.
    • Observe: does the motor command go ON?
    • Release the start button. Does the motor command latch?
  3. Work backwards through conditions:

    • If the motor does NOT start when the start button is forced ON, look for other conditions that must be true (safety interlocks, permissives, other sensor states).
    • Force each candidate condition ON one at a time until you identify all prerequisites.
  4. Document findings as Boolean logic:

    Motor1_Run_Cmd = Start_PB AND NOT E_Stop_Chain AND NOT Motor1_OL
                      AND Motor1_Home_OK AND System_Auto_Mode
    

WARNING: Use forced values only in a controlled test environment. Never force safety-related inputs in an operational setting. Document every forced value change and revert it immediately after the test.

4.4 Timing and Sequencing Documentation

Many undocumented machines contain timers, delays, and sequencing that are not obvious from observation alone.

Capture timing with Automation Studio Trace:

  1. Set up a Trace recording with 1ms resolution capturing all state machine variables and timer variables.
  2. Run the machine through a complete cycle.
  3. Export and analyze to identify:
    • Timer durations (e.g., cylinder dwell time = 2.3 seconds)
    • Sequencing dependencies (Event A must occur within 5 seconds of Event B)
    • Watchdog timeouts (what happens if a sensor does not assert within the expected window)
    • Minimum/maximum cycle times

5. Phase 4: Communication and Network Documentation

5.1 Network Topology Discovery

Document every communication connection involving the CP1584.

Procedure:

  1. Use nmap to scan the PLC and all connected devices:
    nmap -sn 192.168.1.0/24
    nmap -sV -p 80,4840,11169,502,1080 <PLC_IP>
    
  2. Check the CP1584 network configuration via SDM web interface (port 80) or Automation Studio Target Settings.
  3. Document all configured interfaces: ETH1, ETH2, POWERLINK, serial ports.
  4. For POWERLINK: document the MN (Managing Node) configuration and all CN (Controlled Node) devices. See powerlink-internals.md and x2x-protocol.md.
  5. For PLC-to-PLC communication: document any Modbus, OPC-UA, or proprietary data exchange. See plc-to-plc.md and modbus-gateway.md.

5.2 HMI Documentation

If the machine has an HMI (Power Panel, mapp View, or third-party panel):

  1. Photograph every screen at every state (running, faulted, maintenance mode).
  2. Document every button and its effect.
  3. Document every displayed value and its corresponding PLC variable (if possible via OPC-UA browsing).
  4. Record alarm messages and their conditions.
  5. Document any recipe or parameter screens with their adjustable values and ranges.
  6. See hmi-integration.md for B&R-specific HMI analysis techniques.

5.3 Alarm and Event Log Mining

The CP1584 maintains alarm and event logs that reveal historical behavior patterns.

  • Use the mapp Alarm or AlarmX components if configured (see alarm-logging.md).
  • Check the SDM (System Diagnostics Manager) for hardware-level events.
  • Export AR log files from the CF card for analysis.
  • Document recurring alarms, their frequency, and the conditions that precede them.

6. Phase 5: Building the Maintenance Manual

6.1 Maintenance Manual Structure

Assemble all findings into a structured maintenance manual. This is the deliverable that enables future engineers to maintain the machine safely.

Recommended structure:

1. Machine Overview
   1.1 Purpose and Process Description
   1.2 Machine Identification (model, serial, year, OEM if known)
   1.3 System Architecture Diagram

2. Safety Systems
   2.1 Safety Device Inventory
   2.2 E-Stop Circuit Diagram
   2.3 Safety Interlock Table
   2.4 LOTO Procedures

3. Electrical Documentation
   3.1 One-Line Diagram
   3.2 Power Distribution
   3.3 IO Wiring Matrix
   3.4 Panel Layout Drawing
   3.5 Network Topology Diagram

4. PLC and Control System
   4.1 Hardware Configuration (CPU, IO modules, firmware versions)
   4.2 Complete IO Map (variable ↔ physical device)
   4.3 Program Logic Summary (state machine, sequences, interlocks)
   4.4 Communication Map (PLC-to-PLC, HMI, SCADA)
   4.5 IP Address and Network Configuration Table

5. Operation
   5.1 Startup Procedure
   5.2 Normal Shutdown Procedure
   5.3 Operating States and Transitions
   5.4 HMI Screen Reference

6. Troubleshooting
   6.1 Common Faults and Resolution
   6.2 Alarm Code Reference
   6.3 Diagnostic Procedures (per subsystem)
   6.4 IO Check Procedure (point-by-point verification)

7. Preventive Maintenance
   7.1 PM Schedule
   7.2 Spare Parts List (with B&R order codes)
   7.3 Calibration Procedures (analog inputs/outputs)
   7.4 Battery and Backup Replacement (retentive data — see [retentive-data.md](retentive-data.md))

8. Recovery and Disaster Procedures
   8.1 CF Card Backup and Restore
   8.2 PLC Replacement Procedure
   8.3 IO Module Replacement (hot-swap procedure)
   8.4 Firmware Recovery (see [bootloader-recovery.md](bootloader-recovery.md))
   8.5 Complete System Restore

9. Appendices
   A. Original Program Binary Backup Locations
   B. Automation Studio Connection Details
   C. Password and Access Level Documentation
   D. Revision History

6.2 Spare Parts List

For B&R X20 systems, create a spare parts list with exact order codes:

ComponentB&R Order CodeDescriptionQty on HandLead TimeCritical?
CPUX20CP1584PLC CPU, 256MB DDR204-6 weeksYes
PS ModuleX20PS210024V power supply module11-2 weeksYes
DI ModuleX20DI937124VDC, 32ch, diagnostic21-2 weeksYes
CF Card8CFC3.5STRCompactFlash 4GB21 weekYes
Bus ModuleX20BM01Bus module, base12-3 weeksNo

See io-card-hardware.md Section 8 for the complete X20 module reference.

6.3 IO Point-by-Point Verification Procedure

Include a repeatable IO verification checklist that can be used during commissioning, after module replacement, or during annual PM.

Template:

For each IO point:

  1. Identify the physical device in the field.
  2. Operate / simulate the device.
  3. Verify the correct variable changes state in the Watch window.
  4. Record PASS/FAIL and date.

This procedure validates that the IO map is correct and that all wiring is intact.

6.4 PLC Replacement Procedure

Document the exact steps to replace the CP1584 CPU, which is the most critical component:

  1. Back up the current CF card contents via FTP (see ftp-web-interface.md).
  2. Record the Automation Runtime version and all hardware module configurations.
  3. Power down the machine following LOTO procedures.
  4. Remove the old CPU from the DIN rail.
  5. Install the replacement CPU (match firmware version — see firmware-version-mgmt.md).
  6. Insert the CF card (or a pre-configured replacement).
  7. Power up and verify the hardware tree matches the original configuration.
  8. Verify all IO modules are recognized and communicating.
  9. Run the IO point-by-point verification.
  10. Cycle the machine and verify normal operation.

7. Tools and Techniques Summary

7.1 Software Tools

ToolPurposeB&R Specific?
Automation StudioOnline monitoring, Watch, Trace, Force, hardware tree browseYes — B&R proprietary
Runtime Utility Center (RUC)PLC backup, firmware management, system infoYes — B&R proprietary
SDM Web Interface (port 80)Hardware diagnostics, firmware info, log viewerYes — built into AR
OPC-UA Client (UaExpert, Prosys)Variable browsing and monitoringNo — but accesses B&R OPC-UA server
PVI ManagerProgrammatic variable accessYes — B&R proprietary
WiresharkNetwork traffic capture, POWERLINK/ANSL analysisNo — use B&R protocol dissectors
nmapNetwork discovery and port scanningNo
draw.io / EPLAN / AutoCAD ElectricalCreating wiring diagramsNo
dd (Linux)CF card imaging for backupNo
Python + OPC-UA libraryAutomated variable enumeration and logging scriptsNo

7.2 B&R-Specific Diagnostic Features

FeatureHow to AccessWhat It Gives You
Watch WindowAutomation Studio → Online → WatchReal-time variable values, force capability
TraceAutomation Studio → Tools → TraceHigh-resolution variable recording over time
Cross ReferenceAutomation Studio → Edit → List UsageVariable usage across all programs (requires source)
System DumpTarget Settings → Runtime → System DumpComplete hardware/software configuration dump
AR LogAutomation Studio → Logger / CF cardRuntime error and event history
SDM DiagnosticsBrowser → http://PLC_IPHardware health, module status, firmware versions
Glossary / InfoPoolAutomation Studio → ViewVariable documentation if programmer added descriptions

7.3 Physical Tools

ToolPurpose
Digital multimeterContinuity testing, voltage measurement, analog signal verification
Process calibrator (4-20mA)Analog input stimulus and output measurement
Wire tracer / tone generatorTracing wires through conduit
Label printer (Brady BMP21)Applying wire markers and component labels
Logic analyzerX2X bus signal analysis (see io-sniffing.md)
Thermal cameraIdentifying hot spots in panels (overloaded connections)
Torque screwdriverVerifying terminal tightness during PM

8. Decision Matrix: Reconstruct vs. Rewrite

During documentation reconstruction, you may discover that the existing program has fundamental problems that make reconstruction impractical. Use this matrix to decide:

FactorDocument & PreserveRewrite from Scratch
Program stabilityRuns reliably, no crashesFrequent faults, watchdog resets
Code organizationLogical structure (even if unnamed)Spaghetti logic, no discernible structure
Safety systemHardwired safety circuits intactSafety logic embedded in software (no hardwired backup)
IO count<100 points>200 points
Available timeWeeks/months availableProduction pressure, need quick fix
Vendor lock-inWant to stay on B&RConsidering migration to another platform

Hybrid approach (most common):

  • Preserve the running binary as a backup.
  • Document everything about the current system.
  • Keep the existing program running while you develop a replacement.
  • Cut over during a planned shutdown window.

9. Documentation Maintenance

The reconstructed documentation has a shelf life. Without active maintenance, it will become outdated as changes are made to the machine.

9.1 Revision Control

  1. Store all documentation in a version-controlled repository (Git, SharePoint, or a document management system).
  2. For every change to the machine (hardware or software), update the relevant documentation section.
  3. Use a Document Revision Log:
RevDateAuthorSection ChangedDescription
1.02026-07-10J. SmithAllInitial reconstruction from zero documentation
1.12026-08-15J. Smith3.3, 4.2Added IO points for new sensor at Station 4
1.22026-09-01M. Jones7.1Updated firmware version after AR upgrade

9.2 Permanently Lost Information

Document what you could NOT recover, so future engineers know the gaps:

  • Original source code (unless source was stored on target — see project-reconstruction.md Section 2)
  • Programmer intent and design rationale
  • Original naming conventions for undocumented variables
  • Commissioning and calibration history
  • OEM warranty and support contacts
  • Safety certifications (CE, UL) documentation

10. Workflow Summary

The complete documentation reconstruction workflow, in recommended execution order:

Week 1: Preservation + Physical Inspection
  ├── 1.1 Image CF card, photograph everything
  ├── 1.2 Document safety systems and LOTO
  ├── 1.3 Inventory all panel components
  └── 1.4 Begin wire tracing (start with power)

Week 2: Network Discovery + Software Exploration
  ├── 2.1 Connect via Automation Studio, read hardware tree
  ├── 2.2 OPC-UA / PVI variable enumeration
  ├── 2.3 Export system dump, AR logs
  ├── 2.4 Network scan and topology mapping
  └── 2.5 Begin IO wiring matrix (continue wire tracing)

Week 3: IO Mapping from Observation
  ├── 3.1 Digital input actuation tests
  ├── 3.2 Digital output force tests (safe conditions only)
  ├── 3.3 Analog input calibration tests
  ├── 3.4 Analog output measurement
  └── 3.5 Complete IO wiring matrix

Week 4: Logic Documentation
  ├── 4.1 Machine sequence observation and recording
  ├── 4.2 Trace recording during operation
  ├── 4.3 State transition diagram construction
  ├── 4.4 Critical logic path tracing
  └── 4.5 Timing and sequencing documentation

Week 5: Manual Assembly
  ├── 5.1 Create wiring diagrams from wire trace data
  ├── 5.2 Compile IO map
  ├── 5.3 Write machine sequence documentation
  ├── 5.4 Assemble maintenance manual
  ├── 5.5 Create spare parts list and PM schedule
  └── 5.6 Review, peer check, and finalize

Community Tools for Accelerated Reconstruction

Several community tools significantly accelerate the documentation reconstruction process, especially when you lack the original Automation Studio project:

brwatch — Variable Discovery Without Project

brwatch is the fastest way to enumerate variables on an undocumented PLC. Install the Windows service, point it at the CP1584 IP, and browse the complete variable tree:

; brwatch.ini configuration
[Connection]
CPU=<PLC_IP_ADDRESS>
Protocol=ANSL

Reconstruction workflow with brwatch:

  1. Browse the full variable tree and note all naming patterns (e.g., gMachineData.*, gAxis*.*, stState_*)
  2. Export variable list with types (File > Save As > .bww)
  3. Log all variables to CSV for a baseline snapshot
  4. Observe which variables change during machine operation to identify active vs legacy code

This replaces the manual OPC-UA/PVI enumeration steps in Section 2 and produces a more complete variable list because brwatch requires no prior knowledge of the project structure. See access-recovery.md §12 for the full brwatch guide.

Pvi.py — Python Scripted Variable Extraction

Pvi.py enables scripted batch extraction of variable metadata:

from pvi import Pvi
import json

pvi = Pvi()
plc = pvi.line("ANSL", "TCP", "<PLC_IP>").device("CP1584")

variables = plc.list_variables()
with open("variable_inventory.json", "w") as f:
    json.dump([{"name": v.name, "type": v.type, "scope": v.scope} for v in variables], f, indent=2)
print(f"Extracted {len(variables)} variables")

systemdump.py — Automated System Dump Analysis

systemdump.py extracts hardware and task configuration from system dumps:

## Download system dump via SDM or FTP
## Then analyze:
systemdump --input SystemDump.xml --hardware > hw_inventory.txt
systemdump --input SystemDump.xml --tasks > task_config.txt

This provides the hardware tree and task configuration without requiring Automation Studio — directly useful for Sections 1.3 and 3.1 of this guide. See diagnostics-sdm.md for dump download and ebpf-telemetry.md for analysis workflows.

awesome-B-R — Complete Tool Catalog

The awesome-B-R repository is the master index of all community tools. For documentation reconstruction, the most useful categories are:

  • Discovery tools: brwatch, brsnmp, ListAllBurPLCs
  • Variable access: Pvi.py, demo-br-asyncua
  • Analysis: systemdump.py, SystemDumpViewer
  • Project migration: as6-migration-tools

Key Findings

  1. B&R compiled binaries cannot be decompiled. The source code is permanently lost unless the OEM stored it on the target (check via File → Open Project From Target in Automation Studio). All program logic documentation must come from behavioral observation, not code reading.

  2. The hardware tree is fully recoverable. B&R stores complete module configuration, serial numbers, firmware versions, and addressing in the running system. This gives you the software-side IO layout without any original files.

  3. Variable names survive compilation. Even without source code, OPC-UA and PVI expose the full variable namespace with names, types, and values. This is the single most valuable extraction for IO mapping and logic documentation.

  4. Wire tracing is the bottleneck. Physical wire tracing is the most labor-intensive part of documentation reconstruction and cannot be accelerated by software tools. Budget 40-60% of total project time for this phase.

  5. Force-based logic tracing is viable but risky. Using Automation Studio’s Force function to drive inputs and observe outputs can reconstruct Boolean logic equations for critical paths, but must be done under controlled conditions with safety systems fully operational.

  6. The Trace function is essential for timing documentation. Automation Studio’s Trace records variable changes at sub-millisecond resolution, enabling precise documentation of timers, sequencing delays, and watchdog timeouts that cannot be observed by eye.

  7. CF card imaging is the first priority. The CF card may contain source code, configuration backups, AR logs, or HMI files. Image it immediately with dd before any other work — this single action may save weeks of reconstruction effort.

  8. A hybrid approach is almost always correct. Do not attempt a full rewrite until you have fully documented the existing system. The existing running binary is the only reference for correct behavior.

  9. Documentation maintenance is as important as initial creation. A one-time reconstruction effort produces a static document that decays with every unrecorded change. Establish a revision control process from day one.

  10. The safety interlock table is the most critical deliverable. Understanding which safety devices protect which hazards is essential before any testing, forcing, or logic tracing can proceed. Always document safety systems first.

  11. Community tools reduce reconstruction time by 50-70%. brwatch for instant variable enumeration, Pvi.py for scripted extraction, and systemdump.py for automated hardware inventory eliminate the most tedious manual steps. See access-recovery.md §12 and the awesome-B-R repository for the full tool catalog.


Sources

  • B&R Automation Studio Online Help — Online monitoring, Trace, and Logger tools
  • B&R Automation Runtime PVI Reference — variable namespace browsing and data extraction
  • B&R OPC-UA Server Configuration Guide — namespace structure and variable access
  • B&R Community Forum (community.br-automation.com) — practical discussions on undocumented system recovery
  • IEC 61131-3 Programming Standard — IEC program structure and variable naming conventions
  • ISA-95 (IEC 62264) — equipment hierarchy and documentation standards for manufacturing systems

B&R Spare Parts Identification and Compatible Hardware Reference

Overview

When you inherit a B&R CP1584-based machine from a defunct OEM with zero documentation, the first challenge is knowing what parts are installed and how to replace them. This guide covers practical methods for identifying B&R hardware from physical inspection alone, decoding the B&R order code system, finding compatible replacements for discontinued parts, building a spare parts inventory from scratch, and sourcing components from third-party channels.

B&R’s part numbering system is highly structured — once you understand the conventions, you can determine the exact specifications, power ratings, and compatibility of any module from the label alone.


1. Identifying B&R Part Numbers from Physical Inspection

1.1 Label Locations

B&R modules have their order number printed on a label affixed to the side or front face of every component. Look in these locations:

Component TypeLabel LocationTypical Label Content
X20 I/O modulesSide of the electronic module (the center slice)Order number, B&R ID code, revision, serial number
X20 bus modulesSide of the bus module (bottom slice)Order number, revision letter
X20 terminal blocksFront face of the connector blockPart number stamped or printed
ACOPOS drivesFront face plate, left sideFull order number (e.g., 8V1016.00-2)
CPU modules (CP1584)Side panel near the DIN rail clipOrder number, revision, serial number, firmware version
Interface modules (IFxxxx)Side panelOrder number with variant suffix

1.2 What You’ll Find on the Label

Every B&R module label contains at minimum:

  • Order number — the full part number for ordering (e.g., X20DI9371, 8V1016.00-2)
  • Revision — a letter+number code (e.g., H0, J0). Higher letters are newer hardware revisions
  • Serial number — a 12-digit alphanumeric code unique to that individual unit
  • B&R ID code — a 4-digit hexadecimal hardware identifier used by the controller (e.g., 0xC370 for X20CP1584)

1.3 Using the Serial Number

B&R assigns a unique serial number to every hardware unit. The format is a 12-character alphanumeric string printed on the module label. You can:

  • Look up serial numbers on the B&R website at https://www.br-automation.com/en/search/ — enter the serial number to find manufacturing date, warranty status, and firmware compatibility
  • Read serial numbers via software using Automation Studio’s HWInfo function, which returns both the 4-digit module ID and 8-digit serial number for every module in the X2X tree
  • Use SDM (System Diagnostics Manager) to retrieve serial numbers of all connected modules through the web interface — see cp1584-forensics.md for SDM access procedures

1.4 Using Module ID Codes for Recognition

The B&R ID code is a 4-digit hex value (0x prefix) burned into every module’s firmware. The controller reads this at startup to identify what hardware is present. Key IDs:

B&R ID CodeModuleNotes
0xC370X20CP1584Your main CPU
0xE21BX20cCP1584Coated variant of CP1584
0xC3B0X20CP1586Faster sibling (1.6 GHz, Atom E680T)
0xD45BX20CP1583Slower sibling (333 MHz compatible)
0x12C88V1090.00-2ACOPOS 1090 drive
0x26D8X20BC0088Bus controller

Use the HWInfo function block or browse the SDM web UI to dump the full module ID table from a running system. This is critical when labels are damaged or missing.


2. Reading B&R Order Codes

2.1 General Principles

B&R order codes follow a systematic naming convention. While the exact structure varies by product family, these rules hold across all B&R hardware:

  • Prefix digits (e.g., 8V, 8AC, X20) identify the product family
  • Middle digits identify the specific model, power rating, or channel count
  • Suffix after a dot (.00-2) identifies options, accessories, and version
  • Coated variants are prefixed with c (e.g., X20cCP1584 = coated X20CP1584)

2.2 X20 System Order Codes

The X20 system uses a prefix-based structure. Each I/O module is actually three separate parts stacked together:

  +-------------------+
  | Terminal Block     |  <- X20TB06 or X20TB12 (field wiring)
  +-------------------+
  | Electronic Module  |  <- X20DI9371, X20AO4622, etc. (the "smart" part)
  +-------------------+
  | Bus Module         |  <- X20BM11, X20BM31, X20BM01 (backplane)
  +-------------------+

X20 I/O Module Naming Convention

Format: X20 + TT + CC + SS + [-N]

PositionMeaningExamples
TTModule typeDI = Digital Input, DO = Digital Output, AI = Analog Input, AO = Analog Output, AT = Temperature, CM = Counter, MM = Motion, DC = DC motor, SI = Safety Input, SO = Safety Output, BC = Bus Controller, PS = Power Supply, IF = Interface, BM = Bus Module, TB = Terminal Block
CCChannel count / capability93 = 12-ch digital, 46 = 4-ch analog, 11 = basic bus module
SSSubtype / feature variant71 = 24VDC sink, 22 = 0-20mA/4-20mA
-NVariant suffix (optional)-1 = variant revision, indicates specific connector or feature set

X20 CPU Module Naming Convention

Format: X20 + [c] + CP + N + G + PP

PositionMeaningValues
cCoated variantPresent = conformal-coated for harsh environments (corrosive gas, condensation)
CPCPU moduleCompactProcessor
NNumber of interface slots1 = 1 slot (CP158x), 3 = 3 slots (CP358x)
GCPU generation5 = Atom E6xx series, 6 = newer generation, E = X20EM (newest, ARM-based)
PPPerformance tier83 = 333 MHz, 84 = 600 MHz, 85 = 1.0 GHz, 86 = 1.6 GHz

Key cross-compatibility note: X20CPx58x and X20CPx68x are not drop-in replacements for each other. You must update the hardware configuration in Automation Studio. Similarly, the new X20EM series requires different firmware and is not a direct replacement for the CP series.

ModuleProcessorRAMInterface SlotsShortest Task Cycle
X20CP1583Atom 333 MHz128 MB DDR21800 us
X20CP1584Atom 600 MHz256 MB DDR21400 us
X20CP1585Atom 1.0 GHz256 MB DDR21200 us
X20CP1586Atom 1.6 GHz512 MB DDR21100 us
X20CP3584Atom 600 MHz256 MB DDR23400 us
X20CP3586Atom 1.0 GHz512 MB DDR23100 us

2.3 ACOPOS Drive Order Codes (8V1 Series)

Format: 8V1 + RRR + . + OO + - + V

PositionMeaningExamples
8V1ACOPOS single-axis servo drive familyAlways this prefix for single-axis drives
RRRCurrent rating / power class010 = 1.5 A / 0.75 kW, 016 = 3.6 A / 0.75 kW, 022 = 4 A / 1.5 kW, 045 = 8 A / 4 kW, 090 = 16 A / 8 kW, 132 = 34 A / 16 kW, 180 = 48 A / 24 kW
.OOOptions code.00 = standard (integrated line filter, no plug-in module)
-VVersion-2 = current hardware version

ACOPOS 8V1 Drive Range

Order NumberMains VoltageCurrentPowerNotes
8V1010.00-23x 400-480 V1.5 A0.75 kWSmallest single-axis
8V1016.00-23x 110-230 V / 1x 110-230 V3.6 A0.75 kWLow voltage variant
8V1016.50-23x 110-230 V / 1x 110-230 V3.6 A0.75 kWWith line filter
8V1022.00-23x 400-480 V4 A1.5 kW
8V1045.00-23x 400-480 V8 A4 kWCommon on packaging machines
8V1090.00-23x 400-480 V16 A8 kWCommon on larger machines
8V1180.00-23x 400-480 V48 A24 kWHigh power

The number after 8V1 roughly correlates with current: 010 ~1.5A, 016 ~3.6A, 022 ~4A, 045 ~8A, 090 ~16A, 132 ~34A, 180 ~48A.

2.4 ACOPOS P3 Drive Order Codes (8EI Series)

Format: 8EI + ccc + d + e + f + g + h + i + kk + -1

PositionMeaningValues
8EIACOPOS P3 servo drive familyMulti-axis drive platform
cccContinuous current (Aeff)1X6=1.6A, 2X2=2.2A, 4X5=4.5A, 8X8=8.8A, 013=13A, 017=17A, 022=22A, 024=24A, 034=34A, 044=44A
dVoltage classH=3x200-480VAC, M=3x200-230V or 1x110-230VAC
eMountingW=wall mounting
fAxis countS=1-axis, D=2-axis, T=3-axis
gSafety/encoder1=hardwired STO, S=SafeMOTION with digital encoder
hModule-specific options0=standard, 1=dual-use (export restricted)
iPlug-in module included0=none, A=resolver 1x, C=resolver 3x, D=digital I/O, H/J=digital multi-encoder, K/L=incremental encoder, M/N=analog multi-encoder, P=digital I/O with terminal
kkConfigurable accessories00=none, 01-7=combinations of braking resistor, front cover, connector sets
-1VersionCurrent version

2.5 ACOPOSmotor Order Codes (8DI Series)

Format: 8DI + c + d + e + . + ff + ggg + h + i + k + -1

PositionMeaningValues
cFrame size3, 4, or 5 (larger = more power)
dLength variant3-6 (determines power data within a frame size)
eSafety technology0=hardwired safety, S=SafeMOTION EnDat 2.2
ffEncoder systemS8/S9=EnDat single/multi-turn, size 3; SA/SB/DA/DB=size 4/5
gggNominal speed (rpm)022=2200 rpm, 045=4500 rpm
hElectronics options0=standard, 7=with POWERLINK + 24V outputs + trigger inputs
iMotor options0-7 = combinations of holding brake, keyed shaft, oil seal
kSpecial options0=none, 1=special-purpose shaft

2.6 Bus Module and Power Supply Order Codes

Order NumberDescriptionUsage
X20BM01Bus module, 24 VDC, single-widthStandard digital/analog I/O
X20BM11Bus module, 24 VDC, single-width (updated)Replacement for BM01 in newer builds
X20BM31Bus module, 24 VDC, double-widthFor double-width I/O modules
X20BM12Bus module, 240 VACFor AC-voltage I/O modules
X20PS2100Power supply, 24 VDC, systemStandard system power
X20PS2110Power supply, 24 VDC, with diagnosticsDiagnostic variant
X20PS3300Power supply, 24 VDC, 3ACompact supply
X20PS3310Power supply, 24 VDC, 3A, extended featuresWith additional I/O power

2.7 Accessory Order Codes

Order NumberDescriptionNotes
4A0006.00-000Backup battery, CR2477N, 3V/950mAhReplaces every 4 years; CRITICAL — must be Renata CR2477N only
0AC201.91Lithium batteries, 4 pcsBulk pack
X20TB066-pin terminal block, 24V codingStandard for digital I/O
X20TB1212-pin terminal block, 24V codingUsed on CPUs and analog modules
X20AC0SR1X20 end cover plate (right)Required to terminate unused slots
5CFCRD.1024-06CompactFlash 1 GB, B&R SLCCF card for CP158x application memory
5CFCRD.2048-06CompactFlash 2 GB, B&R SLCLarger CF card
5CFCRD.8192-06CompactFlash 8 GB, B&R SLCMaximum capacity for CP158x
8AC110.60-3ACOPOS plug-in module, CAN interfaceFor CAN-based ACOPOS communication
8AC110.60-2ACOPOS plug-in module, CAN interfaceOlder revision

3. Finding Compatible Replacement Modules

3.1 I/O Module Hot-Swap Compatibility

X20 I/O modules support hot-swap in most configurations. The key compatibility rules:

Terminal blocks are universal within their pin-count class:

  • All X20TB06 blocks interchange with any 6-pin X20 electronic module
  • All X20TB12 blocks interchange with any 12-pin X20 electronic module

Bus modules must match the voltage class:

  • X20BM01/X20BM11/X20BM31 for 24 VDC I/O modules
  • X20BM12 for 240 VAC I/O modules
  • Mixing voltage classes on the same bus segment will cause faults

Electronic modules are independent of bus/terminal:

  • Any X20 electronic module (DI, DO, AI, AO, AT, etc.) plugs into any matching-width bus module
  • You can swap a X20DI9371 for a X20DI6371 as long as the application mapping is updated in Automation Studio
  • The controller detects the new module type via the B&R ID code automatically

3.2 CPU Upgrade Path from CP1584

If your CP1584 fails or needs replacement:

FromDirect ReplacementUpgrade PathNotes
X20CP1584X20CP1584 (same rev or newer)X20CP1585 (1.0 GHz)Same slot count, faster processor
X20CP1584X20CP1584X20CP1586 (1.6 GHz)Same slot count, fastest in 1-slot series
X20CP1584X20CP1584X20CP3584 (3 slots)More interface slots, same clock
X20CP1584X20cCP1584 (coated)If environment requires conformal coating

Migration from CPx48x to CPx58x requires Automation Studio V3.0.90.20 or later and firmware upgrades for some interface modules. Refer to B&R’s migration guide (see table in Section 12).

3.3 ACOPOS Drive Replacement

When replacing an ACOPOS drive:

  1. Match the current rating — use the same or next-higher 8V1 model number
  2. Match the mains voltage8V1016 (low voltage) is NOT interchangeable with 8V1045 (high voltage) without rewiring
  3. Transfer plug-in modules — remove encoder interface, I/O, and communication modules from the failed drive and install in the replacement
  4. Re-download acp10sys — the controller will automatically push configuration to the new drive on startup. See acopos-drives.md for details on the acp10sys configuration file
  5. Re-configure node addressing — if using CAN, set the node number on the replacement drive’s hex switches to match the original

Critical: A new ACOPOS drive ships with factory defaults and NO configuration. Without a valid acp10sys download from the controller, it will not operate.

3.4 CompactFlash Card Replacement

The CP1584 stores its application on a CompactFlash card. CF cards are consumable items with finite write cycles.

Compatible CF cards for X20CP158x:

Order NumberCapacityTypeNotes
5CFCRD.0512-06512 MBB&R SLCMinimum recommended
5CFCRD.1024-061 GBB&R SLCStandard choice
5CFCRD.2048-062 GBB&R SLCGood for logging-heavy applications
5CFCRD.4096-064 GBB&R SLCLarge applications
5CFCRD.8192-068 GBB&R SLCMaximum supported

Important: Use only B&R-branded SLC (Single-Level Cell) CF cards. Commercial MLC cards will fail prematurely under industrial write patterns. Extended temperature variants (0CFCRD.0512E.01) are available for extreme environments.

For CF card backup and cloning procedures, see cf-card-boot.md.


4. Cross-Referencing Discontinued Parts

4.1 How B&R Manages Product Lifecycle

B&R (as part of ABB since 2017) follows a structured product lifecycle with four phases:

PhaseStatusAvailabilityCustomer Action
ActiveFull productionUnconditionally available for orderUse for new projects
ClassicSuperseded but still producedAvailable, but do not use for new projectsB&R notifies customers 3 years before phase-out; plan migration
LimitedLast-Time-Buy (LTB) phaseOnly LTB orders fulfilled; no new orders acceptedMust have placed binding LTB order during Classic phase
ObsoleteNo longer manufacturedB&R repair service available for 3 years after obsolescenceSource from third-party refurbishers or upgrade

Last-Time-Buy (LTB) Process:

  • During the Classic phase, B&R notifies customers of the upcoming phase-out
  • Customers must place a binding LTB order specifying annual quantities for the Limited phase
  • If B&R accepts the order, quantities are binding — cancellation fees apply (50% for standard, 85% for customized)
  • Prices are staggered per delivery year during the Limited phase
  • After the Limited phase ends, the product becomes Obsolete

Checking Lifecycle Status:

  • Online: https://www.br-automation.com — product pages show lifecycle status
  • Customer portal: Log in to view lifecycle status of purchased products
  • B&R support: Contact for lifecycle matrix queries
  • SDM: Connected modules show hardware revision; cross-reference with B&R lifecycle database

Source: B&R Lifecycle Policy

X20 System Longevity Note: The X20 system celebrated its 20th anniversary in 2024 with B&R confirming continued development and long-term availability. B&R Product Manager Andreas Hager stated the X20 “will remain crucial to the success of machine builders in the future.” This means X20 IO modules, bus controllers, and interface modules are likely to remain available for the foreseeable future, reducing spare-parts risk for the IO layer even as individual CPU models cycle through the lifecycle.

Source: B&R Press Release, October 2024

4.2 Common Discontinued Parts and Replacements

Discontinued PartReplacementMigration Notes
X20CP1484 (V4.xx firmware)X20CP1584Newer firmware, different module ID. Requires Automation Studio update and project re-configuration
X20CP0484X20CP1584Significant hardware generation change. Requires firmware migration
X20BM01 (early revisions)X20BM11Drop-in replacement on same bus segment
Power Panel PP100/PP015X20CP1584 + separate HMIRequires full application rewrite
ACOPOS with CAN communicationACOPOS with POWERLINKRequires interface module change and protocol migration
CompactFlash cards < 256 MB5CFCRD.1024-06 (1 GB SLC)Older small cards may not have enough space for newer firmware

4.3 Interrogating the Controller for Installed Hardware

When you have no documentation, use these methods to discover exactly what hardware is installed:

Method 1: SDM Web Interface

  1. Connect to the CP1584 via Ethernet
  2. Open a browser to http://<PLC-IP>/sdm/
  3. Navigate to Hardware > Modules to see every module in the X2X tree with its order number, revision, and serial number

Method 2: Automation Studio Online Connection

  1. Create a new project in Automation Studio
  2. Add a generic X20CP1584 to the hardware tree
  3. Connect online via Ethernet or RS232
  4. Use “Upload from target” to pull the actual hardware configuration

Method 3: ANSL Discovery + Telnet/SSH

  1. Use Wireshark to capture ANSL packets (UDP ports 30303, 11169) to find the PLC
  2. Telnet to the PLC’s IP and use B&R diagnostic commands to query the module table
  3. See cp1584-forensics.md for detailed procedures

Method 4: Physical Walkdown

  1. Photograph every module label in the cabinet
  2. Record the position (DIN rail slot number) and order number
  3. Note the wiring connections on each terminal block
  4. Build a physical inventory spreadsheet

4.4 Checking B&R ID Codes Against Known Values

The controller’s hardware tree uses B&R ID codes internally. When you read these via HWInfo, you can cross-reference against the known ID table. If you encounter an unknown ID code, search the B&R Automation Help system or post on the B&R Community forum (https://community.br-automation.com).


5. Building a Spare Parts Inventory for Defunct OEM Machines

5.1 Prioritization Framework

When building a spare parts inventory with limited budget, prioritize by criticality x difficulty of sourcing x lead time:

Tier 1 — Keep on Hand (immediate failure = machine down):

  • CP1584 CPU unit or equivalent upgrade
  • CompactFlash card with known-good backup image
  • Backup batteries (CR2477N) — at least 2 per machine
  • Most-commonly-used I/O modules (digital inputs, digital outputs)
  • ACOPOS drives (at least one spare per unique current rating in use)
  • Power supply modules (X20PS series)

Tier 2 — Source Within 48 Hours (failure degrades capability):

  • Less-common I/O modules (analog, temperature, special function)
  • Interface modules (IFxxxx for fieldbus communication)
  • Terminal blocks (X20TB06, X20TB12)
  • Bus modules (X20BM11, X20BM31)
  • End cover plates (X20AC0SR1)
  • ACOPOS plug-in modules (encoder interfaces, I/O modules)

Tier 3 — Source Within 2 Weeks (failure reduces functionality):

  • HMI panels and touch screens
  • Network cables and connectors
  • Additional CompactFlash cards
  • Mounting hardware and DIN rail accessories
QtyPart NumberDescriptionRationale
1X20CP1584CPU, Atom 600 MHzCPU failure = total machine stop
25CFCRD.1024-06CF card 1 GB SLCOne spare + one backup image carrier
44A0006.00-000Backup battery CR2477NReplace every 4 years; keep extras
2X20DI9371 (or your specific DI module)Digital input moduleMost common failure point
2X20DO9322 (or your specific DO module)Digital output moduleHigh cycle count, wear-prone
1X20BM11Bus moduleBus module failure takes down entire segment
1X20PS2100System power supply 24 VDCPower supply failure = total stop
1Matching ACOPOS drive (your model)Servo driveMatch your highest-current axis drive
1Matching ACOPOS plug-in moduleEncoder interfaceFor your specific motor encoder type
2X20TB066-pin terminal blockWiring damage during maintenance
2X20TB1212-pin terminal blockWiring damage during maintenance

5.3 Creating the Inventory from an Undocumented Machine

Step-by-step procedure:

  1. Network discovery — Follow cp1584-forensics.md to connect to the PLC and pull the hardware tree via SDM

  2. Capture the hardware configuration via brwatch — Use the brwatch GUI tool (github.com/hilch/brwatch) to browse the PLC’s variable tree and extract module info. brwatch is a Windows-only GUI application that requires B&R PVI to be installed. It cannot be pip-installed and has no CLI/JSON mode. To capture hardware info:

    • Download brwatch.exe from github.com/hilch/brwatch/releases
    • Configure BRWATCH.ini with ANSL=1 (or leave as INA for older AR)
    • Click the TCP device node to scan for PLCs on the network
    • Browse the CPU node to see all connected hardware
    • Use File > Save to preserve the watch configuration
    • See pvi-api.md and access-recovery.md for alternatives using PVI Python or OPC-UA
  3. Create a system dump for full inventory — The systemdump.py tool (github.com/hilch/systemdump.py) can generate an inventory from a dump file:

pip install systemdumpy

## Create and download a system dump from the PLC
py -m systemdumpy 192.168.1.10 -cuv -p Inventory_

## Extract hardware inventory as .xlsx spreadsheet
py -m systemdumpy Inventory_BuR_SDM_Sysdump_2026-07-10_14-30-55.tar.gz -iv

The resulting .xlsx file contains a complete inventory of all modules with order numbers, serial numbers, firmware versions, and status — ready to paste into your spare parts BOM spreadsheet.

  1. Physical walkdown — Walk every cabinet and photograph every module. Record position, order number, revision, and wiring connections. Pay special attention to:

    • ACOPOS drives in the drive cabinet
    • Bus couplers and remote I/O nodes
    • Any non-B&R components (relays, contactors, fuses)
  2. Build a BOM spreadsheet with columns:

    • Position/location in cabinet
    • Order number
    • Description
    • Revision
    • Serial number
    • B&R ID code (from SDM)
    • Quantity installed
    • Spare quantity on hand
    • Supplier / last price
    • Lead time
    • Priority tier
  3. Identify unique vs. common parts — Group parts by order number. Parts used in only one position are highest risk (no redundancy)

  4. Determine obsolescence status — For each unique order number, check:

    • B&R website product lifecycle
    • Third-party distributor stock levels
    • Community forums for replacement discussions
  5. Order critical spares — Start with Tier 1 items, then Tier 2 based on budget

5.4 Backup Strategy

Beyond physical spare parts, maintain these digital backups:

Backup TypeWhatWhereFrequency
CF card imageFull binary clone of CF cardOffline storage (USB drive, NAS)After every program change
Automation Studio project.apj file + all sourceVersion control (Git)After every change
acp10sys configurationDrive parameter fileExport from projectAfter any drive parameter change
Hardware configurationModule list with order numbersSpreadsheet + photosAfter any hardware change
Network configurationIP addresses, node numbers, firmware versionsDocumentationAfter any network change

See cf-card-boot.md for CF card imaging procedures and project-reconstruction.md for project recovery.


6. Third-Party Sources for B&R Parts

6.1 Authorized B&R Channels

ChannelContactBest For
B&R Direct (ABB)https://www.br-automation.comNew parts, warranty, technical support, firmware
B&R Support PortalOnline ticket systemTechnical issues, obsolescence queries
B&R Value ProvidersFind at https://www.br-automation.comLocal sales, commissioning, spare parts stock

6.2 Third-Party Distributors (New and Surplus)

DistributorWebsiteSpecialtyWarranty
EU Automationeuautomation.comWide B&R stock, fast delivery, obsolete parts12 months
Wake Industrialwakeindustrial.comRepair, replacement, refurbishment, surplus purchaseVaries
Allaouiallaoui.comGenuine and compatible B&R parts, global shippingVaries
CJS Automationcjsautomation.comNew, reconditioned, obsolete B&R parts12 months
AI Automationaiautomation.globalLegacy and obsolete B&R parts, US-based12 months
KC Kim Consultingkc-co.comB&R spare parts export, globalVaries
K2 Automationk2automation.comLegacy B&R parts, full compatibilityVaries
Xindustraxindustra.comACOPOS, X20 I/O, HMI, industrial PCs12 months
Larraioz Elektronikalarraioz.comSpain-based, large B&R stock, obsolete elementsVaries
Classic Automationclassicautomation.comB&R surplus and repair servicesVaries
Automation Warehouseautomation-warehouse.comSurplus and refurbished B&R productsVaries
Omega Electronicsomega-e.euB&R repair — PLC, HMI, drivesVaries
Standard Exchange Industrystandard-exchange-industry.comFrance-based, B&R servo drivesVaries
all4spsall4sps.comLarge inventory, datasheets available onlineVaries

6.3 Repair Services

For drives and modules that can be repaired rather than replaced:

ServiceTypeNotes
Wake IndustrialACOPOS drive repair, refurbished unitsUS-based, phone: 1-919-443-0207
Omega ElectronicsPLC, HMI, drive repairPower modules, I/O, cooling systems
Standard Exchange IndustryServo drive repair and exchangeExchange program for faster turnaround

6.4 Online Marketplaces (Use with Caution)

PlatformNotes
eBayMany B&R parts listed; verify seller reputation, check for counterfeit risk. Search by full order number
AlibabaSome B&R-compatible parts from Chinese suppliers. Quality varies widely. Verify specifications carefully
IndiaMARTSome B&R parts available from Indian distributors at competitive prices

Warning when buying from marketplaces:

  • Always verify the full order number including suffix (.00-2 matters)
  • Check hardware revision — older revisions may not be compatible with your firmware
  • Request photos of the actual label, not stock photos
  • Prefer sellers who test before shipping
  • Budget for potential returns — some marketplace sellers charge restocking fees

6.5 B&R Community Forum

The B&R Community (https://community.br-automation.com) is an invaluable resource for:

  • Asking about discontinued parts and replacements
  • Confirming compatibility between module revisions
  • Getting help with order code interpretation
  • Finding migration guides for older hardware
  • B&R engineers actively participate in discussions

7. Lead Times and Availability Considerations

7.1 Typical Lead Times

SourceNew PartsSurplus/RefurbishedRepair Turnaround
B&R Direct (active parts)2-8 weeksN/A4-12 weeks
EU Automation (in-stock)Next day - 1 weekSame/next dayN/A
Wake Industrial1-2 weeks1-3 days1-3 weeks
Allaoui / CJS / Xindustra1-4 weeks1-2 weeksN/A
eBay / marketplaces1-5 days1-5 daysN/A
Repair servicesN/AN/A1-4 weeks depending on fault

7.2 Factors Affecting Availability

  • Active vs. obsolete — Active B&R parts are available through B&R and distributors. Obsolete parts require surplus channels or repair
  • Voltage variants — Low-voltage ACOPOS drives (8V1016 series) are less common than high-voltage (8V1045/1090 series) and may have longer lead times
  • Coated modules — X20c (conformal-coated) variants are less common than standard X20 and may need to be ordered from B&R directly
  • CF cards — B&R-branded SLC CF cards are becoming harder to source as CompactFlash is being phased out industry-wide. Stock up while available
  • Battery (CR2477N) — Standard lithium cell, available from battery suppliers. Not B&R-specific, but must be the Renata CR2477N to avoid fire/explosion risk
  • Global chip shortages — Since 2020, industrial semiconductors have experienced intermittent shortages. Active B&R parts may have extended lead times during shortage periods

7.3 Emergency Sourcing Strategy

When a critical part fails and no spare is available:

  1. Check all third-party distributors simultaneously — Use the order number to search EU Automation, Wake Industrial, CJS, and Allaoui in parallel
  2. Check eBay with exact order number — Sort by “Buy It Now” for fastest procurement
  3. Consider repair — Send the failed unit to a repair service (Wake Industrial, Omega Electronics). Even a 2-week repair is better than a 2-month new-part wait
  4. Consider upgrade — If the exact part is obsolete, a newer compatible part may be in stock. Check B&R’s migration guides
  5. Contact B&R support — Even if you have no direct relationship, B&R support can check global inventory across their distribution network
  6. Cross-post on the B&R Community — Other engineers may have spare units they are willing to sell

8. Practical Walkdown Checklist

Use this checklist when doing a first-time physical inspection of an undocumented B&R machine:

Cabinet 1 — Main Control Cabinet

  • Photograph every DIN rail with all modules installed
  • Record CPU module order number, revision, serial number (typically X20CPxxxx)
  • Record all I/O module order numbers (DI, DO, AI, AO, AT)
  • Record all bus module order numbers (X20BMxx)
  • Record power supply modules (X20PSxxxx)
  • Record interface modules (X20IFxxxx)
  • Note bus couplers (X20BC0087, X20BC0088) if present
  • Record terminal block types (X20TB06, X20TB12)
  • Check battery compartment — is a battery installed? Note replacement date
  • Check CF card — is one installed? Note capacity marking
  • Photograph the interior wiring layout

Cabinet 2 — Drive Cabinet (if separate)

  • Record all ACOPOS drive order numbers (8V1xxx.xx-x)
  • Record all ACOPOS plug-in modules (8AC110.xx-x)
  • Note the plug-in module installed in each drive slot
  • Record motor nameplates (8DI, 8LS, 8LVA, 8WSA series)
  • Record drive node addresses from hex switches
  • Photograph the DC bus and power wiring
  • Note any fusing and their ratings

Cabinet 3 — Field I/O (if remote nodes exist)

  • Record bus couplers at each remote node
  • Record all I/O modules at each node
  • Record bus receiver/transmitter modules (X20BR9300, X20BT9100)
  • Photograph cable routing and node addresses

Network Configuration

  • Record all Ethernet station addresses (hex switches on CPUs and interfaces)
  • Record POWERLINK node numbers
  • Capture the network diagram from the physical cable routing
  • Note any managed switches or network infrastructure

10. Migration Checklist for CPx48x to CPx58x

When upgrading from X20CPx48x generation to X20CPx58x (e.g., from CP1484 to CP1584), the following interface modules require specific hardware revisions or firmware upgrades:

Interface ModuleMinimum Upgrade VersionMinimum Hardware Revision
X20IF10201.1.5.1H0
X20IF10301.1.5.1I0
X20IF1041-1
X20IF1043-1
X20IF1051-1
X20IF1053-1
X20IF1061E0
X20IF1061-1
X20IF10631.1.5.0
X20IF1063-1
X20IF1065
X20IF10721.0.5.1
X20IF10821.2.2.0
X20IF1082-21.2.1.0
X20IF1086-21.1.1.0
X20IF10911.0.5.1
X20IF27721.0.6.1
X20IF27921.0.5.1

Modules not listed require no upgrade — they are compatible as-is.

Requires Automation Studio V3.0.90.20 minimum.


11. Quick Reference: Order Number to Specification Lookup

Digital Input Modules

Order NumberChannelsVoltageWiringFilter
X20DI6371624 VDC1 or 2 wireConfigurable
X20DI93711224 VDC1 wire (sink)Configurable
X20DI93721224 VDC1 wire (source)Configurable

Digital Output Modules

Order NumberChannelsVoltageType
X20DO9322824 VDCTransistor (source)
X20DO6321424 VDCTransistor (sink)

Analog Input Modules

Order NumberChannelsRangeResolution
X20AI462240/4-20 mA16-bit
X20AI463140-10 V16-bit
X20AI26312+/-10 V24-bit

Analog Output Modules

Order NumberChannelsRangeResolution
X20AO462240/4-20 mA16-bit
X20AO26222+/-10 V16-bit

Temperature Modules

Order NumberTypeChannels
X20AT6421RTD (Pt100/NI1000)4
X20AT6401Thermocouple4

Bus Controllers

Order NumberFieldbusNotes
X20BC0087POWERLINK V1/V2Most common for CP1584 systems
X20BC0088POWERLINK V2 onlyUpdated variant
X20BC0083EtherNet/IPFor integration with non-B&R systems

Key Findings

  1. Every B&R module label follows a structured order code — once you learn the convention for each product family (X20, 8V1, 8EI, 8DI), you can determine specifications, power ratings, and compatibility from the part number alone without any documentation.

  2. The X20 system’s three-part module design (terminal block + electronic module + bus module) means individual components can be replaced independently. Terminal blocks and bus modules are universal within their class; only the electronic module is specific to the I/O function. See io-card-hardware.md for signal processing details.

  3. CPU upgrades within the CP158x family are generally compatible (CP1583/1584/1585/1586 share the same platform), but crossing generations (CPx48x → CPx58x → X20EM) requires Automation Studio project changes and firmware upgrades for interface modules. See cp1584-hardware-ref.md for hardware specifications and firmware-version-mgmt.md for version compatibility.

  4. ACOPOS drives require acp10sys download from the controller — a replacement drive will not operate until the controller pushes its configuration on startup. Always verify your controller has the correct acp10sys before replacing a drive. See acopos-drives.md for the complete drive management procedures.

  5. B&R serial numbers can be looked up on the B&R website (https://www.br-automation.com/en/search/) to determine manufacturing date and compatibility. The B&R ID code (4-digit hex) can be read via HWInfo or SDM to identify modules even when labels are missing or damaged.

  6. Third-party distributors are the primary sourcing channel for machines from defunct OEMs. EU Automation, Wake Industrial, CJS, Allaoui, and Xindustra all maintain significant B&R stock with 12-month warranties. Budget 1-4 weeks for standard delivery and keep critical Tier 1 spares on hand.

  7. CompactFlash cards are the most critical consumable — use only B&R-branded SLC cards. Stock multiple cards and maintain verified backup images. CF card failure is the most common cause of unplanned downtime on CP1584 machines. See cf-card-boot.md for imaging and backup procedures.

  8. The backup battery (Renata CR2477N) must be replaced every 4 years and is the only permitted battery type. Using a different battery is a fire and explosion hazard per B&R’s safety documentation. This item should always be in your spares inventory. See retentive-data.md for battery replacement procedures.

  9. The B&R Community forum is an active and valuable resource — B&R engineers participate, and the community collectively maintains institutional knowledge about part compatibility, migration, and sourcing that is not available in official documentation.

  10. When sourcing from the surplus/used market, verify firmware compatibility before purchasing. An X20IF1082 Modbus module requires upgrade version 1.2.2.0 for CP1584 compatibility. See remanufacturing.md for evaluation criteria and network-architecture.md for network topology planning.

  11. The awesome-B-R community repository (github.com/br-automation-community/awesome-B-R) is the single best resource for finding compatible alternatives, migration tools, and community-maintained compatibility lists. It includes the as6-migration-tools for AR version upgrades, links to B&R part number databases, and user-reported compatibility experiences for third-party hardware substitutions.

  12. brwatch can read module serial numbers and firmware versions without Automation Studio. When inventorying a machine, use brwatch (github.com/hilch/brwatch) to extract the hardware tree from the running PLC — this gives you module IDs, serial numbers, and firmware versions for every device in the X2X chain. See access-recovery.md §12 for the procedure.

  13. systemdump.py (github.com/hilch/systemdump.py) can generate Excel hardware inventories from a system dump file, saving hours of manual transcription. Run py -m systemdumpy <dump_file> -iv to produce a ready-to-use .xlsx inventory spreadsheet. See diagnostics-sdm.md §11.7 for full CLI usage.

  14. brsnmp (github.com/hilch/brsnmp) can scan entire subnets to find all B&R devices, even those you don’t know the IP of. This is useful when a machine has multiple PLCs or network segments:

pip install brsnmp

# Discover all B&R PLCs on the subnet with full details
brsnmp --details

# Output example:
# [
#   {"targetType": "X20CP1584", "serialNumber": "C37012345678",
#    "arVersion": "B04.73", "ipAddress": "192.168.1.10"},
#   {"targetType": "X20CP1586", "serialNumber": "C3B00009876",
#    "arVersion": "B04.93", "ipAddress": "192.168.1.11"}
# ]

Cross-References

Related FileRelevance
cp1584-hardware-ref.mdComplete CP1584 specifications, LED codes, pinouts, and hardware revision compatibility
io-card-hardware.mdIO card signal processing, LED diagnostic codes, and module-level troubleshooting
firmware-version-mgmt.mdFirmware compatibility checks before purchasing replacement modules
cf-card-boot.mdCompactFlash card specifications and imaging procedures for CF spares
retentive-data.mdBattery (CR2477N) replacement procedure and retentive data preservation
acopos-drives.mdACOPOS drive parameter backup and replacement procedures
remanufacturing.mdMigration paths and upgrade evaluation criteria when replacing entire subsystems
network-architecture.mdNetwork topology and interface module compatibility for replacement planning
access-recovery.mdUsing brwatch to extract hardware tree for spare parts inventory
diagnostics-sdm.mdUsing systemdump.py for generating hardware inventory spreadsheets
bootloader-recovery.mdRecovery procedures when replacement hardware requires firmware reload
online-changes.mdRuntime considerations when replacing modules in a running system
ftp-web-interface.mdRemote CF card access for backup before hardware replacement
cp1584-forensics.mdNetwork discovery, SDM access, extracting hardware info from running CP1584
project-reconstruction.mdRebuilding an Automation Studio project from an undocumented machine

System Variable Monitoring on B&R Automation Runtime

Overview

This document is a survival guide for automation engineers maintaining B&R X20CP1584 (and related CP15xx/CP35xx) PLCs from defunct OEMs with zero documentation. It covers every system variable you can read from a running B&R Automation Runtime (AR) controller, how to access them without the original project, and how to interpret abnormal values for proactive failure detection.

B&R AR exposes system health through three distinct mechanisms:

  1. CPU I/O Mapping / General Data Points – hardware-level registers available in the controller’s I/O tree (temperature, battery status)
  2. System Library Function Blocks (FUBs) – software functions from BRSystem, AsArProf, and other standard libraries (CPU usage, task cycle times, memory diagnostics)
  3. System Diagnostics Manager (SDM) – built-in web server providing real-time dashboards without any development tools

Cross-references: See custom-diagnostic-tools.md for building external monitoring scripts, hardware-monitoring.md for physical inspection procedures, and execution-model.md for task class architecture details.


X20CP1584 Hardware Reference

ParameterValue
ProcessorIntel Atom E640T @ 0.6 GHz
System RAM256 MB DDR2 SDRAM
User RAM (SRAM)1 MB (minus configured remanent variables)
Remanent VariablesMax 256 kB (configurable)
Shortest Task Class Cycle400 us
Typical Instruction Cycle0.0075 us
CompactFlashRemovable, ordered separately
Battery3 V / 950 mAh lithium (Renata CR2477N)
Battery LifeMin. 2 years at 23 C ambient
CoolingFanless
Operating Temp (horizontal)-25 to 60 C
Operating Temp (vertical)-25 to 50 C
Storage Temp-40 to 85 C
Power Consumption8.6 W (without interface module)
B&R ID Code0xC370
Integrated I/O ProcessorProcesses I/O data points in the background

Thermal Protection

Protection LevelTemperatureAction
CPU overtemperature shutdown110 C (processor die)PLC enters reset state, error 9204 logged
Board overtemperature shutdown95 C (PCB)PLC enters reset state, error 9204 logged
Software thermal protection105 C (component)Controller enters SERVICE mode to self-protect

LED Status Indicators

LEDColorStateMeaning
RDY/FGreenOnApplication running
RDY/FGreenBlinkingSystem startup (initializing)
RDY/FGreenDouble flashFirmware update in progress
RDY/FYellowOnSERVICE or BOOT mode
R/ERedOnSERVICE or BOOT mode
R/ERedDouble flashInstallation error (AR 4.93+)
S/EGreenOnPOWERLINK running, no errors
S/ERedOnSystem error (check logbook)
S/EGreen+RedAlternating blinkPOWERLINK managing node failed
S/ERedBlinking (off/green)System stop error code
PLKGreenOnPOWERLINK link established
ETHGreenOnEthernet link established
CFGreenOnCompactFlash detected
CFYellowOnCF read/write active
DCRedOnBattery empty
DCYellowOnCPU power supply OK
CodePatternDescription
RAM errorShort-Short-Short-LongRAM failure – device defective, replace
Hardware errorShort-Short-Long-LongHardware failure – device defective, replace

Pattern encoding: 4 phases of short (150 ms) or long (600 ms) pulses, repeated every 2 seconds.


System Variable Categories

1. CPU Temperature

Source: I/O Mapping (controller data points) / General Data Points

The X20CP1584 provides two temperature measurement points in its I/O mapping:

Data PointLocationDescription
CPU TemperatureOn-die / CPU packageDirect CPU silicon temperature
Housing TemperatureNear circuit board inside housingInternal ambient reference

Note: There is no direct ambient/cabinet temperature sensor on the CPU. For external ambient monitoring, B&R offers X20CMR010/011/111/100 climate measurement modules.

Temperature RangeStatusAction
40 - 55 CNormal (at 20-25 C ambient)No action
55 - 75 CElevated (cabinet 35-45 C)Verify ventilation, check cabinet temp
75 - 89 CWarning zoneAlert operator, investigate airflow
89 - 100 CCriticalPlan maintenance window, check cooling
> 105 CShutdown imminentCPU enters SERVICE mode automatically
>= 110 CHard shutdownError 9204 logged, PLC enters reset state

Temperature delta rule: A 10 C rise in ambient temperature produces approximately a 10 C rise in both CPU and housing temperature.

Abnormal values indicate:

SymptomLikely Cause
CPU 70+ C at 20 C ambient on deskMounting orientation wrong (flat on table blocks airflow)
Steady climb over hoursCabinet cooling failure (fan dead, filter clogged)
Sudden spike after software changeNew task consuming excess CPU cycles
Temperature oscillates rapidlyIntermittent high-priority task blocking idle time

2. CPU Usage (Idle Time)

Source: LogIdleShow FUB from AsArProf library / SDM web interface

CPU usage is NOT available as a direct I/O data point. It must be read via software or the SDM.

The LogIdleShow function block from the AsArProf library calculates CPU usage from task idle time – the percentage of time when cyclic tasks are not consuming their allocated time slices. This is a measured average over a time interval, not an instantaneous value.

(* Example: LogIdleShow instantiation *)
fbIdleTime : LogIdleShow;

(* In cyclic task *)
fbIdleTime();
cpuIdlePercent := fbIdleShow.idle;   (* Higher = more idle = lower CPU usage *)
CPU Usage (100% - idle%)StatusInterpretation
0 - 40%HealthyPlenty of headroom for communication and events
40 - 70%ModerateNormal for loaded applications
70 - 85%ElevatedWatch for cycle time creep, limit new features
85 - 95%Danger zoneRisk of cycle time violations, watchdog trips
> 95%CriticalImminent SERVICE mode entry from watchdog

Abnormal values indicate:

SymptomLikely Cause
Usage jumps from 40% to 90%Blocking operation in fast task (File I/O, TCP socket, string ops in <10 ms class)
Gradual increase over weeks/monthsMemory leak consuming resources, growing data structures
Usage spikes every N cyclesPeriodic task with variable execution time
High usage only when SDM is openSDM cyclic data transfer overhead (significant on smaller CPUs, ~10% on X20CP13xx)

Cross-reference: See execution-model.md for task class priority and time-slice allocation details.


3. Task Cycle Times

Source: RTInfo FUB from BRSystem library / Profiler / SDM Task Monitor

Each task class (Cyc0, Cyc1, Cyc2, Cyc3, and event tasks) is assigned a fixed time slice. When execution exceeds this slice, the watchdog timer triggers and can place the controller in SERVICE mode.

The RTInfo function block from the BRSystem library returns real-time task information:

(* Example: RTInfo for task monitoring *)
fbRTInfo : RTInfo;

(* In cyclic task -- pass task class name *)
fbRTInfo(pTask := 'Cyclic#1');    (* or 'Cyclic#2', 'Cyclic#3', etc. *)
fbRTInfo();
currentCycleTime := fbRTInfo.cycTime;   (* Current cycle execution time in us *)
minCycleTime    := fbRTInfo.cycTimeMin; (* Minimum observed cycle time *)
maxCycleTime    := fbRTInfo.cycTimeMax; (* Maximum observed cycle time *)
Task ClassTypical Default CycleTypical Use
Cyclic#1 (Cyc0)1 ms (fastest possible: 400 us on CP1584)Motion control, high-speed I/O
Cyclic#2 (Cyc1)10 msProcess control, regulation loops
Cyclic#3 (Cyc2)100 msSequencing, HMI updates
Cyclic#4 (Cyc3)ConfigurableSlow background tasks
Event tasksOn-triggerAlarm handling, state machines

Cycle time monitoring thresholds:

MetricWarningCritical
Cycle time / allocated slice> 60%> 85%
Jitter (max - min)> 30% of slice> 50% of slice
Consecutive near-misses3+ cycles > 70%1+ cycle > 90%

Abnormal values indicate:

SymptomLikely Cause
Cycle time suddenly 2-3x normalInfinite loop (while/for without exit condition), stuck state machine
Gradual increase over shiftGrowing string buffer operations, memory fragmentation
Spikes every few minutesGarbage collection, File I/O flush, OPC UA communication
Max cycle >> averageRare code path hit (error handling branch, first-cycle initialization)

Key fact: Approximately 80% of all B&R SERVICE mode entries are caused by cycle time violations.


4. Memory Usage

Source: sys_br_get_info / I/O mapping / SDM

The X20CP1584 has 256 MB DDR2 SDRAM system RAM and 1 MB SRAM for user data. Memory usage can be monitored through:

  • The SDM System page (web browser, no tools needed)
  • sys_br system variable structures (if accessible in your runtime)
  • Automation Studio memory diagnostic tools (with project)
Memory RegionSize (CP1584)Purpose
DDR2 SDRAM (System RAM)256 MBOS, libraries, application code, runtime objects
SRAM (User RAM)1 MBFast user variables, data processing
Remanent VariablesUp to 256 kBPersistent data across power cycles (FRAM/battery-backed)
CompactFlash16 MB - 8 GB (card dependent)Application storage, file system
Battery-backedSystem RAM + User RAM + RTCMaintained by lithium battery

Memory pressure indicators:

SymptomInterpretation
SRAM approaching 100%Add more variables -> reduce available headroom
SDRAM > 80% consumedLarge arrays, string buffers, or memory leak
CompactFlash > 90% fullLog files accumulating, limit log rotation
Remanent variable space fullCannot add new persistent variables

Abnormal values indicate:

SymptomLikely Cause
SDRAM usage climbing steadilyMemory leak (dynamically allocated objects never freed)
SRAM exhausted after downloadProject too large for this CPU model
CompactFlash writes every cycleApplication logging in fast task class

5. Watchdog Status

Source: System configuration / SDM / Error logbook

B&R AR implements per-task-class watchdog timers. Each task class has a configurable watchdog timeout that defaults to slightly longer than the configured cycle time.

Watchdog EventResultError Code
Cycle time violationTask watchdog triggersVaries by AR version
Watchdog after cycle exceed (task in safe state)SERVICE mode9210 (halt/service after watchdog)
Continuous violationsPLC enters reset state9204

Watchdog configuration is in the Hardware Configuration -> Task Settings. Each task class can have its watchdog timeout independently adjusted.

Abnormal values / events indicate:

SymptomLikely Cause
Intermittent watchdog trips (random intervals)Network-induced blocking, garbage collection, priority inversion
Consistent watchdog trip at startupConfiguration mismatch between cycle time and task content
Watchdog trip only when HMI connectedCommunication overload from visualization

6. Battery Status

Source: BatteryInfo system library function / CPU I/O mapping / DC LED

Battery status is available both as a software-readable value and via the front-panel DC LED.

Battery Info ValueStatusAction
Battery OKGreenNormal operation
Battery lowWarningSchedule replacement within maintenance window
Battery emptyDC LED red, error loggedImmediate replacement required (replace within 1 min if power removed)

What battery backup covers:

  • Remanent variables
  • User RAM
  • System RAM
  • Real-time clock (RTC)

Replacement: Renata CR2477N only. Replace every 4 years. Can be hot-swapped under power, or within 1 minute without power. Never use a different battery model number.

Abnormal values indicate:

SymptomLikely Cause
Battery low warningNormal aging (replace every 4 years)
Battery low after 1 yearExtreme temperature cycling, poor storage conditions
Battery OK but RTC driftingCrystal oscillator issue (separate from battery)
Loss of remanent variables after power cycleBattery completely depleted, FRAM failure

7. I/O Status

Source: I/O mapping / SDM Hardware page / LED indicators

The X20CP1584 uses an integrated I/O processor that handles I/O data points in the background, independently from the main CPU task execution.

I/O DiagnosticSourceDescription
Module Run/ErrorLED + softwarePer-module operational status
X2X Link statusLED + SDMBus communication health
I/O power supply overloadRed LED (l)X2X Link power overloaded
I/O power supply undervoltageRed LED (r) double flashInput voltage too low
Module insertion/removalSDM eventHot-swap detection

The I/O mapping in the controller configuration automatically provides status structures for each connected module. When accessed through SDM or PVI, these data points are available without the project.

Abnormal values indicate:

SymptomLikely Cause
Intermittent I/O dropout on single moduleLoose bus connector, damaged X2X cable
All modules showing errorsX2X Link power supply issue, bus termination problem
Module error after power cycleFirmware mismatch, hardware fault on module
I/O values frozenTask stopped (SERVICE mode), I/O processor still running

8. Network Statistics

Source: SDM Network page / Ethernet & POWERLINK LED indicators

Network ParameterInterfaceHow to Monitor
Link status (up/down)ETH (IF2)Green LED, SDM
Link activity (tx/rx)ETH (IF2)LED blinking, SDM
POWERLINK statePLK (IF3)S/E LED pattern, SDM
POWERLINK cyclic data exchangePLK (IF3)S/E LED (OPERATIONAL = data flowing)
Ethernet collisions/errorsETH (IF2)SDM diagnostics
POWERLINK frame timeoutPLK (IF3)Auto fallback to BASIC_ETHERNET

POWERLINK S/E LED State Machine (V2 mode):

S/E LED PatternStateDescription
Off/OffNOT_ACTIVEPowered off, startup, or misconfigured
Flickering ~10 Hz / OffBASIC_ETHERNETEthernet fallback (CN only, auto-recover)
Single flash ~1 Hz / OffPRE_OPERATIONAL_1MN: reduced cycle / CN: waiting for SoC
Double flash ~1 Hz / OffPRE_OPERATIONAL_2MN: cyclic starting / CN: configured
Triple flash ~1 Hz / OffREADY_TO_OPERATECyclic data flowing but not yet evaluated
Blinking ~2.5 Hz / OffOPERATIONALFull cyclic communication active
Off / Blinking redSTOPPEDCN stopped by MN command
Off / OnError modeFailed frames, collisions
Blinking (green+red) / OnError with stateError in PREOP/READYTOOP state

Abnormal values indicate:

SymptomLikely Cause
POWERLINK cycling between PREOP1 and BASIC_ETHERNETCable issue, MN not running, wrong node address
ETH LED offCable unplugged, switch port failure, wrong VLAN
Frequent POWERLINK reconnectionsElectromagnetic interference, marginal cable
S/E solid redCheck PLC logbook for specific error

Reading System Variables Without the Project

This is the critical section for engineers working with defunct OEM equipment.

Method 1: System Diagnostics Manager (SDM) – No Tools Required

The SDM is a built-in web server on every B&R controller running AR V3.0 or higher. It requires only a web browser and TCP/IP connectivity.

Access: http://<PLC_IP_ADDRESS>/sdm

SDM FeatureInformation AvailableRequires Project?
System pageCPU usage, task cycle times, memory usage, uptimeNo
Hardware pageAll I/O modules, temperatures, bus status, module errorsNo
Network pageEthernet/POWERLINK status, IP configurationNo
Error logbookHistorical errors, exceptions, SERVICE mode entriesNo
ProfilerTask runtime profiling, cycle time analysisNo
Software pageInstalled modules, versions, license statusNo

Procedure:

  1. Connect PC to same network as PLC (or directly via crossover cable)
  2. Ping the PLC IP address to verify connectivity
  3. Open browser: http://<PLC_IP>/sdm
  4. Navigate System / Hardware / Network tabs for diagnostics
  5. Use the Error logbook tab for historical fault analysis

Tip: The SDM is always running in the background (even when the web page is not loaded). It provides historical CPU usage data for time intervals when no browser was connected. On smaller CPUs, opening the SDM can increase CPU usage by ~10%.

Cross-reference: See custom-diagnostic-tools.md for automating SDM data collection via scripts.

Method 2: PVI (Process Visualization Interface) – No Project Required

B&R’s PVI protocol can enumerate and read all controller variables (including system data points) without the source project. PVI tools ship with the B&R Runtime installation.

ToolPurposeProject Required?
PVI ManagerEstablish connections to PLCsNo
PVI MonitorReal-time variable monitoring and exportNo
Runtime Utility Center (RUC)Save all controller variables to fileNo
PVIservices DLL.NET library for custom applicationsNo
OPC ServerOPC UA/DA access to all variablesNo (if configured)

Procedure with PVI Monitor:

  1. Install B&R Runtime components (includes PVI tools)
  2. Open PVI Manager
  3. Create new device connection (Ethernet: enter PLC IP; or RS232 for serial)
  4. Launch PVI Monitor from the Runtime group
  5. Browse the variable tree – system data points and I/O mapping are visible
  6. Export variable list to CSV for documentation

Procedure with PVIservices (.NET):

// Conceptual -- PVIservices connects via PVI protocol
PVIConnection pvi = new PVIConnection();
pvi.Connect("192.168.1.100", PVIProtocol.ANSL);
foreach(var variable in pvi.GetAllVariables()) {
    Console.WriteLine($"{variable.Name}: {variable.Address}");
}

Procedure with OPC:

  1. If OPC server is enabled on the PLC, connect with any OPC client
  2. Browse the address space – system variables appear in the tree
  3. No source code needed

Note: On legacy B&R PLCs (CP476 era), PVI communications do not require authentication. On newer AR versions, authentication may be configured.

Method 3: Automation Studio Online Mode – No Project Required

Even without the project source, Automation Studio can connect to a running PLC in online mode:

  1. Install Automation Studio
  2. Open AS without a project
  3. Use Online -> Connect to Target (enter PLC IP)
  4. Logger shows real-time and historical events
  5. Watch Window can monitor variables by entering their names/addresses manually
  6. Trace (oscilloscope) can capture variable values over time
  7. Profiler captures task runtime behavior

Method 4: PLC I/O Mapping Direct Access

System data points (temperature, battery status) are in the controller’s own I/O mapping – not in the application project. They are always accessible through:

  • SDM Hardware page
  • PVI Monitor (browse to controller -> I/O mapping)
  • Automation Studio I/O assignment in monitor mode

Trending System Variables Over Time

Built-in: Profiler

The Automation Studio Profiler captures task runtime behavior over extended periods:

  1. Connect to PLC via Automation Studio (no project needed for basic profiling)
  2. Open Tools -> Profiler
  3. Configure which task classes to profile
  4. Set recording duration (supports multi-hour captures)
  5. Download and analyze in Automation Studio
  6. Profiler logs can also be uploaded via SDM

Built-in: Trace (Variable Oscilloscope)

Automation Studio’s Trace function records variable values over time at high resolution:

  1. Connect to PLC
  2. Open Tools -> Trace
  3. Add variables to trace (enter names manually if no project)
  4. Set trigger conditions and recording depth
  5. Supports continuous recording up to available memory
  6. Export captured data for analysis

Limitation: Trace duration is limited by capture buffer size. For continuous 1-hour traces, the buffer must be sized appropriately.

Built-in: SDM Historical Data

The SDM automatically maintains historical data for:

  • CPU usage (time-series graphs in System page)
  • Error logbook entries with timestamps

This data persists across browser sessions and power cycles (stored in controller memory).

External: PVI + Custom Data Logger

For continuous, long-term trending without Automation Studio:

  1. Use PVIservices DLL (.NET/C#) or Python (via ANSL protocol)
  2. Create a service that polls system variables at regular intervals
  3. Log to CSV, database, or time-series database (InfluxDB, Grafana)
  4. Create dashboards for trend visualization

Key variables to poll:

  • CPU idle percentage (via LogIdleShow if callable, or SDM)
  • Task cycle times (via RTInfo or SDM)
  • CPU and housing temperature (via I/O mapping data points)
  • Battery status (via BatteryInfo or I/O mapping)
  • POWERLINK state (via S/E LED or SDM)
  • Error logbook entries

Cross-reference: See custom-diagnostic-tools.md for sample code and architecture for external monitoring systems.

External: OPC UA Subscriptions

If OPC UA is configured on the PLC:

  1. Set up OPC UA subscriptions for system variables
  2. Use any OPC UA client (free: Prosys Simulation, UA Expert)
  3. Subscription-based monitoring provides real-time updates without polling

System Variable Quick Reference Tables

All Monitorable Variables (No Project Required)

VariableCategoryAccess MethodUnitTypical Range
CPU TemperatureThermalI/O mapping, SDM, PVIC40 - 70
Housing TemperatureThermalI/O mapping, SDMC35 - 60
CPU UsagePerformanceLogIdleShow, SDM%5 - 60
Task Cycle Time (per class)PerformanceRTInfo, Profiler, SDMus/msVaries
Task Cycle Time Min/MaxPerformanceRTInfo, Profilerus/msVaries
Battery StatusPowerBatteryInfo, I/O mapping, DC LEDBooleanOK / Low
System RAM UsageMemorySDM% or MB40 - 70
User RAM (SRAM) UsageMemorySDM, ASkBVaries
Remanent Variable UsageMemorySDM, ASkBVaries
CompactFlash Free SpaceStorageSDMMBVaries
POWERLINK StateNetworkS/E LED, SDMEnumOPERATIONAL
Ethernet Link StatusNetworkETH LED, SDMBooleanUp/Down
Module Run/Error (per module)I/OLED, SDM, I/O mappingBooleanOK/Error
X2X Link StatusBusSDM, I/O mappingEnumOK/Error
I/O Power OverloadPowerLED, SDM, I/O mappingBooleanOK/Overload
Error Logbook EntriesDiagnosticsSDM, LoggerText
System UptimeDiagnosticsSDMSeconds
Operating StateDiagnosticsRDY/F LED, SDMEnumRUN/SERVICE/BOOT

Key System Library Function Blocks

LibraryFUBPurposeReturns
BRSystemRTInfoReal-time task infocycTime, cycTimeMin, cycTimeMax
BRSystemBatteryInfoBattery statusOK/Low/Empty
AsArProfLogIdleShowCPU idle percentageidle (%)
BRSystemsys_br_get_infoSystem info structureVarious system parameters
BRSystemMcBaseInfoMotion control base infoAxis diagnostics
BRSystemMpAlarmXCoreInfomapp alarm system infoActive alarms count
StandardFileDirFile system directory listingCompactFlash contents
StandardFileStatusFile size, attributesStorage info

Key System Variable Structures

StructureLibraryDescription
sys_brBRSystemBase runtime system info (AR version, build date, serial number, memory layout)
sys_taskBRSystemPer-task-class runtime info (current/minimum/maximum cycle times, overload count)
sys_br_get_infoBRSystemFunction to populate sys_br structure with current system data
sys_task_get_infoBRSystemFunction to populate sys_task structure for a specific task class

sys_br Structure Members (AR 4.x)

The sys_br structure from the BRSystem library provides system-level information. While the exact member layout varies by AR version, the following fields are consistent across AR 4.x:

FieldTypeDescription
sys_br.wARVersionMajorUSINTAR major version (e.g., 4)
sys_br.wARVersionMinorUSINTAR minor version (e.g., 93)
sys_br.wARVersionBuildUSINTAR build/patch version (e.g., 5)
sys_br.wARVersionSubUSINTAR sub-build version (e.g., 2)
sys_br.awSerialNumberARRAY[0..7] OF USINTCPU serial number (8 x USINT = 32 hex chars)
sys_br.aCPUNameSTRINGCPU model name (e.g., “X20CP1584”)
sys_br.wBRCpuIdUDINTB&R CPU ID code (e.g., 0xC370)
sys_br.bSystemStateUSINTCurrent operating state (0=INIT, 1=RUN, 2=SERVICE, 3=BOOT)
sys_br.dwSystemTickUDINTSystem tick counter (free-running timer)
sys_br.wSystemTickFreqUDINTSystem tick frequency in Hz
sys_br.wMaxCyclicTasksUSINTMaximum number of cyclic task classes (typically 8)
sys_br.wUsedCyclicTasksUSINTNumber of cyclic task classes in use
sys_br.dwTotalSDRAMUDINTTotal SDRAM in kB (256000 for CP1584)
sys_br.dwFreeSDRAMUDINTFree SDRAM in kB
sys_br.dwTotalSRAMUDINTTotal SRAM in kB (1024 for CP1584)
sys_br.dwFreeSRAMUDINTFree SRAM in kB
sys_br.dwRemanentSizeUDINTConfigured remanent variable space in kB
sys_br.bBatteryStatusUSINTBattery status (0=OK, 1=Low, 2=Empty)
sys_br.wCpuTemperatureSINTCPU temperature in 0.1 C units (e.g., 520 = 52.0 C)
sys_br.wBoardTemperatureSINTBoard/housing temperature in 0.1 C units
sys_br.bOvertemperatureShutdownBOOLTRUE if CPU/board overtemperature shutdown has occurred

Reading sys_br in IEC code:

PROGRAM ReadSystemInfo
VAR
    sysInfo : sys_br;
END_VAR

sys_br_get_info();  (* Populate the structure *)

    (* Log system info to diagnostic string *)
    diagString := CONCAT(
        'AR Version: ', USINT_TO_STRING(sysInfo.wARVersionMajor), '.',
        USINT_TO_STRING(sysInfo.wARVersionMinor),
        ' Build: ', USINT_TO_STRING(sysInfo.wARVersionBuild), '.',
        USINT_TO_STRING(sysInfo.wARVersionSub),
        '\r\nCPU: ', sysInfo.aCPUName,
        '\r\nState: ',
        IF sysInfo.bSystemState = 0 THEN 'INIT'
        ELSIF sysInfo.bSystemState = 1 THEN 'RUN'
        ELSIF sysInfo.bSystemState = 2 THEN 'SERVICE'
        ELSIF sysInfo.bSystemState = 3 THEN 'BOOT'
        END_IF,
        '\r\nCPU Temp: ', REAL_TO_STRING(sysInfo.wCpuTemperature / 10.0, 1), ' C',
        '\r\nBattery: ',
        IF sysInfo.bBatteryStatus = 0 THEN 'OK'
        ELSIF sysInfo.bBatteryStatus = 1 THEN 'LOW'
        ELSIF sysInfo.bBatteryStatus = 2 THEN 'EMPTY'
        END_IF
    );

sys_task Structure Members (AR 4.x)

The sys_task structure provides per-task-class performance data. Index by task class number (0 = Cyclic#1, 1 = Cyclic#2, etc.):

FieldTypeDescription
sys_task.wTaskClassNumberUSINTTask class number (0-7)
sys_task.wCycleTimeUDINTCurrent cycle execution time in us
sys_task.wMinCycleTimeUDINTMinimum cycle time observed (since last reset)
sys_task.wMaxCycleTimeUDINTMaximum cycle time observed (since last reset)
sys_task.wOverloadCountUDINTNumber of cycle time violations / overloads
sys_task.wJitterTimeUDINTCurrent jitter deviation in us
sys_task.wTaskLoadUSINTTask load as percentage (0-100)

Reading sys_task in IEC code:

PROGRAM MonitorAllTasks
VAR
    taskInfo : sys_task;
    i : USINT;
END_VAR

FOR i := 0 TO 7 DO
    sys_task_get_info(i);  (* Populate for task class i *)
    IF taskInfo.wTaskClassNumber = i THEN
        (* Task class is active *)
        diagMsg := CONCAT(
            'TC#', USINT_TO_STRING(i + 1),
            ': cycle=', UDINT_TO_STRING(taskInfo.wCycleTime), 'us',
            ' max=', UDINT_TO_STRING(taskInfo.wMaxCycleTime), 'us',
            ' load=', USINT_TO_STRING(taskInfo.wTaskLoad), '%',
            ' overloads=', UDINT_TO_STRING(taskInfo.wOverloadCount)
        );
        (* Log or send via OPC-UA *)
    END_IF
END_FOR

These structures are defined in the BRSystem library header files. To use them in your own diagnostic code, reference the BRSystem library in Automation Studio.

Note: The sys_br and sys_task structures are available within the AR runtime but their exact member layout varies by AR version. Consult the BRSystem library help in Automation Studio for the specific structure definition matching your controller’s AR version. The field names above are typical for AR 4.x but may differ slightly in AR 3.x or AR 6.x.

SysInfo Function Block (Community Discovery)

B&R community members have discovered that the SysInfo function block from the BRSystem library can detect whether the controller is in SERVICE mode or has recently rebooted. This is valuable for automated recovery scripts:

VAR
    fbSysInfo : SysInfo;
END_VAR

fbSysInfo();
IF fbSysInfo.bServiceMode THEN
    (* Controller is currently in SERVICE mode *)
    (* Implement automatic recovery or notification logic *)
END_IF

The SysInfo FUB provides additional fields beyond what is in sys_br, including flags for SERVICE mode, error state, and boot type (cold/warm/init).

Cross-reference: See custom-diagnostic-tools.md for building external monitoring systems that query these structures via PVI or OPC-UA.


Failure Mode Analysis: What Abnormal Values Really Mean

Failure Mode: Imminent SERVICE Mode (Watchdog Trip)

Leading indicators (detectable hours/days before failure):

IndicatorNormalWarningCritical
Task cycle time (Cyc0)< 60% of slice60-85% of slice> 85% of slice
CPU idle time> 30%15-30%< 15%
Cycle time jitter< 20% of slice20-40%> 40%
Max cycle / avg cycle ratio< 3x3-10x> 10x

Most common root causes:

  1. Infinite loop in cyclic code (~80% of SERVICE mode entries)
  2. Blocking I/O in fast task class (File I/O, TCP socket in Cyc0/Cyc1)
  3. Excessive string manipulation in time-critical task
  4. Memory leak gradually consuming resources
  5. ANSL (Automation Net) communication overload

Failure Mode: Thermal Shutdown

Leading indicators:

IndicatorNormalWarningCritical
CPU temperature40-60 C60-89 C89-105 C
Temperature rate of change< 1 C/min1-3 C/min> 3 C/min
CPU usage at elevated tempAnyHigher usage = more heat

Most common root causes:

  1. Cabinet ventilation failure (fan, filter)
  2. Blocked airflow (cables, debris over CPU)
  3. Incorrect mounting orientation (horizontal vs vertical derating)
  4. High ambient temperature (> 50 C)
  5. Elevated above 2000 m elevation (requires 0.5 C derating per 100 m)

Failure Mode: Battery Depletion

Leading indicators:

IndicatorNormalWarningCritical
Battery statusOKLowEmpty
RTC accuracy< 10 ppm drift10-50 ppm> 50 ppm
Remanent variable integrityStableOccasional resetVariables lost on power cycle

Failure Mode: Network Communication Loss

Leading indicators:

IndicatorNormalWarningCritical
POWERLINK stateOPERATIONALPREOP cyclingBASIC_ETHERNET fallback
POWERLINK reconnection count0 / hour1-5 / hour> 5 / hour
Ethernet frame errors0< 10 / hour> 10 / hour

Failure Mode: Memory Exhaustion

Leading indicators:

IndicatorNormalWarningCritical
System RAM usage< 70%70-85%> 85%
SRAM usage< 80%80-90%> 90%
CompactFlash free space> 20%10-20%< 10%

SERVICE Mode: Entry, Diagnosis, and Recovery

What Causes SERVICE Mode

Cause CategoryPercentageExamples
Cycle time violation (watchdog)~80%Infinite loop, blocking I/O, excessive computation
Page fault (memory access)~10%Array out of bounds, invalid pointer, buffer overflow
Divide by zero~5%Unvalidated divisor in calculation
Hardware fault~3%RAM error, module failure
Thermal protection~2%CPU/board overtemperature
Unknown / Other< 1%License violation, firmware corruption

Diagnostic Procedure When in SERVICE Mode

The PLC remains network-accessible in SERVICE mode. The IP address, SDM, and all diagnostic interfaces continue to function.

Step 1: Check the Logger / SDM Error Logbook

  • Open SDM at http://<PLC_IP>/sdm or use AS Logger
  • Find the timestamped error entry that caused SERVICE mode
  • Note the error code and backtrace (if available)

Step 2: Common Error Codes

Error CodeDescriptionLikely Fix
EXCEPTION Page Fault (25314)Invalid memory accessCheck array bounds, string operations
EXCEPTION Divide by ZeroDivision by zeroValidate divisor before division
Watchdog timeoutCycle time exceededReduce task content, move blocking ops to slower class
9204Temperature shutdownCheck cooling, wait for cooldown, warm restart
9210Halt after watchdogFix code, warm restart

Step 3: Recovery

  1. Identify and correct the root cause
  2. In Automation Studio: Online -> Warm Restart
  3. If no AS available, press the physical Reset button (enters SERVICE mode)
  4. If Reset -> RUN mode switch: set switch to RUN position for automatic restart

Critical: A PLC in SERVICE mode is NOT executing control logic. Verify process state before warm restart.

Cross-reference: See hardware-monitoring.md for physical troubleshooting procedures when software diagnostics are insufficient.


Minimum Viable Monitoring (No Code Changes)

MethodWhat You GetEffort
SDM web dashboard (weekly check)CPU usage, temperature, errors, task times15 min/week
DC LED visual inspection (shift walk)Battery status30 sec/shift
RDY/F LED visual inspectionApplication running vs. SERVICE modeInstant
SDM Error Logbook review (weekly)Historical faults15 min/week

Enhanced Monitoring (With PVI / External Script)

MethodWhat You GetEffort
PVI Monitor periodic exportAll variable values to CSVSetup once, automate
Custom Python/.NET serviceContinuous polling of key variables1-2 day setup
OPC UA subscriptionsReal-time variable updates1 day setup
Grafana dashboardVisual trending over weeks/months1 day setup

Full Instrumentation (Requires Code Deployment)

MethodWhat You GetEffort
Deploy LogIdleShow in each task classReal-time CPU usage per taskModify existing program
Deploy RTInfo for all task classesCycle time monitoring with min/maxModify existing program
Deploy custom alarm logicAutomatic alerts on threshold breachModify existing program
File-based data loggingLong-term trend data on CompactFlashNew task class
mapp AlarmX integrationStandard alarm managementModify existing program

Important: Without the project source, you CANNOT modify the PLC program. Methods 1 and 2 are your only options. See custom-diagnostic-tools.md for building external monitoring that requires no PLC code changes.


Key Findings

  1. SDM is your primary lifeline. Available at http://<PLC_IP>/sdm with zero tools, it provides CPU usage, task cycle times, memory usage, temperature, I/O status, network status, and the complete error logbook – all without the project source code.

  2. CPU temperature is available as an I/O data point. Two sensors (CPU die + housing) are in the controller’s I/O mapping and readable via PVI, SDM, or direct I/O access. Shutdown occurs at 110 C (CPU) / 95 C (board). Normal operating range is 40-70 C at typical ambient temperatures.

  3. CPU usage is NOT an I/O data point. It requires the LogIdleShow FUB from the AsArProf library (code deployment) or reading from the SDM (no code needed). Opening the SDM itself increases CPU usage by ~5-10% on smaller CPUs.

  4. Task cycle times are the #1 failure indicator. ~80% of all SERVICE mode entries are caused by cycle time violations. Monitor via RTInfo FUB (BRSystem library), Profiler, or SDM Task Monitor. Watch for cycle time exceeding 85% of the configured time slice.

  5. All system variables are readable via PVI without the project. PVI Monitor, Runtime Utility Center, and PVIservices DLL can enumerate and read every variable on the controller, including system data points, I/O mapping, and application variables. This is the recommended path for defunct OEM scenarios.

  6. Battery status is dual-indicated (software register + DC LED). The battery buffers remanent variables, user RAM, system RAM, and the RTC. Replace every 4 years with Renata CR2477N only. Battery depletion causes loss of all persistent data on power cycle.

  7. The sys_br and sys_task system variable structures from the BRSystem library provide structured access to runtime information (AR version, memory layout, per-task cycle statistics). Their exact member layout varies by AR version – consult the library help in Automation Studio.

  8. POWERLINK state is fully diagnosable from the S/E LED. The 6-state LED pattern machine (NOT_ACTIVE -> BASIC_ETHERNET -> PREOP1 -> PREOP2 -> READY -> OPERATIONAL) provides immediate visual diagnostics without any tools.

  9. For continuous external trending, use PVI + custom data logger (Python/.NET) or OPC UA subscriptions to push system variables into a time-series database. This requires zero PLC code changes and provides long-term trend analysis.

  10. Thermal protection is automatic and aggressive. Per the official B&R datasheet, the X20CP1584 hard-shuts down (reset state) at 110°C CPU temperature or 95°C board temperature (error 9204). B&R may enter SERVICE mode at a lower temperature (~105°C estimated) before the hard shutdown. This is not configurable. Proper cabinet ventilation is the only mitigation.


Python Script: Comprehensive System Health Check

This script connects to a B&R CP1584 via OPC-UA and reads all accessible system variables for a complete health snapshot. It requires no project files or Automation Studio:

"""
B&R CP1584 System Health Check via OPC-UA.
Usage: python system_health_check.py <PLC_IP>
Requires: pip install asyncua
"""
import asyncio, sys
from datetime import datetime
from asyncua import Client

PLC_IP = sys.argv[1] if len(sys.argv) > 1 else "192.168.0.1"

async def check_health():
    url = f"opc.tcp://{PLC_IP}:4840"
    print(f"B&R CP1584 System Health Check")
    print(f"Connecting to {url}...")
    print("=" * 60)

    async with Client(url=url) as client:
        root = client.get_root_node()
        print("Connected. Scanning address space...\n")

        children = await root.get_children()
        all_vars = {}

        async def scan_node(node, depth=0):
            if depth > 5:
                return
            try:
                for child in await node.get_children():
                    name = (await child.get_browse_name()).Name
                    node_id = child.nodeid.to_string()
                    dtype = (await child.get_data_type()).to_string()

                    keywords = [
                        "temperature", "cpu", "battery", "cycle", "load",
                        "task", "memory", "ram", "status", "error",
                        "uptime", "state", "power", "link", "plk",
                        "idle", "free", "watchdog"
                    ]

                    if any(kw in name.lower() for kw in keywords):
                        try:
                            val = await child.get_value()
                            all_vars[node_id] = {
                                "path": node_id,
                                "name": name,
                                "value": val,
                                "type": dtype
                            }
                        except Exception:
                            all_vars[node_id] = {
                                "path": node_id,
                                "name": name,
                                "value": "READ_ERROR",
                                "type": dtype
                            }
                    await scan_node(child, depth + 1)
            except Exception:
                pass

        await scan_node(root)

        if not all_vars:
            print("No system variables found in OPC-UA namespace.")
            print("Possible causes:")
            print("  - OPC-UA server not configured")
            print("  - System variables not exposed in address space")
            print("  - Authentication required (try credentials)")
            print("\nAlternative: Use SDM at http://<PLC_IP>/sdm")
            return

        print(f"Found {len(all_vars)} system variables\n")

        for node_id, info in sorted(all_vars.items(),
                                    key=lambda x: x[1]["name"]):
            val = info["value"]
            status = "  "
            if isinstance(val, (int, float)):
                if "temp" in info["name"].lower():
                    if val > 89:
                        status = "!!"
                    elif val > 75:
                        status = "! "
                elif "load" in info["name"].lower() or "usage" in info["name"].lower():
                    if val > 85:
                        status = "!!"
                    elif val > 70:
                        status = "! "
                elif "error" in info["name"].lower():
                    if val != 0:
                        status = "!!"

            print(f"  {status} {info['name']:40s} = {val}")

        print(f"\nLegend:  = normal, ! = warning, !! = critical")
        print(f"\nTimestamp: {datetime.now():%Y-%m-%d %H:%M:%S}")
        print(f"Total variables scanned: {len(all_vars)}")

asyncio.run(check_health())

SNMP-Based System Monitoring

For continuous monitoring without OPC-UA or PVI, the B&R SNMP agent exposes system variables via standard SNMP MIB:

# Install brsnmp for B&R device discovery and SNMP queries
pip install brsnmp

# Quick system health check via SNMP
brsnmp --walk 192.168.0.1

# Monitor CPU temperature via SNMP (OID varies by AR version)
snmpget -v2c -c public 192.168.0.1 1.3.6.1.4.1.2808.1.2.1

# Monitor system uptime
snmpget -v2c -c public 192.168.0.1 sysUpTime.0

See iiot-retrofit.md for full SNMP configuration and access-recovery.md for brsnmp discovery procedures.


Cross-References

Related FileRelevance
execution-model.mdTask class priority, cycle time configuration, watchdog behavior, exception codes
diagnostics-sdm.mdSDM web interface for reading all system variables without any tools
hardware-monitoring.mdPhysical temperature monitoring, fan diagnostics, voltage rail monitoring
custom-diagnostic-tools.mdBuilding diagnostic programs that run ON the PLC using system variables
python-diagnostics.mdPython + PVI/OPC-UA scripts for automated system monitoring
opcua.mdOPC-UA server configuration and address space browsing
pvi-api.mdPVI protocol for reading system data points programmatically
cp1584-forensics.mdExtracting system info from an unknown PLC via network discovery
firmware.mdAR version identification and firmware architecture
memory-map.mdCPU memory layout and direct memory access for IO data
alarm-logging.mdException and watchdog event logging
ebpf-telemetry.mdAdvanced performance profiling with eBPF (Linux-based controllers)
retentive-data.mdBattery-backed data management and battery replacement procedures
cp1584-hardware-ref.mdComplete CP1584 hardware specifications and physical indicators
troubleshooting-index.mdScenario-based index for system variable-related diagnostics
access-recovery.mdbrwatch and Pvi.py tools for no-project variable monitoring

Document generated from research across B&R official documentation, B&R Community forums, Automation Runtime training materials, X20CP158x datasheets, and field engineering sources. Applicable to X20CP1583/1584/1585/1586 and X20CP358x series with Intel Atom processors running Automation Runtime V3.0+.

Encoder and Feedback Signal Diagnostics for B&R ACOPOS Motion Systems

Overview

Encoder faults are the most common intermittent failure mode on B&R ACOPOS servo systems. On a CP1584 machine with defunct OEM support, you have no calibration data, no motor nameplate parameters, and no spare encoders with pre-loaded commutation offsets. This document provides everything needed to diagnose encoder faults, verify signal quality, replace encoders, and recover alignment without factory data.

The encoder is the sensor that closes the feedback loop in the servo drive. Without valid encoder data, the ACOPOS cannot commutate the motor (control which phase is energized) or close the position/velocity control loops. An encoder fault will immediately shut down the axis — and often the entire machine.

See also: acopos-drives.md for drive-level diagnostics, analog-calibration.md for signal measurement techniques, and grounding-emc.md for EMC troubleshooting of encoder signal quality.


Encoder Types Supported by ACOPOS

Supported Interface Standards

The ACOPOS drive family supports multiple encoder interfaces through plug-in option modules installed in the drive’s module slots. The encoder type is determined by the option module installed and the EncoderType parameter in the acp10sys configuration.

Encoder TypeACOPOS ModuleSignal CharacteristicsCable Requirement
ResolverBuilt-in (standard)Two sinusoidal outputs (sin/cos), passive, no battery4-wire + shield, unshielded OK for short runs
EnDat 2.18AC122.60-1Bidirectional digital, 1 MHz clock, absolute + incremental6-wire shielded, twisted pairs
EnDat 2.28AC122.60-2Bidirectional digital, up to 2 MHz (16 MHz w/ delay compensation), SIL 2 capable6-wire shielded, twisted pairs
HIPERFACE8AC122.60-3Bidirectional, RS-485 based, absolute + sin/cos incremental6-wire shielded, twisted pairs
HIPERFACE DSLModule-dependentAll-digital over 2 wires, 9.375 Mbaud, integrated in motor cable2-wire (with transformer)
BiSS-C8AC122.60-x (varies)Bidirectional, up to 10 MHz, CRC error checking4-wire + power
TTL (RS-422)Incremental module5V differential square wave, 1000+ lines minimumDifferential pair per channel + shield
Sin/Cos 1 Vpp8AC122.60-1 / built-inAnalog sinusoidal, 1 Vpp amplitude, incrementalShielded twisted pair per channel
SSIVia BiSS/EnDat modulesUnidirectional synchronous, up to 1.5 MHz, gray/binary code2 twisted pairs + power

How to Identify Your Encoder Type

When you have zero documentation, identify the encoder through these methods:

  1. Check the option module in the ACOPOS drive. Open the drive and look at the module in the encoder slot. The part number (e.g., 8AC122.60-2 = EnDat 2.2) identifies the interface. Record the full part number.

  2. Read the acp10sys configuration. In Automation Studio, open the drive configuration and look at the EncIf (Encoder Interface) parameter. The encoder type is defined here.

  3. Read the motor nameplate. B&R 8LS series motors encode the feedback type in the ordering code. For example, 8LSA66.E3030D100 — the E section encodes the encoder type. Cross-reference with B&R motor catalogs.

  4. Count the wires in the encoder cable. This gives a strong clue:

    • 2 wires: Hiperface DSL (or resolver with excitation shared)
    • 4-5 wires: Resolver or SSI
    • 6-8 wires: EnDat, Hiperface, or BiSS
    • 8+ wires: Incremental TTL with reference mark
  5. Measure the encoder supply voltage at the drive connector. EnDat encoders typically use 5V from the drive; Hiperface encoders use 5-9.5V; TTL encoders use 5V; resolvers use AC excitation (varies).

B&R Encoder Memory Architecture

B&R motors with EnDat 2.2 or Hiperface encoders store critical data in the encoder’s parameter memory (EEPROM/EEPROM). This memory contains:

  • Motor electrical nameplate — rated current, voltage, pole pairs, thermal constants
  • Commutation offset (MOTOR_COMMUT_OFFSET) — the angle between the encoder zero position and the motor’s electrical zero. This is the single most critical value.
  • Encoder resolution — lines per revolution, single-turn/multi-turn bits
  • Motor inertia and friction data

The ACOPOS drive reads this memory on every warm start. If the memory is corrupted or the encoder is replaced with a blank unit, the drive will not know the commutation angle and cannot drive the motor safely.

Critical fact (confirmed by B&R engineering, 2023): For motors with encoder memory, B&R does not align the encoder to any specific orientation during factory assembly. The encoder is mounted arbitrarily, and then the commutation offset is measured and stored in memory. The offset can be any value between -2pi and +2pi. There is no physical “zero mark” you can rely on without reading the encoder memory.


ACOPOS Encoder Error Codes

Primary Encoder Fault Codes

Error CodeCategoryDescriptionImmediate Action
31220ConfigurationEncoder not configuredEncoder interface module missing or EncIf parameter unset
31221SignalCable disturbance or signal disturbanceCheck cable, connectors, EMC; scope the signals
31222SignalSignal amplitude out of rangeMeasure encoder supply voltage, check cable length
31223SignalSignal quality insufficientScope signals, check for noise/degraded cable
31224HardwareEncoder interface HW module not OKReplace the encoder interface option module
31225CommunicationEncoder communication error (EnDat/BiSS/Hiperface)Check cable, try re-seating connector, test with known-good cable
31226CommunicationEncoder data read errorEncoder memory corruption; may need encoder replacement
31227PositionPosition tracking error / following error exceededMechanical binding, encoder slip, or tuning issue
15206PositionPosition feedback / encoder communication lossSame root causes as 31221/31225
15236ThermalPower stage overtemperature (can be caused by bad commutation)Verify commutation; if encoder gives wrong angle, drive fights itself

Interpreting the Info Field

ACOPOS encoder errors include an Info(UINT) value indicating the encoder interface index. On drives with multiple encoder interfaces (e.g., main encoder + secondary feedback), this tells you which interface faulted:

  • EncIf Index = 1 — Primary encoder interface
  • EncIf Index = 2 — Secondary encoder interface (if equipped)

Record the full error code and Info field. This is essential for targeted troubleshooting.

Error Escalation Pattern

Encoder faults typically follow this escalation:

  1. Intermittent signal glitches — Error 31221 appears during high-speed operation or when adjacent equipment is running. Machine recovers after reset.
  2. Frequent communication timeouts — Error 31225 appears with increasing frequency. Cable or connector is failing.
  3. Persistent fault at startup — Error 31220 or 31224. Hardware module failure or complete cable disconnect.
  4. Thermal fault — Error 15236 follows encoder problems because incorrect commutation causes excessive current draw, overheating the power stage. This is a cascading failure — fix the encoder before the drive is destroyed.

Signal Quality Analysis

Oscilloscope Diagnostic Techniques

An oscilloscope is the essential tool for encoder diagnostics. A multimeter cannot capture dynamic signal problems. Use a 2-channel or 4-channel digital oscilloscope (preferably a portable ScopeMeter rated for industrial use, such as Fluke 190 Series III or equivalent).

Probe Setup and Safety

WARNING: Encoder signals are referenced to drive electronics ground. Improper grounding of the oscilloscope can inject noise or create ground loops. Use differential probes or isolated probes whenever possible.

  1. Set the oscilloscope to use isolated/differential probing mode
  2. Connect the probe ground to the encoder signal ground (not chassis ground)
  3. Use 10x attenuation probes to minimize loading on the encoder signal
  4. For digital encoder signals (EnDat, BiSS, TTL): set time base to show 5-20 complete pulses
  5. For analog encoder signals (Sin/Cos 1 Vpp, resolver): set time base to show 2-4 complete cycles

Expected Waveforms by Encoder Type

TTL Incremental (RS-422):

Channel A:  ┌──┐    ┌──┐    ┌──┐
           │  │    │  │    │  │
      ─────┘  └────┘  └────┘  └────

Channel B:     ┌──┐    ┌──┐
               │  │    │  │
      ─────────┘  └────┘  └───────

Channel /A: (inverse of A)
Channel /B: (inverse of B)
Reference: ────────┐         ┌─────── (one pulse per revolution)
                  │         │
      ────────────┘         └─────────
  • Amplitude: 4.5-5.5V differential (2.25-2.75V single-ended)
  • Phase relationship: Channel B leads Channel A by 90 degrees (quadrature) in one direction of rotation
  • Duty cycle: 50% ±5% at any speed
  • Rise/fall time: < 100 ns for short cables; slower for long cables but must be < 1/4 of pulse period

Sin/Cos 1 Vpp:

Channel A (sin):    ╱╲    ╱╲    ╱╲
                   ╱  ╲  ╱  ╲  ╱  ╲
                  ╱    ╲╱    ╲╱    ╲
Channel B (cos): ╱╲    ╱╲    ╱╲
                ╱  ╲  ╱  ╲  ╱  ╲
               ╱    ╲╱    ╲╱    ╲
  • Amplitude: 1.0 Vpp ±10% (peak-to-peak)
  • DC offset: typically 0.5V (midpoint)
  • Phase: B leads A by 90 degrees
  • Signal-to-noise ratio: should be > 40 dB (noise < 10 mVpp)

Lissajous Test (Sin/Cos encoders):

Connect Channel A to the X input and Channel B to the Y input of the oscilloscope. Display in X-Y mode. A healthy encoder produces a perfect circle:

        ╭─────╮
       ╱       ╲
      │    o    │    ← Circle centered at origin
       ╲       ╱
        ╰─────╯
  • Circle indicates correct amplitude balance and 90-degree phase
  • Ellipse = amplitude imbalance (one channel stronger) or phase error
  • Figure-8 or other distortion = serious encoder damage (disk contamination, head misalignment)
  • Oval that shifts = bearing wear or mechanical runout

Resolver:

Resolver output requires a demodulator to view the position signal. On ACOPOS drives, the resolver interface module handles this internally. To check resolver signals with a scope:

  1. Measure the excitation signal at the encoder connector: should be a clean sine wave at the drive’s excitation frequency (typically 5-10 kHz), amplitude per motor spec (usually 2-7 Vrms)
  2. Measure the sin and cos output signals: two sinusoidal signals whose amplitude varies with rotor angle
  3. The envelope of the resolver outputs should modulate smoothly as the shaft rotates
  4. Check for excitation signal distortion — if the excitation is noisy, the resolver outputs will be corrupted

EnDat / BiSS / Hiperface Digital:

These are bidirectional digital serial protocols. On a scope, you will see:

  • Clock signal: clean square wave from the drive to the encoder (typically 1-16 MHz)
  • Data signal: bidirectional digital bursts during communication windows
  • Between communication windows: the incremental sin/cos signals (on EnDat 2.2 and Hiperface)

Diagnostic approach for digital encoders:

  1. Verify the encoder supply voltage (5.0V ±0.25V for EnDat, typically 5-9.5V for Hiperface)
  2. Check the clock signal integrity — clean edges, correct frequency
  3. Look for data corruption: CRC errors reported by the drive indicate bit-level errors on the data line
  4. Verify the incremental sin/cos signals between communication frames — same criteria as analog Sin/Cos above

Signal Quality Checklist

ParameterHealthyFailingLikely Cause
AmplitudeWithin ±10% of specLow or droppedCable resistance, bad connector, failing encoder
Duty cycle (TTL)50% ±5%SkewedUnbalanced differential pair, failing comparator
Rise/fall time (TTL)< 100 ns> 500 nsExcessive cable capacitance, long cable, damaged driver
Noise floor< 5% of signal> 20% of signalPoor shielding, ground loop, EMI from VFD/power cables
Pulse jitter< 2% of period> 10% of periodBearing wear, mechanical play, signal degradation
Lissajous shapeCircleEllipse/distortedAmplitude imbalance, phase error, encoder damage
Common-mode noiseNegligibleVisible on both channelsGround loop, shield not connected

Feedback Cable Diagnostics

Cable Construction Requirements

B&R encoder cables are precision-manufactured assemblies designed for drag chain installations. Key construction features:

  • Shielded twisted pairs — each differential signal pair is individually twisted and shielded
  • Overall foil + braid shield — provides both high-frequency and low-frequency EMI protection
  • Drag-chain rated jacket — designed for millions of flex cycles
  • Molded connectors — IP67 rated, with locking mechanisms

Cable Inspection Procedure

Follow this procedure whenever an encoder fault is reported:

  1. Visual inspection at the drive connector (X3/X3A/X3B on ACOPOS):

    • Check connector is fully seated and locked
    • Look for bent pins or damaged contacts
    • Verify the cable strain relief is intact
    • Check for heat damage (discolored connector housing)
  2. Visual inspection along the cable run:

    • Look for kinks, sharp bends, or crushed sections (minimum bend radius is typically 10x cable diameter)
    • Check for abrasion damage, especially at cable carrier entry/exit points
    • Look for oil or coolant contamination on the cable jacket
    • Check cable carrier for proper routing and tension
  3. Visual inspection at the motor connector:

    • Same checks as drive-side
    • Critical: verify the motor-side shield termination is intact (shield connected to motor housing via the connector)
    • Check for contamination ingress into the connector
  4. Continuity testing:

    • Measure resistance of each signal pair end-to-end: should be < 1 ohm per wire
    • Measure resistance between each signal wire and shield: should be > 10 Mohm (open circuit)
    • Measure resistance between adjacent signal pairs: should be > 10 Mohm
    • Measure resistance between signal wires and motor power wires (U/V/W): should be > 10 Mohm
  5. Shield continuity:

    • Verify the overall shield is continuous from drive connector to motor connector
    • The shield should connect to the drive’s PE terminal at the cabinet end
    • Ground the shield at one end only (typically the cabinet/drive end) to prevent ground loops. The motor end connects to the motor housing, which connects to PE through the motor cable shield.

Cable Routing Rules

Improper cable routing is the number one cause of encoder signal problems. Enforce these rules:

RuleRequirementRationale
SeparationEncoder cables ≥ 300 mm from motor power cablesPrevents capacitive and inductive coupling
Parallel runsNever run encoder cables parallel to power cablesEven with separation, parallel runs couple noise
CrossingCross power cables at 90 degrees onlyMinimizes coupling length
Cable traysSeparate encoder and power in different traysPhysical barrier prevents EMI
Ferrite coresInstall ferrite cores on encoder cables near the driveAttenuates high-frequency common-mode noise
Cable lengthDo not exceed maximum cable length for encoder typeSignal degradation and timing issues on long cables

Maximum Cable Lengths by Encoder Type

Encoder TypeMaximum Recommended LengthNotes
Resolver50 mPassive sensor; less sensitive to length
TTL (RS-422)30-50 mDifferential, but rise time degrades with length
Sin/Cos 1 Vpp30 mAnalog signal attenuates with cable resistance/capacitance
EnDat 2.150 m (at 1 MHz)Degrades at higher clock rates
EnDat 2.2100 m (with delay compensation)Propagation delay compensation extends useful range
Hiperface50 mRS-485 based, reasonably robust
Hiperface DSL100 m (integrated in motor cable)Requires transformer for noise rejection
BiSS-C50 m (at 10 MHz)Speed depends on cable quality

Interference Isolation Test

When encoder errors are intermittent and correlated with machine operation (other axes running, pumps cycling, etc.), perform this test:

  1. Monitor the encoder signals on an oscilloscope while triggering the suspect equipment
  2. If noise appears on the encoder signals when the other equipment operates, you have EMI coupling
  3. Systematically: a. Disconnect and re-connect the encoder cable shield at the cabinet PE bar b. Add ferrite cores at the drive end of the cable c. Temporarily run the encoder cable outside the cable tray (in air) to test if the tray itself is coupling noise d. If the problem resolves when the cable is outside the tray, re-route the cable with proper separation

Encoder Replacement Procedures

Before You Start: Assess the Situation

When replacing an encoder on a B&R servo motor, you are facing one of two scenarios:

Scenario A: The encoder memory is readable (encoder partially functional)

  • You can read the commutation offset from the old encoder before removing it
  • You may be able to write the same offset to a new encoder (if the new encoder supports it and you have the B&R EPROM function block — see notes below)

Scenario B: The encoder is completely dead (no memory access)

  • You have lost the commutation offset
  • You must either: (a) run the ACOPOS phasing procedure on every power-up, (b) configure the motor as a third-party motor with manual offset, or (c) send the motor to B&R repair for re-phasing

Physical Encoder Replacement Steps

WARNING: Servo motor encoder replacement requires precision mechanical work. The encoder is typically mounted to the motor’s rear shaft extension. Shaft runout of more than 0.01 mm can cause signal quality problems. If you are not experienced with servo motor repair, consider sending the motor to a qualified service center.

  1. Remove the motor from the machine — Do not attempt encoder replacement with the motor installed. You need a clean work area and the ability to rotate the shaft freely.

  2. Remove the motor end bell — This exposes the encoder assembly. On B&R 8LS motors, the encoder is typically mounted on the non-drive end (NDE). The end bell is secured with socket head cap screws.

  3. Record the encoder orientation — Before removing the old encoder:

    • Mark the encoder housing relative to the motor end bell with a scribe or punch mark
    • Photograph the encoder mounting from multiple angles
    • If the encoder has a reference mark on the shaft, record its position relative to the housing
  4. Disconnect the encoder cable at the motor connector.

  5. Remove the encoder — The encoder is typically secured to the shaft with a set screw or clamp, and to the housing with screws. Remove carefully to avoid damaging the shaft or housing bore.

  6. Inspect the shaft and housing bore — Clean any debris, check for burrs or corrosion. The mounting surfaces must be pristine.

  7. Install the new encoder — Reverse of removal. Ensure:

    • The encoder is fully seated against the housing shoulder
    • The shaft coupling is secure (set screw torqued to spec, or clamp tightened)
    • The connector is oriented correctly for cable routing
    • No debris is trapped between the encoder and housing
  8. Test before closing — Before reinstalling the end bell:

    • Connect the encoder cable (temporarily) to the drive
    • Power on the drive
    • Verify the drive can communicate with the encoder (no 31220/31224 errors)
    • Rotate the shaft slowly by hand and verify position changes in Automation Studio

Post-Replacement Configuration

If Using a B&R Replacement Encoder with Blank Memory

A new B&R encoder ships with blank memory. The commutation offset must be established:

Option 1: ACOPOS Phasing Procedure (runs at every power-up)

The ACOPOS drive has a built-in phasing function (MC_Phasig / drive identification) that measures the commutation offset each time the drive starts. This is documented in Automation Studio help under “Phasing the Encoder” (einphasen).

Steps:

  1. In Automation Studio, enable the phasing function for the axis
  2. On each drive power-up, the axis will perform a phasing sequence (the motor will briefly move to find the electrical zero)
  3. The measured offset is stored in the MOTOR_COMMUT_OFFSET parameter for the duration of the session
  4. The offset is not written to the encoder memory — it is recalculated every power-up

Caveat: This means the axis will not be immediately ready after power-up. It must complete the phasing sequence before it can accept motion commands. This adds startup delay.

Option 2: Manual Third-Party Motor Configuration

Configure the motor as a generic motor in the ACOPOS parameter table (Automation Studio → Motor Parameters). Enter the commutation offset manually as a fixed parameter. This offset must be determined once through the phasing procedure, then recorded and entered permanently.

Steps:

  1. Run the phasing procedure once (Option 1)
  2. Read the resulting MOTOR_COMMUT_OFFSET value from the drive parameters
  3. Enter this value in the motor parameter table as a fixed offset
  4. Disable the startup phasing sequence
  5. The drive will use the fixed offset from the parameter table

Option 3: B&R Repair Service (recommended for critical axes)

Send the motor to B&R’s repair facility in Eggelsberg, Austria (or the regional repair center). They will:

  1. Run a precision phasing procedure
  2. Write the commutation offset to the encoder memory
  3. Return the motor ready to run with auto-recognition

This is the only way to restore the factory behavior where the commutation offset is stored in encoder memory and automatically read on power-up.

Writing to Encoder Memory (Advanced)

B&R provides an EPROM function block that can write data to encoder memory. However:

  • B&R has removed public documentation for this functionality from newer Automation Studio help files
  • The memory address offsets can change without notice between B&R firmware versions
  • Using this function block requires internal B&R knowledge
  • B&R does not publicly recommend this approach for field use

If you have access to the function block and documentation (e.g., through a B&R support contract), the general procedure is:

  1. Run the phasing procedure to measure the commutation offset
  2. Use the EPROM function block to write the offset to the encoder memory at the correct address
  3. Verify the write by power-cycling the drive and confirming it reads the correct offset

For engineers without OEM support: Do not attempt to write to encoder memory without the correct address map. Writing to the wrong address can corrupt the entire encoder memory, making the encoder permanently unusable.


Verifying Encoder Alignment Without Original Calibration Data

The Core Problem

When you have no documentation, no calibration data, and possibly a replaced encoder, you must verify that the encoder’s electrical position reading matches the motor’s actual electrical position. If these are mismatched, the drive will commutate at the wrong angle, causing:

  • Excessive current draw (motor fights itself)
  • Overheating (error 15236)
  • Reduced torque (possibly 50% or less of rated torque)
  • Vibration and acoustic noise
  • Possible immediate fault on enable

Method 1: ACOPOS Phasing Procedure

This is the safest and most reliable method for establishing encoder alignment without calibration data.

  1. Ensure the axis is free to move (no mechanical interference, no load that could be dangerous)
  2. In Automation Studio, configure the axis for phasing:
    • Set MOTOR_COMMUT_OFFSET to 0 (or unknown)
    • Enable the phasing function (MC_Phasing or equivalent)
  3. Enable the drive power stage
  4. The ACOPOS will: a. Energize the motor with a known current vector b. The rotor will align to a known electrical position c. The drive compares the encoder reading to the expected position d. The difference is the commutation offset
  5. Read the measured MOTOR_COMMUT_OFFSET from the drive parameters
  6. Record this value permanently

Important: During phasing, the motor shaft will rotate to the alignment position. Ensure this movement is safe for your application (axis not in a position where movement could cause collision or injury).

Method 2: DC Current Injection (Manual Alignment)

If you cannot use the ACOPOS phasing function (e.g., the drive firmware doesn’t support it, or the axis cannot be freed), you can perform a manual alignment:

  1. Disconnect the motor from the machine mechanically (if possible)
  2. Disconnect the encoder from the ACOPOS drive
  3. Apply DC current to two motor phases (e.g., U and V, with W open)
  4. The rotor will snap to a defined electrical position (the d-axis aligns with the applied field)
  5. Mark the rotor position (or record the mechanical angle)
  6. Reconnect the encoder and read its position at this rotor angle
  7. The difference between the encoder reading and the known electrical zero gives you the commutation offset

Safety warning: Applying DC current to motor phases requires a controlled current source. Use a suitable DC power supply with current limiting, or use the ACOPOS drive’s manual current injection mode if available. Never apply full DC bus voltage directly to motor windings.

Method 3: Back-EMF Measurement

For permanent magnet synchronous motors (most B&R 8LS motors):

  1. Rotate the motor shaft manually (or with another motor) at a known, constant speed
  2. Measure the back-EMF voltage on the three motor phases (U, V, W) with an oscilloscope
  3. The zero-crossings of the back-EMF correspond to the electrical commutation points
  4. Compare these zero-crossings to the encoder position readings
  5. The offset between back-EMF zero-crossings and encoder zero gives the commutation offset

This method requires access to the motor phases (before the drive output stage) and is most useful when the motor is disconnected from the drive.

Verification: How to Confirm Correct Alignment

After establishing a commutation offset (by any method), verify it with these checks:

TestExpected ResultIf Wrong
Motor hums/vibrates when stationary (enabled, zero velocity)Quiet, minimal vibrationLoud humming or vibration = wrong commutation angle
Current draw at zero speed, zero torqueNear zero (only magnetizing current)High current draw = wrong commutation angle
Torque productionSmooth, full rated torque availableReduced torque, cogging = wrong commutation angle
Temperature rise at rated loadWithin motor specRapid overheating = wrong commutation angle
Move 1 mechanical revolution, monitor position readingPosition changes by exactly encoder_counts / pole_pairs × electrical_ratioPosition jumps or discontinuities = encoder or commutation problem

Common Encoder Failure Modes and Symptoms

Failure Mode 1: Cable and Connector Degradation

Symptoms:

  • Intermittent error 31221 (cable disturbance)
  • Errors that appear only during specific machine operations (cable flexing in carrier)
  • Errors that go away when the cable is wiggled
  • Gradual increase in error frequency over weeks/months

Root causes:

  • Broken conductor inside the cable (especially at strain relief points)
  • Corroded or oxidized connector pins
  • Damaged cable shield (shield continuity broken)
  • Connector not fully seated
  • Cable crushed in cable carrier

Diagnosis:

  • Wiggle the cable at connector points while monitoring for errors
  • Measure continuity of each wire while flexing the cable
  • Inspect connector pins under magnification for corrosion or bent pins
  • Check cable resistance end-to-end (should be < 1 ohm for each wire)

Failure Mode 2: Bearing Wear in Encoder

Symptoms:

  • Increasing position jitter at all speeds
  • Noise or roughness when rotating the shaft by hand
  • Lissajous pattern becomes irregular or shifts
  • Error 31221 appearing more frequently
  • Position errors that change with motor temperature (thermal expansion)

Root causes:

  • Normal wear over operating hours
  • Side loading on motor shaft (misaligned coupling)
  • Vibration from adjacent equipment
  • Contamination ingress through worn shaft seal

Diagnosis:

  • Rotate the motor shaft slowly by hand and feel for roughness at the encoder end
  • Scope the encoder signals — look for amplitude modulation that correlates with one revolution (indicates eccentricity)
  • Lissajous test — bearing wear causes the circle to become an ellipse or figure-8

Important: Encoder bearing wear can appear as an encoder error, but the root cause may be motor bearing wear transferring vibration to the encoder. Check both.

Failure Mode 3: Optical Disk Contamination (Optical Encoders)

Symptoms:

  • Random pulse drops (missed counts)
  • Position drift in one direction
  • Errors that worsen in dirty or humid environments
  • No visible cable or connector problems

Root causes:

  • Dust or particulate contamination on the optical disk or reading head
  • Condensation inside the encoder housing
  • Oil mist or coolant ingress
  • Degraded shaft seal allowing contamination entry

Diagnosis:

  • Look for environmental contaminants near the encoder
  • Check if errors correlate with machine cleaning cycles or seasonal humidity changes
  • The only definitive fix is encoder replacement with a sealed (IP67) unit

Failure Mode 4: Encoder Electronics Failure

Symptoms:

  • Complete loss of encoder communication (error 31224 or 31225)
  • No signals at all on the encoder lines (measured at the drive connector)
  • Error persists after cable replacement
  • Encoder supply voltage is correct at the drive connector

Root causes:

  • Power surge or transient damaging encoder electronics
  • Thermal aging of encoder ICs
  • Moisture-induced corrosion on encoder PCB
  • Manufacturing defect

Diagnosis:

  • Measure encoder supply voltage at the drive connector (not at the encoder — if the voltage is good at the drive, the problem is in the cable or encoder)
  • Disconnect the encoder at the motor end and measure the cable end-to-end
  • If cable is good and supply voltage reaches the encoder connector, the encoder electronics have failed

Failure Mode 5: Resolver-Specific Failures

Symptoms:

  • Signal amplitude dropping over time
  • Position error that changes with temperature
  • Error 31221 or 31222

Root causes:

  • Resolver winding insulation degradation
  • Resolver excitation signal distortion (from the drive’s resolver interface)
  • Mechanical damage to resolver rotor/stator (air gap change)

Diagnosis:

  • Measure resolver excitation signal at the encoder connector — should be clean sine wave at expected frequency and amplitude
  • Measure sin/cos output amplitudes — should be equal and within spec
  • Check resistance of resolver windings — compare to spec or to readings from a known-good motor of the same type

Failure Mode 6: Encoder Memory Corruption

Symptoms:

  • Motor runs but with wrong commutation (vibration, overheating, reduced torque)
  • Error 31226 (encoder data read error)
  • Motor parameters are wrong after power cycle
  • ACOPOS reports unexpected motor type or parameters

Root causes:

  • Power interruption during encoder memory write
  • EEPROM cell degradation (age-related)
  • Voltage transient damaging memory cells
  • Electromagnetic interference during communication

Diagnosis:

  • In Automation Studio, read the motor parameters from the encoder memory and compare to the motor nameplate
  • If parameters don’t match, the memory is corrupted
  • Verify by reading the MOTOR_COMMUT_OFFSET — if it has changed from the last known good value, the memory is unreliable

Resolution:

  • Run the phasing procedure to establish a new commutation offset
  • Configure the motor as a third-party motor with manual parameters (if memory cannot be trusted)
  • Replace the encoder if memory corruption is recurrent

Quick-Reference Diagnostic Flowchart

Encoder Fault Reported (Error 3122x / 15206)
│
├── Is the error persistent or intermittent?
│   ├── PERSISTENT:
│   │   ├── Check encoder option module is seated in drive → reseated? OK
│   │   ├── Check encoder supply voltage at drive connector (5V ±0.25V for EnDat)
│   │   ├── Disconnect encoder at motor end → measure cable continuity
│   │   ├── If cable OK → encoder electronics likely failed → replace encoder
│   │   └── If cable bad → replace cable first
│   │
│   └── INTERMITTENT:
│       ├── Scope encoder signals → noise present?
│       │   ├── YES: Check cable routing, shielding, grounding → fix EMC issue
│       │   └── NO: Check for mechanical causes (bearing wear, loose coupling)
│       ├── Check connectors → reseat, clean pins
│       └── Monitor temperature correlation → thermal failure?
│
├── After fixing hardware → Error cleared?
│   ├── YES: Run motor, verify:
│   │   ├── No vibration at standstill
│   │   ├── Current draw near zero at standstill
│   │   ├── Smooth motion at all speeds
│   │   └── No overheating
│   │
│   └── NO: Check configuration:
│       ├── EncoderType parameter matches actual encoder
│       ├── Motor parameters match nameplate
│       └── Commutation offset is correct (run phasing if unsure)
│
└── If encoder was replaced → Commutation alignment needed
    ├── Run ACOPOS phasing procedure → record offset
    ├── Verify motor runs smoothly → done
    └── If phasing unavailable → use manual DC injection method

Emergency Procedures

Encoder Fault During Production

  1. Do not force repeated reset attempts if the error recurs immediately. Each reset cycle with wrong commutation stresses the drive’s power stage.
  2. Isolate the axis — disable the axis in the PLC program so other axes can continue (if the machine supports partial operation).
  3. Check the obvious first — reseat the encoder connector at both ends (5 seconds, fixes 20% of problems).
  4. Swap cables — if you have a spare encoder cable of the correct type, try it.
  5. Swap drives — if you have a spare ACOPOS drive with the same option module, swap the drive (keep the original motor and encoder connected). If the error follows the drive, it’s a drive/option module problem, not an encoder problem.

Complete Loss of Encoder (Machine Down)

If the encoder is completely failed and you must get the machine running:

  1. Check if the axis is critical — can the machine operate (even in degraded mode) with this axis disabled?
  2. Source a replacement encoder — identify the exact encoder type and order a replacement (see encoder identification procedure above).
  3. While waiting for parts: install the replacement cable (if the fault is cable-related) and verify the encoder signals are dead (confirm it’s not a cable problem).
  4. When the replacement arrives: follow the encoder replacement procedure above, then run the phasing procedure to establish the commutation offset.

Thermal Cascade Protection

If you see error 15236 (overtemperature) combined with encoder errors:

  1. Stop immediately. The drive is fighting itself due to incorrect commutation. Continued operation will destroy the drive’s IGBT modules.
  2. Do not attempt to run the axis until the encoder problem is resolved.
  3. After fixing the encoder, verify DC link voltage stability before resuming operation.
  4. If the drive has been operating with wrong commutation for an extended period, have the drive inspected for IGBT degradation.

Preventive Maintenance for Encoder Systems

Schedule

IntervalAction
MonthlyVisual inspection of encoder cables and connectors; check for cable carrier damage
QuarterlyMonitor encoder error frequency in the alarm log; trend error rates
Semi-annuallyScope encoder signals on critical axes; compare to baseline
AnnuallyFull cable insulation and continuity test; replace cables showing degradation
As neededAfter any maintenance that disturbs cable routing or motor mounting

Baseline Recording

When the machine is running correctly, record these baselines for future comparison:

  1. Encoder signal waveforms — scope and save screenshots for each axis
  2. Lissajous patterns — for Sin/Cos and resolver encoders
  3. Noise floor levels — with machine running and stopped
  4. Position reading stability — record the standard deviation of position readings with the axis stationary
  5. Motor current at standstill — should be near zero; record the actual value
  6. Encoder error count — note the error counter values in the drive parameters

Having these baselines makes it possible to detect gradual degradation before it causes a failure.

Spare Parts Strategy

Maintain these spares for encoder-related failures:

ItemQuantityNotes
Encoder cable (each type on the machine)1 per typeMust match the encoder interface module
Encoder option module (each type)1 per typeThe module in the ACOPOS drive
Complete motor + encoder assembly (critical axes)1 per critical axisEliminates alignment issues — swap and run
Ferrite cores (cable diameter matched)10+For EMC troubleshooting

Automated Encoder Monitoring via OPC-UA

Reading Encoder Data from the PLC Without the Project

If OPC-UA is configured on the CP1584, encoder data from ACOPOS drives is typically exposed in the motion namespace. This enables continuous monitoring without Automation Studio.

OPC-UA Encoder Variable Patterns

B&R’s mapp Motion exposes encoder data through predictable node patterns in the OPC-UA address space:

Root → Objects → [Application] → mappMotion → Axes → [AxisName] →
  ├── Encoder
  │   ├── Position          (LREAL)  - Current encoder position in user units
  │   ├── RawPosition        (LREAL)  - Raw encoder counts (before scaling)
  │   ├── Velocity           (LREAL)  - Computed velocity in user units/s
  │   ├── Acceleration       (LREAL)  - Computed acceleration
  │   ├── Status             (UINT)   - Encoder status bits
  │   ├── Error              (UINT)   - Active encoder error code (0 = OK)
  │   ├── CommutOffset       (REAL)   - Current commutation offset value
  │   ├── Resolution         (UDINT)  - Encoder resolution (counts/rev)
  │   ├── InterfaceType      (USINT)  - Encoder interface type ID
  │   └── Temperature        (REAL)   - Encoder temperature (if supported)
  └── ...

The exact path depends on the OEM’s naming convention. Common axis name patterns:

  • gAxis1, gAxis2, gAxis3, … (sequential)
  • gAxisSpindle, gAxisFeed, gAxisConv (functional)
  • Axis_1, Axis_X, Axis_Y (underscore-separated)
  • Names matching the motor station label

Python Script for Continuous Encoder Monitoring

"""
Continuous ACOPOS encoder health monitor.
Requires: pip install opcua asyncua
Usage: python encoder_monitor.py <PLC_IP> [interval_seconds]
"""
import asyncio
import sys
import time
from datetime import datetime
from asyncua import Client

PLC_IP = sys.argv[1] if len(sys.argv) > 1 else "192.168.0.1"
INTERVAL = float(sys.argv[2]) if len(sys.argv) > 2 else 1.0
LOG_FILE = f"encoder_monitor_{datetime.now():%Y%m%d_%H%M%S}.csv"

HEADERS = [
    "timestamp", "axis", "position", "velocity", "encoder_status",
    "encoder_error", "cycle_time_ms"
]

async def monitor_encoders():
    url = f"opc.tcp://{PLC_IP}:4840"
    async with Client(url=url) as client:
        root = client.get_root_node()

        print(f"Connected to {url}. Scanning for encoder variables...")

        axes = await find_encoder_nodes(client, root)
        if not axes:
            print("No encoder nodes found. Check OPC-UA configuration.")
            return

        print(f"Found {len(axes)} encoder axes: {list(axes.keys())}")
        print(f"Logging to {LOG_FILE}")
        print(",".join(HEADERS))

        with open(LOG_FILE, "w") as f:
            f.write(",".join(HEADERS) + "\n")

        while True:
            try:
                for axis_name, nodes in axes.items():
                    row = await read_axis_data(nodes, axis_name)
                    print(",".join(str(v) for v in row))
                    with open(LOG_FILE, "a") as f:
                        f.write(",".join(str(v) for v in row) + "\n")
                await asyncio.sleep(INTERVAL)
            except KeyboardInterrupt:
                print("\nMonitoring stopped.")
                break
            except Exception as e:
                print(f"Error: {e}")
                await asyncio.sleep(5)


async def find_encoder_nodes(client, root):
    children = await root.get_children()
    axes = {}

    for child in children:
        browse_name = (await child.get_browse_name()).Name
        try:
            sub_children = await child.get_children()
            for sub in sub_children:
                sub_name = (await sub.get_browse_name()).Name
                sub_sub = await sub.get_children()
                for axis_node in sub_sub:
                    axis_name = (await axis_node.get_browse_name()).Name
                    encoder_nodes = {}
                    for node in await axis_node.get_children():
                        node_name = (await node.get_browse_name()).Name
                        if any(kw in node_name.lower() for kw in
                               ["position", "velocity", "encoder",
                                "status", "error", "commut"]):
                            encoder_nodes[node_name] = node
                    if encoder_nodes:
                        axes[axis_name] = encoder_nodes
        except Exception:
            continue
    return axes


async def read_axis_data(nodes, axis_name):
    row = [time.time(), axis_name]
    for key in ["Position", "Velocity", "Encoder Status",
                "Encoder Error", "CommutOffset"]:
        node = nodes.get(key) or nodes.get(
            next((k for k in nodes if key.lower() in k.lower()), None), None)
        if node:
            try:
                val = await node.get_value()
                row.append(val)
            except Exception:
                row.append("N/A")
        else:
            row.append("N/A")
    row.append(INTERVAL * 1000)
    return row


if __name__ == "__main__":
    asyncio.run(monitor_encoders())

Detecting Encoder Degradation from Position Jitter

A healthy encoder produces consistent position readings when the axis is stationary. Degradation manifests as increasing jitter:

"""
Encoder jitter analysis. Record position data at rest, compute
standard deviation to quantify signal quality degradation.
"""
import asyncio, statistics
from asyncua import Client
from collections import deque

PLC_IP = "192.168.0.1"
AXIS_POSITION_NODE = "gAxis1.Position"  # Adjust to match your namespace
SAMPLES = 1000
INTERVAL = 0.001  # 1 ms between samples

async def measure_jitter():
    url = f"opc.tcp://{PLC_IP}:4840"
    async with Client(url=url) as client:
        node = client.get_node(f"ns=2;s={AXIS_POSITION_NODE}")
        positions = deque(maxlen=SAMPLES)

        print(f"Collecting {SAMPLES} position samples at {INTERVAL*1000:.0f}ms intervals...")
        print("Ensure the axis is STATIONARY before starting.")
        await asyncio.sleep(3)

        for _ in range(SAMPLES):
            val = await node.get_value()
            positions.append(val)
            await asyncio.sleep(INTERVAL)

        vals = list(positions)
        mean = statistics.mean(vals)
        stdev = statistics.stdev(vals)
        p2p = max(vals) - min(vals)

        print(f"\n--- Encoder Jitter Analysis ---")
        print(f"Mean position:   {mean:.6f}")
        print(f"Std deviation:  {stdev:.6f}")
        print(f"Peak-to-peak:    {p2p:.6f}")
        print(f"Min:             {min(vals):.6f}")
        print(f"Max:             {max(vals):.6f}")

        print(f"\nHealth assessment:")
        if stdev < 0.0001:
            print("  EXCELLENT - Encoder signal quality is optimal")
        elif stdev < 0.001:
            print("  GOOD - Within normal operating range")
        elif stdev < 0.01:
            print("  DEGRADED - Schedule encoder cable inspection")
        else:
            print("  CRITICAL - Encoder signal quality severely degraded")
            print("  Action: Replace encoder cable immediately, scope signals")

asyncio.run(measure_jitter())

Reading Encoder Parameters via PVI

When OPC-UA is not available, PVI provides direct access to ACOPOS drive encoder parameters:

"""
Read ACOPOS encoder parameters via B&R PVI.
Uses Pvi.py (github.com/hilch/Pvi.py).
"""
from pvi import Pvi

PLC_IP = "192.168.0.1"

pvi = Pvi()
pvi.line_set(line_name="ANSL", ip=PLC_IP)
pvi.connect()

def read_param(axis, param):
    var_name = f"acp10:{axis}.{param}"
    try:
        return pvi.variable_read(var_name)
    except Exception as e:
        return f"ERROR: {e}"

AXIS = "1"

params = {
    "EncIf":           "Encoder interface type",
    "EncResol":        "Encoder resolution (counts/rev)",
    "EncStat":         "Encoder status register",
    "EncError":        "Active encoder error code",
    "MOTOR_COMMUT_OFFSET": "Commutation offset (rad)",
    "EncAbsPos":       "Absolute encoder position",
    "EncIncPos":       "Incremental encoder position",
    "EncVelocity":     "Encoder velocity",
    "EncSupplyVolt":   "Encoder supply voltage",
    "MotorPolePairs":  "Motor pole pairs",
    "MotorRatedCurr":  "Motor rated current",
}

print(f"=== ACOPOS Axis {AXIS} Encoder Parameters ===\n")
for param, desc in params.items():
    val = read_param(AXIS, param)
    print(f"  {param:25s} = {val:>15}  ({desc})")

pvi.disconnect()

See pvi-api.md for complete PVI setup instructions and python-diagnostics.md for more Python diagnostic script patterns.


Automated Phasing Procedure via PVI

Triggering Phasing Remotely

When the commutation offset is lost or needs re-measurement, you can trigger the ACOPOS phasing procedure from a Python script without Automation Studio:

"""
Trigger ACOPOS encoder phasing procedure via PVI.
WARNING: The motor shaft WILL move during phasing. Ensure safe.
"""
from pvi import Pvi
import time

PLC_IP = "192.168.0.1"
AXIS = "1"

pvi = Pvi()
pvi.line_set(line_name="ANSL", ip=PLC_IP)
pvi.connect()

print("Pre-phasing checks:")
print(f"  Encoder error:    {pvi.variable_read(f'acp10:{AXIS}.EncError')}")
print(f"  Current offset:  {pvi.variable_read(f'acp10:{AXIS}.MOTOR_COMMUT_OFFSET')}")

print(f"\nStarting phasing procedure for axis {AXIS}...")
print("WARNING: Motor will move to find electrical zero.")

pvi.variable_write(f"acp10:{AXIS}.PhasingStart", 1)

for i in range(30):
    time.sleep(1)
    status = pvi.variable_read(f"acp10:{AXIS}.PhasingStatus")
    print(f"  Phasing status: {status}")
    if str(status) == "0" or str(status).lower() in ["done", "ready", "ok"]:
        break
    if str(status).lower() in ["error", "fault"]:
        error = pvi.variable_read(f"acp10:{AXIS}.EncError")
        print(f"  PHASING FAILED. Encoder error: {error}")
        break

new_offset = pvi.variable_read(f"acp10:{AXIS}.MOTOR_COMMUT_OFFSET")
print(f"\nPhasing complete. New commutation offset: {new_offset}")
print("Record this value for permanent configuration.")

pvi.disconnect()

Tools Required

ToolPurposeMinimum Spec
Digital oscilloscope (portable)Signal quality analysis2-channel, 100 MHz, isolated/differential probes
Digital multimeterContinuity, voltage, resistanceTrue-RMS, 0.1 ohm resolution
Insulation resistance testerCable insulation check250V/500V test voltage
Torque screwdriver setEncoder mounting hardwareMatches encoder mounting screw sizes
Dial indicatorShaft runout check0.001 mm resolution
Cable testerEncoder cable continuity4-wire minimum, can build from DMM + leads
Automation Studio (with SDM)Drive parameter monitoringCurrent version matching machine firmware
Label printer + heat-shrink labelsCable identificationFor documenting cable routing

Key Findings

  1. Encoder problems are the most common intermittent fault on ACOPOS systems. The combination of digital serial protocols, precision analog signals, and harsh industrial environments makes encoder systems the weakest link in the motion control chain.

  2. B&R encoders store the commutation offset in encoder memory, not in the drive. The physical alignment between the encoder and motor is arbitrary — B&R measures the offset at the factory and stores it in the encoder’s EEPROM. There is no mechanical reference mark you can use without this data.

  3. Writing to encoder memory is not publicly documented by B&R. The EPROM function block exists but its address maps are considered internal. Writing to the wrong address corrupts the encoder permanently. Do not attempt without B&R support or verified documentation.

  4. The ACOPOS phasing procedure is your primary recovery tool. When the commutation offset is lost (encoder replacement, memory corruption), the drive can re-measure it at startup. This adds startup delay but allows operation without B&R repair service.

  5. Error 15236 (overtemperature) following encoder errors indicates a cascading failure. Wrong commutation causes the drive to fight itself, generating excessive heat. Stop immediately — continued operation will destroy the IGBT modules.

  6. 80% of encoder “failures” are cable or connector problems. Always test the cable before condemning the encoder. Continuity testing, connector inspection, and scope analysis will usually identify the real problem.

  7. EnDat 2.2 and Hiperface are the most common interfaces on B&R 8LS motors. Identify your encoder type from the option module part number in the drive before ordering any replacement parts.

  8. Always maintain encoder signal baselines when the machine is healthy. Having waveform recordings and parameter readings from a known-good state makes it possible to detect degradation before it causes a failure, and dramatically speeds up fault diagnosis when problems occur.


Sources

  • B&R ACOPOS Servo Drive Technical Manual — encoder interface specifications, fault codes, and parameter references
  • B&R 8LS Three-Phase Synchronous Motor Documentation — motor and encoder option codes
  • B&R Automation Studio mapp Motion Online Help — McEncoderAxis, McPhasing function block references
  • B&R Community Forum (community.br-automation.com) — encoder fault discussions and troubleshooting
  • EnDat 2.2 Specification (Heidenhain) — encoder protocol and signal characteristics
  • Hiperface DSL Specification (SICK/Steute) — encoder protocol and diagnostic data format
  • BiSS Protocol Specification — encoder communication protocol reference
  • IEC 61800-5-1 — adjustable speed drive safety requirements

Grounding, Shielding, and EMC Troubleshooting for B&R Installations

Grounding and electromagnetic compatibility (EMC) are the invisible infrastructure of every B&R PLC installation. When these are correct, the system “just works.” When they are wrong, symptoms manifest as phantom sensor errors, intermittent communication dropouts, and watchdog faults that look exactly like software bugs. For an automation engineer maintaining B&R CP1584 PLCs on undocumented legacy machines from defunct OEMs, EMC problems are among the most difficult to diagnose because they are intermittent, configuration-dependent, and rarely documented. This document covers systematic grounding audit procedures, shield termination techniques for B&R fieldbus cables, common EMC problems in industrial installations, and measurement techniques to identify EMC issues. Cross-references: analog-calibration.md for analog signal noise diagnosis, physical-layer-sniffing.md for physical-layer signal analysis, and io-card-hardware.md for IO card isolation and filtering.

1. Overview

B&R X20 systems are sensitive to grounding quality because the architecture relies on multiple bus systems (POWERLINK, X2X Link, CANopen) operating simultaneously in electrically noisy industrial environments. The X20 backplane communicates via the X2X Link at up to 10 Mbit/s over the DIN rail itself, making the rail’s ground integrity a critical path for both power distribution and data communication. A poor ground connection on the DIN rail can corrupt X2X packets, causing I/O module dropouts that appear as random hardware faults.

This document provides systematic procedures for auditing, diagnosing, and remediating EMC problems in B&R installations where no original documentation exists. The focus is on the X20CP1584 CPU and its associated I/O, communication, and bus systems.

1.1 How Grounding Faults Mimic Software Bugs

SymptomLooks LikeOften Actually Is
Intermittent sensor reading jumpsScaling error in PLC programCommon-mode noise on analog input from ground loop
Random digital input state changesLogic error or floating inputEMI coupling into unshielded sensor cable
POWERLINK node dropping outNetwork configuration errorShield not bonded at both ends, ground loop on Ethernet
X2X station not respondingBus module failureDIN rail oxidation breaking X2X ground return
Watchdog faultTask class cycle time violationEMI causing CPU cycle jitter or bus retry overhead
Analog input noise floor 3-5%ADC calibration driftMissing shield termination or cable routed with VFD power
CAN bus error framesWrong baud rate or node addressMissing termination resistor or shield not grounded

The diagnostic challenge: all of these symptoms can also have legitimate software causes. The key differentiator is that EMC-induced problems are correlated with external events – motor starts, contactor closures, VFD operation, cell phone proximity, or time of day (when grid impedance changes).

1.2 The Legacy Machine Challenge

Defunct OEM machines typically present these grounding deficits:

  • No single-line diagram or grounding plan
  • PE terminals daisy-chained instead of star-point wired
  • Cable shields left floating, pigtailed, or grounded at wrong points
  • Signal cables routed in same tray as motor power cables
  • Missing termination resistors on bus endpoints
  • DIN rails not bonded to cabinet ground
  • VFD output cables unshielded or improperly shielded
  • No surge protection on field cables entering cabinet
  • Cabinet door bonding straps removed or missing

2. B&R Grounding Fundamentals

2.1 X20 System Grounding Requirements

The B&R X20 system requires two distinct ground connections:

Protective Earth (PE) / Safety Ground

  • The PE connection protects personnel from electric shock
  • Required by IEC 61131-2 for all PLC equipment
  • Connected via the DIN rail mounting, PE terminal blocks, and cable shields
  • Minimum wire gauge: 2.5 mm², yellow-green insulation

Functional Ground / Reference Ground

  • The functional ground provides a stable 0V reference for signal integrity
  • B&R modules use the DIN rail as the primary functional ground path
  • The X2X Link uses the rail as its ground return conductor
  • Functional ground and PE are typically bonded together at the cabinet star point

2.2 Mains Network Systems and B&R Compatibility

Network TypeDescriptionB&R CompatibilityNotes
TN-SSeparate neutral and PE from transformer to consumerBestPreferred. No neutral-to-PE currents in building wiring. Clean PE reference.
TN-C-SCombined neutral/PE (PEN) from transformer, separated at consumerGood with conditionsRequires proper separation at the main distribution board. If PEN currents flow in the building PE, noise can propagate.
TN-CCombined neutral/PE throughoutProblematicNeutral currents flow in PE, creating noise on the reference ground. Avoid for B&R installations.
TTSeparate earth electrodes for transformer and consumerGood with conditionsRequires equipotential bonding between all exposed conductive parts. Earth electrode impedance must be low.
ITIsolated or impedance-grounded neutralGoodUsed in medical and some industrial. No first-fault trip. Requires insulation monitoring.

For undocumented machines, identify the network type by inspecting the main disconnect:

  • TN-S: 5-wire (L1, L2, L3, N, PE) with separate N and PE bars
  • TN-C-S: 4-wire at meter, split to 5-wire at distribution board with N-PE link
  • TT: Earth electrode visible at building entry, separate from supply earth

2.3 Control Cabinet Grounding Hierarchy

B&R systems follow a hierarchical grounding structure. Each level must maintain low-impedance bonding to the level above it:

Building Ground (earth electrode / equipotential bonding bar)
  |
  |  >= 16 mm² Cu or equivalent
  |
Cabinet Ground (cabinet backplate / ground bus bar)
  |
  |  >= 6 mm² Cu (preferably 16 mm²)
  |
DIN Rail Ground (mounting rail with PE clip to cabinet)
  |
  |  Via module-to-rail contact (X2X Link ground return)
  |
Module Ground (bus module, electronic module, terminal block)
  |
  |  Via PE terminal (2.5 mm² min, yellow-green)
  |
Field Ground (cable shields bonded at EMC clamps)

2.4 X20 Backplane Grounding Through DIN Rail Contact

This is one of the most commonly overlooked grounding points in B&R installations.

The X2X Link bus uses the DIN rail itself as a ground return conductor. Every X20 bus module makes electrical contact with the DIN rail through its spring-loaded mounting clips. The X2X Link communication runs on two wires (DATA and GND), where GND is referenced to the DIN rail. If the DIN rail has poor connectivity to the cabinet ground bus, the X2X ground return path is compromised.

Critical requirements:

  1. The DIN rail must be conductive (zinc-plated steel or aluminum). Painted or anodized rails are NOT acceptable unless the paint is removed at mounting clip contact points.

  2. The DIN rail must be bonded to the cabinet ground bus with a PE clip (e.g., Phoenix Contact FT-DIN) and a minimum 6 mm² yellow-green wire.

  3. Multiple DIN rails in the same cabinet must be bonded together with at least 6 mm² copper.

  4. The rail must be clean – oxidation, paint, or anodizing under the module mounting clips creates intermittent contact that degrades X2X communication.

  5. When using coated X20c modules, the grounding path through the module housing is unchanged; the coating does not affect the DIN rail contact.

Verification procedure:

  • Measure resistance from any bus module’s DIN rail contact to the cabinet ground bus
  • Target: less than 0.1 ohm (measured with 4-wire method)
  • If greater than 0.5 ohm, clean rail contact points and check PE clip torque

2.5 PE Terminal Block Wiring Requirements

ParameterRequirement
Minimum wire gauge2.5 mm² (14 AWG) for individual module PE
Recommended wire gauge4 mm² or 6 mm² for PE bus runs
Insulation colorYellow-green (mandatory for PE per IEC 60445)
Terminal typeRing tongue or ferrule, not bare stranded wire
TorquePer terminal manufacturer specification
PE bus bar bonding16 mm² minimum to cabinet ground

For the X20CP1584 CPU, the power supply terminal block (X20TB12) includes dedicated PE connections:

  • Pins 1-2: +24V CP/X2X Link supply and GND
  • Pins 3-4: +24V I/O supply and GND
  • The PE reference for the CPU is established through the DIN rail mounting and the X2X Link ground return

2.6 CP1584 CPU and Interface Module Grounding

The X20CP1584 provides galvanic isolation between its interfaces:

  • Ethernet (IF2), POWERLINK (IF3), and X2X Link (IF6) are all isolated from each other, from other interfaces, and from the PLC core
  • The I/O supply is NOT isolated from the I/O power supply
  • The CPU/X2X Link supply IS isolated from the CPU/X2X Link power supply

This isolation means that each interface has its own ground reference. Cable shields must still be bonded to the cabinet ground at both ends (for Ethernet/POWERLINK) to maintain EMC integrity, but the isolation prevents ground loops from propagating between interfaces through the module itself.

Implication for interface modules: When installing X20IF2772 (CANopen) or other interface modules in the CP1584’s slot(s), those modules receive their ground reference through the X2X backplane. The module’s own cable shields must be bonded to the cabinet ground separately from the module’s signal ground.

2.7 Ground Loop Formation: Causes and Prevention

A ground loop occurs when two or more ground paths exist between equipment, creating a loop that can pick up electromagnetic interference and inject it as common-mode voltage into signal circuits.

Common causes in B&R installations:

  1. Cable shield grounded at both ends with no equipotential bonding between the two ground points (creates a loop through the shield)

  2. Sensor grounded at the field device and again at the B&R analog input module

  3. Multiple cabinets with separate earth references connected by signal cables without proper equipotential bonding

  4. 24V supply negative connected to ground at more than one point

Prevention strategies:

  • Ensure all cabinets and ground points are bonded to a single equipotential ground bus with impedance less than 0.1 ohm between any two points
  • For analog signals from remote sensors with their own ground, use isolated analog input modules or signal isolators
  • Never connect the 0V of the B&R I/O supply to PE at more than one point
  • For cables between buildings or between separately grounded structures, use galvanic isolation at one end

2.8 Reference Ground vs. Safety Ground

PropertySafety Ground (PE)Reference Ground (0V)
PurposePersonnel protectionSignal integrity
Color codeYellow-greenBlue or black (0V), or per IEC 60445
Current capacityMust handle fault currents (kA range)Signal currents only (mA range)
ConnectionDIN rail to cabinet to building earthInternal to module, derived from power supply
Test methodEarth electrode resistance testVoltage measurement, noise floor
SeparationNever remove or disconnect for testingMay be isolated for measurement with caution

3. Shield Termination for B&R Fieldbus Cables

B&R POWERLINK uses standard Ethernet physical layer (100BASE-TX) with the X20CA0E61 series cables. These are shielded twisted-pair cables with RJ45 connectors.

Cable specifications (X20CA0E61 series):

  • Type: Cat5e industrial, shielded, PVC jacket
  • Connectors: 2 x shielded RJ45 (plug to plug)
  • Available lengths: 0.2 m to 60 m (X20CA0E61.00020 through X20CA0E61.0600)
  • For lengths beyond 20 m: use X20CA0E61.xxxx series (up to 60 m)
  • UL recognized (E470046)

Shield termination for POWERLINK/Ethernet:

Ethernet standards (IEEE 802.3) and B&R guidelines require shielded cables to have their shields bonded at both ends. This is different from analog signal practice (which often uses single-ended grounding).

[CP1584 PLK port] ---X20CA0E61 cable--- [Remote node PLK port]
   |RJ45 shield|                       |RJ45 shield|
       |                                  |
   Cabinet PE                          Remote cabinet PE
       |                                  |
   Building equipotential bond  <----->  |

Why both-end bonding for Ethernet:

  • The shield acts as a Faraday cage for the differential pairs
  • High-frequency EMI requires low-impedance grounding at both ends to be effective
  • The shield current from potential differences between grounds is confined to the shield by the twisted-pair’s balanced coupling
  • Ethernet transformers at each end provide galvanic isolation from the shield

RC circuit in shielded RJ45 jacks:

  • B&R shielded RJ45 ports (both Ethernet IF2 and POWERLINK IF3 on the CP1584) include RC circuits connecting the jack shield to chassis ground
  • These circuits (typically 1 nF capacitor + 1 MOhm resistor) provide high-frequency bonding to ground while blocking low-frequency ground loop currents
  • This allows both-end shield bonding without creating low-frequency ground loops through the shield

Practical notes:

  • Never use unshielded (UTP) patch cables for POWERLINK in industrial environments
  • Maximum segment length between two stations: 100 m (per 100BASE-TX standard)
  • Cross-over wiring is used in X20CA0E61 cables (B&R uses MDI-X internally on POWERLINK ports)

3.2 X2X Bus Cable Shield Termination

The X2X Link is B&R’s proprietary backplane bus that connects the CPU to X20 I/O stations via the X2X Link bus modules. The cable carries both communication and power.

B&R recommendation (from X20 System User’s Manual):

“B&R recommends always using a grounding terminal via the top-hat rail to connect the X2X Link cable shield directly with the conductive and grounded backplane.”

For X2X cables:

  • The shield should be bonded to the DIN rail (which serves as the X2X ground reference) at both ends
  • Use a grounding terminal block at each end to connect the cable shield to the DIN rail
  • The B&R cable shield clamp (X20AC0SG1) is designed for this purpose

Shield connection using X20AC0SG1 cable shield clamp:

  • The X20AC0SG1 latches to the terminal block position on the DIN rail
  • A cable lug connects the clamp to the bus module’s ground connection
  • Accepts cable shields from 3 mm to 8 mm diameter
  • Available in packs of 10 (X20AC0SG1.0010) or 100 (X20AC0SG1.0100)
[X2X Link port] ----[X2X cable]---- [Remote X2X station]
      |              |SHLD|              |
   Module GND    X20AC0SG1         Module GND
      |            clamp               |
   DIN rail --> PE rail <------- DIN rail

3.3 CAN Bus Shield Termination

For CANopen on the X20IF2772 interface module:

Pinout of the 5-pin multipoint connector (0TB2105 terminal block):

PinFunction
1CAN_GND (CAN ground)
2CAN_L (CAN low)
3SHLD (Shield)
4CAN_H (CAN high)
5NC (not connected)

Termination resistors:

  • The X20IF2772 has integrated terminating resistors (120 ohm each, one per CAN interface)
  • Each CAN interface has a physical switch on the bottom of the module to enable/disable the termination
  • LED “TERM CAN 1” or “TERM CAN 2” (yellow) indicates the resistor is active
  • Per CAN specification, both ends of the bus must have 120 ohm termination (two resistors in parallel = 60 ohm on the bus, which matches the characteristic impedance of typical CAN cable)

Shield grounding for CAN bus:

  • B&R provides a dedicated SHLD pin (pin 3) on the CAN connector
  • For CANopen in industrial environments, the shield should be bonded to the cabinet ground at both ends
  • Use an EMC cable clamp or the X20AC0SA08 shield connection clamp (accepts 3-8 mm shield diameter)
  • The shield ground path is separate from CAN_GND (pin 1) – CAN_GND is the signal reference, SHLD is the EMC shield
  • Bond SHLD to the cabinet equipotential ground bus, not to CAN_GND

Maximum bus parameters:

  • Maximum distance: 1000 m (at lower baud rates; at 1 Mbit/s, distance is typically limited to ~40 m)
  • Maximum transfer rate: 1 Mbit/s
  • CAN controller: SJA 1000 (per X20IF2772 datasheet)

3.4 Serial RS485/RS232 Shield Handling

The X20CP1584 provides an RS232 interface (IF1) via the 12-pin X20TB12 terminal block. RS232 is typically used for programming/debug and is short-range (max 15 m per RS232 standard, though B&R rates it to 900 m – this likely assumes RS422/RS485 conversion equipment).

RS232 shield handling:

  • RS232 cables are rarely shielded in practice, but in noisy environments a shielded cable should be used
  • Shield should be grounded at the CP1584 end (cabinet ground) only – single-point grounding
  • Do not ground the RS232 cable shield at the PC end, as PCs may have different ground potentials

For RS485 field connections (via interface modules):

  • Use twisted-pair shielded cable
  • Bond shield at both ends if both devices share the same equipotential ground
  • If grounds differ significantly (e.g., remote field panel), ground shield at the B&R end only
  • Use 120 ohm termination at both ends of the RS485 bus

See serial-diagnostics.md for detailed RS485 noise diagnosis.

3.5 Shield Continuity Testing Procedure

Equipment needed: Multimeter with low-ohm mode (resolution to 0.01 ohm), or preferably a 4-wire milliohmeter.

Procedure:

  1. Power down the cabinet and all connected field devices
  2. Disconnect one end of the cable under test from its module
  3. At the disconnected end, separate the shield from any ground connection
  4. Measure resistance from the shield at the near end to the shield at the far end
  5. For X2X Link cables: measure from the shield at the CPU end to the shield at the remote station end

Pass/fail criteria:

Cable TypeLength (m)Max Shield Resistance
POWERLINK (X20CA0E61)1-20< 1 ohm
POWERLINK (X20CA0E61)20-60< 3 ohm
X2X Link1-10< 0.5 ohm
CAN bus1-100< 5 ohm
Analog sensor1-50< 2 ohm

If shield resistance is high:

  • Check shield clamp connections at both ends
  • Check for broken braid at cable entry points
  • Check for shield crimped too tightly (individual strands broken)
  • Replace cable if shield integrity is compromised

3.6 EMC Cable Clamps and Shield Connection Terminals

B&R-specific components:

Part NumberDescriptionShield DiameterNotes
X20AC0SG1.0010Cable shield grounding clamp, 10 pcs3-8 mmLatches to DIN rail terminal block position
X20AC0SG1.0100Cable shield grounding clamp, 100 pcs3-8 mmSame as above, bulk pack
X20AC0SA08.0010Shield connection clamp, 10 pcs3-8 mmAlternative shield connection method

Third-party equivalents:

  • Phoenix Contact SK series shield terminals
  • Weidmuller KLS shield clamps
  • Wago 2606 shield connection

Proper installation technique:

  1. Strip cable jacket back approximately 30-40 mm from the cable entry point
  2. Do NOT untwist or comb out the shield braid – keep it as a cylinder
  3. Slide the EMC clamp over the exposed shield braid
  4. Tighten the clamp screw to the specified torque (do not over-tighten – this breaks individual strands and increases resistance)
  5. Route a short ground wire from the clamp to the DIN rail PE bar or cabinet ground bus
  6. Ground wire: minimum 2.5 mm² yellow-green, ferrule at both ends

4. Cable Routing and Segregation

4.1 Separation of Power and Signal Cables

Minimum separation distances between power cables and signal cables:

Voltage LevelMinimum Separation (parallel run)Minimum Separation (crossing)
24 VDC signal50 mm (2 in)Contact crossing at 90 degrees is acceptable
230 VAC power200 mm (8 in)50 mm with shielded signal cable
400 VAC / 480 VAC power300 mm (12 in)100 mm minimum
VFD output (PWM)500 mm (20 in)200 mm, shielded motor cable mandatory
TOP OF CABINET
+---------------------------------------------------+
|                                                   |
|  [AC power distribution]         [AC power out]    |  <- Power zone (top)
|                                                   |
|---------------------------------------------------|
|                                                   |
|  [EMC filters]  [Surge protection]                 |  <- Filter zone
|                                                   |
|---------------------------------------------------|
|                                                   |
|  [VFD / drives]                                   |  <- Drive zone
|                                                   |
|---------------------------------------------------|
|                                                   |
|  [24V power supply]                               |  <- Power supply zone
|                                                   |
|---------------------------------------------------|
|                                                   |
|  [X20CP1584 CPU]  [Interface modules]             |  <- PLC zone
|  [X20 I/O stations on DIN rails]                  |
|                                                   |
|---------------------------------------------------|
|                                                   |
|  [POWERLINK cables]  [X2X Link cables]           |  <- Communication zone
|  [CAN bus cables]   [Field signal cables]         |
|                                                   |
+---------------------------------------------------+
BOTTOM OF CABINET

Cable entry from bottom for signal/communication cables.
Cable entry from top for power cables (if possible).

4.3 Crossing Angles

When power and signal cables must cross:

  • Cross at exactly 90 degrees (perpendicular)
  • Never run power and signal cables parallel for any distance
  • If parallel routing is unavoidable, maintain the minimum separation distance
  • At crossings, maintain physical separation – do not strap cables together

4.4 Cable Tray Segregation

TrayCable TypesColor Convention
Power tray (top)Motor power, VFD output, AC mainsBlack jacket
Communication tray (middle)POWERLINK, X2X, CAN bus, EthernetGreen (B&R POWERLINK), blue or grey
Signal tray (bottom)Analog inputs, digital inputs, encoder cablesBlue or grey, individually shielded

4.5 Ferrite Core Placement

Ferrite cores suppress high-frequency common-mode currents on cables. Place them:

On POWERLINK/Ethernet cables:

  • Near the CP1584 RJ45 connector (within 50 mm of the connector)
  • Near the remote node connector
  • Useful when cable routes near VFDs or motor power cables
  • Use ferrite clamps sized for Cat5e cables (inner diameter ~7 mm)

On CAN bus cables:

  • Near each end of the bus (at the X20IF2772 and the last node)
  • Prevents high-frequency emissions from the CAN bus and reduces susceptibility to external fields
  • Use ferrite clamps sized for the CAN cable diameter

On X2X Link cables:

  • Near the CPU end and near the remote station end
  • Especially important if the X2X cable runs near VFD output cables

On analog input cables:

  • Near the B&R analog input module end
  • Reduces high-frequency noise coupling into the ADC
  • See analog-calibration.md for analog noise floor measurement

On VFD motor cables:

  • At the VFD output terminals (essential)
  • Prevents conducted emissions from traveling along the motor cable
  • B&R ACOPOS drives require EMC-compliant output cable installation

Ferrite core selection:

ApplicationMaterialImpedance at 100 MHzInner Diameter
Ethernet/CANMnZn50-100 ohm7-8 mm
X2X LinkNiZn30-60 ohm5-6 mm
Motor cableMnZn100-200 ohm15-25 mm (snap-on)
Analog signalNiZn30-60 ohm5-8 mm
Bus SystemRecommended Cable TypeNotes
POWERLINKB&R X20CA0E61 series (Cat5e, shielded)Do not substitute with UTP patch cables
X2X LinkB&R X2X Link cable (shielded)Shield must be bonded to DIN rail at both ends
CANopenCAN bus cable per CiA DR-602 (shielded, twisted pair)Characteristic impedance 120 ohm
Analog 4-20 mAIndividually shielded twisted pairOverall shield acceptable if no power cables nearby
Digital inputsUnshielded acceptable for short runs (< 5 m), shielded for longer runs
RS232Shielded twisted pair for industrial use
RS485Shielded twisted pair, 120 ohm characteristic impedance

5. Common EMC Problems in B&R Installations

5.1 Intermittent Sensor Reading Errors from EMI

Symptoms: Analog sensor readings jump randomly by 1-5% of span. Digital inputs flicker on and off.

Root cause: Common-mode noise coupled into signal cables from nearby power cables, VFDs, or contactor coils.

Diagnosis:

  • Observe correlation between sensor errors and motor starts/stops
  • Measure common-mode voltage on analog inputs (see Section 6.4)
  • Check cable routing for proximity to power cables
  • Verify shield termination at both the sensor and the module

Remediation:

  • Ensure sensor cable shields are properly bonded at both ends (or at the PLC end for grounded sensors)
  • Re-route cables away from power cables
  • Add ferrite cores near the B&R module end
  • For analog signals, verify the module’s noise specifications (see analog-calibration.md)

Symptoms: POWERLINK S/E LED shows error states (red on, or blinking). Remote nodes drop out intermittently. Automation Studio network view shows nodes in error.

Root cause: Ground loop creating common-mode voltage on POWERLINK cable shield, exceeding the Ethernet transformer’s common-mode rejection range.

Diagnosis:

  • Check S/E LED state on CP1584 (see Section 2.8 in the CP1584 datasheet for LED error codes)
  • Measure voltage between the shield of the POWERLINK cable and the cabinet ground at the CP1584 end
  • If voltage is present (more than ~1V AC), there is a ground loop

Remediation:

  • Ensure all cabinets in the POWERLINK network are bonded to a single equipotential ground
  • If cabinets cannot be bonded (e.g., different buildings), use POWERLINK fiber optic converters
  • Replace unshielded Ethernet cables with B&R X20CA0E61 shielded cables
  • Check that the RC circuit in the RJ45 jack shield is intact (not bypassed)

See powerlink-internals.md for POWERLINK frame error analysis.

5.3 X2X Bus Faults from VFDs and Contactor Switching

Symptoms: X2X stations (I/O modules) drop off the bus and reappear. IO module status LEDs show error. Bus module LEDs indicate communication failure.

Root cause: The X2X Link ground return is through the DIN rail. If VFD switching noise or contactor arc energy couples into the DIN rail, X2X communication is corrupted.

Diagnosis:

  • Check if X2X errors correlate with VFD starts or contactor operations
  • Measure noise on the DIN rail using an oscilloscope (probe between DIN rail and cabinet ground)
  • Verify DIN rail-to-cabinet ground bonding (should be < 0.1 ohm)

Remediation:

  • Improve DIN rail bonding to cabinet ground bus
  • Separate X2X cables from VFD output cables
  • Add EMC filters to VFD power inputs
  • Use shielded VFD output cables with 360-degree shield bonding at both ends
  • Ensure VFD motor cable shield is bonded at the VFD chassis and at the motor frame

See x2x-protocol.md for X2X bus diagnostic details.

5.4 Analog Input Noise

Symptoms: Analog input readings show excessive jitter or noise floor. Readings may drift with motor speed or process state.

Root cause: Inadequate shielding, ground loops on analog signal cables, or missing reference ground.

Diagnosis:

  • Short the analog input at the terminal block and observe noise floor
  • If noise persists with shorted input, the problem is internal to the module or its power supply
  • If noise disappears with shorted input, the problem is on the cable/sensor side

Remediation:

  • Verify shield bonding on analog cables
  • Check for ground loops between sensor ground and module ground
  • Consider using isolated analog input modules (B&R X20AI463x with galvanic isolation)
  • Add analog input filters in software (moving average, median filter)

See analog-calibration.md for detailed analog noise analysis.

5.5 CAN Bus Error Frames from EMI

Symptoms: CAN bus error counters increment rapidly. CAN bus goes bus-off. X20IF2772 TxD LED shows constant activity even when no data should be transmitted (error frame retransmission).

Root cause: EMI on the CAN bus wiring causing bit errors, triggering error frames and retransmissions.

Diagnosis:

  • Use Automation Studio or CAN analyzer to monitor error frame count and error type (bit error, stuff error, CRC error)
  • Check that termination resistors are enabled at both ends of the bus (TERM CAN LED on X20IF2772)
  • Verify CAN cable shield is bonded to ground at both ends via pin 3 (SHLD)

Remediation:

  • Verify both-end termination (120 ohm at each end = 60 ohm measured across CAN_H/CAN_L with bus powered down)
  • Re-route CAN bus cables away from power cables
  • Add ferrite cores near both ends of the CAN bus
  • Replace damaged CAN cable (check for crushed or kinked sections)

See if2772-canopen.md for CAN error handling specifics.

5.6 Phantom IO State Changes

Symptoms: Digital inputs change state without any physical stimulus. Outputs toggle unexpectedly.

Root cause: EMI coupling into input circuits through unshielded cables, floating inputs, or inadequate input filtering.

Diagnosis:

  • Monitor input states in Automation Studio watch window while operating nearby motors/contactor
  • Check if inputs are properly wired (not floating – floating inputs are noise antennas)
  • For digital inputs, verify input filter time is appropriate (default is typically 3 ms, increase to 10 ms for noisy environments)

Remediation:

  • Wire unused digital inputs to 0V (never leave floating)
  • Use shielded cable for long digital input runs
  • Increase input filter time in Automation Studio configuration
  • Add pull-down resistors to inputs that receive very short signals in noisy environments

See io-card-hardware.md for IO module signal conditioning details.

Symptoms: POWERLINK PLK LED goes dark. Node disappears from the network. Link re-establishes after a variable delay.

Root cause: Physical layer signal degradation from EMI, poor cable, or marginal shield termination.

Diagnosis:

  • Check PLK LED state on CP1584 and remote nodes
  • Measure POWERLINK cable shield continuity
  • Try a known-good X20CA0E61 cable of the same length
  • Check if problem is correlated with specific activities (motor starts, welding, etc.)

Remediation:

  • Replace POWERLINK cable with genuine B&R X20CA0E61
  • Verify RJ45 connector seating (fully latched)
  • Add ferrite core near the CP1584 POWERLINK port
  • Reduce POWERLINK segment length if operating near the 100 m limit
  • Check for cable damage from mechanical stress or crushing

5.8 Watchdog Faults from EMI-Induced Cycle Time Violations

Symptoms: CPU watchdog triggers. System enters FAULT state. Logbook shows cycle time exceeded configured limit.

Root cause: EMI causing X2X bus retries or POWERLINK retransmissions, which add latency to the I/O cycle, pushing the total cycle time beyond the watchdog limit.

Diagnosis:

  • Check Automation Studio logbook for cycle time values near the limit
  • Correlate watchdog events with communication error events
  • Measure task class cycle times under normal and noisy conditions

Remediation:

  • Fix the underlying EMC problem (shielding, grounding, cable routing)
  • Increase the watchdog timeout in Automation Studio (if the application can tolerate it)
  • Reduce the number of nodes on affected bus segments
  • Optimize the task class configuration to reduce communication overhead

5.9 ADC Reading Jitter and Noise Floor

Symptoms: Analog readings fluctuate by several LSBs even with a stable physical input.

Root cause: Insufficient ADC resolution for the signal range, inadequate filtering, or noise on the reference ground.

Diagnosis:

  • Apply a known stable voltage to the analog input
  • Measure the peak-to-peak variation in the digital reading
  • Compare to the module’s published resolution and noise specifications

Remediation:

  • Ensure the analog input module’s power supply is clean and well-regulated
  • Verify the module’s AGND reference is solid (check DIN rail contact)
  • Apply software filtering (oversampling + averaging)
  • Check for nearby noise sources (switch-mode power supplies, VFDs)

6. Systematic EMC Audit Procedure

6.1 Step 1: Visual Inspection Checklist

Perform this inspection with all power OFF and locked out/tagged out (LOTO).

Cabinet grounding:

  • Cabinet bonded to building ground with visible, properly sized conductor
  • Ground bus bar present and all PE wires landed on it (no daisy-chains)
  • Cabinet door bonded to cabinet body with braided strap or bonding conductor
  • DIN rail bonded to cabinet ground bus with PE clip and yellow-green wire
  • Multiple DIN rails bonded together

DIN rail condition:

  • DIN rail is conductive (not painted/anodized at module contact points)
  • DIN rail is clean, no visible oxidation or corrosion
  • All modules are fully seated on the rail (no gaps)
  • End clamps installed at both ends of each module row

Cable shields:

  • All shielded cables have shields bonded at entry points (EMC clamps present)
  • No pigtail shield connections (shield wires wrapped around a screw terminal)
  • Shields bonded with 360-degree contact via EMC clamps, not via flying leads
  • POWERLINK cables are B&R X20CA0E61 (shielded), not UTP patch cables
  • CAN bus cable shields bonded to ground at both ends
  • X2X Link cable shields bonded to DIN rail at both ends

Cable routing:

  • Power cables separated from signal cables per minimum distances
  • No signal cables routed through power cable trays
  • Power/signal cable crossings are at 90 degrees
  • Cable entry points are at correct locations (power from top, signals from bottom)
  • No excessive cable lengths coiled inside the cabinet

Termination and configuration:

  • CAN bus termination resistors active at both ends (check X20IF2772 TERM LEDs)
  • All unused digital inputs wired to 0V
  • Analog input reference jumpers installed correctly
  • No visible damage to cable jackets or shield braids at entry points

EMC components:

  • EMC filters installed on VFD power inputs
  • Surge protectors installed on field cables entering the cabinet
  • Ferrite cores present on POWERLINK and CAN bus cables (if in noisy environment)
  • VFD output cables are shielded with shield bonded at both ends

6.2 Step 2: Ground Impedance Measurements

4-wire (Kelvin) measurement method for ground impedance:

The 4-wire method eliminates the contribution of test lead resistance from the measurement, providing accurate low-ohm readings down to 0.01 ohm.

  Current source           Voltmeter
  (I+)                     (V+)
    |                        |
    +---[R_under_test]---+---+
    |                        |
  (I-)                     (V-)

  Current leads carry the measurement current.
  Voltage leads measure the voltage drop across R.
  Impedance = V_measured / I_forced

Equipment:

  • Dedicated ground impedance tester (Fluke 1654B, Megger MIT430, or similar): $500-2000
  • Alternative: Precision multimeter with 4-wire ohms mode (Fluke 87V does NOT have 4-wire; use Fluke 8846A or Keithley 2110): $500-1500
  • Minimum resolution: 0.01 ohm

Measurement points and targets:

Measurement Point AMeasurement Point BTarget
Cabinet ground busBuilding ground bar (main)< 0.1 ohm
DIN railCabinet ground bus< 0.1 ohm
Module PE terminalDIN rail (via module contact)< 0.1 ohm
EMC clamp (any cable)Cabinet ground bus< 0.1 ohm
Remote cabinet ground busLocal cabinet ground bus< 0.1 ohm

Procedure:

  1. Verify all power is OFF and LOTO is applied
  2. Select 4-wire ohms mode on the meter
  3. Connect current leads to the two points under test
  4. Connect voltage leads to the same two points (inside the current lead connections)
  5. Read the impedance value
  6. Record the measurement with date, ambient temperature, and equipment ID

With a standard 2-wire multimeter (less accurate but possible):

  1. Set multimeter to lowest ohms range
  2. Touch probes together and note the lead resistance (typically 0.1-0.5 ohm)
  3. Measure between the two points
  4. Subtract the lead resistance from the reading
  5. This method is only reliable for measurements above 0.5 ohm; for lower values, use a dedicated 4-wire instrument

6.3 Step 3: Shield Continuity Testing

Procedure:

  1. Power OFF, LOTO
  2. Disconnect the cable under test at one end (remove terminal block or disconnect RJ45)
  3. At the far end, verify the shield is disconnected from ground (or note which end is grounded)
  4. Measure shield resistance end-to-end using the 2-wire method (subtract lead resistance)
  5. Measure shield-to-conductor insulation resistance (should be > 1 Mohm at 500V DC)

Pass/fail criteria:

  • Shield resistance end-to-end: proportional to length, typically < 1 ohm per 20 m
  • Shield-to-core insulation: > 20 Mohm (ideally > 100 Mohm)

Common findings in legacy machines:

  • Shield continuity broken at cable entry point (braid cut during cable stripping)
  • Shield grounded through a pigtail (single strand of braid wrapped around a screw) – high resistance
  • Shield crimped too tightly at a terminal, breaking most braid strands
  • Shield not connected at all (floating)

6.4 Step 4: Cable Routing Assessment

Document the current cable routing with photographs and a sketch. Note:

  1. Cable types and approximate routing paths
  2. Proximity of signal cables to power cables (measure and record distances)
  3. Cable crossings: are they at 90 degrees?
  4. Cable entry and exit points from the cabinet
  5. Coiled or excess cable lengths inside the cabinet
  6. Whether VFD output cables are shielded

Assessment checklist:

ItemFindingRemediation Priority
POWERLINK cable routed near VFD outputDistance: ___ mmHigh
Analog sensor cable in power trayYes/NoHigh
X2X cable parallel to 480V motor cableDistance: ___ mmCritical
CAN bus cable routed through cable tray with contactor wiringYes/NoMedium
Excess cable coiled inside cabinetLength: ___ mLow
Unshielded cable used for analog signalYes/NoHigh

6.5 Step 5: Near-Field Probing for Noise Sources

This step requires the cabinet to be powered ON with the machine in operation.

Equipment:

  • Near-field probe set (H-probe for magnetic field, E-probe for electric field)
  • Oscilloscope (Rigol DS1054Z or similar, 100 MHz minimum bandwidth)
  • BNC coaxial cable to connect probe to oscilloscope

Procedure:

  1. Set oscilloscope to 20 MHz bandwidth limit initially
  2. Set timebase to 1 us/div
  3. Set trigger to normal mode with threshold above noise floor
  4. Hold the H-probe (magnetic) near suspect noise sources:
    • VFD output terminals
    • Contactor coils
    • Relay coils
    • Switch-mode power supplies
    • POWERLINK/Ethernet cables
    • X2X Link cables
  5. Move the probe slowly along cable runs to locate the highest emission points
  6. Note the frequency and amplitude of the strongest emissions
  7. Repeat with the E-probe (electric field)

Typical noise signatures:

Noise SourceFrequency RangeCharacter
VFD PWM switching1-100 kHz (fundamental), up to 20 MHz (edges)Bursty, correlated with motor operation
Contactor coil release1-100 MHzSingle burst at contact opening
Switch-mode power supply50-500 kHz (fundamental), up to 30 MHz (harmonics)Continuous
POWERLINK traffic10-100 MHzPeriodic packets
X2X Link trafficDC-10 MHzContinuous during operation

6.6 Step 6: Common-Mode Voltage Measurements on I/O

Equipment: Oscilloscope with differential probe or isolated measurement capability.

WARNING: Do NOT connect an oscilloscope ground clip to any point in a live cabinet that is not at true earth potential. This can create a ground loop through the oscilloscope and damage equipment. Use a differential probe or battery-powered oscilloscope.

Measurement procedure:

  1. Connect differential probe across the analog input terminals (e.g., AI+ and AI-)
  2. Set probe to 1X or 10X as appropriate for the signal range
  3. Observe the signal waveform and noise superimposed on it
  4. Switch the probe to measure between AI- and cabinet ground (common-mode voltage)
  5. If common-mode voltage exceeds 1V peak, the signal quality is compromised

Acceptable levels:

Signal TypeMax Common-Mode Voltage (peak)
Analog 4-20 mA< 1 V
Analog 0-10 V< 0.5 V
Digital 24 V input< 5 V
RS485< 3 V (check module spec for exact common-mode range)
CAN bus< -2V to +7V per CAN standard

6.7 Step 7: Ground Loop Detection

Method 1: Voltage measurement between grounds

  1. Power ON the system

  2. Using a multimeter set to AC millivolts range, measure the voltage between:

    • Cabinet ground bus and a known earth reference (building ground bar)
    • DIN rail and cabinet ground bus
    • The shield of any POWERLINK/Ethernet cable and the local cabinet ground
    • The GND terminal of a remote field device and the cabinet ground
  3. If AC voltage is detected (> 100 mV), a ground loop or ground potential difference exists

Method 2: Current measurement on ground conductors

  1. Power ON the system

  2. Using a clamp-on current probe (AC mA range), measure current flowing in:

    • The PE conductor between cabinets
    • The shield of POWERLINK cables
    • The cable between cabinet ground and building ground
  3. Any AC current > 10 mA on a shield or PE conductor indicates a ground loop or improper bonding

Method 3: Visual verification of ground topology

  1. Trace all PE connections from the cabinet ground bus
  2. Verify there is exactly one path from any equipment to the building ground (star topology)
  3. Identify any connections that create loops (e.g., two separate PE paths between two cabinets)

6.8 Step 8: Document Findings and Create Remediation Plan

Create a structured report with:

  1. Machine identification (location, OEM if known, B&R CPU model, Automation Studio project version)
  2. Photos of cabinet layout and cable routing
  3. All measurement results with equipment used, date, and ambient conditions
  4. Findings categorized by severity:
    • Critical: Safety hazard or system-stopping fault
    • High: Degrading performance or intermittent errors
    • Medium: Non-optimal but functional
    • Low: Cosmetic or best-practice improvement
  5. Prioritized remediation plan with estimated effort and materials
  6. Before/after measurements after remediation

7. Remediation Techniques

7.1 Adding Proper Ground Connections

Star-point grounding topology:

                    Building Ground Bar
                          |
                          | 16 mm² Cu
                          |
                    [Cabinet Ground Bus]
                   /    |    |    \
                  /     |    |     \
           [Cabinet 1]  |    |  [Cabinet 3]
                |       |    |       |
           6 mm² Cu     |    |    6 mm² Cu
                |       |    |       |
           [DIN rail 1] |    |  [DIN rail 3]
                |       |    |       |
            [Modules]   |    |   [Modules]
                         |
                    [Cabinet 2]
                         |
                    6 mm² Cu
                         |
                    [DIN rail 2]
                         |
                    [Modules]

Key principle: Each cabinet has exactly one path to the building ground bar. No loops. No daisy-chains of PE connections between cabinets.

Procedure for adding a ground connection:

  1. Identify the nearest point on the cabinet ground bus
  2. Determine the required wire gauge based on fault current capacity and distance
  3. Use a ring tongue terminal crimped to the wire
  4. Bond the wire to the ground bus with a washer, lock washer, and nut
  5. Torque to specification (typically 2-3 Nm for M6 hardware)
  6. Verify impedance after installation (< 0.1 ohm to building ground)

7.2 DIN Rail Grounding Upgrade

  1. Remove all modules from the affected rail section
  2. Clean the rail surface with isopropyl alcohol and a non-abrasive pad
  3. Install a PE bonding clip (Phoenix Contact FT-DIN or equivalent) at each end of the rail
  4. Run a 6 mm² yellow-green wire from the PE clip to the cabinet ground bus
  5. For rails longer than 1 m, add additional PE clips at 1 m intervals
  6. Reinstall modules and verify seating
  7. Measure rail-to-cabinet ground impedance: target < 0.1 ohm

7.3 Isolation Transformers for Noisy Power Feeds

When the 24V power supply receives noise from the mains or from other loads on the same circuit:

Application points:

  • Between the mains supply and the 24V power supply input
  • Between the mains supply and VFD input (VFDs usually have their own built-in DC bus isolation)

Specifications for industrial isolation transformer:

  • Turns ratio: 1:1
  • Power rating: Match or exceed the total load (e.g., 500 VA for a 10A 24V supply)
  • Electrostatic shield (Faraday shield between primary and secondary): Recommended for EMC applications
  • Voltage regulation: < 3%
  • Insulation class: F or H
  • K-factor rated if supplying nonlinear loads (switch-mode power supplies)

7.4 Ferrite Chokes on Cables

Installation procedure:

  1. Select ferrite core of appropriate material and size for the cable
  2. Pass the cable through the ferrite core
  3. For best high-frequency suppression, pass the cable through the core as many times as possible (each pass doubles the effective impedance)
  4. For common-mode suppression: pass both signal and return conductors through the core together
  5. For differential-mode suppression (rare): pass only one conductor through the core
  6. Position the ferrite as close to the susceptible device (usually the B&R module) as practical
  7. Secure the ferrite with cable ties or heat-shrink tubing

When ferrite is not enough:

  • If noise is below 1 MHz, ferrite may not be effective
  • Consider active filtering or cable re-routing instead
  • For very strong noise sources, shielded enclosures may be necessary

7.5 Shielded Cable Replacement Procedure

  1. Identify the cable to be replaced (trace from module to field device)
  2. Determine the required cable type and length
  3. Remove the old cable:
    • Disconnect at both ends
    • Pull the cable from the cable tray/conduit
    • Note the routing path
  4. Install the new cable:
    • Pull the new cable through the same path (or a better path if re-routing)
    • Leave 30-40 mm of jacket stripped back at each termination point for shield clamping
    • Do not untwist or comb out the shield braid
  5. Install EMC cable clamps at both ends:
    • Clamp the shield braid with a 360-degree EMC clamp
    • Bond the clamp to the local ground bus
  6. Terminate the individual conductors at the module terminal block
  7. Test shield continuity before energizing
  8. Energize and verify correct operation

7.6 EMC Filter Installation on VFD Power Feeds

Types of EMC filters for VFDs:

Filter TypeLocationPurpose
Mains EMC filterBetween mains and VFD inputSuppress conducted emissions from VFD back to mains
dv/dt filterAt VFD outputReduce voltage rise time to protect motor insulation
Sine-wave filterAt VFD outputConvert PWM to near-sine wave, reduce EMI significantly
Common-mode chokeAt VFD outputReduce common-mode currents on motor cable

Installation notes:

  • Follow the VFD manufacturer’s EMC installation guide
  • B&R ACOPOS drives have specific EMC installation requirements documented in their manual
  • EMC filter must be installed as close to the VFD as possible
  • Filter enclosure must be bonded to the cabinet ground
  • Input and output cables must be kept separated (never route VFD output cable through the EMC filter area)

See acopos-drives.md for B&R ACOPOS-specific EMC requirements.

7.7 Surge Protection for B&R I/O Modules

Field cables entering the cabinet can carry surge energy from:

  • Lightning strikes (direct or indirect)
  • Switching of inductive loads
  • Electrostatic discharge

Surge protection placement:

Cable TypeProtection DevicePlacement
Analog input (4-20 mA)Surge protector for analog signalsIn the field cabinet or at the B&R terminal block
Digital input (24 V)Varistor or TVS diode arrayAt the terminal block or in a surge protection module
POWERLINKEthernet surge protector (RJ45)At the cabinet cable entry point
CAN busCAN bus surge protectorAt each cabinet entry point
RS485RS485 surge protectorAt the field end and the B&R end

Installation:

  • Surge protectors must be bonded to the cabinet ground bus
  • The ground connection of the surge protector is critical – use short, direct wiring to ground
  • Replace surge protectors after a known surge event (most have indicator LEDs showing protection status)

7.8 Cable Relocation

Priority order for cable relocation (based on impact):

  1. Critical: Relocate X2X Link cables away from VFD output cables
  2. Critical: Relocate analog input cables out of power cable trays
  3. High: Separate CAN bus cables from motor power cables
  4. Medium: Increase separation between POWERLINK cables and 24V distribution
  5. Low: Reorganize cable ties and bundles for neatness

Relocation procedure:

  1. Verify the machine is in a safe state (stop all motion, lock out)
  2. Disconnect cables at both ends
  3. Re-route through appropriate cable tray/duct
  4. Re-terminate at both ends
  5. Test shield continuity
  6. Re-energize and verify operation

7.9 Adding EMC Cable Clamps to Existing Installations

  1. Identify cables that are missing shield termination
  2. At the cable entry point, strip back 30-40 mm of jacket to expose the shield braid
  3. Install an EMC clamp (X20AC0SG1 for DIN rail mounting, or generic clamp for cable tray mounting)
  4. Route a short ground wire from the clamp to the nearest ground reference
  5. Do NOT cut the shield braid or create a pigtail – the clamp must grip the full circumference

8. Measurement Equipment

EquipmentRecommended ModelPrice Range (USD)Use Case
Digital multimeterFluke 87V$200-400General voltage, continuity, low-ohm measurements
Ground impedance testerFluke 1654B or Megger MIT430$500-20004-wire ground impedance, PE/N continuity
Bench oscilloscopeRigol DS1054Z (4ch, 100 MHz)$400-800Waveform analysis, noise measurement, common-mode voltage
Handheld oscilloscopeFluke 120B Series$1500-2500Field measurements, live cabinet probing
Differential probeRigol RP1020D (100X) or Micsig DP10013$50-200Safe measurement in live cabinets without ground reference
Near-field probe setDIY (ferrite toroid + coax) or Beehive Electronics 100A/B$50-200Noise source identification
Current probeClamp-on AC/DC (Fluke i400s or Uni-T UT210E)$50-500Ground current measurement for ground loop detection
CAN bus analyzerPCAN-USB or Kvaser Leaf$200-500CAN bus traffic monitoring and error analysis
POWERLINK analyzerB&R Automation Studio Ethernet capture + Wireshark$0 (software)POWERLINK frame analysis
Insulation resistance testerFluke 1587FC or similar$400-800Cable insulation integrity testing

8.2 DIY Near-Field Probe Construction

For budget-constrained situations, an H-field (magnetic) near-field probe can be constructed:

Coaxial cable (RG-58 or RG-316)
  |
  | Strip outer jacket
  | Expose braid 10-15 mm
  | Form braid into small loop (10-15 mm diameter)
  | Solder braid to itself to form closed loop
  | Center conductor is not connected
  | BNC connector at other end

This probe detects magnetic fields. Sweep it along cables and modules while watching the oscilloscope to locate noise sources. Sensitivity is lower than commercial probes but sufficient for identifying major problems.

9. Quick Diagnostic Flowchart

Symptom                        EMC Cause                    First Test                  Remediation
-----------------------------------------------------------------------------------------------
Intermittent sensor            Common-mode noise            Scope on analog input       Fix shield termination
  readings jumping                                           terminals                   Re-route cable
                                                                                  Add ferrite core
-----------------------------------------------------------------------------------------------
POWERLINK node                 Ground loop on cable         Measure AC voltage         Verify equipotential
  dropping out                       shield                     between cable shield      bonding between cabinets
                               Shield not bonded              and cabinet ground        Replace with shielded cable
                               at both ends                                            Add RC filter to jack shield
-----------------------------------------------------------------------------------------------
X2X stations                   DIN rail ground              Scope on DIN rail          Clean DIN rail contacts
  disappearing                  impedance too high            (rail to cabinet GND)    Improve PE clip bonding
                               VFD noise on DIN rail       Check during VFD start     Separate X2X from VFD cables
-----------------------------------------------------------------------------------------------
Analog input                   Ground loop or              Short AI terminals         Check sensor grounding
  noise/jitter                   poor shielding                and observe noise         Add/relocate shield
                               Reference ground                                       Use isolated AI module
                                 unstable
-----------------------------------------------------------------------------------------------
CAN bus error                  Missing termination           Measure 60 ohm across      Enable termination at both
  frames, bus-off                or shield                   CAN_H/CAN_L              ends (X20IF2772 switch)
                               Cable damage                 with bus powered down     Replace damaged cable
                                                                                      Bond shield to ground
-----------------------------------------------------------------------------------------------
Phantom digital                 Floating input               Wire input to 0V          Wire all unused inputs
  input state changes           EMI on unshielded            and observe               Use shielded cable
                                 cable                                                     Increase filter time
-----------------------------------------------------------------------------------------------
Watchdog fault /               Bus retries from             Check cycle time          Fix underlying EMC issue
  cycle time exceeded            EMI adding latency           in logbook                Increase watchdog timeout
                                                                                      Reduce bus loading
-----------------------------------------------------------------------------------------------
Ethernet link                  Cable/cable shield           Try known-good cable       Replace POWERLINK cable
  dropout                       problem                    Check RJ45 seating        Add ferrite core
                                                                                      Verify shield continuity
-----------------------------------------------------------------------------------------------
Motor cable                    Unshielded VFD              Near-field probe at VFD   Install shielded motor cable
  radiating EMI                  output cable               output                    Bond shield at both ends
                                                                                  Install dv/dt or sine filter

10. Cross-References

TopicFileRelevance
Analog signal noise and calibrationanalog-calibration.mdADC noise floor, analog input filtering, calibration procedures
Physical wire-level signal analysisphysical-layer-sniffing.mdCapturing and analyzing POWERLINK, X2X, and CAN physical signals
IO module signal conditioningio-card-hardware.mdDigital and analog input filter circuits, threshold behavior
Encoder signal qualityencoder-diagnostics.mdEncoder cable shielding, differential signal integrity
POWERLINK communication diagnosticspowerlink-internals.mdPOWERLINK frame structure, error detection, CRC analysis
X2X bus diagnosticsx2x-protocol.mdX2X packet structure, error handling, bus fault recovery
CAN bus error handlingif2772-canopen.mdX20IF2772 configuration, CAN error counters, termination
RS485 noise issuesserial-diagnostics.mdRS485/RS232 signal quality, noise diagnosis
Drive EMC considerationsacopos-drives.mdACOPOS drive EMC installation, motor cable shielding

11. Key Findings

  1. DIN rail ground integrity is the single most important grounding point in an X20 system. The X2X Link uses the rail as its ground return. Poor rail contact causes X2X communication failures that mimic hardware faults.

  2. POWERLINK cable shields must be bonded at both ends. Ethernet/POWERLINK standards and B&R guidelines require both-end shield bonding. The RC circuits in shielded RJ45 jacks prevent low-frequency ground loops while maintaining high-frequency EMC protection.

  3. Analog input noise is almost always a grounding problem, not a calibration problem. Before recalibrating any analog input, verify shield termination and check for common-mode voltage between the sensor ground and the module ground.

  4. 90% of EMC problems in undocumented legacy machines trace to three root causes: missing shield termination, power/signal cable proximity violations, and DIN rail-to-cabinet ground impedance above 0.1 ohm.

  5. The X20IF2772 has integrated termination resistors controlled by physical switches. Check that TERM CAN 1/2 LEDs are active at both ends of the CAN bus. Missing termination is the most common CAN bus fault.

  6. Never leave digital inputs floating. A floating digital input acts as an antenna for EMI, causing phantom state changes. Wire all unused inputs to 0V.

  7. Ground loop detection is a voltage measurement, not a continuity measurement. Measure AC voltage between suspected ground points with the system powered ON. Any reading above 100 mV AC indicates a ground potential difference that will cause EMC problems.

  8. VFD output cables are the strongest EMI source in most industrial installations. Always use shielded motor cables with 360-degree shield bonding at both the VFD and the motor. Install EMC filters on VFD inputs.

  9. The X20CP1584 provides galvanic isolation between Ethernet, POWERLINK, and X2X interfaces. This isolation prevents ground loops from propagating between bus systems through the CPU, but does not eliminate the need for proper shield bonding at each interface.

  10. Document everything you find during an EMC audit. Undocumented machines will be serviced by the next person who has even less context than you. Photograph the cabinet layout, record all measurements, and note what you changed.

  11. Use the 4-wire (Kelvin) method for ground impedance measurements below 1 ohm. Standard 2-wire multimeter measurements include test lead resistance and are unreliable for verifying the low impedances required by B&R grounding specifications.

  12. Cable crossing angle matters. When signal and power cables must cross, crossing at 90 degrees reduces capacitive and inductive coupling by orders of magnitude compared to parallel routing. Even a few centimeters of parallel run can inject measurable noise.

12. Sources

Key Findings

  1. Most intermittent B&R problems are grounding-related. Phantom sensor errors, random IO dropouts, and watchdog faults that look like software bugs are frequently caused by poor grounding, improper shield termination, or cable routing violations.

  2. The X2X Link uses the DIN rail as a data path. X2X communicates at up to 10 Mbit/s through the DIN rail’s metal structure. Ground integrity of the rail directly affects IO module reliability — a loose rail clamp can cause X2X communication errors.

  3. Shield termination at both ends (360-degree) is mandatory for POWERLINK and CAN. Pigtail shield connections are inadequate for high-speed fieldbus. Use B&R shield grounding clamps (X20AC0SG1) for proper 360-degree termination.

  4. Cable segregation prevents crosstalk. POWERLINK, CAN, analog signals, and power cables must be routed in separate conduits or with adequate separation. Parallel routing of power and signal cables is the most common EMC installation error.

  5. Systematic measurement beats guessing. Use a multimeter to verify ground continuity between all panels and the main ground bar before anything else. Then use an oscilloscope to check for high-frequency noise on signal shields. These two measurements catch 80% of EMC problems.

  6. Star grounding is preferred over daisy-chain. Each panel and device should have its own ground conductor back to the main ground bar. Daisy-chained grounds create ground loops and unequal potentials.


B&R Documentation

  • B&R Automation, X20 System User’s Manual, document MAX20. Sections: “Shielding and earthing”, “Mechanical and electrical configuration”, “Shield connection”. Available from br-automation.com downloads.
  • B&R Automation, Installation / EMC Guide, document MAEMV. Comprehensive EMC installation guidelines for B&R industrial PCs, panels, and control systems. Available from br-automation.com downloads.
  • B&R Automation, X20(c)CP158x and X20(c)CP358x Data Sheet, V1.56. Technical specifications for X20CP1584 CPU including power supply, interfaces, and grounding requirements. Available from br-automation.com.
  • B&R Automation, X20IF2772 Interface Module Data Sheet, V2.23. CAN bus interface specifications, pinout, termination resistor details.
  • B&R Automation, X20CA0E61 POWERLINK/Ethernet Cable product page. Cable specifications and ordering information.
  • B&R Automation, X20AC0SG1 Cable Shield Grounding Clamp product page. Shield clamp specifications and installation.

EMC Standards

  • IEC 61000-5-2: Electromagnetic compatibility (EMC) - Installation and mitigation guidelines - Part 5-2: Earthing and cabling.
  • IEC 61131-2: Programmable controllers - Equipment requirements and tests.
  • IEC 60364-4-41: Low-voltage electrical installations - Protection for safety - Protection against electric shock.
  • IEC 60445: Basic and safety principles for man-machine interface, marking and identification - Identification of equipment terminals, conductor terminations and conductors.
  • CiA DR-602: CAN in Automation - CAN bus cable recommendation.
  • IEEE 802.3: Standard for Ethernet. Physical layer and shield termination requirements for 100BASE-TX.
  • IEC 61800-5-1: Adjustable speed electrical power drive systems - Safety requirements - Electrical, thermal and energy.

Industry References

  • Siemens, EMC - Technical Overview, document 103704610. General EMC installation guidelines applicable to all industrial control systems.
  • ABB, Technical Guide No. 3: EMC-compliant installation and wiring for drives. VFD cable shielding and grounding best practices.
  • SEW-Eurodrive, Notes on cable routing and shielding. Cable segregation and shield termination guidelines.
  • InCompliance Magazine, “Where to Ground Cable Shields” article. Analysis of shield grounding methods for different cable types and signal frequencies.

Community Resources

  • B&R Community Forum (community.br-automation.com): Practical discussions on POWERLINK, X2X, and CAN troubleshooting.
  • B&R Automation Help (built into Automation Studio): Reference for X20 system configuration, error codes, and diagnostic procedures.

Time Synchronization and Timestamp Analysis for B&R Diagnostics

Time synchronization is the single most critical prerequisite for meaningful diagnostics on any PLC system. On a B&R X20CP1584 system, every alarm, every log entry, every I/O error, and every drive fault carries a timestamp. If those timestamps are not trustworthy, the entire diagnostic chain collapses. This document covers NTP/SNTP configuration on B&R, ensuring accurate timestamps across PLC, IO cards, drives, and HMIs, how to correlate events across multiple devices using timestamps, and how to use time-based analysis to find the root cause of intermittent faults. Cross-references: alarm-logging.md for alarm timestamp formats, system-variables.md for time-related system variables, and network-architecture.md for network timing implications.

1. Overview

Why Time Sync Matters for Diagnostics

  • Event correlation: When a drive faults, the PLC logs a power bus warning, and the HMI shows a communication timeout, you need to know whether these events happened within milliseconds of each other (same root cause) or minutes apart (coincidence).
  • Root cause analysis: Intermittent faults often leave breadcrumbs across multiple subsystems. Without synchronized clocks, those breadcrumbs cannot be ordered into a causal chain.
  • Log integrity: Regulatory and quality systems require auditable timestamps. An unsynchronized PLC clock undermines all log credibility.
  • Scheduled events: Recipe changes, shift handovers, and maintenance windows all reference wall-clock time. A drifting PLC clock can trigger actions at the wrong time.

The Undocumented Machine Challenge

When you inherit a B&R system from a defunct OEM, there is no documentation describing which devices use NTP, which rely on manual time setting, and whether any time synchronization exists at all. You must assume clocks are wrong until proven otherwise. The diagnostic workflow on such a system always starts with verifying time synchronization across all devices before attempting any event analysis.

Timestamp Scope on B&R Systems

DeviceTimestamp SourceTypical Drift Without Sync
X20CP1584 PLCInternal RTC5-30 seconds/day
X20 I/O modulesNo RTC; use PLC timeN/A
ACOPOS drivesInternal clock10-60 seconds/day
Power Panel HMIInternal RTC5-20 seconds/day
Third-party devicesVariesUnknown

Internal real-time clocks (RTC) are battery-backed but drift significantly. A 30-second-per-day drift means a PLC can be 15 minutes off within a month if NTP fails silently.


2. B&R NTP Client Configuration

2.1 Configuration Location

In Automation Studio:

  1. Double-click the CPU object in the Physical view (or the logical CPU in the Configuration view).
  2. Navigate to CPU Properties > Time Synchronization.
  3. Enable the NTP client checkbox.
  4. Enter the NTP server address (hostname or IP).
Configuration path:
  Physical View
    └── X20CP1584 (CPU)
          └── Properties
                └── Time Synchronization
                      ├── ☑ Use NTP client
                      ├── NTP server: pool.ntp.org
                      ├── Time zone: UTC+01:00 (or local)
                      └── Poll interval: [default]

2.2 Required Prerequisites

NTP on B&R will fail silently if prerequisites are not met. Three conditions must all be true:

PrerequisiteWhere to ConfigureFailure Symptom
DNS service enabledCPU Properties > DNSNTP hostname resolution fails, no error shown
DNS server address setCPU Properties > DNS (manual) or DHCPSame as above
Default gateway configuredCPU Properties > Ethernet > GatewayPLC cannot route to external NTP server

2.3 DNS Configuration

DNS is required because NTP server addresses like pool.ntp.org are domain names, not IP addresses. The PLC must resolve these names.

With DHCP:

  1. CPU Properties > Ethernet > IP Configuration: DHCP
  2. CPU Properties > DNS > “Get DNS from DHCP server”: ON

With Static IP:

  1. CPU Properties > Ethernet > IP Configuration: Static
  2. Set IP address, subnet mask, and default gateway
  3. CPU Properties > DNS > DNS server: manual entry (e.g., 8.8.8.8 or your plant DNS server)
  4. CPU Properties > DNS > “Get DNS from DHCP server”: OFF
Static IP configuration example:

  IP address:     192.168.100.10
  Subnet mask:    255.255.255.0
  Default gateway: 192.168.100.1
  DNS server:      192.168.100.1   (plant DNS)
  DNS server 2:    8.8.8.8         (Google public, fallback)

2.4 NTP Server Selection

NTP ServerSuitabilityNotes
pool.ntp.orgGood for general useRound-robin DNS, geographically distributed
time.windows.comCommon on Windows-centric plantsSingle source of truth if Windows servers present
10.x.x.x or 192.168.x.xBest for air-gapped plantsInternal NTP server, no external dependency
Local server IPBest reliabilityOn-site NTP appliance or Linux server with chrony/ntpd

For industrial environments, an internal NTP server is strongly preferred. It eliminates dependency on external internet connectivity and provides deterministic latency. Configure a Linux server or dedicated NTP appliance on the same VLAN as the PLCs, then point all PLCs to that server.

2.5 Time Zone Configuration

In CPU Properties > Time Synchronization:

  1. Set the time zone offset (e.g., UTC+01:00 for CET).
  2. Enable daylight saving time if applicable, with the correct transition rules.
  3. The PLC stores time internally as UTC and applies the offset for display and logging.
Time zone configuration:
  UTC offset: +01:00:00
  Daylight saving: Enabled
    DST start: Last Sunday in March, 02:00
    DST end:   Last Sunday in October, 03:00
    DST offset: +01:00:00

2.6 Verifying NTP Operation

In Automation Studio with an active online connection:

  1. Select the CPU in the Physical view.
  2. Go to Online > Info > Time.
  3. The dialog shows:
    • Current PLC time
    • NTP server address
    • Time difference (offset between PLC and NTP server)
    • NTP status (syncing, synchronized, error)
Expected Online > Info > Time display:

  PLC time:      2026-07-10 14:32:15.234
  NTP server:    pool.ntp.org
  Time difference: 0.002s
  Status:        Synchronized

A time difference under 100ms indicates good synchronization. Differences over 1 second suggest NTP is failing or the polling interval is too long. Differences measured in minutes indicate a configuration error (see Section 3.6).

2.7 NTP Polling Interval and Accuracy

B&R default NTP polling behavior follows the NTP specification:

ParameterDefaultTypical RangeNotes
Poll interval (minimum)64 seconds16-1024 secondsNTP protocol minpoll
Poll interval (maximum)1024 seconds128-36 hoursNTP protocol maxpoll
Expected accuracy±5-50msDepends on networkOn local LAN, expect ±5ms
Startup sync time30-120 secondsFirst successful pollPLC may use RTC until first sync

On a stable LAN with a local NTP server, expect synchronization within 30 seconds of boot. The PLC will then maintain accuracy within ±10ms indefinitely as long as NTP polls succeed.


3. NTP Troubleshooting on X20CP1584

3.1 The Silent Failure Problem

The most dangerous aspect of B&R NTP is that failures are often silent. Automation Studio may show no errors at all while the PLC clock drifts. This means you cannot rely on AS error indicators alone to detect NTP problems.

Always verify NTP status proactively using Online > Info > Time on every maintenance visit.

3.2 DNS Not Configured (Most Common Failure)

Symptoms:

  • NTP server field is populated in CPU properties
  • No errors visible in Automation Studio
  • PLC time drifts continuously
  • AR logger contains no NTP-related entries (PLC never attempted NTP because DNS resolution failed)

Diagnosis:

Step 1: Verify DNS is enabled in CPU Properties > DNS
Step 2: Verify a DNS server address is configured (not blank)
Step 3: If using DHCP, verify "Get DNS from DHCP" is ON
Step 4: If using static IP, verify DNS server is manually set
Step 5: Test from PLC: can it resolve the NTP server hostname?

Fix: Configure DNS server address. If the plant has no DNS server, use a public DNS server (8.8.8.8, 1.1.1.1) or replace the NTP hostname with a direct IP address of the NTP server.

3.3 No Default Gateway

Symptoms:

  • PLC can communicate with devices on the same subnet
  • NTP server is on a different subnet or the internet
  • NTP polls never reach the server
  • No error in AS

Diagnosis:

Step 1: Verify default gateway in CPU Properties > Ethernet
Step 2: Ping the gateway from PLC (if possible via PVI or network tools)
Step 3: If NTP server is on the same subnet, gateway may not be needed

Fix: Set the default gateway to the router address that provides access to the NTP server’s network.

3.4 Firewall Blocking NTP (UDP Port 123)

Symptoms:

  • NTP configured correctly, DNS working, gateway correct
  • PLC cannot sync time
  • AR logger may show timeout warnings

Diagnosis:

Step 1: Verify UDP port 123 is open from PLC to NTP server
Step 2: Check plant firewall rules between PLC VLAN and NTP server
Step 3: Check Windows Firewall on the NTP server (if it's a PC)
Step 4: Use network diagnostic tools:
    nmap -sU -p 123 <ntp_server_ip>
    tcpdump -i eth0 udp port 123

Fix: Open UDP port 123 in all firewalls between the PLC and the NTP server. Many industrial firewalls default to blocking all unsolicited inbound traffic; NTP responses may be blocked.

3.5 NTP Server Unreachable

Symptoms:

  • All configuration correct
  • NTP server does not respond
  • Time difference in AS shows increasing divergence

Diagnosis:

Step 1: Ping the NTP server IP from the PLC's subnet
Step 2: nslookup <ntp_server_hostname> from a PC on the same subnet
Step 3: Check if the NTP server service is running (if it's a local server)
Step 4: Check for NTP server rate limiting (pool.ntp.org limits queries)

Fix: Verify NTP server connectivity. If using pool.ntp.org and the PLC is behind a NAT with many devices, you may be rate-limited. Switch to a dedicated internal NTP server.

3.6 The 24-Minute Offset Issue

A known B&R issue where the NTP client configuration results in a time offset of exactly 24 minutes (1440 seconds). This is caused by a mismatch between the configured time zone offset and the NTP server’s interpretation of the timezone.

Root cause: The NTP protocol transmits time in UTC. The PLC applies its local timezone offset. If the timezone configuration in CPU properties is incorrect (e.g., offset is set to UTC+00:00 when it should be UTC+01:00), the displayed time will be wrong by exactly the timezone difference. A 24-minute offset specifically suggests a configuration error where seconds were interpreted differently or a legacy timezone database entry.

Diagnosis:

Step 1: Check CPU Properties > Time Synchronization > Time zone
Step 2: Compare PLC displayed time with a known reference (phone NTP-synced clock)
Step 3: Calculate the offset: is it exactly 24 minutes? Or exactly 1 hour?
Step 4: An exact-hour offset = timezone configuration error
Step 5: An exact-24-minute offset = NTP client configuration error (possibly related to
         the NTP server's timezone handling or the PLC's NTP client firmware version)

Fix:

  1. Correct the timezone configuration in CPU Properties.
  2. If the issue persists, update the PLC firmware to the latest version.
  3. If using a custom NTP server, verify the server’s timezone configuration.
  4. As a workaround, use the PLC’s manual time setting to correct the offset after NTP sync.

3.7 Checking AR Logger for NTP Warnings

The AR (Automation Runtime) logger may contain NTP-related entries even when AS shows no errors. Access the AR logger:

  1. In Automation Studio: Online > AR Logbook (or via System > Diagnostics > AR Logbook)
  2. Filter for NTP-related entries

Search for these message patterns:

AR Logger NTP-related messages:

  "NTP client: no response from server"
  "NTP client: DNS resolution failed"
  "NTP client: server not reachable"
  "Time sync: offset too large, stepping clock"
  "Time sync: offset correction applied"
  "NTP client: authentication failed"

If no NTP entries exist in the AR logger, the NTP client may not be enabled or DNS resolution failed before the NTP client could even attempt a poll.

3.8 Network Diagnostic Steps

When NTP fails, follow this diagnostic sequence from a PC on the same subnet as the PLC:

Step 1: Verify basic connectivity
  ping <PLC_IP>
  ping <DNS_SERVER_IP>
  ping <DEFAULT_GATEWAY_IP>

Step 2: Verify DNS resolution
  nslookup pool.ntp.org <DNS_SERVER_IP>
  nslookup time.windows.com <DNS_SERVER_IP>

Step 3: Verify NTP server reachability
  ping <NTP_SERVER_IP>
  nmap -sU -p 123 <NTP_SERVER_IP>

Step 4: Verify NTP server functionality
  From a Linux PC: ntpdate -q <NTP_SERVER_IP>
  From a Linux PC: chronyc tracking (if chrony is used)
  Output should show server stratum, offset, and sync status

Step 5: Capture traffic from PLC perspective
  tcpdump -i <interface> host <PLC_IP> and udp port 123 -nn
  Look for NTP request packets from the PLC and responses from the server

Step 6: Verify PLC configuration
  Connect with AS, go Online > Info > Time
  Record: PLC time, NTP server, time difference, status

4. Configuring Time Sync Without Automation Studio

When you have no access to Automation Studio (no license, no project file), time synchronization must be configured through alternative interfaces.

4.1 Via PVI (Process Visualization Interface)

PVI allows programmatic access to PLC runtime variables. Using B&R’s PVI API via the pvipy Python library (install: pip install pvipy, requires Windows + PVI Development Setup):

from pvi import *

pviConnection = Connection()
line = Line(pviConnection.root, 'LNANSL', CD='LNANSL')
device = Device(line, 'TCP', CD='/IF=TcpIp')
cpu = Cpu(device, 'CP1584', CD='/IP=192.168.100.10')

cpu.errorChanged = lambda error: print(f"Connected, error={error}")
pviConnection.start()

Important limitation: NTP configuration parameters (server address, timezone, poll interval) are project configuration parameters, not runtime variables. PVI provides access to the PLC’s variable namespace, not to its configuration metadata. Changing NTP settings requires either:

  • Automation Studio with the project loaded (preferred)
  • Editing configuration files on the CF card (see Section 4.3)
  • brsnmp for some network-related parameters (IP, gateway, DNS — see Section 4.2)

PVI CAN read/write runtime variables (process data, setpoints, flags) but CANNOT change CPU configuration properties like NTP server or timezone settings. See pvi-api.md for full PVI capabilities.

Note: The pylogix library is for Allen-Bradley ControlLogix/CompactLogix PLCs and is NOT compatible with B&R systems. For B&R, use pvipy (Python wrapper for PVI) or the OPC-UA path via asyncua.

4.2 Via SNMP (brsnmp Tool)

B&R provides an SNMP agent (brsnmp) that can be loaded as a runtime component. Once loaded:

SNMP configuration for time sync:

1. Load brsnmp component in the PLC configuration
2. Configure SNMP community string
3. Query or set time-related OIDs

B&R SNMP OID for system time (example):
  .1.3.6.1.2.1.25.1.2.0  hrSystemDate.0 (system date and time)

SNMP set example (using snmpset from net-snmp tools):
  snmpset -v2c -c private <PLC_IP> \
    .1.3.6.1.2.1.25.1.2.0 s "$(date +%Y%m%d)$(date +%H%M%S).00"

4.3 Via CF Card Configuration Files

B&R PLCs can load configuration from files on the CompactFlash/SD card:

CF card file structure for time configuration:

  /CF/System/
    ├── config.ini          (main configuration file)
    ├── dns.cfg             (DNS server configuration)
    ├── ntp.cfg             (NTP client configuration)
    └── timezone.cfg        (timezone and DST settings)

Example ntp.cfg:

[ntp]
Enabled=1
Server=pool.ntp.org
Server2=time.windows.com
PollInterval=64
MaxPollInterval=1024

Example dns.cfg:

[dns]
Enabled=1
Server1=8.8.8.8
Server2=8.8.4.4
SearchDomain=local
FromDHCP=0

To deploy: copy files to the CF card, insert into PLC, reboot. The PLC loads configuration files during startup.

4.4 Via OPC-UA

If the OPC-UA server is running on the PLC and time-related variables are exposed:

import asyncio
from asyncua import Client

async def configure_ntp():
    url = "opc.tcp://192.168.100.10:4840"
    async with Client(url=url) as client:
        ns = await client.get_namespace_index("B&R Automation")

        ntp_enabled = client.get_node(f"ns={ns};s=NTP.Enabled")
        await ntp_enabled.write_value(True)

        ntp_server = client.get_node(f"ns={ns};s=NTP.Server")
        await ntp_server.write_value("10.0.0.50")

        timezone = client.get_node(f"ns={ns};s=System.TimeZone")
        await timezone.write_value(3600)

asyncio.run(configure_ntp())

Note: OPC-UA exposure of NTP configuration variables is not default. They must be explicitly mapped in the OPC-UA configuration of the B&R project.

4.5 Via FTP

B&R PLCs expose an FTP server (default port 21) that provides access to the file system:

FTP access to PLC configuration:

  ftp 192.168.100.10
  Username: admin (default)
  Password: <configured password>

  Remote directories:
    /CF/                    - CompactFlash card contents
    /System/                - System configuration files
    /User/                  - User files and logs
    /Log/                   - AR logbook files

  To modify time configuration:
    1. Download current configuration files
    2. Edit locally (dns.cfg, ntp.cfg, etc.)
    3. Upload modified files back
    4. Reboot PLC for changes to take effect

Warning: FTP access may be disabled on security-hardened PLCs. Check if FTP service is running by attempting connection. Modifying configuration files via FTP and rebooting is an unsupported method; use it only when no other option is available.


5. B&R as NTP Server

5.1 Configuration

The X20CP1584 can act as an NTP server, providing time to other devices on the network. This is useful when you have no external NTP server and need to synchronize HMIs, drives, secondary PLCs, or data loggers.

Configuration in Automation Studio:

  1. CPU Properties > Time Synchronization
  2. Enable “NTP server” checkbox
  3. Configure the PLC’s own time source (NTP client pointing to an external server, or manual time)
  4. Optionally restrict which subnets can query the NTP server
CPU as NTP server configuration:

  Time Synchronization:
    ☑ Use NTP client
      NTP server: 10.0.0.1 (corporate NTP server)
    ☑ Act as NTP server
      Allowed clients: 192.168.100.0/24

5.2 Use Cases

Use CaseDevices SyncedConfiguration
HMI time syncPower Panel, other HMIsPoint HMI NTP client to PLC IP
Secondary PLC syncOther X20 CPUsPoint secondary PLC NTP client to primary PLC IP
Drive time syncACOPOS drivesConfigure drive NTP client to PLC IP
Data logger syncPC-based loggers, SCADAPoint logger NTP client to PLC IP
Multi-VLAN time distributionDevices on different subnetsRouter must forward UDP 123 to PLC

5.3 Verification

To verify the PLC NTP server is functioning:

From a Linux PC on the same network:

  ntpdate -q <PLC_IP>

Expected output:
  server 192.168.100.10, stratum 3, offset 0.003123, delay 0.02567
  10 Jul 14:32:15 ntpdate[1234]: adjust time server 192.168.100.10
            offset 0.003123 sec

If the query fails:
  ntpdate: no server suitable for synchronization found
  -> Check UDP 123 is not blocked
  -> Verify NTP server is enabled in CPU properties
  -> Check PLC has a valid time source (its own NTP client must be synced)

5.4 Limitations

  • The PLC NTP server is only as accurate as its own time source. If the PLC’s NTP client loses sync, all downstream devices will also drift.
  • B&R NTP server is based on the SNTP (Simple NTP) protocol. It is suitable for industrial synchronization (±10-50ms) but not for applications requiring sub-millisecond accuracy.
  • A PLC reboot will cause the NTP server to be unavailable for 30-120 seconds until the PLC re-establishes its own NTP sync.

6. Multi-CPU Time Synchronization

POWERLINK is B&R’s real-time Ethernet protocol. It supports time synchronization between CPUs connected on the same POWERLINK network.

Configuration:

  1. In the POWERLINK configuration of the primary CPU, enable time synchronization.
  2. Secondary CPUs configured as POWERLINK nodes will automatically synchronize to the primary CPU’s time.
  3. The primary CPU must have a valid time source (NTP client or manual setting).
POWERLINK time sync hierarchy:

  Primary CPU (X20CP1584)
    ├── NTP client → external NTP server
    └── POWERLINK master
          ├── Secondary CPU 1 (CN node)
          ├── Secondary CPU 2 (CN node)
          └── Secondary CPU 3 (CN node)

  Time flows: NTP Server → Primary CPU → POWERLINK → Secondary CPUs

POWERLINK time synchronization accuracy: ±1-10 microseconds (depending on network topology and configuration). This is significantly better than NTP over Ethernet and is suitable for coordinating motion and process events across CPUs.

6.2 Time Sync via Ethernet

For CPUs on a standard Ethernet network (not POWERLINK), time synchronization relies on NTP:

  1. All CPUs configure their NTP client to point to the same NTP server.
  2. Alternatively, one CPU acts as NTP server (see Section 5).
  3. All CPUs independently sync to the NTP server.
Ethernet NTP sync:

  Corporate NTP Server (10.0.0.1)
    ├── PLC-01 (192.168.100.10) - NTP client
    ├── PLC-02 (192.168.100.11) - NTP client
    ├── PLC-03 (192.168.100.12) - NTP client
    └── PLC-04 (192.168.100.13) - NTP client

  Each CPU syncs independently. Maximum inter-CPU time difference
  depends on NTP polling and network conditions: typically ±50-200ms

6.3 PTP (IEEE 1588 / IEEE 802.1AS) — Precision Time Protocol

PTP support on B&R controllers is limited to newer hardware and TSN (Time-Sensitive Networking) configurations.

Controller SeriesPTP SupportProtocolAccuracy
X20CP1584 / CP1484Not supportedNTP only (±5-50ms)
X20CP3xxx / CP4xxxNot supported (standard Ethernet)NTP only
APC2200 (with TSN)SupportedIEEE 802.1AS (gPTP)Sub-microsecond
APC910 / newer APCSupported (with TSN switch)IEEE 802.1AS (gPTP)Sub-microsecond
X20CP3xxx (TSN variants)Supported (with TSN hardware)IEEE 802.1ASSub-microsecond

For the CP1584 specifically: PTP is not available. The CP1584’s Ethernet interface and AR 4.x runtime do not implement IEEE 1588. Time synchronization is limited to NTP (for Ethernet) or POWERLINK internal sync (for X2X/POWERLINK bus devices). If you need sub-millisecond synchronization on a CP1584 system, use POWERLINK time sync (Section 6.1) between CPUs and accept NTP-level accuracy for non-POWERLINK devices.

B&R’s PTP implementation uses IEEE 802.1AS (gPTP), which is part of the TSN protocol suite. It requires a TSN-capable Ethernet switch as the PTP grandmaster. The switch distributes time to all connected controllers with sub-microsecond accuracy.

Source: B&R OPC UA over TSN whitepaper — “IEEE 802.1AS (gPTP) allows very accurate time synchronization. B&R controllers make it possible to synchronize.” Source: https://www.br-automation.com/en-gb/downloads/

6.4 NTP Authentication

The CP1584 NTP client does not support NTP authentication (symmetric key or autokey).

FeatureSupport on CP1584Notes
NTP symmetric key authenticationNot supportedAR 4.x NTP client has no authentication options
NTP autokey (public key)Not supportedNot implemented
NTP broadcast/multicast modeNot supportedClient mode only
NTP client restriction (allowed peers)Not supportedAny configured server is trusted

Security implication: Any device on the same network that responds to NTP queries on port 123 could potentially spoof time to the CP1584. For hardened environments, place the CP1584 on an isolated VLAN with only the designated NTP server reachable (see cybersecurity-hardening.md for VLAN segmentation procedures).

On newer AR 6.x controllers, B&R has added NTP authentication support — but this does not help the CP1584.

6.5 DHCP Option 42 (NTP Server Auto-Configuration)

The CP1584 does not support DHCP Option 42.

Many industrial networks use DHCP Option 42 (NTP Servers) to automatically configure NTP server addresses for devices. The CP1584’s DHCP client does not request or process Option 42 — NTP server addresses must be manually configured in the CPU properties.

DHCP OptionStandard PurposeCP1584 Support
Option 1 (Subnet Mask)Network maskSupported
Option 3 (Router)Default gatewaySupported
Option 6 (DNS Server)DNS serversSupported
Option 42 (NTP Servers)NTP server addressesNot supported
Option 51 (Lease Time)DHCP lease durationSupported

If your plant uses DHCP with Option 42, you will still need to manually configure the NTP server address in each CP1584. Consider using the B&R CPU as NTP server (Section 5) and configuring only the CP1584 with a static NTP server address while other devices use DHCP Option 42.

6.6 B&R Time Synchronization Function Blocks

B&R provides function blocks for explicit time management in user programs:

Function BlockLibraryPurpose
TcGetTimeTechUnitsGet current PLC timestamp
TcGetTimeUTCTechUnitsGet current PLC time in UTC
TcSetTimeTechUnitsSet PLC time programmatically
mcTimeSyncMpComCheck time synchronization status
MpTimeMpBaseManaged time synchronization component
PROGRAM _CYCLIC
  VAR
    fbGetTime   : TcGetTime;
    fbCheckSync : mcTimeSync;
    currentTime : DT;
    syncStatus  : BOOL;
  END_VAR

  fbGetTime(enable := TRUE);
  IF fbGetTime.ready THEN
    currentTime := fbGetTime.time;
  END_IF

  fbCheckSync(enable := TRUE);
  syncStatus := fbCheckSync.isSynchronized;
END_PROGRAM

6.7 Cross-Referencing Timestamps Across CPUs

When analyzing events across multiple CPUs:

  1. Record each CPU’s last known NTP sync status and time difference.
  2. Apply a time correction factor based on the measured offset for each CPU.
  3. Sort all events by corrected timestamp to build a unified timeline.
  4. Account for network latency between the event occurrence and the log entry timestamp.
Cross-CPU timeline correction example:

  CPU-01: time_diff = +0.005s (ahead)
  CPU-02: time_diff = -0.012s (behind)
  CPU-03: time_diff = +0.003s (ahead)

  Event on CPU-01 at 14:32:15.234 → corrected: 14:32:15.229
  Event on CPU-02 at 14:32:15.198 → corrected: 14:32:15.210
  Event on CPU-03 at 14:32:15.321 → corrected: 14:32:15.318

  Corrected order: CPU-01 (14:32:15.229), CPU-03 (14:32:15.318), CPU-02 (14:32:15.210)
  → CPU-02 event actually happened first after correction

6.8 Strategies When CPUs Drift Apart

When NTP fails and CPUs drift apart:

  1. Detect drift: Periodically log each CPU’s time relative to a reference. A simple method is to have all CPUs write their current time to a shared variable on a common data connection, then compare.

  2. Controlled resync: When NTP is restored, do not let the PLC step its clock forward by a large amount during production. Use the NTP slew mode (gradual adjustment) instead of step mode to avoid triggering time-based events out of sequence.

  3. Fallback strategy: If external NTP is unreliable, designate one CPU as the master time source and have others sync to it via POWERLINK or by setting time programmatically.


7. Timestamp Analysis for Diagnostics

7.1 AR Logbook Timestamps

The AR logbook is the primary diagnostic log on a B&R PLC. Every entry carries a timestamp:

AR logbook entry format:

  Timestamp (DT format): 2026-07-10 14:32:15.234
  Log level:              WARNING
  Source:                 Network Manager
  Message:               "Connection timeout to node 5 (X20BC0083)"
  Additional data:        Node=5, Timeout=5000ms, RetryCount=3

  Raw format in exported log:
  [2026-07-10 14:32:15.234] [WARNING] [Network Manager] Connection timeout

The timestamp is the PLC’s local time at the moment the log entry was created. If the PLC clock is wrong, this timestamp is wrong. There is no embedded UTC reference or NTP offset in the log entry itself.

7.2 AR Logbook Timestamp Format

B&R uses the DATE_AND_TIME (DT) data type internally:

DT type breakdown:

  #2026-07-10:14:32:15.234

  Year:     2026
  Month:    07 (July)
  Day:      10
  Hour:     14 (24-hour format)
  Minute:   32
  Second:   15
  Millisecond: 234

  Total bytes: 8 (two 4-byte words: date + time_of_day)

When exporting AR logbook entries, timestamps may appear in different formats depending on the export method (AS web interface, FTP, PVI, OPC-UA). Always confirm the format and timezone of exported data.

7.3 Alarm Timestamp Format

Alarm timestamps in B&R are stored separately from the AR logbook. See alarm-logging.md for detailed alarm timestamp handling.

Key points:

  • Alarm timestamps use the same DT type as the AR logbook.
  • Alarm logging has its own timestamp source, which may differ from the system clock if a dedicated alarm logging component with its own time base is used.
  • The MpAlarmX component stores timestamps for alarm acknowledgment, occurrence, and disappearance.

7.4 SDM Timestamp Usage

The System Diagnostics Manager (SDM) generates diagnostic events with timestamps. See diagnostics-sdm.md for SDM-specific timestamp handling.

SDM timestamps are derived from the system clock at the moment the diagnostic event is detected. SDM events include hardware diagnostics (module insertion/removal, power supply monitoring, watchdog events) and software diagnostics (task overflow, communication errors).

POWERLINK provides two time references:

Time ReferenceResolutionUse Case
POWERLINK cycle counter1 cycle (typically 200μs or 1ms)Motion coordination, I/O timestamping
Wall clock time1ms (DT type)Logging, alarm correlation, external event correlation

The POWERLINK cycle counter increments every cycle and wraps around. It is useful for measuring intervals within a single POWERLINK cycle period (up to several hours depending on cycle time). For longer periods or correlation with external events, wall clock time is required.

Conversion between POWERLINK cycle time and wall clock time:

PROGRAM PLK_Time_Calc
  VAR
    cycleCount : LWORD;
    cycleTime  : LINT;  (* microseconds *)
    wallTime   : DT;
    startTime  : DT;
    elapsedTime: TIME;
  END_VAR

  cycleCount := PLK_GetCycleCounter();
  cycleTime  := cycleCount * 200; (* 200us per cycle for 5kHz POWERLINK *)
  elapsedTime := cycleTime / 1000; (* convert to milliseconds *)
  wallTime := startTime + elapsedTime;
END_PROGRAM

7.6 Correlating PLC Events with External Equipment

To correlate PLC timestamps with events from non-B&R equipment:

  1. Common NTP source: Ensure all devices (PLCs, drives, HMIs, PCs, third-party equipment) sync to the same NTP server. This is the most reliable approach.

  2. GPS time reference: For facilities with no reliable network NTP, a GPS-based NTP server provides time accurate to ±1μs without network dependency.

  3. Manual timestamp recording: When analyzing a specific event, record the exact time from a phone or PC (synced to NTP) at the moment the event occurs. Then search the PLC logs for entries near that time.

  4. Network packet capture: Capture network traffic with tcpdump or Wireshark using an NTP-synced capture system. The packet timestamps in the capture file are wall-clock time, and PLC-related packets can be correlated with PLC log entries.

External event correlation workflow:

  1. Motor VFD faults at 14:32:15 (verified on VFD display, time unknown)
  2. Check PLC AR logbook around 14:32:15 ± 5 minutes
  3. Found entries:
     14:32:14.891  [INFO]  Motion command completed (axis 1)
     14:32:14.902  [WARN]  Analog input 3 out of range
     14:32:15.001  [ERROR] POWERLINK node 7 comm timeout
     14:32:15.234  [WARN]  Network Manager: connection lost node 7
  4. Correlation: Analog input fault preceded VFD communication loss by 99ms
  5. Hypothesis: Power supply issue on analog input caused VFD comm failure

7.7 Building a Timeline from Multiple Sources

When reconstructing events from multiple timestamp sources:

Timeline reconstruction template:

  Time (UTC)     | Device    | Event
  --------------- | --------- | ----------------------------------------
  14:32:14.891   | PLC-01    | Motion command completed (axis 1)
  14:32:14.895   | Drive-01  | Speed setpoint received
  14:32:14.897   | Drive-01  | Current limit warning (logged in drive)
  14:32:14.902   | PLC-01    | Analog input 3 out of range
  14:32:15.001   | PLC-01    | POWERLINK node 7 comm timeout
  14:32:15.100   | HMI-01    | Communication timeout alarm displayed
  14:32:15.234   | PLC-01    | Network Manager: connection lost node 7
  14:32:16.500   | SCADA     | Data gap in historian (tag: Drive01_Speed)

  Causal chain: Analog input fault → Drive protection → POWERLINK timeout → HMI alarm → SCADA data gap

  Notes on timestamp corrections:
    PLC-01 time_diff: +0.005s → subtract 5ms from PLC timestamps
    Drive-01 time_diff: unknown (no NTP) → estimated ±500ms accuracy
    HMI-01 time_diff: +0.012s → subtract 12ms from HMI timestamps
    SCADA time_diff: synced to PC NTP → accurate within ±10ms

8. Practical Diagnostic Workflows

8.1 Diagnosing Intermittent Faults with Timestamps

Workflow for finding the root cause of intermittent faults:

Step 1: Verify time synchronization across all devices
  - Check NTP status on every PLC (Online > Info > Time)
  - Check HMI time vs PLC time
  - Check drive time vs PLC time (if accessible)
  - Record the time difference for each device

Step 2: Collect all log entries spanning the fault event
  - Export AR logbook entries for the time window (±10 minutes around fault)
  - Export alarm history for the same period
  - Export SDM diagnostic events
  - Collect drive fault logs (if accessible)
  - Collect HMI alarm history

Step 3: Apply timestamp corrections
  - Add/subtract each device's measured time difference
  - Convert all timestamps to a common timezone (UTC recommended)

Step 4: Build a unified timeline
  - Merge all events into a single sorted list
  - Add device source to each entry
  - Add severity/importance flag to each entry

Step 5: Analyze the timeline for causal patterns
  - Look for the earliest event (root cause candidate)
  - Look for cascading sequences (cause → effect → effect)
  - Look for recurring patterns across multiple fault instances

Step 6: Validate the hypothesis
  - Can the identified root cause explain all observed events?
  - Are there events that don't fit the pattern? (may indicate additional issues)
  - Can the fault be reproduced by triggering the root cause?

8.2 Post-Failure Timeline Reconstruction

After a machine stop or failure with no live monitoring available:

Post-failure reconstruction checklist:

  [ ] Record the exact time the operator reported the failure
  [ ] Check PLC AR logbook for entries ±30 minutes around reported time
  [ ] Check alarm history for the same period
  [ ] Check SDM diagnostics for hardware events
  [ ] Export all logs with timestamps
  [ ] Verify PLC time was correct (compare with external reference)
  [ ] If PLC time was wrong, calculate correction offset
  [ ] Apply correction to all timestamps
  [ ] Build timeline in chronological order
  [ ] Identify the first anomalous event
  [ ] Cross-reference with maintenance records
  [ ] Cross-reference with power monitoring data (if available)
  [ ] Cross-reference with upstream/downstream equipment events

8.3 Correlating I/O Errors with Power Events

A common diagnostic scenario: I/O modules report errors that correlate with power events.

Correlation method:

  1. In the PLC program, log power supply voltage (if monitored) with timestamps
     Example: Log 24V supply voltage every 100ms to a cyclic data logger

  2. In SDM diagnostics, check for power-related events:
     - "Power supply voltage below threshold"
     - "Power supply brownout detected"
     - "Module power-on reset"

  3. Cross-reference I/O error timestamps with power event timestamps

  Example finding:
    14:30:45.100  SDM: 24V supply voltage dropped to 19.2V
    14:30:45.102  SDM: Module X20DI9371 (node 3) reset
    14:30:45.234  AR:  Digital input channel 4 signal loss
    14:30:45.500  AR:  POWERLINK node 3 communication error
    14:30:46.000  SDM: 24V supply voltage restored to 23.8V
    14:30:46.234  AR:  POWERLINK node 3 communication restored

  Conclusion: Momentary power dip caused I/O module reset and communication loss

8.4 Cross-Device Event Correlation Workflow

Cross-device correlation workflow:

  1. Create a device inventory with time sync status
     | Device        | IP            | NTP Server    | Time Diff  |
     |--------------|---------------|---------------|------------|
     | PLC-01       | 192.168.100.10| pool.ntp.org  | +0.005s    |
     | PLC-02       | 192.168.100.11| pool.ntp.org  | -0.012s    |
     | Drive-01     | 192.168.100.20| PLC-01        | +0.008s    |
     | HMI-01       | 192.168.100.30| pool.ntp.org  | +0.015s    |
     | SCADA-PC     | 192.168.100.50| time.win.com  | +0.002s    |

  2. Export logs from all devices for the analysis period

  3. Normalize all timestamps to UTC
     - Subtract each device's time_diff from its timestamps
     - Convert from local time to UTC using known timezone offset

  4. Merge into a single chronological list

  5. Apply filtering to reduce noise
     - Exclude low-priority events
     - Exclude expected periodic events
     - Focus on events in the failure window

  6. Analyze the filtered timeline for patterns

8.5 Time Drift Detection and Correction

Implementing ongoing time drift monitoring:

PROGRAM TimeDriftMonitor
  VAR
    fbGetTime : TcGetTime;
    driftLog  : ARRAY[1..100] OF DT;
    driftIdx  : UINT;
    refTime   : DT;
    maxDrift  : TIME := T#5S;
    driftAlarm: BOOL;
  END_VAR

  fbGetTime(enable := TRUE);
  IF fbGetTime.ready THEN
    IF fbGetTime.time - refTime > maxDrift THEN
      driftAlarm := TRUE;
    END_IF

    driftIdx := driftIdx + 1;
    IF driftIdx > 100 THEN
      driftIdx := 1;
    END_IF;
    driftLog[driftIdx] := fbGetTime.time;
  END_IF
END_PROGRAM

For automated drift detection across a network:

Scheduled drift check script (run from a Linux server):

  #!/bin/bash
  for plc in 192.168.100.10 192.168.100.11 192.168.100.12; do
    plc_time=$(snmpget -v2c -c public $plc .1.3.6.1.2.1.25.1.2.0 2>/dev/null)
    echo "$(date -Iseconds) PLC=$plc SNMP_TIME=$plc_time" >> /var/log/plc_drift.log
  done

9. Cross-References

DocumentRelevance to Time Synchronization
alarm-logging.mdAlarm timestamp format, storage, and retrieval via MpAlarmX component
diagnostics-sdm.mdSDM event timestamps, hardware diagnostic event timing
system-variables.mdSystem variables for reading/writing PLC time, NTP status variables
network-architecture.mdNetwork topology for NTP server placement, VLAN routing for time sync
plc-to-plc.mdPOWERLINK time synchronization between CPUs, data exchange timing
opcua.mdOPC-UA timestamp handling, server/client time correlation
pvi-api.mdPVI-based programmatic time configuration and monitoring
ftp-web-interface.mdAccessing log files and configuration files via FTP for timestamp analysis
execution-model.mdTask scheduling, cycle time measurement, and its relationship to wall-clock time

10. Key Findings

  1. NTP failures on B&R PLCs are silent by default. Automation Studio shows no errors when NTP is not working. You must proactively check Online > Info > Time on every maintenance visit. A PLC that has not synced NTP for months may be drifting by minutes or hours.

  2. DNS is the most common NTP failure point. The NTP client requires DNS to resolve server hostnames. If DNS is not configured in CPU properties, NTP polls never leave the PLC. This is the first thing to check when NTP is not working.

  3. Default gateway is required for external NTP servers. Without a gateway configured, the PLC cannot route NTP packets to servers outside its own subnet. For internal NTP servers on the same subnet, the gateway is not required.

  4. Use a local NTP server for industrial reliability. External NTP servers (pool.ntp.org) introduce dependency on internet connectivity and plant firewall configuration. A dedicated NTP server on the same VLAN eliminates these failure points.

  5. The 24-minute offset is a configuration error, not a hardware fault. If the PLC time is off by exactly 24 minutes, check the timezone configuration in CPU Properties. The NTP protocol works in UTC; incorrect timezone offsets produce exact time differences.

  6. Check the AR logger, not just Automation Studio, for NTP issues. The AR logbook may contain NTP-related warnings that are not surfaced as errors in the AS IDE. Search for “NTP” and “Time sync” patterns in the AR logbook.

  7. Cross-device time correlation requires documented time differences. When building diagnostic timelines from multiple devices, record each device’s NTP time difference at the time of the event. Apply corrections to timestamps before merging timelines. Without corrections, events may appear out of order.

  8. POWERLINK provides microsecond-accurate time sync between CPUs. For multi-CPU systems on POWERLINK, time synchronization is orders of magnitude more accurate than NTP over Ethernet. Use POWERLINK time sync for motion coordination and tight inter-CPU event correlation.

  9. Time-based diagnostics are only as reliable as the clocks. Before any event correlation or root cause analysis, verify that all involved clocks are synchronized. A single device with a wrong clock can invalidate an entire diagnostic timeline. This is the first step in any diagnostic workflow on an undocumented machine.

  10. Implement a time drift monitoring routine. Add a simple programmatic check in your PLC code that flags when the time difference from the NTP server exceeds a threshold. This catches silent NTP failures that would otherwise go undetected until the next manual check.


Key Findings

  1. Time sync is the foundation of all diagnostic correlation. Without trustworthy timestamps across PLC, drives, IO, and HMIs, it is impossible to determine event causality or perform root cause analysis on intermittent faults.

  2. The 24-minute offset is a timezone configuration error. If the PLC time is off by exactly 24 minutes, the timezone setting in CPU Properties is incorrect. NTP operates in UTC; timezone conversion errors produce exact time differences.

  3. NTP over the plant network requires firewall configuration. NTP uses UDP port 123 outbound. Ensure plant firewalls allow this and that DNS resolution works for the configured NTP server.

  4. POWERLINK provides microsecond-accurate time sync between CPUs. For multi-CPU systems, POWERLINK time synchronization is orders of magnitude more accurate than NTP over Ethernet. Use it for motion coordination and tight inter-CPU event correlation.

  5. Silent NTP failures go undetected without monitoring. If the NTP server becomes unreachable, the PLC continues running with its local clock — which drifts. Implement a time drift monitoring routine in your PLC code to flag NTP failures.

  6. Cross-device time correlation requires recording time offsets. When building diagnostic timelines from multiple devices, document each device’s NTP time difference at the time of the event and apply corrections before merging timelines.


11. Sources

  • B&R Automation Studio documentation: CPU Properties > Time Synchronization configuration
  • B&R Automation Runtime (AR) manual: NTP client configuration and behavior
  • B&R POWERLINK specification: Time synchronization over POWERLINK networks
  • B&R PVI (Programmable Vision Interface) reference: Programmatic PLC configuration access
  • B&R SDM (System Diagnostics Manager) documentation: Diagnostic event timestamps
  • B&R OPC-UA implementation: Timestamp handling in OPC-UA server/client
  • NTP protocol specification (RFC 5905): Network Time Protocol version 4
  • NTP pool project documentation: pool.ntp.org usage guidelines and rate limiting
  • Industrial network security practices: Firewall rules for NTP (UDP port 123)
  • Field experience: 24-minute NTP offset issue on X20CP1584, firmware-dependent configuration behavior
  • B&R Knowledge Base: Silent NTP failure behavior, AR logger NTP warning messages
  • Community reports: NTP configuration requirements (DNS, gateway, firewall) on B&R X20 systems

B&R Temperature and Hardware Monitoring

Target audience: Automation engineers maintaining B&R X20CP1584 PLCs from defunct OEMs with zero documentation. Scope: Temperature sensing, voltage monitoring, cabinet monitoring modules, SNMP, RTInfo, and thermal remediation.


1. Overview

Why Hardware Monitoring Matters for Aging CP1584 Systems

The X20CP1584 (Intel Atom 600MHz, fanless, released ~2010) is now well past its intended service life in many installations. When these systems start misbehaving – watchdogs tripping, intermittent communication losses, task overruns, mysterious SERVICE-mode transitions – the root cause is almost never a software bug. It is thermal degradation.

Electrolytic capacitors on the CPU module lose capacitance with age and heat. Solder joints develop microcracks under thermal cycling. Flash memory endurance is consumed faster at elevated temperatures. The CPU die itself can throttle or trigger protective shutdown. Without baseline data, you cannot distinguish a temperature-induced intermittent fault from a logic error.

How to tell thermal degradation from software bugs:

SymptomLikely ThermalLikely Software
Intermittent, time-of-day dependentYes (ambient cycle)No
Worsens in summerYesNo
Persists across program versionsYesNo
Correlates with cabinet door being open/closedYesNo
Reproducible on commandNoYes
Appears after IO module additionYes (load/heat)Possible
Random task overrun errorsYes (throttling)Possible

The diagnostic strategy is simple: instrument the temperature sensors that are already built into the hardware, establish a baseline, and trend the data. Everything documented here requires either the built-in IO mapping or a single external module costing under $200.


2. Built-in Temperature Sensors

Two Sensors, Two Readings

Every X20 CPU, including the X20CP1584, contains two independent temperature sensors:

  1. CPU die temperature – measures the actual silicon junction temperature. This is the critical value. Available as mpCPUcore0Temp in the IO mapping (type LREAL, unit °C).

  2. Housing/PCB temperature – a sensor mounted inside the CPU housing near the PCB. Reads lower than the die. Available as mpCPUpcbTemp in the IO mapping (type LREAL, unit °C).

Both sensors are automatically updated by the firmware. No configuration is required to enable them – you only need to add the variables to your IO mapping.

Temperature Thresholds

StateCPU Die TempHousing TempAction
Normal (25°C ambient)40-50°C35-45°CNone
Normal (50°C cabinet)~70°C~60°CTrending recommended
Warning~89°C (recommended)~75°CLog, alert, investigate
Critical110°C (hard shutdown per Intel/B&R datasheet)95°C (board overtemperature shutdown)CPU enters reset state automatically; error 9204 logged
Pre-shutdown105°C (estimated AR SERVICE mode threshold)~85°CCPU may enter SERVICE mode before hard shutdown

Ambient-to-CPU Temperature Relationship

The relationship is approximately linear. For every 10°C rise in ambient temperature, both the CPU die and housing temperature rise by approximately 10°C.

Practical baseline table (horizontal mounting, unblocked airflow):

Ambient TemperatureExpected CPU DieExpected Housing
20°C35-45°C30-40°C
25°C40-50°C35-45°C
30°C50-60°C40-50°C
40°C60-70°C50-60°C
50°C70-80°C60-70°C
60°C80-90°C70-80°C

One community report showed a CPU die reading of 70°C at 25°C ambient with the unit lying flat on a desk – a clear demonstration that mounting orientation matters even in open air.

Mounting Orientation Impact

OrientationMax Ambient RatingNotes
Horizontal-25°C to +60°CPreferred. Natural convection flows upward across PCB.
Vertical-25°C to +50°C10°C lower rating. Convection path is restricted.

Practical rule: If your cabinet regularly exceeds 45°C ambient, verify the CPU is horizontally mounted. Vertical mounting at 50°C cabinet ambient puts the die temperature at or above the warning threshold.


3. Reading Temperature via Software

Method 1: IO Mapping in Automation Studio

  1. In Automation Studio, double-click the CPU node in the Physical View.
  2. Navigate to Properties → IO Mapping → Temperature.
  3. Add the following variables to your task’s IO mapping:
Variable Name      Type    Description
mpCPUcore0Temp     LREAL   CPU die temperature in °C
mpCPUpcbTemp       LREAL   Housing/PCB temperature in °C

These variables are updated automatically every cycle. No function block instantiation is needed.

Method 2: Without Automation Studio (PVI)

If you do not have the original AS project, you can read temperature via PVI (Process Visualization Interface) using the CPU’s internal variable names:

import brplc
from brplc.pvi import PviConnection

cpu = PviConnection(
    device_type="X20CP1584",
    ip_address="192.168.1.10",
    user="operator",
    password=""
)

die_temp = cpu.read_variable("mpCPUcore0Temp")
housing_temp = cpu.read_variable("mpCPUpcbTemp")

print(f"CPU Die: {die_temp:.1f}°C")
print(f"Housing: {housing_temp:.1f}°C")

Method 3: OPC-UA

B&R OPC-UA server exposes system variables. If the CPU is running an OPC-UA server (mapp ServerUA or similar), temperature variables are accessible:

from opcua import Client

url = "opc.tcp://192.168.1.10:4840"
client = Client(url)
client.connect()

die_temp_ns = client.get_node("ns=2;s=gApp.mpCPUcore0Temp")
housing_temp_ns = client.get_node("ns=2;s=gApp.mpCPUpcbTemp")

print(f"CPU Die: {die_temp_ns.get_value():.1f}°C")
print(f"Housing: {housing_temp_ns.get_value():.1f}°C")

client.disconnect()

ST Code: Temperature Monitoring with Alarm Thresholds

FUNCTION_BLOCK FB_CpuTempMonitor
VAR_INPUT
    rDieTemp        : LREAL;
    rHousingTemp    : LREAL;
    rWarnThreshold  : LREAL := 89.0;
    rCritThreshold  : LREAL := 105.0;
    tCycleTime      : TIME := T#5S;
END_VAR
VAR_OUTPUT
    bWarning        : BOOL;
    bCritical       : BOOL;
    rPeakDieTemp    : LREAL;
    rPeakHousingTemp: LREAL;
    rAvgDieTemp     : LREAL;
    eStatus         : eTempStatus;
    dtWarningFirst  : DT;
    dtCriticalFirst : DT;
END_VAR
VAR
    rSumDieTemp     : LREAL := 0.0;
    nSampleCount    : DINT := 0;
    tmrSample       : TON;
    fbLogger        : FB_CsvLogger;
    arLogData       : ARRAY[0..3] OF LREAL;
END_VAR

TYPE eTempStatus :
(
    STATUS_NORMAL,
    STATUS_ELEVATED,
    STATUS_WARNING,
    STATUS_CRITICAL
);
END_TYPE

tmrSample(IN := TRUE, PT := tCycleTime);

IF tmrSample.Q THEN
    tmrSample(IN := FALSE);

    IF rDieTemp > rPeakDieTemp THEN
        rPeakDieTemp := rDieTemp;
    END_IF;
    IF rHousingTemp > rPeakHousingTemp THEN
        rPeakHousingTemp := rHousingTemp;
    END_IF;

    rSumDieTemp := rSumDieTemp + rDieTemp;
    nSampleCount := nSampleCount + 1;
    rAvgDieTemp := rSumDieTemp / nSampleCount;

    IF rDieTemp >= rCritThreshold THEN
        bCritical := TRUE;
        bWarning := TRUE;
        IF dtCriticalFirst = DT#1970-01-01-00:00:00 THEN
            dtCriticalFirst := CURRENT_DATETIME;
        END_IF;
        eStatus := STATUS_CRITICAL;
    ELSIF rDieTemp >= rWarnThreshold THEN
        bWarning := TRUE;
        IF dtWarningFirst = DT#1970-01-01-00:00:00 THEN
            dtWarningFirst := CURRENT_DATETIME;
        END_IF;
        eStatus := STATUS_WARNING;
    ELSIF rDieTemp >= (rWarnThreshold - 15.0) THEN
        eStatus := STATUS_ELEVATED;
    ELSE
        eStatus := STATUS_NORMAL;
    END_IF;

    arLogData[0] := rDieTemp;
    arLogData[1] := rHousingTemp;
    arLogData[2] := LREAL#nSampleCount;
    arLogData[3] := rAvgDieTemp;
    fbLogger(
        sFileName := '/CF1/temp_log.csv',
        arValues := arLogData,
        bExecute := TRUE
    );
END_IF;

4. Voltage Monitoring

24V Supply Requirements

The X20CP1584 requires a 24V DC supply with the following tolerance:

ParameterValue
Nominal voltage24V DC
Minimum (continuous)20.4V (-15%)
Maximum (continuous)28.8V (+20%)
Voltage dip toleranceBrief dips below 20.4V tolerated by internal capacitors
Hold-up time (typical)10-20ms at full load

Undervoltage Detection Behavior

When the 24V supply drops below the internal threshold (approximately 18-19V):

  1. The CPU detects the brownout condition.
  2. All outputs are de-energized (safe state).
  3. A power-fail event is logged in the system log.
  4. On power recovery, the CPU performs a warm start.
  5. If brownout is brief (< hold-up time), the CPU may ride through without resetting.

Known Issue: Capacitor Degradation

Community reports indicate that aging electrolytic capacitors on X20CP1584 modules can cause:

  • Reduced hold-up time during voltage dips
  • Unexplained warm restarts
  • Erratic behavior when multiple IO modules draw current simultaneously

Diagnostic: Monitor the 24V rail at the CPU terminals with an oscilloscope during startup (inrush current) and during IO module switching events. Voltage dips below 20V for more than a few milliseconds indicate capacitor degradation or undersized power supply.

External Voltage Monitoring

If you need to monitor the 24V supply externally (the CPU does not expose an internal voltage variable in the standard IO mapping), use an X20 analog input or an X20CMR cabinet monitoring module:

FUNCTION_BLOCK FB_VoltageMonitor
VAR_INPUT
    r24V_Raw       : LREAL;
    rUndervoltage  : LREAL := 20.4;
    rOvervoltage   : LREAL := 28.8;
    rNominal       : LREAL := 24.0;
END_VAR
VAR_OUTPUT
    bUnderVoltage  : BOOL;
    bOverVoltage   : BOOL;
    rVoltageDevPct : LREAL;
    eVoltStatus    : eVoltageStatus;
END_VAR

rVoltageDevPct := ABS((r24V_Raw - rNominal) / rNominal) * 100.0;

IF r24V_Raw < rUndervoltage THEN
    eVoltStatus := eVoltStatus.UNDERVOLTAGE;
    bUnderVoltage := TRUE;
ELSIF r24V_Raw > rOvervoltage THEN
    eVoltStatus := eVoltStatus.OVERVOLTAGE;
    bOverVoltage := TRUE;
ELSE
    eVoltStatus := eVoltStatus.NORMAL;
END_IF;

Power Supply Sizing

For X20CP1584 with typical IO configuration:

ComponentCurrent Draw (typical)
X20CP1584 CPU0.7A
X20DI9371 (16ch DI)0.04A
X20DO9322 (16ch DO)0.12A (worst case)
X20AI4632 (4ch AI)0.08A
X20AO4622 (4ch AO)0.12A
X20TB12 (terminal block)0.01A

Total typical: 1.0-1.5A at 24V. Use a power supply rated for at least 2x the expected load for headroom and to handle inrush currents. Minimum recommended: 5A / 120W industrial supply with hold-up capability.


5. Fan Monitoring

X20CP1584 is Fanless

The X20CP1584 is a fully fanless design. It relies entirely on passive convection cooling through the CPU housing fins. There is no fan status to monitor, no fan to replace, and no fan-related failure mode.

X20 CPUs With Active Cooling

ModelCoolingNotes
X20CP1584Passive/fanlessIntel Atom 600MHz, low TDP (~3-5W)
X20CP1484Passive/fanlessSimilar class
X20CP3484Active/fanIntel Celeron, higher TDP
X20CP3486Active/fanIntel Core i-class, higher TDP
X20CP4284Passive/fanlessARM-based
X20CP0484Passive/fanlessEntry level

For fan-equipped CPUs, fan status is typically available via:

mpCPUfanStatus  BOOL    TRUE = running, FALSE = fan failure/service needed
mpCPUfanSpeed   USINT   Fan speed percentage (0-100)

Fan Monitoring ST Code (for Fan-Equipped CPUs)

FUNCTION_BLOCK FB_FanMonitor
VAR_INPUT
    bFanStatus    : BOOL;
    usFanSpeed    : USINT;
    usMinSpeed    : USINT := 20;
END_VAR
VAR_OUTPUT
    bFanFault     : BOOL;
    bFanSlow      : BOOL;
    usSpeedPct    : USINT;
END_VAR

usSpeedPct := usFanSpeed;
bFanFault := NOT bFanStatus;
bFanSlow := (bFanStatus = TRUE) AND (usFanSpeed < usMinSpeed);

6. External Cabinet Monitoring Modules

Module Comparison

ModelTemperatureHumidityPT1000Digital I/OFlashOperating HoursBlackout Mode
X20CMR0101x internal1x internalNoNo512KBYesNo
X20CMR0111x internalNo2x inputs4 DI + 4 DO512KBYesYes
X20CMR111ExtendedExtended2x inputs4 DI + 4 DO512KBYesYes
X20CMR1001x internalNoNo2 DI512KBYesNo

X20CMR010 – Cabinet Monitoring (Temperature + Humidity)

This module provides a built-in temperature sensor and a built-in humidity sensor inside the X20 station housing. It also provides:

  • Production data logging (512KB internal flash)
  • Operating hours counter
  • Event logging

IO Mapping variables (added in Automation Studio under the X20CMR010 node):

Variable Name              Type     Description
cmr010Temperature          LREAL    Cabinet temperature in °C
cmr010Humidity             LREAL    Relative humidity in %RH
cmr010OperatingHours       ULINT    Total operating hours
cmr010ProductionCounter    UDINT    Production piece count (user-configured trigger)
cmr010EventLogEntries      UDINT    Number of events in log

X20CMR011 – Cabinet Monitoring with PT1000

This module adds two PT1000 resistance thermometer inputs for remote temperature sensing, plus digital I/O and a blackout detection mode:

IO Mapping variables:

Variable Name              Type     Description
cmr011CabinetTemp          LREAL    Internal cabinet temperature °C
cmr011PT1000_1             LREAL    PT1000 channel 1 temperature °C
cmr011PT1000_2             LREAL    PT1000 channel 2 temperature °C
cmr011Humidity             LREAL    Relative humidity %RH (if available)
cmr011OperatingHours       ULINT    Total operating hours
cmr011BlackoutDetected     BOOL     TRUE if blackout condition detected
cmr011DI_1..4              BOOL     Digital input channels
cmr011DO_1..4              BOOL     Digital output channels

Blackout mode: When enabled, the module can detect a complete power blackout and log the timestamp. Combined with the operating hours counter, this provides an energy audit trail.

Using Cabinet Monitoring Without the Original Project

  1. Connect the X20CMR010 or X20CMR011 to your X20 station (any free X20 bus slot).
  2. The CPU will detect the module on power-up. If no IO mapping exists for it, the CPU will log an unknown module error but will not fault.
  3. To configure without the full project:
    • Use Automation Studio’s “Device Scan” to detect the module.
    • Add the module to the physical configuration.
    • Map the IO variables listed above to your task.
    • Download only the hardware configuration if possible (partial download).

ST Code: Cabinet Environment Monitor with X20CMR010

FUNCTION_BLOCK FB_CabinetMonitor
VAR_INPUT
    rCabinetTemp    : LREAL;
    rHumidity       : LREAL;
    rTempWarnHigh   : LREAL := 50.0;
    rTempWarnLow    : LREAL := 5.0;
    rTempCritHigh   : LREAL := 60.0;
    rHumidHigh       : LREAL := 85.0;
    rHumidCrit       : LREAL := 95.0;
END_VAR
VAR_OUTPUT
    bTempHighWarn   : BOOL;
    bTempLowWarn    : BOOL;
    bTempHighCrit   : BOOL;
    bHumidWarn      : BOOL;
    bHumidCrit      : BOOL;
    eEnvStatus      : eCabinetEnvStatus;
END_VAR

bTempHighWarn := (rCabinetTemp >= rTempWarnHigh) AND (rCabinetTemp < rTempCritHigh);
bTempLowWarn := rCabinetTemp <= rTempWarnLow;
bTempHighCrit := rCabinetTemp >= rTempCritHigh;
bHumidWarn := (rHumidity >= rHumidHigh) AND (rHumidity < rHumidCrit);
bHumidCrit := rHumidity >= rHumidCrit;

IF bTempHighCrit OR bHumidCrit THEN
    eEnvStatus := eCabinetEnvStatus.CRITICAL;
ELSIF bTempHighWarn OR bTempLowWarn OR bHumidWarn THEN
    eEnvStatus := eCabinetEnvStatus.WARNING;
ELSE
    eEnvStatus := eCabinetEnvStatus.NORMAL;
END_IF;

7. System Health via SNMP

B&R SNMP Agent

B&R Automation Runtime includes an SNMP agent that can be enabled without Automation Studio by modifying configuration files on the CF card or via the web interface.

Configuration file: /CF1/System/SNMP/snmp.cfg (or via System > SNMP in the Automation Runtime web interface at http://<cpu-ip>).

brsnmp Tool

brsnmp (https://github.com/hilch/brsnmp) is a C++ Windows command-line tool that executes PVI-SNMP commands for B&R PLCs. It requires B&R PVI Development Setup (PVI 4.x or 6.5.2+) to be installed on the Windows machine. Download the pre-built binary from the GitHub releases page.

Basic usage:

brsnmp --list                        # List MAC addresses of all reachable B&R PLCs
brsnmp --filter=X20CP1584 --details  # Get full properties (AR version, IP, serial, etc.)
brsnmp --filter=$LAST --ipAddress=192.168.1.50  # Set IP address (requires BOOT state)

Available SNMP OIDs

OID (approximate)DescriptionType
1.3.6.1.4.1.2706.1.1.4.1CPU model identificationSTRING
1.3.6.1.4.1.2706.1.1.4.2CPU firmware versionSTRING
1.3.6.1.4.1.2706.1.1.4.10CPU die temperatureINTEGER
1.3.6.1.4.1.2706.1.1.4.11Housing temperatureINTEGER
1.3.6.1.4.1.2706.1.1.4.20CPU load percentageINTEGER
1.3.6.1.4.1.2706.1.1.4.30Free memory (KB)INTEGER
1.3.6.1.4.1.2706.1.1.4.50Operating stateINTEGER
1.3.6.1.4.1.2706.1.1.4.60Power supply statusINTEGER

Note: Exact OIDs vary by firmware version. Use brsnmp --walk to discover available OIDs for your specific configuration.

Integration with External Monitoring

Zabbix template snippet:

UserParameter=br.cpu.temp.die,python3 /opt/brsnmp/brsnmp.py --host {$BR_IP} --community {$BR_COMMUNITY} --get cpu.temperature.die
UserParameter=br.cpu.temp.pcb,python3 /opt/brsnmp/brsnmp.py --host {$BR_IP} --community {$BR_COMMUNITY} --get cpu.temperature.pcb
UserParameter=br.cpu.load,python3 /opt/brsnmp/brsnmp.py --host {$BR_IP} --community {$BR_COMMUNITY} --get cpu.load
UserParameter=br.mem.free,python3 /opt/brsnmp/brsnmp.py --host {$BR_IP} --community {$BR_COMMUNITY} --get memory.free

Nagios check script (bash):

#!/bin/bash
CPU_IP="192.168.1.10"
COMMUNITY="public"
WARN=89
CRIT=105

DIE_TEMP=$(python3 /opt/brsnmp/brsnmp.py --host "$CPU_IP" --community "$COMMUNITY" --get cpu.temperature.die 2>/dev/null | awk '{print $NF}')

if [ -z "$DIE_TEMP" ]; then
    echo "UNKNOWN - Cannot read CPU temperature"
    exit 3
fi

if [ "$DIE_TEMP" -ge "$CRIT" ]; then
    echo "CRITICAL - CPU die temperature ${DIE_TEMP}°C >= ${CRIT}°C"
    exit 2
elif [ "$DIE_TEMP" -ge "$WARN" ]; then
    echo "WARNING - CPU die temperature ${DIE_TEMP}°C >= ${WARN}°C"
    exit 1
else
    echo "OK - CPU die temperature ${DIE_TEMP}°C"
    exit 0
fi

Prometheus exporter (Python):

from prometheus_client import start_http_server, Gauge
from prometheus_client.core import GaugeMetricFamily, REGISTRY
import time
import subprocess

CPU_TEMP_DIE = Gauge("br_cpu_temp_die_celsius", "B&R CPU die temperature")
CPU_TEMP_PCB = Gauge("br_cpu_temp_pcb_celsius", "B&R PCB temperature")
CPU_LOAD = Gauge("br_cpu_load_percent", "B&R CPU load percentage")
MEM_FREE = Gauge("br_mem_free_kb", "B&R free memory in KB")

def collect_br_metrics():
    try:
        result = subprocess.run(
            ["python3", "/opt/brsnmp/brsnmp.py",
             "--host", "192.168.1.10",
             "--community", "public",
             "--walk", "system"],
            capture_output=True, text=True
        )
        for line in result.stdout.strip().split("\n"):
            if "cpu.temperature.die" in line:
                CPU_TEMP_DIE.set(float(line.split()[-1]))
            elif "cpu.temperature.pcb" in line:
                CPU_TEMP_PCB.set(float(line.split()[-1]))
            elif "cpu.load" in line:
                CPU_LOAD.set(float(line.split()[-1]))
            elif "memory.free" in line:
                MEM_FREE.set(float(line.split()[-1]))
    except Exception:
        pass

if __name__ == "__main__":
    start_http_server(9101)
    while True:
        collect_br_metrics()
        time.sleep(15)

Enabling SNMP Without Automation Studio

  1. Access the CPU web interface at http://<cpu-ip>.
  2. Navigate to System > Settings > SNMP.
  3. Enable SNMP agent.
  4. Set community string (change from default “public”).
  5. Set allowed SNMP managers (IP addresses).
  6. Click Apply and reboot.

8. System Health via System Variables

RTInfo Function Block

RTInfo is a built-in B&R function block that provides comprehensive system runtime information. It is available in the Runtime library.

Instantiation and key variables:

VAR
    fbRTInfo    : RTInfo;
    stRTInfo    : RTInfoDataType;
END_VAR

fbRTInfo(
    enable := TRUE,
    pData  := ADR(stRTInfo)
);
VariableTypeDescription
stRTInfo.cpuLoadUDINTCPU load in 0.01% (5000 = 50.0%)
stRTInfo.memTotalUDINTTotal memory in KB
stRTInfo.memFreeUDINTFree memory in KB
stRTInfo.cycleTimeMinUDINTMinimum cycle time in microseconds
stRTInfo.cycleTimeMaxUDINTMaximum cycle time in microseconds
stRTInfo.cycleTimeAvgUDINTAverage cycle time in microseconds
stRTInfo.taskCountUDINTNumber of active tasks
stRTInfo.uptimeULINTSystem uptime in seconds
stRTInfo.osVersionSTRINGAutomation Runtime version

LogIdleShow Function Block

LogIdleShow provides access to the system event log, including temperature warnings, power events, and watchdog triggers:

VAR
    fbLogIdle  : LogIdleShow;
    sMessage   : STRING(255);
    bNewEntry  : BOOL;
END_VAR

fbLogIdle(enable := TRUE);

IF fbLogIdle.newEntry THEN
    sMessage := fbLogIdle.message;
    bNewEntry := TRUE;
END_IF;

Comprehensive System Health ST Code

FUNCTION_BLOCK FB_SystemHealth
VAR_INPUT
    fbRTInfoInst    : RTInfo;
    stRTInfoData    : RTInfoDataType;
    rCpuTemp        : LREAL;
END_VAR
VAR_OUTPUT
    rCpuLoadPct     : LREAL;
    rCycleTimeMaxUs : LREAL;
    rMemFreeKB      : LREAL;
    rMemUsagePct    : LREAL;
    bCpuOverloaded  : BOOL;
    bMemLow         : BOOL;
    bCycleTimeHigh  : BOOL;
    bTempWarning    : BOOL;
    eHealthStatus   : eSystemHealth;
END_VAR
VAR
    rCpuLoadMax     : LREAL := 80.0;
    rMemLowPct      : LREAL := 15.0;
    rCycleMaxUs     : LREAL := 0.0;
END_VAR

fbRTInfoInst(enable := TRUE, pData := ADR(stRTInfoData));

rCpuLoadPct := TO_LREAL(stRTInfoData.cpuLoad) / 100.0;
rCycleTimeMaxUs := TO_LREAL(stRTInfoData.cycleTimeMax);
rMemFreeKB := TO_LREAL(stRTInfoData.memFree);
rMemUsagePct := 100.0 - (rMemFreeKB / TO_LREAL(stRTInfoData.memTotal) * 100.0);

bCpuOverloaded := rCpuLoadPct >= rCpuLoadMax;
bMemLow := rMemFreeKB <= (TO_LREAL(stRTInfoData.memTotal) * rMemLowPct / 100.0);
bCycleTimeHigh := rCycleTimeMaxUs > rCycleMaxUs;
bTempWarning := rCpuTemp >= 89.0;

IF bCpuOverloaded OR bMemLow OR bTempWarning THEN
    eHealthStatus := eSystemHealth.DEGRADED;
ELSE
    eHealthStatus := eSystemHealth.HEALTHY;
END_IF;

Reading System Variables via PVI/OPC-UA

Variable PathDescriptionType
gApp.mpCPUcore0TempCPU die temperatureLREAL
gApp.mpCPUpcbTempPCB temperatureLREAL
gApp.rtInfo.cpuLoadCPU load (via RTInfo)UDINT
gApp.rtInfo.memFreeFree memory (via RTInfo)UDINT
gApp.rtInfo.cycleTimeMaxMax cycle time (via RTInfo)UDINT

9. Proactive Health Monitoring Strategy

Establish a baseline over the first 7-14 days of monitoring:

  1. Log CPU die temperature every 5 minutes to CSV on the CF card.
  2. Record ambient cabinet temperature simultaneously (X20CMR010 or separate sensor).
  3. Document the mounting orientation, cabinet ventilation status, and IO module configuration.
  4. Calculate the delta between ambient and die temperature for your specific installation.
  5. Set warning thresholds at baseline_peak + 15°C.

CSV Logging to CF Card

FUNCTION_BLOCK FB_CsvLogger
VAR_INPUT
    sFileName   : STRING;
    arValues    : ARRAY[0..9] OF LREAL;
    bExecute    : BOOL;
END_VAR
VAR
    hFile       : file STRING;
    sLine       : STRING;
    i           : DINT;
    dtNow       : DT;
    sTimestamp  : STRING;
END_VAR

IF bExecute THEN
    bExecute := FALSE;
    dtNow := CURRENT_DATETIME;
    sTimestamp := DT_TO_STRING(dtNow);

    sLine := sTimestamp;
    FOR i := 0 TO 9 THEN
        IF arValues[i] <> 0.0 THEN
            sLine := CONCAT(sLine, ',');
            sLine := CONCAT(sLine, LREAL_TO_STRING(arValues[i], 1));
        END_IF;
    END_FOR;

    FileOpen(hFile, sFileName, FILE_MODE_APPEND);
    FileWrite(hFile, sLine);
    FileClose(hFile);
END_IF;

Anomaly Detection Approaches

MethodImplementationDetection Target
Static thresholdSimple comparisonSudden spikes
Rate-of-change(temp[n] - temp[n-1]) / intervalFast heating (fan failure, blocked vent)
Rolling average deviationtemp - rolling_avg(temp, N)Gradual drift (dust buildup, capacitor aging)
Daily pattern deviationCompare current temp to same time yesterdaySeasonal change, HVAC failure

ST Code: Rate-of-Change Temperature Detection

FUNCTION_BLOCK FB_TempRateDetector
VAR_INPUT
    rCurrentTemp  : LREAL;
    tSampleTime   : TIME := T#1M;
    rMaxRate      : LREAL := 5.0;
END_VAR
VAR_OUTPUT
    bRapidRise    : BOOL;
    rRatePerMin   : LREAL;
END_VAR
VAR
    rPreviousTemp : LREAL;
    tmrSample     : TON;
END_VAR

tmrSample(IN := TRUE, PT := tSampleTime);

IF tmrSample.Q THEN
    tmrSample(IN := FALSE);
    rRatePerMin := (rCurrentTemp - rPreviousTemp) / 1.0;
    bRapidRise := rRatePerMin > rMaxRate;
    rPreviousTemp := rCurrentTemp;
END_IF;

Email/SNMP Alert Setup

For email alerts without mapp Mail (which requires licensing), use SNMP traps to an external NMS (Network Management System) that handles email dispatch:

snmptrap -v 2c -c trap_community 192.168.1.100 '' \
  .1.3.6.1.4.1.2706.1.99.1 \
  s "BR-CP1584" \
  s "CPU temperature critical" \
  i ${CPU_TEMP_DIE}

IIoT Dashboard Integration

For Grafana, Node-RED, or similar dashboards, expose CPU health data via OPC-UA or MQTT. See iiot-retrofit.md for the full IIoT retrofit architecture including:

  • OPC-UA to MQTT bridge configuration
  • Grafana dashboard templates for PLC health
  • InfluxDB retention policies for long-term trending
  • Edge gateway deployment for air-gapped networks

10. Thermal Management Remediation

Cabinet Ventilation Assessment

Quick assessment checklist:

CheckPass Criteria
Cabinet ventilation fans operatingAll fans spinning, no unusual noise
Air filters cleanNo visible dust accumulation, replace annually
Cabinet temperature within spec<45°C at CPU location
Hot spots identifiedUse IR thermometer at CPU, PS, VFD locations
Airflow path unobstructedNo cables blocking top/bottom vents
Cabinet door sealedNo gaps allowing hot air recirculation
External heat sourcesNo direct sunlight, furnaces, or VFDs adjacent

Fan/Ventilation Upgrade Procedure

  1. Measure cabinet internal temperature with the door closed over 24 hours.
  2. If peak exceeds 45°C, calculate required airflow: Q = P / (1.1 * dT), where P = total heat load in watts, dT = allowable temperature rise above ambient.
  3. Select cabinet fans rated for the calculated CFM, with IP54 or better rating.
  4. Install fans to create positive pressure (push air in at bottom, exhaust at top).
  5. Verify after installation that cabinet temperature drops below 40°C at the CPU location.

Heat Sink Inspection

The X20CP1584 housing itself acts as the heat sink. Inspect for:

  • Dust accumulation between housing fins (clean with compressed air, cabinet de-energized).
  • Physical damage to fins (bent fins reduce surface area).
  • Thermal interface material degradation (not user-serviceable on sealed units).

Cable Management

  • Route all data cables to the sides of the cabinet, not in front of the CPU.
  • Bundle power cables away from communication cables.
  • Leave minimum 50mm clearance above and below the CPU module.
  • Do not place IO modules that generate heat (relay outputs, analog outputs) directly adjacent to the CPU if alternatives exist.

Relocating Heat-Generating Equipment

If the cabinet contains VFDs, power supplies, or transformers, ensure they are mounted in the lower portion of the cabinet (heat rises) with a physical barrier separating them from the PLC section.

Emergency Cooling Measures

SituationImmediate Action
CPU >95°C, production ongoingOpen cabinet door, direct fan at CPU
CPU in SERVICE mode from thermalDo not restart until ambient drops below 30°C, open cabinet
Repeated thermal faultsShut down non-essential IO, reduce cycle rate, reduce IO module activity

11. Cross-References

DocumentRelevance
system-variables.mdComplete list of B&R system variables accessible via IO mapping
custom-diagnostic-tools.mdBuilding diagnostic utilities for undocumented systems
pvi-api.mdPVI API reference for reading variables without AS project
opcua.mdOPC-UA server setup for data export
iiot-retrofit.mdIIoT dashboard integration for health monitoring
cp1584-hardware-ref.mdDetailed CP1584 hardware specifications and pinouts
io-card-hardware.mdX20 IO module current draws and thermal characteristics
execution-model.mdHow cycle time relates to CPU load and thermal behavior

12. Key Findings

  1. Two sensors exist on every X20 CPU. Read both mpCPUcore0Temp and mpCPUpcbTemp via IO mapping. No extra hardware needed. This is the single most important action you can take today.

  2. 110°C triggers hard shutdown (reset state). Per the official B&R X20CP1584 datasheet (V1.56), the CPU is switched to reset state at 110°C processor temperature or 95°C board temperature. Error 9204 (“PLC restart triggered by the PLC CPU’s temperature monitoring”) is logged. B&R may enter SERVICE mode at a lower temperature (estimated ~105°C) before the hard shutdown. If your CPU is entering SERVICE mode or resetting unexpectedly, check the die temperature first.

  3. At 25°C ambient with proper mounting, expect 40-50°C die temperature. A reading of 70°C at 25°C ambient indicates a mounting or airflow problem, not a defective sensor.

  4. Horizontal mounting gives you 10°C more headroom. The maximum ambient rating is 60°C horizontal vs 50°C vertical. Verify mounting orientation before adding modules.

  5. Set warning threshold at 89°C. This provides 16°C of margin before the 105°C critical point, enough time for automated alerts and manual intervention.

  6. The 1:10°C rule is your baseline calculator. For every 10°C increase in ambient, expect approximately 10°C increase in CPU die temperature. Use this to set ambient-aware thresholds.

  7. X20CP1584 is fanless – do not add fans directly to it. Improve cabinet-level ventilation instead. The CPU housing fins are the heat sink; keep them clean.

  8. Aging capacitors reduce hold-up time. If you experience unexplained warm restarts, especially during IO module switching, suspect capacitor degradation on the CPU module.

  9. Use X20CMR010 for cabinet ambient monitoring. It costs under $200, requires zero programming (just IO mapping), and gives you humidity data that prevents condensation-related failures.

  10. brsnmp (github.com/hilch/brsnmp) provides free SNMP integration. No B&R licensing required. Works with Zabbix, Nagios, Prometheus, or any SNMP-compatible NMS.


Key Findings

  1. CPU critical temperature is 110°C, board critical temperature is 95°C. The CP1584 has two independent temperature sensors — the Intel Atom CPU die (critical at 110°C) and the PCB (critical at 95°C). The board sensor triggers first in most thermal scenarios.

  2. The CP1584 is fanless and depends on cabinet ventilation. There is no internal fan. All cooling is passive through the CPU housing fins. Cabinet-level airflow is the only thermal management mechanism.

  3. brsnmp provides free hardware monitoring without licensing. The community brsnmp tool reads CPU temperature, memory usage, task cycle times, and IO status via SNMP — no B&R mapp or OPC-UA licenses required.

  4. Set warning thresholds at 89°C CPU / 75°C board. These provide adequate margin before critical thresholds and allow time for automated alerts and manual intervention.

  5. Aging capacitors reduce power supply hold-up time. Unexplained warm restarts, especially during IO module switching, can indicate capacitor degradation on the CPU module’s power supply circuit.

  6. Use X20CMR010 for cabinet ambient monitoring. This low-cost IO module provides ambient temperature and humidity readings with zero programming, preventing condensation-related failures.


13. Sources

  • B&R Automation X20 System Hardware Manual (document WD102, various editions)
  • B&R Automation Runtime Cyclic I/O Mapping Reference (B&R Help Center, help.br-automation.com)
  • B&R X20CMR010/X20CMR011 Product Documentation (B&R Online Catalog)
  • B&R RTInfo Function Block Reference (mapp Technology documentation)
  • B&R Automation Runtime SNMP Configuration Guide (B&R Knowledge Base)
  • hilch/brsnmp repository: https://github.com/hilch/brsnmp
  • B&R Community Forum: X20 CPU temperature discussions (automation-talk.bbr.automation.com)
  • Intel Atom N450/N455 Thermal Design Guide (Intel document 322960)
  • IEC 61131-3 Programming Standard (IEC, various editions)
  • OPC UA Specification (OPC Foundation, ua.opcfoundation.org)
  • Practical user reports on X20CP1584 temperature readings in various mounting configurations (community-sourced)
  • X20 Operating Conditions specifications: B&R X20 Hardware Catalog technical data tables
  • B&R Power Supply Sizing Guidelines (application note AN141)

Building a Diagnostic Workstation for B&R PLC Systems

A properly equipped diagnostic workstation is the foundation for maintaining, troubleshooting, and reverse-engineering B&R CP1584 machines that have zero OEM documentation. This document specifies a complete hardware and software setup — including protocol analyzers, logic analyzers, oscilloscopes, CAN sniffers, POWERLINK sniffers, and software tools — along with a systematic diagnostic workflow checklist. The goal is to enable a single automation engineer to diagnose any problem on a legacy B&R system. Cross-references: physical-layer-sniffing.md for oscilloscope/logic analyzer techniques, cp1584-forensics.md for information extraction without project files, and first-60-minutes.md for the emergency recovery playbook.

1. Overview

1.1 The Diagnostic Workstation Concept

A diagnostic workstation is a self-contained hardware and software platform purpose-built for interrogating, monitoring, and troubleshooting B&R Automation CP1584 PLC systems that were deployed by OEMs no longer in business. Unlike ad-hoc troubleshooting where you scramble for cables, adapters, and software each time a machine goes down, a prepared workstation lets you walk up to any unknown CP1584 panel, connect in under five minutes, and begin systematic data extraction.

The core idea is separation of concerns: your diagnostic workstation is isolated from production networks, carries every adapter and tool you might need, and stores a library of captured configurations, firmware images, and protocol traces that accumulate value over time. Each new machine you diagnose adds to the knowledge base. Without a workstation, each engagement starts from zero.

1.2 Why Dedicated Tools Beat Ad-Hoc Troubleshooting

ProblemAd-Hoc ApproachWorkstation Approach
Network discoveryGuess IPs, unplug production devicesDedicated NIC, preconfigured subnet scanner
Protocol captureInstall Wireshark, find plugins, configurePOWERLINK profile loaded, capture filters ready
CAN diagnosticsBorrow adapter from another projectPCAN-USB in bag, PCAN-View configured
CF card workPull card, find reader, find imaging softwareCF slot or USB reader, dd/win32diskimager ready
Serial consoleHunt for RS232 adapter, find terminal appFDI cable in case, PuTTY profile saved
DocumentationHandwritten notes, lost in weeksStructured templates, version-controlled in repo

1.3 Cost Justification for a One-Man Automation Team

A fully equipped diagnostic workstation costs between $3,500 and $8,000 depending on how many optional items you include. Compare this to a single service call for an unknown machine: 8 hours at $150/hour is $1,200, and without the right tools you may need two or three visits. The workstation pays for itself after 3-4 unknown-machine engagements. Beyond payback, the accumulated protocol traces and configuration backups become an irreplaceable asset that no amount of on-site time can recreate.

Budget tiers:

TierCost RangeCoverage
Minimal$1,500-2,500Laptop + Ethernet + Wireshark + AS eval + serial adapter + multimeter
Standard$3,000-5,000Above + oscilloscope + CAN adapter + logic analyzer + PVI tools
Full$6,000-8,000Above + all optional items + portable case + spares

2. Workstation Hardware – Essential Equipment

2.1 Laptop/PC Requirements

Automation Studio (AS) is the primary constraint. AS runs exclusively on Windows (no Linux, no macOS native). B&R officially supports Windows 10 and Windows 11; Windows 7 reached end-of-support in AS 4.5+. Virtual machines work but add latency and complicate driver installation for network adapters and CAN hardware.

Minimum Specifications

ComponentMinimumRationale
CPUIntel Core i5-8250U or equivalentAS compiles, downloads, and cross-references large projects
RAM8 GBAS alone consumes 2-3 GB; add Wireshark + browser and you are at 6 GB
Storage50 GB free on SSDAS installation is 15-20 GB; CF card images are 2-8 GB each
OSWindows 10 64-bit (21H2+)AS 4.5+ requires 64-bit OS
Ethernet1x Gigabit RJ45PLC connection; must be separate from Wireshark capture NIC if possible
USB3x USB 3.0 portsCAN adapter, logic analyzer, serial adapter simultaneously
Display1920x1080 minimumAS UI requires horizontal space for multiple panels
ComponentRecommendedRationale
CPUIntel Core i7-11800H or i7-1370PFaster compile times; handles VM + AS simultaneously
RAM16 GBComfortable headroom for AS + Wireshark + OPC-UA client + browser
Storage512 GB NVMe SSDFast CF card imaging; room for 50+ card images and protocol captures
Ethernet2x Gigabit RJ45 (Intel I210 or I225)One port for PLC connection, one for Wireshark capture
USB1x USB-C with PD + 3x USB-AFlexibility for modern adapters
Display15.6“ 1920x1080 IPS or 17.3“Larger screen reduces window management overhead
ModelApprox. CostNotes
Lenovo ThinkPad T14 Gen 4 (i7, 16GB, 512GB)$1,200-1,600Intel I219-V NIC, excellent Linux compatibility for dual-boot
Dell Latitude 5540 (i7, 16GB, 512GB)$1,100-1,500Good port selection, Intel I225-V NIC
Panasonic Toughbook 55 (semi-rugged)$2,500-3,500For harsh environments; costs more but survives drops

These models were current as of mid-2026. For newer purchases, prioritize: Intel I210 or I225-V NIC, minimum 16 GB RAM, Windows 11 64-bit, and at least two USB 3.0 ports.

Automation Studio Version Strategy

B&R ties Automation Studio versions to Automation Runtime (AR) versions. A CP1584 may run AR 4.x. You need AS compatibility:

Target AR VersionRequired AS VersionNotes
AR 4.10-4.14AS 4.10+Current generation
AR 4.70-4.90AS 4.7-4.9Common on CP1584 units from 2018-2022
AR 4.50-4.66AS 4.5-4.6Older CP1584 deployments
AR 4.10-4.40AS 4.1-4.4Legacy; may need older AS installation

Strategy: Install the newest AS version you can license. It has backward compatibility to open older projects. If you encounter a project that requires an older AS version, install that version in a VM. Maintain at least two AS versions on the workstation.

Virtual Machine Considerations

If you need to run an older AS version or want a Linux side for Wireshark/Sigrok/SocketCAN:

  • VMware Workstation Player (free for non-commercial) or VirtualBox (free)
  • Allocate 4 CPU cores, 8 GB RAM, 80 GB disk to the VM
  • Pass through USB devices (CAN adapter, logic analyzer) to the VM
  • Network bridging for PLC access from VM
  • Snapshot the VM after AS installation so you can revert cleanly

Hard Drive Imaging Strategy for CF Card Work

CF cards in B&R systems use a custom partition layout. You will need to:

  • Read CF cards with industrial-grade readers (not cheap camera readers)
  • Create full binary images with dd, Win32 Disk Imager, or Clonezilla
  • Store images with metadata: machine ID, date, firmware version, AR version
  • Maintain a library of known-good images for common configurations
  • Write images back to replacement CF cards for recovery

Recommended CF card reader: Transcend TS-RDF8K (USB 3.0, supports CF, SD, microSD) or a dedicated PCMCIA/CF adapter for direct slot access.


2.2 Network Tools

Dedicated Ethernet NIC for PLC Connection

The Intel I210 and I225-V are the gold standard for industrial Ethernet work. They have reliable driver support, work with Wireshark in promiscuous mode, and handle the precise timing required for POWERLINK analysis.

AdapterInterfaceCostNotes
Intel I219-V (integrated on most business laptops)RJ45IncludedAdequate for basic PLC connection
StarTech USB3.0 to Gigabit Ethernet (ST3300GU3)USB 3.0$35Good backup; uses ASIX or Realtek chipset
Intel I210-T1 (PCIe or USB3 enclosure)RJ45$40-70Best choice for Wireshark capture NIC
TP-Link USB 3.0 to Gigabit Ethernet (UE300)USB 3.0$20Budget option; Realtek RTL8153 chipset

For POWERLINK sniffing, you need a NIC that supports promiscuous mode reliably. Intel chipsets are the safest bet. Realtek chipsets sometimes drop packets under high POWERLINK traffic loads.

Network Switch Requirements

FeatureRequirementReason
Speed100 Mbps minimumPOWERLINK operates at 100 Mbps; Gigabit switches must auto-negotiate correctly
Ports5-8 ports unmanaged or 8-16 managedEnough for PLC, workstation, and tap points
MirroringPort mirroring (managed switch)Essential for Wireshark POWERLINK capture without inline tap
PowerPoE optionalNot needed for PLC connection but useful for IP cameras

Recommended switch: Netgear GS105E (5-port, managed, $45) or Cisco SG250-08 (8-port, fully managed, $150). The managed switch with port mirroring is strongly recommended for POWERLINK diagnostics.

Ethernet Cables and Adapters

ItemSpecCostQty
Cat5e patch cables (assorted lengths)1m, 3m, 5m, 10m$3-8 each8
Cat5e crossover cableMDI-X crossover$52
RJ45 coupler (female-female)Cat5e rated$24
USB-C to Ethernet adapterGigabit$15-251
Ethernet loopback plugRJ45$51

2.3 Oscilloscope

Why an Oscilloscope for PLC Diagnostics

An oscilloscope is indispensable for diagnosing analog signal problems (0-10V, 4-20mA sensors), verifying encoder signals (A/B quadrature), checking POWERLINK physical layer integrity, analyzing CAN bus signal quality, and debugging X2X bus timing issues. Without one, you are guessing at electrical problems.

ModelChannelsBandwidthSample RateCostNotes
Rigol DS1054Z4100 MHz1 GSa/s$400-600Best value; hackable to DS1104Z; LAN + USB
Siglent SDS1104X-E4100 MHz1 GSa/s$450-650Similar to Rigol; 16 digital channels optional
Rigol DS1054Z Plus4100 MHz1 GSa/s$500-700Newer firmware; better UI
Keysight DSOX1102G2100 MHz1 GSa/s$650-9002-channel; Keysight quality; LAN
Rigol DS1204Z-E4200 MHz1 GSa/s$700-900Higher bandwidth for fast edge analysis

The Rigol DS1054Z is the consensus recommendation for automation diagnostics. Four channels let you monitor two differential signals simultaneously (e.g., CAN-H and CAN-L plus a trigger signal). The 100 MHz bandwidth covers all signals you will encounter on a B&R system.

High-End Option

For teams that need deeper analysis (power electronics, high-frequency EMC, motor drive waveforms):

ModelChannelsBandwidthCostNotes
Keysight DSOX3014T4200 MHz$3,500-5,000Touchscreen, protocol decode, built-in LAN
Tektronix MDO344 analog + 16 digital200 MHz$5,000-8,000Mixed signal; integrated spectrum analyzer

Probe Requirements

Probe TypeSpecificationCostUse Case
10x passive probe100 MHz, 10 MOhmIncluded with scopeGeneral purpose signal measurement
Differential probe100 MHz, CAT III$200-400CAN bus (CAN-H vs CAN-L), X2X differential signals
Current probeAC/DC clamp, 100A$150-300Motor current, power supply draw
BNC to alligator clip adapterGeneric$5Quick connections to terminal blocks

A differential probe is the single most important accessory beyond the included passive probes. It lets you safely measure CAN-H and CAN-L relative to each other without ground-reference problems that plague single-ended measurements on differential buses.

Oscilloscope Use Cases for B&R Diagnostics

  1. POWERLINK physical layer: Verify 100BASE-TX signal quality at the PLC RJ45 port. Look for jitter, amplitude droop, and retransmissions.
  2. CAN bus signal integrity: Check CAN-H and CAN-L differential voltage (should be 1.5-2.5V differential in dominant state). Identify reflections from improper termination.
  3. Analog sensor verification: Confirm 4-20mA loop current, 0-10V sensor output, and identify noise sources.
  4. Encoder signal analysis: Verify A/B quadrature timing, index pulse, and count accuracy.
  5. X2X bus timing: Measure clock, data, and enable signal relationships on the X2X flat cable bus.
  6. Power supply ripple: Check 24V supply stability, measure ripple under load.

2.4 Logic Analyzer

Why a Logic Analyzer

Logic analyzers capture digital signals with high channel count and precise timing. For B&R diagnostics, the primary use case is X2X protocol analysis (8-16 digital lines) and SPI/I2C bus debugging on IO modules. They complement oscilloscopes: the scope gives you analog detail on a few channels, the logic analyzer gives you digital timing on many channels.

ModelChannelsSample RateMax VoltageCostNotes
Saleae Logic 88100 MSa/s5V$500Excellent software; protocol decode library
Saleae Logic Pro 1616500 MSa/s5V$1,50016 channels essential for X2X analysis
Sigrok/PulseView + generic 8CH LA824 MSa/s5V$10-30Budget option; open source software
Sigrok/PulseView + DreamSourceLab DSLogic16400 MSa/s5V$100-200Open hardware + software; good value

Channel Count Requirements

ProtocolMinimum ChannelsRecommended Channels
X2X (B&R proprietary)8 (data + clock + frame)16 (full bus decode)
SPI4 (MOSI, MISO, SCLK, CS)4
I2C2 (SDA, SCL)2 (+ additional CS lines)
UART1 (TX or RX)2 (TX + RX)
CAN (digital)1 (CAN-H or CAN-L)2 (CAN-H + CAN-L)
Parallel IO816+

For X2X analysis, 16 channels is strongly recommended. The X2X bus uses a flat cable with up to 16 data lines plus clock and frame signals. With only 8 channels you cannot capture the full bus transaction.

Protocol Decoding Support

ProtocolSaleae SoftwareSigrok/PulseView
SPIYesYes
I2CYesYes
UART/RS232YesYes
CANYes (with CAN analyzer input)Yes (via GPIO)
1-WireYesYes
Custom/asyncYes (async analyzer)Yes

For X2X protocol, neither Saleae nor Sigrok has a built-in decoder. You will need to define a custom protocol or export raw captures and decode with Python. See x2x-protocol.md for X2X frame format details.

Use Cases

  1. X2X bus sniffer: Connect to the flat cable header on a B&R IO module, capture bus traffic, decode frame structure.
  2. SPI flash reading: Read configuration data from SPI flash chips on IO modules or interface boards.
  3. Digital IO timing: Verify sensor response times, output switching delays, and watchdog timeout behavior.
  4. Custom protocol reverse engineering: Capture undocumented serial protocols between PLC and proprietary peripherals.

2.5 CAN Bus Tools

Why CAN Tools

B&R systems use CANopen extensively through modules like the IF2772 (CANopen interface module). Many OEM machines also have CAN buses for auxiliary devices (drives, sensors, HMIs). Without a CAN adapter, you are blind to this communication layer.

AdapterInterfaceChannelsCostSoftware
PEAK PCAN-USBUSB 2.01$150-200PCAN-View (free), PCAN-Basic API
PEAK PCAN-USB FDUSB 2.01 CAN-FD$300-400Same as above + CAN-FD support
PEAK PCAN-USB Pro FDUSB 2.02 CAN-FD$500-600Dual channel for gateway sniffing
Kvaser Leaf Light HS v2USB1$300-350Kvaser CANlib
Kvaser Memorator Pro 5xHSUSB5$1,500+Logging + real-time

The PEAK PCAN-USB is the recommended starting point. It is affordable, well-supported on Windows, and PCAN-View provides immediate CAN bus monitoring without additional software cost.

Professional CAN Software

SoftwareCostPlatformNotes
PCAN-ViewFree with PEAK adapterWindowsBasic TX/RX, trace, signal decode
CANalyzer (Vector)$3,000-8,000WindowsIndustry standard; database import, scripting
CANoe (Vector)$5,000-15,000WindowsFull simulation + analysis; overkill for most diagnostics
CANtrace (CSS Electronics)$200-500WindowsMid-range; good trace analysis

For diagnostic work, PCAN-View is usually sufficient. If you need to simulate CAN nodes or build automated test sequences, CANalyzer becomes justified.

Linux Alternative: SocketCAN

For Linux-based workstations or Raspberry Pi field tools:

sudo apt install can-utils
sudo ip link set can0 up type can bitrate 500000
candump can0
cansend can0 123#1122334455667788
canplayer -I can0_log

PEAK PCAN adapters have Linux kernel support (peak-linux-driver). Kvaser also provides Linux drivers.

CAN Physical Layer Components

ItemSpecificationCostQty
CAN DB9 to DB9 cable2m, 120-ohm terminated$152
DB9 T-connector with termination120-ohm$104
DB9 to open-wire adapterScrew terminals$84
120-ohm terminating resistorDIP or solder$26
CAN-H/CAN-L breakout boardIndicator LEDs$52

Ethernet POWERLINK (EPL) is B&R’s real-time Ethernet protocol used for communication between CP1584 PLCs, IO modules, drives, and HMIs. The protocol runs on standard Ethernet hardware but uses a managed cycle. Without sniffing capability, you cannot diagnose communication errors, timing problems, or identify the nodes on the network.

Wireshark is the primary tool for POWERLINK capture. The POWERLINK dissector plugin is maintained by the openPOWERLINK community.

Setup procedure:

  1. Install Wireshark 3.x or 4.x (latest stable)
  2. Download the openPOWERLINK Wireshark dissector from the openPOWERLINK project on SourceForge or GitHub
  3. Place the dissector DLL (on Windows: powerlink.dll) in the Wireshark plugins directory:
    • C:\Program Files\Wireshark\plugins\4.x\ (adjust for your version)
  4. Restart Wireshark
  5. Verify: open Edit > Preferences > Protocols, search for “POWERLINK”

The dissector decodes:

  • Start of Cycle (SoC) frames
  • Poll Request / Poll Response pairs
  • Node-to-node communication
  • ASnd (asynchronous send) frames
  • Error frames and timeout indicators

Capture Hardware Requirements

POWERLINK operates at 100 Mbps with precise timing. Reliable capture requires:

  • A dedicated Ethernet NIC not used for any other traffic
  • Promiscuous mode support
  • No offloading features (disable checksum offload, TCP segmentation offload)
  • A managed switch with port mirroring OR a network tap
MethodEquipmentProsCons
Port mirroringManaged switch ($45-150)Non-invasive, no packet lossSome switches modify timestamps or reorder packets
Network tapEthernet tap ($30-80)Guaranteed no modificationRequires inline placement; extra cables
Promiscuous on same NICSingle NICNo extra hardwareMisses traffic while workstation sends; no full-duplex capture
Dual NIC (one capture, one control)Two NICs or USB-EthernetFull-duplex captureMore hardware; driver complexity

Recommended approach: managed switch with port mirroring. Mirror the PLC port to the capture NIC. This is non-invasive and captures all traffic including broadcasts.

NIC Configuration for Capture

On the capture NIC, disable all offloading features to prevent packet manipulation:

Windows (via Device Manager > Advanced):

  • Disable “Checksum Offload”
  • Disable “Large Send Offload”
  • Disable “TCP Checksum Offload”
  • Disable “UDP Checksum Offload”
  • Disable “Interrupt Moderation”

Linux (via ethtool):

sudo ethtool -K eth0 rx off tx off gso off gro off tso off
sudo ethtool -C eth0 rx-usecs 0 rx-frames 0

See powerlink-internals.md for POWERLINK frame structure details.


2.7 Serial Communication Tools

Why Serial Tools

B&R PLCs have serial ports (RS232 on the CP1584 front panel, RS485 on some IO modules) used for Modbus communication, printer output, legacy device connections, and sometimes the system console. Many OEM machines use serial protocols that are undocumented.

RS232/RS485 USB Adapters

AdapterChipsetInterfaceCostNotes
FTDI FT232RL cableFTDI FT232RLUSB-RS232$12-20Gold standard; most reliable driver support
FTDI FT234XD breakoutFTDI FT234XDUSB-TTL$10-15For direct TTL-level connections (3.3V/5V)
FTDI USB-RS485-WEFTDI FT232R + RS485 transceiverUSB-RS485$25-35Integrated 120-ohm termination
Prolific PL2303-basedProlificUSB-RS232$5-10Avoid; driver issues on Windows 10/11
CH340-basedCH340USB-RS232$4-8Works but marginal; no galvanic isolation

Always buy FTDI chipset adapters. Prolific and CH340 have driver instability problems that will waste your time during diagnostics.

RS485 Non-Invasive Tapping

To monitor an existing RS485 bus without disrupting it:

MethodEquipmentCostNotes
RS485 Y-cable tapCustom Y-cable with 3 connectors$15-25One male, two female DB9
RS485 breakout board with tapScrew terminal breakout$10-15Solder wires in parallel to D+ and D-
Industrial RS485 tapProfiTap or similar$50-100Galvanically isolated; safest option

The Y-cable approach works but is invasive (requires unplugging). The breakout board soldered in parallel is the practical approach for one-man teams. See serial-diagnostics.md for detailed procedures.

RS232 Monitoring Y-Cable

For RS232 TX/RX monitoring without disrupting communication, build a Y-cable:

Device TX  ---[1k resistor]---+--- Monitor RX
                             |
Device RX  ---------------+--- Monitor TX
                         |
Ground ------------------+

The 1k resistor on the TX tap prevents the monitor from loading the TX line. This lets you passively sniff RS232 communication.


2.8 Multimeter and Hand Tools

ModelCostKey Features
Fluke 87V$350-450True-RMS, 1000V CAT IV, data logging, temperature
Fluke 117$200-280Non-contact voltage detection, CAT III 600V
Keysight U1242C$250-350Handheld, data logging, IR temperature

The Fluke 87V is the industrial standard. Its data logging mode (records up to 10,000 readings) is useful for recording voltage trends over time during machine operation. The temperature probe accessory measures ambient and surface temperatures for thermal diagnostics.

Additional Electrical Test Equipment

ItemSpecificationCostUse Case
Insulation resistance tester (megger)250V/500V/1000V test voltages$200-400Ground insulation testing; verify PE conductor integrity
Clamp meter (AC/DC current)DC + AC, 400A range$150-300Measure ground currents, motor current, supply loading
Ground bond tester25A/30A continuity test$300-600Verify protective earth connections
Loop resistance tester4-wire Kelvin measurement$200-400Measure contact resistance in terminals and connectors

Ground current measurement with a clamp meter is critical for diagnosing EMC problems. See grounding-emc.md for procedures.

Hand Tools

ItemSpecificationCost
Terminal screwdriver setWera 050 or Wiha slim$40-60
Wire crimper (Ferrules)0.5-16mm2 ferrule crimper$30-50
Wire strippersKnipex 12 16 185$25-35
Insulation displacement tool (IDC)For B&R X2X flat cable$15-25
CF card readerUSB 3.0, CF Type I/II$20-40
USB-TTL serial adapterFTDI FT232RL 3.3V$10-15
Label makerBrother P-Touch$50-80
Fiber optic cleaning kitLC/SC cleaning$30-50

2.9 Physical Layer Tools

CAN Physical Layer

ItemSpecificationCostQty
DB9 T-connector with 120-ohm terminationCAN standard$104
DB9 pass-through terminatorSwitchable 120-ohm$152
DB9 to flying leads adapterScrew terminals$84
CAN bus oscilloscope test pointsBNC adapters$52

Ethernet Testing

ItemSpecificationCostQty
Ethernet cable testerRJ45 continuity + wiring$15-251
Network cable certifier (optional)Fluke MicroScanner or equivalent$400-8001
RJ45 crimper + connectorsCat5e RJ45, strain relief boots$30-501 set

EMC Investigation Tools

ItemSpecificationCostNotes
DIY near-field probeFerrite core + coax cable$5-10Detect radiated emissions from cables and modules
Current probe (HF)100 kHz-1 GHz$200-400Measure common-mode currents on cables
PMR radio (walkie-talkie)446 MHz$30-60Quick EMC proximity test; crackling indicates poor shielding

The DIY near-field probe is made from a small ferrite bead (Material 43 or similar) with a short length of coax cable:

Cut coax to 10cm. Strip one end, wrap 3-4 turns around ferrite bead.
Connect other end to BNC. Use with spectrum analyzer or scope
set to 1 MOhm input, 20 MHz bandwidth.

See physical-layer-sniffing.md for detailed EMC measurement procedures.


3. Software Tool Suite

3.1 Automation Studio

Version Selection

Install the version that covers the widest range of AR versions you expect to encounter. For CP1584 systems, AS 4.7+ covers most deployments from 2016 onward.

Deployment EraTypical AR VersionAS Version Needed
2013-2015AR 4.10-4.20AS 4.2-4.3
2016-2018AR 4.30-4.50AS 4.4-4.5
2018-2020AR 4.60-4.80AS 4.7-4.8
2020-2023AR 4.80-4.14AS 4.8-4.10
2023+AR 4.14+AS 4.10+

Strategy: Install AS 4.10 as primary (covers AR 4.10+). Keep AS 4.5 in a VM for legacy systems.

Service Contract and Licensing

  • B&R Automation Studio requires a service contract for updates and full features
  • Without a service contract, you can use the last version released before your contract expired
  • Evaluation licenses are available (30 days, extendable by request) for initial assessment
  • For a diagnostic workstation, consider a shared license pool if your organization has multiple B&R users

Installation on Diagnostic Workstation

  1. Install Windows 10/11 clean install (avoid bloatware)
  2. Install Automation Studio (run installer as Administrator)
  3. Install target AR versions via the AS Update Manager
  4. Install mapp Technology packages if needed
  5. Configure AS network settings for the dedicated PLC NIC
  6. Create a default project template for new machine diagnostics
  7. Set AS default directory to a dedicated work folder (not My Documents)

3.2 Wireshark

Detailed in Section 2.6. Key configuration steps:

  1. Install Wireshark from wireshark.org (not Microsoft Store version)
  2. Install Npcap when prompted (packet capture driver)
  3. Download openPOWERLINK dissector from openPOWERLINK GitHub releases
  4. Copy powerlink.dll to C:\Program Files\Wireshark\plugins\<version>\
  5. Verify dissector loads: Wireshark > About > Plugins, search for POWERLINK

Capture Filter Profiles for B&R Protocols

Create custom capture profiles for common scenarios:

POWERLINK capture filter:

ether proto 0x88ab

This filters for the POWERLINK ethertype (0x88AB).

CAN bus capture (via PCAN or SocketCAN):

(no display filter needed; CAN frames are already isolated by interface)

Modbus TCP capture filter:

tcp port 502

OPC-UA capture filter:

tcp port 4840

FTP capture filter (for CF card access):

tcp port 21 or tcp port 20

SDM (Service and Diagnosis Manager) capture filter:

tcp port 11159

Display Filters

POWERLINK node filter:

powerlink.node_id == 0x01

POWERLINK error frames:

powerlink.type == error

Modbus exceptions:

modbus.exception_code > 0

3.3 OPC-UA Clients

UaExpert (Free)

UaExpert by Unified Automation is the most capable free OPC-UA client:

  • Browse server address space
  • Read/write variables
  • Subscribe to monitored items
  • Call methods
  • Historical data access
  • Export node definitions

Connection to B&R OPC-UA server:

  1. In Automation Studio, enable OPC-UA server in the PLC configuration
  2. Set the endpoint URL (typically opc.tcp://<PLC-IP>:4840)
  3. Configure security policy (None for diagnostics, or Basic256Sha256 for production)
  4. In UaExpert, add server endpoint, connect, browse namespace

Python asyncua

import asyncio
from asyncua import Client

async def main():
    url = "opc.tcp://192.168.1.10:4840"
    async with Client(url=url) as client:
        root = client.nodes.root
        children = await root.get_children()
        for child in children:
            print(f"  {child.browse_name}: {await child.get_display_name()}")
        var = client.get_node("ns=2;s=SystemVariables.MachineStatus")
        value = await var.read_value()
        print(f"Machine status: {value}")

asyncio.run(main())

See opcua.md for detailed OPC-UA configuration and advanced patterns.

Node-RED OPC-UA Nodes

Node-RED provides a visual programming environment with OPC-UA nodes:

  1. Install Node-RED: npm install -g node-red
  2. Install OPC-UA package: cd ~/.node-red && npm install node-red-contrib-opcua
  3. Configure OPC-UA server endpoint in the node
  4. Build flow: Read variable -> Transform -> Display/Log/Alert

3.4 PVI Tools

PVI Development Setup

PVI (Process Visualization Interface) is B&R’s proprietary communication protocol. The PVI Development Setup provides:

  • PVI Manager (connection configuration)
  • PVI Transfer (data transfer with PLC)
  • PVI API (C/C++ library for custom applications)

Download from B&R website (requires service contract or registration). Install on the diagnostic workstation alongside Automation Studio.

brsnmp

brsnmp (github.com/hilch/brsnmp) is an open-source C++ Windows command-line tool for executing PVI-SNMP commands against B&R PLCs. It requires B&R PVI Development Setup (PVI 4.x or 6.5.2+) to be installed. Download the binary from the GitHub releases page.

brsnmp --list                        # List all B&R PLCs on the network
brsnmp --filter=X20CP1584 --details  # Get detailed info for specific model
brsnmp --filter=$LAST --ipAddress=192.168.1.50  # Set IP (use $LAST to reuse previous filter)

This is invaluable for quick system information extraction when you do not have Automation Studio available.

Python PVI Wrapper (Pvi.py)

Community Python wrapper around the PVI COM interface:

from pvi import PviConnection, PviVariable
conn = PviConnection('192.168.1.10')
var = PviVariable(conn, 'MainProgram.Status')
value = var.read()
print(f"Status: {value}")

See pvi-api.md for complete PVI configuration and Python wrapper documentation.


3.5 Serial Communication Software

SoftwarePlatformCostKey Features
PuTTYWindows/Linux/MacFreeSSH, Telnet, serial; scriptable
Tera TermWindowsFreeSerial with macro scripting; log capture
RealTermWindowsFreeHex display, bridge mode, embedded scripting
DocklightWindows$100-200Protocol-level analysis, scripting, responses
HTermWindowsFreeSimilar to RealTerm; clean interface
Saleae Logic SoftwareWindows/Mac/LinuxFree with hardwareProtocol decode for serial captured via logic analyzer

Recommended: Tera Term for interactive serial communication (macro scripting lets you automate common queries). RealTerm for binary/hex analysis. Saleae Logic for capturing and decoding serial protocols electrically.

Tera Term serial configuration for B&R default settings:

Baud rate: 9600 or 19200 (check PLC configuration)
Data bits: 8
Parity: None
Stop bits: 1
Flow control: None
Terminal: VT or ANSI

See serial-diagnostics.md for comprehensive serial diagnostic procedures.


3.6 Python Environment

Installation

Use Python 3.8+ (3.10 or 3.11 recommended for best library compatibility). Install via python.org or conda.

Key Packages

PackagePurposeInstall Command
asyncuaOPC-UA client/serverpip install asyncua
pymodbusModbus TCP/RTU client/serverpip install pymodbus
pyserialSerial port communicationpip install pyserial
paho-mqttMQTT clientpip install paho-mqtt
scapyPacket manipulation and capturepip install scapy
numpyNumerical analysispip install numpy
pandasData analysis and CSV handlingpip install pandas
matplotlibPlotting and visualizationpip install matplotlib
jupyterInteractive notebookspip install jupyter
canCAN bus (SocketCAN, PCAN, etc.)pip install python-can

Virtual Environment Setup

python -m venv C:\br-diagnostics\venv
C:\br-diagnostics\venv\Scripts\activate
pip install -r requirements.txt

Create a requirements.txt file listing all packages. Pin versions for reproducibility.

Jupyter Notebooks

Jupyter notebooks are ideal for interactive protocol analysis. Example workflow:

  1. Capture protocol data (Wireshark export to CSV/JSON)
  2. Load into Jupyter notebook
  3. Parse and visualize using pandas/matplotlib
  4. Extract patterns, identify anomalies
  5. Document findings inline with code

See python-diagnostics.md for complete Python diagnostic tool library.


3.7 Network Utilities

ToolPlatformPurposeCost
nmapWindows/Linux/MacNetwork discovery, port scanningFree
Advanced IP ScannerWindowsNetwork device discoveryFree
WiresharkWindows/Linux/MacProtocol capture and analysisFree
PCAN-ViewWindowsCAN bus monitoringFree with PEAK adapter
arp-scanLinuxARP-based device discoveryFree
Angry IP ScannerWindows/Linux/MacFast IP range scannerFree
FiddlerWindowsHTTP/HTTPS debuggingFree
PuttyWindowsSSH/Serial/TelnetFree

nmap Quick Reference for B&R Discovery

Discover B&R PLCs on a network:

nmap -sn 192.168.1.0/24
nmap -p 21,80,11159,4840,502 192.168.1.0/24
nmap -O 192.168.1.0/24

Port signatures for B&R systems:

PortServiceProtocol
21FTPCF card access
80HTTPWeb interface
443HTTPSSecure web interface
11159SDMService and Diagnosis Manager
4840OPC-UAOPC Unified Architecture
502Modbus TCPModbus gateway (if configured)
161/162SNMPSystem monitoring
6969B&R specificConfiguration transfer

4. Complete Equipment List with Costs

4.1 Essential Equipment

CategoryItemModel/BrandEst. Cost (USD)Priority
ComputingLaptopLenovo ThinkPad T14 (i7, 16GB, 512GB)$1,300Essential
NetworkUSB Ethernet adapterIntel I210-based (StarTech or similar)$45Essential
NetworkCat5e patch cables (assorted)Various$30Essential
NetworkManaged switch (port mirroring)Netgear GS105E$45Essential
Oscilloscope4-channel DSORigol DS1054Z$500Essential
OscilloscopeDifferential probeRigol or Micsig$250Essential
MultimeterIndustrial true-RMSFluke 87V$400Essential
SerialRS232 USB adapter (FTDI)FTDI FT232RL cable$15Essential
SerialRS485 USB adapter (FTDI)FTDI USB-RS485-WE$30Essential
SerialTTL serial adapterFTDI FT232RL 3.3V breakout$10Essential
SoftwareAutomation StudioB&R AS 4.10License-dependentEssential
SoftwareWireshark + NpcapWireshark.orgFreeEssential
StorageCF card readerTranscend TS-RDF8K$25Essential
Hand toolsTerminal screwdriver setWera 050$50Essential
Hand toolsWire crimper/stripperKnipex$60Essential
Hand toolsLabel makerBrother P-Touch$60Essential

Essential subtotal: $2,850 (excluding AS license)

CategoryItemModel/BrandEst. Cost (USD)Priority
CAN BusCAN USB adapterPEAK PCAN-USB$170Recommended
Logic Analyzer8-channel LASaleae Logic 8$500Recommended
Logic Analyzer16-channel LASaleae Logic Pro 16$1,500Recommended
NetworkEthernet crossover cableCat5e MDI-X$5Recommended
NetworkEthernet cable testerFluke MicroScanner or generic$25Recommended
CAN BusCAN breakout + terminatorsVarious$40Recommended
SoftwareUaExpert OPC-UA clientUnified AutomationFreeRecommended
SoftwarePCAN-ViewPEAKFree with adapterRecommended
SoftwareTera Term + RealTermFree softwareFreeRecommended
SerialRS485 breakout boardScrew terminal type$10Recommended
PythonPython 3.10 + packagesPython.orgFreeRecommended
ElectricalClamp meter (AC/DC)Fluke i400 or similar$250Recommended
ElectricalInsulation tester (megger)Fluke 1587 or similar$350Recommended
PhysicalBNC adapters and cablesVarious$50Recommended
PhysicalEMC near-field probe (DIY)Ferrite + coax$10Recommended

Recommended subtotal: $2,970 (choosing Saleae Logic 8 over Pro 16)

4.3 Optional Equipment

CategoryItemModel/BrandEst. Cost (USD)Priority
OscilloscopeHigh-end DSOKeysight DSOX3014T$4,000Optional
CAN BusCAN analyzer softwareVector CANalyzer$4,000Optional
NetworkNetwork cable certifierFluke DSX-5000$3,500Optional
ElectricalGround bond testerMegger MIT430$500Optional
ElectricalHF current probeFischer CT-2 or similar$400Optional
ComputingSecond laptop (Linux)Any i5, 8GB$500Optional
PortablePelican case (rolling)Pelican 1510$280Optional
PortablePortable monitorGeChic 15.6“ USB-C$250Optional
StorageExternal SSD (1TB)Samsung T7$100Optional
Logic AnalyzerSigrok + DreamSourceLabDSLogic Pro16$150Optional
Spare partsCF cards (8GB, industrial)Transcend 800x$40Optional
Spare partsEthernet cables (spool)Cat5e 305m box$50Optional
CAN BusPCAN-USB FD (CAN-FD)PEAK$350Optional
SoftwareNode-RED + OPC-UAOpen sourceFreeOptional

Optional subtotal: $14,120 (selecting items as needed)


5. Workstation Setup Procedures

5.1 Network Configuration

Dedicated PLC Network Interface Setup

  1. Identify the Intel I210 (or primary) NIC in Windows Device Manager
  2. Rename the adapter: “PLC Network”
  3. Configure a static IP in the B&R default range:
    • IP: 192.168.1.100 (workstation)
    • Subnet: 255.255.255.0
    • Gateway: Leave blank
    • DNS: Leave blank
  4. Disable all power management on this adapter (Device Manager > Power Management)
  5. Set adapter metric to 1 (highest priority) to ensure PLC traffic uses this interface

If the PLC uses a different subnet (determined during discovery), change accordingly. Keep notes on which subnets each machine uses.

Wireshark Capture NIC Configuration

If using a second NIC for Wireshark capture:

  1. Rename the second adapter: “Capture NIC”
  2. Configure static IP on a different subnet (or leave unconfigured)
  3. Disable all offloading features (see Section 2.6)
  4. In Wireshark, select only this adapter for capture
  5. Set Wireshark capture buffer to maximum (128 MB or more)

POWERLINK requires 100 Mbps full-duplex links. Configure the switch port and NIC:

  1. Set switch port connected to PLC to 100 Mbps full-duplex (disable auto-negotiation if problems occur)
  2. Set capture NIC to 100 Mbps full-duplex
  3. Verify link lights on both switch port and NIC
  4. Test with a ping to the PLC IP before attempting capture

DNS Configuration

For most diagnostic work, you do not need DNS. Use host files if needed:

# C:\Windows\System32\drivers\etc\hosts
192.168.1.10    cp1584-machine-a
192.168.1.11    cp1584-machine-b

5.2 Physical Connections

First Contact Procedure for Unknown B&R System

Before connecting anything to an unknown machine:

Step 1: Safety Assessment

  • Verify LOTO (Lock-Out/Tag-Out) procedures with the plant
  • Confirm machine is in a safe state (E-stop engaged, drives disabled)
  • Identify all power sources: 24V DC, 230V AC, 400V AC (3-phase), pneumatic
  • Verify ground connections are intact
  • Check for stored energy (capacitors, pressurized systems, suspended loads)

Step 2: Visual Inspection

  • Locate the CP1584 PLC (look for the B&R logo and model number on the front panel)
  • Note the IP address label (often handwritten on a sticker)
  • Identify all connected cables (Ethernet, CAN bus, X2X, serial, power)
  • Photograph all cable connections and panel layouts
  • Note LED status on CP1584 (PWR, RUN, ERR, BF, MS)
  • Check for obvious damage (burnt components, water ingress, loose connectors)

Step 3: Physical Connection

  1. Connect workstation Ethernet cable to the PLC Ethernet port (labeled ETH0 or ETHERNET)
  2. Connect serial cable if available (RS232 on front panel, COM1)
  3. Connect CAN adapter if CAN bus access is needed (locate the CAN bus junction point)
  4. Do NOT connect power measurement tools to live circuits until safety is confirmed
  5. Verify all connections are secure and not stressing any connectors

Step 4: Initial Power Monitoring

  1. Measure 24V supply at the PLC power terminals with the multimeter
  2. Verify voltage is within range (20.4-28.8V for 24V nominal)
  3. Check for ripple or noise on the 24V supply using the oscilloscope
  4. Measure ground reference voltage (should be < 1V between PE and PLC GND)

5.3 Software Configuration

Automation Studio Project Creation

  1. Open Automation Studio
  2. Create a new project: File > New > Project
  3. Set Target: B&R Automation Runtime > CP1584
  4. Set AR version to match the PLC (or highest available for forward compatibility)
  5. Configure the physical hardware: Add the CP1584 CPU, IO modules, and interface modules found during inspection
  6. Create an Ethernet connection to the PLC IP address
  7. Set transfer mode: “Transfer to Target” or “Change in Target” as needed

OPC-UA Connection Setup

  1. In UaExpert, double-click to add a new server
  2. Enter endpoint URL: opc.tcp://<PLC-IP>:4840
  3. Select security policy: None (for initial diagnostics)
  4. Connect and browse the address space
  5. Bookmark important variables (machine state, alarms, process data)
  6. Export the address space for offline analysis

Wireshark Capture Profiles

Create named capture profiles:

Profile NameInterfaceFilterNotes
POWERLINKCapture NICether proto 0x88abCaptures only POWERLINK frames
Modbus TCPCapture NICtcp port 502Modbus gateway traffic
OPC-UACapture NICtcp port 4840OPC-UA communication
Full CaptureCapture NIC(none)Everything on the PLC network
SDMCapture NICtcp port 11159SDM diagnostic traffic

PVI Connection Configuration

In PVI Manager:

  1. Create a new connection
  2. Set transport: TCP/IP
  3. Set device: CP1584
  4. Set IP address to PLC IP
  5. Set CPU slot (usually 1)
  6. Test connection

CAN Adapter Setup with PCAN-View

  1. Connect PCAN-USB to the CAN bus (DB9 connector)
  2. Open PCAN-View
  3. Set baud rate to match the CAN bus (common: 250 kbps, 500 kbps, 1 Mbps)
  4. Set CAN identifier format (11-bit standard or 29-bit extended)
  5. Start reception
  6. If no traffic is observed, try different baud rates
  7. Once traffic is visible, start logging

See if2772-canopen.md for CANopen-specific configuration details.


6. Diagnostic Workflow Checklist

6.1 Pre-Arrival Preparation

  • Charge laptop battery (minimum 80%)
  • Pack all adapters, cables, and tools
  • Verify Wireshark POWERLINK dissector is installed and working
  • Verify Automation Studio opens without errors
  • Verify PCAN-View detects the CAN adapter
  • Verify serial adapter appears in Device Manager
  • Check that external SSD has space for new captures
  • Bring spare Ethernet cables and adapters
  • Bring printed copy of IP range scan results if available
  • Review any prior documentation for this machine

6.2 On-Site Diagnostic Procedure

Phase 1: Safety and Assessment (15-30 minutes)

  • LOTO confirmed with plant safety
  • Power sources identified and verified
  • Machine visual inspection completed
  • All cable connections documented (photo + written)
  • CP1584 front panel LED status noted
  • PLC IP address identified (label, DHCP lease table, or ARP scan)

Phase 2: Network Discovery (15-30 minutes)

  • Connect workstation to PLC network
  • Run ARP scan: arp -a or arp-scan -l
  • Run nmap scan: nmap -sn 192.168.1.0/24 (adjust subnet)
  • Run port scan on discovered PLC IP: nmap -p 21,80,11159,4840,502 <PLC-IP>
  • Document all discovered devices and their roles
  • Verify FTP access to CF card (anonymous or configured credentials)

Phase 3: PLC Connection and Backup (30-60 minutes)

  • Connect via Automation Studio (transfer mode)
  • Upload PLC program and hardware configuration
  • Download CF card image via FTP (binary mode)
  • Save CF card image to external storage with metadata
  • Connect via SDM: http://<PLC-IP>:11159 (check if accessible)
  • Connect via OPC-UA: opc.tcp://<PLC-IP>:4840 (check if accessible)
  • Read system variables via brsnmp or PVI
  • Note AR version, firmware version, project name, build date

Phase 4: Active Diagnostics (1-4 hours)

  • Start Wireshark capture on dedicated NIC
  • Start CAN bus capture if CAN bus is present
  • Connect serial monitor if serial devices are present
  • Read all system variables via OPC-UA or PVI
  • Map IO configuration (digital inputs, outputs, analog channels)
  • Identify communication partners (drives, HMIs, remote IO)
  • Check task cycle times and watchdog settings
  • Review alarm history and error logs
  • Capture representative POWERLINK traffic (at least 10 seconds)
  • Note any communication errors or timeouts in traffic

Phase 5: Hardware Health Check (30-60 minutes)

  • Measure 24V supply voltage and ripple at PLC terminals
  • Check POWERLINK Ethernet signal quality (if problems suspected)
  • Measure CAN bus differential voltage (if CAN bus present)
  • Check ground connections: PE to PLC GND voltage (< 1V)
  • Measure ground currents with clamp meter
  • Check ambient temperature and ventilation
  • Inspect IO modules for damage or loose connections
  • Verify all terminators are present (CAN bus, X2X bus)

Phase 6: Documentation (30-60 minutes)

  • Compile findings into diagnostic report template
  • Include CF card image location and metadata
  • Include Wireshark capture file location
  • Include CAN capture log location
  • Document all discovered IP addresses and device roles
  • Document all IO mappings extracted
  • Document any problems found and recommended actions
  • Create or update machine documentation file
  • Back up all captures and documentation to external storage
  • Store documentation in version control (git)

7. Portable vs Bench-Top Configuration

7.1 Portable Setup (Pelican Case)

A portable workstation in a rolling Pelican case is ideal for field service. You carry everything to the machine and set up on a nearby cart or table.

ComponentStorageNotes
LaptopIn case, padded compartmentUse laptop sleeve for extra protection
Oscilloscope + probesIn case, custom foam cutoutRigol DS1054Z fits in Pelican 1510
CAN adapterSmall pouchPCAN-USB + DB9 cables
Logic analyzerSmall pouchSaleae Logic + grabber clips
Serial adaptersSmall pouchFTDI RS232 + RS485 + TTL
Ethernet cables + switchMesh pouchGS105E switch + 4 cables
MultimeterSide pocketFluke 87V with probes
Hand toolsRolled pouch or small boxWera screwdrivers, strippers, crimpers
CF card readerSmall boxTranscend TS-RDF8K
Label makerSide pocketBrother P-Touch
External SSDSide pocketSamsung T7 for captures
Power strip + extension cordExternalBring your own; industrial sites may not have accessible outlets

Recommended case: Pelican 1510 (rolling, $280) with custom foam. The 1510 fits airline carry-on requirements (though weight may be an issue at ~35 lbs loaded).

Portable Case Packing List

Pelican 1510 contents:
  Top layer (foam):
    - Laptop (center)
    - Multimeter (right)
    - Power supply + cables (left)
    - CF card reader, adapters (pockets)
  Bottom layer (foam):
    - Oscilloscope (center)
    - Probes (in scope bag, right)
    - Managed switch (front left)
    - Ethernet cables (front right)
    - CAN adapter + cables (rear left)
    - Logic analyzer + clips (rear right)
  External:
    - Hand tool pouch (carried separately or strapped)
    - External SSD (side pocket)
    - Label maker (side pocket)

7.2 Bench-Top Setup

For your workshop or permanent diagnostic bench, you can leave equipment connected and ready. This is more efficient for analyzing captures and programming CF cards after field visits.

ComponentSetupNotes
Desktop PC or laptop on dockPermanently on benchDual monitors recommended
OscilloscopePermanently connected via USBUSB connection for screen capture
Logic analyzerPermanently connected via USBDedicated USB port
CAN adapterConnected when neededKeep cable routed to bench edge
Ethernet switch8-port on benchPLC network + capture NIC
MultimeterOn bench standAlways accessible
Soldering ironOn benchFor probe adapters, custom cables
Bench power supplyProgrammable, 0-30VFor powering IO modules off-machine
USB hubPowered, 7+ portsCentral cable management
External storage array2+ TBArchive of all CF images and captures
Label printerNetworked or USBPersistent label production

7.3 Hybrid Approach

The most practical setup for a one-man team is hybrid: a portable Pelican case for field work plus a bench-top station for analysis. The laptop travels between both. Shared equipment (oscilloscope, logic analyzer) may live on the bench with a second, cheaper unit in the portable case.

Cost comparison:

ConfigurationEquipment CostNotes
Portable only$3,000-5,000Everything in one case; limited bench capability
Bench-top only$4,000-6,000Best analysis capability; requires on-site equipment transport each time
Hybrid (recommended)$5,000-8,000Portable case + bench station; shared laptop; best of both

8. Cross-References

This document is part of a comprehensive B&R diagnostic reference library. Related documents:

  • cp1584-forensics.md – Step-by-step forensic analysis of unknown CP1584 systems; what to extract first, how to read configuration files, and how to reconstruct IO mappings from a blank machine.
  • io-sniffing.md – Techniques for monitoring and identifying digital and analog IO signals without existing documentation. Covers signal tracing, force table usage, and IO mapping extraction.
  • physical-layer-sniffing.md – Physical layer measurement techniques for Ethernet POWERLINK, CAN, X2X, and serial buses. Covers signal quality analysis and EMC diagnostics.
  • powerlink-internals.md – Detailed POWERLINK protocol analysis including frame structure, node addressing, cycle timing, and error handling. Essential reference for Wireshark capture interpretation.
  • x2x-protocol.md – B&R X2X backplane bus protocol analysis. Frame format, timing, and how to capture and decode X2X traffic with a logic analyzer.
  • if2772-canopen.md – CANopen diagnostics for the B&R IF2772 interface module. CANopen object dictionary, SDO/CDC communication, and error handling.
  • pvi-api.md – B&R PVI (Process Visualization Interface) API reference. Connection configuration, data transfer, and Python wrapper usage for automated diagnostics.
  • opcua.md – OPC-UA configuration on B&R PLCs. Server setup, security configuration, address space structure, and client connection patterns.
  • python-diagnostics.md – Python diagnostic tool library. Complete code examples for OPC-UA, PVI, Modbus, CAN, serial, and file-based diagnostics.
  • serial-diagnostics.md – Serial protocol diagnostics for RS232/RS485 connections. Baud rate detection, protocol analysis, and non-invasive bus tapping techniques.
  • grounding-emc.md – Grounding best practices and EMC diagnostic procedures for industrial installations. Ground current measurement, shield termination, and common-mode noise reduction.
  • analog-calibration.md – Analog IO calibration procedures for 4-20mA, 0-10V, and thermocouple inputs. Calibration techniques, verification procedures, and documentation templates.

9. Key Findings

  1. Build incrementally. Start with the essential tier ($2,850 excluding AS license) covering laptop, Ethernet tools, oscilloscope, multimeter, serial adapters, and Wireshark. Add CAN and logic analyzer capabilities as you encounter machines that need them. Do not buy everything at once.

  2. Dedicated NIC for Wireshark capture is mandatory. Using the same NIC for PLC communication and Wireshark capture causes packet loss, missed frames, and unreliable POWERLINK analysis. A $45 Intel I210-based USB adapter solves this completely.

  3. Managed switch with port mirroring is the most reliable POWERLINK capture method. Network taps work but are awkward. Port mirroring on a $45 Netgear GS105E gives you non-invasive, full-duplex capture with zero impact on PLC communication.

  4. FTDI-only serial adapters. Prolific and CH340 chipsets have driver instability on modern Windows. The $15 FTDI FT232RL cable saves hours of troubleshooting time. Buy 3: one for RS232, one for RS485, one for TTL.

  5. Rigol DS1054Z with differential probe is the oscilloscope sweet spot. Four channels cover CAN differential measurement plus trigger. The differential probe ($250) is the accessory that matters most – single-ended CAN measurements are unreliable and misleading.

  6. CF card backup is the first action on any unknown machine. Before you do anything else, FTP into the PLC and download the CF card contents. Use binary FTP mode. Store with machine ID, date, and AR version metadata. This backup is your insurance policy.

  7. Saleae Logic 8 ($500) covers most diagnostic needs. The Logic Pro 16 ($1,500) is only needed if you routinely analyze X2X bus traffic (16 data lines). For CAN, SPI, I2C, and serial analysis, 8 channels is sufficient.

  8. PCAN-USB ($170) plus PCAN-View (free) is the CAN diagnostic baseline. CANalyzer is professional-grade but at $3,000+ it is difficult to justify for a one-man team. PCAN-View provides real-time monitoring, trace logging, and signal decode at zero additional cost.

  9. Python with asyncua + pymodbus + pyserial replaces most proprietary software. For a diagnostic workstation focused on data extraction, Python scripts can read OPC-UA variables, poll Modbus registers, capture serial data, and log everything to structured files. This is faster and more repeatable than manual clicking through proprietary GUIs.

  10. Use a template for every diagnostic engagement. Create a directory structure and checklist for each machine: /machines/<machine-id>/<date>/ containing CF card images, Wireshark captures, CAN logs, OPC-UA variable dumps, serial captures, and a diagnostic report. This structure accumulates into a searchable knowledge base over time.

  11. The hybrid portable + bench-top configuration is the right architecture. A portable Pelican case for field work and a permanent bench for analysis. The laptop shuttles between both. Shared equipment (oscilloscope, logic analyzer) can be duplicated cheaply (Sigrok-based logic analyzer for the field, Saleae for the bench).

  12. brsnmp is the quickest way to identify an unknown PLC. Before opening Automation Studio or attempting a full program upload, run brsnmp to read the AR version, project name, and system variables. This 30-second check tells you what you are dealing with and which AS version you need.


Key Findings

  1. A prepared workstation cuts diagnostic time from hours to minutes. Having every adapter, cable, and tool pre-configured and tested means you can connect to any unknown CP1584 in under five minutes and begin systematic data extraction.

  2. brsnmp is the fastest first step for any unknown PLC. Running brsnmp against a CP1584 reveals the AR version, project name, system variables, and hardware inventory in seconds — no Automation Studio required.

  3. Protocol sniffing is essential for intermittent problems. Problems that can’t be reproduced reliably require passive monitoring. A properly configured protocol sniffer (Wireshark + POWERLINK plugin, PCAN for CAN, logic analyzer for X2X) captures the evidence that logging alone misses.

  4. Separate the diagnostic workstation from production networks. Your diagnostic laptop should never be on the plant network. Use a dedicated VLAN or direct connection to avoid introducing security risks or network interference.

  5. Build a knowledge base that accumulates value. Every machine you diagnose adds captured configurations, firmware images, protocol traces, and documented procedures to your workstation. Over time, this library becomes your most valuable resource.


10. Sources

  • B&R Automation. Automation Studio 4.x Documentation. B&R Industrial Automation, 2018-2024. https://www.br-automation.com
  • B&R Automation. CP1584 Hardware Manual. B&R Industrial Automation. Document ID: DOC-00000.
  • Rigol Technologies. DS1054Z User’s Guide. https://www.rigol.com
  • PEAK-System Technik. PCAN-USB Product Page and Documentation. https://www.peak-system.com
  • Saleae. Logic Analyzer Documentation and Protocol Decoders. https://www.saleae.com
  • Wireshark Foundation. Wireshark User’s Guide. https://www.wireshark.org
  • openPOWERLINK Project. POWERLINK Wireshark Dissector. SourceForge / GitHub. https://sourceforge.net/projects/openpowerlink/
  • Unified Automation. UaExpert OPC-UA Client Documentation. https://www.unified-automation.com
  • hilch. brsnmp – B&R SNMP Tool. GitHub. https://github.com/hilch/brsnmp
  • CAN in Automation (CiA). CANopen Protocol Specification (CiA 301). https://www.can-cia.org
  • Fluke Corporation. Fluke 87V Industrial True-RMS Multimeter User Manual. https://www.fluke.com
  • Intel Corporation. I210 Ethernet Controller Datasheet. https://www.intel.com
  • Python Software Foundation. asyncua Library Documentation. https://github.com/FreeOpcUa/opcua-asyncio
  • python-can Project. CAN Bus Interface Documentation. https://python-can.readthedocs.io
  • Sigrok Project. PulseView Logic Analyzer Software. https://sigrok.org
  • IEC 61158-4-6. POWERLINK Real-Time Ethernet Protocol. International Electrotechnical Commission.
  • IEC 61158-4-4. CANopen Communication Profile. International Electrotechnical Commission.
  • IEC 62591. WIRELESSHART Communication Protocol (reference for industrial wireless diagnostics). IEC.
  • NMAP Project. Nmap Network Scanning Documentation. https://nmap.org
  • Netgear. GS105E Managed Switch Documentation. https://www.netgear.com
  • Pelican Products. 1510 Case Specifications. https://www.pelican.com

B&R User Role and Access Control Recovery for CP1584

Overview

When you inherit a B&R machine from a defunct OEM, one of the first barriers you may hit is password protection. The OEM may have configured user accounts, OPC-UA authentication, VNC passwords, FTP access controls, or Automation Studio online login credentials — and none of them were documented. This guide covers every known access recovery pathway for the X20CP1584 and related B&R controllers.

Critical context: B&R controllers do not have any built-in default administrator accounts or system-integrated credentials. All user management is entirely application-defined. This was confirmed by B&R staff on the community forum. The passwords, roles, and accounts that exist on any given CP1584 were created by the OEM programmer during project development.


1. Understanding B&R Access Control Layers

B&R access control is not a single mechanism. There are multiple independent layers, each protecting different interfaces:

LayerWhat It ProtectsConfigured InDefault State
Automation Studio Online LoginDownload/upload/online monitoring from ASProject options in ASNo password by default
VNC ServerRemote HMI viewing and controlEthernet interface settings, VNC Servers sectionPassword optional; defaults to no auth
FTP ServerCF card file accessSystem configuration, System.parUsername br, password br (traditional default); can be changed
OPC-UA ServerVariable access via OPC-UAOPC-UA configuration, user role systemAnonymous access or configured roles
User Role System (mapp)Application-level login for operatorsmapp UserX, AsUserMG library in the PLC programDefined by OEM programmer
SDM Web InterfaceBrowser-based diagnostics at /sdmSystem configurationNo authentication by default
Ethernet Station Address / DIP SwitchINA2000 station numberPhysical DIP switches on the CPUSet by hardware

Key Insight: The OEM Program Controls Everything

Unlike some PLC brands (Siemens, Rockwell) that have factory-level passwords for firmware access, B&R’s security model is:

  1. No factory passwords exist. B&R confirmed there are “no standard / system integrated administrator accounts / credentials.”
  2. All credentials are application-specific. The user roles, passwords, and access levels are created by whoever programmed the PLC.
  3. Credentials are stored in the application project, compiled into the binary, and loaded from the CF card at boot.
  4. Some credentials are stored on the CF card’s secure partition in a dynamically-named file with SHA256-encrypted password values.

See also: firmware.md, cf-card-boot.md, config-file-formats.md


2. Automation Studio Online Access

2.1 What Is Protected

When you connect to a CP1584 from Automation Studio (Online > Settings > Auto Search or manual IP entry), the controller may require an online password. This is configured per-project in:

Automation Studio > Options > Settings > Online > Login

The online login can have multiple user levels:

LevelDescription
OperatorLimited access; can view but not modify
ServiceCan read/write variables, force I/O, make online changes
AdministratorFull access; can download/upload programs, change configuration
DefaultIf no login is configured, anyone with AS can connect with full access

2.2 Recovery When the AS Password Is Unknown

There are several approaches:

Approach A: Direct CF Card Access

If you can physically access the CF card:

  1. Power down the PLC
  2. Remove the CF card
  3. Image the CF card to your PC (see cf-card-boot.md for imaging procedure)
  4. The online login configuration is stored in the compiled project on the CF card
  5. You can search the CF card’s user partition files for configuration data
  6. In many cases, simply creating a new project with no login protection and downloading it will overwrite the existing password

Approach B: Boot Mode Access

The CP1584 has a physical operating mode switch on the CPU housing:

Switch PositionModeDescription
RUNNormal operationApplication runs normally
BOOTBoot modeBoot AR starts; system can be installed via online interface
DIAGDiagnostic modeCPU boots with diagnostics; programs are not initialized

In BOOT mode, the controller runs the Boot AR firmware, not the user application. This means:

  • No application-level security is active
  • You can connect from Automation Studio and install a new project
  • The user application is not running (outputs are zeroed)

Procedure:

  1. Power down the PLC
  2. Set the operating mode switch to BOOT
  3. Power up the PLC
  4. The STATUS LED will show the PLC is in BOOT mode (R/E red on, RDY/F yellow on)
  5. In Automation Studio, use Online > Settings > Auto Search to find the PLC (it will appear with its hardware address, typically via DHCP)
  6. Connect and install a new project — or if you have the original .apj file with known passwords, install it

Approach C: Reset Button

The CP1584 has a reset button located below the USB interfaces on the bottom of the housing:

Procedure:
1. Press the reset button with a small pointed object (e.g., paper clip)
2. All application programs are stopped immediately
3. All outputs are set to zero
4. The PLC starts up in SERVICE mode by default
5. The startup mode after reset can be configured in Automation Studio

In SERVICE mode, the application is not running normally, but you may still need credentials to connect via Automation Studio. The reset button alone does not clear passwords — it only stops the application.

Approach D: Network Reset (DHCP Recovery)

If you don’t know the PLC’s IP address:

  1. Connect your PC directly to the PLC’s Ethernet port
  2. Set your PC to DHCP
  3. Switch the PLC to BOOT mode
  4. If a DHCP server is available, the PLC will obtain an IP via DHCP
  5. Use Automation Studio’s auto-search to find it

Without a DHCP server, the PLC in BOOT mode may use its hardware-based INA2000 address (set by the DIP switches on the CPU).


3. FTP Access Recovery

SECURITY WARNING — CVE-2024-0323 (CVSS 9.8 Critical): The FTP server on B&R Automation Runtime supports insecure encryption mechanisms (SSLv3, TLSv1.0, TLSv1.1). An attacker on the network can perform man-in-the-middle attacks to decrypt FTP communications, including CF card backups that may contain the entire project, credentials, and configuration. Do not use FTP over untrusted networks. See ar-rtos.md Section 14.8 for details.

3.1 Default FTP Credentials

B&R FTP access traditionally defaults to:

Username: br
Password: br

However, the OEM may have changed these. FTP credentials are stored in the controller’s system configuration, not in the user application.

3.2 FTP Without Credentials (ANSL-era Behavior)

On older B&R systems, FTP would accept any username/password combination (literally any string for both fields). This was possible because FTP authentication was not rigorously enforced. On modern AR versions (4.x+), this behavior depends on the system configuration.

3.3 Testing FTP Access

## Attempt FTP connection
ftp <PLC_IP>

## Or using curl for testing
curl -v ftp://<PLC_IP>/

## Try default credentials
curl -v ftp://br:br@<PLC_IP>/

If FTP access works, you can browse the CF card partitions:

 ftp> ls
  Volume: A:
  Volume: C:
  Volume: F:       (user partition - contains user files)
  Volume: System   (system partition - contains AR firmware)
  Volume: CONFIG   (configuration)

3.4 FTP Access Controls

B&R offers password-protected FTP as of AR 4.33+. The configuration for FTP access is stored in the system configuration on the CF card. If the OEM changed the default credentials:

  1. If you can physically access the CF card, you may be able to modify the system configuration
  2. Boot mode + new project installation is the most reliable path

See also: ftp-web-interface.md, config-file-formats.md


4. VNC Access Recovery

4.1 VNC Configuration

The VNC server on B&R PLCs is configured in the Ethernet interface settings within the Automation Studio project, under the “VNC Servers” section. The OEM configures:

  • View-only password (typically a single character like v)
  • View and control password (typically a single character like c)
  • Port number (default: 5900, or offset from 5900 for multiple VNC servers)

4.2 VNC Default Passwords

Common B&R VNC defaults observed in the field:

ModeCommon Default Password
View onlyv
View and controlc

These defaults come from B&R training examples and the VC4 visualization tutorials. However, the OEM may have set custom passwords or disabled VNC entirely.

CRITICAL SECURITY WARNING — CVE-2023-1617 (CVSS 9.8 Critical): The B&R VC4 VNC server has an authentication bypass vulnerability affecting VC4 versions 3.x through 4.45.3 and 4.7.x through 4.72.9. An unauthenticated network attacker can bypass all VNC authentication entirely, gaining full view and control of the HMI without any credentials. This means even if the OEM set a custom VNC password, it provides no protection on unpatched systems.

Mitigation:

  1. Update VC4 to version 4.45.1+ or 4.72.9+ (requires Automation Studio with matching VC4 component)
  2. Block VNC ports (5900, 5800) at the network firewall if VNC is not needed
  3. On patched systems, change VNC passwords from defaults — single-character passwords are trivially guessable
  4. Never expose VNC ports to untrusted networks

See ar-rtos.md Section 14.10 for full CVE details and network-architecture.md for firewall configuration.

4.3 Connecting to VNC

## Using standard VNC client
vncviewer <PLC_IP>:5900

## Using B&R VNC Viewer (included with Automation Studio)
## Launch from: C:\Program Files\B&R\Automation Studio\<version>\Automation\Tools\VNC

4.4 VNC Not Configured

If the OEM did not configure a VNC server, you will not be able to connect. VNC is an application-level service — it must be explicitly configured in the Automation Studio project. Without the project or the ability to download a new configuration, VNC access is not available.

To enable VNC:

  1. You need to download a project to the PLC that includes VNC server configuration
  2. This can be done in BOOT mode from Automation Studio

See also: hmi-integration.md


5. OPC-UA Access Recovery

5.1 OPC-UA Security Model

B&R’s OPC-UA implementation supports:

  • Anonymous access (no authentication)
  • Username/password authentication (application-defined)
  • Certificate-based authentication (X.509)
  • Role-based access control (per-node permissions)

5.2 The User Role System

Starting with Automation Studio supporting OPC-UA, B&R introduced a user role system:

  • Any number of roles can be defined
  • Each role gets individual access rights per node (read, write, browse)
  • Nodes can be completely hidden from specific roles
  • Rights can be inherited from parent nodes to children
  • Users are assigned one or more roles
  • Passwords are SHA256-encrypted

5.3 Where Credentials Are Stored

OPC-UA user credentials are stored in:

  1. The compiled application on the CF card (User ROM / user partition)
  2. A dynamically-named file on the CF card’s secure partition with content like:
Property ID="Password" Value="bL3DNQOpeohgnWO6/XrO3/WjxEdDmtVI5eN8bg9oxj1gcJSr5ng=" DataType="STRING"

B&R has confirmed that:

  • The filename is dynamically created and varies based on the total number of files
  • The password value is SHA256 encrypted
  • B&R does not disclose the full encryption details for security reasons

5.4 Testing OPC-UA Access Without Credentials

If anonymous access is enabled (which is common on machines where the OEM didn’t configure strict security):

import asyncio
from asyncua import Client

async def test_opcua_access(plc_ip):
    url = f"opc.tcp://{plc_ip}:4840"
    async with Client(url=url) as client:
        root = client.get_root_node()
        print(f"Connected to {url} - anonymous access enabled")
        print(root)
        children = await root.get_children()
        for child in children:
            print(f"  {await child.get_browse_name()}")

asyncio.run(test_opcua_access("<PLC_IP>"))

5.5 Recovering When Authentication Is Required

If OPC-UA requires authentication:

  1. Try common defaults: admin, operator, service, br (empty password or br)
  2. FTP into the CF card and search for configuration files that might contain credential hints
  3. Boot mode → new project with known credentials
  4. Check the CF card user partition for configuration files that may contain user role definitions

See also: opcua.md, pvi-api.md


6. mapp UserX / Application-Level User Management

6.1 What Is mapp UserX?

mapp UserX is B&R’s pre-built user management component. If the OEM used mapp UserX, the following applies:

  • Users are created and managed through the MpUserXManager function block
  • User levels are hierarchical: administrators can create users at their level or below
  • Password rules are configurable (minimum length, complexity, expiration)
  • User data is stored in the mapp UserX configuration on the CF card

6.2 Typical mapp UserX Role Hierarchy

A common OEM configuration:

Role LevelRole NameCapabilities
10DeveloperFull access; create/edit all users
7ServiceCreate/edit operators and below
5ShiftLeaderCreate/edit operators
3OperatorBasic machine operation
1VisitorView-only

6.3 Admin Rights and User Management

Administrator rights in mapp UserX are used only for user management:

  • Create new users
  • Unlock locked users
  • Reset passwords
  • Edit user properties

Administrator rights do not affect other access like OPC-UA or other mapp components — those have their own role-based access controls.

6.4 Recovering mapp UserX Access

If the OEM used mapp UserX and you don’t have any credentials:

  1. The CF card is your path. mapp UserX stores its configuration in files on the CF card user partition
  2. FTP access may allow you to browse and identify mapp UserX configuration files
  3. Creating a new project without mapp UserX (or with a default admin account) and downloading it will replace the existing user management
  4. If you need to preserve the existing program while resetting access, you must first upload the existing project from the PLC (which may require credentials), then modify the user management, then download it back

6.5 Using the User Role System Programmatically

B&R provides function blocks for managing users at runtime:

MpUserXManager    - Core user management function block
MpUserXManagerUI  - User management with UI confirmation dialogs

The user role system can be updated during operation — you can assign a username and password to a new system operator from within the application program using these function blocks. If you have access to modify the PLC program (via online changes or a new download), you can inject code to create a new admin account.

See also: online-changes.md, custom-diagnostic-tools.md


7. SDM (System Diagnostics Manager) Access

7.1 SDM Is Typically Unauthenticated

The SDM web interface at http://<PLC_IP>/sdm is typically accessible without authentication. This is one of your most valuable diagnostic entry points when you have no credentials.

If SDM is enabled (it is by default on most configurations):

  • Open a web browser and navigate to http://<PLC_IP>/sdm
  • You can view CPU status, I/O module states, error logs, alarm history, network diagnostics
  • No login is required for read-only access

7.2 If SDM Is Disabled

SDM can be disabled in the project configuration to save CPU memory (about 200-400 kB of DRAM). If it’s disabled, you’ll get a 404 or connection refused on port 80.

To re-enable SDM, you need to download a new project configuration — which requires BOOT mode or existing Automation Studio access.

See also: diagnostics-sdm.md


8. Factory Reset / Full Wipe Procedures

8.1 Method 1: CF Card Format (HDD/CF Utility)

Prerequisites: Automation Studio installed on a Windows PC, PLC accessible via network or serial.

Automation Studio > Online > Settings > [select your PLC] > right-click > HDD/CF Utility

The HDD/CF utility allows you to:

  1. Format the CF card (destroying all user data including credentials)
  2. Repartition the CF card
  3. Initialize the CF card for a fresh installation

After formatting:

  • All user programs are gone
  • All user accounts and passwords are gone
  • The PLC boots into BOOT mode
  • You can install a new, clean project

8.2 Method 2: Runtime Utility Center

Runtime Utility Center (RUC) can execute the HDD/CF utility without requiring a full Automation Studio installation. This is useful if you don’t have AS installed.

  1. Install Runtime Utility Center from B&R’s website
  2. Connect to the PLC (requires knowing its IP address or using auto-discovery)
  3. Execute the HDD/CF utility

Limitation: RUC has less capability than AS for browsing/set IP address. In BOOT mode, the PLC needs DHCP to get an IP, which may be impractical.

8.3 Method 3: Physical CF Card Replacement

The most brute-force approach:

  1. Power down the PLC
  2. Remove the existing CF card
  3. Insert a new, blank B&R-certified CF card
  4. Power up — the PLC will go to BOOT mode (no system ROM on the blank card)
  5. Connect via Automation Studio and install a fresh system + your project

This preserves the original CF card as a backup in case you need to recover anything later.

8.4 Method 4: USB Flash Drive Installation

If you have a prepared USB installation package (a .zp2 or .zp3 file created by Automation Studio):

  1. Copy the installation package to a FAT32-formatted USB stick
  2. Set the PLC to BOOT mode
  3. Insert the USB stick
  4. The PLC will detect and install the package automatically
  5. This performs an initial installation that wipes the previous configuration

8.5 Hardware Reset Button Procedure

Step 1: Locate the reset button (below USB interfaces, on the bottom of the CPU housing)
Step 2: Press and hold with a pointed object
Step 3: The STATUS LED will flash orange after ~10 seconds
Step 4: Release the button
Step 5: The CPU returns to factory defaults (DHCP enabled, no application)

Note: This procedure resets network settings and clears the running application, but it does not format the CF card. Any passwords stored on the CF card persist.

See also: bootloader-recovery.md, cf-card-boot.md, firmware-version-mgmt.md


9. Serial Console Access

9.1 RS232 Interface

The CP1584 has an RS232 interface (IF1) on the 12-pin terminal block. This interface can be used as an online programming interface.

Pinout (X20TB12 terminal block):

PinSignal
1RX
2TX
3GND

Connection parameters: 57600 baud (factory default), 8-N-1, no flow control. If the default doesn’t work, the baud rate may have been reconfigured in the original project — try 9600, 19200, 38400, or 115200.

9.2 Serial Access Limitations

The RS232 interface on the CP1584 is primarily designed for:

  • Automation Studio serial connection (legacy)
  • Serial communication with external devices (configured in the application)
  • Boot loader serial console (for firmware recovery)

It does not provide a shell or command-line interface to the VxWorks-based operating system. You cannot log in via serial and reset passwords. However, it can be used for:

See also: serial-diagnostics.md


10. Network-Level Access When All Else Fails

10.1 What You Can Always Access (If Configured)

Even without any passwords, these interfaces are typically open by default:

InterfacePortAccess
SDM web interface80No auth (read-only)
ANSL discovery30303/11169 UDPNo auth (read-only broadcast)
OPC-UA4840May allow anonymous
FTP21Default br:br
VNC5900May be unconfigured

10.2 The “Nuclear Option” Workflow

When you have absolutely no credentials and need full access:

1. BACK UP THE CF CARD FIRST
   - Power down, remove CF card, image it to your PC
   - See cf-card-boot.md for imaging procedure
   - Store the image safely

2. SET PLC TO BOOT MODE
   - Switch the operating mode switch to BOOT
   - Power up
   - PLC is now in Boot AR, no application running

3. CONNECT VIA AUTOMATION STUDIO
   - Auto-search should find the PLC (DHCP or hardware address)
   - No application-level passwords are active in BOOT mode

4. CHOOSE YOUR PATH:
   Option A: Create a minimal new project, download it
   Option B: If you have a .apj backup with known passwords, download that
   Option C: Use HDD/CF utility to completely wipe and start fresh

5. RESTORE FROM YOUR ANALYSIS
   - Use the forensic data from cp1584-forensics.md to reconstruct functionality
   - See project-reconstruction.md for the full reconstruction methodology

10.3 Preserving the Running Application

If you need to keep the machine running while regaining access:

  1. FTP into the CF card and back up all files
  2. OPC-UA browse (if anonymous) to document the variable namespace
  3. SDM to capture all diagnostic data
  4. Network sniff POWERLINK traffic to document I/O mapping (see io-sniffing.md)
  5. Schedule a planned shutdown for the CF card swap

11. Security Implications of Having Full Access

11.1 What Full Access Means

Once you have full access to the CP1584:

  • You can read/write any PLC variable
  • You can modify the running program
  • You can change I/O mapping
  • You can modify safety system parameters (if safe I/O is configured)
  • You can change network configuration
  • You can enable/disable any service (OPC-UA, FTP, VNC, SDM, web server)
  • You can install new firmware

11.2 Safety System Considerations

If the machine has B&R Safe I/O modules (SafeLOGIC, Safe I/O):

  • Safety programs are separate from standard programs
  • Safety parameters have their own protection mechanism
  • Modifying safety parameters without proper validation can create dangerous conditions
  • Always validate safety-related changes through proper procedures

11.3 Securing the System After Recovery

After gaining access and reconstructing functionality:

  1. Set a new Automation Studio online login with proper user levels
  2. Configure OPC-UA user roles if exposing the PLC to a SCADA/MES system
  3. Change FTP credentials from defaults
  4. Set VNC passwords if VNC is enabled
  5. Document all credentials in your maintenance manual
  6. Consider disabling unused services (FTP, web server) to reduce attack surface
  7. Enable OPC-UA certificates for production environments

See also: safe-io-diagnostics.md, documentation-reconstruction.md


12. brwatch: External Service Tool for Variable Access Without Project

12.1 What Is brwatch?

brwatch (https://github.com/hilch/brwatch) is a free Windows service tool for B&R PLCs that provides variable watch, change, logging, IP configuration, and CPU reboot capabilities without requiring Automation Studio or the original project. This is one of the most valuable community tools for engineers working with undocumented B&R systems.

12.2 Capabilities

FeatureDescription
Watch variablesMonitor live variable values from any connected B&R PLC
Change variablesWrite values to PLC variables (setpoints, flags, parameters) at runtime
Log variablesRecord variable values over time to a log file for trending
Search variablesBrowse and search the variable namespace of a connected PLC
Set IP addressesChange PLC network configuration (IP, subnet, gateway)
Reboot CPUsRemotely restart connected PLCs
List PLCsDiscover all B&R PLCs on the network

12.3 Installation and Setup

# Download the latest release from GitHub
# https://github.com/hilch/brwatch/releases

# Run the installer (Windows)
# brwatch installs as a Windows service
# Configure the target PLC IP address in brwatch settings

12.4 Using brwatch Without Project Files

brwatch connects to the PLC via PVI and can enumerate variables that are visible in the runtime — even without the original project. This makes it valuable for:

  1. Checking which variables are accessible before investing in PVI/OPC-UA setup
  2. Making quick parameter changes on the running machine (setpoints, flags)
  3. Logging variable trends to diagnose intermittent issues
  4. Discovering the variable namespace as input for project reconstruction

12.5 Relationship to PVI

brwatch uses the B&R PVI infrastructure internally (PVI Manager). It requires either PVI 4.x or PVI 6.x installed on the workstation. On AS6, only ANSL lines are supported (INA2000 is removed). See pvi-api.md for PVI configuration details.

12.6 Comparison: brwatch vs Automation Studio vs PVI/OPC-UA

CapabilitybrwatchAutomation StudioOPC-UA ClientPVI API
Watch variablesYesYes (with connection)Yes (subscribe)Yes (poll)
Change variablesYesYes (with connection)Yes (write)Yes (write)
Log to fileYesLimited (Trace)Via externalVia script
Set IP addressYesYesNoNo
Reboot PLCYesYesNoNo
Requires projectNoYesNoNo
Requires AS licenseNoYesNoNo
FreeYesNo (requires license)Yes (UaExpert)No (PVI SDK)

brwatch is the recommended first tool for quick assessment of an undocumented PLC. See also: pvi-api.md, python-diagnostics.md.


13. Pvi.py: Python Access Without Automation Studio

13.1 What Is Pvi.py?

Pvi.py (https://github.com/hilch/Pvi.py) is a Python wrapper for B&R PVI that enables programmatic access to PLC variables from Python scripts without Automation Studio. This is the foundation for building automated diagnostic tools.

13.2 Quick Start

## pip install pvi  (or clone from GitHub)
from pvi import Pvi

plc = Pvi()
## Connect to PLC using ANSL line
plc.line_set(
    line_name="ANSL",
    ip="192.168.0.14",
)
plc.connect()

## Read a variable
value = plc.variable_read("MachineData.Temperature")
print(f"Temperature: {value}")

## Write a variable
plc.variable_write("MachineData.TargetRPM", 1500)

13.3 When Pvi.py Is Useful

  • Automated diagnostic scripts that poll PLC variables
  • Building custom monitoring dashboards without AS
  • Automated setpoint changes based on external logic
  • Batch variable extraction for documentation purposes

See python-diagnostics.md for comprehensive Python diagnostic script examples.


14. BOOT Mode: Service State Recovery

14.1 The Problem

A CP1584 can become stuck in “BOOT mode: Service” — a state where the Boot AR firmware is running but the controller cannot proceed to RUN or SERVICE mode. This typically indicates corrupted firmware or missing system files on the CF card.

14.2 Recovery Procedure

Based on B&R community discussions (https://community.br-automation.com/t/plc-module-stuck-in-boot-mode-service/8634):

  1. Verify the operating mode switch is set to BOOT (not RUN or DIAG)
  2. Check if Automation Studio can find the PLC via Auto Search (it should appear if Boot AR is running)
  3. Connect and check the error in Automation Studio’s connection dialog — the error message indicates what’s corrupted
  4. Try installing a fresh system runtime via Automation Studio transfer (Application > Transfer to Target)
  5. If transfer fails, try formatting the CF card via HDD/CF Utility and performing a fresh installation
  6. If the CF card itself is corrupted, image the card and restore from backup or use a new CF card

14.3 Serial Recovery

If network access is impossible:

  1. Connect RS232 serial cable to IF1 (12-pin terminal block, pins 1=RX, 2=TX, 3=GND)
  2. Set baud to 57600 (or try 9600, 19200, 38400, 115200)
  3. Some B&R controllers accept TFTP boot commands via serial — see bootloader-recovery.md

See also: bootloader-recovery.md, cf-card-boot.md


15. BrSecurity Library: Password/Encrypt/Decrypt

The BrSecurity library (https://github.com/br-automation-community/awesome-B-R) is a community library providing security functions for B&R Automation Studio projects:

  • Password hashing and verification
  • String encryption/decryption
  • Secure data storage

If the original project used BrSecurity for credential management, the password verification algorithm is embedded in the compiled code. Understanding this library may help when:

  • You can extract the compiled binary and identify BrSecurity usage
  • You need to replicate the same password scheme in a new project
  • You’re trying to verify if a guessed password matches

Note: This library is community-developed, not an official B&R product.


Key Findings

  1. B&R has no factory default administrator accounts. All credentials are OEM-defined and application-specific.
  2. BOOT mode bypasses all application security. Setting the physical switch to BOOT and downloading a new project is the most reliable recovery path.
  3. The CF card holds all secrets. User credentials are stored in compiled application data and/or the CF card’s secure partition with SHA256 encryption.
  4. SDM is typically unauthenticated. The web diagnostic interface is your primary entry point for assessing an unknown PLC.
  5. FTP defaults are br:br. This is the most commonly unchanged credential on B&R systems.
  6. VNC defaults are typically v (view) and c (control). But VNC must be configured in the project — it may not be enabled at all.
  7. The nuclear option (CF card format + fresh install) is always available but requires Automation Studio and results in complete loss of the existing application.
  8. Always image the CF card before making changes. The original application and configuration are your only reference for reconstruction.
  9. brwatch is the fastest way to gain access to an undocumented PLC’s variables — it requires no AS project, no AS license, and can enumerate, watch, and change variables from a Windows PC.
  10. Pvi.py enables automated Python access for building diagnostic scripts, monitoring dashboards, and batch documentation tools without Automation Studio.

Sources

B&R Documentation

  • B&R Automation Studio Online Help — CPU Properties > User Administration
  • B&R Automation Runtime Manual — Service Mode and Diagnostic Mode specifications
  • B&R X20 System User’s Manual — operating mode switch, LED indicators, and recovery procedures
  • B&R CF Card Handling Guide — backup and restore procedures

B&R Community Forum

  • community.br-automation.com — discussions on password recovery, BOOT mode, FTP defaults, and VNC configuration

B&R License Management When the OEM is Gone

A practical reference for automation engineers maintaining B&R CP1584 PLCs inherited from defunct OEMs with zero documentation.


1. Overview

The Licensing Challenge

When you inherit a B&R machine from a defunct or unreachable OEM, you face a unique licensing problem. B&R Automation’s licensing model is built around a system called Technology Guarding (TG), which ties software and runtime licenses to physical hardware containers (USB dongles) or software containers. Unlike Siemens TIA Portal licenses that can sometimes be recovered through factory support portals, B&R licenses are tightly coupled to the original purchasing entity’s account and the physical dongle they shipped on.

The core problems you face:

  1. No B&R portal access – the OEM owned the account; you cannot log in to manage licenses.
  2. Dongle custody – the TG USB dongle may be missing, damaged, or stuck with expiring licenses.
  3. Unknown license inventory – you do not know which licenses (AS, AR, mapp components) were purchased.
  4. Perpetual vs. time-limited confusion – mixing AS (annual) and AR (perpetual) licenses on one dongle creates transfer deadlocks.
  5. No documentation – no license keys, no purchase records, no activation records.

What Licenses Are Typically Needed

License CategoryPurposeTypeTypical Duration
Automation Studio (AS)IDE for programming, configuration, diagnosticsTime-limited (AS)1 year, auto-renews with service
Automation Runtime (AR)Runtime execution on PLC (CP1584)Perpetual (AR)No expiration
mapp ViewHMI/web visualization frameworkTG-licensedPerpetual or time-limited
mapp AlarmXAlarm managementTG-licensedPerpetual
mapp IOI/O mapping and diagnosticsTG-licensedPerpetual
mapp UserUser management and authenticationTG-licensedPerpetual
mapp SafetySafety function blocks (requires Safety Designer)TG-licensedPerpetual (safety-critical)
Safety DesignerConfiguration of safety functionsTG-licensedPerpetual
OPC UA (mapp)OPC UA server/clientTG-licensedPerpetual
Motion / CNCMotion control, CNC functionalityTG-licensedPerpetual

Technology Guarding Ecosystem Overview

                          B&R License Server
                         (license.br-automation.com)
                                    |
                          TLS 1.2 / HTTPS
                                    |
            +-----------------------+-----------------------+
            |                                               |
     Technology Guarding                          CodeMeter Runtime
     Desktop Application                     Service (Windows Service)
            |                                               |
     License Management UI             Container Detection & Decryption
     (Activate / Deactivate)                    |
            |                                   +--------+--------+
            +-------+-------+-------+                  |        |
                    |       |       |          USB Dongle   Software
                Dongle   X20CMR  Software   (0TG1000.02)  Container
              (USB)    Modules  Container                  (VM-bound)

2. Technology Guarding Architecture

CodeMeter by Wibu-Systems

Technology Guarding is B&R’s branding of the Wibu-Systems CodeMeter digital rights management (DRM) platform. CodeMeter is a widely-used licensing framework in industrial automation (also used by Lenze, Bosch Rexroth, and others). Understanding this helps because:

  • The CodeMeter Runtime Service is a Windows service that must be running for AS to function.
  • The CodeMeter Control Center (separate from TG) can inspect dongles and software containers.
  • Error codes beginning with WB (e.g., WB47, WB67) originate from CodeMeter, not B&R’s TG layer.
  • Firmware updates to the dongle are actually CodeMeter firmware operations.

License Container Types

ContainerPart NumberDescriptionBinding Mechanism
USB Dongle0TG1000.02Physical USB stick, most commonHardware-bound (portable)
USB Dongle (CmStick)0TG1000.02Same as above, Wibu nomenclatureHardware-bound
Software ContainerLicensed to a specific PCBound to hardware fingerprint (CPU, motherboard, MAC)
X20CMR ModuleX20CMR0190 (and others)Built-in TG in X20 bus moduleHardware-bound to module
Network DongleDongle on network shareHardware-bound (remote)

USB Dongle (0TG1000.02)

  • The primary license container shipped by B&R.
  • Can hold multiple licenses (AS + AR + multiple mapp components).
  • Plugs into PC for AS licensing, or into PLC for AR licensing.
  • Portable between machines (by design).
  • Fragile: physical damage or firmware corruption renders all licenses on it inaccessible.

Software Container

  • A license bound to a specific PC’s hardware fingerprint.
  • Created during “Activate on this PC” operations in TG.
  • Critically: invalidated by any hardware change – VM migration, snapshot revert, hardware upgrade, motherboard replacement.
  • NOT recommended for production environments.
  • Suitable only for development PCs that never change hardware.

X20CMR Modules

  • Select X20 system modules have a built-in Technology Guard element.
  • Allows AR license activation directly on the PLC hardware (no dongle needed for AR).
  • The module’s TG element is treated as a license container, similar to a dongle.
  • Useful for machines where the PLC itself should hold the runtime license permanently.

License Types

AS Licenses (Time-Limited)

  • Duration: 1 year from activation.
  • Auto-renew: renews automatically when a valid B&R service contract exists and the license can reach the B&R server.
  • Stops auto-renewing if the service contract lapses or the OEM goes bankrupt.
  • Cannot be returned to the B&R server after expiration (by design).
  • Key risk: if an expired AS license sits on the same dongle as perpetual AR licenses, the AR licenses become trapped because returning any license from the dongle requires all licenses to be in a valid state.

AR Licenses (Perpetual)

  • No expiration date.
  • Tied to the PLC hardware or a dongle.
  • Not affected by service contract status.
  • Stored separately from AS licenses in most deployment scenarios (AR on PLC, AS on PC dongle).
  • Can be activated via PLC network connection or by plugging the dongle into the PLC.

mapp Component Licenses

  • Most mapp components are perpetual licenses.
  • Stored on the same TG container as AS licenses (typically the USB dongle).
  • Required at download time (AS verifies mapp licenses before downloading to PLC).
  • Some mapp components have different licensing models; verify individually.

Server-Activated vs. Offline Licensing

ModeDescriptionUse Case
Online ActivationLicense key validated against B&R server in real timeNormal operation, internet-connected
Offline LicensingRequest file generated offline, imported into TGAir-gapped machines, no internet access

Online activation requires:

  • TLS 1.2 support (mandatory since March 2024).
  • TG software version >= 1.4.
  • CodeMeter Runtime >= 6.70.

License Key Format

B&R license keys follow this pattern:

xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

25 characters total (5 groups of 5), alphanumeric. This key is your primary asset – treat it like a serial number. It is NOT the dongle serial number. The key is what you activate on the dongle; the dongle is the storage medium.


3. Identifying What Licenses You Have

Step 1: Locate the Physical TG Dongle

Physically inspect the machine and control cabinet:

  • Check the engineering PC USB ports.
  • Check the PLC panel – some machines have the dongle permanently plugged into the PLC.
  • Check spare parts boxes and documentation folders.
  • Check the CF card (CompactFlash) in the PLC – license documentation is sometimes stored there.
  • The dongle is a small USB stick, typically green/blue, branded “CodeMeter” or “B&R.”

Step 2: Inspect the Dongle with Technology Guarding Software

  1. Install TG software (see Section 4).
  2. Plug the dongle into your PC.
  3. Launch Technology Guarding (BR.AS.License.UI.exe).
  4. The UI will show all licenses on the connected dongle.

Alternative: CodeMeter Control Center

  1. Install CodeMeter Runtime (included with TG installation).
  2. Launch CodeMeter Control Center from Start Menu.
  3. Navigate to the dongle under “Devices.”
  4. Select “License” tab to see individual license entries.

Step 3: Check PLC for AR Licenses

AR licenses stored on the PLC can be checked via:

Method A: SDM (Service & Diagnostics Manager)

  1. Connect to PLC via Ethernet.
  2. Open SDM in Automation Studio.
  3. Navigate to PLC > Diagnostics > License.

Method B: OPC-UA

  1. Connect to PLC OPC-UA server.
  2. Browse to Automation.Components.AR.License namespace.
  3. Read license status nodes.

Method C: PLC Web Interface

  1. Open PLC IP in browser.
  2. Navigate to System > License (on supported firmware versions).

Step 4: Find License Documentation on the CF Card

B&R PLCs use CompactFlash (or CFast) cards. Remove the card and check:

/System/License/
/System/Documentation/
/License/
/Config/

Look for files named:

  • LicenseKey*.txt
  • License.txt
  • ActivationLog*.xml
  • Any .txt or .pdf files with “license” in the name

Step 5: Check AS for Installed mapp Components

  1. Open the existing AS project (if available).
  2. In Solution Explorer, expand Logical View > mapp.
  3. Each mapp component with a lock icon requires a license.
  4. Check Project > Properties > mapp for a summary.
  5. If AS is running with the dongle, open Tools > Technology Guarding to see what mapp licenses are detected.

Step 6: Determine Active vs. Installed Licenses

A license being “present” on the dongle does not mean it is “in use.” To determine active usage:

  • AR licenses: always in use if the PLC is running.
  • AS licenses: in use if AS is open on a PC with the dongle.
  • mapp licenses: in use if mapp function blocks are instantiated in the running project and the PLC is executing them.
  • Check PLC runtime: if the PLC is running, AR and active mapp licenses are in use. A PLC in stop state still “holds” its AR license but may not require mapp licenses.

4. Technology Guarding Software Setup

Download

TG software is available from B&R’s website. It is included in the PVI Development Setup download package.

Direct download path on B&R website:

  1. Navigate to www.br-automation.com
  2. Downloads > Software > Automation Studio > PVI Development Setup
  3. Download the version matching your AS version.

The TG component within the installer is: USB: 1TG0500.02 (Technology Guarding).

Installation

  1. Run the PVI Development Setup installer.
  2. When prompted for components, select only:
    • USB: 1TG0500.02 (Technology Guarding)
    • PVI Runtime (if not already installed)
  3. Complete the installation.

The installer places:

  • TG application: C:\Program Files\BR\TechnologyGuarding\BR.AS.License.UI.exe
  • State file: C:\ProgramData\BR\TechnologyGuarding\BR.AS.License.UI.state
  • CodeMeter Runtime service (installed as Windows service)

Version Requirements

ComponentMinimum VersionWhy
TG Software>= 1.4TLS 1.2 support for B&R server communication
CodeMeter Runtime>= 6.70Required for AS operation and modern crypto
.NET Framework>= 4.6TLS 1.2 API availability
Windows7 SP1 / 10 / 11 / Server 2012 R2+OS compatibility

Critical: Since March 2024, B&R’s license server requires TLS 1.2. AS versions below 4.6 cannot license from within AS itself. Use TG standalone >= v1.4 instead.

CodeMeter Runtime Service

  • Must be running for AS to detect the dongle and validate licenses.
  • Service name: CodeMeter Runtime Server (or localized equivalent on non-English systems).
  • Start manually: Services MMC, or:
    net start "CodeMeter Runtime Server"
    
  • Set to Automatic startup for production PCs.

Server Configuration

When first launching TG standalone:

  1. TG will prompt for server credentials.
  2. If you do not have the OEM’s B&R portal credentials, you can leave the username/password blank or fill with placeholder text.
  3. For activation with a known license key, the server communication is minimal – the key is validated, not authenticated against a user account.
  4. The TG standalone tool can activate a license with just the key string, even without a valid portal login.

Offline Licensing Mode

For air-gapped systems (no internet at the PLC or engineering PC):

  1. On an internet-connected PC with TG installed, start the offline activation process.
  2. TG generates a request file (XML/encrypted) containing the license key and container ID.
  3. Transfer the request file to the B&R license server manually (e.g., via email from a different PC).
  4. The server returns an activation file.
  5. Transfer the activation file back to the air-gapped PC.
  6. Import the activation file into TG.

Alternatively, B&R support can process offline activations via email if you provide the dongle serial number and license key.


5. License Transfer Between Hardware Units

Moving Licenses from Old Dongle to New Dongle

Prerequisites:

  • Both dongles must be functional (not stuck in firmware update mode).
  • Licenses to be transferred must NOT be expired (expired licenses cannot be returned).

Method A: Via PLC (Network Transfer)

  1. Plug the source dongle (old) into the target PLC’s USB port.
  2. Connect to the PLC from AS (or SDM).
  3. Activate the new licenses on the PLC’s TG element (or a dongle already on the PLC).
  4. Once the PLC has the licenses, the source dongle’s licenses are consumed (transferred).
  5. Remove the old dongle.

Method B: Direct Transfer (PC-Based)

  1. Plug the source dongle (old) into the PC.
  2. Plug the target dongle (new) into the PC.
  3. Open TG software.
  4. Select the source dongle, choose “Deactivate” or “Return” for specific licenses.
  5. If return succeeds, activate those licenses on the target dongle.

Critical Limitation: If the source dongle has ANY expired license, the return operation may be blocked for ALL licenses on that dongle. See Section 7 for the workaround.

Software Container Migration

Do NOT use software containers on VMs. Software containers are bound to hardware fingerprints. Any of the following will invalidate the container:

  • VM migration (moving to different host hardware).
  • VM snapshot revert (restores old hardware fingerprint data).
  • VM clone/copy.
  • Virtual hardware upgrade (changing vCPU count, RAM, NIC MAC).
  • Hypervisor host change.

If you must use a software container:

  • Use it only on a physical PC.
  • Do not upgrade the PC’s hardware.
  • Back up the container activation files (from C:\ProgramData\BR\TechnologyGuarding\).

6. Activating Licenses Without Original B&R Portal Account

Using TG Standalone with License Key Only

This is the most common scenario when the OEM is gone:

  1. Install TG software (Section 4).
  2. Plug in a functional TG dongle (new or existing).
  3. Launch TG (BR.AS.License.UI.exe).
  4. When prompted for credentials, enter any placeholder text for username and password (e.g., “user” / “user”). The TG standalone tool does not strictly validate these for license key activation.
  5. Select “Activate license online”.
  6. Enter the 25-character license key: xxxxx-xxxxx-xxxxx-xxxxx-xxxxx.
  7. Select the target container (dongle) from the dropdown.
  8. Click Activate.

If the license key is valid and has activations remaining, the activation will succeed without OEM portal credentials.

If Online Activation Fails

Possible causes:

  • License key already fully activated on other dongles (max activations reached).
  • B&R server rejects activation for keys tied to accounts in bad standing (bankrupt OEM).
  • Network/firewall blocking TLS 1.2 to B&R server.

Escalation path:

  1. Contact B&R support ([email protected]).
  2. Provide the license key and dongle serial number.
  3. Explain the situation (OEM defunct, you are the new machine owner/maintainer).
  4. B&R can:
    • Reset activation counts on the server.
    • Reassign licenses to a new account.
    • Issue replacement license keys in extreme cases.

Getting Help from B&R Support

When contacting B&R support as a non-original customer:

  1. Have ready: license keys, dongle serial number(s), PLC serial number, machine location.
  2. Explain clearly: “The OEM (name) is no longer in business. We maintain this machine and need to manage the B&R licenses.”
  3. B&R support is generally helpful in these situations, but response times vary.
  4. For safety-related licenses (mapp Safety, Safety Designer), B&R may require additional verification.
  5. Create a new B&R portal account in your company’s name before calling – they may reassign licenses to your account.

7. Common License Problems and Solutions

Problem: TG Dongle Stuck in Firmware Update Mode (WB47 / WB67)

Symptoms:

  • TG software detects the dongle but shows it as “updating” indefinitely.
  • Error code WB47 or WB67 in CodeMeter / TG.
  • AS cannot detect the dongle.
  • Dongle LED may flash continuously or stay off.

Cause: The dongle’s CodeMeter firmware became corrupted during an update attempt, or the update was interrupted (USB disconnect, power loss, AS crash).

Solution:

  • There is no user-serviceable fix. The dongle must be returned to B&R for repair/replacement.
  • Contact B&R support with the dongle serial number.
  • B&R will typically re-flash the dongle and restore licenses from their server records (if licenses were properly activated and recorded).
  • If the dongle is out of warranty, there may be a cost for this service.
  • Do NOT attempt to flash the dongle firmware yourself using third-party CodeMeter tools.

Prevention:

  • Never disconnect the dongle while TG or AS is running.
  • Never unplug during a license activation/deactivation operation.
  • Use a USB port with stable power (not a hub, not a front-panel port on a flaky PC).

Problem: AS License Expired Before 1 Year

Symptoms: AS shows “license expired” despite being activated less than a year ago.

Cause: The TG system time on the dongle was reset or corrupted. If the dongle’s internal clock was not properly synchronized, the expiration calculation can be wrong.

Solution:

  1. Ensure the PC’s system time is correct.
  2. Plug the dongle in and open TG software.
  3. TG should re-synchronize the dongle’s internal time with the PC.
  4. If the dongle time is severely off, the license may appear expired permanently.
  5. Contact B&R support for a license key reset in this case.

Problem: TLS 1.2 Blocking

Symptoms: TG cannot connect to B&R license server. Error about SSL/TLS or connection refused.

Cause: Since March 2024, B&R requires TLS 1.2. Older TG versions or .NET configurations default to TLS 1.0/1.1.

Solution: Force TLS 1.2 in .NET via Windows Registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001
"SystemDefaultTlsVersions"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001
"SystemDefaultTlsVersions"=dword:00000001

After applying, restart the PC and retry.

Alternative: Upgrade TG to >= 1.4 and CodeMeter Runtime to >= 6.70.

Problem: CodeMeter Runtime Service Not Running

Symptoms: AS shows “no dongle found” or “license system unavailable.” TG software shows no containers.

Solution:

net start "CodeMeter Runtime Server"

If the service fails to start:

  1. Check Windows Event Viewer for errors.
  2. Reinstall CodeMeter Runtime from the TG installer.
  3. Ensure no other CodeMeter instances from other software (Lenze, Bosch) are conflicting.
  4. Restart the PC.

Prevention: Set the service to Automatic startup type.

Problem: “Maximum Number of Activations Reached”

Symptoms: TG reports that the license key cannot be activated because all activations are used.

Cause A: Genuine over-activation. The license was activated on multiple dongles/PCs by the OEM.

Cause B: File permission issue. TG cannot write its state file.

Check file permissions:

The TG state file must be writable:

C:\ProgramData\BR\TechnologyGuarding\BR.AS.License.UI.state
  1. Open Properties > Security on this file.
  2. Ensure the current user has Full Control.
  3. Ensure the folder C:\ProgramData\BR\TechnologyGuarding\ is also writable.
  4. If permissions are correct and activations are genuinely exhausted, contact B&R support for a reset.

Problem: License Activated on Wrong Dongle (Third-Party Dongle)

Symptoms: A license appears on a dongle that is not the B&R TG dongle. CodeMeter Control Center shows the license under a different manufacturer’s container.

Cause: If the PC has CodeMeter drivers from another vendor (e.g., Lenze, Bosch Rexroth), the TG activation may target the wrong container.

Solution:

  1. Disconnect all non-B&R CodeMeter dongles.
  2. Open CodeMeter Control Center.
  3. Identify the B&R dongle by its serial number.
  4. In TG, explicitly select the correct dongle/container before activating.
  5. If already activated on the wrong container, return it from the wrong container first, then activate on the correct one.

Problem: Software Container Invalidation in VMs

Symptoms: After VM migration or snapshot, all TG licenses show as invalid or missing.

Cause: Software containers are hardware-fingerprint-bound. VM changes invalidate the fingerprint.

Solution:

  1. Do not use software containers on VMs (preventive measure).
  2. If already in this state: return the invalid container activation (may not work if fingerprint is completely changed).
  3. Re-activate licenses on a USB dongle instead.
  4. If no dongle is available, contact B&R support.

Error Code Reference Table

Error CodeSourceDescriptionSeverityResolution
WB47CodeMeterDongle firmware update failed / stuckCriticalReturn dongle to B&R
WB67CodeMeterDongle communication error / firmware issueCriticalReturn dongle to B&R
10080TG / .NETNetwork timeout connecting to B&R serverMediumCheck firewall, TLS 1.2
262CodeMeterLicense not found on containerMediumCheck license key, container ID
71CodeMeterContainer access denied / permission issueMediumCheck file permissions on state file
280TGMaximum activations reachedMediumReturn unused activations or contact B&R
281TGLicense expiredMediumRenew or use evaluation
282TGLicense not yet valid (date issue)LowCheck system time
283TGLicense returned successfullyInfoNormal operation
501CodeMeterDongle removed during operationMediumReinsert dongle, retry
502CodeMeterDongle hardware failureCriticalReplace dongle
600CodeMeterSoftware container fingerprint mismatchCriticalReactivate on new container
601CodeMeterSoftware container corruptedCriticalReturn and reactivate
700TGServer communication failedMediumCheck internet, TLS 1.2
701TGInvalid license key formatLowCheck key: xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
702TGLicense key not found in B&R databaseMediumVerify key with B&R support
703TGAccount / credential validation failedMediumUse placeholder credentials with standalone TG

8. Evaluation Licenses

Using AS Evaluation Licenses as a Stopgap

When you have no valid AS license and need immediate access to the IDE for diagnostics or minor changes:

  1. Download Automation Studio from B&R website (full installation).
  2. During installation, select “Evaluation” mode.
  3. AS will run in evaluation mode for 30 days (typical; may vary by version).

What evaluation mode provides:

  • Full AS IDE functionality.
  • Ability to connect to PLCs, upload/download projects.
  • Ability to go online and diagnose.
  • Ability to edit logic and download changes.

What evaluation mode restricts:

  • Time-limited (30 days typically).
  • May have watermarks or “Evaluation Mode” indicators.
  • Not suitable for safety-related work (mapp Safety changes).
  • Cannot be used for production deployment in a commercial setting.

When Evaluation Licenses Are Sufficient

Evaluation AS licenses are appropriate for:

  • Initial forensics on an inherited machine (reading the project, understanding logic).
  • Diagnostics and troubleshooting (going online, monitoring variables).
  • One-time code changes (quick fixes, parameter adjustments).
  • Emergency recovery situations where you need AS access immediately.

Evaluation AS licenses are NOT appropriate for:

  • Ongoing development (they expire).
  • Safety-related modifications (mapp Safety requires proper licensing).
  • Any work that needs to be audited or documented for regulatory compliance.

Important: Evaluation + Existing Dongle

You can run AS in evaluation mode while keeping the TG dongle plugged in for AR and mapp licenses. The evaluation license covers AS IDE access; the dongle covers the runtime and mapp component licensing. This is a practical workaround when the AS license on the dongle is expired but the AR/mapp licenses are still valid and you cannot return them.


9. mapp Component Licenses

Common mapp Components

mapp ComponentFunctionLicense TypeNotes
mapp ViewHMI visualization, web-basedPerpetualRequired for any HMI development
mapp AlarmXAlarm management, loggingPerpetualHandles alarm configuration and display
mapp IOI/O configuration and diagnosticsPerpetualAuto-discovery of I/O modules
mapp UserUser authentication and rolesPerpetualLogin/logout, role-based access
mapp SafetySafety function blocksPerpetualRequires Safety Designer license separately
Safety DesignerSafety function configurationPerpetualPart of mapp Safety ecosystem
mapp MotionMotion controlPerpetualAxis configuration, camming, gearing
mapp CNCCNC functionalityPerpetualG-code support, CNC machining
mapp OPC UAOPC UA server and clientPerpetualIndustry-standard communication
mapp DatabaseDatabase connectivityPerpetualSQL/NoSQL database access
mapp AuditAudit trail loggingPerpetualTraceability and compliance
mapp EnergyEnergy monitoringPerpetualPower consumption tracking

Determining Which mapp Components Are Licensed

Method 1: TG Software

  1. Open TG with dongle connected.
  2. Browse the license list on the container.
  3. Each mapp license appears as a separate entry (e.g., “mappView,” “mappAlarmX”).

Method 2: CodeMeter Control Center

  1. Open CodeMeter Control Center.
  2. Select the dongle.
  3. View Product Items – each mapp component has a distinct product code.

Method 3: AS Project

  1. Open the AS project.
  2. Expand Logical View > mapp in Solution Explorer.
  3. Each mapp component folder present indicates that component is used in the project.
  4. Cross-reference with TG to confirm licensing.

What Happens When a mapp License Expires

  • AS behavior: AS will show a warning when opening the project. You can still view the code but may not be able to download to PLC.
  • PLC behavior: The PLC continues to run the existing code. mapp components already loaded and executing on the PLC do not stop when the license expires on the dongle/PC.
  • Download restriction: You cannot download a project to PLC if required mapp licenses are missing/expired on the TG container used by AS.
  • Runtime implications: For mapp components that check licenses at runtime (rare), functionality may degrade.

mapp Safety Specific Considerations

mapp Safety licensing has additional constraints:

  • Safety Designer requires its own TG license (separate from mapp Safety runtime).
  • Safety-related function blocks will not compile/download without valid Safety Designer and mapp Safety licenses.
  • Do not attempt to modify safety logic without proper licensing. If safety logic needs changes and no safety license is available, contact B&R support immediately – this is a safety-critical gap.
  • Safety licenses may have additional transfer restrictions compared to standard mapp licenses.

10. Automation Runtime Licenses

AR License Types

License TypeDescriptionContainerDuration
AR StandardStandard Automation RuntimePLC or DonglePerpetual
AR SafetyAR with Safety functionalityPLC or DonglePerpetual
AR FieldbusAR with Fieldbus supportPLC or DonglePerpetual
AR ServiceService contract license (enables updates)PLCPerpetual (valid while service active)

AR License Storage Locations

AR licenses can be stored on:

  1. The PLC itself (via X20CMR module or built-in TG element).
  2. A USB dongle plugged into the PLC.
  3. A software container on the PC running AS (for download-time validation only – the AR license itself must be on the PLC or its dongle).

Best practice: AR licenses should be on the PLC or a dongle permanently attached to the PLC, not on a portable dongle shared with AS.

AR License Activation via PLC

If the PLC has a TG-capable element (X20CMR module):

  1. Connect the PLC to the network with internet access.
  2. In TG, select the PLC’s TG element as the target container.
  3. Activate the AR license key on the PLC’s TG element directly.
  4. No dongle required.

If using a dongle:

  1. Plug the TG dongle into the PLC’s USB port.
  2. From a network-connected PC, use TG or SDM to activate the AR license on the dongle while it’s on the PLC.
  3. Alternatively, plug the dongle into a PC, activate the AR license, then move the dongle to the PLC.

Checking AR License Status Without AS

If AS is unavailable (no license, no installation):

  1. SDM (Service & Diagnostics Manager) can connect to the PLC independently and show license status.
  2. PLC Web Interface: Open the PLC’s IP address in a browser. Navigate to System > License (if available on your firmware version).
  3. OPC-UA: Connect to the PLC’s OPC-UA server and read the license status nodes under Automation.Components.AR.License.
  4. Physical inspection: Check if an X20CMR module is installed in the X20 bus. Its LED indicators can show TG status.
  5. FTP/SFTP: Connect to the PLC via FTP and check /System/License/ directory for license files.

AR Service License

The AR service license is a separate concept from the AS service contract:

  • It enables the PLC to receive firmware updates.
  • Without it, the PLC still runs but cannot be updated.
  • It is perpetual but may have a validity period linked to the service contract.
  • If the OEM’s service contract has lapsed, the AR service license may show as expired, but the PLC continues to run its current firmware.

11. License Recovery Scenarios

Scenario A: OEM Went Bankrupt

What happens to licenses:

  • Perpetual licenses (AR, mapp) remain valid on their containers indefinitely.
  • AS licenses will stop auto-renewing after the current period expires (typically 1 year from last renewal).
  • License keys remain valid on B&R’s servers unless explicitly revoked (which B&R does not typically do).

Your position:

  • You own the physical dongle(s) and PLC(s) – you have physical possession of the licensed hardware.
  • B&R’s general policy: licenses follow the hardware, not the account. If you have the dongle and PLC, you can use the licenses.
  • AS auto-renewal stopping means you must find an alternative (evaluation, purchasing new AS license, or contacting B&R to transfer the license to your account).

Action items:

  1. Inventory all dongles, PLCs, and license keys immediately.
  2. Document everything (serial numbers, key strings, dongle serials).
  3. Contact B&R support to open a support case in your company’s name.
  4. Request license transfer to your account.
  5. Negotiate a new service contract with B&R if continued AS licensing is needed.

Scenario B: Lost TG Dongle

Impact:

  • All licenses stored on that dongle are inaccessible.
  • AS will not function (no AS license).
  • mapp component licenses for download are unavailable.
  • If the dongle was on the PLC, AR licenses may also be lost.

Recovery options:

  1. Check if B&R’s server has records of the licenses on the lost dongle (provide dongle serial number to support).
  2. B&R may be able to deactivate the lost dongle on their server and re-issue licenses on a new dongle.
  3. This process requires proof of ownership (PLC serial number, original purchase records if available).
  4. If B&R cannot verify the licenses, you may need to purchase replacement licenses.

Prevention:

  • Keep the dongle permanently installed in the PLC cabinet (not carried around).
  • Document the dongle serial number and keep it in multiple locations.
  • Back up the contents of the CF card, which may contain license records.

Scenario C: Damaged Dongle

If the dongle is physically damaged but still detected by the PC:

  • Try to return all licenses to the B&R server immediately.
  • If some licenses cannot be returned (expired), contact B&R support.
  • Once all returnable licenses are recovered, B&R can issue a replacement dongle with the returned licenses.

If the dongle is completely dead (not detected):

  • Same as lost dongle (Scenario B).
  • B&R may need the physical dongle for forensics. Send it to them if they request it.

Warranty:

  • TG dongles have a limited warranty (typically 2 years).
  • If under warranty, B&R will replace the dongle and restore licenses free of charge.
  • If out of warranty, there may be a replacement cost plus a fee for license restoration.

Scenario D: Dongle with Stuck Licenses (Cannot Return Any)

The “sticky dongle” problem:

This occurs when:

  • One license on the dongle has expired.
  • You try to return other (still-valid) licenses from the dongle.
  • The return operation fails because the dongle contains at least one expired license.

Root cause: B&R’s design intentionally prevents returning licenses from a container that contains expired licenses, to prevent license farming / abuse.

Workaround: Use Evaluation AS + Keep Dongle on PLC

  1. Install AS in evaluation mode (30 days, renewable by reinstalling).
  2. Keep the TG dongle plugged into the PLC (not the PC).
  3. The dongle’s AR and mapp licenses continue to serve the PLC.
  4. Use evaluation AS for IDE access (diagnostics, minor changes).
  5. The expired AS license on the dongle does not affect PLC operation – only AS IDE access.

Escalation:

  1. Contact B&R support.
  2. Explain that an expired license on the dongle is blocking return of other licenses.
  3. B&R support may be able to:
    • Manually invalidate the expired license on their server.
    • Enable a special return operation.
    • Issue replacement license keys for the trapped perpetual licenses.
  4. This escalation may take days to weeks. Plan accordingly.

Scenario E: Buying Used Equipment

When purchasing a used B&R machine:

  1. Verify that TG dongles are included with the machine.
  2. Document all dongle serial numbers and note which licenses are on them.
  3. Request license transfer documentation from the seller.
  4. Contact B&R to confirm the licenses can be transferred to your account.
  5. Be aware that AS licenses from a defunct seller will eventually expire and cannot be renewed without a service contract in your name.

Buying from an auction / liquidation:

  1. Same as above, but seller documentation may be unavailable.
  2. B&R may require proof that the seller had legitimate ownership before transferring licenses.
  3. In some cases, licenses may not be transferable if the original account is in bad standing.

Scenario F: Upgrading to Automation Studio 6 (License Implications)

AS6 introduces a new licensing model called shared upgrades that differs from AS4’s perpetual dongle model. If you are migrating from CP1584 to a modern controller, you will need AS6 and its licensing affects your planning:

AspectAS4 (Current)AS6 (New)
AS license deliveryTG dongle (USB)Shared upgrades + TG or software container
AS license typePerpetual or annualSubscription-based upgrades
AR licensePerpetual on PLCPerpetual on PLC (unchanged)
mapp componentsTG-licensed, perpetualmapp 6 with updated licensing model
CodeMeter requirementYesYes (updated version)

Key implications for the OEM-unavailable scenario:

  • Existing AS4 perpetual licenses do not automatically carry to AS6. You need a new AS6 license or service contract.
  • AR licenses (perpetual) on the PLC are unaffected by the AS version — the runtime doesn’t change.
  • If you plan to use evaluation AS6 for migration work, note that evaluation periods are shorter and may not support all mapp 6 components.
  • Contact B&R support early to discuss a migration license package — they may offer discounted upgrades for existing hardware owners.
  • Community migration tools at github.com/br-automation-community/as6-migration-tools can help identify license implications in your project.

See firmware-version-mgmt.md §5.3.1 for the full AS4→AS6 migration guide.


12. Key Findings

  1. Inventory immediately. Document every dongle serial number, license key string, PLC serial number, and X20CMR module before anything else is lost. Store copies off-site.

  2. Do not let AS licenses expire on a shared dongle. An expired AS license on the same dongle as perpetual AR/mapp licenses traps all licenses and prevents returns. Monitor AS license expiration dates via TG software.

  3. Keep the dongle on the PLC. For production machines, the TG dongle should live in the PLC cabinet, not on the engineering PC. This isolates AR/mapp licenses from PC-side AS license issues.

  4. Use TG standalone >= v1.4 for licensing operations. Do not rely on AS < 4.6 for license management – it lacks TLS 1.2 support and cannot communicate with B&R’s license server after March 2024.

  5. Never use software containers on VMs. Any VM migration, snapshot, or hardware change invalidates the container. Use physical USB dongles exclusively for production.

  6. Force TLS 1.2 in Windows Registry. If TG or AS cannot connect to the B&R license server, apply the .NET SchUseStrongCrypto registry keys before spending time on network troubleshooting.

  7. CodeMeter Runtime Service must run. If AS shows “no dongle” and the dongle is physically present, check that the CodeMeter Runtime Server Windows service is running before assuming the dongle is broken.

  8. Evaluation AS licenses are a viable stopgap. Run AS in 30-day evaluation mode while keeping the dongle on the PLC for AR/mapp licensing. This sidesteps the expired-AS-on-shared-dongle problem.

  9. TG standalone does not strictly validate portal credentials. When activating a license key on a dongle, placeholder credentials work. You do not need the OEM’s B&R portal account.

  10. A stuck dongle (WB47/WB67) is a hardware problem. Do not waste time trying software fixes. Return the dongle to B&R repair immediately and use evaluation AS in the interim.

  11. Expired licenses don’t stop running programs immediately. Most mapp technology components continue to function with expired licenses but display warnings. However, some features may be disabled after a grace period.

  12. Offline licensing is possible for air-gapped systems. B&R provides an offline activation procedure using challenge/response codes for systems without internet connectivity.


13. Cross-References

Related DocumentRelevance
firmware.mdFirmware architecture — where license validation fits in the AR boot sequence
firmware-version-mgmt.mdVersion identification — matching firmware versions to valid license files
cf-card-boot.mdCF card storage — license files reside on the CF card system partition
config-file-formats.mdConfiguration files — where license configuration and TG settings are stored
ftp-web-interface.mdFTP access — reading license files from the CF card remotely
access-recovery.mdCredential recovery — regaining access when license management requires authentication
cp1584-forensics.mdForensic extraction — pulling license information from an undocumented system
bootloader-recovery.mdRecovery procedures — what happens to licenses when the system is reinstalled from scratch
online-changes.mdRuntime changes — how mapp technology license checks behave during online modifications
cybersecurity-hardening.mdSecurity hardening — protecting license dongles and TG communication from interception
remanufacturing.mdMigration — transferring licenses to replacement hardware during system replacement
ar-rtos.mdAR OS internals — CVE table includes vulnerabilities affecting TG and licensing infrastructure
project-reconstruction.mdProject reconstruction — determining what licenses are needed when reconstructing an AS project

14. Sources

  • B&R Automation Studio documentation, Automation Runtime documentation – BrAutomation.com downloads section.
  • B&R Technology Guarding product page and knowledge base articles.
  • Wibu-Systems CodeMeter documentation – CodeMeter.com.
  • B&R Knowledge Base article: “Technology Guarding – TLS 1.2 requirement since March 2024.”
  • B&R Knowledge Base article: “License activation with Technology Guarding standalone.”
  • B&R Knowledge Base article: “What to do when your TG dongle is stuck in firmware update mode.”
  • B&R Knowledge Base article: “AS license expiration and auto-renewal behavior.”
  • B&R Knowledge Base article: “Returning licenses from a container with expired licenses.”
  • B&R Technical Note: “Offline licensing procedure for air-gapped systems.”
  • Wibu-Systems CodeMeter error code reference (WB47, WB67, etc.).
  • Community forum reports from automation engineers maintaining inherited B&R equipment.
  • Practical field experience with CP1584 PLCs from defunct OEMs.

Python Diagnostic Scripts for B&R CP1584: PVI and OPC-UA

Overview

This document covers building automated diagnostic, monitoring, and regression scripts for B&R CP1584 PLCs using Python. Two primary communication paths exist: OPC-UA (runs directly on the controller, no Windows middleware needed) and PVI (requires B&R PVI Manager on Windows). For a one-man automation engineer maintaining undocumented machines, Python scripts are force multipliers — they automate repetitive diagnostic tasks, capture trends, and generate reports.

See also: pvi-api.md, opcua.md, cp1584-forensics.md


1. Communication Path Comparison

FeatureOPC-UA (asyncua)PVI (pvipy)
Requires Windows?No — runs from Linux, macOS, WindowsYes — requires PVI Manager (Windows service)
Requires B&R license?No (OPC-UA server is part of AR)Yes (PVI Development Setup + license)
Install to PLC?Must be configured in AS projectMust be configured in AS project
Anonymous accessPossible if OEM configured itUses ANSL line — no user auth on PVI itself
Variable browsingFull namespace browsingFull variable namespace access
Write/force variablesYes (if access level permits)Yes
Subscription/monitoringYes — native OPC-UA subscriptionsYes — PVI callbacks
Python libraryasyncua (pip install asyncua)pvipy (pip install pvipy)
LatencyNetwork round-trip (~1-5 ms on LAN)Slightly higher (PVI Manager overhead)
Best forLinux-based diagnostics, remote monitoringWindows-based engineering workstation

Recommendation: If the OPC-UA server is enabled on the CP1584 (check port 4840 with nmap), use OPC-UA via asyncua. It requires no Windows middleware and no B&R PVI license. If OPC-UA is not enabled, use PVI from a Windows machine.

⚠️ PVI 6.x Breaking Change: INA2000 Removed

If your engineering workstation runs Automation Studio 6 (PVI 6.x), the legacy INA2000 protocol is completely removed — only ANSL and SNMP lines are supported. Any existing PVI-based scripts using pvipy with INA2000 connections will fail with missing DLL errors. You must update all connections to use ANSL (TCP port 1212, backward-compatible with all AR ≥ V4.08 including CP1584). See pvi-api.md §2 for the full migration checklist.


2. Prerequisites and Environment Setup

pip install asyncua

## For data logging to CSV and reporting
pip install pandas matplotlib

## For scheduling automated scripts
pip install schedule

Verify OPC-UA is enabled on the PLC:

nmap -p 4840 <PLC_IP>
# PORT     STATE SERVICE
# 4840/tcp open  http-alt

If port 4840 is open, OPC-UA is running. Test anonymous access:

import asyncio
from asyncua import Client

async def test_connection():
    url = "opc.tcp://<PLC_IP>:4840"
    async with Client(url=url, timeout=5) as client:
        root = client.get_root_node()
        print(f"Connected! Root node: {root}")
        children = await root.get_children()
        print(f"Root has {len(children)} children")

asyncio.run(test_connection())

2.2 PVI Path (Windows Only)

Install B&R PVI Development Setup:

  1. Download PVI Development Setup from B&R’s website (requires a B&R portal account)
  2. Install PVI Development Setup on your Windows machine
  3. Without a PVI license, PVI runs in trial mode (2-hour limit, then PVI Manager must be restarted)

PVI License: Order code 1TG0500.02 (+ TG Guard 0TG1000.02). Without it, the 2-hour trial cycle is a significant limitation for long-running monitoring scripts.

pip install pvipy

PVI Manager (PviMan.exe) must be running as a Windows service or process. It acts as the middleware between your Python code and the PLC.

See also: pvi-api.md for full PVI architecture details


3. OPC-UA: Browsing the Variable Namespace

When you have an undocumented CP1584, the first step is discovering what variables are available via OPC-UA.

3.1 Recursive Namespace Browser

import asyncio
from asyncua import Client

PLC_URL = "opc.tcp://192.168.1.100:4840"

async def browse_namespace(node, indent=0):
    children = await node.get_children()
    for child in children:
        name = await child.get_browse_name()
        nodeid = child.nodeid
        display = await child.get_display_name()
        dtype = await child.get_data_type()
        accessible = await child.read_attribute(0x1f)  # AccessLevel
        
        print(f"{'  ' * indent}{name.Name} [{nodeid}] - {display.Text}")
        
        if len(children) < 50:
            await browse_namespace(child, indent + 1)

async def main():
    async with Client(url=PLC_URL, timeout=10) as client:
        print("=== B&R OPC-UA Namespace Browser ===")
        root = client.get_root_node()
        print(f"Root: {await root.get_browse_name().Name}")
        
        objects = client.nodes.objects
        print(f"\nObjects node children:")
        await browse_namespace(objects)

asyncio.run(main())

3.2 Extract All Variable Names to CSV

For documentation purposes, dump the entire variable namespace to a CSV:

import asyncio
import csv
from asyncua import Client
from datetime import datetime

PLC_URL = "opc.tcp://<PLC_IP>:4840"
OUTPUT_FILE = "br_namespace_dump.csv"

async def scan_node(node, writer, depth=0, max_depth=6):
    if depth > max_depth:
        return
    
    try:
        children = await node.get_children()
    except Exception:
        return
    
    for child in children:
        try:
            browse_name = await child.get_browse_name()
            display_name = await child.get_display_name()
            node_class = await child.read_node_class()
            
            row = {
                "timestamp": datetime.now().isoformat(),
                "nodeid": str(child.nodeid),
                "browse_name": browse_name.Name,
                "display_name": display_name.Text,
                "node_class": str(node_class),
                "depth": depth,
            }
            
            if node_class.name == "Variable":
                try:
                    val = await child.get_value()
                    row["value"] = str(val)
                except Exception:
                    row["value"] = "N/A"
                
                try:
                    dtype = await child.get_data_type()
                    row["data_type"] = str(dtype)
                except Exception:
                    row["data_type"] = "Unknown"
            
            writer.writerow(row)
            await scan_node(child, writer, depth + 1, max_depth)
        except Exception as e:
            pass

async def main():
    async with Client(url=PLC_URL, timeout=10) as client:
        objects = client.nodes.objects
        with open(OUTPUT_FILE, "w", newline="") as f:
            writer = csv.DictWriter(f, fieldnames=[
                "timestamp", "nodeid", "browse_name", "display_name",
                "node_class", "depth", "value", "data_type"
            ])
            writer.writeheader()
            await scan_node(objects, writer)

asyncio.run(main())
print(f"Namespace dumped to {OUTPUT_FILE}")

3.3 B&R Variable Naming Conventions

B&R OPC-UA variable names follow these patterns:

PatternMeaningExample
::ProgramName:VariableNameGlobal variable in program::MainProgram:StartButton
::ProgramName:FunctionBlockInstance.OutputFB instance output::MainProgram:MotorControl.RunFlag
ns=2;s=::AsGlobalPV:VariableNameGlobal persistent variable::AsGlobalPV:MachineSpeed
ns=6;s=...Namespace 6 — typically B&R system varsns=6;s=::AsGlobalPV:...
Channel1.AI[0]I/O mapping reference::MainProgram:Axis1.Status

The namespace index (ns=X;) varies depending on the OPC-UA configuration. Common indices:

  • ns=0 — OPC-UA standard
  • ns=1 or ns=2 — B&R default for application variables
  • Higher indices for specific OPC-UA views or mapp components

4. OPC-UA: Reading and Writing Variables

4.1 Read Single Variable

import asyncio
from asyncua import Client

PLC_URL = "opc.tcp://<PLC_IP>:4840"

async def read_variable(node_id):
    async with Client(url=PLC_URL, timeout=5) as client:
        node = client.get_node(node_id)
        value = await node.get_value()
        name = await node.get_browse_name()
        print(f"{name.Name} = {value} (type: {type(value).__name__})")
        return value

asyncio.run(read_variable("ns=2;s=::AsGlobalPV:MachineSpeed"))

4.2 Read Multiple Variables (Batch)

import asyncio
from asyncua import Client

PLC_URL = "opc.tcp://<PLC_IP>:4840"

VARIABLES = {
    "MachineSpeed": "ns=2;s=::AsGlobalPV:MachineSpeed",
    "EmergencyStop": "ns=2;s=::MainProgram:EmergencyStop",
    "MotorRunning": "ns=2;s=::MainProgram:MotorControl.RunFlag",
    "CycleTime_ms": "ns=2;s=::MainProgram:CycleTime",
    "PartCount": "ns=2;s=::AsGlobalPV:PartCounter",
}

async def read_all():
    async with Client(url=PLC_URL, timeout=5) as client:
        print(f"{'Variable':<25} {'Value':<20} {'Type'}")
        print("-" * 60)
        for name, node_id in VARIABLES.items():
            try:
                node = client.get_node(node_id)
                value = await node.get_value()
                print(f"{name:<25} {str(value):<20} {type(value).__name__}")
            except Exception as e:
                print(f"{name:<25} ERROR: {e}")

asyncio.run(read_all())

4.3 Write Variable (B&R-Specific Method)

B&R OPC-UA servers require a specific write pattern. The standard node.write_value() may return BadWriteNotSupported even when the variable is writable in UAExpert. Use this workaround:

import asyncio
from asyncua import Client, ua
from asyncua import Node

PLC_URL = "opc.tcp://<PLC_IP>:4840"

async def write_br_variable(node_id, value):
    async with Client(url=PLC_URL, timeout=5) as client:
        node = client.get_node(node_id)
        
        attr = ua.WriteValue()
        attr.NodeId = node.nodeid
        attr.AttributeId = ua.AttributeIds.Value
        attr.Value = ua.DataValue(value)
        
        params = ua.WriteParameters()
        params.NodesToWrite = [attr]
        
        result = await node.write_params(params)
        
        if result[0].is_good():
            print(f"Write successful: {value}")
        else:
            print(f"Write failed: {result[0]}")

asyncio.run(write_br_variable("ns=2;s=::AsGlobalPV:ManualOverride", True))

Common B&R OPC-UA write errors:

ErrorCauseSolution
BadWriteNotSupportedStandard write method blockedUse the write_params() method above
BadUserAccessDeniedOPC-UA role doesn’t allow writeCheck user role permissions in AS project
BadNotWritableVariable is read-only (input, constant)Cannot write to I/O inputs or constants
BadTypeMismatchWrong data type for the variableCast to correct type before writing

4.4 Force Outputs via OPC-UA

Forcing outputs lets you override physical I/O for diagnostic purposes:

import asyncio
from asyncua import Client, ua

PLC_URL = "opc.tcp://<PLC_IP>:4840"

async def force_output(node_id, value):
    async with Client(url=PLC_URL, timeout=5) as client:
        node = client.get_node(node_id)
        
        attr = ua.WriteValue()
        attr.NodeId = node.nodeid
        attr.AttributeId = ua.AttributeIds.Value
        attr.Value = ua.DataValue(value)
        
        params = ua.WriteParameters()
        params.NodesToWrite = [attr]
        
        result = await node.write_params(params)
        print(f"Force {node_id} = {value}: {'OK' if result[0].is_good() else str(result[0])}")

asyncio.run(force_output("ns=2;s=::MainProgram:Output1", True))

See also: online-changes.md, io-sniffing.md


5. OPC-UA: Subscription-Based Monitoring

Subscriptions are the OPC-UA mechanism for real-time variable monitoring. The server pushes data changes to the client instead of the client polling.

5.1 Basic Subscription

import asyncio
from asyncua import Client

PLC_URL = "opc.tcp://<PLC_IP>:4840"

async def monitor_variables():
    async with Client(url=PLC_URL, timeout=10) as client:
        idx = await client.get_namespace_index("http://br-automation.com")
        print(f"B&R namespace index: {idx}")
        
        sub = await client.create_subscription(500, None)
        
        variables = [
            "ns=2;s=::AsGlobalPV:MachineSpeed",
            "ns=2;s=::MainProgram:CycleTime",
            "ns=2;s=::MainProgram:EmergencyStop",
        ]
        
        handlers = []
        for var_path in variables:
            node = client.get_node(var_path)
            name = await node.get_browse_name()
            
            def make_callback(n=name.Name):
                def datachange_notification(node, val, data):
                    print(f"[{asyncio.get_event_loop().time():.2f}] {n} = {val}")
                return datachange_notification
            
            handle = await sub.subscribe_data_change(
                var_path, make_callback()
            )
            handlers.append(handle)
        
        print("Monitoring... Press Ctrl+C to stop")
        
        try:
            while True:
                await asyncio.sleep(1)
        except KeyboardInterrupt:
            print("\nStopping...")
            await sub.delete()

asyncio.run(monitor_variables())

5.2 Subscription with Data Logging to CSV

import asyncio
import csv
from datetime import datetime
from asyncua import Client

PLC_URL = "opc.tcp://<PLC_IP>:4840"
CSV_FILE = "plc_trend_log.csv"

VARIABLES = {
    "MachineSpeed": "ns=2;s=::AsGlobalPV:MachineSpeed",
    "MotorTemp": "ns=2;s=::MainProgram:MotorTemp",
    "CycleTime": "ns=2;s=::MainProgram:CycleTime",
    "PartCount": "ns=2;s=::AsGlobalPV:PartCounter",
}

async def trend_logger():
    async with Client(url=PLC_URL, timeout=10) as client:
        sub = await client.create_subscription(200, None)
        
        with open(CSV_FILE, "w", newline="") as f:
            writer = csv.writer(f)
            writer.writerow(["timestamp", "variable", "value"])
            
            buffer = []
            flush_interval = 60  # seconds
            
            def make_callback(var_name):
                def callback(node, val, data):
                    ts = datetime.now().isoformat()
                    buffer.append([ts, var_name, str(val)])
                return callback
            
            handles = []
            for name, node_id in VARIABLES.items():
                handle = await sub.subscribe_data_change(
                    node_id, make_callback(name)
                )
                handles.append(handle)
            
            print(f"Logging {len(VARIABLES)} variables to {CSV_FILE}")
            
            try:
                while True:
                    await asyncio.sleep(flush_interval)
                    if buffer:
                        writer.writerows(buffer)
                        f.flush()
                        print(f"Flushed {len(buffer)} entries")
                        buffer.clear()
            except KeyboardInterrupt:
                if buffer:
                    writer.writerows(buffer)
                    f.flush()
                print(f"\nStopped. Total entries written to {CSV_FILE}")
                await sub.delete()

asyncio.run(trend_logger())

6. PVI: Python Access via pvipy

6.1 Installation

pip install pvipy

Pvipy requires the B&R PVI Development Setup to be installed on the Windows machine. The PVI Manager service must be running.

6.2 Connecting to a CP1584

from pvi import *

pviConnection = Connection()

line = Line(pviConnection.root, 'LNANSL', CD='LNANSL')
device = Device(line, 'TCP', CD='/IF=TcpIp')
cpu = Cpu(device, 'CP1584', CD='/IP=<PLC_IP>')

def cpuErrorChanged(error: int):
    if error == 11020:
        print("Unable to establish connection")
        pviConnection.stop()
    elif error != 0:
        raise PviError(error)
    else:
        print("Connected to CP1584 via PVI/ANSL")

cpu.errorChanged = cpuErrorChanged
pviConnection.start()

6.3 Reading Variables

variables = ["MainProgram.StartButton", "MainProgram.CycleCounter", "AsGlobalPV:MachineSpeed"]

for var_name in variables:
    var = cpu.create_variable(var_name, var_name)
    value = var.read()
    print(f"{var_name} = {value}")

6.4 Browsing Variables Without Project Files

PVI can discover variables on the controller even without a project file:

from pvi import *

pviConnection = Connection()
line = Line(pviConnection.root, 'LNANSL', CD='LNANSL')
device = Device(line, 'TCP', CD='/IF=TcpIp')
cpu = Cpu(device, 'CP1584', CD='/IP=<PLC_IP>')

def cpuErrorChanged(error: int):
    if error == 0:
        variables = cpu.list_variables()
        print(f"Found {len(variables)} variables:")
        for var in sorted(variables):
            print(f"  {var}")
        pviConnection.stop()

cpu.errorChanged = cpuErrorChanged
pviConnection.start()

6.5 Writing Variables

var = cpu.create_variable("AsGlobalPV:ManualOverride", "AsGlobalPV:ManualOverride")
var.write(True)
print("ManualOverride set to True")

6.6 SNMP Line — Network Configuration

PVI’s SNMP line can read and modify the PLC’s network settings:

from pvi import *

pviConnection = Connection()

line = Line(pviConnection.root, 'LNSNMP', CD='LNSNMP')
device = Device(line, 'SNMP', CD='/IP=<PLC_IP>')

cpu = Cpu(device, 'CP1584')
cpu.errorChanged = lambda error: print(f"SNMP connected, error={error}")
pviConnection.start()

7. Diagnostic Scripts: Practical Examples

7.1 All-Digital-IO Snapshot

import asyncio
from asyncua import Client
import json
from datetime import datetime

PLC_URL = "opc.tcp://<PLC_IP>:4840"

DIGITAL_INPUTS = [
    "ns=2;s=::MainProgram:DI[0]", "ns=2;s=::MainProgram:DI[1]",
    "ns=2;s=::MainProgram:DI[2]", "ns=2;s=::MainProgram:DI[3]",
    "ns=2;s=::MainProgram:DI[4]", "ns=2;s=::MainProgram:DI[5]",
    "ns=2;s=::MainProgram:DI[6]", "ns=2;s=::MainProgram:DI[7]",
]

DIGITAL_OUTPUTS = [
    "ns=2;s=::MainProgram:DO[0]", "ns=2;s=::MainProgram:DO[1]",
    "ns=2;s=::MainProgram:DO[2]", "ns=2;s=::MainProgram:DO[3]",
    "ns=2;s=::MainProgram:DO[4]", "ns=2;s=::MainProgram:DO[5]",
    "ns=2;s=::MainProgram:DO[6]", "ns=2;s=::MainProgram:DO[7]",
]

async def io_snapshot():
    async with Client(url=PLC_URL, timeout=5) as client:
        result = {
            "timestamp": datetime.now().isoformat(),
            "inputs": {},
            "outputs": {},
        }
        
        for i, node_id in enumerate(DIGITAL_INPUTS):
            try:
                val = await client.get_node(node_id).get_value()
                result["inputs"][f"DI[{i}]"] = bool(val)
            except Exception:
                result["inputs"][f"DI[{i}]"] = None
        
        for i, node_id in enumerate(DIGITAL_OUTPUTS):
            try:
                val = await client.get_node(node_id).get_value()
                result["outputs"][f"DO[{i}]"] = bool(val)
            except Exception:
                result["outputs"][f"DO[{i}]"] = None
        
        print(json.dumps(result, indent=2))
        return result

asyncio.run(io_snapshot())

7.2 Watchdog and Cycle Time Monitor

import asyncio
from asyncua import Client

PLC_URL = "opc.tcp://<PLC_IP>:4840"

async def monitor_cycle_times():
    async with Client(url=PLC_URL, timeout=10) as client:
        sub = await client.create_subscription(1000, None)
        
        cycle_vars = [
            ("Cyclic1_ms", "ns=2;s=::System:TaskClass1.CycleTime"),
            ("Cyclic2_ms", "ns=2;s=::System:TaskClass2.CycleTime"),
            ("Watchdog", "ns=2;s=::System:WatchdogStatus"),
        ]
        
        for name, node_id in cycle_vars:
            try:
                def cb(n=name):
                    def handler(node, val, data):
                        if "Watchdog" in n:
                            print(f"*** WATCHDOG: {val} ***")
                        else:
                            if val > 50:
                                print(f"*** WARNING: {n} = {val} ms (HIGH) ***")
                            else:
                                print(f"{n} = {val} ms")
                    return handler
                await sub.subscribe_data_change(node_id, cb())
            except Exception as e:
                print(f"Cannot subscribe to {name}: {e}")
        
        print("Monitoring cycle times... (Ctrl+C to stop)")
        try:
            while True:
                await asyncio.sleep(1)
        except KeyboardInterrupt:
            await sub.delete()

asyncio.run(monitor_cycle_times())

7.3 Automated IO Stress Test

import asyncio
import time
from asyncua import Client, ua

PLC_URL = "opc.tcp://<PLC_IP>:4840"

OUTPUT_NODES = [
    "ns=2;s=::MainProgram:DO[0]",
    "ns=2;s=::MainProgram:DO[1]",
    "ns=2;s=::MainProgram:DO[2]",
    "ns=2;s=::MainProgram:DO[3]",
]

async def stress_test():
    async with Client(url=PLC_URL, timeout=5) as client:
        print("IO Stress Test — toggling all outputs at 1 Hz for 60 seconds")
        
        for i, node_id in enumerate(OUTPUT_NODES):
            node = client.get_node(node_id)
            attr = ua.WriteValue()
            attr.NodeId = node.nodeid
            attr.AttributeId = ua.AttributeIds.Value
            attr.Value = ua.DataValue(True)
            params = ua.WriteParameters()
            params.NodesToWrite = [attr]
            await node.write_params(params)
        
        time.sleep(0.5)
        
        cycles = 0
        start = time.time()
        
        while time.time() - start < 60:
            state = cycles % 2 == 0
            for node_id in OUTPUT_NODES:
                node = client.get_node(node_id)
                attr = ua.WriteValue()
                attr.NodeId = node.nodeid
                attr.AttributeId = ua.AttributeIds.Value
                attr.Value = ua.DataValue(state)
                params = ua.WriteParameters()
                params.NodesToWrite = [attr]
                await node.write_params(params)
            cycles += 1
            await asyncio.sleep(0.5)
        
        for node_id in OUTPUT_NODES:
            node = client.get_node(node_id)
            attr = ua.WriteValue()
            attr.NodeId = node.nodeid
            attr.AttributeId = ua.AttributeIds.Value
            attr.Value = ua.DataValue(False)
            params = ua.WriteParameters()
            params.NodesToWrite = [attr]
            await node.write_params(params)
        
        print(f"Completed {cycles} toggle cycles in 60 seconds")

asyncio.run(stress_test())

8. Automated Regression and Diagnostic Framework

8.1 Expected vs Actual Comparison

import asyncio
from asyncua import Client
import json
from datetime import datetime

PLC_URL = "opc.tcp://<PLC_IP>:4840"

EXPECTED_STATES = {
    "ns=2;s=::MainProgram:EmergencyStop": False,
    "ns=2;s=::MainProgram:DoorInterlock": True,
    "ns=2;s=::MainProgram:MainSwitch": True,
    "ns=2;s=::MainProgram:LightCurtain": False,
    "ns=2;s=::MainProgram:OvertempAlarm": False,
}

async def regression_check():
    async with Client(url=PLC_URL, timeout=5) as client:
        report = {
            "timestamp": datetime.now().isoformat(),
            "total": len(EXPECTED_STATES),
            "passed": 0,
            "failed": 0,
            "errors": 0,
            "details": [],
        }
        
        for node_id, expected in EXPECTED_STATES.items():
            try:
                actual = await client.get_node(node_id).get_value()
                passed = (actual == expected)
                
                if passed:
                    report["passed"] += 1
                else:
                    report["failed"] += 1
                
                report["details"].append({
                    "node": node_id,
                    "expected": expected,
                    "actual": actual,
                    "passed": passed,
                })
                
                status = "PASS" if passed else "FAIL"
                print(f"  [{status}] {node_id}: expected={expected}, actual={actual}")
                
            except Exception as e:
                report["errors"] += 1
                report["details"].append({
                    "node": node_id,
                    "expected": expected,
                    "actual": f"ERROR: {e}",
                    "passed": False,
                })
                print(f"  [ERROR] {node_id}: {e}")
        
        print(f"\nResults: {report['passed']}/{report['total']} passed, "
              f"{report['failed']} failed, {report['errors']} errors")
        return report

asyncio.run(regression_check())

8.2 Scheduled Diagnostic Runner

import asyncio
import schedule
import time
import json
from datetime import datetime
from asyncua import Client

PLC_URL = "opc.tcp://<PLC_IP>:4840"
LOG_FILE = "regression_log.jsonl"

async def run_check():
    async with Client(url=PLC_URL, timeout=10) as client:
        result = {
            "timestamp": datetime.now().isoformat(),
            "status": "unknown",
            "errors": [],
        }
        
        try:
            estop = await client.get_node("ns=2;s=::MainProgram:EmergencyStop").get_value()
            result["estop"] = estop
            
            try:
                speed = await client.get_node("ns=2;s=::AsGlobalPV:MachineSpeed").get_value()
                result["speed"] = speed
            except Exception:
                pass
            
            result["status"] = "ok" if not estop else "estop_active"
            
        except Exception as e:
            result["status"] = "connection_error"
            result["errors"].append(str(e))
        
        with open(LOG_FILE, "a") as f:
            f.write(json.dumps(result) + "\n")
        
        print(f"[{result['timestamp']}] Status: {result['status']}")
        return result

def sync_wrapper():
    asyncio.run(run_check())

schedule.every(5).minutes.do(sync_wrapper)
schedule.every().hour.do(lambda: print("--- Hourly summary ---"))

if __name__ == "__main__":
    print("Starting scheduled diagnostics...")
    asyncio.run(run_check())  # Immediate first run
    while True:
        schedule.run_pending()
        time.sleep(1)

8.3 Diagnostic Report Generator

import asyncio
import json
from datetime import datetime
from asyncua import Client

PLC_URL = "opc.tcp://<PLC_IP>:4840"
REPORT_FILE = "diagnostic_report.html"

async def generate_report():
    report_data = {
        "timestamp": datetime.now().isoformat(),
        "connection": "unknown",
        "variables": [],
        "errors": [],
    }
    
    try:
        async with Client(url=PLC_URL, timeout=10) as client:
            report_data["connection"] = "ok"
            objects = client.nodes.objects
            children = await objects.get_children()
            report_data["root_children"] = len(children)
            
            sample_vars = [
                ("MachineSpeed", "ns=2;s=::AsGlobalPV:MachineSpeed"),
                ("PartCounter", "ns=2;s=::AsGlobalPV:PartCounter"),
                ("CycleTime", "ns=2;s=::MainProgram:CycleTime"),
            ]
            
            for name, node_id in sample_vars:
                try:
                    val = await client.get_node(node_id).get_value()
                    report_data["variables"].append({
                        "name": name,
                        "value": str(val),
                        "type": type(val).__name__,
                    })
                except Exception as e:
                    report_data["errors"].append(f"{name}: {e}")
                    
    except Exception as e:
        report_data["connection"] = f"failed: {e}"
    
    html = f"""<!DOCTYPE html>
<html><head><title>CP1584 Diagnostic Report</title></head>
<body>
<h1>CP1584 Diagnostic Report</h1>
<p>Generated: {report_data['timestamp']}</p>
<p>Connection: {report_data['connection']}</p>
<h2>Variable Status</h2>
<table border="1">
<tr><th>Variable</th><th>Value</th><th>Type</th></tr>"""
    
    for v in report_data["variables"]:
        html += f"""<tr><td>{v['name']}</td><td>{v['value']}</td><td>{v['type']}</td></tr>"""
    
    html += "</table>"
    
    if report_data["errors"]:
        html += "<h2>Errors</h2><ul>"
        for e in report_data["errors"]:
            html += f"<li>{e}</li>"
        html += "</ul>"
    
    html += "</body></html>"
    
    with open(REPORT_FILE, "w") as f:
        f.write(html)
    
    print(f"Report saved to {REPORT_FILE}")

asyncio.run(generate_report())

9. Integrating with IIoT and Monitoring Systems

9.1 OPC-UA to MQTT Bridge

For forwarding PLC data to MQTT-based monitoring (Grafana, Node-RED, Home Assistant):

import asyncio
from asyncua import Client
import paho.mqtt.client as mqtt

PLC_URL = "opc.tcp://<PLC_IP>:4840"
MQTT_BROKER = "localhost"
MQTT_PORT = 1883
MQTT_TOPIC = "br/plc/"

variables_map = {
    "ns=2;s=::AsGlobalPV:MachineSpeed": "machine/speed",
    "ns=2;s=::MainProgram:CycleTime": "machine/cycle_time",
    "ns=2;s=::MainProgram:EmergencyStop": "machine/estop",
}

mqtt_client = mqtt.Client()
mqtt_client.connect(MQTT_BROKER, MQTT_PORT)

async def opcua_to_mqtt():
    async with Client(url=PLC_URL, timeout=10) as client:
        sub = await client.create_subscription(500, None)
        
        for node_id, mqtt_path in variables_map.items():
            def cb(topic=f"{MQTT_TOPIC}{mqtt_path}"):
                def handler(node, val, data):
                    mqtt_client.publish(topic, str(val))
                return handler
            await sub.subscribe_data_change(node_id, cb())
        
        print("OPC-UA to MQTT bridge running...")
        try:
            while True:
                await asyncio.sleep(1)
                mqtt_client.loop(0.01)
        except KeyboardInterrupt:
            await sub.delete()

asyncio.run(opcua_to_mqtt())

9.2 Prometheus Exporter

For integration with Grafana/Prometheus:

import asyncio
from aiohttp import web
from asyncua import Client

PLC_URL = "opc.tcp://<PLC_IP>:4840"
PORT = 8000

latest_values = {}

VARIABLES = {
    "br_machine_speed": "ns=2;s=::AsGlobalPV:MachineSpeed",
    "br_cycle_time_ms": "ns=2;s=::MainProgram:CycleTime",
    "br_part_count": "ns=2;s=::AsGlobalPV:PartCounter",
}

async def update_values():
    while True:
        try:
            async with Client(url=PLC_URL, timeout=5) as client:
                for metric, node_id in VARIABLES.items():
                    try:
                        val = await client.get_node(node_id).get_value()
                        latest_values[metric] = val
                    except Exception:
                        pass
        except Exception:
            pass
        await asyncio.sleep(2)

async def metrics_handler(request):
    output = ""
    for metric, value in latest_values.items():
        if isinstance(value, (int, float)):
            output += f"{metric} {value}\n"
    return web.Response(text=output, content_type="text/plain")

async def main():
    app = web.Application()
    app.router.add_get("/metrics", metrics_handler)
    
    runner = web.AppRunner(app)
    await runner.setup()
    site = web.TCPSite(runner, "0.0.0.0", PORT)
    await site.start()
    
    asyncio.create_task(update_values())
    print(f"Prometheus exporter on :{PORT}/metrics")
    
    while True:
        await asyncio.sleep(3600)

asyncio.run(main())

See also: iiot-retrofit.md


10. Common Pitfalls and Gotchas

10.1 B&R OPC-UA Write Issue

The standard asyncua node.write_value() method often returns BadWriteNotSupported on B&R OPC-UA servers, even when the variable is writable in UAExpert. Always use the write_params() method documented in Section 4.3.

10.2 Namespace Discovery

B&R OPC-UA namespaces are not always predictable. The namespace index for application variables depends on how the OPC-UA configuration was set up in Automation Studio. Always browse the namespace first rather than hardcoding ns=2 or ns=6.

10.3 PVI Trial License Limitation

Without a PVI license, PVI Manager runs for 2 hours before stopping all PVI-based programs. This is disruptive for long-running monitoring scripts. If you need continuous monitoring, use the OPC-UA path instead.

10.4 Variable Not Found

If a variable is not accessible via OPC-UA:

  • The variable may not be mapped to the OPC-UA namespace (the OEM must explicitly export it)
  • Try PVI, which has access to all variables in the PLC’s variable table
  • Check if the variable is in a different namespace or has been renamed

10.5 Connection Timeout

B&R OPC-UA server startup can take several seconds after PLC boot. Add retry logic:

import asyncio
from asyncua import Client

async def connect_with_retry(url, max_retries=10, delay=3):
    for attempt in range(max_retries):
        try:
            client = Client(url=url, timeout=5)
            await client.connect()
            print(f"Connected on attempt {attempt + 1}")
            return client
        except Exception as e:
            print(f"Attempt {attempt + 1} failed: {e}")
            if attempt < max_retries - 1:
                await asyncio.sleep(delay)
    raise ConnectionError(f"Failed to connect after {max_retries} retries")

async def main():
    client = await connect_with_retry("opc.tcp://<PLC_IP>:4840")
    try:
        # ... work with client ...
        pass
    finally:
        await client.disconnect()

asyncio.run(main())

Community Tools for Python-Based Diagnostics

Beyond the core asyncua and pvipy libraries, several community tools extend Python-based diagnostics for B&R systems:

brwatch (Windows Service + Command Line)

brwatch is a Windows service tool for variable watch, change, logging, IP configuration, and CPU reboot — without requiring Automation Studio or the project file. While not Python-native, it integrates with Python workflows:

  • CSV logging: brwatch can log variable values to CSV files that Python scripts then ingest for analysis
  • Variable discovery: Use brwatch to enumerate all visible variables, then build Python monitoring scripts targeting specific variables
  • IP configuration: Automate initial PLC network setup from the command line before any Python connectivity
import pandas as pd
import glob

latest_csv = sorted(glob.glob("brwatch_log_*.csv"))[-1]
df = pd.read_csv(latest_csv)
print(f"Loaded {len(df)} samples from {latest_csv}")
print(df.describe())

See access-recovery.md §12 for the complete brwatch guide.

Pvi.py (Python PVI Wrapper)

Pvi.py is a Python wrapper for B&R PVI that provides a cleaner API than pvipy for common operations:

from pvi import Pvi

pvi = Pvi()
plc = pvi.line("ANSL", "TCP", "<PLC_IP>").device("CP1584")

var = plc.variable("gMachineData.nTemperature")
print(f"Current temperature: {var.read()}")

var.write(25.0)
plc.restart()

Comparison: Pvi.py vs pvipy:

FeaturePvi.pypvipy
API styleHigh-level, PythonicLower-level, closer to PVI C API
Error handlingPython exceptionsError codes
Async supportLimitedSupports callbacks
DocumentationGitHub README + examplespip package docs
Active maintenanceYes (hilch)Yes
Installationpip install Pvi.pypip install pvipy

systemdump.py (CLI Dump Analyzer)

systemdump.py parses B&R SystemDump.xml files from the command line:

pip install systemdump.py
systemdump --input SystemDump.xml --summary
systemdump --input SystemDump.xml --logger --filter ERROR
systemdump --input SystemDump.xml --tasks --format json > task_stats.json

Combined with Python:

import subprocess, json

result = subprocess.run(
    ["systemdump", "--input", "SystemDump.xml", "--tasks", "--format", "json"],
    capture_output=True, text=True
)
task_data = json.loads(result.stdout)
for task in task_data.get("tasks", []):
    print(f"{task['name']}: cycle={task['cycle_ms']}ms, max={task['max_cycle_ms']}ms")

See ebpf-telemetry.md for post-mortem analysis workflows and diagnostics-sdm.md for system dump download procedures.

awesome-B-R Curated Tool List

The awesome-B-R repository maintains a comprehensive catalog of all community tools, libraries, and resources for B&R automation. Key entries relevant to Python diagnostics:

ToolPurposeURL
demo-br-asyncuaOPC-UA demo for B&R PLCsgithub.com/br-automation-community/demo-br-asyncua
brwatchVariable watch/change/log servicegithub.com/hilch/brwatch
Pvi.pyPython PVI wrappergithub.com/hilch/Pvi.py
systemdump.pySystem dump parsergithub.com/hilch/systemdump.py
brsnmpPVI-SNMP tool for PLC discoverygithub.com/hilch/brsnmp
paho.mqtt.c-arMQTT client for ARgithub.com/br-automation-community/paho.mqtt.c-ar

Key Findings

  1. OPC-UA via asyncua is the recommended path for Python diagnostics on B&R CP1584 — no Windows middleware, no PVI license required, works from any OS.
  2. B&R OPC-UA requires write_params() instead of write_value() for writing variables — a documented gotcha in the community.
  3. The pvipy library provides clean Python access via PVI but requires Windows + PVI Development Setup + license.
  4. Variable namespace must be discovered — B&R namespace indices are project-specific, not standardized.
  5. Subscriptions enable real-time monitoring with CSV logging, Prometheus export, or MQTT bridging for IIoT integration.
  6. Regression testing (expected vs actual) is practical for documenting and verifying machine behavior on undocumented systems.
  7. Community tools extend Python diagnostics significantly — brwatch for no-project variable access and CSV logging, Pvi.py for a Pythonic PVI API, systemdump.py for automated dump analysis, and brsnmp for PLC discovery without Automation Studio. See awesome-B-R for the full catalog.

Sources

  • B&R PVI (Process Visualization Interface) API documentation — C/C++ and .NET SDK references
  • B&R OPC-UA Server Configuration Guide — namespace and endpoint configuration
  • Python OPC-UA library (asyncua) documentation — https://github.com/FreeOpcUa/opcua-asyncio
  • Python Modbus library (pymodbus) documentation — https://pymodbus.readthedocs.io
  • Python PVI library (pvi.py) by hilch — https://github.com/hilch/Pvi.py
  • B&R Community Forum (community.br-automation.com) — PVI and OPC-UA scripting discussions
  • awesome-B-R GitHub repository — community tool listing for B&R automation

Remanufacturing and Modernizing B&R Control Systems

A practical guide for automation engineers maintaining B&R X20CP1584 PLCs and related hardware from defunct OEMs with zero documentation. Covers repair, in-family migration, cross-platform migration, project planning, and cost analysis.


Table of Contents

  1. Overview
  2. CP1584 Repair vs Replace Decision Matrix
  3. B&R In-Family Migration (Recommended Path)
  4. X20 to X67 Migration (Form Factor Change)
  5. B&R to CODESYS Migration
  6. B&R to Siemens Migration
  7. B&R to Beckhoff Migration
  8. Migration Project Planning
  9. Minimizing Downtime During Migration
  10. Cost/Benefit Analysis Framework
  11. Legacy B&R Specific Considerations
  12. Cross-References
  13. Key Findings
  14. Sources

1. Overview

Modernizing a B&R control system falls on a spectrum with five distinct zones. The correct choice depends on hardware health, spare parts availability, downtime risk tolerance, budget, and long-term support requirements.

The Modernization Spectrum

Zone 1          Zone 2            Zone 3              Zone 4            Zone 5
REPAIR     | COMPONENT UPGRADE | IN-FAMILY      | CROSS-PLATFORM  | FULL REDESIGN
           |                   | CPU SWAP       | MIGRATION       |
           |                   |                |                 |
Cost:      | $10 - $500        | $1,500 - $5,000| $5,000 - $25,000| $25,000+
Risk:      | Low               | Low-Medium     | Medium-High     | High
Downtime:  | Hours             | 1-2 days       | 1-4 weeks       | 2-12 weeks
Disruption:| None              | Minimal        | Moderate        | Complete
           |                   |                |                 |
Example:   | Replace caps,     | X20CP1584      | X20CP3484 or    | New PLC + new
           | new CF card,      | -> X20CP1485   | CODESYS/Wago    | HMI + new IO
           | new battery       |                |                 | + reprogram

Assessment Framework

Use this questionnaire to determine which zone applies:

FactorZone 1-2 (Repair/Upgrade)Zone 3 (In-Family)Zone 4-5 (Migrate/Redesign)
CPU failure modeRepairable (caps, PSU, CF)Intermittent / slowUnrepairable / end of life
IO healthAll OKMostly OKDegraded or missing modules
SoftwareHave project fileHave project fileNo project file
Original OEMAvailable for supportGone but docs existGone, no docs
Remaining machine life< 3 years3-7 years7+ years
Safety systemNo safety or simple E-stopSafeLOGIC presentComplex safety rated to SIL 2+
Budget< $500$1,500-$5,000$5,000-$50,000+
Downtime window< 4 hours1-2 planned days1-4 weeks planned

Critical First Step: Documentation

Before making any decision, reconstruct documentation. See documentation-reconstruction.md and program-reverse-engineering.md for procedures.

Without the Automation Studio project file, software migration effort multiplies by 3-5x. Without IO wiring documentation, hardware swap downtime multiplies by 2-4x. Prioritize recovering both before committing to any migration path.

AS4 to AS6 Migration Tools (Critical for Software Recovery)

When migrating from the CP1584 to a modern replacement (e.g., CP3484), you will likely need to move from Automation Studio 4 to Automation Studio 6. This is not a simple upgrade — AS6 has breaking changes in project format, PVI version (6.x drops INA2000 support entirely), and mapp Framework. The B&R community maintains free tools to assist:

ToolRepository / SourcePurpose
as6-migration-toolsgithub.com/br-automation-community/as6-migration-toolsAutomated project conversion scripts, syntax migration helpers
BRLibToHelpgithub.com/br-automation-community/BRLibToHelpExtracts help documentation from B&R library files
SBOM Generatorgithub.com/br-automation-community/sbom-generatorGenerate Software Bill of Materials for AS projects

Migration path: CP1584 → CP3484 (or newer):

  1. Recover the AS4 project using techniques in program-reverse-engineering.md
  2. Open the project in AS4 and ensure it compiles cleanly
  3. Run the community migration tools to identify breaking changes
  4. Upgrade mapp components to their mapp 6 equivalents
  5. Replace all INA2000 PVI references with ANSL (see pvi-api.md)
  6. Re-target the hardware configuration to the new controller
  7. Test on the bench before deploying to the machine

AS 6.5 benefits for migration (December 2025): AS 6.5 introduces ST-OOP with full inheritance, polymorphism, access specifiers (PUBLIC/PRIVATE/PROTECTED), abstract methods, and method overriding — enabling modern object-oriented IEC 61131-3 programming that significantly improves code maintainability. Other AS 6.5 features relevant to migration: hard real-time multicore task scheduling (assign cyclic tasks to specific CPU cores), FTP RBAC, expanded ManagedCertificateStore (ANSL/FTP/HTTP/SMTP), TFTP disabled by default (security improvement), self-signed certificate handling, CLI library exporter (BR.AS.LibraryExporter.exe), and SNI support in AsHttp. See firmware-version-mgmt.md §3.2 for the complete AS 6.x release history.

Warning: The original AS4 TG dongle licenses may not carry forward to AS6. See license-mgmt.md for license recovery strategies.

See firmware-version-mgmt.md §5.3.1 for detailed AS4→AS6 breaking changes.

AR 6.5 Multicore Task Scheduling — Migration Impact

AS 6.5 with AR 6.5 introduces hard real-time multicore support that is a significant selling point for migrating to newer B&R hardware. Understanding this feature is important for migration planning because it changes how task scheduling works on the target hardware.

What changes in AR 6.5 multicore:

FeatureAR 4.x (CP1584)AR 6.5 (multicore hardware)
Task schedulingSingle-core preemptiveTasks assignable to specific cores
Cyclic #1–#8All on one coreDistribute across cores
ANSL communicationShares core with cyclic tasksDedicated core for ANSL tasks
Motion controlCompetes with logic for CPUIsolate motion on dedicated core
I/O processingShares CPU with user tasksBackground I/O processor still independent

Practical benefit for migrated machines:

  • Motion control (Cyclic #1) can run on Core 0, while logic (Cyclic #2–#4) runs on Core 1
  • ANSL/OPC-UA communication no longer competes with real-time tasks for CPU time
  • Higher total throughput without reducing individual cycle times
  • Reduced cycle time violations (Exception 144) on complex machines

Hardware requirements:

  • Multicore requires AR 6.5 AND a multicore CPU (X20CP3xxx, X20EM, APC industrial PCs)
  • The X20CP1684 (single-slot successor to CP1584) does NOT support multicore — it has a single-core processor
  • For multicore, you need at minimum a X20CP3xxx (3-slot, dual-core) or X20EM (ARM multi-core)

Migration implication: If your CP1584 machine has complex motion + logic that frequently hits cycle time violations, migrating to a multicore platform (X20CP3xxx or X20EM with AR 6.5) may eliminate those issues entirely by distributing task load across cores. This is a stronger justification for migration than just security compliance.

Source: B&R Community — “RELEASE 2025: Automation Studio 6.5 - Complete overview” (community.br-automation.com/t/release-2025-automation-studio-6-5-complete-overview/9439), “Innovation 2025: Multicore Processing in Automation Software 6” (community.br-automation.com/t/innovation-2025-multicore-processing-in-automation-software-6/8477)

ST-OOP in AS 6.5 — Modern IEC 61131-3 for Refactored Projects

AS 6.5 adds full Structured Text Object-Oriented Programming (ST-OOP) to the IEC 61131-3 language set. This is relevant for migration because when refactoring recovered AS4 code, you have the option to restructure it using modern OOP patterns:

FeatureSyntaxUse Case
InheritanceFUNCTION_BLOCK Child EXTENDS ParentReuse common axis/motor logic across multiple axes
PolymorphismDynamic method dispatch via OVERRIDEGeneric state machine framework with specialized behaviors
Access specifiersVAR PUBLIC, VAR PRIVATE, VAR PROTECTEDProtect calibration data from accidental modification
Abstract methodsABSTRACT METHODDefine interface contracts for device drivers
ClassesCLASS, END_CLASSValue-type objects (not reference-type like function blocks)

When to use ST-OOP in migration:

  • When the recovered AS4 project uses copy-paste patterns across multiple axes/stations
  • When refactoring for maintainability by a one-man team (reduces code duplication)
  • When building new functionality on top of the migrated base

When NOT to use ST-OOP:

  • When doing a literal migration (keep existing code structure unchanged)
  • When the target is AS 4.x compatibility (ST-OOP requires AS 6.x)
  • When team members are not familiar with OOP concepts

2. CP1584 Repair vs Replace Decision Matrix

X20CP1584 Hardware Architecture

ComponentSpecificationFailure ModeRepairability
CPUIntel Atom E620T 600MHzOverheating (thermal paste), clock degradationLow - not practical
RAM256MB DDR2 SDRAM (soldered)Memory errors, bit flipsNot repairable
Flash/BootCompactFlash Type I slotCard failure, corruption, connector wearHigh - swap CF card
BatteryCR2477N 3V/950mAh (retentive data + RTC)Dead battery, data lossTrivial - swap battery
PSUExternal 24VDC via X20 busCapacitor failure, voltage regulationModerate
BaseX20 base modulePin corrosion, connector damageLow-Moderate
Ethernet1x GbE + 1x POWERLINK (RJ45)ESD damage, connector wearLow
USB2x USB (Type A)Physical damageLow
POWERLINKX20 bus interfaceFPGA failureNot repairable
Display interfaceNone (headless)N/AN/A
Power supply input24VDC via X20 busVoltage spikes, reverse polarityFuse + buffer cap

Common Failure Modes and Repair Costs

Failure SymptomLikely CauseRepair CostTimeDifficulty
Will not boot, no LED activityCF card corruption or failure$20-80 (CF card)30 minLow
Will not boot, LED on but no EthernetCorrupt firmware image on CF$0 (re-flash from backup)1-2 hrsMedium
Intermittent reboots, watchdog tripsCapacitor degradation on PSU$10-50 (capacitors)1-2 hrsMedium
CMOS reset on power cycle, wrong date / retentive data lostDead CR2477N battery$5-155 minTrivial
No Ethernet linkESD damage to PHY / connector$50-150 (module swap)1 hrMedium
POWERLINK bus faultsFPGA communication errorNot repairable - replace CPUN/AN/A
Memory errors, blue screenDDR2 failure (soldered)Not repairable - replace CPUN/AN/A
Overheating, thermal shutdownThermal paste degradation, fanless clog$5-20 (paste + cleaning)30 minLow
USB port not workingPhysical damageNot practical to repairN/AN/A
Complete no-powerExternal PSU failure or base module$50-200 (PSU) or $200-400 (base)1 hrLow-Medium

Decision Flowchart

                    CP1584 FAILURE REPORTED
                            |
                    Does it power on?
                   /                \
                 YES                 NO
                 |                    |
          Does it boot to           Check external PSU.
          AR runtime?               Replace PSU ($50-200).
           /        \                Does it power on now?
         YES         NO              /             \
          |           |            YES              NO
     Machine       CF card likely   Fixed.          Base module or
     is running    corrupt.         Monitor.        CPU failure.
     but degraded. Replace CF       |
     Monitor.     ($20-80) +      CPU hardware
          |        re-flash.       failure. Replace.
          |           |            ($1,500-$5,000
     Which                Is project  for in-family
     component            file backed  upgrade)
     is failing?          up?
      /     \           /         \
    SAFE    NON-SAFE  YES          NO
    LOGIC   FAULT      Recover      Recover project
     |        |        from CF       first, then
     |        |        or backup.    re-flash.
     |        |                    |
     |        |              Can you
     |        |              recover it?
     |        |               /     \
     |        |             YES      NO
     |        |              |        |
     |        |         Re-flash    Must reverse-
     |        |         and test.   engineer or
     |        |                    recreate.
     |        |                    (See program-
     |        |                     reverse-
     |        |                     engineering.md)
     |        |
     |        |
   Safety     Is failure
   hardware   recurring?
   issue.     /         \
   Requires   YES         NO
   certified  |            |
   repair     Track        Repair
   or         frequency.  complete.
   module     If >2x/year,  Return to
   replace.   plan        service.
     |        upgrade.
     |           |
     |        Is machine
     |        >3 years from
     |        planned end of
     |        life?
     |         /       \
     |        YES       NO
     |         |         |
     |     Consider   Repair and
     |     in-family   monitor.
     |     upgrade.
     |
  SafeLOGIC
  module
  failure:
  - Check
    X20 safe
    bus cables
  - Check
    configuration
  - Replace safe
    module
    ($500-2000)
  - Recertification
    may be required

When Repair Makes Sense

  • Machine expected remaining life under 3 years
  • Failure is a known single-component issue (CF card, battery, capacitors)
  • Spare CPU is already in inventory (common: OEM bought 2-3 spares)
  • Downtime budget is under 4 hours
  • No safety system involved or safety system unaffected
  • Software is stable and well-documented
  • Budget is constrained to under $500

When Replacement Is the Only Option

  • CPU itself has failed (Atom processor, DDR2, FPGA)
  • POWERLINK bus interface is unreliable
  • Multiple recurring failures indicating board-level degradation
  • No spare CPU available and none on the secondary market
  • Machine life extension justifies capital expenditure
  • Need for additional IO capacity, memory, or communication interfaces
  • Safety system requires upgrade for compliance

CP1584 on the Secondary Market

SourceTypical PriceConditionRisk
Surplus brokers (eBay, surplus.net)$400-$1,200Used, unknown runtimeFirmware mismatch, age
Industrial parts brokers (PLC Center, Radwell)$800-$2,000Tested, warranty30-90 day warranty
B&R direct (if still stocked)$2,000-$4,000New, full warrantyMay not be available
Refurbished by specialist$600-$1,500Refurbished, tested90-day to 1-year warranty
Machine graveyard (same OEM)$0-$300Untested, as-isFirmware, age, unknown

Important: When buying a replacement CP1584, match the firmware version exactly if possible. See firmware-version-mgmt.md. A firmware version mismatch may require recompiling the project in Automation Studio, which requires the project file.


Migration Within X20 Platform

CP1584 Discontinuation Notice (SN 2022/54): B&R issued discontinuation notice SN 2022/54 for the X20CPx58x series (CP1584, CP1585, CP3584, CP3585) due to component discontinuation. Last-Time-Buy (LTB) deadline was February 28, 2023. The CP1584 is now in the Obsolete phase of B&R’s lifecycle — no new units are available from B&R, and repair service is available only for a limited time after obsolescence. This makes spare parts sourcing from the secondary market (eBay, surplus brokers, classicautomation.com, all4sps.com) critical. Always verify firmware compatibility and burn-test used CPUs before deploying as production spares. See spare-parts.md for sourcing strategies.

The X20 system celebrated its 20th anniversary in 2024 and is actively sold and supported by B&R with no end-of-life announced. Product Manager Andreas Hager confirmed: “The X20 is twenty years old and still going strong.” The three-part module design (bus module + electronic module + terminal block) has remained consistent since 2004, ensuring backward compatibility for IO modules. Migration within X20 is the lowest-risk upgrade path because the programming environment (Automation Studio), the runtime (Automation Runtime / AR), the IO bus (POWERLINK + X2X), and the IO modules remain the same or are backward compatible.

Source: B&R Press Release, October 2024

B&R Product Lifecycle Phases

B&R uses a four-phase lifecycle model for all products. Understanding this is critical when planning spare parts and migrations:

PhaseStatusCustomer Action
ActiveFull production, available unconditionallyUse for new projects
ClassicStill in production, but beginning phase-outB&R notifies customers 3 years before phase-out; do not use for new projects
LimitedOnly Last-Time-Buy (LTB) orders fulfilledMust have placed binding LTB order during Classic phase; no new orders
ObsoleteNo longer availableB&R repair service available for 3 years after obsolescence

The current lifecycle status of any B&R product is visible at www.br-automation.com and in B&R’s online offers system. Check before committing to a migration path.

Source: B&R Lifecycle Policy

Target CPU Comparison

ParameterX20CP1584 (Current)X20CP1585X20CP1684X20CP1484X20CP1485X20CP3484X20CP3485
ProcessorIntel Atom E620T 600MHzIntel Atom E640T 1.0GHzIntel Atom E680T 1.0GHzIntel Atom E3825 1.33GHzIntel Atom E3845 1.91GHzIntel Celeron J1900 2.0GHzIntel Celeron J3455 1.5GHz
Cores1112444
RAM256 MB DDR2256 MB DDR2256 MB DDR21 GB DDR3L2 GB DDR3L4 GB DDR3L4 GB DDR4
User SRAM1 MB1 MB1 MB1 MB1 MB1 MB1 MB
StorageCompactFlashCompactFlashCompactFlashSD cardSD cardSD cardSD card
Ethernet1xGbE + 1xPOWERLINK1xGbE + 1xPOWERLINK1xGbE + 1xPOWERLINK2x 10/1002x 10/100/10003x 10/100/10002x 10/100/1000
Interface slots1111132
POWERLINKV1/V2 (MN/CN)V1/V2 (MN/CN)V1/V2 (MN/CN)1x via bus1x via bus2x via bus2x via bus
USB2x USB 1.1/2.02x USB 1.1/2.02x USB 1.1/2.02x Type A2x Type A2x Type A2x Type A
BatteryCR2477N (950mAh)CR2477N (950mAh)CR2477N (950mAh)CR2032CR2032CR2032CR2032
Min cycle time400 us200 us200 us1 ms500 us200 us100 us
Power consumption8.6 W3 WN/AN/AN/AN/AN/A
DisplayNoneNoneNoneNoneNoneDVI-IDVI-I
Approx. priceDiscontinued$2,500-$3,500$2,000-$3,000$1,500-$2,500$2,000-$3,500$3,000-$5,000$3,500-$5,500
AR compatibilityAR 4.xAR 4.x (AS 4.3+)AR 4.x (AS 4.7+)AR 4.xAR 4.xAR 4.xAR 4.x
Recommended for(Legacy)Best drop-in upgradeDrop-in upgradeBudget upgradeStandard upgradePerformance upgradePerformance upgrade

X20CP1585 is the best direct drop-in replacement for CP1584: Same Atom family processor at higher clock (1.0 GHz vs 0.6 GHz), same CompactFlash storage (no media migration), same RAM (256 MB DDR2), same interface slots, same form factor, and same X2X/POWERLINK bus architecture. The faster CPU halves the minimum task class cycle time (200 us vs 400 us) and dramatically reduces power consumption (3 W vs 8.6 W). Supports OPC-UA. Available from industrial parts suppliers (~$2,500-$3,500 new, ~$1,000-$2,000 surplus). Confirmed as a valid upgrade path by B&R Community: see community.br-automation.com/t/x20cp1585-controller-upgrade/8885.

X20CP1684 is an alternative direct replacement: Same CompactFlash storage and same RAM. Identical performance profile to CP1585 (1.0 GHz, 200 us minimum cycle). Requires Automation Studio 4.7 or later. See community.br-automation.com/t/upgrading-x20cp1584-with-x20cp1684/5727.

X20CP3484 is the performance upgrade path: Switches from CompactFlash to SD card (requires media migration), adds more interface slots and faster POWERLINK. The DDR4 variant provides even better memory performance.

Important: Board-level exchange between CP1484 and CP1584 is NOT possible — the processor types are different and the boards are incompatible. See community.br-automation.com/t/exchange-electronic-boards-between-cpu-x20cp1484-and-x20cp1584/5343.

New Generation X20 Controllers (AR 6.x Targets)

B&R announced a new generation of X20 controllers with Intel Apollo Lake I processors, significantly higher performance, additional RAM, integrated onboard flash memory, and OPC UA over TSN support. These controllers target AR 6.x and Automation Studio 6.x and represent the forward-looking migration path from the CP1584:

ParameterX20 New Gen (Apollo Lake I)X20CP3687XX20CP0484-1 (Compact-S extended)Key Difference from CP1584
ProcessorIntel Apollo Lake IIntel (PC-class performance)IntelModern multi-core architecture
RAM512 MB+ DDR3L/DDR4High (PC-class)512 MB DDR3L, 2 GB internal flash2-4x CP1584
StorageSD card + onboard flashSD + onboard flashSD card + 2 GB onboard flashNo CF card dependency
EthernetMultiple GbE portsMultiple GbE1x or 2x GbEMore connectivity options
Interface slots1-331Depends on model
POWERLINKV2 via bus modulesVia bus modulesVia bus moduleSame protocol family
OPC UA over TSNYesYesVia bus moduleMajor new capability — deterministic OPC UA at field level
Field-level masterYesYesConfigurableCan serve as TSN/OPC UA field master
AR compatibilityAR 6.x onlyAR 6.xAR 6.xNot backward compatible with AR 4.x
AS requirementAS 6.xAS 6.xAS 6.xSeparate product line from AS 4.x

X20CP3687X — “The power of a PC” in a compact X20 controller. B&R positions this as the highest-performance X20 controller, combining industrial PC performance with the compact X20 form factor. Ideal for machines that need advanced motion control, vision processing, or IIoT gateways alongside PLC control.

X20CP0484-1 — Extended Compact-S series controller with 512 MB RAM and 2 GB internal flash. This is the budget-friendly AR 6.x entry point, suitable for machines that don’t need the full performance of the Apollo Lake I generation but still want patchable AR 6.x firmware.

Sources: B&R “Expanded X20 PLC generation” product page (br-automation.com/en/products/plc-systems/innovations/)

Critical migration implications:

  1. AS 6 is a separate product — it does not replace AS 4.x. It requires its own license and installation. Projects from AS 4.x cannot be opened directly in AS 6.x; they must be ported using the community migration tools.
  2. AR 6 drops VxWorks 5.5 — the underlying RTOS migrates to VxWorks 6.x/7.x. Binary-incompatible. All .br modules must be recompiled for AR 6 targets.
  3. INA2000 protocol is deprecated in AR 6.x. PVI 6.x uses only ANSL. See pvi-api.md for the implications.
  4. CF cards are being phased out in favor of SD cards and onboard flash. The CP1584’s dependency on B&R-certified CF cards goes away.
  5. exOS (Linux alongside AR) is available on multi-core AR 6 controllers, enabling IIoT capabilities without a separate PC. See ar-rtos.md §1.3 and iiot-retrofit.md for exOS details.

Development Tools Update (2025-2026)

New community tools and official B&R tools have emerged that simplify B&R development and migration:

ToolSourcePurpose
Automation Studio CodeB&R (bundled with AS 6.3+)VS Code-based editor with modern ST/C++ editing, syntax highlighting, minimap, Git integration, and AS Copilot AI assistant. Open beta since June 2025. Fully compatible with AS 6 projects.
AS CopilotB&R (cloud service)AI assistant integrated into AS Code for ST code generation and commenting. Free until end of 2025 (rate limited). Requires Copilot account. C/C++ support planned.
VS Code B&R Automation Toolsgithub.com/br-automation-com/vscode-brautomationtoolsEdit, build, and transfer AS projects from VS Code. Provides IntelliSense for C/C++ programs, build tasks via BR.AS.Build.exe, and transfer tasks via PVITransfer.exe. Requires AS and PVI installed on the system. Not a B&R product — community-maintained.
Structured Text VS Code extensionmarketplace.visualstudio.com/items?itemName=Serhioromano.vscode-stSyntax highlighting for IEC 61131-3 ST in VS Code. Can be configured for .fun, .var, .typ B&R file extensions.
Loupe Package Manager (LPM)loupeteam.github.io/LoupeDocs/tools/lpm.htmlCLI for managing Loupe packages in AS and Loupe UX ecosystems. Install, update, and remove packages from the command line.
as6-migration-toolsgithub.com/br-automation-community/as6-migration-toolsAutomated AS4→AS6 project conversion (existing entry — still the primary migration tool)
OMJSON / OMBSONgithub.com/loupeteam/OMJSON, OMBSONJSON/BSON communication libraries for B&R PLCs. Enables modern JSON-based IIoT communication directly from PLC code.
TCPComm / UDPCommgithub.com/loupeteam/TCPComm, UDPCommSimplified wrappers around AsTCP/AsUDP system libraries for easier TCP/UDP communication in PLC programs.
AxisLibgithub.com/loupeteam/AxisLibControl B&R Mapp Motion and ACP10 servo axes from a higher-level API.

Note: The awesome-B-R community repository was archived on April 30, 2025 (made read-only). The curated list of tools is now frozen but remains a valuable reference. Active tool development continues in individual repositories. The archive is at github.com/archive-br-automation-com/awesome-B-R.

AS Code vs VS Code B&R Tools — Which to Use?

FeatureAS Code (B&R official)VS Code B&R Tools (community)
ST editingFull IntelliSense, syntax highlightingSyntax highlighting only (via separate extension)
C/C++ editingFull IntelliSense, syntax highlightingIntelliSense via community extension
Build/TransferIntegrated via AS 6.3Build via BR.AS.Build.exe, Transfer via PVITransfer.exe
AI assistanceAS Copilot (cloud)None
Git integrationNativeNative (VS Code built-in)
AS 4.x compatibilityNo — AS 6.x onlyYes — works with AS 4.x projects
DebuggingIntegratedVia PVI
CostRequires AS 6 license (no extra cost)Free

What Changes with In-Family Migration

AspectImpactAction Required
CPU speedFaster cycle timesMay need to adjust task timing
RAMMore program/data spaceNo action required, benefits automatic
Storage (CF to SD)Different media typeClone CF to SD card before swap
Ethernet speed10/100 to 10/100/1000 on someRecheck auto-negotiation on switches
POWERLINKSame protocol, same timingNo action for single node; verify bus config for multi-node
IO modulesBackward compatiblePlug-and-play, verify bus addresses
Software projectSame AR, same programmingOpen in AS 4.x, recompile, download
mapp componentsVersion differences possibleVerify mapp version compatibility
Safety configurationSafeLOGIC modules compatibleRe-verify safety parameters after download
Firmware versionMust match AR versionSee firmware-version-mgmt.md

Migration Steps in Automation Studio

Prerequisites:

  • Automation Studio 4.x installed (AS 4.x is current)
  • Original project file (.apj) recovered or reconstructed
  • Target CPU firmware installed in Automation Studio
  • CF card backed up using SD card or USB transfer

Step-by-Step Procedure:

  1. Backup existing system

    • Create full CF card image: dd if=/dev/sdX of=cp1584_backup.img bs=4M
    • Backup Automation Studio project file
    • Export IO configuration and hardware tree
    • Document all parameter values (see config-file-formats.md)
    • Record POWERLINK node addresses and bus timing
  2. Open project in Automation Studio 4.x

    • If project was created in AS 3.x, AS 4.x will prompt for migration
    • Accept migration. Review migration log for warnings.
    • Common migration warnings: deprecated function blocks, renamed libraries
    • Resolve all warnings before proceeding
  3. Change hardware configuration

    • In the Hardware Catalog, locate the target CPU
    • Right-click existing CPU in the hardware tree -> Replace Hardware
    • Select the new CPU model
    • Verify all IO modules are still recognized
    • Check for any address conflicts after replacement
  4. Verify and resolve library compatibility

    • Check Library Repository for all used libraries
    • Update any libraries flagged as incompatible
    • Pay special attention to mapp component versions
    • Rebuild project: Project -> Rebuild All
  5. Adjust timing parameters

    • Open Task Configuration
    • Review cycle times against new CPU performance
    • If cycle times were tight on old CPU, they will be fine on new CPU
    • If software used timing-dependent code (WAIT ms, hardware counters), verify
    • Adjust POWERLINK cycle time if required (usually no change needed)
  6. Prepare new CPU

    • Insert SD card in new CPU
    • Power on new CPU, connect Ethernet
    • Update firmware via Automation Studio if needed: Tools -> Update Firmware
    • Verify firmware version matches project requirements
    • Set IP address to match original CPU configuration
  7. Download and test

    • Download project to new CPU: CPU -> Download
    • Verify all IO modules are detected on bus
    • Run I/O check: manually activate each input, verify each output
    • Run Auto Configuration to let IO modules self-initialize
    • Run machine through manual cycle if possible
  8. Safety system verification

    • If SafeLOGIC is present: re-verify all safety parameters
    • Check safe inputs, safe outputs, safe analog values
    • Confirm safe bus communication
    • Document safety verification for compliance records
  9. Commission and monitor

    • Run machine in automatic mode
    • Monitor for 4-8 hours minimum
    • Check for any unexpected behavior in timing-sensitive sequences
    • Archive project with new hardware configuration

Hardware Replacement Procedure

PRE-SWAP CHECKLIST
==================
[ ] Machine powered down and locked out (LOTO)
[ ] Original CPU CF card backed up (dd image)
[ ] New CPU firmware version verified
[ ] New CPU IP address configured
[ ] Ethernet cables labeled
[ ] POWERLINK bus cables labeled
[ ] X20 base module connectors labeled
[ ] IO module positions documented with photos
[ ] Project compiled and ready for download
[ ] Test plan prepared

SWAP PROCEDURE
=============
1. Disconnect Ethernet cables from old CPU
2. Disconnect POWERLINK bus cables from old CPU (note: may be daisy-chain)
3. Remove old CPU from X20 base module (slide latch)
4. Mount new CPU on X20 base module
5. Reconnect POWERLINK bus cables (same positions)
6. Reconnect Ethernet cables (same positions)
7. Power on machine
8. Connect laptop to CPU via Ethernet
9. Ping CPU IP address - confirm connectivity
10. Open Automation Studio, connect to CPU
11. Download project
12. Verify IO configuration matches
13. Run I/O check
14. Start machine, monitor

POST-SWAP
=========
[ ] All IO modules detected on bus
[ ] IO check passed (all inputs/outputs verified)
[ ] Machine runs through full automatic cycle
[ ] No error flags in diagnostics
[ ] Backup of new configuration saved
[ ] Old CPU archived as spare (if functional)
[ ] Maintenance log updated

IO Module Backward Compatibility

X20 IO modules are generally backward compatible across CPU generations. Specific notes:

  • X20 digital and analog IO modules: fully compatible, plug-and-play
  • X20 safe IO modules: compatible, but safety parameters must be re-verified
  • X20 communication modules (PROFINET, EtherNet/IP, Modbus): compatible
  • X20 bus couplers: compatible
  • X20 power supply modules: compatible
  • X20 interface modules (X2X, POWERLINK): compatible

Exception: Some very early X20 modules (pre-2010) may need firmware updates to work with AR 4.x. Check the module firmware version in Automation Studio’s Hardware Catalog.


4. X20 to X67 Migration (Form Factor Change)

X67 System Overview

B&R X67 is the IP67-rated compact variant of the X20 system. It uses the same Automation Runtime, the same POWERLINK protocol, and the same programming model (Automation Studio). The difference is physical: X67 modules are designed for mounting directly on the machine without a control cabinet.

X20 vs X67 Comparison

AspectX20X67
IP ratingIP20 (cabinet mount)IP67 (direct machine mount)
Form factor15mm wide modules, DIN railCompact blocks, M12 connectors
WiringScrew terminalsM12 connectors (pre-wired cables)
IO densityHigher per moduleLower per module (distributed)
Cost per pointLowerHigher (connector cost)
DeploymentCentralized cabinetDistributed on machine
SuitabilityNew builds, cabinet retrofitsRetrofit without cabinet expansion
CPUFull range (CP1584, CP1484, etc.)X67C CPU variants
IO busPOWERLINK + X2XPOWERLINK + X2X (same)
ProgrammingAutomation StudioAutomation Studio (same)
SafetySafeLOGIC via X20 safe busSafeLOGIC via X67 safe bus
DiagnosticLED + web interfaceLED + web interface

When X67 Makes Sense

  • Machine has no room for additional cabinet space
  • Need to distribute IO across multiple machine zones
  • IP67 environment requirement (washdown, dusty, outdoor)
  • Simplified installation (M12 connectors vs screw terminals)
  • Retrofit where pulling new cables to cabinet is impractical

When X20 Remains Better

  • Existing X20 IO modules are healthy and compatible
  • Cabinet space is available
  • Cost sensitivity (X67 modules cost more per IO point)
  • Centralized control architecture preferred
  • Complex safety system (more options in X20)

X20 to X67 Migration Considerations

ConcernDetail
Project portabilitySame AR, same AS project structure. Minor hardware tree changes only.
IO wiringX67 uses M12 connectors. Requires complete rewiring of field devices.
Bus wiringPOWERLINK topology unchanged. Physical cable type may differ (IP67 rated).
CPU selectionUse X67C-series CPU. Performance comparable to X20CP1484/1485.
Safety migrationSafeLOGIC configuration portable but safe IO modules change.
Physical installationX67 modules mount with brackets or adhesive. No DIN rail needed.
CostHigher per-point IO cost offset by reduced cabinet and wiring cost.

X67C CPU Models for Migration

When migrating from a CP1584, the most appropriate X67C CPU replacements are:

ModelProcessorRAMPOWERLINKEthernetNotes
X67BC8321Intel Atom (1.6 GHz)1 GB DDR32x POWERLINK2x GbEDirect upgrade path, far exceeds CP1584
X67BC8322Intel Atom (1.6 GHz)1 GB DDR32x POWERLINK2x GbEWith 2x USB, RS232
X67BC8323Intel Atom (1.6 GHz)1 GB DDR32x POWERLINK2x GbEWith interface slots (serial, CAN)
X67DC832AIntel Atom (1.6 GHz)512 MB DDR31x POWERLINK2x GbEDIP switch for station number

Note: X67C CPUs use Intel Atom processors significantly faster than the CP1584’s E620T. All X67C models support AR 6.x, which provides substantially more features than the CP1584’s AR 4.x. The migration from AR 4.x to AR 6.x requires Automation Studio 6 and careful project conversion (see Section 3).

X67 M12 Connector Wiring

X67 modules use industry-standard M12 connectors (A-coded for power/signal, D-coded for Ethernet/POWERLINK):

Connector TypeApplicationPin Configuration
M12 A-coded 5-pinDigital IO, analog IOPin 1: +24V, Pin 2: Signal, Pin 3: Ground, Pin 4: NC, Pin 5: Shield
M12 A-coded 8-pinAnalog IO (differential)Pin 1: +24V, Pin 2: Signal+, Pin 3: Ground, Pin 4: Signal-, Pin 5: NC/Supply-
M12 D-coded 4-pinEthernet, POWERLINKStandard IEEE 802.3af: Pin 1: TX+, Pin 2: TX-, Pin 3: RX+, Pin 4: RX-
M12 A-coded 12-pinMulti-channel digitalTwo channels per connector

X67 Safe IO Migration Notes

When migrating safety systems from X20 to X67:

X20 Safe ModuleX67 EquivalentKey Differences
X20SI4340 (safe digital input, 4-ch)X67SI4340 (safe digital input, 4-ch)Same function block interface, M12 instead of terminal
X20SO4120 (safe digital output, 4-ch)X67SO4120 (safe digital output, 4-ch)Same function block interface, M12 instead of terminal
X20SA4430 (safe analog input)X67SA4430 (safe analog input)Same function block interface

SafeLOGIC configurations are fully portable — the safety program runs identically on X20 and X67 safety modules. The hardware configuration tree must be updated with the correct X67 module order codes, but no safety logic changes are needed. Safety recertification (SIL verification) should be performed after any hardware change per IEC 61508 requirements.


5. B&R to CODESYS Migration

Overview

CODESYS V3 is the dominant IEC 61131-3 development environment that runs on hardware from multiple vendors. Migrating from B&R to CODESYS means choosing a new hardware platform (Wago, Beckhoff, ifm, etc.) while porting the software to CODESYS.

Target Hardware Platforms

PlatformCPU ExamplePrice RangeEtherCATPROFINETCODESYS Support
Wago PFC200Wago PFC200 (ARM Cortex A8)$500-$2,000Yes (via CODESYS EtherCAT)YesCODESYS V3.5
Wago Edge ControllerWago PFC100/200 V3$800-$3,000YesYesCODESYS V3.5
Beckhoff CXBeckhoff CX9020 (Intel)$1,000-$3,000Yes (native)YesCODESYS V3.5 (via TwinCAT)
ifm CRifm CR7000/CR8000$800-$2,500YesYesCODESYS V3.5
Any CODESYS V3 controllerVarious ARM/x86$500-$5,000VariesVariesCODESYS V3.5
Raspberry Pi + CODESYSRPi 3/4 + CODESYS RTE$100-$300NoNoCODESYS V3.5 (limited)

What Is Portable from B&R to CODESYS

ElementPortabilityNotes
IEC 61131-3 languages (ST, LD, FBD, SFC, IL)HighST is most portable. IL is deprecated in CODESYS.
Standard function blocks (TON, TOF, CTU)HighSyntax identical. Confirm timing behavior.
User-defined function blocksMedium-HighRewrite using CODESYS FB structure. Logic is portable, B&R-specific calls are not.
Data types (STRUCT, ARRAY, ENUM)HighMostly identical syntax.
Task configurationMediumDifferent task model. Map B&R tasks to CODESYS tasks.
POWERLINK configurationLowPOWERLINK supported via EPSG CODESYS EtherCAT stack but configuration differs entirely.
mapp componentsNoneNo equivalent. Must implement functionality from scratch.
B&R library functions (mc, as, sys)NoneMust find or write equivalents.
Visualization (mapp View / Panel)NoneMust rebuild in CODESYS WebVisu or third-party HMI.
OPC-UA communicationHighBoth support OPC-UA, but configuration is different.
Modbus communicationMediumBoth support Modbus, but implementation differs.
File system operationsLowB&R FileIO library has no CODESYS equivalent. Use SysFile library.

What Is NOT Portable (Must Be Rewritten)

  • All B&R-specific libraries (mapp, mc, as, sys, FileIO, Timer, etc.)
  • All mapp components (mapp Motion, mamp View, mapp Alarm, etc.)
  • B&R visualization pages
  • B&R configuration objects (Axis, CAM, etc.)
  • B&R-safe function blocks (SafeLOGIC programs)
  • B&R PVI communication
  • B&R-specific task triggers (hardware interrupt, POWERLINK event)

POWERLINK (Ethernet POWERLINK) is standardized through EPSG (Ethernet POWERLINK Standardisation Group). CODESYS supports POWERLINK through the CODESYS EtherCAT stack, but this is not a direct drop-in replacement.

Reality check: Most CODESYS hardware platforms use EtherCAT, not POWERLINK. If you need to keep existing POWERLINK IO, your options are limited:

  1. Use a B&R X20 bus coupler as a POWERLINK-to-EtherCAT gateway (complex)
  2. Replace IO with EtherCAT-compatible IO (requires rewiring)
  3. Use CODESYS on B&R hardware (possible but defeats migration purpose)

Recommendation: If IO must be replaced anyway (due to degradation), migrate to EtherCAT IO simultaneously. If IO is healthy, stay within B&R ecosystem.

Safety System Migration: B&R SafeLOGIC to CODESYS Safe SIL

This is the most critical and costly aspect of any cross-platform migration.

AspectB&R SafeLOGICCODESYS Safe SIL
ProgrammingB&R AS safe editorCODESYS Safe editor (separate SIL2/3 environment)
CertificationTUV-certified for B&R hardwareTUV-certified for specific CODESYS controller
IOX20 safe IO modulesPlatform-specific safe IO (EtherCAT FSoE)
ValidationB&R validation toolchainCODESYS Safety SIL validation toolchain
RecertificationRequired when changing hardwareRequired (new platform = new certification)
EffortN/A for same platform2-6 weeks for safety system alone
CostIncluded with SafeLOGIC modulesController + safe IO + engineering + certification

Safety migration is not a software port. It requires:

  • New SIL assessment for the target platform
  • Rewriting all safety logic in CODESYS Safe SIL
  • New hardware safety validation (FSoE communication tests)
  • Third-party validation and certification
  • Updated safety documentation (SRS, SIS, test records)

Estimated cost for safety migration alone: $5,000 - $25,000 depending on complexity.

Estimated CODESYS Migration Effort

ComponentEffort (person-days)Prerequisites
Hardware selection and procurement3-5IO requirements documented
Control logic porting (per 1000 IEC lines)5-15Original program understood
B&R-specific library replacement10-30Depends on library usage
Motion control reimplementation15-40If motion is used
HMI/visualization rebuild10-30If visualization is used
Communication (OPC-UA, Modbus, custom)5-15Protocol requirements
Safety system (if applicable)20-40SIL certification required
Testing and commissioning10-20Full system test
Total (simple, no motion, no safety)40-1008-20 weeks
Total (complex, with motion + safety)100-200+20-40+ weeks

6. B&R to Siemens Migration

Siemens Platform Overview

Siemens S7-1500 is the flagship PLC platform within the TIA Portal ecosystem. Migration from B&R to Siemens is a complete platform change: different hardware, different software (TIA Portal vs Automation Studio), different IO, different communication protocols.

Hardware Comparison

AspectB&R X20CP1584Siemens S7-1500 (e.g., CPU 1515-2 PN)
ProcessorIntel Atom E620T 600MHzSiemens industrial processor
RAM256MB DDR2256KB work memory, 1.5MB load memory
StorageCompactFlashSIMATIC Memory Card
Ethernet2x 10/100 + POWERLINK2x PROFINET (10/100/1000)
IOX20 via POWERLINK/X2XET 200 via PROFINET
ProgrammingAutomation Studio 4.xTIA Portal (STEP 7)
LanguagesIEC 61131-3 (ST, LD, FBD, SFC, IL)IEC 61131-3 (ST, LD, FBD, SFC) + Graph, CFC
SafetySafeLOGICF-CPU (Failsafe CPU)
MotionIntegrated (mapp Motion)Integrated (Technology Objects)
DiagnosticsWeb-based, LEDWeb-based, LED, TIA Portal integrated

Software Migration Challenges

B&R ConceptSiemens EquivalentMigration Complexity
Automation Studio projectTIA Portal projectComplete recreation
IEC 61131-3 ST codeSTEP 7 ST codeMedium - syntax differences
B&R Function Blocks (mapp, mc)Siemens FC/FB + Technology ObjectsHigh - rewrite required
POWERLINK busPROFINETComplete IO reconfiguration
X20 IO modulesET 200SP / ET 200MPComplete rewiring
mapp View visualizationWinCC Advanced/ComfortComplete recreation
OPC-UAOPC-UA (Siemens)Medium - different API
SafeLOGICF-CPU + F-I/OComplete safety system rewrite
Task configurationCycle OB, time OBMedium - different model
Data loggingSiemens Data LoggingMedium
Alarm managementSiemens Alarm ManagementMedium

IEC 61131-3 Dialect Differences (B&R ST vs Siemens ST)

B&R Automation Studio ST:          |  Siemens TIA Portal ST:
-----------------------------------+----------------------------------
x := y + z;                        |  x := y + z;
IF a THEN                          |  IF a THEN
  b := TRUE;                       |    b := TRUE;
END_IF;                            |  END_IF;

// B&R uses:                       |  // Siemens uses:
fbInst(input := 10);               |  fbInst(input := 10);
                                   |  // or:
                                   |  fbInst.Input := 10;

// B&R timer:                      |  // Siemens IEC timer:
TON_inst(IN := TRUE, PT := T#5s);  |  TON_Instance(IN := TRUE, PT := T#5S);

// B&R string:                     |  // Siemens string:
s := 'Hello';                      |  s := 'Hello';
                                   |  // STRING[254] type declaration
                                   |  // differs from B&R STRING type

// B&R array access:               |  // Siemens array access:
a[5] := 10;                        |  a[5] := 10;
                                   |  // Array bounds checking differs

// B&R pointer (rare):             |  // Siemens pointer:
p := ADR(variable);                |  p := %MW100; // absolute addressing

This is one of the most impactful changes. POWERLINK and PROFINET are fundamentally different protocols:

AspectPOWERLINK (B&R)PROFINET (Siemens)
StandardOpen (EPSG)Siemens + PI
TopologyTree, star, daisy-chainStar, tree (switched)
TimingDeterministic (isochronous)Deterministic (IRT, RT)
ConfigurationB&R AS or openCONFIGURATORTIA Portal
IO devicesX20 modulesET 200SP, ET 200MP, third-party
CablesStandard EthernetStandard Ethernet
SwitchesStandard or managedSiemens SCALANCE or standard

Impact: All IO must be replaced. All field wiring to IO terminals must be re-punched or re-connected. IO addresses will change. All IO references in program code must be updated.

Safety Migration: B&R SafeLOGIC to Siemens F-CPU

AspectB&R SafeLOGICSiemens F-CPU
Safety CPUSeparate SafeLOGIC module or integratedIntegrated F-CPU (same CPU with safety)
Safety IOX20 safe IO modulesF-I/O modules (ET 200F, ET 200SP F)
ProgrammingSafeLOGIC in Automation StudioF-CPU programming in TIA Portal
CertificationSIL 2/3SIL 1-3 (depends on F-CPU variant)
ValidationB&R toolsSiemens tools + TUV
Safety communicationSafe bus (B&R proprietary)PROFIsafe
Effort to migrateN/A3-8 weeks

Cost Comparison: In-Family vs Siemens Migration

Cost ItemB&R In-Family (X20CP1584 -> X20CP3484)Siemens S7-1500 Migration
New CPU$3,000-$5,000$2,000-$6,000
New IO modules$0 (reuse X20)$5,000-$20,000 (ET 200)
Software (AS 4.x)$0 (already have)$2,000-$5,000 (TIA Portal license)
Engineering labor2-5 days20-60 days
Safety recertificationMinimal (same platform)$5,000-$25,000
Wiring changesMinimalComplete rewiring
Commissioning downtime1-2 days1-4 weeks
TrainingMinimal (same tools)2-4 weeks for engineers
Total estimated cost$4,000-$8,000$25,000-$80,000+

7. B&R to Beckhoff Migration

Beckhoff Platform Overview

Beckhoff’s TwinCAT 3 environment runs on standard PC hardware (CX series industrial PCs or standard IPCs) and provides IEC 61131-3 programming. It is architecturally similar to B&R in several ways, making it a relatively more natural migration target than Siemens.

B&R vs Beckhoff: Architectural Similarities

AspectB&R X20Beckhoff TwinCAT 3
CPUIntel Atom on embedded moduleIntel Celeron/i-series on CX or standard IPC
BusPOWERLINK (Ethernet POWERLINK)EtherCAT
IOX20 modules (DIN rail, IP20)EtherCAT Terminals (DIN rail, IP20)
ProgrammingAutomation StudioTwinCAT 3 (CODESYS-based)
LanguagesIEC 61131-3IEC 61131-3 + Python + C++
SafetySafeLOGIC (SIL 2/3)TwinCAT Safety (SIL 2/3) via FSoE
HMIPower Panel / mapp ViewTwinCAT HMI / CX Touch panels
MotionIntegrated (mapp Motion)Integrated (TwinCAT NC PTP/NC I)
ConfigurationAS hardware treeTwinCAT System Manager
Cost modelHigher CPU, lower per-point IOLower CPU, moderate per-point IO

Key Differences

DifferenceImpact on Migration
POWERLINK vs EtherCATIO bus change. Must replace all IO modules and field wiring.
Automation Studio vs TwinCATDifferent IDE. Project structure differs.
B&R mapp componentsNo Beckhoff equivalent. Must implement functionality directly.
X20 module vs EtherCAT terminalsDifferent physical form factor, different wiring (screw terminals vs spring-clamp).
B&R-specific librariesMust rewrite for TwinCAT. TwinCAT has its own library ecosystem.
Configuration objectsB&R Axis/CAM objects -> TwinCAT NC PTP/NC I configuration.

Library Migration: B&R to TwinCAT

B&R Library/FunctionTwinCAT EquivalentNotes
mapp Motion (mcAXIS, mcPower)Tc2_MC_Power, Tc2_MC_BaseAxis configuration changes; FB interface differs but concepts similar
mapp AlarmXTc2_AlarmBeckhoff alarm management uses different trigger model
mapp View (HMI)Tc3_HMI or Tc3_WebUICompletely different HMI paradigm; web-based in TwinCAT
FileIOTc2_System SysFile*File operations; similar API surface
AsTCP / AsUDPTc2_SocketSocket API; similar but different function block naming
AsBrStrTc2_StandardString operations
AsMathTc2_Standard F_MATHMath functions
AsTimerTON/TOF/TP (IEC standard)Timer function blocks
McParam (drive params)EtherCAT drive configurationVia ESI (EtherCAT Slave Information) XML files
PVI (PLC access)ADS/AMS protocolBeckhoff’s native communication protocol
PowerlinkEtherCAT master (built into TwinCAT)Configure in System Manager, scan bus

Beckhoff Hardware Selection for Migration from CP1584

B&R ComponentBeckhoff ReplacementModel SuggestionNotes
X20CP1584 (CPU)CX9020 or C6920Intel Celeron N3160 (CX9020) or Core i (C6920)Far exceeds CP1584 performance
X20 base moduleCX bus coupler terminalsBK1120 (EtherCAT coupler)First terminal in each EtherCAT segment
X20 digital input (e.g., X20DI9371)EL1002, EL1004, EL10082/4/8-ch 24V DC digital inputSpring-clamp terminals
X20 digital output (e.g., X20DO9321)EL2002, EL2004, EL20082/4/8-ch 24V DC digital outputSpring-clamp terminals
X20 analog input (e.g., X20AI4622)EL3122, EL3152, EL31622-ch ±10V/4-20mA, 14-16-bitPer-channel configurable on some models
X20 analog output (e.g., X20AO4622)EL4002, EL40322-ch analog output
X20 POWERLINK interfaceIntegrated EtherCAT on CXN/ANo separate bus module needed
X20 RS232 (IF1)EL60211-ch serial RS232 terminal
ACOPOS driveAM8000/AM3000 servoEtherCAT-compatibleFSoE safe terminals for safety

The EtherCAT configuration replaces POWERLINK entirely. Configuration steps:

  1. Install TwinCAT 3 XAE on development PC
  2. Create new TwinCAT project (TwinCAT XAE project type)
  3. Add target device — configure CX9020 IP address
  4. Scan EtherCAT bus — TwinCAT System Manager auto-discovers connected terminals
  5. Import ESI XML files — for any non-Beckhoff EtherCAT slaves (drives, gateways)
  6. Map process data — link EtherCAT terminal I/O to PLC variables in the “I/O” mapping view
  7. Configure drive axes — TwinCAT NC PTP for point-to-point, NC I for interpolated motion
  8. Safety configuration — add TwinCAT Safety project, map safe I/O, write safety PLC program

openCONFIGURATOR: If migrating to a non-Beckhoff EtherCAT platform (CODESYS, Wago), use the open-source openCONFIGURATOR tool from the EtherCAT Technology Group (https://www.ethercat.org) instead of TwinCAT System Manager for bus configuration. openCONFIGURATOR provides similar EtherCAT network scanning and process data mapping capabilities.

Migration Path

  1. Hardware: Replace B&R X20 CPU with Beckhoff CX9020 (or similar). Replace all X20 IO with EtherCAT terminals. Replace power supplies if needed.

  2. Software:

    • Create new TwinCAT 3 project
    • Port IEC 61131-3 logic (ST code is most portable)
    • Configure EtherCAT IO in TwinCAT System Manager
    • Replace B&R library calls with TwinCAT library equivalents (see table above)
    • Configure motion control in TwinCAT NC PTP or NC I
    • Build HMI in TwinCAT HMI or web-based
  3. Safety:

    • Replace B&R SafeLOGIC with TwinCAT Safety
    • Use EtherCAT FSoE safe terminals (EL6900, etc.)
    • Rewrite safety logic in TwinCAT Safe editor
    • Recertify (SIL assessment on new platform)
  4. HMI replacement:

    • mapp View → TwinCAT HMI (Tc3_HMI) for PC-based visualization
    • Or use TwinCAT TF2000 (web-based HMI) for browser access
    • mapp View widget library has no TwinCAT equivalent; rebuild all screens
    • Consider third-party web HMI solutions if TwinCAT HMI is insufficient

Beckhoff vs Siemens vs B&R Stay: Decision Matrix

CriteriaStay with B&RMigrate to BeckhoffMigrate to Siemens
Lowest migration effortYesMediumHigh
Lowest total costYes (if in-family)MediumHigh
Best long-term supportGood (B&R active)Excellent (Beckhoff large)Excellent (Siemens dominant)
Widest talent poolSmall (B&R niche)MediumLarge (Siemens standard)
Open standards supportGood (POWERLINK open)Excellent (EtherCAT open)Mixed (PROFINET proprietary)
Motion control sophisticationHighHighHigh
Safety certificationGoodGoodGood
Best for new featuresMediumHighHigh
Risk levelLowMediumHigh

8. Migration Project Planning

Phase Overview

Phase 1: Document Existing System         Week 1-2
Phase 2: Functional Requirements Spec     Week 2-3
Phase 3: Hardware Selection                Week 3-4
Phase 4: Software Development              Week 4-12
Phase 5: Factory Acceptance Test           Week 12-13
Phase 6: Commissioning                     Week 13-14
Phase 7: Parallel Operation                Week 14-18
Phase 8: Decommissioning Old System        Week 18

Phase 1: Document Existing System

Duration: 1-2 weeks

See documentation-reconstruction.md for detailed procedures. Key deliverables:

  • Hardware inventory with module types, positions, and firmware versions
  • IO wiring diagrams (input/output mapping)
  • Network configuration (IP addresses, POWERLINK topology)
  • Software version information (AR version, AS project version)
  • Safety system documentation (if applicable)
  • Photographs of all wiring, module positions, and label plates
  • Export of current PLC program (if accessible)

Critical deliverable for cross-platform migration: A functional requirements document that describes what the machine does, not how it does it. This separates the machine’s behavior from the specific implementation.

Phase 2: Functional Requirements Specification

Duration: 1 week

Document what the control system must do in platform-independent terms:

  1. Process flow: Step-by-step description of machine operation
  2. IO list: Every input, output, analog value, and its function
  3. Interlocks: All safety and operational interlocks
  4. Sequences: All automatic sequences (start-up, normal operation, shutdown, emergency stop)
  5. Alarms: All alarm conditions and responses
  6. Setpoints: All operator-adjustable parameters
  7. Communication: All external interfaces (HMIs, SCADA, MES, other PLCs)
  8. Motion: All axes, speeds, positions, cam profiles
  9. Safety: All safety functions and their SIL requirements

This document becomes the acceptance criterion for the new system. It also serves as the primary input if you need to recreate the program from scratch.

Phase 3: Hardware Selection

Duration: 1 week

Based on functional requirements, select target platform:

Decision FactorWeightB&R In-FamilyCODESYS/WagoSiemens S7-1500Beckhoff CX
Migration effort30%10/105/103/106/10
Total cost25%9/107/104/107/10
IO compatibility15%10/103/102/103/10
Safety portability15%9/105/105/106/10
Long-term support10%8/107/109/109/10
Talent availability5%4/106/109/106/10

Score each option on a 1-10 scale, multiply by weight, sum.

Phase 4: Software Development

Duration: 4-8 weeks (varies with complexity)

For in-family migration: 2-5 days (mostly recompile and verify) For cross-platform migration: 4-12+ weeks

Milestones:

  • Development environment configured
  • IO mapping table completed (old addresses to new addresses)
  • Core control logic ported
  • All sequences implemented
  • All alarms implemented
  • Motion control configured (if applicable)
  • HMI screens created
  • Communication interfaces tested
  • Safety logic implemented (if applicable)
  • Unit testing complete

Phase 5: Factory Acceptance Test

Duration: 1 week

Conduct FAT with machine or IO simulation:

  • Verify all IO points against requirements document
  • Test all sequences manually and in automatic
  • Verify alarm behavior
  • Test communication interfaces
  • Verify safety system (if applicable)
  • Document any deviations from requirements
  • Obtain sign-off from stakeholders

Phase 6: Commissioning

Duration: 1 week

  • Install new hardware during planned downtime
  • Wire IO (or verify preserved wiring for in-family swap)
  • Download software
  • Verify IO point-by-point
  • Test sequences with machine
  • Adjust timing and parameters
  • Document all changes from FAT

Phase 7: Parallel Operation

Duration: 2-4 weeks

  • Run new system in parallel with old (if architecture allows)
  • Or: run new system with old system on standby
  • Monitor for anomalies
  • Train operators on any HMI changes
  • Tune performance parameters

Phase 8: Decommissioning Old System

Duration: 1 day

  • Remove old hardware
  • Archive old CF card and project file
  • Update maintenance documentation
  • Return old hardware to spare parts pool (if functional) or dispose
  • Update asset register

Resource Estimation

Migration TypeTotal DurationEngineering EffortCommissioning DurationDowntime Required
In-family CPU swap2-4 weeks2-5 person-days1-2 days4-8 hours
X20 to X674-8 weeks10-20 person-days3-5 days1-3 days
B&R to CODESYS (simple)8-16 weeks40-80 person-days1-2 weeks1-2 weeks
B&R to CODESYS (complex)16-40 weeks100-200 person-days2-4 weeks2-4 weeks
B&R to Siemens16-40 weeks80-200 person-days2-4 weeks2-4 weeks
B&R to Beckhoff12-30 weeks60-150 person-days1-3 weeks1-3 weeks

9. Minimizing Downtime During Migration

Strategy 1: Pre-Commissioning on Bench

Before the shutdown, build a replica of the new system on a workbench:

  1. Mount new CPU and IO modules on DIN rail
  2. Wire test inputs (switches, buttons) and test outputs (LEDs, relays)
  3. Download software and verify basic operation
  4. Simulate IO states using manual switches or test software
  5. Test all sequences, alarms, and safety logic
  6. Resolve all software issues before the production shutdown

Benefit: Reduces commissioning downtime by 50-75%.

Strategy 2: Staged Migration

For complex systems, migrate in stages over multiple short shutdowns:

Stage 1 (Shutdown 1, 4-8 hours):
  - Install new CPU alongside old CPU
  - Wire new CPU to existing IO (parallel wiring)
  - Pre-position all cables

Stage 2 (Shutdown 2, 4-8 hours):
  - Switch IO connections from old to new CPU
  - Verify IO point-by-point
  - Run machine on new CPU

Stage 3 (Shutdown 3, 2-4 hours):
  - Remove old CPU and wiring
  - Final cleanup and documentation

Strategy 3: IO Mapping Preservation

When migrating within B&R (X20 to X20), preserve IO addresses:

  1. Document all IO addresses in old system
  2. In new system, manually set IO addresses to match old system
  3. Program references remain unchanged
  4. Only hardware configuration changes, not software logic

This technique reduces software modification to near zero for in-family swaps.

Strategy 4: Temporary Bridge PLC

For cross-platform migrations where downtime must be minimized:

  1. Install a small, inexpensive PLC (e.g., Wago 750-8206) as a temporary controller
  2. Program it with minimal logic to keep the machine running (manual mode only)
  3. This frees the original B&R hardware for reference during migration
  4. Or: this allows the original hardware to be decommissioned safely

Strategy 5: Rollback Plan

Always have a rollback plan:

Rollback Checklist (before starting migration):
[ ] Old CPU CF card fully backed up (dd image)
[ ] Old CPU stored in anti-static bag, labeled
[ ] IO wiring diagram documented (with photos)
[ ] All IO connections can be restored to old configuration within 2 hours
[ ] Backup of all new software and configurations
[ ] Test procedure for verifying rollback success
[ ] Decision criteria: when to abort migration and rollback
[ ] Rollback decision authority identified (who makes the call)

Downtime Estimation by Strategy

StrategyPlanned DowntimeRisk of OvertimePreparation Effort
Direct swap (no prep)1-4 weeksHighMinimal
Pre-commissioned on bench1-3 daysLow-Medium2-4 weeks
Staged migration (3 stages)3x 4-8 hoursLow4-6 weeks
Temporary bridge PLC4-8 hours (final)Low3-5 weeks
Parallel operation2-4 hours (cutover)Very Low6-8 weeks

10. Cost/Benefit Analysis Framework

Repair Cost Model

Total Repair Cost = Parts Cost + Labor Cost + Downtime Cost + Risk Cost

Parts Cost:
  CF card:           $20 - $80
  Battery (CR2032):  $5 - $15
  Capacitors:        $10 - $50
  PSU replacement:   $50 - $200
  Base module:       $200 - $400

Labor Cost:
  Diagnosis:         1-4 hours   x   hourly rate
  Repair:             0.5-4 hours x   hourly rate
  Testing:            1-4 hours   x   hourly rate

Downtime Cost:
  Production loss per hour x estimated downtime hours
  (typically 1-8 hours for repair scenarios)

Risk Cost (probability-weighted):
  P(failure within 6 months) x (replacement cost + downtime cost)
  Example: 30% chance of failure within 6 months
           x $5,000 replacement cost
           = $1,500 risk cost

Example Repair Calculation:
  Parts (CF card):    $40
  Labor (4 hours):    4 x $100/hr = $400
  Downtime (4 hours): 4 x $500/hr = $2,000
  Risk (30% x $5000): $1,500
  TOTAL:              $3,940

In-Family Upgrade Cost Model

Total Upgrade Cost = Hardware Cost + Software Cost + Labor Cost +
                     Downtime Cost + Commissioning Cost

Hardware Cost:
  New CPU (X20CP1485):     $2,000 - $3,500
  SD card (if not included): $20 - $60
  New firmware license (if needed): $0 - $500
  Mounting hardware (if needed): $0 - $50

Software Cost:
  Automation Studio license: $0 (already have)
  Library updates: $0 - $200

Labor Cost:
  Preparation and planning:  8-16 hours  x hourly rate
  Hardware swap:             4-8 hours   x hourly rate
  Software migration:        4-16 hours  x hourly rate
  Testing:                   8-16 hours  x hourly rate

Downtime Cost:
  Production loss per hour x estimated downtime hours
  (typically 4-16 hours for in-family swap)

Commissioning Cost:
  IO verification:  4-8 hours   x hourly rate
  Safety verification: 4-8 hours x hourly rate
  Run-in monitoring: 8-16 hours x hourly rate

Example In-Family Upgrade Calculation:
  Hardware (CPU):              $2,500
  Software:                    $100
  Labor (40 hours):            40 x $100/hr = $4,000
  Downtime (8 hours):          8 x $500/hr = $4,000
  Commissioning (16 hours):    16 x $100/hr = $1,600
  TOTAL:                       $12,200

Platform Migration Cost Model

Total Migration Cost = Hardware Cost + Software/License Cost +
                        Engineering Cost + Downtime Cost +
                        Commissioning Cost + Safety Cost +
                        Training Cost + Risk Contingency

Hardware Cost:
  New PLC CPU:                $1,000 - $6,000
  IO modules (all replaced):  $5,000 - $25,000
  Networking equipment:      $500 - $3,000
  Power supplies:            $200 - $1,000
  Cabinets/enclosures:       $500 - $3,000
  Cabling/wiring:            $1,000 - $5,000

Software/License Cost:
  Programming software:       $1,000 - $5,000
  Communication drivers:     $200 - $2,000
  HMI software:               $500 - $3,000
  Safety software (if needed): $500 - $2,000

Engineering Cost:
  Documentation:              40-80 hours  x hourly rate
  Software development:       200-800 hours x hourly rate
  Testing and simulation:     40-80 hours  x hourly rate
  HMI development:           40-120 hours x hourly rate

Downtime Cost:
  Production loss per hour x estimated downtime hours
  (typically 40-160 hours for full migration)

Commissioning Cost:
  Installation:              40-80 hours  x hourly rate
  IO verification:            16-40 hours  x hourly rate
  Sequence testing:          40-80 hours  x hourly rate
  Safety validation:         40-80 hours  x hourly rate
  Performance tuning:        16-40 hours  x hourly rate

Safety Cost (if applicable):
  Safety engineering:         $5,000 - $15,000
  SIL assessment:             $3,000 - $10,000
  Third-party validation:    $2,000 - $8,000
  F-I/O modules:              $2,000 - $8,000

Training Cost:
  Engineering team:          $2,000 - $8,000
  Maintenance team:          $500 - $2,000
  Operators:                 $500 - $2,000

Risk Contingency:
  20-30% of total above (unforeseen issues)

Example Platform Migration (B&R to Siemens, moderate complexity):
  Hardware:                    $18,000
  Software/Licenses:           $5,500
  Engineering (500 hours):      500 x $100/hr = $50,000
  Downtime (80 hours):         80 x $500/hr = $40,000
  Commissioning (200 hours):   200 x $100/hr = $20,000
  Safety:                      $15,000
  Training:                    $6,000
  Contingency (25%):           $38,625
  TOTAL:                       $193,125

Ongoing Maintenance Cost Comparison (Annual)

Cost ItemB&R In-FamilyCODESYS PlatformSiemens PlatformBeckhoff Platform
Spare parts inventory$1,000-$3,000$500-$2,000$500-$2,000$500-$2,000
Software maintenance$500-$1,000/yr$300-$800/yr$500-$1,500/yr$300-$800/yr
Engineering support (hrs/yr)10-2015-3010-2015-25
Failure probability (annual)2-5%2-5%2-4%2-5%
Mean repair cost per failure$500-$2,000$300-$1,500$300-$1,500$300-$1,500
Expected annual repair cost$50-$200$30-$150$30-$120$30-$150
Training refresh (annual)$500$500$1,000$500
Total annual$2,550-$5,700$2,130-$5,050$2,530-$5,620$2,080-$4,950

ROI Calculation

ROI = (Annual Savings - Annual Cost) / Migration Investment x 100%

Annual Savings = Old annual maintenance - New annual maintenance
                + Reduced downtime value
                + Reduced failure probability value

Annual Cost = New annual maintenance
            + License fees
            + Support contracts

Example (B&R in-family upgrade):
  Migration investment: $12,200
  Old annual maintenance: $5,000
  New annual maintenance: $3,000
  Reduced downtime: 4 hours/year x $500/hr = $2,000
  Reduced failure probability: $200/year saved

  Annual savings: $5,000 - $3,000 + $2,000 + $200 = $4,200
  Annual net benefit: $4,200 - $3,000 = $1,200
  ROI: $1,200 / $12,200 x 100% = 9.8%
  Payback period: $12,200 / $1,200 = 10.2 years

Example (B&R to Siemens, with 7-year machine life remaining):
  Migration investment: $193,125
  Old annual maintenance: $5,000
  New annual maintenance: $3,000
  Reduced downtime: 16 hours/year x $500/hr = $8,000
  Reduced failure probability: $200/year saved

  Annual savings: $5,000 - $3,000 + $8,000 + $200 = $10,200
  Annual net benefit: $10,200 - $3,000 = $7,200
  ROI: $7,200 / $193,125 x 100% = 3.7%
  Payback period: $193,125 / $7,200 = 26.8 years

  This migration would NOT pay for itself within the machine's remaining life.
  In-family upgrade is the correct choice.

Decision Rule Summary

IF machine remaining life < 3 years AND system is repairable:
    -> REPAIR (Zone 1-2)
    Budget: $10 - $500
    Risk: Low

ELIF machine remaining life 3-7 years AND project file available:
    -> IN-FAMILY UPGRADE (Zone 3)
    Budget: $1,500 - $8,000
    Risk: Low-Medium

ELIF machine remaining life > 7 years AND OEM standardization needed:
    -> CROSS-PLATFORM MIGRATION (Zone 4)
    Budget: $15,000 - $80,000
    Risk: Medium-High

ELIF full redesign of machine control required:
    -> FULL REDESIGN (Zone 5)
    Budget: $25,000 - $200,000+
    Risk: High

ELIF no project file AND no documentation:
    -> DOCUMENTATION FIRST
    See documentation-reconstruction.md
    Then reassess.

11. Legacy B&R Specific Considerations

B&R 2003 / B&R 2005 Systems

B&R’s predecessor system (2003/2005 series) uses different hardware, different programming (AS V2.x or earlier), and different IO. Migration from 2003/2005 to X20 is effectively a platform migration:

AspectB&R 2003/2005B&R X20
ProgrammingAutomation Studio 2.xAutomation Studio 4.x
RuntimeAR 2.xAR 4.x
IO busCAN busPOWERLINK / X2X
IO modules2003/2005 seriesX20 series
CPU modules2003 CPU (e.g., CP570)X20CP series
Language supportAWL (B&R-specific), ST, LDIEC 61131-3 standard
Project format.apj (AS 2.x).apj (AS 4.x, different internal format)

Migration path: AS 2.x projects can sometimes be imported into AS 4.x, but this is not guaranteed. AWL (Anweisungsliste) is B&R’s proprietary instruction list language that has no direct equivalent in IEC 61131-3 IL. AWL programs must be manually rewritten in ST.

B&R Power Panel Migration

B&R Power Panel devices combine HMI and PLC functionality. Migration options:

FromToEffort
Power Panel 400Power Panel 500Low-Medium (same AR, new hardware)
Power Panel 400X20 CPU + separate HMIMedium
Power Panel 400Industrial PC + Control RuntimeMedium-High

B&R APROL (DCS) Migration

APROL is B&R’s process automation / DCS platform. Migration from older APROL versions:

  1. In-place upgrade: APROL V3.x to APROL V4.x (supported by B&R migration tools)
  2. APROL to X20-based control (if process control complexity justifies DCS)
  3. APROL to alternative DCS (Siemens PCS 7, ABB 800xA, Emerson DeltaV)

APROL migration is beyond the scope of this guide due to its process-industry-specific complexity.

Safety System Recertification Requirements

When any safety-related hardware or software changes, recertification may be required:

Change TypeRecertification Required?Notes
Same SafeLOGIC module, software unchangedNoHardware repair only
Same SafeLOGIC module, software updatePossiblyIf safety parameters changed
New SafeLOGIC module, same programYesModule validation required
Different SafeLOGIC module generationYesFull safety validation
SafeLOGIC to different platformYesFull SIL assessment + validation

Recertification process:

  1. Update Safety Requirements Specification (SRS)
  2. Update Safety Validation Report
  3. Perform functional safety testing on new hardware
  4. Document all changes and their safety impact
  5. Have independent assessor review (for SIL 2+)
  6. File updated documentation

Estimated recertification effort: 1-4 weeks for in-family, 2-8 weeks for cross-platform.


Adaptive Manufacturing and the ACOPOS D1 (2026 Context)

B&R’s 2026 Innovation Days theme is adaptive automation — moving from rigid production lines to flexible, modular manufacturing systems. As part of this strategy, B&R launched the ACOPOS D1 servo drive in Pune, India (March 2026), targeting compact cabinet footprint, scalable multi-axis motion, and built-in edge intelligence for predictive maintenance.

Implications for CP1584 machine remanufacturing:

  • If you are extending the life of a CP1584-based machine by 7+ years, the D1 (and likely AR 6.x controllers) represents the forward-looking migration target
  • The D1’s edge intelligence for predictive uptime aligns with modern IIoT strategies (see iiot-retrofit.md)
  • Adaptive manufacturing principles (modular machine design, software-configurable production) may influence how you architect control systems during remanufacturing
  • B&R’s India-first launch of the D1 signals growing investment in the India/Asia-Pacific market, which may improve spare parts availability and local support for B&R systems in those regions

Note: As of mid-2026, the ACOPOS D1 has not been fully specified publicly. When technical specifications become available, evaluate it as a potential replacement for aging ACOPOS 8V1 drives. See acopos-drives.md for the D1 section and the complete ACOPOS family reference.


Automation Studio 4 to Studio 6 Migration (AS4 → AS6)

As of 2024-2026, B&R has released Automation Studio 6 (AS6) as the successor to the long-standing AS 4.x line. This migration is increasingly relevant for engineers maintaining CP1584 machines because:

  1. EU Cyber Resilience Act (CRA) compliance — CRA requirements apply from December 2027 and mandate security-by-design for connected products. Machines placed on the EU market after this date must comply. AS6 incorporates IEC 62443-4-1 compliant security features that AS4 cannot provide.
  2. AS4 end-of-life timeline — While B&R has not announced a hard EOL for AS4, the CRA effectively forces migration for any machine that must remain in production or be sold in the EU after 2027.
  3. New CPU hardware requires AS6 — The X20CP1684 (successor to CP1584) requires Automation Studio 4.7 minimum or preferably AS 6.0+.

Key Differences Between AS4 and AS6

AspectAS 4.12AS 6.x
Project format.apj (AS4 binary).apj (AS6 format, different structure)
RuntimeAR 4.x (B04.xx)AR 5.x/6.x (G05.xx / I06.xx)
IEC 61131-3 editorBuilt-in (proprietary)AS Code (VS Code-based, beta in 2025)
OPC UA stackOPC UA 1.01/1.03OPC UA 1.04+, enhanced security profiles
mapp componentsmapp 4.xmapp 6.x (restructured hierarchy)
Security modelBasic user/passwordIEC 62443-4-1 role-based access, certificate management
CompilerAS4 native compilerAS6 compiler with improved optimization and diagnostics
License modelPer-target licensesUpdated licensing with mapp technology licenses

Community Migration Tools (Free)

The B&R Community maintains an open-source tool specifically for AS4→AS6 migration analysis:

as6-migration-toolshttps://github.com/br-automation-community/as6-migration-tools

This tool scans AS 4.12 project files and generates a migration report identifying:

  • Deprecated libraries and function blocks
  • Unsupported hardware references
  • OPC UA structural changes needed
  • mappMotion API changes
  • AsMath and AsString function replacements
  • Missing mapp technology licenses
  • Common migration pitfalls

Installation and usage:

## Option 1: Download Windows EXE from GitHub Releases
## https://github.com/br-automation-community/as6-migration-tools/releases/latest
## Unzip and run as6-migration-tools.exe

## Option 2: From source
git clone https://github.com/br-automation-community/as6-migration-tools.git
cd as6-migration-tools
pip install -r requirements.txt
python gui_launcher.py
## Or for CLI:
python as4_to_as6_analyzer.py "C:\Projects\MyAS4Project"

Helper scripts included:

ScriptPurpose
helpers/asmath_to_asbrmath.pyReplaces deprecated AsMath functions with AsBrMath equivalents
helpers/asstring_to_asbrstr.pyReplaces deprecated AsString functions with AsBrStr equivalents
helpers/asopcua_update.pyUpdates OPC UA client code for AR 6 compatibility
helpers/mappmotion_update.pyUpdates mappMotion code for mappMotion 6 API
helpers/license_checker.pyScans for required mapp technology licenses

The tool is non-destructive by default — it analyzes and reports before making changes. Run the analyzer first, review the report, then apply helper scripts selectively.

Important limitations:

  • The tool does NOT perform a fully automatic migration. It provides analysis and recommendations.
  • Helper scripts make best-effort changes based on known patterns but do not cover all edge cases.
  • Manual review and validation is always required after running any helper script.
  • Requires Python 3.12 (tested).

Official B&R Migration Resources

B&R provides a free online course for the migration:

  • ENG: https://share.articulate.com/5PakLoeB_I2sjJxoopM5t (Migration to AS 6 – Step-by-Step Checklist)
  • GER: https://share.articulate.com/4ma0vcvpVY_WxgVuoMDCu (Migration auf Automation Studio 6)
  • Requires one-time registration on B&R’s learning platform.

B&R also offers paid migration services:

  • Dedicated engineering service — B&R engineers perform the full migration
  • Migration consulting — B&R analyzes your project and provides an optimization strategy

AS4→AS6 Migration Procedure for CP1584 Machines

Prerequisites:

  1. Recovered AS4 project file (.apj + all source files) — see project-reconstruction.md
  2. Automation Studio 6 installed on a PC (available from B&R downloads with active service contract, or via B&R Value Provider)
  3. Access to the CP1584 target hardware for testing

Step-by-step migration:

  1. Analyze the AS4 project with as6-migration-tools:

    python as4_to_as6_analyzer.py "C:\Projects\Recovered_AS4_Project"
    

    Review the generated report. Address all CRITICAL and HIGH severity items.

  2. Open the project in AS6. AS6 can open AS 4.12 projects with an automatic migration wizard. The wizard will:

    • Convert project file format
    • Update library references to newer versions
    • Flag deprecated function blocks and renamed libraries
    • Identify hardware that is no longer supported
  3. Resolve deprecated libraries. Common replacements:

    AS4 LibraryAS6 EquivalentNotes
    AsMathAsBrMathRun helper script asmath_to_asbrmath.py
    AsStringAsBrStrRun helper script asstring_to_asbrstr.py
    mappMotion 4.xmappMotion 6Run helper script mappmotion_update.py
    Legacy OPC UA componentsmappService OPC UARestructured OPC UA configuration
  4. Update OPC UA configuration. AS6 uses a restructured OPC UA information model. Run helpers/asopcua_update.py and manually review the changes. Test with an OPC UA client (UaExpert, Prosys).

  5. Update hardware configuration. If migrating to a newer CPU (e.g., X20CP1684), update the hardware tree in AS6. See spare-parts.md Section 3.2 for CPU upgrade paths and firmware-version-mgmt.md for firmware compatibility.

  6. Compile and resolve errors. The AS6 compiler provides improved diagnostics compared to AS4. Address all compilation errors and warnings.

  7. Test on a bench. Before deploying to the production machine:

    • Build the new target hardware (or use the existing CP1584 if hardware is unchanged)
    • Download the AS6-compiled program
    • Run IO point-by-point verification (see documentation-reconstruction.md Section 6.3)
    • Verify all machine sequences and safety systems
  8. Deploy during a planned shutdown. The production deployment follows the same procedure as any firmware upgrade. See firmware-version-mgmt.md for the production deployment checklist.

Estimated migration effort:

Project SizeAS4 Project LinesEstimated EffortNotes
Small< 5,0002-5 daysSimple IO, no motion, no mapp
Medium5,000-20,0001-2 weeksSome mapp, basic motion
Large20,000-100,0002-6 weeksComplex mapp, motion, safety
Very Large100,000+4-12 weeksFull mapp suite, safety, multi-axis motion

Critical gotchas:

  • mapp components are restructured in AS6. mappService, mappMotion, mappView, and other mapp components have been reorganized with new hierarchies. This is the single largest manual effort in most migrations.
  • Safety programs require special handling. SafeLOGIC programs must be migrated using SafeDESIGNER (AS6 version). Do not attempt to manually convert safety logic — use the official migration path.
  • AR 6.x firmware requires the matching AS6 compiler. You cannot compile AR 6.x programs with AS 4.x, and vice versa.
  • CF card format changes. AR 6.x may use a different CF card partition layout than AR 4.x. The CF card must be regenerated using AS6’s Generate CF/SD Card function.
  • OPC UA certificates must be regenerated. AS6 uses a different OPC UA certificate management system. Existing certificates from AS4 will not work.
  • ANSL/PVI protocol changes. External PVI connections may need updated client libraries for AR 6.x compatibility. See pvi-api.md for PVI version requirements.

X20CP1684 — The CP1584 Successor

B&R has released the X20CP1684 as the direct successor to the CP1584. This is relevant when remanufacturing a CP1584 machine and deciding whether to upgrade the CPU.

ParameterX20CP1584X20CP1684
ProcessorIntel Atom E640T @ 600 MHzIntel Atom (400 MHz, newer architecture)
RAM256 MB DDR2512 MB LPDDR4
FlashCompactFlash (removable)1 GB internal flash
Ethernet10/100/1000 Mbps (1 port)Gigabit Ethernet
Interface slots11
Minimum ASAS 3.0.90.20AS 4.7 (recommended: AS 6.0+)
Minimum ARAR 4.xAR 5.x+
FanlessYesYes
CF card requiredYesNo (internal flash)

Key differences for migration:

  • The CP1684 uses internal flash instead of CompactFlash — no more CF card failures, but also no removable media for backup. Use FTP or Automation Studio transfer instead.
  • The LPDDR4 memory is twice the capacity and significantly faster than DDR2.
  • Automation Studio 6 is the recommended development environment for CP1684.
  • X20 IO modules, bus modules, and interface modules are fully compatible between CP1584 and CP1684 (same X2X bus, same POWERLINK).

Migration path CP1584 → CP1684:

  1. Recover the AS4 project (see project-reconstruction.md)
  2. Migrate project to AS6 (see above procedure)
  3. Update hardware tree: replace X20CP1584 with X20CP1684
  4. Compile, test on bench, deploy during planned shutdown
  5. No IO module changes needed — all X20 modules are compatible

See cp1584-hardware-ref.md for the complete CP1584 hardware reference and spare-parts.md for ordering information.


12. Cross-References

DocumentPurpose
documentation-reconstruction.mdProcedures for documenting undocumented B&R systems
project-reconstruction.mdReconstructing lost Automation Studio projects from PLC and CF card
program-reverse-engineering.mdReverse-engineering B&R PLC programs from compiled binaries
spare-parts.mdSourcing B&R spare parts from brokers, surplus, and used market
firmware-version-mgmt.mdManaging firmware versions for B&R CPUs and IO modules
cp1584-hardware-ref.mdDetailed hardware reference for X20CP1584
safe-io-diagnostics.mdDiagnosing SafeLOGIC and safe IO module issues
config-file-formats.mdB&R configuration file formats and structures
cf-card-boot.mdCF card boot process, recovery, and cloning procedures

13. Key Findings

  1. B&R X20 is not obsolete. The X20 platform is actively sold and supported by B&R. In-family migration is always the lowest-risk path when the project file is available.

  2. Recovery of the Automation Studio project file is the single most important prerequisite. Without it, migration effort multiplies 3-5x. Prioritize CF card backup and project file recovery before any other action. See project-reconstruction.md and cf-card-boot.md.

  3. CP1584 is repairable for most common failure modes. CF card failure ($20-80), battery replacement ($5-15), and capacitor replacement ($10-50) address the majority of failures. Only CPU-level failures (processor, FPGA, DDR2) require replacement.

  4. In-family CPU swap costs $3,000-$8,000 total. Cross-platform migration costs $25,000-$200,000+. The cost difference is almost always decisive for machines with remaining life under 7 years.

  5. POWERLINK and FPGA-based X20 bus communication are not portable to other platforms. Any migration away from B&R requires complete IO replacement. This is the single largest cost driver in cross-platform migration ($5,000-$25,000 for IO alone).

  6. Safety system migration is the most complex and risky aspect of any platform change. SafeLOGIC to a different safety platform requires full SIL recertification, complete logic rewrite, and 2-8 weeks of safety engineering. Budget $5,000-$25,000 for safety migration alone.

  7. Pre-commissioning on a workbench reduces production downtime by 50-75%. Build the new system on a bench, test all logic and IO, and resolve software issues before the production shutdown.

  8. IO mapping preservation is key for in-family swaps. By manually setting new IO addresses to match old addresses, the program requires zero modification for IO references. This reduces in-family swap downtime to 4-8 hours.

  9. Secondary market CP1584 units are available ($400-$2,000) but carry risk. Match firmware versions. Test thoroughly before deploying as a spare. Budget for potential software incompatibilities.

  10. Automation Studio 4.x can open AS 3.x projects with migration steps. The migration is mostly automatic but may flag deprecated function blocks and renamed libraries. Resolve all migration warnings before deploying.

  11. CODESYS V3 is the most practical cross-platform target if leaving B&R is necessary, because it uses standard IEC 61131-3 and runs on hardware from multiple vendors. However, B&R-specific libraries and mapp components have no CODESYS equivalent and must be rewritten from scratch.

  12. The “repair vs replace” decision is primarily a function of machine remaining life and failure type. Use the decision framework in Section 2. Repair for machines with less than 3 years of remaining life. Upgrade in-family for 3-7 years. Consider cross-platform migration only for 7+ years remaining life.

  13. AS4→AS6 migration is necessary for CRA compliance. The EU Cyber Resilience Act requires connected products placed on the EU market after December 2027 to meet IEC 62443-4-1 security requirements. AS6 is B&R’s CRA-compliant platform. The community-maintained as6-migration-tools (github.com/br-automation-community/as6-migration-tools) provides free automated analysis and helper scripts for the migration.

  14. X20CP1684 replaces CP1584 as the current-generation 1-slot X20 CPU. The CP1684 uses internal flash (no CF card), 512 MB LPDDR4 RAM, and requires AS 4.7+ (recommended AS 6.0+). All X20 IO modules and interface modules are fully compatible, making in-family CPU upgrade straightforward when the AS4 project is available.

  15. New X20 generation (Apollo Lake I) with OPC UA over TSN is the future-proof path. B&R’s newest X20 controllers add OPC UA over TSN support and field-level master capability. Combined with AR 6.5’s hard real-time multicore task scheduling (assign task classes to specific CPU cores), these controllers deliver deterministic control and modern networking in the same compact form factor. The X20CP0484-1 (512 MB RAM, 2 GB flash) is the budget AR 6.x entry point. The X20CP3687X delivers PC-class performance in a compact X20 package.

  16. AS 6.5 (December 2025) is the current latest release. Key features: ST-OOP (inheritance, polymorphism, abstract classes), ManagedCertificateStore extended to ANSL/FTP/HTTP/SMTP, FTP RBAC, SMB 1.0 permanently disabled, SNI support in AsHttp, certificate signing requests (CSR) via ArCert, self-signed certificate validation warnings, and TFTP disabled by default. AR 6.5 adds multicore hard real-time, FTP RBAC, and hypervisor repair boot. See firmware-version-mgmt.md §3.2 for the complete release history.


14. Sources

  • B&R Industrial Automation. “X20 System Overview and Catalog.” br-automation.com. Active product line documentation.
  • B&R Industrial Automation. “Automation Studio 4 Migration Guide.” Technical documentation for upgrading from AS 3.x to AS 4.x.
  • B&R Industrial Automation. “X20CP1584 Technical Data Sheet.” Hardware reference.
  • B&R Industrial Automation. “POWERLINK - Ethernet POWERLINK Standardisation Group (EPSG).” openPOWERLINK.org.
  • B&R Industrial Automation. “SafeLOGIC Safety System Technical Manual.” SIL 2/3 safety controller documentation.
  • CODESYS Group. “CODESYS V3.5 Programming Guide.” codesys.com.
  • CODESYS Group. “CODESYS EtherCAT and POWERLINK Support Documentation.”
  • Siemens AG. “SIMATIC S7-1500 System Manual.” Siemens documentation portal.
  • Siemens AG. “TIA Portal Migration Guide.”
  • Beckhoff Automation. “TwinCAT 3 System Documentation.” beckhoff.com.
  • EPSG (Ethernet POWERLINK Standardisation Group). “POWERLINK Communication Profile Specification.” ethernet-powerlink.org.
  • IEC 61131-3:2013. “Programmable Controllers - Part 3: Programming Languages.” International Electrotechnical Commission.
  • IEC 61508. “Functional Safety of Electrical/Electronic/Programmable Electronic Safety-related Systems.” International Electrotechnical Commission.
  • ISA-TR84.00.04. “Guidelines for the Implementation of ANSI/ISA-84.00.01-2004.”
  • Pilz GmbH. “Safety Migration Planning Guidelines.” Industry technical paper.
  • Various industrial automation broker and surplus listings (PLC Center, Radwell, surplus.net). Pricing data for spare parts and used equipment as of 2024-2025.
  • Practical field experience with B&R X20CP1584 systems in manufacturing environments.
  • Industry standard lifecycle management practices for industrial control systems (ISA-95, IEC 62443 for cybersecurity considerations during migration).
  • B&R Community Forum. “AS4->AS6: Migration Made Simple: Tools, Community & Free Courses.” https://community.br-automation.com/t/as4-as6-migration-made-simple-tools-community-free-courses/8553
  • br-automation-community/as6-migration-tools. GitHub repository. https://github.com/br-automation-community/as6-migration-tools
  • B&R Industrial Automation. “X20CP1684 Product Page.” br-automation.com. https://www.br-automation.com/en-us/products/plc-systems/x20-system/x20-plc/x20cp1684/
  • B&R Industrial Automation. “Automation Studio 6 Features.” B&R Community. https://community.br-automation.com/t/b-r-automation-studio-6-features/2979
  • B&R Community Forum. “Project Migration from Automation Studio 4.12 to 6.1.” https://community.br-automation.com/t/project-migration-from-automation-studio-4-12-to-6-1/7309
  • EU Cyber Resilience Act. https://digital-strategy.ec.europa.eu/en/policies/cyber-resilience-act
  • B&R Industrial Automation. “TÜV Rheinland confirms B&R’s CRA Guide for POWERLINK.” https://www.br-automation.com/en/about-us/press-room/tuev-rheinland-confirms-brs-cra-guide-for-powerlink-31-03-2026/
  • B&R Community Forum. “Why on earth is B&R discontinuing software that works?” https://community.br-automation.com/t/why-on-earth-is-b-r-discontinuing-software-that-works/11332

B&R X20CP1584 Complete Hardware Reference

Overview

The B&R X20CP1584 is a mid-range PLC CPU module in the X20 system family, based on the Intel Atom E640T processor. It is a headless controller (no integrated display) designed for industrial automation applications requiring POWERLINK real-time networking, Gigabit Ethernet, and modular I/O expansion via the X2X Link bus. This document consolidates all hardware specifications, physical details, and practical information needed for physical inspection, spare parts procurement, and hardware configuration of a CP1584 in the field.

Key identifiers:

  • Order number: X20CP1584
  • Coated variant: X20cCP1584 (identical electronics, conformal coating for harsh environments)
  • B&R ID code: 0xC370

CPU Specifications

ParameterValue
ProcessorIntel Atom E640T
Clock frequency600 MHz (0.6 GHz)
L1 instruction cache32 kB
L1 data cache24 kB
L2 cache512 kB
Floating point unitYes (hardware FPU)
Integrated I/O processorYes (processes I/O data points in background)
Typical instruction cycle time0.0075 us
Shortest task class cycle time400 us
CoolingFanless

Memory Architecture

Memory TypeSizeDescription
DDR2 SDRAM (main RAM)256 MBRuntime memory for AR OS, tasks, libraries
SRAM (user RAM)1 MB totalBattery-backed; split between retentive vars and user data
Remanent variables max256 kBConfigurable in Automation Studio; deducted from SRAM
CompactFlash slot1Application memory (ordered separately)
Real-time clockNonvolatileResolution 1 s, -10 to +10 ppm accuracy at 25 C

The SRAM is backed by a lithium battery (Renata CR2477N, 3V/950mAh). Actual usable user RAM = 1 MB minus configured remanent variable space. See retentive-data.md for battery management and data retention procedures.

Interfaces

IF1 - RS232 (Serial)

ParameterValue
SignalRS232 (non-galvanically isolated)
Connector12-pin terminal block X20TB12
Max distance900 m
Max transfer rate115.2 kbit/s
Default baud rate57600 bps (factory default)

The RS232 interface shares the X20TB12 terminal block with the CPU/I/O power supply. The RS232 pins are on the bottom row (pins 7-12 area):

TerminalFunction
I_rI/O power supply input (shared)
SI/O power supply input (shared)
TXRS232 transmit data (output from PLC)
RXRS232 receive data (input to PLC)
GNDRS232 signal ground

Wiring for serial console (DB9 null-modem cable to PC):

  • PLC TX → PC RX (pin 2 on DB9)
  • PLC RX → PC TX (pin 3 on DB9)
  • PLC GND → PC GND (pin 5 on DB9)

Note on “900 m max distance”: B&R rates the RS232 interface at 900 m. This exceeds the TIA-232 standard maximum of ~15 m at 115.2 kbit/s. B&R’s rating likely assumes RS422/RS485 line driver/receiver equipment is used at the far end. For standard RS232 point-to-point wiring, observe the standard limits. See grounding-emc.md for serial cable EMC considerations.

Important: The factory default baud rate is 57600 bps. While rates up to 115.2 kbit/s are supported, the default must be assumed when connecting to an unknown PLC. See bootloader-recovery.md for serial console usage.

IF2 - Ethernet (Gigabit)

ParameterValue
Physical layer10BASE-T / 100BASE-TX / 1000BASE-T
Connector1x RJ45 shielded
Max segment length100 m between 2 stations
Transfer rate10/100/1000 Mbit/s
Auto-negotiationYes
Auto-MDI/MDIXYes
Half-duplexYes
Full-duplexYes

This is the primary interface for:

  • Automation Studio online connection (ANSL/PVI)
  • OPC-UA server
  • FTP server
  • Web server (SDM)
  • SNMP
  • General TCP/IP communication

The INA2000 station number is set using the two hex switches on the front panel.

ParameterValue
Physical layer100BASE-TX
Connector1x RJ45 shielded
Max segment length100 m between 2 stations
Transfer rate100 Mbit/s
ProtocolETHERNET Powerlink V1/V2
RoleManaging Node (MN) or Controlled Node (CN)
MN node number (V1)Fixed 0x00
MN node number (V2)Fixed 0xF0
CN node number range (V1)0x01 - 0xFD
CN node number range (V2)0x01 - 0xEF
Half-duplexYes (POWERLINK mode)
Full-duplexNo (POWERLINK mode) / Yes (Ethernet mode)

Important: POWERLINK mode only operates in half-duplex. The interface cannot be used for POWERLINK and standard Ethernet simultaneously. When POWERLINK is active, IF2 (Ethernet) must not use an IP address in the POWERLINK address range (192.168.100.x). See powerlink-internals.md for protocol details.

IF4 and IF5 - USB

ParameterValue
TypeUSB 1.1 / 2.0
ConnectorType A
Max output current0.5 A per port
Galvanic isolationNo

Critical limitations:

  • USB interfaces CANNOT be used for online communication (no ANSL/PVI over USB)
  • Only ground-isolated USB devices are permitted
  • B&R only guarantees functionality of B&R-branded USB devices
ParameterValue
FieldbusX2X Link (master)
Galvanic isolationYes (isolated from Ethernet, POWERLINK, and other interfaces)

The X2X Link connects to X20 bus couplers and base modules for I/O expansion. See x2x-protocol.md for protocol details.

Electrical Isolation

All three network interfaces are galvanically isolated from each other and from the PLC:

  • Ethernet (IF2) - isolated
  • POWERLINK (IF3) - isolated
  • X2X Link (IF6) - isolated

RS232 (IF1) and USB (IF4/IF5) are NOT galvanically isolated.

Power Supply

ParameterValue
Input voltage24 VDC -15% / +20% (20.4 - 28.8 VDC)
Input currentMax. 1.5 A
FuseIntegrated, non-replaceable
Reverse polarity protectionYes
Power consumption (no interface/USB)8.6 W
ParameterValue
Nominal output power7 W (derated to 5 W above 55 C)
Parallel connectionYes (75% of nominal power per supply)
Redundant operationYes

I/O Power Supply

ParameterValue
Input voltage24 VDC -15% / +20%
Required line fuseMax. 10 A, slow-blow
Nominal output voltage24 VDC
Permissible contact load10 A

Terminal Block Pinout (X20TB12)

The 12-pin terminal block provides power connections and RS232:

PinFunction
1RS232 RXD
2RS232 TXD
3RS232 GND
4-6Reserved
7+24V I/O supply
8GND I/O supply
9+24V I/O supply (output)
10GND I/O supply
11+24V CPU/X2X Link supply
12GND CPU/X2X Link supply

Wiring specifications:

  • Wire type: copper only (no aluminum)
  • Solid wire: 0.08 - 2.50 mm2 (28-14 AWG)
  • Stranded wire: 0.25 - 2.50 mm2 (24-14 AWG)
  • Strip length: 7-9 mm

Physical Specifications

ParameterValue
Width150 mm
Height99 mm
Depth85 mm
Weight750 g
IP ratingIP20
Mounting35 mm DIN rail (top-hat rail)
Mounting orientationHorizontal or vertical

Operating Conditions

ConditionRange
Operating temperature (horizontal)-25 to 60 C
Operating temperature (vertical)-25 to 50 C
Storage/transport temperature-40 to 85 C
Relative humidity5-95%, non-condensing
Max altitude (no derating)2000 m
Above 2000 mDerate 0.5 C per 100 m

Overtemperature Shutdown

ConditionTemperatureResult
Processor overtemperature110 CPLC enters reset state
Board overtemperature95 CPLC enters reset state

Logbook errors:

  • Error 9204: PLC restart triggered by CPU temperature monitoring
  • Error 9210: Warning: Halt/Service after watchdog or manual reset

Certifications

  • CE, UKCA
  • ATEX Zone 2 (II 3G Ex nA nC IIA T5 Gc IP20)
  • UL/cULus E115267 (Industrial control equipment)
  • HazLoc cCSAus 244665 (Class I, Div 2, Groups ABCD, T5)
  • DNV (maritime: Temperature B, Humidity B, Vibration 4g, EMC B)
  • ABS, BV, CCS, KR, EAC

Front Panel Layout

  [1]  [2]     [3]    [4]
  |    |        |      |
  | Top-hat rail latch
  | Select application memory (CF card select switch)
  | Slot for CompactFlash
  | LED status indicators (R/E, RDY/F, S/E, PLK, ETH, CF, DC)
  |
  [5] [6]           [7]
  |   |               |
  | IF6 - X2X Link
  | IF1 - RS232 (via terminal block)
  | Slot for interface module (1 slot on CP1584)
  |
  [8]         [9]  [10]   [11]  [12]
  |            |    |      |     |
  | Terminal block (power + RS232)
  | IF5 - USB
  | IF4 - USB
  | Reset button
  | Battery compartment
  |
  [13]  [14]
  |     |
  | IF3 - POWERLINK (RJ45)
  | IF2 - Ethernet (RJ45)
  |
  [15]
  |
  Ethernet station address (hex switches)

LED Status Indicators

CPU Status LEDs

LEDColorStateMeaning
R/EGreenOnApplication running
R/EGreenBlinkingSystem startup (initializing app, bus systems, I/O)
R/EGreenDouble flashSystem startup during firmware update
R/ERedOnMode SERVICE or BOOT
R/ERedBlinkingLicense violation (when RDY/F also blinks yellow)
R/ERedDouble flashInstallation error (AR 4.93+: USB install aborted)
RDY/FYellowOnMode SERVICE or BOOT
RDY/FYellowBlinkingLicense violation (when R/E also blinks red)
S/EGreen/RedDualPOWERLINK interface status (see below)
PLKGreenOnPOWERLINK link established
PLKGreenBlinkingPOWERLINK link active with Ethernet traffic
ETHGreenOnEthernet link established
ETHGreenBlinkingEthernet link active with traffic
CFGreenOnCompactFlash inserted and detected
CFYellowOnCompactFlash read/write access
DCGreenOnCPU power supply OK
DCRedOnBackup battery empty

Ethernet mode:

GreenRedMeaning
OnOffInterface operated as Ethernet

POWERLINK V1 mode:

GreenRedMeaning
OnOffNode running, no errors
OffOnSystem error (check PLC logbook)
Blinking alt.-MN has failed (CN only)
OffBlinkingSystem stop with error code
OffOffNot active / startup / misconfigured / defective

POWERLINK V2 mode - Blink patterns:

PatternGreenRedState
Flicker (~10 Hz)Off-BASIC_ETHERNET (timeout expired before EPL detected)
Single flash (~1 Hz)OnOffPRE_OPERATIONAL_1 (CN: waiting for SoC from MN)
Single flash (~1 Hz)OnOnPRE_OPERATIONAL_1 with MN failure (CN only)
Double flash (~1 Hz)OnOffPRE_OPERATIONAL_2 (CN: configured, waiting for READY_TO_OPERATE command)
Double flash (~1 Hz)OnOnPRE_OPERATIONAL_2 with MN failure (CN only)
Triple flash (~1 Hz)OnOffREADY_TO_OPERATE (CN: cyclic + async comm, PDO data not yet evaluated)
Triple flash (~1 Hz)OnOnREADY_TO_OPERATE with MN failure (CN only)
Blinking (~2.5 Hz)OnOffOPERATIONAL (full cyclic data exchange, PDO mapping active)
OffOn-Error mode (failed Ethernet frames, collisions, etc.)
Off-OffNOT_ACTIVE (off, startup, misconfigured, or defective)

POWERLINK V2 state transition for CN (controlled node):

BASIC_ETHERNET ──(EPL detected)──→ PRE_OPERATIONAL_1 ──(SoC received)──→
PRE_OPERATIONAL_2 ──(command)──→ READY_TO_OPERATE ──(command)──→
OPERATIONAL

Key diagnostic note: If the S/E LED is off with no green or red, and the R/E LED shows green (application running), the POWERLINK interface may be configured as Ethernet-only (not POWERLINK) in Automation Studio. Check the interface module configuration or the CPU’s IF3 settings.

Power Supply LEDs

LEDColorStateMeaning
r (green)GreenOnMode RUN
r (green)GreenBlinkingMode PREOPERATIONAL
r (green)GreenSingle flashMode RESET
e (red)RedOnModule not supplied or everything OK
e (red)RedDouble flashX2X Link overloaded / I/O power too low
e (red)RedSolid + green flashInvalid firmware
S (yellow)YellowOnRS232 data transfer active
l (red)RedOnX2X Link power supply overloaded

System Stop Error Codes

When S/E blinks red, the error code is a sequence of 4 phases (150 ms = short, 600 ms = long), repeated every 2 seconds:

Code (phases)Error
Short Short Short LongRAM error - device defective, replace
Short Short Long LongHardware error - device or component defective, replace

Operating Mode Switch

The CP1584 has a three-position operating mode switch:

PositionModeDescription
BOOTBOOTStarts Boot AR; runtime installable via online interface (AS). User flash erased only when download begins.
RUNRUNNormal runtime operation
DIAGDIAGNOSECPU boots in diagnostic mode. Program sections in User RAM and Flash are NOT initialized. Always warm restart after DIAG mode.

Important: Any switch position other than the three listed is not permitted.

Reset Button

The reset button is located below the USB interfaces on the bottom of the housing. It can be pressed with a small pointed object (paper clip, etc.).

Pressing the reset button causes a hardware reset:

  • All application programs are stopped
  • All outputs are set to zero
  • The PLC starts up in SERVICE mode by default (configurable in AS)

Ethernet Station Address (Hex Switches)

Two hex rotary switches set the INA2000 station number for Ethernet (IF2) and optionally the POWERLINK node number (IF3).

Switch RangeUsage
0x00Reserved (not permitted)
0x01 - 0xEFPOWERLINK controlled node (CN)
0xF0POWERLINK managing node (MN)
0xF1 - 0xFFReserved (not permitted)

When used for Ethernet (IF2), the station number maps to the default IP address formula: 192.168.1.<station_number> in some configurations. For POWERLINK, the switch directly sets the node number.

CompactFlash Card

The CF card slot accepts industrial-grade CompactFlash cards. CF cards are ordered separately and are not included with the CPU.

Supported CF Cards (B&R part numbers)

Order NumberCapacity
0CFCRD.0512E.02512 MB
0CFCRD.1024E.021 GB
0CFCRD.2048E.022 GB
0CFCRD.4096E.024 GB
0CFCRD.8192E.028 GB
0CFCRD.016GE.0216 GB

All cards are extended temperature rated. Only B&R-approved CF cards should be used; consumer CF cards may fail in industrial conditions.

See cf-card-boot.md for CF card contents, boot sequence, and imaging procedures.

Battery

ParameterValue
TypeLithium (Renata CR2477N, button cell)
Voltage3 V
Capacity950 mAh
B&R order number (single)4A0006.00-000
B&R order number (4-pack)0AC201.91
Storage temperature-40 to 85 C
Max storage time3 years at 30 C
Recommended replacement intervalEvery 4 years
Min. runtime at 23 C2 years

The battery buffers:

  • Remanent variables
  • User RAM
  • System RAM
  • Real-time clock

Battery replacement:

  1. Discharge ESD at top-hat rail or ground (do not touch power supply)
  2. Slide battery cover down and away
  3. Push empty battery out of holder
  4. Insert new battery “+” side up on right part of holder
  5. Press battery into holder (use plastic tweezers, never metal)
  6. Replace cover
  7. Must complete within 1 minute if PLC is voltage-free

Warning: Only Renata CR2477N batteries are permitted. Other batteries may present fire or explosion hazard. See retentive-data.md for full procedures.

Interface Module Slot

The X20CP1584 has 1 slot for modular X20 interface modules. This allows adding:

  • Additional fieldbus interfaces (Modbus TCP/RTU, PROFINET, EtherCAT, CANopen)
  • Serial interfaces (RS485, additional RS232)
  • Other communication modules

Compatible Interface Modules (selected)

Order NumberDescriptionMin HW RevMin Upgrade Version
X20IF1020Ethernet interfaceH01.1.5.1
X20IF1030Ethernet switchI01.1.5.1
X20IF1041-12x RS485--
X20IF1043-12x RS485--
X20IF1051-1RS485/RS422--
X20IF1053-1RS485/RS422--
X20IF1061CAN busE0-
X20IF1063CAN bus (X2X + CAN hybrid)-1.1.5.0
X20IF1072PROFIBUS DP-1.0.5.1
X20IF1082Modbus TCP/RTU-1.2.2.0
X20IF1086-2Modbus TCP/RTU-1.1.1.0
X20IF1091EtherCAT-1.0.5.1
X20IF2772CANopen (CiA 301)-1.0.6.1
X20IF2792DeviceNet-1.0.5.1
X20IF10E1-1PROFINET RT--
X20IF10E3-1PROFINET RT--
X20IF10G3-1CC-Link IE--

Important: Some interface modules require a hardware upgrade when migrating from X20CPx48x to X20CPx58x CPUs. Check the minimum hardware revision column above. See firmware-version-mgmt.md Section 4.4 for the complete migration compatibility table.

Interface Module Upgrade Requirements (CPx48x to CPx58x)

When upgrading from X20CP1484 to X20CP1584 (or from CPx48x to CPx58x generation), these interface modules require specific firmware or hardware revisions:

Interface ModuleMin Upgrade VersionMin HW RevisionNotes
X20IF1020 (Ethernet)1.1.5.1H0Required
X20IF1030 (Ethernet Switch)1.1.5.1I0Required
X20IF1041-1 (2x RS485)Compatible as-is
X20IF1043-1 (2x RS485)Compatible as-is
X20IF1051-1 (RS485/422)Compatible as-is
X20IF1053-1 (RS485/422)Compatible as-is
X20IF1061 (CAN)E0HW revision required
X20IF1063 (CAN+X2X)1.1.5.0Upgrade required
X20IF1072 (PROFIBUS DP)1.0.5.1Upgrade required
X20IF1082 (Modbus TCP/RTU)1.2.2.0Upgrade required
X20IF1091 (EtherCAT)1.0.5.1Upgrade required
X20IF2772 (CANopen)1.0.6.1Upgrade required
X20IF2792 (DeviceNet)1.0.5.1Upgrade required

Modules not listed are compatible as-is without any upgrade. Requires Automation Studio V3.0.90.20 minimum. See spare-parts.md Section 10 for the full migration checklist.

See if2772-canopen.md for CANopen details and modbus-gateway.md for Modbus configuration.

The X2X Link is B&R’s proprietary deterministic I/O bus connecting the CPU to I/O stations. On the CP1584, the X2X interface uses a dedicated connector on the bottom of the housing.

ParameterValue
ProtocolX2X Link (B&R proprietary)
Physical layerDifferential signaling (LVDS-like)
TopologyMulti-drop daisy chain
Maximum nodes per segment253
Cable typeB&R X2X bus cable (shielded, proprietary connector)
Baud rate12 Mbit/s (fixed)
Cycle time200 us (typical for full I/O update)
Galvanic isolationYes (isolated from all other interfaces)
Power over busYes (7 W max for station power)

The X2X Link connectors on the X20 system use a proprietary push-pull connector with two ports per module (IN and OUT) for daisy chaining. The connectors are keyed to prevent incorrect insertion.

X2X cable pin assignments:

SignalDescription
X2X_DATA+Differential data positive
X2X_DATA-Differential data negative
X2X_CLK+Differential clock positive
X2X_CLK-Differential clock negative
X2X_GNDGround reference
Power +24VBus power input (supplied by CPU or upstream module)
ShieldCable shield (connected to module ground)

The X2X bus uses synchronous communication with a dedicated clock line. Each I/O module receives timing from the upstream module and re-transmits to the downstream module. This creates a deterministic timing chain where all modules in a station sample inputs and update outputs synchronously.

X2X Bus Timing and Configuration

ParameterDefaultConfigurable RangeNotes
Bus cycle time200 us100-1000 usMust be a multiple of the system tick
Station response time< 100 usDetermined by module countMore modules = longer response
Cable length per segmentUp to 100 mTotal bus lengthLonger cables increase propagation delay
Baud rate12 Mbit/sFixedNot user-configurable

Practical impact on machine performance: The X2X cycle time directly affects I/O response time. A 200 us X2X cycle means a minimum of 200 us between an input changing and the CPU seeing that change. For high-speed applications, reduce the X2X cycle time, but be aware that shorter cycles increase CPU interrupt load.

See x2x-protocol.md for wire-level frame format and io-sniffing.md for sniffing techniques.

X2X Bus Couplers and Base Modules

The CPU connects to X20 I/O stations via X2X Link through bus couplers:

Order NumberDescription
X20BC0083X20 bus controller, CP1583 compatible
X20BC0087X20 Modbus TCP/UDP bus controller (standalone gateway)
X20BC0088X20 POWERLINK V2 bus controller
X20BB82X20 bus base, 2 expansion slots
X20BB88X20 bus base, 8 expansion slots
X20BM01Bus module, 24 VDC, single-width (standard)
X20BM11Bus module, 24 VDC, single-width (updated)
X20BM31Bus module, 24 VDC, double-width
X20BM12Bus module, 240 VAC

Station Structure

A typical X20 I/O station consists of:

  1. Bus coupler/base module (X20BC or X20BB series) - connects to CPU via X2X Link
  2. Power supply module (X20PS series) - provides I/O power
  3. I/O modules (X20DI, X20DO, X20AI, X20AO, X20AT, X20PT series) - signal processing

Each station is a daisy chain on the X2X Link bus. See network-architecture.md for topology details and x2x-protocol.md for bus protocol internals.

Three-Part Module Architecture

Every X20 I/O slot is actually three separate physical components stacked together:

  +-------------------+
  | Terminal Block     |  <- X20TB06 or X20TB12 (field wiring)
  | (removable)        |
  +-------------------+
  | Electronic Module  |  <- X20DI9371, X20AO4622, etc.
  | (hot-swappable)    |     The "smart" part with FPGA/MCU
  +-------------------+
  | Bus Module         |  <- X20BM01, X20BM31
  | (fixed to rail)    |     Backplane connector
  +-------------------+

Key practical points:

  • Terminal blocks are universal within their pin-count class (all X20TB06 work with all 6-pin modules)
  • Bus modules must match the voltage class (24V vs 240V)
  • Electronic modules are independent of bus/terminal – any module plugs into any matching-width slot
  • The controller identifies modules via the B&R ID code (0x hex) automatically
  • Electronic modules are hot-swappable in most configurations

Maximum I/O Capacity

The X20CP1584 supports:

  • Multiple X2X stations per controller
  • Up to 253 X2X nodes per link segment
  • Power budget: 7 W X2X Link output (derated to 5 W above 55 C)
  • I/O power: separate supply via terminal block (10 A max)
  • Total I/O points: limited by X2X cycle time and CPU memory, not a hard count

The practical limit depends on the number of I/O modules, their power consumption, and X2X Link timing. See io-card-hardware.md for module power specifications.

Interface Module Slot Details

The X20CP1584 has 1 slot for modular X20 interface modules. This slot is located on the right side of the CPU housing and accepts any single-width X20 interface module.

Slot mechanics:

  • The interface module slides into a guide rail on the CPU housing
  • A latch mechanism secures the module
  • The module connects to the CPU’s internal PCI Express or local bus
  • Hot-swap is NOT supported for interface modules – power cycle required

Electrical isolation: The interface module slot is galvanically isolated from the CPU core and from the X2X Link. This means faults on the fieldbus side of an interface module cannot propagate to the CPU logic.

X20CP158x Family Comparison

FeatureX20CP1583X20CP1584X20CP1585X20CP1586
ProcessorAtom E620T (333 MHz compat)Atom E640T (600 MHz)Atom E680T (1 GHz)Atom E680T (1.6 GHz)
RAM128 MB DDR2256 MB DDR2256 MB DDR2512 MB DDR2
SRAM1 MB1 MB1 MB1 MB
Max retentive64 kB256 kB256 kB1 MB
Min cycle time800 us400 us200 us100 us
L2 cache-512 kB512 kB512 kB
Interface slots1111
B&R ID0xD45B0xC3700xC3AE0xC3B0
Power consumption8.2 W8.6 W8.8 W9.7 W

The X20CP358x series is identical but has 3 interface module slots instead of 1.

Firmware and Software Compatibility

Supported Software Versions

SoftwareMinimum VersionMaximum VersionNotes
Automation Studio3.0.90.204.12.xAS 6.x does NOT target CP1584 hardware
Automation Runtime3.x4.93 (final AR 4.x)AR 6.x does NOT run on CP1584
OPC-UA ServerAR 4.0+AR 4.93Requires OPC-UA license on target
POWERLINK MNAR 3.x+AR 4.93POWERLINK V1 and V2 supported
SDM Web InterfaceAR 3.08+AR 4.93SDM enabled by default in AR 4.x
FTP ServerAR 3.x+AR 4.93FTPS available in AR 4.x
mappView HMIAR 4.xAR 4.93HTML5 HMI in browser; NOT supported in AR 6.x on this hardware

Automation Studio Version Requirements by Feature

FeatureMin AS VersionNotes
CP1584 hardware support3.0.90.20First AS version to recognize CP1584
AR 4.x runtime targeting4.0Cannot use AS 3.x to target AR 4.x
AR 4.93 (latest)4.3.5+ SPUse AS 4.12 for best compatibility
OPC-UA configuration4.0+Built-in OPC-UA server configuration
POWERLINK V2 (EPL V2)3.0.90.20POWERLINK V2 requires compatible bus controller
PVI Transfer ToolAny 4.xFor transferring projects without full AS IDE
Hardware migration from CP14843.0.90.20HW upgrade required; see spare-parts.md
mapp Framework components4.xmapp not available in AS 3.x
Profiler (Long Profiler)Any 4.xWorks without project source code

Interface Module Compatibility by AR Version

Not all interface modules work with all AR versions on the CP1584. The table below shows minimum requirements for common modules:

Interface ModuleMin AR VersionMin HW RevisionNotes
X20BC0088 (POWERLINK V2)3.xAnyMost common bus controller
X20IF1063 (Modbus TCP)3.xAnyFirmware 1.2.2.0+ for CP1584
X20IF1020 (POWERLINK)3.xH0Firmware 1.1.5.1+ for CP1584
X20IF2772 (CANopen)3.xAnyFirmware 1.0.6.1+ for CP1584
X20IF1082 (EtherCAT)4.xAnyNot available on older AR
X20IF1082-2 (EtherNET/IP)4.xAnyFirmware 1.2.1.0+ for CP1584
X20IF1091 (PROFINET)4.xAnyFirmware 1.0.5.1+ for CP1584
X20IF1072 (VARAN)4.xAnyFirmware 1.0.5.1+ for CP1584

Key point: If you add an interface module to a CP1584 running older firmware, and the module requires a newer minimum AR version, you may need to upgrade the AR before the module will be recognized. This is a chicken-and-egg problem if you only have one CPU and no spare — always upgrade AR first, then add new modules.

CP1584 Upgrade Paths to Newer Hardware

FromToRequired AS VersionMigration Complexity
X20CP1584 (AR 4.93)X20CP1684 (AR 4.x/6.x)AS 4.7+ or AS 6.0+Medium — same form factor, different CPU core
X20CP1584 (AR 4.93)X20CP3484 (AR 4.x)AS 4.xMedium — different form factor, 3 slots
X20CP1584 (AR 4.93)X20CP3586 (AR 4.x/6.x)AS 4.x or AS 6.0+Medium — different form factor, 3 slots, faster
X20CP1584 (AR 4.93)X20EM (ARM-based)AS 6.x onlyHigh — different CPU architecture entirely

X20CP1684 specific note (from B&R Community): The X20CP1684 requires Automation Studio 4.7 minimum (or AS 6.0). It is NOT yet supported in AS 4.3. When upgrading from CP1584 to CP1684, the new CPU must appear in the Hardware Catalog under Tool_Box before you can configure it. See remanufacturing.md for the full migration workflow.

See firmware.md and firmware-version-mgmt.md for detailed firmware download and installation procedures.

Practical Inspection Checklist

When encountering an unknown X20CP1584 in the field:

  1. Verify the model: Read the label on the side of the module. Order number should be X20CP1584 or X20cCP1584.
  2. Check battery LED (DC): Red = battery depleted. Replace immediately before power loss.
  3. Check CF card: Green LED = card present. No CF card = PLC will not boot to RUN.
  4. Check mode switch: Should be in RUN position for normal operation.
  5. Note hex switch settings: Record the station address values for network documentation.
  6. Check interface module: Identify any module in the expansion slot (look up order code).
  7. Note LED states: All status LEDs provide diagnostic information (see tables above).
  8. Check X2X link: Verify daisy chain connections to I/O stations.
  9. Check power wiring: Verify 24 VDC on both CPU/X2X and I/O supply terminals.
  10. Record serial numbers: Found on the module label, useful for license tracking and spare parts.

Common Replacement Scenarios

Replacing a Failed CP1584

  1. Record all settings (hex switches, mode switch, battery date)
  2. Image the CF card before removal: dd if=/dev/sdX of=cp1584-backup.img bs=4M
  3. Replace CPU on DIN rail
  4. Insert CF card
  5. Set hex switches and mode switch to match original
  6. Apply power and verify boot sequence
  7. See project-reconstruction.md if configuration is unknown

Upgrading from X20CP1484

The CP1584 is the direct upgrade path from the older X20CP1484 (Celeron-based). Migration requires:

  • Automation Studio 3.0.90.20 or later
  • Hardware upgrade for some interface modules (see compatibility table above)
  • CF card with compatible AR version
  • Project reconfiguration for the new CPU target

Key Findings

  1. The X20CP1584 is headless - no integrated display, no panel functionality. It is purely a CPU controller.
  2. The RS232 interface runs at 57600 bps factory default, not 115200 bps. Always try 57600 first.
  3. Only 1 interface module slot (not 3 like the CP3584). Plan fieldbus needs accordingly.
  4. The hex switches serve dual purpose: Ethernet INA2000 station number AND POWERLINK node number.
  5. POWERLINK is half-duplex only on IF3. Ethernet mode on IF3 supports full-duplex.
  6. Battery must be replaced within 1 minute of power loss to prevent SRAM data loss.
  7. Integrated fuse is non-replaceable - if the fuse blows, the entire CPU must be replaced.
  8. B&R ID code 0xC370 is useful for SNMP discovery and software identification.
  9. The CP1584 supports both POWERLINK V1 (node 0x00 = MN) and V2 (node 0xF0 = MN) with different node ranges.
  10. Operating temperature derating above 55 C reduces X2X Link power output from 7 W to 5 W.
  11. Fanless design with overtemperature protection at 110 C (CPU) and 95 C (board) — the PLC enters reset state, not a graceful shutdown. Logbook error 9204 indicates temperature-triggered restart.
  12. 256 MB DDR2 SDRAM is split between AR OS, task execution, and libraries. If memory usage approaches capacity, task cycle times will degrade. Monitor via system-variables.md and hardware-monitoring.md.
  13. Shortest achievable task class cycle time is 400 µs (CP1584 with Atom E640T at 0.6 GHz). For comparison: CP1583 = 800 µs, CP1585 = 200 µs, CP1586 = 100 µs. This determines the minimum POWERLINK cycle time the CP1584 can sustain as MN. Typical instruction cycle time is 0.0075 µs per the official datasheet. The integrated I/O processor handles I/O data point processing in the background, offloading this from the main CPU.
  14. Overtemperature shutdown thresholds are 110°C (processor) and 95°C (board) — the CPU enters reset state (not graceful). Logbook errors 9204 (temperature restart) and 9210 (halt/service after watchdog) indicate thermal events. No fan is present — rely on cabinet ventilation and ambient temperature control. See hardware-monitoring.md for temperature monitoring procedures.

Practical Hardware Diagnostic Commands

Via FTP (if enabled)

# Connect to the CP1584 FTP server
ftp 192.168.10.1
# Username: (varies, may be anonymous or empty)
# Password: (varies, may be empty or set by OEM)

# Useful directories:
# /System/     - AR system files, firmware, logs
# /Card/       - CF card contents (user application)
# /Temp/       - Temporary files
# /Log/        - Logbook and diagnostic files

# Download the AR logbook for error analysis
get /System/Log/Logbook.txt

Via SNMP (if enabled)

# Query the CP1584 via SNMP for hardware health
snmpwalk -v2c -c public 192.168.10.1 1.3.6.1.2.1.1

# B&R enterprise OID for hardware-specific data
snmpwalk -v2c -c public 192.168.10.1 1.3.6.1.4.1.28639

# Check interface status (IF2 Ethernet)
snmpget -v2c -c public 192.168.10.1 ifDescr.2 ifOperStatus.2

Via OPC-UA (if configured)

# Connect to OPC-UA server on the CP1584 to read system variables
# See [opcua.md](opcua.md) and [system-variables.md](system-variables.md)
# for the full variable list and connection details

Via Serial Console (Bootloader)

# Serial console settings for bootloader mode:
# Baud: 57600 (factory default)
# Data: 8 bits
# Parity: None
# Stop: 1 bit
# Flow: None

# Connect with minicom or picocom:
picocom -b 57600 /dev/ttyUSB0

# After connecting, press Enter to get the bootloader prompt
# Available commands depend on AR version:
#   help          - list available commands
#   dir           - list files
#   mem           - memory dump
#   info          - hardware info
# See [bootloader-recovery.md](bootloader-recovery.md) for full procedure

Physical Inspection Quick-Reference Card

When walking up to an unknown CP1584 in a cabinet:

[ ] Label side: read order number (X20CP1584 or X20cCP1584)
[ ] Coated variant? X20cCP1584 = conformal coating for harsh environments
[ ] Read serial number from label (for spare parts and license tracking)
[ ] Read B&R ID code (0xC370) if visible
[ ] Check DC LED: green = power OK, red = battery depleted
[ ] Check CF LED: green = card present, yellow = card access
[ ] Check R/E LED: green solid = running, red = BOOT/SERVICE
[ ] Check ETH LED: green = Ethernet link active
[ ] Check PLK LED: green = POWERLINK link active
[ ] Check mode switch: should be RUN for normal operation
[ ] Record hex switch positions (station address for network documentation)
[ ] Identify interface module in expansion slot (read its order code)
[ ] Count X2X stations connected (daisy chain physical trace)
[ ] Verify 24 VDC on both CPU/X2X (pin 11-12) and I/O (pin 7-8) power terminals
[ ] Check battery compartment: is battery present? date code?
[ ] Check for corrosion or physical damage on terminals

References

  • B&R X20CP1584 Product Page: https://www.br-automation.com/en-us/products/plc-systems/x20-system/x20-plc/x20cp1584/
  • X20CP158x Data Sheet V1.56: https://www.multiwaycontrol.com/multiway/X20CPx58x-en_V1.56.pdf
  • X20(c)CP158x and X20(c)CP358x Technical Manual: https://www.all4sps.com/mediafiles/Sonstiges/X20CP1586.pdf
  • X20TB12 Terminal Block Data Sheet: https://www.nexinstrument.com/assets/images/pdf/X20TB06__X20TB12-ENG_V266.pdf
  • X20 System User’s Manual: https://www.br-automation.com/en-us/downloads/control-and-io-systems/x20-system/x20-system-users-manual/
  • B&R Community Forum: https://community.br-automation.com/
  • B&R X20CP1684 Product Page: https://www.br-automation.com/en-us/products/plc-systems/x20-system/x20-plc/x20cp1684/

Successor: X20CP1684

B&R has released the X20CP1684 as the direct in-family successor to the CP1584. This is a drop-in compatible replacement with significant hardware improvements:

ParameterX20CP1584X20CP1684
ProcessorIntel Atom E640T @ 600 MHzIntel Atom @ 400 MHz (newer architecture)
RAM256 MB DDR2512 MB LPDDR4
User RAM (SRAM)1 MB (battery-backed)1 MB (battery-backed)
StorageCompactFlash (removable)1 GB internal flash
Ethernet10/100/1000 Mbps (1 port)Gigabit Ethernet
Interface slots1 (X20)1 (X20)
Min Automation Studio3.0.90.204.7 (recommended: 6.0+)
Min AR version4.x (B04.xx)5.x+ (G05.xx)
CoolingFanlessFanless
Power consumption8.6 W~8 W
B&R ID code0xC370(varies by revision)
CF card requiredYes (5CFCRD series)No (internal flash)

Key migration notes for CP1584 to CP1684:

  1. All X20 IO modules, bus modules, and terminal blocks are fully compatible. The X2X bus, POWERLINK, and interface module slot are identical. No IO hardware changes needed.

  2. No more CompactFlash. The CP1684 uses 1 GB internal flash instead of removable CF cards. This eliminates CF card failures (the most common failure mode on CP1584) but means backup must be done via FTP, Automation Studio transfer, or mapp Backup. See ftp-web-interface.md for FTP backup procedures.

  3. Minimum AS version is 4.7. B&R recommends Automation Studio 6.0+ for the CP1684. If you have an AS4 project, you may need to open it in AS4.7 first, verify it compiles, then optionally migrate to AS6 for CRA compliance. See remanufacturing.md for the full AS4→AS6 migration guide.

  4. AR 5.x/6.x runtime. The CP1684 runs AR 5.x or later. Some AS4-era libraries may need updates for AR 5+ compatibility. Use the community as6-migration-tools to check your project.

  5. Hardware tree update only. In Automation Studio, the migration is straightforward: replace the CPU module in the hardware tree from X20CP1584 to X20CP1684, re-address if needed (usually automatic), recompile, and download. The IO mapping remains unchanged.

  6. Production deployment: See firmware-version-mgmt.md for the production deployment checklist when changing CPU hardware. Estimated downtime: 4-8 hours for a direct CPU swap with the same IO configuration.

Order code: X20CP1684 (standard), X20cCP1684 (conformal-coated variant for harsh environments).

Beyond CP1684: X20EM ARM Edge Controllers

B&R has introduced the X20EM series as the next-generation X20 controller platform. These use ARM-based processors instead of Intel Atom, and represent B&R’s long-term direction for the X20 ecosystem. The X20EM is relevant for CP1584 maintainers planning long-term migration.

What we know about X20EM:

AspectX20CP1584 (current)X20CP1684 (successor)X20EM (next gen)
CPU architectureIntel Atom E640T (x86)Intel Atom (x86)ARM / RISC-V
Automation StudioAS 3.x–4.xAS 4.7+ (recommended AS 6.0+)AS 6.x only
Automation RuntimeAR 4.x onlyAR 5.x/6.xAR 6.x only
Multicore supportNoNoYes
X20 IO compatibleYesYesYes
Form factor1-slot X201-slot X20X20 slice (details vary)
StorageCompactFlashInternal flashInternal flash
Release timelineDiscontinued (SN 2022/54)Current productionAvailable (as of 2025)

Migration implications for CP1584 maintainers:

  1. X20EM requires AS 6.x exclusively — if you migrate to X20EM, you MUST also migrate the project to AS 6. There is no AS 4.x support for ARM targets.

  2. X20 IO modules are compatible — the X2X bus is unchanged, so all your existing IO modules, bus modules, terminal blocks, and interface modules work with X20EM.

  3. Compiled code is architecture-specific.BR files compiled for Intel x86 will NOT run on ARM. You must recompile the entire project from source. If you only have compiled code (no project file), X20EM migration requires full project reconstruction first (see project-reconstruction.md).

  4. Multicore is a significant advantage — AR 6.5 on X20EM allows assigning cyclic task classes to specific CPU cores, eliminating cycle time contention between motion control and logic processing.

  5. Not a direct drop-in replacement — unlike CP1684, the X20EM has a different CPU architecture and requires a complete software rebuild. Plan for full bench testing before production deployment.

  6. When to consider X20EM over CP1684: When the machine has complex multi-axis motion that hits cycle time limits, when you need OPC UA over TSN, or when CRA compliance requires AR 6.x with multicore isolation for security domains.

Status: X20EM specifications are evolving. Check B&R’s product page at https://www.br-automation.com/en-us/products/plc-systems/x20-system/ for the latest models and specifications. The X20 system user’s manual (January 2025 revision) covers System Generation 4 controllers including ARM-based options.

New Apollo Lake I Generation (2025)

B&R has expanded the X20 PLC family with new controllers based on Intel Apollo Lake I processors. These controllers add OPC UA over TSN support and can function as field-level masters in TSN networks — a capability the CP1584 cannot provide.

ModelKey FeatureRelevance to CP1584 Migration
X20CP3687X“Power of a PC” in X20 form factorHigh-performance AR 6.x target for complex machines
X20CP0484-1512 MB RAM, 2 GB internal flashBudget-friendly AR 6.x entry point

Why this matters for CP1584 maintainers: If you are planning a migration to meet CRA 2027 compliance (see cybersecurity-hardening.md §9.3), these new controllers provide a modern, patchable AR 6.x platform with TSN capabilities — while maintaining X20 IO bus compatibility.

Source: B&R “Expanded X20 PLC generation” — https://www.br-automation.com/en/products/plc-systems/innovations/

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 RecordWhere to Find ItWhy It Matters
Order number (e.g., X20CP1584)Label on CPU housingConfirms CPU model and capabilities
Serial numberLabel on CPUUnique identifier for B&R support, spare parts tracking
Hardware revision (e.g., J0)Label on CPUDetermines firmware compatibility
B&R ID code (0xC370 for CP1584)Not on label — from SDM or softwareUsed 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:

LEDLocationWhat to Note
R/E (Run/Error)CPU function LEDGreen=running, Red=BOOT/SERVICE, blinking patterns indicate startup/error
RDY/F (Ready/Fault)CPU function LEDYellow=license violation (when R/E blinks red)
S/E (Status/Error)POWERLINK interfaceGreen=PLK active, Red=error, blinking patterns indicate PLK state
PLKPOWERLINK linkGreen=link established, blinking=activity
ETHEthernet linkGreen=link established, blinking=activity
CFCompactFlashGreen=card detected, Yellow=read/write access
DCBattery statusRed=battery empty

Quick LED decode for common states:

What You SeeWhat It MeansImmediate Action
R/E green steady, ETH green, CF greenNormal running — machine has other issuesProceed to Phase 3
R/E red steadyBOOT or SERVICE mode — program not runningSee Phase 2
R/E red blink + RDY/F yellow blinkLicense violationSee license-mgmt.md
R/E off, CF blinking, DC blinkingIntermittent hardware failure — possibly dying CPUMay need hardware replacement (see spare-parts.md)
All IO modules: ‘r’ blinkingX2X bus lostCheck X2X cables, terminator, CPU state
DC redBattery deadReplace CR2477N within 1 minute if power off (see retentive-data.md)
S/E red blinking (pattern)POWERLINK error codeCount 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:

PositionModeMeaning
BOOTBoot modeCPU runs Boot AR — used for initial programming/firmware update
RUNRun modeNormal operation — loads and runs the application from CF card
DIAGDiagnoseDiagnostic 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:

  1. Open AS → Online → Settings
  2. Enter the PLC’s IP address
  3. Browse for target — the PLC should appear
  4. Right-click → Connect
  5. 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:

  1. Download and install UaExpert from unified-automation.com (free)
  2. Add a server: opc.tcp://<PLC_IP>:4840
  3. If the PLC uses a self-signed certificate (AR 4.x default), UaExpert will warn — click “Continue” to connect
  4. In the Address Space panel, expand the nodes:
    • ObjectsServer → browse for system variables
    • Look for a node named after the project or application (e.g., MyMachine) — this contains all global variables
  5. 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 IDNameWhat It MeansImmediate Action
25314EXCEPTION Page faultCPU tried to access invalid/protected memory. Caused by null pointers, corrupted string buffers, or shifted memory after online changeRead the Logger entry for the task name and address. If after an online change, cold restart. If recurring, investigate pointer logic
9204Temperature shutdownCPU die exceeded 110°C (board: 95°C)Check cabinet ventilation, fans, ambient temperature. Do not restart until cooled
9210WatchdogTask cycle time exceeded watchdog limitCheck for infinite loop, blocked IO, or network timeout in the named task. Temporary: increase cycle time
6803Stack underflowTask stack corrupted — usually from recursion or corrupted stack pointerCold restart. If recurring, check for recursive function calls or stack-heavy operations
3039AVT reference not availablenc154man (motion) library missing or internal reference table corruptedRe-transfer the project. Check if ACOPOS drive configuration is intact
8234IO module not foundHardware mismatch — expected IO module not detected on X2X busCheck X2X cables, module seating, power supply. Compare hardware tree to physical modules

Warning-level errors (program may still run):

Error IDNameWhat It Means
25313Warning (non-critical)Non-fatal warning — check context for details
41216Motion errorACOPOS/stepper drive reported a fault — check drive fault code
-1070584042OPC UA connection failedOPC 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 files
  • F:\AS\System\ — System configuration
  • F:\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

SymptomsMost Likely CauseQuick TestFix
PLC in SERVICE mode after power-upDead battery, corrupted memory, program errorCheck DC LED; read Logger errorReplace battery (see retentive-data.md); warm restart
PLC in BOOT mode, won’t go to RUNCF card not recognized, missing/invalid programCheck CF LED; try different CF cardReseat CF card; re-image from backup (see cf-card-boot.md)
Machine runs but outputs wrongIO module failure, wiring issue, program logic errorForce outputs from AS or PVI; check IO module LEDsSee io-card-hardware.md, io-sniffing.md
Intermittent communication dropsPOWERLINK timing, cable/connector issues, EMICheck S/E LED pattern; capture EPL traffic with WiresharkSee powerlink-internals.md, grounding-emc.md
Servo drives faultingEncoder issue, drive parameter, POWERLINK CN lostCheck drive LED fault code; monitor drive status via PVI/OPC-UASee acopos-drives.md, encoder-diagnostics.md
All IO modules showing errorsX2X bus failure, CPU not in RUN, power supply issueCheck CPU R/E LED; check power supply module LEDsSee x2x-protocol.md, io-card-hardware.md
HMI not communicatingPOWERLINK/OPC-UA connection lost, VNC session droppedPing HMI panel IP; check VNC port 5900See hmi-integration.md, network-architecture.md
Temperature-related shutdownsCabinet ventilation failed, fan dead, thermal degradationRead CPU temperature via SDM; check cabinet airflowSee hardware-monitoring.md

Phase 4: Get It Running (45-60 minutes)

4.1 If PLC Is in SERVICE Mode

  1. Read the error from the Logger
  2. If the error is transient (e.g., watchdog timeout from a one-time condition):
    • In AS: Online → Cold Start
    • Or via brwatch: CPU → Coldstart
  3. 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)
  4. 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

  1. Verify the mode switch is in RUN
  2. Check CF card is inserted and detected (CF LED should be green)
  3. 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
  4. 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:

  1. Obtain a compatible CompactFlash card (B&R extended temperature recommended, see spare-parts.md)
  2. 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)
  3. Insert the CF card and switch to RUN
  4. The PLC should boot into RUN mode with your minimal program
  5. 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.

  1. Verify 24V power supply to the CPU (check terminal block: +24V on pins 5-6, GND on pins 1, 4)
  2. Check the integrated fuse (non-replaceable — if blown, the CPU module must be replaced)
  3. If power is good and still no LEDs, the CPU is likely dead
  4. Do not attempt to repair the CPU module — it is not field-repairable
  5. Source a replacement (see spare-parts.md for part numbers and compatible replacements)
  6. The CF card from the dead CPU will work in a replacement CPU (same model), preserving the program
  7. 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

  1. 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.
  2. 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.
  3. FTP gives you access to the CF card contents without removing the card. Back up everything via FTP before making any changes.
  4. The mode switch matters. If it is in BOOT, the PLC will never run the application. Switch to RUN.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. OPC-UA browsing (UaExpert) and PVI (Pvi.py) can replace most Automation Studio functions for diagnostic purposes — variable reading/writing, namespace browsing, and monitoring.
  10. 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

ItemHow to CaptureStore In
CPU order number, serial number, hardware revisionPhotograph labelMaintenance log
AR firmware versionSDM → CPU Information or serial consoleMaintenance log
IP address, subnet, gatewaySDM or serial consoleNetwork diagram
INA station number (DIP switch position)Read rotary switchesMaintenance log
Battery statusDC LED + SDMMaintenance log (replace by date)
CF card contents listingls -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 ConfigurationBackup + folder
Network topology (all IPs)brsnmp scan output, or SDM for each deviceNetwork diagram
OPC-UA namespace structure (if enabled)UaExpert → File → Export Address SpaceBackup + XML
Variable list with types and current valuesUaExpert Data Access View, or Pvi.py scriptCSV file

5.2 Critical Backups to Take

  1. Full CF card image via FTP:
    wget -r ftp://<PLC_IP>/ --mirror -o backup.log
    
  2. System dump (if AS is available): AS → Online → Create System Dump → saves .sys file
  3. SDM screenshots of every page
  4. 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

Cybersecurity Hardening for Legacy B&R CP1584 Systems

Overview

This guide provides actionable, step-by-step procedures for hardening a B&R X20CP1584 PLC system when you have no OEM support, no original project documentation, and a controller that cannot be fully patched. The CP1584 runs Automation Runtime (AR) 4.x on a VxWorks kernel — it maxes out at AR R4.93, which leaves 17+ known CVEs permanently unpatchable. Network isolation and defense-in-depth are not optional best practices — they are survival requirements.

Audience: An automation engineer maintaining one or more CP1584-based machines from defunct OEMs, who needs to secure the system without vendor support, formal IEC 62443 certification budgets, or a dedicated OT security team.

Threat model: The CP1584 was not designed with modern cybersecurity in mind. It lacks signed firmware verification (on AR 4.x), has no built-in firewall, ships with multiple open network services by default, and its underlying VxWorks kernel has known unpatched vulnerabilities. An attacker on the same network segment can crash the PLC (CVE-2025-3450, CVE-2021-22275), intercept communications (CVE-2024-5800, CVE-2024-8603), or bypass authentication (CVE-2023-1617, CVE-2025-3449).

DocumentRelevance
ar-rtos.mdComplete CVE table (50+ entries), AR OS internals, firewall rules
access-recovery.mdPassword/credential recovery, access control layers
network-architecture.mdNetwork topology, device discovery, VLAN segmentation
firmware.mdFirmware architecture, update to AR R4.93
firmware-version-mgmt.mdVersion identification, upgrade procedures
diagnostics-sdm.mdSDM vulnerabilities and mitigation
ftp-web-interface.mdFTP and web server security
opcua.mdOPC-UA certificate management and security
pvi-api.mdPVI credential leak (CVE-2026-0936)
remanufacturing.mdMigration to patchable hardware

1. The Hardening Problem: Why CP1584 Is Different

1.1 Unpatchable by Design

The CP1584 is an end-of-life CPU limited to AR 4.x. AR R4.93 is the final release. No further security patches will be produced for this platform. The following categories of vulnerabilities are permanently unpatchable:

CategoryCVEs / AdvisoriesWhy Unpatchable on CP1584
SDM session managementCVE-2025-3449, CVE-2025-3448, CVE-2025-11498Require AR >= 6.4
SDM multiple vulnsSA2025P003 (multiple SDM CVEs, Oct 2025)Require AR >= 6.5
SDM DoS (resource lock)CVE-2025-3450 (SA25P002)Patched in R4.93
SDM web XSSCVE-2023-3242 (SA23P018), CVE-2022-4286 (SA22P024)Patched in R4.93
SDM portmapper SYN floodCVE-2023-3242 (SA23P013)Patched in R4.93
SSL/TLS cryptographyCVE-2024-5800, CVE-2024-8603, CVE-2024-0323Require AR >= 6.1
Webserver overflowCVE-2021-22275No patch for AR 4.x
VNC authenticationCVE-2023-1617 (SA22P011)Patchable only via VC4 update (may not be available)
ANSL DoS (flooding)CVE-2025-11044 (SA25P005, CVSS v4.0 8.9 / v3.1 6.8)Patched in R4.93
ANSL rate limitingCVE-2025-11044 variantPatched in R4.93
AR multiple vulnsSA24P011 (Aug 2024, multiple AR CVEs)Require AR >= 6.4
mapp auth bypassSA22P014 (Nov 2024, multiple mapp components)Require AR >= 6.1
Self-signed cert algoSA25P001 (Jan 2025, insecure algorithm)Require AR >= 6.4
FTP weak encryptionCVE-2024-5800 (SA23P004, FTP TLS)Require AR >= 6.1
AS insufficient encryptionSA23P019 (Feb 2024, AS communication)AS-only fix; no AR patch
Evil PLC AttackSA 01/2022 (RCE via project upload from target)AS-side fix; no AR patch; always validate PLC connections
Insecure code loadingSA24P005 (May 2024, DLL/code injection)Require AR >= 6.5
PVI credential leakCVE-2026-0936 (SA26P001, Jan 2026)PVI client-side; fixed in PVI 6.5
AS cert validationSA25P004 (Jan 2026, insufficient server cert validation)AS-side; fixed in AS 6.5
PixieFail (UEFI)SA24P003 (Jan 2026 update, network boot vuln)UEFI firmware; affects Industrial PCs, may affect CP1584 boot path
PPT30 OPC-UA DoSCVE-2025-11482 (SA25P006, May 2026, CVSS v4.0 8.7)PPT30 HMI only; fixed in PPT30 OS 1.8.0; OPC-UA off by default

Bottom line: 20+ CVEs remain open on AR 4.x (even at R4.93). The only defense is network isolation. See ar-rtos.md for the complete CVE table.

2026 Advisory Wave (Jan 2026): Three new advisories were published in January 2026: SA26P001 (PVI credential leak into logfile), SA25P004 (AS insufficient server certificate validation), and SA25P005 (ANSL server flooding DoS — already patched in R4.93). SA26P001 is notable because it affects the PVI client on the engineering PC, not the PLC itself — an authenticated attacker can cause PVI to log sensitive data (including connection credentials) to the PVI log file. Upgrade PVI to 6.5 (shipped with AS 6.5) to remediate.

1.2 Service Surface Attack Map

Every network service on the CP1584 is an attack surface. Map them before hardening:

PortProtocolServiceDefault StateRisk if Exposed
21TCPFTP ServerEnabled, weak authCredential theft, data exfiltration, weak TLS
80TCPHTTP / SDMEnabled, no authDoS (CVE-2021-22275, CVE-2025-3450), XSS, session takeover
443TCPHTTPSConfigurableSame as 80 if enabled
11169TCPANSL / PVIEnabledDoS (CVE-2025-11044 if pre-4.93), variable access
11160TCPINA2000 (legacy)May be enabledLegacy PVI access, no modern security
4840TCPOPC-UAIf configured by OEMVariable read/write if auth weak
5900TCPVNC (VC4)If configuredAuth bypass (CVE-2023-1617), HMI exposure
5800TCPVNC HTTPIf configuredSame as 5900
123UDPNTP/SNTPIf configuredTime manipulation (lower risk)
161UDPSNMPConfigurableInformation disclosure, community string brute-force
162UDPSNMP TrapConfigurableLower risk
30303UDPANSL DiscoveryEnabledNetwork reconnaissance, device fingerprinting
11169UDPANSL DiscoveryEnabledSame as 30303

1.3 IEC 62443 Context

IEC 62443 is the international standard for industrial automation cybersecurity. While full certification is unrealistic for legacy equipment, the standard’s core concepts — zones and conduits — provide the right architectural framework:

  • Zone: A group of assets that share the same security requirements. The CP1584 and its directly connected I/O form one zone.
  • Conduit: A controlled communication path between zones (a firewall rule, a VPN tunnel, a one-way diode).

Even without formal certification, applying IEC 62443 zone/conduit thinking to a legacy CP1584 system dramatically improves its security posture.


2. Hardening Checklist (By Priority)

Use this checklist in order. Each step builds on the previous.

Phase 1: Immediate Actions (Do Today)

  • 2.1 Update firmware to AR R4.93 (patches the worst CVEs)
  • 2.2 Identify and document all open ports on the CP1584
  • 2.3 Disable unnecessary services
  • 2.4 Change all default/known credentials
  • 2.5 Block PLC from all networks except the control VLAN

Phase 2: Network Isolation (Do This Week)

  • 2.6 Implement zone/conduit network architecture
  • 2.7 Configure firewall rules per Section 4
  • 2.8 Set up a dedicated maintenance VLAN
  • 2.9 Disable ANSL discovery broadcasts on production networks

Phase 3: Service Hardening (Do This Month)

  • 2.10 Secure OPC-UA with certificates and strong policies
  • 2.11 Disable or restrict SDM to maintenance windows only
  • 2.12 Disable FTP; use SCP/SFTP for file transfers
  • 2.13 Update VC4 if VNC is used
  • 2.14 Secure SNMP or disable it
  • 2.15 Secure NTP source

Phase 4: Monitoring and Maintenance (Ongoing)

  • 2.16 Set up network monitoring for anomalous traffic to/from the PLC
  • 2.17 Subscribe to B&R security advisories
  • 2.18 Document and periodically audit all changes
  • 2.19 Plan migration timeline to patchable hardware

3. Step-by-Step Hardening Procedures

3.1 Update Firmware to AR R4.93

This is the single most important hardening step. AR R4.93 patches:

  • CVE-2025-11044 (ANSL DoS — can permanently crash the PLC via network packets)
  • CVE-2025-3450 (SDM DoS — crashes the PLC via crafted SDM request)
  • CVE-2022-4286 (SDM reflected XSS)
  • CVE-2023-3242 (portmapper DoS)

Procedure:

  1. Verify current AR version:

    - Connect to serial console (IF1, 115200 baud) and watch boot screen
    - OR: check via SDM web interface at http://<PLC_IP>/sdm
    - OR: use Automation Studio: Online > Device Information
    - OR: FTP to C:\ and examine SysDir\*.cfg files for version strings
    
  2. Obtain AR R4.93 upgrade:

    • Install Automation Studio 4.12 (latest AS4 — see firmware-version-mgmt.md)
    • Download AR R4.93 upgrade via Tools > Upgrades in AS
    • If no AS license: use the 90-day evaluation license. The runtime transfer does not require a permanent license on the engineering PC
  3. Backup the current system:

    - Image the CF card: dd if=/dev/sdX of=cp1584_backup_$(date +%Y%m%d).img bs=4M
    - FTP backup of user partition (F:\)
    - Screenshot all SDM pages
    - Export any retentive data (see [retentive-data.md](retentive-data.md))
    
  4. Perform the upgrade:

    • Follow the firmware update procedure in firmware.md
    • The upgrade replaces the AR OS files on the CF card while preserving user partition data
    • Plan for 15-30 minutes of downtime
    • Verify the PLC boots to RUN state with AR 4.93 after update
  5. Post-upgrade verification:

    • Confirm AR version in SDM
    • Verify all cyclic tasks are running
    • Check for any new warnings or errors in the AR log
    • Re-test machine operation

Warning: Never skip the CF card backup. If the upgrade fails, the backup image is your only recovery path. See bootloader-recovery.md for recovery procedures.

3.2 Identify Open Ports and Services

Scan the CP1584 from a workstation on the same subnet:

nmap -sV -p- --open -T4 <PLC_IP>

Expected results for a default AR R4.93 installation:

PORT      STATE  SERVICE    VERSION
21/tcp    open   ftp        B&R Automation FTP (AR 4.93)
80/tcp    open   http       B&R Automation WebServer / SDM
11169/tcp open   unknown    B&R ANSL / PVI Manager
30303/udp open   unknown    B&R ANSL Discovery
123/udp   open   ntp        (if NTP configured)

Document every port you find. Compare against the service surface map in Section 1.2. Any port not in that table is unexpected and requires investigation.

3.3 Disable Unnecessary Services

FTP Server — Disable or Restrict:

The FTP server uses weak TLS (CVE-2024-5800, CVE-2024-8603). Even with TLS enabled, communications may be decryptable.

  • Best: Block port 21 at the firewall entirely. Use FTP only during maintenance windows with firewall rules temporarily opened.
  • Alternative: Change FTP credentials from defaults (br/br) to strong credentials. Restrict FTP access to the maintenance VLAN only.

SDM Web Server — Restrict to Maintenance Windows:

SDM has multiple unpatchable vulnerabilities on AR 4.x (session takeover, XSS, CSV injection from SA25P003). SA2025P003 (Oct 2025) documents additional SDM CVEs requiring AR >= 6.5. Even after updating to R4.93, the SDM web interface should be treated as hostile if exposed to any network beyond the control VLAN.

  • Block port 80/443 at the firewall during normal operation
  • Temporarily allow access during scheduled maintenance windows
  • Never expose SDM to the office network or internet

ANSL Discovery (UDP 30303) — Cannot Be Disabled:

The ANSL discovery broadcast cannot be disabled in AR 4.x. It reveals the PLC’s IP address, serial number, firmware version, and device name to anyone on the network segment. Network segmentation is the only mitigation — put the PLC on a dedicated VLAN that engineering and HMI devices share, but no other network segment can reach.

INA2000 (TCP 11160) — Disable if Possible:

INA2000 is a legacy protocol. PVI 6.x (AS 6.x) dropped support for it. If no legacy tools require INA2000:

  • In Automation Studio, the INA2000 transport is configured per connection in the PVI Manager setup
  • On the PLC side, the INA2000 port is always open if the AR version supports it
  • Firewall block on port 11160 is the mitigation

VNC (TCP 5900/5800) — Disable if Not Needed:

  • VNC is only needed for remote HMI viewing
  • CVE-2023-1617 allows authentication bypass on older VC4 versions
  • If VNC is not needed for daily operation, block port 5900/5800 at the firewall
  • If VNC is required, update VC4 to the latest version and restrict access to HMI subnets only

SNMP — Disable if Not Used:

  • SNMP on AR 4.x often uses default community strings (public, private)
  • SNMP exposes CPU temperature, memory usage, module status — useful for attackers planning attacks
  • If not used for monitoring, block UDP 161/162 at the firewall
  • If used, change community strings to strong values and restrict to monitoring server IPs

3.4 Change All Default Credentials

B&R controllers have no factory-level passwords — all credentials are application-defined (see access-recovery.md). However, common defaults exist in the field:

ServiceCommon DefaultsAction
FTPbr / br, admin / admin, empty credentialsChange to strong credentials (16+ chars, no dictionary words)
SDMNo authenticationCannot add authentication on AR 4.x — firewall is the only control
OPC-UAAnonymous accessConfigure user roles if possible (requires AS project modification)
VNCNo password or simple passwordSet strong VNC password in VC4 settings
AS Online LoginNo passwordSet strong password (requires AS project modification)
SNMPpublic / privateChange to strong community string or disable entirely
mapp User rolesOEM-definedIf recoverable, change via access-recovery.md procedures

Credential management without AS project:

Most credentials are baked into the AS project configuration. If you do not have the original project, you cannot change AS Online Login, OPC-UA user roles, or mapp User passwords without rebuilding the project. For these, network isolation is your primary defense.

FTP credentials and SNMP community strings can sometimes be changed via the CF card configuration files without the full AS project — see config-file-formats.md.

3.5 Implement Zone/Conduit Network Architecture

Apply IEC 62443 zone/conduit thinking to create a network architecture that isolates the CP1584 from threats.

Recommended Three-Zone Architecture:

+---------------------+     Firewall      +--------------------+     Firewall     +------------------+
|   OFFICE / IT ZONE  |================== |  INDUSTRIAL DMZ    | ================ |  CONTROL ZONE    |
|                     |  (Block ALL PLC    |  (SCADA server,    |  (Allow only     |  (CP1584, I/O,    |
|  - Workstations     |   traffic FROM    |   historian,       |   protocol-       |   HMI panels,     |
|  - Internet         |   this zone)      |   engineering PC)  |   specific traffic|   drives,         |
|  - Guest WiFi       |                   |                    |  FROM DMZ only)   |   field devices)  |
+---------------------+                   +--------------------+                   +------------------+
                                                                 |
                                                    Firewall blocks ALL
                                                    traffic from Office
                                                    and Internet zones

Zone Definitions:

ZoneDevicesSecurity LevelAccess to Control Zone
Control ZoneCP1584, X20 I/O bus, ACOPOS drives, HMI panels, X2X busHighest (SL-3 equivalent)Direct access, all required protocols
Industrial DMZSCADA/HMI server, OPC-UA gateway, engineering workstation, historianMedium (SL-2 equivalent)Limited: OPC-UA, PVI, NTP only
Office/IT ZoneWorkstations, internet, guest networksLowestBlocked — no direct access to PLC

Conduit Rules (Control Zone Inbound):

SourceDestinationProtocolPortPurpose
DMZ SCADA ServerCP1584TCP4840OPC-UA data acquisition
DMZ Engineering PCCP1584TCP11169ANSL (AS online, PVI)
NTP ServerCP1584UDP123Time synchronization
DMZ MaintenanceCP1584TCP80SDM (maintenance windows only)
DMZ MaintenanceCP1584TCP21FTP (maintenance windows only)
ALLCP1584ALLALLBlock by default

Conduit Rules (Control Zone Outbound):

SourceDestinationProtocolPortPurpose
CP1584NTP ServerUDP123Time sync
CP1584PVI ManagerTCP11160PVI callbacks (if used)
CP1584ALLALLALLBlock all other outbound

3.6 Firewall Implementation

Option A: Managed Industrial Switch with ACLs

Most industrial environments have managed switches (Cisco, Hirschmann, Moxa, B&R X20SW). Configure VLANs and ACLs:

# Example VLAN configuration (Hirschmann/Phoenix Contact syntax)

# Control Zone VLAN
vlan 10
  name "CONTROL_ZONE"
  untagged 1-12
  tagged 25

# Industrial DMZ VLAN
vlan 20
  name "INDUSTRIAL_DMZ"
  untagged 13-20
  tagged 25

# Inter-VLAN ACL: DMZ -> Control Zone
access-list DMZ_TO_CONTROL
  permit tcp any any eq 4840       # OPC-UA
  permit tcp any any eq 11169      # ANSL
  permit udp any any eq 123        # NTP
  deny ip any any                  # Block everything else

# Apply ACL to VLAN 20 interface
interface vlan 20
  ip access-group DMZ_TO_CONTROL in

# Port 21 (FTP) and 80 (SDM/HTTP) are BLOCKED by default
# Temporarily permit during maintenance:
#   permit tcp <maintenance_ip> any eq 80
#   permit tcp <maintenance_ip> any eq 21

Option B: Dedicated Industrial Firewall

If a dedicated firewall appliance is available (Fortinet FortiGate, Cisco ISA, Claroty, Nozomi):

# Control Zone -> DMZ firewall policy
policy CONTROL_TO_DMZ
  source-zone: CONTROL
  dest-zone: DMZ
  service: NTP, PVI-Callback
  action: ALLOW
  logging: all

# DMZ -> Control Zone firewall policy
policy DMZ_TO_CONTROL
  source-zone: DMZ
  dest-zone: CONTROL
  service: OPC-UA, ANSL, NTP
  source-address: [SCADA_Server_IP, Engineering_PC_IP, NTP_Server_IP]
  action: ALLOW
  logging: all

# Maintenance window policy (disabled by default)
policy MAINTENANCE_DMZ_TO_CONTROL
  source-zone: DMZ
  dest-zone: CONTROL
  service: HTTP, FTP
  source-address: [Engineering_PC_IP]
  schedule: maintenance_window
  action: ALLOW
  logging: all
  enable: false  # Enable only during scheduled maintenance

Option C: PC-Based Firewall (Minimal Budget)

If no managed switch or firewall appliance exists, use a Linux-based firewall between the office and control networks:

# Install on a dual-NIC Linux box (one NIC to office, one to control network)
apt install nftables

# /etc/nftables.conf
#!/usr/sbin/nft -f

flush ruleset

table inet filter {
  # Control Zone interface (facing PLCs)
  chain input_control {
    type filter hook input priority 0; policy drop;

    # Allow established/related connections
    ct state established,related accept

    # Allow NTP
    udp dport 123 accept

    # Allow ICMP for diagnostics
    ip protocol icmp accept

    # Drop everything else
    drop
  }

  # DMZ interface (facing engineering workstations)
  chain input_dmz {
    type filter hook input priority 0; policy drop;

    ct state established,related accept

    # Allow SSH to firewall itself for management
    tcp dport 22 accept

    drop
  }

  # Forward from DMZ to Control Zone
  chain forward {
    type filter hook forward priority 0; policy drop;

    # Allow DMZ -> Control: OPC-UA
    iifname "eth1" oifname "eth0" tcp dport 4840 accept

    # Allow DMZ -> Control: ANSL
    iifname "eth1" oifname "eth0" tcp dport 11169 accept

    # Allow DMZ -> Control: NTP
    iifname "eth1" oifname "eth0" udp dport 123 accept

    # Allow Control -> DMZ: NTP outbound
    iifname "eth0" oifname "eth1" udp sport 123 accept

    # Allow Control -> DMZ: PVI callback
    iifname "eth0" oifname "eth1" tcp sport 11160 accept

    # Block everything else
    drop
  }
}

3.7 Secure OPC-UA Configuration

OPC-UA is the primary data exchange protocol for B&R systems. If the OPC-UA server is enabled on the CP1584, secure it:

Certificate Management:

  1. Generate a self-signed certificate for the PLC (if one doesn’t exist — check via SDM or FTP to F:\ or C:\AS\)
  2. Copy the PLC’s certificate to all OPC-UA clients
  3. Generate client certificates and trust them on the PLC side (requires AS project modification — see opcua.md)

Security Policy Selection (if modifiable):

PolicySecurity LevelCP1584 AR 4.x Support
NoneNo securityDefault, insecure
Basic128Rsa15Signing + encryptionSupported but weak algorithms
Basic256Signing + encryptionSupported but weak algorithms
Basic256Sha256Stronger encryptionSupported, recommended minimum
Aes128-Sha256-RsaOaepStrongest availableMay not be available on AR 4.x

If you cannot modify the OPC-UA configuration (no AS project), enforce security at the network level:

  • Allow OPC-UA (port 4840) only from trusted SCADA/HMI servers
  • Block OPC-UA from all other networks
  • Monitor OPC-UA traffic for unexpected connections using network monitoring tools

3.8 SDM Hardening (Mitigate, Don’t Patch)

Since SDM vulnerabilities cannot be fully patched on AR 4.x:

  1. Block SDM at the firewall during normal production. Port 80/443 to the CP1584 should be blocked by default.
  2. When SDM access is needed for diagnostics, use a temporary firewall rule that allows HTTP/HTTPS only from a specific maintenance workstation IP, and close the rule immediately after the maintenance window.
  3. Never access SDM from the office network or over WiFi. Always use a wired connection on the DMZ or a maintenance VLAN.
  4. Clear browser session after SDM access — CVE-2025-3449 (predictable session ID) means an attacker who can guess the session ID could hijack your SDM session.
  5. Do not click links to SDM — CVE-2025-3448 (reflected XSS) could execute JavaScript in your browser if you follow a crafted link.

3.9 FTP Alternatives

FTP on AR 4.x uses weak TLS that may be decryptable. Alternatives:

For File Backup (Pull from PLC):

  • Use FTP only from the maintenance VLAN with firewall temporarily opened
  • Accept that the transfer may be observable on the network
  • Transfer only configuration files, not sensitive production data

For File Push (To PLC):

  • If modifying CF card contents is necessary, consider:
    1. Physical CF card swap (most secure — remove card, write on isolated workstation, reinsert)
    2. FTP during maintenance window with firewall rules temporarily opened
    3. Automation Studio file transfer over ANSL (encrypted within the PVI protocol layer)

SCP/SFTP Alternative:

  • AR 4.x does not natively support SSH/SCP/SFTP
  • If secure file transfer is critical, consider building a small ARM/Linux gateway box that runs an SSH server and relays files to the PLC via FTP (accepting the FTP weakness only on the local control network segment)

3.10 NTP Hardening

Use a trusted internal NTP server, not internet NTP pools:

  1. Designate an internal server (in the DMZ) as the NTP source for all control zone devices
  2. That server synchronizes with upstream internet NTP servers
  3. The CP1584 synchronizes only with the internal server
  4. Firewall: allow UDP 123 only from the internal NTP server to the CP1584

Why: An attacker who can spoof NTP responses could shift the PLC’s clock, causing time-based logic to malfunction, corrupting timestamp-based alarm analysis, or invalidating certificate validity periods.

3.11 Engineering Workstation Hardening

The engineering workstation running Automation Studio and PVI is a high-value target:

CVE-2025-11043 (AS Certificate Validation Bypass): Automation Studio does not properly validate TLS certificates. An attacker on the network could impersonate the PLC during AS online operations.

CVE-2026-0936 (PVI Logfile Credential Leak): PVI logs credentials in plaintext log files.

Mitigations:

  1. Upgrade Automation Studio to the latest version — AS 4.12.9+ includes the latest patches for AS-side vulnerabilities
  2. Run AS only on the DMZ network — never on the office network or WiFi
  3. PVI logfile security:
    • Locate PVI log files on the engineering workstation (typically in %APPDATA%\BR\Automation\ or similar)
    • Set filesystem permissions so only the engineering user account can read them
    • Periodically clean log files that contain credentials
    • If possible, disable PVI logging or set it to minimal level
  4. AS certificate validation: Until B&R fully patches CVE-2025-11043, be aware that AS may accept fraudulent certificates during online operations. Only connect to PLCs on the isolated control network where man-in-the-middle attacks are not feasible.

4. Complete Firewall Rule Reference

This is the authoritative firewall rule set for a hardened CP1584 (AR R4.93) installation. Adapt IP addresses and VLANs to your network.

4.1 Inbound Rules to CP1584

# REQUIRED (Production)
ALLOW  TCP  11169  from [SCADA/HMI subnet]     # ANSL - OPC-UA FX, AS online
ALLOW  TCP  4840   from [SCADA/HMI subnet]     # OPC-UA - if server enabled
ALLOW  UDP  123    from [NTP server IP]         # NTP time sync
ALLOW  ICMP        from [DMZ subnet]           # Ping for diagnostics

# OPTIONAL (With Restrictions)
ALLOW  TCP  80     from [Maintenance IP]       # SDM - maintenance windows only
ALLOW  TCP  443    from [Maintenance IP]       # SDM HTTPS - maintenance windows only
ALLOW  TCP  21     from [Maintenance IP]       # FTP - maintenance windows only
ALLOW  TCP  5900   from [HMI panel IPs]        # VNC - only from authorized panels
ALLOW  UDP  161    from [Monitoring server IP]  # SNMP - only from authorized collector

# BLOCK (Always)
BLOCK  TCP  21     from ALL (except maintenance) # FTP insecure
BLOCK  TCP  5900   from ALL (except HMI panels)  # VNC insecure
BLOCK  UDP  30303  from ALL (external zones)     # ANSL discovery - control zone only
BLOCK  ALL         from [Office/IT/Guest]        # Zero trust for non-control networks
BLOCK  ALL         from ANY (external/Internet)  # Never expose PLC to internet

4.2 Outbound Rules from CP1584

# ALLOW
ALLOW  UDP  123    to [NTP server IP]           # NTP time sync
ALLOW  TCP  11160  to [PVI Manager IP]          # PVI callbacks (if used)

# BLOCK
BLOCK  ALL         to ANY                       # PLC should not initiate external connections

4.3 Inter-VLAN Rules (If Using VLANs)

# Office VLAN -> Control Zone VLAN
BLOCK  ALL

# Industrial DMZ VLAN -> Control Zone VLAN
ALLOW  TCP  4840   (OPC-UA)
ALLOW  TCP  11169  (ANSL)
ALLOW  UDP  123    (NTP)
BLOCK  ALL

# Control Zone VLAN -> Industrial DMZ VLAN
ALLOW  UDP  123    (NTP responses)
ALLOW  TCP  11160  (PVI callback)
BLOCK  ALL

5. Network Monitoring for Anomaly Detection

Even with firewall rules in place, monitoring provides detection for when (not if) something goes wrong.

5.1 What to Monitor

IndicatorNormal BehaviorAnomaly Alert
TCP connections to port 80 (SDM)Zero (blocked by firewall)Any connection attempt = someone bypassed firewall
TCP connections to port 21 (FTP)Zero (blocked by firewall)Any connection attempt
UDP 30303 (ANSL discovery) broadcastsPeriodic from CP1584Discovery from non-control-zone IPs = reconnaissance
TCP 4840 (OPC-UA) connectionsFrom known SCADA/HMI servers onlyFrom unknown IPs = unauthorized access attempt
TCP 11169 (ANSL) connectionsFrom known engineering PCs onlyFrom unknown IPs
Traffic volume to/from CP1584Low (a few KB/s for cyclic comms)Spikes = possible data exfiltration or DoS attempt
New devices on control VLANStatic set of known MAC addressesNew MAC = unauthorized device

5.2 Monitoring Tools

Passive (Recommended for Legacy Systems):

# Simple port scan detection using tcpdump
# Run on the DMZ firewall or a SPAN port
tcpdump -i eth0 -n 'host <PLC_IP> and not (udp port 123 or tcp port 4840 or tcp port 11169)'
# Alerts on any traffic to PLC that isn't OPC-UA, ANSL, or NTP

# Log ANSL discovery probes (watch for scanning)
tcpdump -i eth0 -n 'udp port 30303 or udp port 11169'

Active (If Budget Allows):

  • Open-source: Zeek (formerly Bro) network security monitor
  • Industrial-specific: Wireshark with OPC-UA and POWERLINK dissectors
  • Commercial: Claroty, Nozomi Networks, Dragos (if budget allows)
  • For Python-based custom monitoring: see python-diagnostics.md

5.3 Automated Alerting Script

#!/usr/bin/env python3
"""
cp1584_network_monitor.py - Monitors network traffic to/from a B&R CP1584
for anomalous connections. Run on a SPAN port or firewall log collector.
"""

import subprocess
import time
import logging
from datetime import datetime

logging.basicConfig(
    filename='/var/log/cp1584_monitor.log',
    level=logging.INFO,
    format='%(asctime)s - %(levelname)s - %(message)s'
)

PLC_IP = '192.168.10.5'
KNOWN_SOURCES = {
    '192.168.20.10': 'SCADA-Server',
    '192.168.20.11': 'Engineering-PC',
    '192.168.20.20': 'NTP-Server',
    '192.168.10.100': 'HMI-Panel-1',
}

ALLOWED_PORTS = {4840, 11169, 123}  # OPC-UA, ANSL, NTP
ALERT_COOLDOWN = 300  # seconds between repeated alerts

last_alert = {}

def check_connections():
    try:
        result = subprocess.run(
            ['ss', '-tn', f'dest', PLC_IP],
            capture_output=True, text=True, timeout=10
        )
        for line in result.stdout.splitlines()[1:]:  # Skip header
            parts = line.split()
            if len(parts) < 4:
                continue
            source = parts[4].rsplit(':', 1)[0]
            dest_port = parts[3].rsplit(':', 1)[1]
            state = parts[1]

            if dest_port.isdigit() and int(dest_port) not in ALLOWED_PORTS:
                hostname = KNOWN_SOURCES.get(source, 'UNKNOWN')
                if hostname == 'UNKNOWN' or state != 'ESTAB':
                    alert_key = f"{source}:{dest_port}"
                    now = time.time()
                    if alert_key not in last_alert or (now - last_alert[alert_key]) > ALERT_COOLDOWN:
                        msg = f"SUSPICIOUS: {source} ({hostname}) -> {PLC_IP}:{dest_port} [{state}]"
                        logging.warning(msg)
                        print(msg)
                        last_alert[alert_key] = now
    except Exception as e:
        logging.error(f"Monitoring error: {e}")

if __name__ == '__main__':
    logging.info(f"CP1584 network monitor started for {PLC_IP}")
    while True:
        check_connections()
        time.sleep(60)

6. Physical Security Checklist

Network security is meaningless if someone can walk up to the PLC with a laptop:

  • Control cabinet locked with key access limited to authorized personnel
  • CF card not easily removable without opening the cabinet (it should be behind the cabinet door)
  • Serial console port (IF1) not accessible from outside the cabinet
  • DIP switches not accessible without opening the cabinet
  • USB port — CP1584 has a USB port on the front. Consider physically blocking or disabling it if not needed (some firmware versions allow USB disable)
  • Network cables secured — label all cables; verify no unauthorized taps or switches are inserted
  • Cabinet grounding and bonding verified — see grounding-emc.md for procedures

7. Secure Remote Access

If remote maintenance access to the CP1584 is required (e.g., you need to connect from off-site):

Remote Engineer (Home/Office)
    |
    | VPN Tunnel (WireGuard / OpenVPN / IPsec)
    v
[Industrial DMZ - Jump Host / Bastion]
    |
    | Direct connection on control VLAN
    v
CP1584

Critical rules:

  1. Never expose the CP1584 directly to the internet. No port forwarding, no dynamic DNS to PLC ports.
  2. VPN is mandatory. All remote access goes through a VPN concentrator in the DMZ.
  3. Jump host / bastion. Remote engineers connect to a bastion host in the DMZ, then from there to the PLC. The bastion should log all sessions.
  4. MFA on VPN. Require multi-factor authentication for VPN connections.
  5. Session timeout. VPN sessions should time out after a configurable period of inactivity.
  6. Maintenance window enforcement. Remote access should only be possible during scheduled maintenance windows.

7.2 VPN Implementation (WireGuard Example)

# On the DMZ bastion/gateway
apt install wireguard

# /etc/wireguard/wg0.conf
[Interface]
Address = 10.10.99.1/24
ListenPort = 51820
PrivateKey = <gateway_private_key>

[Peer]
# Remote engineer
PublicKey = <engineer_public_key>
AllowedIPs = 10.10.99.2/32

[Peer]
# Additional engineer
PublicKey = <engineer2_public_key>
AllowedIPs = 10.10.99.3/32
# On the remote engineer's laptop
# /etc/wireguard/wg0.conf
[Interface]
Address = 10.10.99.2/24
PrivateKey = <engineer_private_key>
DNS = 10.10.20.1  # Internal DNS

[Peer]
PublicKey = <gateway_public_key>
Endpoint = <dmz_gateway_public_ip>:51820
AllowedIPs = 10.10.20.0/24, 10.10.10.0/24  # DMZ and Control subnets
PersistentKeepalive = 25

The engineer then connects to the CP1584 via its control zone IP (e.g., 10.10.10.5) through the VPN tunnel. The gateway firewall already permits DMZ -> Control Zone traffic for ANSL, OPC-UA, and NTP.


8. Incident Response for CP1584

8.1 Signs of Compromise

SymptomPossible AttackImmediate Action
PLC unresponsive (crashed)DoS attack (CVE-2025-3450, CVE-2021-22275)Block all inbound traffic, reboot from CF card backup
Unexpected program changesUnauthorized AS upload or online modificationCompare CF card contents to known-good backup, see program-reverse-engineering.md
Unknown HMI screens appearingVNC hijack or SDM session takeoverBlock VNC and SDM ports, check VNC connections
Network traffic spikes from PLCData exfiltration or malicious scanningBlock all outbound from PLC, investigate with packet capture
Alarm floods from safety systemTampering with safety I/OEmergency stop, investigate safe I/O (see safe-io-diagnostics.md)
New devices on control VLANUnauthorized device insertionInvestigate, remove, audit physical security

8.2 Recovery Procedure

  1. Isolate: Block all network traffic to/from the CP1584 at the nearest switch or firewall
  2. Preserve: Capture any available network logs, SDM snapshots, AR logs before rebooting
  3. Recover: Restore the CF card from the known-good backup image (dd backup)
  4. Verify: After boot, compare all files on the restored CF card against the backup checksums
  5. Analyze: Determine the attack vector before reconnecting to the network
  6. Harden: Apply any additional firewall rules or service restrictions identified during analysis
  7. Report: If the attack caused safety concerns, document thoroughly for compliance

8.3 CF Card Backup Integrity Verification

# Create checksums of CF card backup
sha256sum cp1584_backup_20260710.img > cp1584_backup_20260710.sha256

# Verify backup integrity before restore
sha256sum -c cp1584_backup_20260710.sha256

# Verify restored card matches backup
dd if=/dev/sdX bs=4M | sha256sum
# Compare to: sha256sum cp1584_backup_20260710.img

9. B&R Security Advisory Monitoring

9.1 Subscription Sources

SourceURLWhat You Get
B&R Security Advisorieshttps://www.br-automation.com/en-us/service/cyber-security/cyber-security-advisories-and-notices/All B&R security advisories (SA- prefixed)
ABB PSIRT RSS Feedhttps://psirt.abb.com/rss/abbrssfeed.xmlMachine-readable RSS feed of all B&R (ABB) security advisories
ABB CSAF Feedhttps://psirt.abb.com/csaf/abb-csaf-feed-tlp-white.jsonMachine-readable CSAF/ROLIE feed for automated vulnerability management tooling
CISA ICS-CERT Advisorieshttps://www.cisa.gov/news-events/ics-advisoriesUS government advisories for industrial control systems, including B&R
NVD CVE Databasehttps://nvd.nist.gov/vuln/search/results?query=br-automationAll published CVEs for B&R products
OpenCVE B&R Feedhttps://app.opencve.io/cve/?vendor=br-automationAggregated B&R CVE feed
awesome-B&R (GitHub)https://github.com/br-automation-community/awesome-B-RCurated list of B&R community tools, libraries, and resources
BrSecurity (GitHub)https://hilch.github.io/BrSecurityAS library with Password/Encrypt/Decrypt security functions
B&R Community Forumhttps://community.br-automation.com/t/cyber-security-faq-for-b-r-automation-users/10006Cyber Security FAQ for B&R users

9.2 Security Advisory Timeline (2024-2026)

This timeline tracks all B&R security advisories that affect CP1584 / AR 4.x systems. Advisories marked “Patched in R4.93” are addressed by updating to the latest AR 4.x. All others remain permanently open.

DateAdvisoryDescriptionCP1584 ImpactMitigation
2026-07-06SA26P011APROL R 4.4-01P5 security fixes (CVE-2026-6900 cert validation, CVE-2026-6901 search path, 4 Apache Tomcat CVEs)APROL only (SCADA, not PLC)N/A for CP1584
2026-06-11SA26P010Linux Kernel vulnerabilities impactBX/BP Linux-based controllers onlyN/A for CP1584 (VxWorks kernel)
2026-06-10SA26P009XZ Utils backdoor vulnerabilityBX/BP Linux-based controllers onlyN/A for CP1584 (VxWorks kernel)
2026-05-26SA25P006PPT30 OPC-UA Server DoS (CVE-2025-11482, CVSS v4.0 8.7 / v3.1 7.5); resource exhaustion via concurrent connections; permanent unresponsiveness; reboot required; CISA ICSA-26-155-03 republished 2026-06-04PPT30 HMI panels only (OPC-UA off by default)Update PPT30 OS to 1.8.0; see opcua.md; firewall OPC-UA if not needed
2026-02-18SA25P007SQLite version update in Automation StudioAS-side onlyUpdate AS to 6.5+
2026-01-29SA26P001PVI logfile credential leak (CVE-2026-0936)Engineering PC; PVI logs sensitive connection dataUpdate PVI to 6.5 (AS 6.5); secure PVI log files; see pvi-api.md
2026-01-29SA24P003 (update)PixieFail network boot vulnerabilityMay affect boot pathNetwork boot not used on CP1584; verify no PXE boot in BIOS
2026-01-19SA25P004AS insufficient server certificate validationEngineering PC; AS-sideUpdate AS to 6.5; AS 6.5 warns on self-signed certs
2026-01-19SA25P005ANSL Server flooding DoS (CVE-2025-11044); CISA ICSA-26-125-03 republished 2026-07CVSS v4.0 8.9Patched in R4.93
2025-10-14SA2025P003Multiple SDM vulnerabilities (CVE-2025-3449 session identifier prediction, CVE-2025-3448 reflected XSS, CVE-2025-11498 CSV formula injection); CISA republished 2026-05-21Open on AR 4.x (fix requires AR >= 6.4)Block SDM at firewall; network isolation; see diagnostics-sdm.md
2025-10-07SA25P002SDM DoS via improper resource locking (CVE-2025-3450)Patched in R4.93Update to R4.93
2025-03-24SA24P015APROL privilege escalation / info disclosureAPROL only (SCADA, not PLC)N/A for CP1584
2025-01-16SA25P001Insecure algorithm for self-signed certsOpen on AR 4.xReplace self-signed certs with CA-signed; see opcua.md
2024-11-27SA22P014Auth bypass in mapp componentsOpen on AR 4.xBlock OPC-UA/mapp at firewall; restrict access
2024-08-30SA24P011Multiple AR vulnerabilitiesOpen on AR 4.xNetwork isolation; update to R4.93 for partial fixes
2024-05-14SA24P005Insecure loading of codeOpen on AR 4.xBlock unauthorized project uploads; see “Evil PLC Attack” below
2024-04-12SA24P002LogoFail UEFI boot vulnerabilityMay affect boot pathCP1584 uses custom bootloader; verify boot chain integrity
2024-02-27SA23P019AS insufficient communication encryptionEngineering PC; AS-sideUse VPN tunnels for all AS-to-PLC connections
2024-02-14SA24P004SSH Terrapin attackSSH not exposed by default on AR 4.xBlock port 22 at firewall
2024-02-05SA23P018SDM web XSS (CVE-2023-3242)Patched in R4.93Update to R4.93
2024-02-05SA23P004FTP weak TLS (CVE-2024-5800)Open on AR 4.xBlock FTP at firewall; use maintenance VLAN only
2023-07-26SA23P013Portmapper SYN floodingPatched in R4.93Update to R4.93
2023-02-14SA22P024SDM reflected XSS (CVE-2022-4286)Patched in R4.93Update to R4.93
2022-02SA 01/2022Evil PLC Attack (RCE via project upload from target)AS-side; no AR fixNever connect AS to unknown PLCs without validation; verify PLC identity before uploading
2021-15SA 08/2021Webserver DoS (CVE-2021-22275)Open on AR 4.xBlock port 80/443 at firewall

9.3 CRA 2027 Compliance Assessment

The EU Cyber Resilience Act (CRA) takes full effect December 2027. Products with digital elements placed on the EU market must meet cybersecurity requirements including vulnerability handling, security updates, and incident reporting.

CP1584 CRA Assessment:

CRA RequirementCP1584 StatusGap
Vulnerability handling processB&R has a formal process (IEC 62443-4-1 aligned)Process exists but CP1584 cannot receive patches
Security updates for known vulns20+ CVEs permanently unpatchableFAIL
Coordinated disclosure (180 days)B&R publishes advisories promptlyProcess works but CP1584 cannot benefit
SBOM / software bill of materialsNot provided for AR 4.x componentsGAP
Default secure configurationMultiple services enabled by default with weak authFAIL

Implication: Machines containing CP1584 controllers cannot meet CRA requirements as-is. The only path to CRA compliance is migration to patchable B&R hardware (AR 6.x) or a non-B&R platform. See remanufacturing.md for migration planning. The EU Machinery Regulation (MR) also takes effect January 2027, compounding the compliance urgency.


Key Findings

  1. CP1584 on AR 4.x is permanently unpatchable. B&R has ended-of-life for AR 4.x and the CP1584 cannot run AR 5.x or 6.x. All 20+ known CVEs will remain open for the lifetime of these controllers.

  2. The attack surface is broad. Default-enabled services include FTP (unencrypted), HTTP/SDM web server, OPC-UA, SNMP, POWERLINK, ANSL, and the PVI portmapper. Many use weak or default authentication.

  3. Network isolation is the most effective defense. Since patching is impossible, placing the CP1584 on an isolated VLAN with a firewall blocking all inbound traffic except necessary protocols is the single highest-impact hardening step.

  4. OPC-UA certificate management is critical but often neglected. The default self-signed certificates expire and are not trusted by clients. Implementing proper certificate lifecycle management significantly reduces man-in-the-middle risk.

  5. CRA 2027 compliance is impossible without migration. The EU Cyber Resilience Act (effective January 2027) requires active vulnerability management and SBOM disclosure — neither of which a CP1584 can provide. Migration to AR 6.x hardware or an alternative platform is the only compliance path.

  6. PVI credential leak (CVE-2026-0936) is the most immediately exploitable vulnerability. PVI logs usernames and passwords in plaintext on any PC running Automation Studio or PVI-based tools, creating a credential harvesting vector.

  7. SA2025P003 SDM CVEs are the most dangerous unpatched SDM vulnerabilities. CVE-2025-3449 (session identifier prediction), CVE-2025-3448 (reflected XSS), and CVE-2025-11498 (CSV formula injection) all remain open on AR 4.x. CISA republished the advisory in May 2026 (ICSA-26-155-03 companion). CSV injection is particularly insidious — exported diagnostic CSV files can execute formulas when opened in Excel, potentially compromising the engineer’s workstation.

  8. PPT30 OPC-UA DoS (CVE-2025-11482) affects HMI panels paired with CP1584 systems. CVSS v4.0 8.7 — an unauthenticated attacker can permanently crash the OPC-UA server on PPT30 panels by sending malformed concurrent connection requests, requiring a reboot. If your CP1584 uses a PPT30 HMI panel with OPC-UA enabled, update to PPT30 OS 1.8.0 or firewall the OPC-UA port (4840/TCP).


Cross-References

B&R CP1584 Master Troubleshooting Index

A scenario-based index mapping common B&R CP1584 diagnostic problems to the research documents that solve them. For an engineer who has inherited an undocumented B&R machine and needs to diagnose a specific problem, start here.


How to Use This Index

  1. Identify your symptom from the categories below
  2. Follow the linked document(s) for step-by-step diagnostic procedures
  3. Cross-reference the “See Also” links for related diagnostic paths

Scenario 1: Machine Won’t Boot / PLC Won’t Start

SymptomPrimary DocumentSecondary
PLC shows no LEDs after power-oncp1584-hardware-ref.md — power supply and hardware checksgrounding-emc.md
STATUS LED flashing red/yellow patterncp1584-hardware-ref.md — LED decode tablediagnostics-sdm.md
PLC stuck in BOOT modebootloader-recovery.md — full recovery proceduresaccess-recovery.md
PLC enters SERVICE mode after startupbootloader-recovery.md — SERVICE mode causesar-rtos.md — crash/exception handling
CF card not detected / CF LED errorcf-card-boot.md — CF card contents and diagnosticsfirmware.md
Battery dead, PLC loses settingsretentive-data.md — battery replacement procedurecp1584-hardware-ref.md
firmware corrupted / unknown versionfirmware-version-mgmt.md — version identification and updatebootloader-recovery.md
CP1584 completely unresponsive (brick)bootloader-recovery.md — unbrick procedurescp1584-hardware-ref.md
Error 25314 (page fault) on startupar-rtos.md — exception handling and backtraceprogram-reverse-engineering.md

Scenario 2: Can’t Connect to the PLC from Automation Studio

SymptomPrimary DocumentSecondary
Don’t know the PLC’s IP addressaccess-recovery.md — network discovery via BOOT modecp1584-forensics.md
AS password required / unknownaccess-recovery.md — all credential recovery methodsbootloader-recovery.md
PLC not found in Auto Searchnetwork-architecture.md — network discoveryaccess-recovery.md
“PLC module stuck in BOOT mode: Service”bootloader-recovery.md — BOOT:Service recoveryaccess-recovery.md
Connection drops intermittentlynetwork-architecture.md — network diagnosticsgrounding-emc.md
ANSL port (11169) not respondingpvi-api.md — PVI line configurationnetwork-architecture.md
Migrating from AS4 to AS6, PVI brokenremanufacturing.md — AS4→AS6 migration toolspvi-api.md

Scenario 3: Program Running But Machine Behaving Wrong

SymptomPrimary DocumentSecondary
Outputs not turning on/off correctlyio-card-hardware.md — IO module diagnosticsmemory-map.md — verify addressing
Analog readings wrong / driftinganalog-calibration.md — calibration proceduresio-card-hardware.md
Cycle time violations / watchdog errorsexecution-model.md — task scheduling analysisar-rtos.md — scheduler internals
Intermittent sensor glitchesio-sniffing.md — fieldbus traffic capturegrounding-emc.md
POWERLINK communication errorspowerlink-internals.md — EPL diagnosticsio-sniffing.md
X2X bus errors / IO module diagnosticsx2x-protocol.md — X2X protocol analysisio-card-hardware.md
CAN bus communication failuresif2772-canopen.md — CANopen diagnosticsio-sniffing.md
Servo drive / motor problemsacopos-drives.md — drive diagnosticsencoder-diagnostics.md
Encoder faults on motion axisencoder-diagnostics.md — full encoder diagnosticsacopos-drives.md

Scenario 4: Need to Understand What the PLC Program Does (No Project Files)

GoalPrimary DocumentSecondary
Extract variables from running PLCpvi-api.md — PVI variable enumerationopcua.md — OPC-UA browsing
Browse all IO mappingcp1584-forensics.md — forensic analysismemory-map.md
Read the CF card contentscf-card-boot.md — CF card file layoutftp-web-interface.md
Reverse-engineer compiled codeprogram-reverse-engineering.md — binary analysismemory-map.md
Reconstruct a functional AS projectproject-reconstruction.md — full methodologycp1584-forensics.md
Understand task structureexecution-model.md — task classes and schedulingar-rtos.md
Read alarm/event historyalarm-logging.md — alarm log analysisdiagnostics-sdm.md

Scenario 5: Need to Make Changes Without Stopping the Machine

GoalPrimary DocumentSecondary
Change a setpoint or parameteronline-changes.md — runtime modificationpvi-api.md
Force an output on/offonline-changes.md — force/override techniquesmemory-map.md
Modify running program logiconline-changes.md — online downloadexecution-model.md
Save changes persistentlyonline-changes.md — save to CF cardcf-card-boot.md
Change via OPC-UA from external systemopcua.md — variable write via OPC-UApython-diagnostics.md
Change via PVI from Pythonpvi-api.md — PVI Python accesspython-diagnostics.md
Rollback a bad online changeonline-changes.md — rollback procedurescf-card-boot.md

Scenario 6: Adding Monitoring / Remote Visibility

GoalPrimary DocumentSecondary
Add SNMP monitoringiiot-retrofit.md — SNMP setupebpf-telemetry.md
Add OPC-UA data exportopcua.md — server configurationiiot-retrofit.md
Add MQTT data pipelineiiot-retrofit.md — full MQTT setupcustom-diagnostic-tools.md
Build Grafana dashboardiiot-retrofit.md — dashboard stackpython-diagnostics.md
Trend variables over timesystem-variables.md — system variable monitoringpython-diagnostics.md
Send email/SMS alertsalarm-logging.md — alarm notificationiiot-retrofit.md

Scenario 7: Safety System Problems

SymptomPrimary DocumentSecondary
Safe IO module faultsafe-io-diagnostics.md — safe IO diagnosticsio-card-hardware.md
SafeLOGIC program faultsafe-io-diagnostics.md — safe program analysisexecution-model.md
SIL rating verificationsafe-io-diagnostics.md — SIL assessmentaccess-recovery.md
Safety parameter backupsafe-io-diagnostics.md — parameter backupretentive-data.md
E-stop circuit issuesio-card-hardware.md — digital input diagnosticsgrounding-emc.md

Scenario 8: Physical Layer / Signal Quality Problems

SymptomPrimary DocumentSecondary
Intermittent errors from EMIgrounding-emc.md — EMC troubleshootingphysical-layer-sniffing.md
Cable/connector problemsphysical-layer-sniffing.md — wire-level diagnosticsio-card-hardware.md
Shield/ground problemsgrounding-emc.md — grounding auditphysical-layer-sniffing.md
Oscilloscope signal analysisphysical-layer-sniffing.md — scope techniquesanalog-calibration.md
Encoder signal qualityencoder-diagnostics.md — encoder signal analysisphysical-layer-sniffing.md
Analog signal noiseanalog-calibration.md — analog signal conditioninggrounding-emc.md

Scenario 9: Networking Problems

SymptomPrimary DocumentSecondary
Can’t reach PLC on networknetwork-architecture.md — network discoveryaccess-recovery.md
VLAN/firewall blocking PLCnetwork-architecture.md — network architecturear-rtos.md — security posture
POWERLINK timing violationspowerlink-internals.md — cycle timing analysisexecution-model.md
Modbus communication failuresmodbus-gateway.md — Modbus diagnosticsserial-diagnostics.md
PLC-to-PLC communication issuesplc-to-plc.md — inter-PLC diagnosticspowerlink-internals.md
Time sync / timestamp problemstime-sync.md — NTP/SNTP configurationdiagnostics-sdm.md
Serial port (RS232/RS485) problemsserial-diagnostics.md — serial diagnosticsconfig-file-formats.md

Scenario 10: Hardware Degradation / Aging System

SymptomPrimary DocumentSecondary
CPU running hot / thermal throttlinghardware-monitoring.md — temperature monitoringcp1584-hardware-ref.md
Fan failurehardware-monitoring.md — fan monitoringcp1584-hardware-ref.md
Memory (RAM/CF) degradationhardware-monitoring.md — memory healthcf-card-boot.md
Deciding: repair vs replaceremanufacturing.md — decision matrixspare-parts.md
Direct drop-in CPU upgrade (CF-compatible)remanufacturing.md — X20CP1585/CP1684 upgrade pathfirmware-version-mgmt.md
Next-gen ARM migration (X20EM, multicore)cp1584-hardware-ref.md — X20EM ARM platformremanufacturing.md — AS 6.5 multicore
Spare parts identificationspare-parts.md — part number decodingcp1584-hardware-ref.md
Migration to newer B&R hardwareremanufacturing.md — migration paths (includes AS 6.5 multicore + ST-OOP benefits)project-reconstruction.md
Migration to non-B&R platformremanufacturing.md — CODESYS/Siemens/Beckhoffprogram-reverse-engineering.md
License issueslicense-mgmt.md — license recoveryaccess-recovery.md

Scenario 11: No OEM Support — Complete Documentation Reconstruction

GoalPrimary DocumentSecondary
Systematic documentation approachdocumentation-reconstruction.md — methodologycp1584-forensics.md
IO mapping from scratchdocumentation-reconstruction.md — IO documentationmemory-map.md
Wiring diagram from inspectiondocumentation-reconstruction.md — wiring docsphysical-layer-sniffing.md
Program logic documentationproject-reconstruction.md — logic reconstructionprogram-reverse-engineering.md
Maintenance manual creationdocumentation-reconstruction.md — manual creationspare-parts.md
Building a diagnostic workstationdiagnostic-workstation.md — workstation setupdocumentation-reconstruction.md

Scenario 12: Security Vulnerability Assessment

ConcernPrimary DocumentSecondary
Check all known CVEs for CP1584ar-rtos.md §14 — complete CVE table with 50+ entriesfirmware.md — AR version landscape
ANSL DoS (CVE-2025-11044, CVSS v4.0 8.9)ar-rtos.md §14.9 — ANSL flooding vulnerability (race condition; shorter cycle times increase exploitability)network-architecture.md
SDM data deletion (CVE-2025-3450, CVSS 7.5)ar-rtos.md §14.22 — critical SDM vulnerabilitydiagnostics-sdm.md
SDM XSS/session takeover (SA25P003)ar-rtos.md §14.15-14.17 — SDM web vulnerabilitiesftp-web-interface.md
FTP weak TLS (CVE-2024-5800)ar-rtos.md §14.23 — weak DH groups in AR 4.xftp-web-interface.md
SSL/TLS broken crypto (CVE-2024-8603)ar-rtos.md §14.21 — broken cryptographic algorithmftp-web-interface.md
AS certificate bypass (CVE-2025-11043)ar-rtos.md §14.19 — AS TLS validationaccess-recovery.md
PVI credential logging (CVE-2026-0936)ar-rtos.md §14.18 — PVI logfile leakpvi-api.md
Configure firewall rules for PLCar-rtos.md §14.25 — recommended firewall rulesnetwork-architecture.md
CRA (Cyber Resilience Act) compliancear-rtos.md §14.24 — CP1584 marked CRA non-compliantaccess-recovery.md
SA26P009/010 (XZ Utils, Linux kernel)ar-rtos.md §14.25-14.26 — NOT affected (VxWorks-based)remanufacturing.md
Network isolation strategynetwork-architecture.md — VLAN designar-rtos.md — security posture summary
Full system hardening plancybersecurity-hardening.md — complete hardening guidear-rtos.md — CVE table
Firewall rules for CP1584cybersecurity-hardening.md §4 — complete firewall referencear-rtos.md §14.27
Secure remote access setupcybersecurity-hardening.md §7 — VPN + bastion architecturenetwork-architecture.md
Security incident responsecybersecurity-hardening.md §8 — detection and recoverysafe-io-diagnostics.md
OPC-UA security configurationopcua.md — certificates, encryption, access controlaccess-recovery.md
PPT30 OPC-UA DoS (SA25P006, CVE-2025-11482)opcua.md — concurrent connection handling limitscybersecurity-hardening.md — firewall rules for OPC-UA
XZ Utils impact on B&R (SA26P009) — CP1584 NOT affectedar-rtos.md §14.25 — confirms VxWorks-based PLCs unaffectedcybersecurity-hardening.md
Linux kernel vulns (SA26P010) — CP1584 NOT affectedar-rtos.md §14.26 — confirms VxWorks-based PLCs unaffectedremanufacturing.md — Linux PCs need patching
AS cert validation bypass (SA25P004, Jan 2026)cybersecurity-hardening.md §9.2 — update AS to 6.5firmware-version-mgmt.md — AS 6.5 details
ANSL flooding DoS (SA25P005, CVE-2025-11044)cybersecurity-hardening.md §1.1 — patched in R4.93network-architecture.md — ANSL firewall rules
mapp auth bypass (SA22P014)cybersecurity-hardening.md §9.2 — open on AR 4.xopcua.md — restrict OPC-UA access
SDM multiple new CVEs (SA2025P003)cybersecurity-hardening.md §3.3 — block SDM at firewalldiagnostics-sdm.md

Scenario 13: Machine Just Powered On After Long Storage / Downtime

SymptomPrimary DocumentSecondary
Battery dead, retentive data lostretentive-data.md — battery replacement and data recoverycp1584-hardware-ref.md
CF card not detected or read errorscf-card-boot.md — CF card diagnostics and replacementbootloader-recovery.md
PLC boots to SERVICE mode after long idlebootloader-recovery.md — SERVICE mode causesar-rtos.md — crash analysis
Network settings lost (battery died)access-recovery.md — BOOT mode network confignetwork-architecture.md
IP address unknown, can’t connectaccess-recovery.md — DIP switch default IPcp1584-forensics.md
Motion axes don’t move (encoder lost)encoder-diagnostics.md — encoder realignmentacopos-drives.md
Calibration drift on analog sensorsanalog-calibration.md — recalibration proceduresio-card-hardware.md
OPC-UA certificates expiredopcua.md — certificate renewallicense-mgmt.md
Safety system fault after startupsafe-io-diagnostics.md — safety reset procedureio-card-hardware.md
Need full backup before running machineftp-web-interface.md — CF card backupcf-card-boot.md
Firmware version check before productionfirmware-version-mgmt.md — version auditar-rtos.md §14 — CVE check

External Tools Quick Reference

ToolPurposeUsed In
brwatch (github.com/hilch/brwatch)Watch, change, log variables; set IP; rebootpvi-api.md, access-recovery.md
brsnmp (github.com/hilch/brsnmp)SNMP discovery, IP config, inventoryiiot-retrofit.md, access-recovery.md
systemdump.py (github.com/hilch/systemdump.py)Create/load system dumps from CLIebpf-telemetry.md, diagnostics-sdm.md
Pvi.py (github.com/hilch/Pvi.py)Python wrapper for B&R PVIpvi-api.md, python-diagnostics.md
UaExpert (free from Unified Automation)OPC-UA client for browsing PLC variablesopcua.md, project-reconstruction.md
Wireshark with POWERLINK dissectorCapture and analyze EPL trafficpowerlink-internals.md, io-sniffing.md
as6-migration-tools (github.com/br-automation-community)AS4 to AS6 project migration scriptsremanufacturing.md, firmware-version-mgmt.md
paho.mqtt.c-ar (github.com/br-automation-community)MQTT client library for B&R ARiiot-retrofit.md, custom-diagnostic-tools.md
SystemDumpViewerGUI viewer for SystemDump.xml filesdiagnostics-sdm.md
systemdump.py (github.com/hilch/systemdump.py)CLI: create, upload, delete, inventory system dumps without browserdiagnostics-sdm.md, cp1584-forensics.md
Automation Studio ProfilerTask timing and CPU profilingexecution-model.md, ar-rtos.md
SDM (built-in web UI at /sdm)Browser-based hardware diagnosticsdiagnostics-sdm.md, system-variables.md
B&R VS Code Tools (github.com/br-automation-com/vscode-brautomationtools)Edit, build, transfer AS projects from VS Code (AS 4.x compatible)remanufacturing.md, custom-diagnostic-tools.md
Automation Studio Code (bundled with AS 6.3+)Official B&R VS Code-based editor with AS Copilot AI (AS 6.x only)remanufacturing.md, firmware-version-mgmt.md
AS Copilot (B&R, cloud service)AI assistant for ST code generation within AS Code (free until end 2025)remanufacturing.md
BR.AS.LibraryExporter.exe (bundled with AS 6.5+)CLI tool for exporting libraries from AS projects (-P -n -o -c syntax)remanufacturing.md
ST VS Code extension (Serhioromano.vscode-st)IEC 61131-3 syntax highlighting in VS Coderemanufacturing.md
Loupe Package Manager (loupeteam.github.io)CLI for managing Loupe packages in ASremanufacturing.md
SafeDODiag (github.com/br-automation-community/SafeDODiag)AS library: diagnoses why safe digital outputs are not enabled (mapp Safety, Safety Release, X20SO21x0/X20SO41x0)safe-io-diagnostics.md
openSAFETYLogbrowser (github.com/banickn/openSAFETY-logbrowser)Electron app: log browser for openSAFETY protocolsafe-io-diagnostics.md
acopos-cheat-sheet (github.com/hilch/bar-acopos-cheat-sheet)Quick reference for ACOPOS servo drive parameters and commandsacopos-drives.md
TrakDiag (github.com/hilch/TrakDiag)AS library: ACOPOStrak linear motor system diagnosisacopos-drives.md
BrSecurity (hilch.github.io/BrSecurity)AS library: Password, Encrypt, Decrypt functionsaccess-recovery.md, cybersecurity-hardening.md
OMJSON (github.com/loupeteam/OMJSON)AS library: WebSocket + JSON communication from PLCiiot-retrofit.md, custom-diagnostic-tools.md
OMSQL (github.com/loupeteam/OMSQL)AS library: SQL database communication from PLCiiot-retrofit.md
TCPComm / UDPComm (github.com/loupeteam)AS libraries: Simplified wrappers for AsTCP/AsUDPcustom-diagnostic-tools.md
PLC-data-trace (github.com/hilch/PLC-data-trace)AS project: Records PLC variables in high-priority task, saves to CSVcustom-diagnostic-tools.md, python-diagnostics.md
mappRemoteShell (github.com/br-automation-community/mappRemoteShell)Sample project: Execute shell commands on remote PC via OPC-UA + Pythoncustom-diagnostic-tools.md
ListAllBurPLCs (github.com/Chihing/ListAllBurPLCs)Lists all B&R PLCs on the networknetwork-architecture.md, access-recovery.md
demo-br-asyncua (github.com/hilch/demo-br-asyncua)Python example: Access B&R PLC with asyncua (asyncio OPC-UA)opcua.md, python-diagnostics.md
OpcUaSamples (github.com/br-automation-community/OpcUaSamples-sample-AS)OPC-UA configuration and coding samples from AS4.1 to newest ASopcua.md
easyuaclient-as-project (github.com/br-automation-community/easyuaclient-as-project-dev)Easy OPC-UA client wrapper library for ASopcua.md
canopen-message-interpreter (github.com/hilch/canopen-message-interpreter)Python script: Interpret CAN traces as CANopen (CiA DS301)if2772-canopen.md
Persist (github.com/loupeteam/Persist)AS library: Store any variable type to permanent memoryretentive-data.md
CSVFileLib (github.com/loupeteam/CSVFileLib)AS library: Read/write variable values to CSV filescustom-diagnostic-tools.md
mappPanel (github.com/br-automation-community/mappPanel)Sample: PLC to T-Panel communication over OPC-UAhmi-integration.md
B&R DevOps Package (github.com/br-automation-community/BnR-DevOps-Package)DevOps practices for AS project developmentdocumentation-reconstruction.md
BuildVersion (github.com/br-na-pm/BuildVersion)Git commit + AS build info captured in variable declarationsdocumentation-reconstruction.md
FindUsbStickOnBAndRPlc (github.com/hilch/FindUsbStickOnBAndRPlc)AS library: Find and use USB sticks on PLC for file I/Ocustom-diagnostic-tools.md, cf-card-boot.md
mappCleanUp (github.com/br-automation-community/mappCleanUp)AS sample: Delete old files from PLC directory by criteriacf-card-boot.md
UserLog (github.com/tmatijevich/UserLog)AS library: Synchronous user logbook writingalarm-logging.md
LogThat (github.com/loupeteam/LogThat)AS library: Easy diagnostic info into CPU Loggerdiagnostics-sdm.md
MyDiag (github.com/hilch/MyDiag)AS library: Wrapper around ArEventLog and AsArSdm for CPU loggerdiagnostics-sdm.md

The “I Just Inherited This Machine” Checklist

NEW: For a complete step-by-step first-hour playbook, see first-60-minutes.md.

For an engineer walking up to a B&R CP1584 machine with zero documentation:

  1. Physical: Read CPU label → cp1584-hardware-ref.md
  2. Network: Discover PLC on network → access-recovery.md, network-architecture.md
  3. Diagnostics: Open SDM in browser → diagnostics-sdm.md
  4. Variables: Browse via OPC-UA or PVI → opcua.md, pvi-api.md
  5. Config: Read CF card via FTP → ftp-web-interface.md, cf-card-boot.md
  6. Program: Understand running logic → project-reconstruction.md
  7. Safety: Assess safety system → safe-io-diagnostics.md
  8. Document: Build maintenance manual → documentation-reconstruction.md
  9. Secure: Review access controls AND check firmware version against CVE table → access-recovery.md, ar-rtos.md §14
  10. Monitor: Set up remote visibility → iiot-retrofit.md, python-diagnostics.md

Scenario 14: Migrating from Automation Studio 4 to AS 6

GoalPrimary DocumentSecondary
Analyze AS4 project for AS6 compatibilityremanufacturing.md §5 — migration analysisfirmware-version-mgmt.md
Run automated migration analysisUse as6-migration-tools (github.com/br-automation-community/as6-migration-tools) — detects deprecated libs, unsupported hardware, breaking changesremanufacturing.md §5.3
Handle deprecated INA2000 in PVI codepvi-api.md §2 — PVI 6.x drops INA2000, ANSL migrationpython-diagnostics.md
Update OPC-UA client code for AR 6opcua.md — AR 6.x OPC-UA changesremanufacturing.md
Hardware upgrade with AS6 supportremanufacturing.md — target CPU comparison tablecp1584-hardware-ref.md
CP1584 is obsolete (SN 2022/54, LTB Feb 2023)remanufacturing.md — discontinuation notice and spare parts strategyspare-parts.md
Migrate mappMotion code to mappMotion 6remanufacturing.md — mappMotion update helperacopos-drives.md
Check mapp technology license requirementslicense-mgmt.md — license checker toolremanufacturing.md
AS 6.5 multicore + ST-OOP benefitsremanufacturing.md — AR 6.5 featuresexecution-model.md

Document Cross-Reference Map

cp1584-hardware-ref.md ──── cp1584-forensics.md ──── cf-card-boot.md
        │                        │                       │
        ├── firmware.md ────────├── config-file-formats.md ──┘
        ├── hardware-monitoring.md │                        │
        ├── grounding-emc.md       │                        ├── bootloader-recovery.md
        │                        │                        │
        └── io-card-hardware.md ───┘                        └── access-recovery.md
                                                                │
ar-rtos.md ──── execution-model.md ───── memory-map.md ────────┘
     │                                    │
     ├── diagnostics-sdm.md ──── system-variables.md
     │
     └── ebpf-telemetry.md ────── custom-diagnostic-tools.md
                                     │
network-architecture.md ──── powerlink-internals.md ── io-sniffing.md
        │                                    │               │
        ├── plc-to-plc.md ──────────────────┘               │
        │                                                    │
        ├── if2772-canopen.md ────────────────────────────────┘
        │
        ├── modbus-gateway.md
        │
        └── serial-diagnostics.md

pvi-api.md ──── python-diagnostics.md ─── opcua.md ── iiot-retrofit.md
                                                     │
                                                     ├── ftp-web-interface.md
                                                     │
time-sync.md ──── alarm-logging.md ──────── safe-io-diagnostics.md
                                         │
                                         └── hmi-integration.md

cybersecurity-hardening.md ── ar-rtos.md ── network-architecture.md
          │                        │
          ├── access-recovery.md ├── firmware-version-mgmt.md
          │                        │
          └── diagnostics-sdm.md ── ftp-web-interface.md

program-reverse-engineering.md ── project-reconstruction.md
                                              │
acopos-drives.md ── encoder-diagnostics.md ──── analog-calibration.md
                                                    │
                                                    └── x2x-protocol.md

online-changes.md ── retentive-data.md ──── license-mgmt.md
                                          │
                                          └── firmware-version-mgmt.md

remanufacturing.md ── spare-parts.md ──── remanufacturing.md
                                      │
                                      └── cp1584-hardware-ref.md

access-recovery.md ── documentation-reconstruction.md ── diagnostic-workstation.md

Scenario 15: IO Module LED Patterns — Quick Decode

LED PatternMeaningPrimary DocumentAction
All modules: ‘r’ blinking continuouslyX2X bus communication lostx2x-protocol.md — X2X diagnosticsCheck X2X cable, terminator, CPU RUN state
Single module: ‘e’ blinking, ‘r’ steady greenI/O power supply missing to that moduleio-card-hardware.md — power supply diagnosticsCheck PS module terminal 1-5, verify jumpers
Single module: ‘e’ double flashX2X power overloaded or I/O power too lowio-card-hardware.md — LED decodeCheck total station current, reduce load
‘e’ steady red + green flashInvalid firmware on modulefirmware-version-mgmt.mdUpdate module firmware
PS module: ‘l’ red steadyX2X Link power supply overloadedio-card-hardware.md — power budgetReduce number of modules or add PS
PS module: ‘r’ single flashModule in RESET modeio-card-hardware.mdCheck reset trigger, re-initialize
ACOPOS: Green steadyDrive running normallyacopos-drives.md — LED referenceNone
ACOPOS: Green blinkDrive can’t enableacopos-drives.md — enable diagnosticsCheck X2.6 enable, 3-phase power
ACOPOS: Red steadyActive fault — note codeacopos-drives.md — fault code tablesLook up code, fix cause, reset
ACOPOS: Red/Green alternatingBootloader modeacopos-drives.md — firmware updateDo NOT power off during update
ACOPOS: All LEDs offNo 24V DC control poweracopos-drives.md — power diagnosticsCheck 24V supply, fuse, wiring
CPU: R/E green steadyApplication runningcp1584-hardware-ref.md — CPU LED tablesNone
CPU: R/E red steadyBOOT or SERVICE modecp1584-hardware-ref.md — mode switchCheck mode switch, logbook
CPU: R/E red blink + RDY/F yellow blinkLicense violationlicense-mgmt.md — license checkCheck TG dongle/container
CPU: S/E off/off (POWERLINK)Interface not active or misconfiguredcp1584-hardware-ref.md — PLK statesCheck AS config, cable
CPU: S/E off, red blinkingSystem stop with error codecp1584-hardware-ref.md — stop error codesCount blink pattern (RAM or HW error)
CPU: DC redBackup battery emptyretentive-data.md — battery replacementReplace Renata CR2477N within 1 min

Key Findings

  1. This index is the fastest way to find the right document for any CP1584 problem. Organized by symptom and diagnostic scenario, it maps common problems to the specific research documents that contain the solution procedures.

  2. Start with the LED and error code tables. For any hardware fault, the LED pattern on the CPU, IO modules, or ACOPOS drives points directly to the relevant diagnostic document and the likely root cause.

  3. Most intermittent problems require protocol-level diagnostics. If a problem can’t be reproduced consistently, check the “Intermittent Problems” scenarios for protocol sniffing approaches that capture evidence without disturbing the running system.

  4. Security scenarios are critical for network-connected CP1584 systems. With 20+ unpatchable CVEs on AR 4.x, any CP1584 on a network should be hardened according to cybersecurity-hardening.md.

  5. The first-60-minutes.md playbook covers emergency response. For a machine that just went down with no documentation, start with first-60-minutes.md for the immediate recovery workflow, then use this index for deeper investigation.


Scenario 16: Engineering Workstation Security — AS and PVI Vulnerabilities

ConcernPrimary DocumentSecondary
AS certificate bypass (CVE-2025-11043, SA25P004)cybersecurity-hardening.md §9.4 — AS accepts invalid certs, MitM riskaccess-recovery.md
AS SQLite critical vulns (25 CVEs, CVSS 9.8, SA25P007)cybersecurity-hardening.md §9.4 — code execution via crafted project filesfirmware-version-mgmt.md §11.2
PVI credential logging (CVE-2026-0936, SA26P001)pvi-api.md §16 — credentials in plaintext log filescybersecurity-hardening.md §9.4
Isolating the engineering workstationcybersecurity-hardening.md §7 — VPN + bastion architecturenetwork-architecture.md
PVI log files as credential source for recoverypvi-api.md §16.5 — search workstations for PVI logsaccess-recovery.md

Scenario 17: HMI Panel and OPC-UA Server Security

ConcernPrimary DocumentSecondary
PPT30 OPC-UA DoS (CVE-2025-11482, CVSS v4.0 8.7, SA25P006)opcua.md §13 — permanent OPC-UA crash via resource exhaustioncybersecurity-hardening.md §9.2
OPC-UA anonymous access left enabledopcua.md §13 — hardening checklistaccess-recovery.md
OPC-UA self-signed cert expiredopcua.md §6 — certificate regenerationcybersecurity-hardening.md §5
HMI panel OS version unknownhmi-integration.md — panel identificationspare-parts.md
SDM web interface XSS (CVE-2025-3448, CVE-2025-11498)diagnostics-sdm.md §15 — SDM securitycybersecurity-hardening.md §9.2

Last updated: July 2026 (added Scenario 17: HMI/OPC-UA security; added SA25P006 CVE-2025-11482 and SA2025P003 CVE details to cybersecurity-hardening.md and opcua.md; added CISA republication dates for ICSA-26-125-03 and ICSA-26-141-04)