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
- Overview
- Architecture
- mapp View Deep Dive
- Data Exchange: OPC UA FX
- Legacy Protocols: POWER WORX & VNC
- Alarm Handling: mapp AlarmX
- Diagnosing HMI Issues on an Undocumented Machine
- Recovering the HMI Project Without OEM Files
- Panel Replacement Procedure (CP1584 Context)
- Multi-Client / Multi-User Setup
- Practical Code Examples
- Key Findings
- 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:
| Extension | Purpose |
|---|---|
.page | Defines a screen/page with widgets and layout |
.widget | Reusable UI component definition |
.frame | Container for grouping widgets with layout rules |
.data | Data bindings — maps HMI variables to PLC variables |
.config | Configuration files (roles, clients, display settings) |
.css | Custom 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:
- Layout — position, size, anchoring
- Style — colors, fonts, borders
- Data — variable bindings (the OPC UA FX links)
- 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:
| Layer | Contains | Modified when |
|---|---|---|
| Content | Text strings, image paths, variable bindings | Translating UI, changing I/O mapping |
| Layout | Page structure, widget positions, widget types | Redesigning screens, adding/removing widgets |
| Logic | HMI-side JavaScript actions, visibility rules | Changing interactive behavior |
This separation is critical for undocumented machines because:
- You can change variable bindings in the
.datafile 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:
- PLC declares global variables (in IEC code or mapp component FBK instances).
- The
.datafile maps those PLC variables to symbolic names in the FX namespace. - 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
POWERWORXorPVI(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
VncSrvin 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
AlarmListwidget
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:
| File | What it tells you |
|---|---|
mappViewData.data | Every variable binding between HMI and PLC |
Roles.config | User roles and access permissions |
Clients.config | Connected display clients and their properties |
*.page files | What 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
| Item | Reason | Workaround |
|---|---|---|
| PLC source code (ST/SFC/CFC text) | Only compiled object code is on the controller | Use decompiler (limited) or rewrite from observed behavior |
| Comments in PLC code | Stripped during compilation | Document from reverse-engineering the logic |
| Original variable names (if optimized away) | Compiler may rename variables | Use runtime names from OPC UA namespace |
| Password-protected mapp View configs | Encryption on the controller | Need 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:
- 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)
- A B&R Panel PC connected to the CP1584 via Ethernet, running mapp View in a fullscreen browser
- 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, ornetstatcommands. The correct approaches for checking mapp View status on a CP1584:
Via SDM (System Diagnostics Manager):
- Open a web browser to
http://<CP1584_IP>/SDM - Navigate to the Overview tab — check web server status
- Navigate to the Task Monitor tab — look for the HTTP/WebServer task
- Navigate to the Logger tab — check for web server errors
Via Automation Studio:
- Connect to the controller via Online > Login
- Open Diagnostics > Task Monitor — check HTTP server task status and cycle times
- Open Diagnostics > System Diagnostics Manager (SDM) > Diagnostics > Software Modules
Via OPC UA:
- Connect an OPC UA client to
opc.tcp://<CP1584_IP>:4840 - 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) andF:\(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
-
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.
-
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.
-
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
.databinding file indirection. -
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.
-
The
.datafile 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. -
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.
-
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.
-
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.
-
Alarm handling is fully integrated — mapp AlarmX exposes active alarms, history, and acknowledgment status through the OPC UA FX namespace. The
AlarmListwidget on the HMI subscribes to this data automatically. -
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 Document | Content | Relevance |
|---|---|---|
| firmware.md | B&R firmware versions, update procedures, compatibility | mapp View features vary by firmware version; some features require minimum firmware levels |
| opcua.md | OPC UA server configuration, security setup, namespace browsing | mapp View data exchange is entirely OPC UA FX-based; understanding OPC UA is essential for HMI diagnostics |
| execution-model.md | PLC task configuration, cycle times, program execution order | HMI responsiveness depends on PLC cycle time and task priorities; stale HMI values may indicate PLC execution issues |
| alarm-logging.md | Alarm history analysis, log file formats, recovery | mapp AlarmX logs are written to the controller filesystem; alarm logging details complement the HMI alarm display |
| ftp-web-interface.md | FTP access, web server configuration, file download | FTP is the primary method for extracting mapp View files from the CP1584 without Automation Studio |
| pvi-api.md | PVI middleware, variable access, programmatic connections | PVI is the underlying communication layer for POWER WORX legacy HMI connections |
| diagnostics-sdm.md | System Diagnostics Manager, web-based diagnostics | SDM provides web server status, task monitoring, and system health for diagnosing HMI service issues |
| access-recovery.md | Password recovery, credential discovery | Default credentials for FTP/web/SDM access when OEM passwords are unknown |
| python-diagnostics.md | Python scripts for PLC communication | Python OPC UA clients for programmatic HMI data extraction and testing |
| network-architecture.md | Network topology, device discovery, VLAN segmentation | HMI 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.