Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

L5X-SIM — AI-Powered Studio 5000 L5X Simulator

Parse, simulate I/O, and safety-analyze Allen-Bradley ControlLogix programs with AI-powered diagnostics mapped to ISO 13849 and IEC 62061.

Load any Studio 5000 L5X export and get instant I/O simulation, ladder logic visualization, and automated safety analysis — no Rockwell license required.


Quick Start

git clone https://github.com/YOUR_ORG/s5k-sim.git
cd s5k-sim
npm install
npm run dev

Opens at http://localhost:3000. The app loads with a built-in demo project (conveyor safety system). To load your own program, click LOAD L5X and select an export from Studio 5000.

Exporting L5X from Studio 5000

  1. Open your project in Studio 5000 Logix Designer
  2. File → Export (or right-click the Controller in the Controller Organizer)
  3. Select L5X File (*.L5X)
  4. Save and load into S5K-SIM

A sample L5X file is included at samples/S5K_Demo_Conveyor.L5X.


Features

Tag Browser

Full tag database with type, usage, and description. Filter by BOOL, analog, safety-pattern, or AI-pattern tags. Click BOOLs to toggle live values.

Logic View

Ladder diagram rendered from L5X rung text with real-time energization state. See rung continuity change as you toggle inputs during simulation.

I/O Simulation

Split input/output panel with toggle switches for discrete I/O, sliders for analog values, and Force/Unforce capability that mirrors Studio 5000 behavior.

AI Safety Analysis

Scans program structure and detects:

  • Actuator outputs without safety interlocks (flagged against IEC 62061 SIL requirements)
  • Latched outputs (OTL) without corresponding unlatch (OTU)
  • Inhibited modules with silently zeroed I/O
  • Major fault configurations and comm loss behavior
  • Fast RPI concerns and network loading
  • Safety tag pattern detection (E-Stop, guard, interlock, light curtain)

Every finding includes a recommendation referencing ISO 13849, IEC 62061, IEC 62443, or NFPA 79.

Test Scenario Generation

Auto-generates E-Stop, power-on sequence, and comm-loss test procedures from detected safety tags. Includes executable FORCE buttons and live PASS/FAIL evaluation against expected states. Each scenario maps to specific IEC/ISO clause references.

ISO 13849 DC Mapping

Estimates Diagnostic Coverage, Category, and Performance Level from tag naming conventions. Includes guidance on mapping AI/CV confidence outputs to safety architectures per ISO/IEC TR 5469:2024.

Hardware View

Module inventory with slot assignments, RPI rates, inhibit status, and fault configuration.


Simulation Engine

The scan engine executes ladder logic instructions in real time:

  • Bit-level: XIC, XIO, OTE, OTL, OTU
  • Math: MOV, ADD, SUB
  • Compare: EQU, GRT, LES

Click RUN to start the scan cycle. Toggle inputs in the I/O Sim panel and watch outputs respond through the logic.


L5X Parser

Extracts from Studio 5000's XML export format:

  • Controller-scope and Program-scope Tags
  • I/O Modules (catalog numbers, slots, ports, RPI, fault config)
  • Programs and Routines (ladder rung text with comments)
  • Tasks (continuous, periodic, event)
  • User-Defined Types (UDTs)
  • Add-On Instructions (AOIs)

Project Structure

s5k-sim/
├── index.html
├── package.json
├── vite.config.js
├── src/
│   ├── main.jsx
│   ├── index.css
│   └── App.jsx
├── samples/
│   └── S5K_Demo_Conveyor.L5X
├── public/
│   └── favicon.svg
├── LICENSE
└── README.md

Standards Reference

Standard Coverage
ISO 13849-1 Performance Level, Categories, Diagnostic Coverage
IEC 62061 SIL assessment, safety function architecture
IEC 60204-1 Stop categories (0, 1, 2), control circuit design
IEC 62443 Industrial cybersecurity zone architecture
ISO/IEC TR 5469:2024 AI trustworthiness in safety-related systems
NFPA 79 Industrial machinery electrical standard

Disclaimer: This tool provides estimated analysis based on naming conventions and program structure. It is not a substitute for formal SIL/PL verification using tools like SISTEMA, or for professional safety engineering review.


Roadmap

  • Structured Text (ST) parsing and simulation
  • Function Block Diagram (FBD) visualization
  • Timer (TON/TOF/RTO) and Counter (CTU/CTD) simulation
  • Tag trend charting with historical playback
  • OPC-UA live connection for real PLC tag read/write
  • SISTEMA XML export for formal PL verification
  • Multi-user collaborative simulation

Building for Production

npm run build     # Output to dist/
npm run preview   # Preview production build locally

The dist/ folder can be deployed to any static hosting (Netlify, Vercel, GitHub Pages, S3).

About

Parse, simulate I/O, and safety-analyze Allen-Bradley ControlLogix programs with AI-powered diagnostics mapped to ISO 13849 and IEC 62061. Load any Studio 5000 L5X export and get instant I/O simulation, ladder logic visualization, and automated safety analysis — no Rockwell license required.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages