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

ProblemHow 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 onboardingStructured 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
LayerCoverage GoalKey Unlock
1. Control LogicPLC + Robot source fully parsedFault tracing, logic analysis
2. ElectricalWire-to-tag mapping, safety circuitsPhysical troubleshooting
3. Mechanical/BOMFull parts hierarchy with specsComponent identification
4. HMI/PRIMSScreen definitions, PC_Read/Write mapOperator complaint resolution
5. Process KnowledgeRecipes, procedures, specs”Is this normal?” questions
6. Operational HistoryFault logs, redbooks, service notesPattern recognition
7. Network/InfrastructureTopology, IP addresses, remote accessConnectivity troubleshooting

Layer 1: Control Logic

What To Collect

AssetFormatSource LocationTool
PLC programL5X (XML export from Logix Designer)K:\PROJECT\{proj}\sw\PLC\Studio 5000 → Export L5X
PLC program (binary)ACDSame locationLogix 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, .CMsw\Robot\Backups\RoboGuide Backup\RoboGuide or controller backup
FANUC I/O mapping.xlsxsw\Robot\Setup\{proj}FanucToPLC.xlsxControls Engineering
PLC I/O definitions.xlsxsw\{proj}IO.xlsxControls 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:

MethodToolBest For
GUIStudio 5000 → File → Export → L5XOne-off exports
CLI (SDK)l5xgit acd2l5x --acd input.ACD --l5x output.L5XBatch conversion (recommended)
CLI (GUI shim)acd_to_l5x.ps1 -ProjectNumbers 2399,2386Batch 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:

  1. Controller configuration — processor model, firmware, security code, task setup
  2. I/O module inventory — slot-by-slot with catalog numbers, RPI, connection types
  3. Ethernet I/O devices — IP addresses, data sizes (this identifies robots, VFDs, remote I/O)
  4. UDT definitions — the data model (PSI standard: CC1, FANUC_Robot, WD, DH, MC, FLT, SP, PP_Single, Prims, etc.)
  5. Program/routine structure — execution order, rung counts, JSR calls
  6. Complete I/O mapping — which physical input/output drives which tag
  7. Fault catalog — every condition that sets a hold, inhibit, or abort fault
  8. Safety interlocks — E-stop chain, blast permissive chain, door interlocks
  9. 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:

PatternDescription
MainProgram_BlastPrimary program with all operational routines
Fault_handlerSeparate program, MajorFaultProgram assignment
MainRoutineI/O mapping + JSR dispatch to all subroutines
PC_Read / PC_WritePRIMS communication via shared integer arrays (typically [100] each)
CC1 UDTCycle Control — mode bits, cycle steps, recipe handshake
FANUC_Robot UDTRobot interface — status, commands, heartbeat, collision guard, DCS
FLT UDTFault management — hold/inhibit/abort aggregation
3-tier fault systemAbort (immediate stop) → Hold (coordinated interrupt) → Inhibit (prevent new cycle)
CC.NeveronPermanently FALSE bit used to disable code paths (dead code marker)
PRIMS watchdogComm failure detection via stale watchdog counter

FANUC Robot Integration Pattern

PSI FANUC robot cells use three communication layers simultaneously:

LayerMechanismRPI/RatePurpose
EtherNet/IP ImplicitI/O assembly, generic module10ms typicalReal-time discrete I/O + integer data
CIP Explicit MessagingMSG instructionsPeriodicPosition register read/write, string registers
PRIMS/CITSHigher-level via PLC relayApplicationRecipe 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 SignalFunctionShould Be Driven By
UI 1 - IMSTPImmediate StopE-Stop / CycleAbortFlt
UI 2 - HOLDHoldCycle Hold conditions
UI 3 - SFSPDSafety Speed (250mm/s limit)Door open / T1 mode equivalent
UI 6 - STARTCycle StartCycle start sequence
UI 8 - ENBLExternal EnableCC.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

