Sina Bolouri

Project

FactoryLogics

FactoryLogics is a browser-native industrial automation lab for building, simulating, commissioning, and troubleshooting PLC-based control systems.

deployedJavaScriptHTMLCSSWeb WorkersIndexedDBTypeScript contractsPlaywrightNode.jsVercel
Visit Project

FactoryLogics

FactoryLogics is a browser-native industrial automation engineering and training environment. It matters because learners and engineers can explore the path from field devices and wiring to PLC logic, HMI behavior, simulation results, and troubleshooting without installing a vendor IDE or connecting physical hardware.

Stack: JavaScript, HTML, CSS, Web Workers, IndexedDB, TypeScript contracts, Playwright, Node.js, Vercel

Tags: Full Stack, Hardware, Industrial Automation, PLC, Simulation, Digital Twin, Education, Web App

Problem

Industrial automation skills are usually learned across separate vendor tools, physical PLC hardware, wiring benches, network configuration utilities, and HMI packages. That makes complete control-system practice expensive and difficult to access. A logic-only exercise also hides the causal chain between a process symptom, field device, conductor, I/O point, controller tag, PLC instruction, and operator display.

Solution

FactoryLogics provides one browser-based environment for learning and testing that full chain. The deployed prototype combines a guided Build workflow, a focused PLC Practice sandbox, and a deterministic package-sorter simulation. Its model keeps process state, devices, signals, wiring, I/O, controller memory, PLC logic, communications, HMI state, faults, and traces as explicit boundaries so users can inspect where behavior originates.

The PLC experience is educational and vendor-neutral. It uses familiar Allen-Bradley-style Ladder Logic instruction names such as XIC, XIO, OTE, OTL, OTU, TON, TOF, CTU, and RES, while avoiding claims of proprietary firmware emulation, project-file compatibility, or safety certification.

User Experience

The Home page introduces the product and routes users into Build, Learn, or Practice. Practice supports blank programs and starter examples, editable rungs and parallel branches, element selection and keyboard navigation, drag placement, tag and label editing, undo/redo, zoom, scan run/stop/step controls, input actuation, I/O forcing, online indicators, and an element evaluation table.

Build guides a project through hardware selection, field devices, sink/source wiring, communication nodes, programming, HMI/SCADA objects, virtual commissioning, and fault injection. The Programming stage includes editable LD, Structured Text or SCL, FBD, and language-link views. Its LD editor supports branches and an integrated PLC monitor for testing logic before an HMI is designed or physical hardware is connected.

The package-sorter scenario provides a broader system simulation with operator commands, alarms, watch values, signal traces, commissioning checks, speed control, injected faults, and package movement. Account data and saved projects are local to the browser in the current version.

Current Status

FactoryLogics is deployed at https://factorylogics.sinabolouri.com and is an actively developed prototype. The core browser UI, PLC practice workflow, Build-stage foundations, package-sorter runtime, local persistence, import/export, and automated test suites are implemented. Some product areas remain simplified: the Learn content is foundational, Build-stage engineering models are training approximations, and mixed-language ST/SCL and FBD content can be edited and linked but is not yet executed as one complete IEC runtime with LD.

Tech Stack

  • Browser application: dependency-light HTML, CSS, and JavaScript modules.
  • Runtime isolation: dedicated JavaScript Web Worker with command and snapshot messages.
  • Persistence: IndexedDB with localStorage fallback; JSON project import/export.
  • Contracts: TypeScript packages for project schema, automation model, PLC intermediate representation, runtime API, telemetry, and project storage.
  • Testing: Node.js built-in test runner, Playwright end-to-end tests, and a static smoke check.
  • Build and hosting: Node.js static build script, Vercel, and Cloudflare-managed custom DNS.
  • Planned runtime evolution: Rust/WebAssembly crate placeholders exist, but the deployed runtime currently uses JavaScript.
FactoryLogics · Sina Bolouri