Digital Thread for Machine Analysis
Building a comprehensive digital representation of PSI machines — from PLC code to physical wiring — enabling AI-assisted troubleshooting, safety auditing, and fleet-wide knowledge management.
Overview
A digital thread connects every data source about a machine into a unified, queryable knowledge base. For PSI machines, this means linking PLC logic, robot programs, electrical schematics, BOM data, HMI definitions, risk assessments, and operational history into a single model that an AI agent (or engineer) can use to diagnose problems, audit safety, and understand machine behavior.
First Applied: Project 2399 — Robotic Shot Peen System for GE Auburn (February 2026)
Why This Matters
| Problem | How Digital Thread Solves It |
|---|---|
| ”The door won’t close” — where do I start? | Trace PLC logic path, identify output, map to wire number, locate physical component |
| Is this machine safe? | Cross-reference PLC interlocks against risk assessment control measures |
| What does the operator see? | Map HMI message numbers to text, link to PLC conditions |
| What’s different about this machine vs. another? | Compare L5X exports, BOM differences, recipe parameters |
| New engineer onboarding | Structured documentation of every subsystem |
Data Architecture
The Seven Layers
Every PSI machine’s digital thread has seven layers, from most accessible to hardest to acquire:
Layer 7: Network/Infrastructure ← How it connects
Layer 6: Operational History ← What's gone wrong before
Layer 5: Process Knowledge ← How it's supposed to behave
Layer 4: HMI/PRIMS ← What the operator sees
Layer 3: Mechanical/BOM ← What physically exists
Layer 2: Electrical ← What's wired to what
Layer 1: Control Logic ← What the code does
| Layer | Coverage Goal | Key Unlock |
|---|---|---|
| 1. Control Logic | PLC + Robot source fully parsed | Fault tracing, logic analysis |
| 2. Electrical | Wire-to-tag mapping, safety circuits | Physical troubleshooting |
| 3. Mechanical/BOM | Full parts hierarchy with specs | Component identification |
| 4. HMI/PRIMS | Screen definitions, PC_Read/Write map | Operator complaint resolution |
| 5. Process Knowledge | Recipes, procedures, specs | ”Is this normal?” questions |
| 6. Operational History | Fault logs, redbooks, service notes | Pattern recognition |
| 7. Network/Infrastructure | Topology, IP addresses, remote access | Connectivity troubleshooting |
Layer 1: Control Logic
What To Collect
| Asset | Format | Source Location | Tool |
|---|---|---|---|
| PLC program | L5X (XML export from Logix Designer) | K:\PROJECT\{proj}\sw\PLC\ | Studio 5000 → Export L5X |
| PLC program (binary) | ACD | Same location | Logix Designer native |
| Robot Karel source | .kl (text) | K:\PROJECT\{proj}\sw\Robot\Karel\ | Direct read |
| Robot TP source | .ls (text listing) | K:\PROJECT\{proj}\sw\Robot\Backups\{date}Backup\ | FANUC backup utility |
| Robot TP compiled | .tp (binary) | Same, or sw\Robot\Setup\LoadFiles\TP\ | FANUC controller |
| Robot system files | .SV, .VR, .IO, .CM | sw\Robot\Backups\RoboGuide Backup\ | RoboGuide or controller backup |
| FANUC I/O mapping | .xlsx | sw\Robot\Setup\{proj}FanucToPLC.xlsx | Controls Engineering |
| PLC I/O definitions | .xlsx | sw\{proj}IO.xlsx | Controls Engineering |
L5X Format — Why It’s Critical
The L5X (Logix Designer XML) export is the single most valuable file for analysis. Unlike the binary ACD, L5X is:
- Fully parseable XML — every rung, tag, UDT, module, and configuration value
- Self-contained — includes I/O module config, IP addresses, data types, all programs
- Diffable — can compare two L5X files to find changes between machines or versions
How to export:
| Method | Tool | Best For |
|---|---|---|
| GUI | Studio 5000 → File → Export → L5X | One-off exports |
| CLI (SDK) | l5xgit acd2l5x --acd input.ACD --l5x output.L5X | Batch conversion (recommended) |
| CLI (GUI shim) | acd_to_l5x.ps1 -ProjectNumbers 2399,2386 | Batch conversion (legacy) |
| Python (no Studio) | acd_analyzer.py (direct ACD extraction) | When Studio 5000 unavailable |
The l5xgit tool is from RockwellAutomation/ra-logix-designer-vcs-custom-tools and uses the official Logix Designer SDK. See L5X Tools for full documentation of the conversion toolchain.
Analysis Methodology
For a CompactLogix/ControlLogix L5X file, extract:
- Controller configuration — processor model, firmware, security code, task setup
- I/O module inventory — slot-by-slot with catalog numbers, RPI, connection types
- Ethernet I/O devices — IP addresses, data sizes (this identifies robots, VFDs, remote I/O)
- UDT definitions — the data model (PSI standard: CC1, FANUC_Robot, WD, DH, MC, FLT, SP, PP_Single, Prims, etc.)
- Program/routine structure — execution order, rung counts, JSR calls
- Complete I/O mapping — which physical input/output drives which tag
- Fault catalog — every condition that sets a hold, inhibit, or abort fault
- Safety interlocks — E-stop chain, blast permissive chain, door interlocks
- Communication setup — MSG instructions, EtherNet/IP implicit connections
PSI Standard PLC Architecture
PSI machines share a common PLC architecture pattern. Understanding one machine transfers to the fleet:
| Pattern | Description |
|---|---|
| MainProgram_Blast | Primary program with all operational routines |
| Fault_handler | Separate program, MajorFaultProgram assignment |
| MainRoutine | I/O mapping + JSR dispatch to all subroutines |
| PC_Read / PC_Write | PRIMS communication via shared integer arrays (typically [100] each) |
| CC1 UDT | Cycle Control — mode bits, cycle steps, recipe handshake |
| FANUC_Robot UDT | Robot interface — status, commands, heartbeat, collision guard, DCS |
| FLT UDT | Fault management — hold/inhibit/abort aggregation |
| 3-tier fault system | Abort (immediate stop) → Hold (coordinated interrupt) → Inhibit (prevent new cycle) |
| CC.Neveron | Permanently FALSE bit used to disable code paths (dead code marker) |
| PRIMS watchdog | Comm failure detection via stale watchdog counter |
FANUC Robot Integration Pattern
PSI FANUC robot cells use three communication layers simultaneously:
| Layer | Mechanism | RPI/Rate | Purpose |
|---|---|---|---|
| EtherNet/IP Implicit | I/O assembly, generic module | 10ms typical | Real-time discrete I/O + integer data |
| CIP Explicit Messaging | MSG instructions | Periodic | Position register read/write, string registers |
| PRIMS/CITS | Higher-level via PLC relay | Application | Recipe management, program selection, data recording |
Critical: FANUC UOP (User Operator Panel) Signals
The EtherNet/IP I/O mapping includes FANUC UOP safety input signals. These hardware-level signals should be driven by PLC safety conditions, not permanently forced ON:
| UOP Signal | Function | Should Be Driven By |
|---|---|---|
| UI 1 - IMSTP | Immediate Stop | E-Stop / CycleAbortFlt |
| UI 2 - HOLD | Hold | Cycle Hold conditions |
| UI 3 - SFSPD | Safety Speed (250mm/s limit) | Door open / T1 mode equivalent |
| UI 6 - START | Cycle Start | Cycle start sequence |
| UI 8 - ENBL | External Enable | CC.NotEstop (minimum) |
The {proj}FanucToPLC.xlsx spreadsheet in sw\Robot\Setup\ maps every bit between the PLC generic Ethernet module and the FANUC robot I/O. This is essential for identifying which PLC output bits correspond to which UOP signals.
Layer 2: Electrical — “What’s Wired to What”
What To Collect
| Asset | Format | Source Location | Notes |
|---|---|---|---|
| Electrical schematics | DWG/PDF | X:\ drive, by drawing part number | Part number linked via BOM |
| Panel layout drawings | DWG/PDF | X:\ drive, by part number | Same BOM linkage |
| Wire number list | .xls | K:\PROJECT\{proj}\tags\{proj}Wir.xls | Maps wire numbers to terminals |
| Component tag list (control) | .xls | K:\PROJECT\{proj}\tags\{proj}cpt.xls | Control panel component IDs |
| Component tag list (machine) | .xls | K:\PROJECT\{proj}\tags\{proj}mch.xls | Machine-side component IDs |
| Terminal block assignments | .xls | K:\PROJECT\{proj}\tags\{proj}TBS_TM{n}.xls | Wire-to-terminal mapping |
| Tag engravings | .xls | K:\PROJECT\{proj}\tags\{proj}_TAG.xls | Physical label text |
Tag File Conventions
PSI uses a consistent naming convention for component tags in the tags/ folder:
{proj}cpt.xls— Control panel components (fuse blocksFB, contactorsCR, switchesSW, etc.){proj}mch.xls— Machine components (solenoidsSOL, proximity switchesPRS, pressure switchesPS, motorsMTR, etc.){proj}Wir.xls— Wire numbers (1,000+ entries mapping every wire in the machine){proj}TBS_TM{n}.xls— Terminal blockTM{n}wire assignments{proj}_TAG.xls— Engraving text for physical tags/labels
Electrical → PLC Bridge
The critical connection is: PLC tag → I/O slot.bit → wire number → terminal → physical device
Example chain:
PLC Tag: WD.CloseSol
→ Output: Local:5:O.Data.9 (Slot 5, Bit 9)
→ Wire: (from {proj}Wir.xls)
→ Terminal: (from {proj}TBS_TM5.xls)
→ Device: (from {proj}mch.xls, e.g., 2160SOL)
→ Drawing: (from BOM/X:\ drive, by part number)
Drawing Access
Electrical schematics and layouts are stored on the X:\ drive in two locations:
X:\DWGFiles\{partNumber}.DWG— Individual drawing files by part numberX:\Controls\{proj}\{proj}.wdp— AutoCAD Electrical project file (drawing index)
The .wdp file is a text-readable project index that lists every drawing in the electrical package with part number and description. This is the fastest way to inventory the complete electrical drawing set for a machine.
How to find drawings for a project:
- Open
X:\Controls\{proj}\{proj}.wdp— text file listing all drawings - Or query PSI Explorer:
GET /api/bom/dev/job/{proj}→ find Controls Assembly → Electrical Drawing Index - Individual DWG files are at
X:\DWGFiles\{partNumber}.DWG - AutoCAD Electrical symbol libraries:
X:\Controls\Support\Libs\PTI_JIC\(JIC standard) andPTI_pneu_iso\(pneumatic ISO)
Note: DWG files are AutoCAD binary and not directly parseable by AI agents. For analysis, export to PDF using AutoCAD batch plot or accoreconsole.exe.
Standard Electrical Drawing Set
PSI Controls Assembly drawings follow a consistent numbering pattern. For a project with Controls Assembly part number {base} (e.g., 359803 for Project 2399), the drawing set is:
Layouts (typically {base+97} to {base+114}):
| Offset | Description | Content |
|---|---|---|
| +97 | Electrical Drawing Index | Master index of all drawings |
| +98 | Electrical Layout - Floor | Floor plan with device locations |
| +99 | Electrical Layout - Cabinet | Blast cabinet electrical layout |
| +100 | Electrical Layout - Blast | Blast system electrical layout |
| +101 | Electrical Layout - Robot | Robot cell electrical layout |
| +102 | Electrical Layout - Spindle | Spindle system layout |
| +103 | Electrical Layout - Reclaim | Reclaim system layout |
| +104 | Control Enclosure Layout & BOM | Panel enclosure with component list |
| +105 | Control Panel Layout & BOM | Control panel with component list |
| +106 | Terminal Strip Layout | Terminal block assignments |
| +107 | PLC Layout And BOM | PLC rack with module list |
| +108 | Control Station Layout And BOM | Operator station layout |
| +109 | Computer And Accessories Layout | PRIMS computer and networking |
| +110 | Work Door Control Station Layout | Door control station |
Schematics (typically {base+113} to {base+136}):
| Offset | Description | Safety Relevance |
|---|---|---|
| +113 | 460 VAC Power Distribution | Main power |
| +114 | 120 VAC Power Distribution | Control power |
| +115 | Air Conditioner & Receptacle | Support |
| +116 | 24 VDC Power Supply | Sensor power |
| +117 | Emergency Stop String | E-stop circuit architecture — validates single/dual channel |
| +118 | 24VDC Control Schematic | Control relay logic |
| +119 | Light Curtain Schematic | LC wiring and safety relay |
| +120 | Media Flow Sensor | Flow detection wiring |
| +121 | Spindle Speed Feedback | Speed sensor wiring |
| +123 | Dust House & Sweco | Motor circuits |
| +124 | Pressure Pot Solenoid Manifold | Solenoid valve wiring |
| +125 | FANUC Robot Interface (pg 1) | Robot I/O, UOP signal wiring |
| +126 | FANUC Robot Interface (pg 2) | Robot I/O continued |
| +128 | PLC Schematic | PLC power and comm |
| +129-136 | Rack 1 Slot 1-8 I/O Module Schematics | Every PLC I/O point → wire number → device |
Pneumatic Schematics (typically {base+167} to {base+176}):
| Offset | Description |
|---|---|
| +167 | Pneumatic Drawing Index |
| +168 | Pneumatic Layout - Floor |
| +169-176 | Pneumatic Schematics (valve manifolds, regulators, piping) |
Priority Drawings for Safety Analysis
When auditing a machine, these schematics are most critical:
- E-Stop String — Reveals safety relay model, number of channels, monitoring circuit, reset logic
- FANUC Robot Interface — Shows UOP signal wiring, EtherNet/IP connection, pendant interface
- PLC I/O Module Schematics (Slot 1-8) — Maps every PLC tag to a wire number and physical device
- Light Curtain Schematic — Shows LC controller model, muting configuration, safety relay integration
Layer 3: Mechanical / BOM — “What Physically Exists”
What To Collect
| Asset | Format | Source | Tool |
|---|---|---|---|
| Full BOM hierarchy | JSON | UniData API | GET /api/bom/dev/job/{proj} |
| Part details | JSON | UniData API | GET /api/parts/dev/{partNumber} |
| Mechanical drawings | DWG/PDF | X:\ drive, by part number | SolidWorks PDM |
| SolidWorks models | SLDPRT/SLDASM | X:\ drive | SolidWorks |
| Vendor manuals | K:\PROJECT\{proj}\man\pdfman\pdfdocs\vm\ | Direct access | |
| Software manuals | K:\PROJECT\{proj}\man\pdfman\pdfdocs\sw\ | Direct access |
BOM API Usage
The PSI Explorer API provides the complete parts hierarchy:
GET /api/bom/dev/job/2399
Response fields per BOM item:
| Field | Description |
|---|---|
partNumber | Part identifier |
description | Part description |
level | Depth in hierarchy (0=root) |
wbsNumber | Work Breakdown Structure position |
gtCode | PU=Purchased, FA=Fabricated, MO=Manufactured, AS=Assembly |
drawingNumber | Links to X:\ drive drawings |
quantity | Required qty |
mfgLeadTime / purchaseLeadTime | Lead times (days) |
onHand / onOrder / available | Inventory status |
hasChildren | Has sub-components |
Spare Parts
Spare part classification is a metadata property on part numbers. The API’s part details endpoint includes inventory and lead time data. Additional vendor manuals and spare parts lists are in K:\PROJECT\{proj}\man\.
Layer 4: HMI/PRIMS — “What the Operator Sees”
What To Collect
| Asset | Format | Source | Notes |
|---|---|---|---|
| PC_Read/Write mapping | .xlsx | K:\PROJECT\{proj}\sw\{proj}IO.xlsx | Critical — defines every HMI data point |
| Operator messages | Same file, “OperatorMessages” sheet | Same | Message number → display text |
| PRIMS source code | VB.NET | C:\git\trunk | 240K LOC, 30 projects |
| PRIMS comm driver (AB PAC) | VB.NET | trunk\Comm\Pti.Prims.Comm.AbPac\ | Allen-Bradley EtherNet/IP driver |
PC_Read / PC_Write Data Dictionary
The {proj}IO.xlsx file is the Rosetta Stone between HMI and PLC. It has two sheets:
IO Sheet — Maps every bit and word:
PC_Write[n].bit— PLC → PRIMS (status, fault flags, measurements)PC_Read[n].bit— PRIMS → PLC (commands, setpoints, recipe data)PLCIO[n]— Raw I/O slot values exposed to PRIMS
OperatorMessages Sheet — Maps message number → display text:
| # | Message |
|---|---|
| 0 | No Message To Display |
| 1 | Ready For Cycle |
| 2 | Not In Auto |
| 4 | Machine In Cycle |
| 6 | Machine in Cycle Hold |
| 10 | Fault Active |
| 11 | System in Emergency Stop |
| 14 | Control Power Off |
| 18 | Preventive Maintenance Required |
The PLC’s Messages routine selects which message number to write to PC_Write[19] based on priority logic.
PRIMS Architecture
PRIMS (Progressive Realtime Industrial Monitoring System) is an 18-year-old VB.NET WinForms/WPF application:
| Component | Location | Description |
|---|---|---|
| Comm layer | trunk\Comm\ | 11 vendor-specific drivers (AB PAC, FANUC, Siemens, ABB, etc.) |
| Logic layer | trunk\Logic\ | Config, Operation, Data, Security (9 projects) |
| UI layer | trunk\Prims\ | 70+ forms, 17 user controls (7 projects) |
| Database | trunk\Data\ | 728 stored procedures, SQL Server |
The AB PAC comm driver (Pti.Prims.Comm.AbPac) uses INGEAR.NET v5 to read/write PC_Read[] and PC_Write[] arrays via EtherNet/IP.
Note: A comprehensive PRIMS code assessment exists at C:\git\trunk\assessment\ covering security (20 findings), code quality, architecture, database, safety/reliability, and modernization roadmap.
Layer 5: Process Knowledge — “How It’s Supposed to Behave”
What To Collect
| Asset | Format | Source |
|---|---|---|
| Process records | .xls | K:\PROJECT\{proj}\data\process\ |
| LDS (lifecycle data) | .xlsm | K:\PROJECT\{proj}\lds\{proj}lds.xlsm |
| Customer specifications | Various | K:\PROJECT\{proj}\rfq\ and K:\PROJECT\{proj}\corr\ |
| Operating procedures | Various | K:\PROJECT\{proj}\man\ |
| Recipe examples | PRIMS database | Requires PRIMS DB access |
| Robot teach points | .VR (POSREG.VR) | sw\Robot\Backups\RoboGuide Backup\POSREG.VR |
Key Process Parameters (Shot Peen Systems)
For shot peen machines, normal operation involves these measurable parameters:
| Parameter | PLC Tag Pattern | PRIMS Field | Units |
|---|---|---|---|
| Blast pressure | AirPress_ACT / AirPress_SP | PC_Write[21] / PC_Read[11] | PSI (scaled) |
| Spindle speed | C_Axis_Feedrate_Act / _SP | PC_Write[24] / PC_Write[33] | RPM (scaled) |
| Robot TCP speed | RobotTCPSpeed | PC_Write[18] | mm/s |
| Surface number | Surface_Number | PC_Write[20] | 1-16 |
| Robot position | X/Y/Z_PositionACT | PC_Write[44-46] | mm |
Each parameter has 4-level alarm limits: LSD (Low Shutdown) < LAL (Low Alarm) < HAL (High Alarm) < HSD (High Shutdown).
Layer 6: Operational History — “What’s Gone Wrong Before”
What To Collect
| Asset | Format | Source | Tool |
|---|---|---|---|
| Redbook entries | Database | Redbook Web | Search by project number |
| CSM records | PDF/photos | K:\PROJECT\{proj}\csm\ | Direct access |
| CSS trip logs | Custom format (.war, .pl) | K:\PROJECT\{proj}\css\ | WordPerfect-based |
| Field service photos | JPG | K:\PROJECT\{proj}\photos\ | Direct access |
| Software change history | ACD backups | K:\PROJECT\{proj}\sw\PLC\ | Compare L5X exports |
| Reference projects | ACD files | K:\PROJECT\{proj}\sw\PLC\Ref\ | Related machine programs |
K:\ Drive Project Folder Structure
Every project follows this standard folder layout on the K:\ drive:
K:\PROJECT\{proj}\
├── chg/ Change orders
├── corr/ Correspondence (customer, internal)
├── csm/ Commissioning records (CS{proj}-{n}/)
├── css/ Customer Support Services (punch lists, warranties, trip logs)
├── data/ Process data
│ ├── laser/ Laser measurement data
│ ├── machine/ Machine performance data
│ └── process/ Process records (Almen, saturation, pressure)
├── expense/ Expense reports
├── lds/ Lifecycle Data Sheets
├── macros/ Custom macros
├── man/ Manuals
│ └── pdfman/pdfdocs/
│ ├── sw/ Software manuals
│ └── vm/ Vendor manuals
├── meetings/ Meeting notes
├── misc/ Miscellaneous (photos, handoff notes, tooling envelopes, release forms)
├── photos/ Machine photos
├── rac/ Risk Assessment Committee
├── rfq/ Request for Quote / customer specs
├── safety/ Risk assessments (HRN + ISO 13849-1 PLr)
├── schedule/ Project schedule
├── shp/ Shipping
├── sw/ Software
│ ├── PLC/ PLC programs (ACD, L5X) + Ref/ folder with related projects
│ └── Robot/ Robot programs
│ ├── Backups/ Controller backups (dated + RoboGuide)
│ ├── Karel/ Karel source (.kl) + compiled (.pc)
│ ├── Setup/ I/O mapping xlsx, startup docs, load files
│ └── System Software/ FANUC system software
├── tags/ Electrical tag data (wire lists, component lists, terminal blocks)
└── tp/ Test procedures
File Format Notes
Many files on the K:\ drive use custom extensions that are actually WordPerfect format:
.sw— Software handoff notes (WordPerfect).lbl— Label definitions (WordPerfect).cvr— Manual covers (WordPerfect).vm/.vm1— Vendor manual indices (WordPerfect).war— Warranty records (WordPerfect).pl— Punch lists (WordPerfect).o/.o1— Order documents (WordPerfect).doc— Older MS Word binary format (not always readable by modern tools)
For AI agent access, .xlsx, .xls, .pdf, and .txt files are directly readable. WordPerfect and .doc files require conversion.
Layer 7: Network / Infrastructure
What To Collect
| Asset | Source | Notes |
|---|---|---|
| PLC IP address | L5X file (Ethernet module config) | Usually 192.168.x.x |
| Robot IP address | L5X file (generic Ethernet module) | Usually same subnet as PLC |
| PRIMS server | Site-specific | Runs CITS/PRIMS application |
| Network switches | Site documentation | OT network typically isolated |
| Remote access | Site-specific | VPN, cellular modem, or none |
Safety Analysis Framework
Risk Assessment Cross-Reference
PSI provides a formal risk assessment for each machine at K:\PROJECT\{proj}\safety\. These use the Hazard Rating Number (HRN) method and include ISO 13849-1 Performance Level required (PLr) ratings.
The risk assessment contains:
- Header — Customer, location, machine description, date, assessor
- Risk Assess - General — General machine hazards (power-up, E-stop, jogging, teaching, production, maintenance)
- Risk Assess - SP (Shot Peen specific) — Blasting hazards, media exposure, dust explosion
- Control Measures — Numbered list of 70+ safety measures (barriers, interlocks, training, procedures)
- Energy Sources — 6 types: pneumatic, electrical, kinetic, potential, explosive, thermal
PLC Safety Audit Checklist
When analyzing a PSI machine’s PLC code, verify these against the risk assessment control measures:
| Check | What to Verify | Risk Assessment Reference |
|---|---|---|
| E-stop chain | How many channels? Safety relay feedback? | PLr rating (typically d for robot cells) |
| Door interlock | Sensor redundancy, shot pin, bypass conditions | Control measures re: door closed for auto |
| Light curtain | Independent guard or conditional? Muting? | Control measures re: LC clear for motion |
| Blast permissive | How many conditions in the chain? | Control measures re: doors closed for blast |
| Robot UOP signals | IMSTP, SFSPD, ENBL — conditional or bypassed? | Control measure #8 (velocity limited) |
| Test mode | Physical key switch or software-only? | Who can activate, what does it bypass? |
| Fault auto-reset | Which faults auto-clear? Logging? | Recurring fault investigation |
| Major fault handler | Halt or continue? Output safe state? | Controller behavior on watchdog/I/O failure |
| Controller security | Security code, source protection | Network access implications |
Troubleshooting Knowledge Base Structure
Recommended File Organization
For each machine analyzed, create a structured knowledge base:
{project}/
├── Analysis_Report_{proj}.md Full analysis report
├── Analysis_Report_{proj}.docx Word document version
├── Analysis_Summary_{proj}.pptx PowerPoint summary
├── io_map.md Physical I/O with wire references
├── fault_guide.md Fault-by-fault troubleshooting
├── pc_readwrite_map.md PRIMS data dictionary
├── operator_messages.md Message number → text mapping
└── safety_findings.md Cross-referenced with risk assessment
Fault Troubleshooting Template
For each of the 54+ fault conditions, document:
## Fault: {Name} ({Tag})
- **Severity**: Abort / Hold / Inhibit
- **Trigger**: {PLC logic condition}
- **Routine**: {Source routine and rung number}
- **Operator Message**: {Message number and text}
- **Physical Cause**:
- {Sensor failure → wire number, terminal, component tag}
- {Actuator failure → solenoid/motor part number}
- {Wiring issue → wire number from Wir.xls}
- **Troubleshooting Steps**:
1. Check {physical condition}
2. Verify {PLC input/output state}
3. Measure {electrical test point}
- **Common Root Causes**: {From redbook history}
Data Source Summary
By PSI System
| System | What It Provides | Access Method |
|---|---|---|
K:\ Drive (K:\PROJECT\{proj}\) | Project files, manuals, software, tags, safety, data | Direct file access |
| X:\ Drive | Engineering drawings (electrical, mechanical) by part number | Direct file access via BOM part number |
| UniData API | BOM hierarchy, part details, inventory, lead times | REST API: api.progressivesurface.com |
| PSI Explorer | Visual BOM navigation | Web UI: explorer.progressivesurface.com |
| Redbook Web | Quality issues, root causes, field escapes | Web UI: redbook.progressivesurface.com |
| Project Explorer | Project metadata, dates, customer info | Web UI: projects.progressivesurface.com |
PRIMS Source (C:\git\trunk) | HMI/SCADA source code, comm drivers, database schema | Git repository |
| SolidWorks PDM | Mechanical drawings, 3D models | PDM client or X:\ drive |
By File Type and Readability
| Format | Readable by AI? | Tool Required |
|---|---|---|
| .L5X | Yes (XML) | Direct parse |
| .xlsx / .xls | Yes | Node.js xlsx package |
| .xlsm | Yes (data only, no macros) | Node.js xlsx package |
| Yes | PDF reader | |
| .kl (Karel) | Yes (text) | Direct read |
| .ls (TP listing) | Yes (text) | Direct read |
| .md / .txt | Yes | Direct read |
| .ACD | No (binary) | Requires Studio 5000 → export to L5X |
| .tp (compiled TP) | No (binary) | Requires FANUC controller or RoboGuide |
| .doc (Word binary) | No | Requires Word or LibreOffice conversion |
| .DWG (AutoCAD) | No (binary) | Requires AutoCAD viewer; use PDF versions |
| WordPerfect (.sw, .lbl, .cvr, etc.) | No | Requires WordPerfect or conversion tool |
| .SV, .VR, .IO (FANUC) | Partially (some text) | FANUC backup utilities |
| .SLDPRT/.SLDASM | No (binary) | Requires SolidWorks |
Implementation Roadmap
Phase 1: Static Model (Achievable Now — ~60-70% troubleshooting capability)
| Step | Source | Action | Unlocks |
|---|---|---|---|
| 1 | L5X export | Parse full PLC program | Logic tracing, fault catalog |
| 2 | Robot Karel/TP source | Read all source files | Robot behavior, handshakes |
| 3 | {proj}FanucToPLC.xlsx | Map robot ↔ PLC I/O | UOP signal identification |
| 4 | {proj}IO.xlsx | Extract PC_Read/Write map + messages | HMI data dictionary |
| 5 | safety/risk assessment | Extract hazard scenarios + control measures | Safety cross-reference |
| 6 | tags/*.xls | Extract wire numbers, components, terminal blocks | Physical device mapping |
| 7 | BOM API | Pull full parts hierarchy | Component identification |
| 8 | Electrical PDFs | Cross-reference I/O to wire numbers | Complete troubleshooting chain |
Phase 2: Knowledge Base (Structured for Retrieval)
- Build per-fault troubleshooting guides linking PLC logic → wire → component → drawing
- Create symptom-to-cause decision trees
- Index against redbook history for known failure modes
- Document “normal” parameter ranges from process records and recipes
Phase 2.5: Fleet-Wide ACD → L5X Conversion
Bulk convert all Allen-Bradley ACD files to L5X using l5xgit acd2l5x (Rockwell’s official SDK). This unlocks instant PLC analysis for the entire fleet without requiring Studio 5000 at query time.
- Build
l5xgiton a controls workstation with Studio 5000 + Logix Designer SDK - Scan
K:\PROJECT\*\sw\PLC\for all ACD files (~9,293 files across ~467 projects) - Run
l5xgit acd2l5xon each primary ACD file - Store L5X alongside the ACD on K: drive
- Run
l5x_parser.jsto pre-generate analysis JSON for the MCP server
See L5X Tools — Fleet Conversion Plan for details.
Phase 3: Fleet Analysis
- Use
l5xplode explodeto decompose L5X files into git-friendly directory structures - Diff PLC programs to identify machine-specific customizations vs. standard code
- Apply safety findings fleet-wide (e.g., UOP bypass pattern may exist on all FANUC cells)
- Build a cross-project component commonality database
Phase 4: Live Digital Twin (Aspirational)
- OPC-UA or MQTT gateway on PLC network for real-time tag values
- Data historian for trend capture (pressure, speed, fault events)
- Real-time query capability: “What is the current blast pressure?” vs. “What should it be?”
- Predictive maintenance from fault pattern analysis
Lessons Learned (Project 2399)
What Worked Well
- L5X export was the single best decision — enabled complete code-level analysis of all 503 rungs
- Parallel agent analysis — launching L5X structure, ladder logic, and robot analysis simultaneously saved significant time
{proj}IO.xlsxwas the Rosetta Stone — unlocked the entire PRIMS ↔ PLC data dictionary in one file{proj}FanucToPLC.xlsxconfirmed the most critical safety finding (UOP bypass) that was ambiguous from PLC code alone- Risk assessment provided the ISO 13849-1 PLr ratings that validated our safety findings
What Was Difficult
- Python unavailable on the analysis workstation (Windows Store stubs only) — used Node.js with
xlsxnpm package instead - WordPerfect files (.sw, .lbl, .doc) not readable by modern tools — significant documentation locked in legacy formats
- Agent permission issues — subagents couldn’t access certain directories; direct main-session access worked
- Binary formats (.ACD, .tp, .DWG) require vendor-specific tools; always prefer text/XML/PDF exports
- PRIMS source is 240K LOC VB.NET with no tests or CI — understanding specific machine configuration requires database access, not just source code
Key Findings That Transfer to Fleet
| Finding | Fleet Impact |
|---|---|
| FANUC UOP signals permanently bypassed | Check ALL FANUC cells for same pattern |
| Controller Security Code = 0 | Likely all machines — fleet-wide review |
| Major fault handler doesn’t halt | Standard template — affects all machines using this pattern |
| Test mode via software only (no key switch) | Check HMI configuration across fleet |
| Auto fault reset without logging | Standard pattern — consider fleet-wide logging |
| Single-channel E-stop in PLC | Verify external safety relay architecture on each machine |
Related Pages
- PSI Explorer — Part hierarchy and drawing lookup
- UniData API — REST API for BOM and part data
- Redbook Web — Quality issue tracking
- Engineering Process — Controls Engineering (Dept 111)
- Terminology — PSI-specific terms
- PSI.All Architecture — UniData subroutine catalog
- Machine Intelligence MCP Server — AI agent access to all machine data (37 tools)
- Ask the Fleet — Web chat interface powered by MCP tools (any PSI employee, zero setup)
- Agentic Implementation — AI-assisted development methodology
- Claude Code — Claude Code integration and skills
First compiled: February 2026, from Project 2399 (GE Auburn Robotic Shot Peen System) analysis. Methodology applicable to all PSI CompactLogix/ControlLogix + FANUC robot cells.