AssetFormatSource LocationNotes
Electrical schematicsDWG/PDFX:\ drive, by drawing part numberPart number linked via BOM
Panel layout drawingsDWG/PDFX:\ drive, by part numberSame BOM linkage
Wire number list.xlsK:\PROJECT\{proj}\tags\{proj}Wir.xlsMaps wire numbers to terminals
Component tag list (control).xlsK:\PROJECT\{proj}\tags\{proj}cpt.xlsControl panel component IDs
Component tag list (machine).xlsK:\PROJECT\{proj}\tags\{proj}mch.xlsMachine-side component IDs
Terminal block assignments.xlsK:\PROJECT\{proj}\tags\{proj}TBS_TM{n}.xlsWire-to-terminal mapping
Tag engravings.xlsK:\PROJECT\{proj}\tags\{proj}_TAG.xlsPhysical 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 blocks FB, contactors CR, switches SW, etc.)
  • {proj}mch.xls — Machine components (solenoids SOL, proximity switches PRS, pressure switches PS, motors MTR, etc.)
  • {proj}Wir.xls — Wire numbers (1,000+ entries mapping every wire in the machine)
  • {proj}TBS_TM{n}.xls — Terminal block TM{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 number
  • X:\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:

  1. Open X:\Controls\{proj}\{proj}.wdp — text file listing all drawings
  2. Or query PSI Explorer: GET /api/bom/dev/job/{proj} → find Controls Assembly → Electrical Drawing Index
  3. Individual DWG files are at X:\DWGFiles\{partNumber}.DWG
  4. AutoCAD Electrical symbol libraries: X:\Controls\Support\Libs\PTI_JIC\ (JIC standard) and PTI_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}):

OffsetDescriptionContent
+97Electrical Drawing IndexMaster index of all drawings
+98Electrical Layout - FloorFloor plan with device locations
+99Electrical Layout - CabinetBlast cabinet electrical layout
+100Electrical Layout - BlastBlast system electrical layout
+101Electrical Layout - RobotRobot cell electrical layout
+102Electrical Layout - SpindleSpindle system layout
+103Electrical Layout - ReclaimReclaim system layout
+104Control Enclosure Layout & BOMPanel enclosure with component list
+105Control Panel Layout & BOMControl panel with component list
+106Terminal Strip LayoutTerminal block assignments
+107PLC Layout And BOMPLC rack with module list
+108Control Station Layout And BOMOperator station layout
+109Computer And Accessories LayoutPRIMS computer and networking
+110Work Door Control Station LayoutDoor control station

Schematics (typically {base+113} to {base+136}):

OffsetDescriptionSafety Relevance
+113460 VAC Power DistributionMain power
+114120 VAC Power DistributionControl power
+115Air Conditioner & ReceptacleSupport
+11624 VDC Power SupplySensor power
+117Emergency Stop StringE-stop circuit architecture — validates single/dual channel
+11824VDC Control SchematicControl relay logic
+119Light Curtain SchematicLC wiring and safety relay
+120Media Flow SensorFlow detection wiring
+121Spindle Speed FeedbackSpeed sensor wiring
+123Dust House & SwecoMotor circuits
+124Pressure Pot Solenoid ManifoldSolenoid valve wiring
+125FANUC Robot Interface (pg 1)Robot I/O, UOP signal wiring
+126FANUC Robot Interface (pg 2)Robot I/O continued
+128PLC SchematicPLC power and comm
+129-136Rack 1 Slot 1-8 I/O Module SchematicsEvery PLC I/O point → wire number → device

Pneumatic Schematics (typically {base+167} to {base+176}):

OffsetDescription
+167Pneumatic Drawing Index
+168Pneumatic Layout - Floor
+169-176Pneumatic Schematics (valve manifolds, regulators, piping)

Priority Drawings for Safety Analysis

When auditing a machine, these schematics are most critical:

  1. E-Stop String — Reveals safety relay model, number of channels, monitoring circuit, reset logic
  2. FANUC Robot Interface — Shows UOP signal wiring, EtherNet/IP connection, pendant interface
  3. PLC I/O Module Schematics (Slot 1-8) — Maps every PLC tag to a wire number and physical device
  4. Light Curtain Schematic — Shows LC controller model, muting configuration, safety relay integration

Layer 3: Mechanical / BOM — “What Physically Exists”

What To Collect

AssetFormatSourceTool
Full BOM hierarchyJSONUniData APIGET /api/bom/dev/job/{proj}
Part detailsJSONUniData APIGET /api/parts/dev/{partNumber}
Mechanical drawingsDWG/PDFX:\ drive, by part numberSolidWorks PDM
SolidWorks modelsSLDPRT/SLDASMX:\ driveSolidWorks
Vendor manualsPDFK:\PROJECT\{proj}\man\pdfman\pdfdocs\vm\Direct access
Software manualsPDFK:\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:

FieldDescription
partNumberPart identifier
descriptionPart description
levelDepth in hierarchy (0=root)
wbsNumberWork Breakdown Structure position
gtCodePU=Purchased, FA=Fabricated, MO=Manufactured, AS=Assembly
drawingNumberLinks to X:\ drive drawings
quantityRequired qty
mfgLeadTime / purchaseLeadTimeLead times (days)
onHand / onOrder / availableInventory status
hasChildrenHas 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

AssetFormatSourceNotes
PC_Read/Write mapping.xlsxK:\PROJECT\{proj}\sw\{proj}IO.xlsxCritical — defines every HMI data point
Operator messagesSame file, “OperatorMessages” sheetSameMessage number → display text
PRIMS source codeVB.NETC:\git\trunk240K LOC, 30 projects
PRIMS comm driver (AB PAC)VB.NETtrunk\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
0No Message To Display
1Ready For Cycle
2Not In Auto
4Machine In Cycle
6Machine in Cycle Hold
10Fault Active
11System in Emergency Stop
14Control Power Off
18Preventive 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:

ComponentLocationDescription
Comm layertrunk\Comm\11 vendor-specific drivers (AB PAC, FANUC, Siemens, ABB, etc.)
Logic layertrunk\Logic\Config, Operation, Data, Security (9 projects)
UI layertrunk\Prims\70+ forms, 17 user controls (7 projects)
Databasetrunk\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

AssetFormatSource
Process records.xlsK:\PROJECT\{proj}\data\process\
LDS (lifecycle data).xlsmK:\PROJECT\{proj}\lds\{proj}lds.xlsm
Customer specificationsVariousK:\PROJECT\{proj}\rfq\ and K:\PROJECT\{proj}\corr\
Operating proceduresVariousK:\PROJECT\{proj}\man\
Recipe examplesPRIMS databaseRequires 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:

ParameterPLC Tag PatternPRIMS FieldUnits
Blast pressureAirPress_ACT / AirPress_SPPC_Write[21] / PC_Read[11]PSI (scaled)
Spindle speedC_Axis_Feedrate_Act / _SPPC_Write[24] / PC_Write[33]RPM (scaled)
Robot TCP speedRobotTCPSpeedPC_Write[18]mm/s
Surface numberSurface_NumberPC_Write[20]1-16
Robot positionX/Y/Z_PositionACTPC_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

AssetFormatSourceTool
Redbook entriesDatabaseRedbook WebSearch by project number
CSM recordsPDF/photosK:\PROJECT\{proj}\csm\Direct access
CSS trip logsCustom format (.war, .pl)K:\PROJECT\{proj}\css\WordPerfect-based
Field service photosJPGK:\PROJECT\{proj}\photos\Direct access
Software change historyACD backupsK:\PROJECT\{proj}\sw\PLC\Compare L5X exports
Reference projectsACD filesK:\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

AssetSourceNotes
PLC IP addressL5X file (Ethernet module config)Usually 192.168.x.x
Robot IP addressL5X file (generic Ethernet module)Usually same subnet as PLC
PRIMS serverSite-specificRuns CITS/PRIMS application
Network switchesSite documentationOT network typically isolated
Remote accessSite-specificVPN, 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:

CheckWhat to VerifyRisk Assessment Reference
E-stop chainHow many channels? Safety relay feedback?PLr rating (typically d for robot cells)
Door interlockSensor redundancy, shot pin, bypass conditionsControl measures re: door closed for auto
Light curtainIndependent guard or conditional? Muting?Control measures re: LC clear for motion
Blast permissiveHow many conditions in the chain?Control measures re: doors closed for blast
Robot UOP signalsIMSTP, SFSPD, ENBL — conditional or bypassed?Control measure #8 (velocity limited)
Test modePhysical key switch or software-only?Who can activate, what does it bypass?
Fault auto-resetWhich faults auto-clear? Logging?Recurring fault investigation
Major fault handlerHalt or continue? Output safe state?Controller behavior on watchdog/I/O failure
Controller securitySecurity code, source protectionNetwork access implications

Troubleshooting Knowledge Base Structure

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

SystemWhat It ProvidesAccess Method
K:\ Drive (K:\PROJECT\{proj}\)Project files, manuals, software, tags, safety, dataDirect file access
X:\ DriveEngineering drawings (electrical, mechanical) by part numberDirect file access via BOM part number
UniData APIBOM hierarchy, part details, inventory, lead timesREST API: api.progressivesurface.com
PSI ExplorerVisual BOM navigationWeb UI: explorer.progressivesurface.com
Redbook WebQuality issues, root causes, field escapesWeb UI: redbook.progressivesurface.com
Project ExplorerProject metadata, dates, customer infoWeb UI: projects.progressivesurface.com
PRIMS Source (C:\git\trunk)HMI/SCADA source code, comm drivers, database schemaGit repository
SolidWorks PDMMechanical drawings, 3D modelsPDM client or X:\ drive

By File Type and Readability

FormatReadable by AI?Tool Required
.L5XYes (XML)Direct parse
.xlsx / .xlsYesNode.js xlsx package
.xlsmYes (data only, no macros)Node.js xlsx package
.pdfYesPDF reader
.kl (Karel)Yes (text)Direct read
.ls (TP listing)Yes (text)Direct read
.md / .txtYesDirect read
.ACDNo (binary)Requires Studio 5000 → export to L5X
.tp (compiled TP)No (binary)Requires FANUC controller or RoboGuide
.doc (Word binary)NoRequires Word or LibreOffice conversion
.DWG (AutoCAD)No (binary)Requires AutoCAD viewer; use PDF versions
WordPerfect (.sw, .lbl, .cvr, etc.)NoRequires WordPerfect or conversion tool
.SV, .VR, .IO (FANUC)Partially (some text)FANUC backup utilities
.SLDPRT/.SLDASMNo (binary)Requires SolidWorks

Implementation Roadmap

Phase 1: Static Model (Achievable Now — ~60-70% troubleshooting capability)

StepSourceActionUnlocks
1L5X exportParse full PLC programLogic tracing, fault catalog
2Robot Karel/TP sourceRead all source filesRobot behavior, handshakes
3{proj}FanucToPLC.xlsxMap robot ↔ PLC I/OUOP signal identification
4{proj}IO.xlsxExtract PC_Read/Write map + messagesHMI data dictionary
5safety/risk assessmentExtract hazard scenarios + control measuresSafety cross-reference
6tags/*.xlsExtract wire numbers, components, terminal blocksPhysical device mapping
7BOM APIPull full parts hierarchyComponent identification
8Electrical PDFsCross-reference I/O to wire numbersComplete 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.

  1. Build l5xgit on a controls workstation with Studio 5000 + Logix Designer SDK
  2. Scan K:\PROJECT\*\sw\PLC\ for all ACD files (~9,293 files across ~467 projects)
  3. Run l5xgit acd2l5x on each primary ACD file
  4. Store L5X alongside the ACD on K: drive
  5. Run l5x_parser.js to pre-generate analysis JSON for the MCP server

See L5X Tools — Fleet Conversion Plan for details.

Phase 3: Fleet Analysis

  • Use l5xplode explode to 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

  1. L5X export was the single best decision — enabled complete code-level analysis of all 503 rungs
  2. Parallel agent analysis — launching L5X structure, ladder logic, and robot analysis simultaneously saved significant time
  3. {proj}IO.xlsx was the Rosetta Stone — unlocked the entire PRIMS ↔ PLC data dictionary in one file
  4. {proj}FanucToPLC.xlsx confirmed the most critical safety finding (UOP bypass) that was ambiguous from PLC code alone
  5. Risk assessment provided the ISO 13849-1 PLr ratings that validated our safety findings

What Was Difficult

  1. Python unavailable on the analysis workstation (Windows Store stubs only) — used Node.js with xlsx npm package instead
  2. WordPerfect files (.sw, .lbl, .doc) not readable by modern tools — significant documentation locked in legacy formats
  3. Agent permission issues — subagents couldn’t access certain directories; direct main-session access worked
  4. Binary formats (.ACD, .tp, .DWG) require vendor-specific tools; always prefer text/XML/PDF exports
  5. 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

FindingFleet Impact
FANUC UOP signals permanently bypassedCheck ALL FANUC cells for same pattern
Controller Security Code = 0Likely all machines — fleet-wide review
Major fault handler doesn’t haltStandard template — affects all machines using this pattern
Test mode via software only (no key switch)Check HMI configuration across fleet
Auto fault reset without loggingStandard pattern — consider fleet-wide logging
Single-channel E-stop in PLCVerify external safety relay architecture on each machine


First compiled: February 2026, from Project 2399 (GE Auburn Robotic Shot Peen System) analysis. Methodology applicable to all PSI CompactLogix/ControlLogix + FANUC robot cells.