Skip to content

fixstuff/GOPLC-Showcase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GOPLC Logo

GOPLC

Industrial-Grade PLC Runtime in Go
IEC 61131-3 Structured Text | 20+ Protocol Drivers | Web IDE | 280,000+ Lines of Code

Go 1.24+ IEC 61131-3 20+ Protocols 1,900+ Functions

FeaturesWeb IDENode-REDDebuggerAIAgenticManifestsProtocolsClusteringRedundancyAuthLicensingSnapDownloadQuick StartArchitectureWhitepapers


What is GOPLC?

GOPLC is a full-featured PLC runtime written entirely in Go. It executes IEC 61131-3 Structured Text programs with industrial-grade features:

  • Multi-task scheduler with priorities, watchdogs, and microsecond-precision scan times
  • 20+ protocol drivers including Modbus, EtherNet/IP, DNP3, BACnet, OPC UA, FINS, S7, IEC 104, Sparkplug B, KNX, M-Bus, SNMP, and ctrlX EtherCAT
  • ctrlX CORE EtherCAT I/O — native Data Layer IPC via Bosch SDK: 500 Hz polling, 0.69ms scan, 10x faster than REST
  • Built-in Web IDE with Monaco editor, statement-level debugger, and project management
  • Integrated Node-RED with 7 custom PLC nodes for building HMI dashboards
  • AI Assistant supporting Claude, OpenAI, and Ollama for code generation
  • 1,900+ built-in functions covering math, strings, crypto, HTTP, databases, motion control, and more
  • Real-time capable with memory locking, CPU affinity, and GC tuning
  • Boss/Minion clustering scaling to 10,000+ PLC instances

GOPLC Web IDE


Features

Core Runtime

Feature Description
ST Parser Full IEC 61131-3 Structured Text with extensions
Multi-task Scheduler Cooperative scheduling with priorities (1-255)
Scan Times From 100μs to hours, configurable per task
Watchdog Protection Per-task watchdogs with fault/halt options
Hot Reload Update individual tasks without stopping the runtime
Function Blocks TON, TOF, TP, RTO, CTU, CTD, CTUD, R_TRIG, F_TRIG, SR, RS, SEMA
RETAIN Variables Persistent variables across warm/cold restarts
Project Files Single .goplc file contains programs, tasks, configs, HMI pages

1,900+ Built-in Functions

Category Count Highlights
Conversion 157 INT_TO_REAL, DWORD_TO_TIME, HEX_TO_INT
Data Structures 130 LIST_, MAP_, QUEUE_, STACK_, SET_, HEAP_, DEQUE_*
Crypto & Encoding 55 AES_, SHA, RSA_, JWT_, HMAC_, BASE64_, GZIP_*
MQTT & Sparkplug B 56 MQTT_PUBLISH, MQTT_SUBSCRIBE, SPARKPLUG_NODE_, SPARKPLUG_METRIC_
SNMP 47 SNMP_GET, SNMP_WALK, SNMP_AGENT_, SNMP_TRAP_ (v1/v2c/v3)
Resilience 40 CIRCUIT_BREAKER_, RATE_LIMIT_, RETRY_, CACHE_, BULKHEAD_*
Array (Functional) 50 ARRAY_SORT, ARRAY_FILTER, ARRAY_MAP, ARRAY_REDUCE, ARRAY_ZIP_WITH
Debug 35 DEBUG_TO_FILE, DEBUG_TO_SQLITE, DEBUG_TO_INFLUX, DEBUG_TO_SYSLOG
String & Regex 43 CONCAT, SPLIT, REGEX_, FORMAT, JSON_
JSON 25 JSON_PARSE, JSON_GET, JSON_SET, JSON_MERGE, JSON_PATH
Motion Control 23 MC_POWER, MC_MOVE_ABSOLUTE, MC_HOME, MC_JOG, GSV/SSV
HTTP & URL 22 HTTP_GET, HTTP_POST, URL_ENCODE, URL_PARSE, QUERY_STRING_*
Serial I/O 20 SER_OPEN, SER_READ, SER_WRITE, SERIAL_PORTS, SERIAL_FIND
Database 21 DB_CONNECT, DB_QUERY, DB_EXEC, DB_COMMIT, DB_LIST_TABLES
DateTime 23 NOW, DATE_, TIME_, ADD_TIME, DAY_OF_WEEK, TICK_MS
InfluxDB 16 INFLUX_CONNECT, INFLUX_WRITE, INFLUX_BATCH_ADD, INFLUX_BATCH_FLUSH
NMEA & GPS 26 NMEA_PARSE, NMEA_GET_LAT, GPS_DISTANCE, GPS_BEARING, GPS_IN_RADIUS
File & Config 35 FILE_READ, FILE_WRITE, CSV_PARSE, INI_READ, ZPL_BARCODE_128
Specialty Protocols 76 KNX_SEND, MBUS_PARSE, ARTNET_SEND, SACN_SEND, MIDI_NOTE_ON, OSC_SEND, AT_CMD
Math & Statistics 40 SIN, COS, SQRT, POW, MEDIAN, STDDEV, CORRELATION, PERCENTILE
Barcode & Scale 17 BARCODE_PARSE, BARCODE_GS1_GET, SCALE_PARSE, SCALE_GET_WEIGHT
+ OSCAT Library 557 Complete OSCAT Basic library (384 functions + 173 FBs)

Real-time Capabilities

realtime:
  enabled: true
  mode: container          # container | host | off
  lock_os_thread: true     # Pin goroutines to OS threads
  cpu_affinity: [2, 3]     # Pin to specific CPU cores
  memory_lock: true        # mlockall() to prevent page faults
  gc_percent: 500          # Reduce GC frequency
  rt_priority: 50          # SCHED_FIFO priority (requires privileges)

Web IDE

GOPLC includes a full-featured browser-based IDE built on 18 modular JavaScript components:

IDE Features

IDE Features

  • Monaco Editor with full IEC 61131-3 syntax highlighting
  • Project Tree showing tasks, programs, functions, libraries
  • Live Variable Watch with real-time updates via WebSocket
  • Runtime Control - Start/Stop/Reset/Upload/Download
  • Project Management - New/Open/Save/Export/Import (.goplc format)
  • Task Configuration - Priorities, scan times, watchdogs
  • Per-Task Hot Reload - Update one task without stopping others
  • Multi-Runtime Switch - Connect to different PLC instances
  • Hash-Based Sync Indicator - Shows if IDE matches runtime code
  • Config Editor - YAML configuration with syntax highlighting
  • Cross-Reference Search - Find variable/function usage across all programs
  • Tags Browser - Browse all tags with sorting and filtering

Online Mode

CoDeSys-style live variable debugging — monitor and modify PLC variables in real-time while the program executes:

  • Split-Panel Layout - Variable list panel alongside the editor with no layout shift
  • Click-to-Edit Values - Click any variable value to write a new value to the running PLC
  • 250ms Live Updates - Continuous polling with change highlighting
  • Boolean Coloring - TRUE values in green, FALSE in red
  • Type-Based Formatting - Specialized display for BOOL, INT, REAL, TIME, STRING
  • FB Instance Support - View function block member variables
  • Pause/Step/Resume - Per-scan stepping for system-level debugging

GOPLC Online Live View Demo
Click to watch: Online Live View Demo

IDE Screenshots


Monitor - Variables
Live task/variable view with Watch List

Watch List
Real-time variable monitoring

Config Editor
YAML configuration with syntax highlighting

Cross Reference
Search across all programs

DataLayer Sync
Multi-PLC variable synchronization

ESP32 HMI
Hardware status display

Debugger

Full statement-level step debugger comparable to CoDeSys and commercial PLC IDEs. Zero runtime overhead when disabled — a single atomic boolean check on the fast path.

Debug Controls

Action Shortcut Description
Continue F5 Resume execution until the next breakpoint
Step Over F10 Execute the current line, skip over function/FB calls
Step Into F11 Step into function and function block calls
Step Out Shift+F11 Run until the current function/FB returns

Debug Features

  • Line Breakpoints - Click the editor gutter to set/clear breakpoints on any ST line
  • Breakpoint Enable/Disable - Toggle breakpoints without removing them
  • Call Stack - View the full function block / function call chain at each stop
  • Variable Inspection - Examine all variables and their current values at each step
  • Multi-Task Broadcast - When any task hits a breakpoint, ALL tasks pause for a consistent system snapshot
  • Watchdog Auto-Suspend - Watchdog timers automatically suspend while stopped in the debugger
  • Hit Counter - Track how many times each breakpoint has been triggered

Debug API

# Enable the debugger
curl -X POST http://localhost:8082/api/debug/step/enable

# Set a breakpoint at line 15 of MainProgram
curl -X POST http://localhost:8082/api/debug/step/breakpoints \
  -d '{"program": "MainProgram", "line": 15}'

# Continue execution
curl -X POST http://localhost:8082/api/debug/step/continue

# Step into the next statement
curl -X POST http://localhost:8082/api/debug/step/into

# Step over the current statement
curl -X POST http://localhost:8082/api/debug/step/over

# Step out of the current function/FB
curl -X POST http://localhost:8082/api/debug/step/out

# Get current debug state (position, stopped status, call stack)
curl http://localhost:8082/api/debug/step/state

GOPLC Debugger Walkthrough
Click to watch: Debugger Walkthrough


Node-RED Integration

GOPLC manages Node-RED as an integrated subprocess with full lifecycle management, a reverse proxy, and 7 custom PLC nodes for building industrial HMI dashboards — all accessible through the same port as the Web IDE.

How It Works

GOPLC (port 8082)
├── /ide/          → Web IDE
├── /nodered/      → Node-RED editor (reverse proxied)
├── /hmi/          → Built-in HMI pages
└── /api/          → REST API
  • Node-RED auto-starts with GOPLC and auto-restarts on crash (exponential backoff)
  • No separate port needed — reverse proxy serves Node-RED through GOPLC's API port
  • GOPLC host/port injected into Node-RED's global context for zero-config node connections

7 Custom PLC Nodes

Node Description
goplc-connection Config node — auto-detects host/port from global context
goplc-read Read a single variable or all variables from the PLC
goplc-write Write values to PLC variables
goplc-subscribe Real-time WebSocket variable updates with on-change filtering
goplc-runtime Start/stop/status control of the PLC runtime
goplc-task Task management — reload, status, per-task control
goplc-cluster Read/write variables on cluster minions via boss proxy

Dashboard Support

Auto-installs @flowfuse/node-red-dashboard (Dashboard 2.0) for building operator HMI screens. Includes demo flows:

  • Industrial HMI Demo - Water treatment plant dashboard with live gauges, trends, and alarm panels
  • Dual Runtime - Multi-PLC communication and monitoring
  • Quick Start Dashboard - Simple template to get started

AI Flow Generation

The AI assistant can generate complete Node-RED flows from natural language descriptions. Generated flows include custom PLC nodes pre-configured for the current runtime. Import directly from the AI chat with one click.

GOPLC Node-RED Integration Walkthrough
Click to watch: Node-RED Integration Walkthrough

Configuration

nodered:
  enabled: true
  port: 1880                    # Node-RED internal port
  auto_start: true
  restart_on_crash: true
  max_restarts: 5
  restart_backoff_ms: 2000
  user_dir: "data/nodered"
  flow_file: "flows.json"
  credential_secret: ""         # Optional encryption key
  extra_modules:                # Auto-install on startup
    - "@flowfuse/node-red-dashboard"

Node-RED API

# Check Node-RED status (uptime, PID, restart count)
curl http://localhost:8082/api/nodered/status

# Start/stop/restart Node-RED subprocess
curl -X POST http://localhost:8082/api/nodered/start
curl -X POST http://localhost:8082/api/nodered/stop
curl -X POST http://localhost:8082/api/nodered/restart

AI Assistant

Built-in AI coding assistant that understands all 1,900+ ST functions and can generate Structured Text code, HMI pages, and Node-RED flows from natural language descriptions.

Multi-Provider Support

Provider Models Use Case
Claude (Anthropic) claude-sonnet-4-20250514 (default) Best ST code quality
OpenAI GPT-4o, GPT-4, etc. Alternative cloud provider
Ollama qwen2.5-coder, deepseek-r1, etc. Fully local/offline

What It Can Generate

  • Structured Text Programs - PID loops, state machines, alarm handlers, protocol integrations. Detected as iec code blocks with an "Insert as Program" button.
  • HMI Pages - Custom web dashboards with live PLC data. Detected as HTML with "Preview" and "Save as HMI Page" buttons.
  • Node-RED Flows - Complete flow JSON with custom PLC nodes. Detected automatically with an "Import to Node-RED" button.

Context-Aware

The AI receives the full function registry (1,900+ signatures with return types), current runtime variables, active tasks, and loaded programs as context — so it generates code that works with your specific setup.

GOPLC AI Code Writing Demo
Click to watch: AI Code Writing Demo

Configuration

ai:
  enabled: true
  provider: "claude"            # claude | openai | ollama
  api_key_env: "ANTHROPIC_API_KEY"
  model: "claude-sonnet-4-20250514"
  endpoint: ""                  # Required for Ollama (e.g., http://localhost:11434/v1)
  max_tokens: 8192
  temperature: 0.3

Agentic Control Loop

An autonomous AI control agent that operates the PLC directly — separate from the code-writing assistant. Instead of generating code for a human to review, it reads sensors, writes setpoints, deploys programs, and manages tasks via tool calls in a multi-turn loop.

12 Built-in Control Tools

Tool Category Description
read_variable Read-only Read current PLC variable value
list_variables Read-only List all variables with optional prefix filter
get_task_status Read-only All task states, scan times, faults
get_diagnostics Read-only Memory, uptime, scan stats
get_faults Read-only Active task fault messages
write_variable Normal Write setpoint or control variable
reload_task Normal Hot-reload task without stopping others
start_task Normal Start named task or all tasks
create_manifest Normal Register hardware descriptor
create_hmi_page Normal Generate Node-RED Dashboard 2.0 flow
deploy_program Normal AI-generate and deploy a control program
stop_task Critical Stop a running task
curl -X POST http://localhost:8082/api/ai/control \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Ramp the temperature setpoint to 50 degrees and start the pump",
    "max_turns": 6
  }'

The response includes actions_executed — a full log of every tool call and result — and turns_used showing how many AI iterations were needed. Multi-turn conversation history is supported for follow-up instructions.


Hardware Manifests

Declarative YAML descriptors for physical hardware. GOPLC reads manifests and auto-generates a SysInit_{id} ST program that opens hardware channels on startup and maps sensor readings to named PLC variables.

id: "greenhouse_1"
name: "Tomato Greenhouse"
hardware:
  - id: "temp_sensor"
    type: "phidgets"
    channel_type: "temperature"
    serial: -1          # -1 = any connected device
    hub_port: 0
    st_var: "temp_c"

  - id: "heater_relay"
    type: "phidgets"
    channel_type: "digital_output"
    hub_port: 2
    st_var: "heater_on"

  - id: "custom_sensor"
    type: "custom"
    open_call: "MY_DEVICE_OPEN('{name}')"
    read_call: "MY_DEVICE_READ('{name}')"
    write_call: "MY_DEVICE_WRITE('{name}', {var})"

GOPLC generates VAR_GLOBAL declarations for all st_var bindings and a startup sequence that initializes each hardware channel. Manifests can be created manually, via API, or through the agentic control loop.

API:

GET    /api/system/manifests              # List all manifests
POST   /api/system/manifests              # Create manifest
PUT    /api/system/manifests/:id          # Update manifest
DELETE /api/system/manifests/:id          # Delete manifest

HMI Builder

Create and serve custom web-based operator displays directly from the IDE.

Built-in Default Dashboard

GOPLC ships with a default HMI dashboard at /hmi/default-dashboard showing:

  • Runtime state, uptime, scan count, and memory usage
  • Live trend charts for task scan times
  • System information and feature summary

Custom Pages

  • Create custom HTML pages via the AI assistant or manually
  • Pages stored inside the .goplc project file (portable, single-file deployment)
  • Helper library (goplc-hmi.js) provides variable read/write from HMI pages
  • Served at /hmi/:page-name with no additional configuration

HMI API

# List all HMI pages
curl http://localhost:8082/api/hmi/pages

# Create a new page
curl -X POST http://localhost:8082/api/hmi/pages \
  -d '{"name": "tank-overview", "content": "<html>...</html>"}'

# Get/update/delete pages
curl http://localhost:8082/api/hmi/pages/tank-overview
curl -X PUT http://localhost:8082/api/hmi/pages/tank-overview -d '{"content": "..."}'
curl -X DELETE http://localhost:8082/api/hmi/pages/tank-overview

Config Wizard

Searchable topic browser with static forms and AI-assisted setup that generates ready-to-apply YAML configuration. Lowers the barrier for configuring protocols, clustering, and services.

Available Topics

Topic Mode Description
AI Setup Form Configure AI provider, API key, model
Modbus Server Form TCP server with register mapping
Modbus Client Form TCP client with polling intervals
OPC UA Server Form Server configuration
FINS Form Omron FINS protocol setup
EtherNet/IP Form Adapter and scanner configuration
DNP3 Form Master/outstation setup
S7comm Form Siemens S7 configuration
Cluster Boss Form Boss with member list (add/remove rows)
Cluster Minion Form Minion with unix socket
I/O Mapping Form Map ST variables to protocol addresses
Modbus Bridge AI Custom gateway configurations
Performance AI Tuning and optimization guidance
Real-time AI RT container mode setup
DataLayer AI Multi-PLC sync configuration

Each form generates a YAML snippet that can be applied via hot-reload — no restart needed.


Protocols

GOPLC includes 60,000+ lines of protocol code for seamless integration with existing automation systems.

Industrial & Specialty Protocols

Protocol Role Transport Lines Target Systems
Modbus TCP/RTU Server + Client TCP, UDP, Serial 7,241 Universal - PLCs, VFDs, meters, sensors
DNP3 Master + Outstation TCP, UDP, Serial 13,354 SCADA - Electric, water, gas utilities
BACnet/IP & MSTP Server + Client UDP, RS-485 7,883 Building automation - HVAC, fire, access
EtherNet/IP Adapter + Scanner TCP, UDP 5,388 Allen-Bradley - CompactLogix, ControlLogix
OPC UA Server + Client TCP 4,496 Modern - Cloud integration, MES, SCADA
FINS Server + Client TCP, UDP 3,565 Omron - NX, NY, CP, CJ series PLCs
S7comm Server + Client TCP (TPKT/COTP) 2,441 Siemens - S7-300, S7-400, S7-1200, S7-1500
IEC 60870-5-104 Client + Server TCP 2,100 Utilities - Power grid SCADA, substation automation
Sparkplug B Node + Host MQTT + Protobuf 1,800 IIoT - Unified Namespace, SCADA/MES integration
PROFINET Server + Client TCP, UDP 1,997 Siemens - Real-time industrial Ethernet
SEL Server + Client Serial 1,758 Protective relays - Power system monitoring
SNMP v1/v2c/v3 Client + Agent + Trap UDP 3,597 Network devices - Switches, UPS, sensors
DF1 Client Serial 1,417 Allen-Bradley legacy - SLC 500, MicroLogix, PLC-5
KNX Client UDP/Multicast 600 Building automation - Lighting, blinds, HVAC
M-Bus Master TCP, Serial 700 Utility metering - Water, gas, heat, electric
ctrlX EtherCAT DI + DO REST or Native IPC 1,200 Bosch ctrlX CORE - EtherCAT I/O modules
Phidgets Sensors + Actuators USB/VINT 800 Phidgets USB/VINT sensor and actuator modules

Specialty Communication

Protocol Functions Transport Use Case
Art-Net / DMX512 7 UDP Stage lighting, architectural lighting control
sACN / E1.31 7 UDP Multicast Entertainment lighting with priority control
MIDI 16 Serial/USB Music production, audio equipment control
OSC 12 UDP Audio/visual software, show control
AT Commands 13 Serial Cellular modems, GSM/GPS modules
NMEA 0183 17 Serial GPS receivers, marine electronics

Protocol Features

Modbus TCP/RTU - Click to expand
  • Full function code support (FC01-06, FC15-16)
  • Coils, discrete inputs, holding registers, input registers
  • RTU framing with CRC-16
  • RS-485 half-duplex with RTS control
  • Connection pooling and retry logic
  • Diagnostics counters (FC08)
  • Gateway mode (TCP to RTU bridge)
DNP3 - Click to expand
  • Complete Master and Outstation implementation
  • Binary/Analog inputs and outputs
  • Counters with freeze support
  • Event buffering with classes (1, 2, 3)
  • Unsolicited responses
  • Select-Before-Operate (SBO) control
  • Time synchronization
  • Serial transport (RS-232/RS-485)
  • Data link layer with FCB/FCV
  • Store-and-forward with SQLite buffering, GZIP compression, AES-256-GCM encryption
BACnet/IP & MSTP - Click to expand
  • BACnet/IP over UDP (port 47808)
  • BACnet/MSTP over RS-485 (token passing)
  • All standard object types (AI, AO, AV, BI, BO, BV, MI, MO, MV)
  • COV (Change of Value) subscriptions
  • ReadPropertyMultiple for efficient polling
  • Priority arrays (1-16) for commandable objects
  • Schedule and Calendar objects
  • TrendLog objects
  • Alarm and Event services
  • Segmentation for large responses
  • Device discovery (Who-Is/I-Am)
EtherNet/IP - Click to expand
  • CIP (Common Industrial Protocol) messaging
  • Adapter mode (expose tags to scanners)
  • Scanner mode (read/write remote tags)
  • Explicit messaging (TCP port 44818)
  • Implicit I/O (UDP port 2222)
  • ForwardOpen/ForwardClose connections
  • Unconnected messaging (UCMM)
  • Assembly objects for I/O data
OPC UA - Click to expand
  • Server and Client implementation
  • Secure channel management
  • Session authentication
  • Node browsing
  • Read/Write attributes
  • Subscriptions with monitored items
  • Method calls
  • Security policies (None, Basic256Sha256)
SNMP v1/v2c/v3 - Click to expand
  • SNMP v1, v2c, and v3 support
  • GET, SET, GETNEXT, GETBULK operations
  • WALK for MIB traversal
  • Trap receiver
  • SNMPv3 authentication (MD5, SHA)
  • SNMPv3 privacy (DES, AES)
  • ASN.1 BER encoding
Sparkplug B v3.0 - Click to expand
  • Eclipse Sparkplug B specification v3.0 over MQTT
  • Node lifecycle: NBIRTH, NDEATH, NDATA, NCMD
  • Protobuf-encoded payloads with sequence numbering
  • Metric types: boolean, integer, float, string with timestamps
  • Command subscription for remote control (NCMD)
  • Birth certificate on connect, death certificate via MQTT will
  • Multi-metric batch publishing per NDATA message
  • 26 ST functions for full node lifecycle management
IEC 60870-5-104 - Click to expand
  • Full Client and Server implementation
  • APCI frame handling (I, S, U formats)
  • ASDU types: single/double-point, measured values, step position, normalized/scaled/short floating point
  • Interrogation commands (station and group)
  • Command types: single, double, regulating step, set-point
  • Time-tagged variants for all information types
  • 26 ST functions for IEC 104 operations
  • Connection state machine with T1/T2/T3 timers
ctrlX EtherCAT I/O - Click to expand
  • Two transport modes switchable from ST code — no recompilation needed
  • REST mode ('rest'): HTTP/TLS to ctrlX Data Layer REST API. Works everywhere, 100ms default poll
  • Native IPC mode ('dl'): Direct function calls via official Bosch ctrlx-datalayer-golang/v2 SDK (CGo). 2ms poll, 500 Hz I/O, sub-millisecond latency
  • 10 ST functions: CTRLX_EC_CREATE, START, STOP, CONNECTED, READ_DI, WRITE_DO, READ_DO, STATS, BROWSE, DELETE
  • CTRLX_EC_WRITE_DO returns FALSE when disconnected — ST-level connection loss detection
  • Verified on Bosch ctrlX CORE X3 (ARM64 Cortex-A53) with physical loopback DO→DI
  • Snap bundles libcomm_datalayer.so + libsystemd.so for native IPC at runtime

Performance (measured on X3 hardware):

Metric REST Mode Native IPC Mode
Poll interval 100ms 2ms
Avg scan 1.2ms 0.69ms
I/O update rate 10 Hz 500 Hz
Determinism Variable (HTTP stack) Consistent (IPC)

Communication Layer

Module Purpose Transport Features
DataLayer Multi-PLC sync TCP, Shared Memory Real-time variable sharing, <1ms latency, prefix filtering
MQTT IoT/Cloud TCP, TLS Publish variables, subscribe to commands, QoS 0/1/2
HTTP/REST Integration TCP 60+ API endpoints, WebSocket streaming, SSE watch
Store-and-Forward Reliability SQLite Offline buffering, GZIP compression, AES-256 encryption
Serial Legacy RS-232/485 Configurable baud, parity, RTS/CTS flow control

Hardware Abstraction Layer (HAL)

Tested & Production Ready:

Device Interface I/O Type Use Case
Nextion HMI Serial/UART Touch Display Local operator interface
USB Camera rpicam-still Vision Barcode, QC inspection
ESP32 Remote I/O Modbus TCP WiFi I/O Module Wireless sensors/actuators
Raspberry Pi GPIO Direct Digital I/O Edge computing, local control
PCF8574 I2C 8-bit I/O Expander Expand GPIO count
Grove ADC I2C Analog Input Seeed Studio sensors
Phidgets USB/VINT Multi-sensor Temperature, humidity, voltage, current, relays, motors, encoders (simulation mode; real hardware via CGO extension)
ctrlX EtherCAT I/O REST or Native IPC 16 DI + 16 DO Bosch ctrlX CORE — 500 Hz native IPC, 0.69ms scan, verified on X3 hardware

Hobbyist & Maker Integrations:

GOPLC bridges the gap between industrial automation and hobbyist/maker hardware. All devices use USB serial with automatic port discovery, heartbeat monitoring, and auto-recovery on disconnect/reconnect.

Device Interface Functions Capabilities
Parallax Propeller 2 Serial/USB 56 ST functions 8-core MCU — GPIO, Smart Pins, UART, I2C, SPI, ADC/DAC, PWM, encoder, frequency counter, OLED SSD1306, servo
Teensy 4.x Serial/USB 40+ ST functions ARM Cortex-M7 — GPIO, ADC, PWM pairs, encoder, frequency counter, CAN bus, I2C, SPI, UART, PID, NeoPixel, OLED, RTC, TRNG
RP2040 / Pico Serial/USB 25+ ST functions Dual-core ARM — GPIO, ADC, PWM, I2C, SPI, UART, NeoPixel, OLED, servo, ultrasonic, temperature
Arduino R4 WiFi Serial/USB 20 ST functions Digital/analog I/O, servo, I2C, WiFi, BLE, LED matrix, temperature, ultrasonic
Flipper Zero Serial/USB 35 ST functions GPIO, buttons, IR TX/RX, Sub-GHz TX/RX, NFC, RFID — custom binary FAP driver

Implemented - Testing Soon:

Device Interface I/O Type Use Case
Orange Pi GPIO Direct Digital I/O Cost-effective edge nodes
ADXL345 I2C Accelerometer Vibration monitoring
DHT11/22 1-Wire Temp/Humidity Environmental sensing
TFT Display SPI Graphics Display Custom HMI screens

Planned:

Device Interface I/O Type Use Case
MCP3008 SPI 8-ch 10-bit ADC Analog sensor input
ADS1115 I2C 4-ch 16-bit ADC Precision measurement
MAX31855 SPI Thermocouple High-temp sensing
MCP23017 I2C 16-bit I/O Expander More GPIO
W5500 SPI Ethernet Wired network on MCU

Protocol Analyzer

Built-in packet capture and analysis with support for all protocols:

# Start capture with filters
curl -X POST http://localhost:8082/api/analyzer/start \
  -d '{"protocols": ["modbus-tcp", "dnp3", "bacnet"]}'

# View captured transactions
curl http://localhost:8082/api/analyzer/transactions?limit=100

# Export to Wireshark
curl http://localhost:8082/api/analyzer/export/pcap -o capture.pcap

# Decode raw packet
curl -X POST http://localhost:8082/api/analyzer/decode \
  -d '{"protocol":"modbus-tcp","raw_hex":"00 01 00 00 00 06 01 03 00 00 00 0A"}'

Supported decoders: Modbus TCP/RTU, DNP3, BACnet/IP, EtherNet/IP, OPC UA, S7, FINS, IEC 104, SEL

Protocol Coverage by Industry

Industry Protocols
Manufacturing Modbus, EtherNet/IP, PROFINET, S7, FINS, OPC UA, Sparkplug B
Building Automation BACnet/IP, BACnet/MSTP, KNX, Modbus, SNMP, OPC UA
Utilities/SCADA DNP3, IEC 104, Modbus, SEL, M-Bus, OPC UA
Oil & Gas Modbus, DNP3, OPC UA, EtherNet/IP, Sparkplug B
Water/Wastewater DNP3, Modbus, OPC UA, Sparkplug B
Power Generation DNP3, IEC 104, Modbus, SEL, IEC 61850 (planned)
Food & Beverage EtherNet/IP, Modbus, OPC UA, S7
Pharmaceutical OPC UA, Modbus, S7, EtherNet/IP
Data Centers SNMP, Modbus, BACnet, Sparkplug B
Entertainment/AV Art-Net, sACN, MIDI, OSC
Marine/Fleet NMEA 0183, GPS, Modbus, MQTT

Clustering

GOPLC supports distributed PLC architecture using a Boss/Minion pattern that scales to 10,000+ instances on a single machine.

Boss/Minion Architecture

Boss PLC (coordinator, port 8082)
├── Unix Socket → Minion: CRAC controller
├── Unix Socket → Minion: Fire suppression
├── Unix Socket → Minion: Power distribution
└── TCP fallback → Minion: Remote site
  • Boss aggregates and proxies API calls to all minions
  • Minions are fully isolated PLC instances (own scheduler, protocols, data)
  • Communication via Unix sockets (same host) or TCP (networked)
  • All minion access goes through the Boss API — minions never exposed directly
  • Nested proxy supports multi-tier topologies: Supervisor → Edge Boss → Minions

Per-Task Hot Reload

Deploy updates to individual tasks without stopping the runtime:

# Reload only the MQTTTask — MainTask keeps running
curl -X POST http://localhost:8082/api/tasks/MQTTTask/reload

Cluster API

# Read variables from a specific minion
curl http://localhost:8082/api/cluster/crac/api/variables

# Write to a minion's variable
curl -X PUT http://localhost:8082/api/cluster/fire/api/variables/AlarmActive \
  -d '{"value": true}'

# Reload a task on a specific minion
curl -X POST http://localhost:8082/api/cluster/pdu/api/tasks/MainTask/reload

# Nested: supervisor → edge boss → minion
curl http://localhost:8082/api/cluster/edge-boss/api/cluster/crac/api/variables

Fleet Management

Remote management of distributed GOPLC instances from the Boss IDE:

  • mDNS Auto-Discovery — automatically finds GOPLC nodes on the local network via DNS-SD
  • Persistent Node Registry — fleet-registry.json survives restarts, manual node add/remove
  • Snapshot Store — SQLite metadata + gzip files on disk, auto-save on download/import, auto-prune at 50 local snapshots
  • Remote Snapshot Management — browse any node's history, push snapshots (single or bulk), drift detection across healthy nodes
  • Project Deploy — atomic restore+validate+download+start in one API call (POST /api/project/deploy)
  • System Control — graceful shutdown (POST /api/system/shutdown), process re-exec restart (POST /api/system/restart), runtime restart
  • Fleet UI — per-node snapshot browser, deploy/multi/export/delete, collect/export/purge toolbar, drift banner, column sorting, auto-refresh 15s

DataLayer Mesh

Minions publish DL_* prefixed variables to the Boss via DataLayer. The Boss aggregates variables from all minions and rebroadcasts, creating a real-time variable mesh across the cluster.

Configuration

# Boss config
api:
  port: 8082
  cluster:
    members:
      - name: crac
        socket: /run/goplc/crac.sock
      - name: fire
        socket: /run/goplc/fire.sock
      - name: remote-plc
        url: http://10.0.0.50:8500

# Minion config
api:
  socket: /run/goplc/crac.sock   # No port needed

GOPLC Cluster IDE Demo
Click to watch: Boss/Minion Cluster Demo — single-port IDE controlling boss and minions with separate tasks, scan times, and live variable windows

Distributed Performance (Whitepaper Results)

Measured on a 24-core / 32-thread AMD system running PID loop workloads:

Metric Result
Monolithic vs. Distributed 10.4x throughput improvement (same 1,000-line workload, 10 minions)
Linear Scaling 97.7% efficiency at 400 minions, 94.9% at 500
Peak Throughput 620,949 aggregate scans/s at 50μs scan (31 minions, 100.1% efficiency)
DataLayer Latency 1.7μs avg, 5.5μs p95, 8.2μs p99
RT Mode Jitter 5.5x reduction at p95 (890μs → 163μs)
Container Overhead ~2% scan time, 0% scaling efficiency
Projected (768 threads) ~13M aggregate scans/s, ~12,000 simultaneous PID loops

Industry Comparison:

Platform Min Cycle Max Cores Aggregate Scans/s Architecture
Beckhoff TwinCAT 3 50μs 4-8 (1 per task) ~20,000 Windows CE/RTOS
Siemens S7-1500 250μs 1 (ASIC) ~4,000 Proprietary
Allen-Bradley ControlLogix 500μs 1 (per chassis) ~2,000 Single-threaded
GOPLC 50μs All available 620,949 Distributed goroutines

See the full Clustering Whitepaper (PDF) for architecture details, methodology, and complete benchmark data. See also the DC Simulation Hardware Whitepaper for hyperscale deployment estimates (50 MW–1 GW).


Redundancy & Failover

GOPLC supports hot-standby redundancy with automatic failover for high-availability deployments. A Supervisor monitors identical primary and backup clusters — if the primary fails, the supervisor switches to the backup with zero data loss.

Redundancy Architecture

Failover Performance & Strategies

Three redundancy strategies with sub-second failover, automatic failback, and zero data loss via store-and-forward buffering:

Failover Timing Performance

Data Pipeline

Both clusters independently publish telemetry for failover timing analysis and data continuity verification:

Failover Data Pipeline


Authentication

Optional JWT-based authentication that protects engineering endpoints while leaving operator paths open.

Access Control

Path Type Examples Authentication
Public /hmi/*, /api/variables, /api/tags, /ws None required
Protected /ide/*, /api/programs, /api/runtime, /api/tasks, /api/cluster, /api/config, /api/debug Bearer token required

Features

  • Disabled by default — zero friction for development and standalone use
  • HMAC-SHA256 tokens with configurable expiry (no external dependencies)
  • Bcrypt password verification for secure credential storage
  • Login page with token refresh and logout
  • Operator-friendly — HMI dashboards and variable read/write work without credentials

Configuration

api:
  auth:
    enabled: true
    jwt_secret: "your-jwt-secret"     # auto-generated if empty (won't survive restart)
    token_expiry_hours: 24
    users:
      - username: admin
        password_hash: "$2a$10$..."   # bcrypt hash
# Generate a bcrypt hash for the config
goplc auth hash-password mypassword

# Generate a random JWT secret
goplc auth generate-secret

Licensing

HMAC-signed license keys with cloud activation. Runs in a 2-hour restartable demo mode until activated.

Activation Flow

  1. Get your installation ID: GET /api/license/info
  2. Enter your license key in the IDE or via API
  3. Automatic cloud activation validates the key and binds to your machine
  4. Done — license persists across restarts and updates
Status Meaning
demo 2-hour trial, restartable via API
active Valid unlock code installed
expired Demo expired, activation required
# Check license status and get installation ID
curl http://localhost:8082/api/license/info

# Activate with an unlock code
curl -X POST http://localhost:8082/api/license/activate \
  -H "Content-Type: application/json" \
  -d '{"unlock_code": "GOPLC-XXXXXXXXXXXXXXXX"}'

# Restart the 2-hour demo timer
curl -X POST http://localhost:8082/api/license/restart-demo

License cache is Fernet-encrypted and stored outside the bind-mounted data directory. Unlock codes are HMAC-signed — the binary verifies only; generation uses a separate developer-side tool. The PURGE_LICENSE=true environment variable wipes license data on startup for clean reinstalls.


Snap / ctrlX CORE

Package GOPLC as an Ubuntu Core snap for the Bosch ctrlX CORE ecosystem (ARM64, strict confinement).

make snap-stage            # ARM64 target (ctrlX CORE)
make snap-stage-amd64      # amd64 (local testing)
./build-snap.sh            # Full build + snapcraft pack

Post-install configuration via snap set:

sudo snap set goplc-runtime api-port=8082
sudo snap set goplc-runtime cluster=true minions=4
sudo snap restart goplc-runtime

ctrlX Data Layer Integration

Two approaches for integrating with the ctrlX ecosystem:

EtherCAT I/O (Real-Time Hardware I/O)

Direct read/write of EtherCAT digital I/O modules with dual transport:

// Native IPC mode — 500 Hz polling, sub-millisecond latency
CTRLX_EC_CREATE('ec1', '', '', '', 'XI110116', 'XI211116', 16, 16, 10, 'dl');
CTRLX_EC_START('ec1');

// Read inputs, write outputs
di_val := CTRLX_EC_READ_DI('ec1', 1);
write_ok := CTRLX_EC_WRITE_DO('ec1', 1, TRUE);  // Returns FALSE if disconnected

// Switch to REST mode (no recompile needed)
CTRLX_EC_CREATE('ec2', '', '', '', 'XI110116', 'XI211116', 16, 16, 100, 'rest');
Transport Polling Avg Scan I/O Rate Determinism
REST 100ms 1.2ms 10 Hz Variable (HTTP stack)
Native IPC 2ms 0.69ms 500 Hz Consistent (direct IPC)
  • Uses official Bosch ctrlx-datalayer-golang/v2 SDK (CGo) for native IPC
  • Verified on ctrlX CORE X3 (ARM64) with physical loopback testing
  • CTRLX_EC_WRITE_DO returns FALSE on disconnect — ST-level fault detection
  • 10 ST functions for full I/O lifecycle management

Data Layer Bridge (Variable Synchronization)

Bidirectional variable sync between GOPLC and the ctrlX Data Layer:

ctrlx_datalayer:
  enabled: true
  base_url: "https://localhost"
  username: "ctrlx-user"
  password: "ctrlx-password"
  publish_prefix: "goplc-runtime"        # ctrlX node path prefix
  publish_vars: ["temp_c", "pump_on"]    # PLC → ctrlX Data Layer
  subscribe_vars: ["ctrlx/setpoint"]     # ctrlX Data Layer → PLC
  sync_interval_ms: 100
  insecure_tls: true
  • PLC variables published as ctrlX Data Layer nodes under publish_prefix/
  • ctrlX nodes read back into PLC variables on each sync interval
  • Authenticates via ctrlX identity manager JWT
  • Pure HTTP/REST — no native libraries required

Datacenter Gateway

GOPLC as a universal protocol gateway for data center infrastructure management — bridging CRAC units, PDUs, UPS systems, fire suppression, and building automation into a unified SCADA layer.

Three-Tier Architecture

Corporate Layer (Grafana, SCADA, cloud)
         │
    Site Supervisor (GOPLC Boss)
    ├── OPC UA clients to each edge
    ├── MQTT subscriber (primary path)
    └── DNP3 master (failover path)
         │
    Edge Modules (GOPLC Clusters)
    Boss → per-protocol minions
    ├── Modbus TCP/RTU (CRAC, UPS, VFD)
    ├── BACnet/IP (AHU, dampers, lighting)
    ├── EtherNet/IP (power meters)
    └── SNMP v3 (smart PDUs, switches)

Dual-Path Communication

  • Primary: MQTT publish/subscribe (sub-second latency)
  • Failover: DNP3 outstation with store-and-forward (SQLite buffer, GZIP + AES-256-GCM encryption)
  • Automatic switchover when MQTT path goes stale

See the full Datacenter Gateway Whitepaper for architecture details and deployment examples. For scale analysis and cost modeling see the Hardware Gateway Whitepaper and Virtualized Gateway Whitepaper.


Download

Pre-built binaries for Windows and Linux — single ~30 MB download, no installer needed.

Platform Architecture Download
Windows x86_64 goplc-v1.0.520-windows.zip
Linux x86_64 (amd64) goplc-v1.0.520-linux-amd64.tar.gz
Linux ARM64 (aarch64) goplc-v1.0.520-linux-arm64.tar.gz

Visit jmbtechnical.com/goplc/download to download the latest release.

What's included: goplc binary, launcher script (app-mode browser), config.yaml, and a sample counter.st program. Extract, run, and open your browser — that's it.

Licensing: Runs in a 2-hour restartable demo mode out of the box. Activate with a license key for unlimited use. See Licensing for details.


Quick Start

1. Download & Extract

Visit jmbtechnical.com/goplc/download and grab the package for your platform.

# Linux
tar xzf goplc-v1.0.520-linux-amd64.tar.gz
cd goplc

# Windows — unzip goplc-v1.0.520-windows.zip

2. Run

# Linux — launches GOPLC and opens browser in app mode
./start-goplc.sh

# Windows — double-click start-goplc.bat
# Or run directly:
./goplc --config config.yaml

3. Open the Web IDE

Navigate to http://localhost:8082/ide/ in your browser.

Docker (Alternative)

Build a container from the downloaded binary:

FROM alpine:3.19
COPY goplc /usr/local/bin/goplc
COPY config.yaml /app/config.yaml
EXPOSE 8082 502
WORKDIR /app
ENTRYPOINT ["goplc", "--config", "/app/config.yaml"]
# Extract the Linux binary, then build and run
docker build -t goplc:latest .
docker run -d --name goplc \
  -p 8082:8082 \
  -p 502:502 \
  -v $(pwd)/data:/app/data \
  goplc:latest

Configuration Example

# config.yaml
runtime:
  log_level: info

tasks:
  - name: FastTask
    type: periodic
    scan_time_us: 100      # 100 microsecond scan
    priority: 1
    watchdog_ms: 10
    programs:
      - fast_control.st

  - name: SlowTask
    type: periodic
    scan_time_ms: 100      # 100ms scan
    priority: 10
    programs:
      - monitoring.st

protocols:
  modbus:
    enabled: true
    port: 502
  opcua:
    enabled: true
    port: 4840

nodered:
  enabled: true
  auto_start: true

ai:
  provider: "claude"
  api_key_env: "ANTHROPIC_API_KEY"

api:
  port: 8082

Examples

Structured Text Programs

See the examples/st/ directory for 14 ready-to-run programs:

Example Description
pid_control.st PID loop with anti-windup and bumpless transfer
modbus_gateway.st Bridge between Modbus TCP devices
modbus_client.st Modbus TCP client — registers, coils, read-verify
data_sync.st Multi-PLC DataLayer synchronization
alarm_handler.st Alarm management with shelving and history
bacnet_client.st BACnet/IP client — read objects, track status
dnp3_master.st DNP3 master — analog/binary inputs, pump control
enip_scanner.st EtherNet/IP scanner — CIP tag read/write
esp32_io.st ESP32 remote I/O — 8 DI, 8 DO, 3 AI, 2 PWM, NeoPixel
fins_client.st Omron FINS client — DM word read/write
iec104_client.st IEC 60870-5-104 client — SP, DP, floats, counters
mqtt_publish.st MQTT pub/sub — telemetry, commands, liveness
opcua_client.st OPC UA client — node read/write, method calls
datalayer_ethercat.st ctrlX EtherCAT I/O — native IPC, DI/DO toggle

Configuration Examples

See the examples/configs/ directory:

Config Description
modbus_server.yaml Modbus TCP server with I/O mapping
multi_plc.yaml DataLayer sync between PLCs
realtime.yaml Real-time container mode
full_stack.yaml All protocols enabled

Architecture

GOPLC Runtime Architecture

Multi-PLC Clustering

Multi-PLC Clustering


Performance

GOPLC Stress Test Walkthrough
Click to watch: Stress Test Walkthrough

Live Multi-PLC Benchmark (January 2026)

3 GOPLC instances running simultaneously with DataLayer synchronization:

Live Multi-PLC Benchmark

Test Configuration:

  • 3 PLCs with DataLayer TCP sync (server + 2 clients)
  • 9 programs per PLC: math, arrays, strings, JSON, datetime, regex, crypto, datastructures
  • Each PLC running ~4,500 lines of Structured Text
  • Modbus TCP servers on each PLC (ports 5601-5603)
  • Real-time variable synchronization across all nodes

Modbus Stress Test (January 2026)

Modbus Stress Test

Modbus Scalability Test - 500 Servers (January 2026)

Modbus 500 Servers Benchmark

PTR_QW Feature: New system constants for pointer arithmetic with I/O memory:

  • PTR_QW - Base pointer for output words (%QW)
  • PTR_IW - Base pointer for input words (%IW)
  • PTR_MW - Base pointer for marker words (%MW)

Enables efficient bulk I/O operations: (PTR_QW + offset)^ := value

Modbus Scalability Test - 5000 Servers (January 2026)

5000 Server Benchmark

Configuration:

  • 5000 concurrent Modbus TCP servers on ports 7000-11999
  • ST program: Counter + GSV_TASKSCANTIME() writing to %QW0-1
  • All servers receive same PLC outputs via driver broadcast

Results:

Metric Value
Scan Execution Time 20-50µs (avg 30µs)
Memory Usage 780 MB (~156 KB/server)
CPU Usage 50%
Stability 12+ minutes, 0 errors

Scan Time Distribution

Driver Broadcast Architecture:

Driver Broadcast

Cluster Mode - Idle vs Running Programs (January 2026)

PLC Cluster Benchmark Comparison

Test Configuration:

  • Intel i9-13900KS (32 threads), 62 GB RAM
  • Single-process architecture with goroutine-based minions
  • Each minion has fully isolated PLCContext (protocols, connections, data)
  • Boss API proxies to minions via Unix sockets

Idle Minions (scheduler only):

Minions RAM Per Minion CPU
1,000 3.4 GB 3.4 MB 24%
5,000 20 GB 4.0 MB 67%
10,000 37.4 GB 3.9 MB 108%

Running ST Programs (50x SIN/COS, string ops, 100ms scan):

Minions RAM Per Minion CPU Load
1,000 15.8 GB 15.8 MB 63% 2.96
3,000 48 GB 16 MB 188% 7.38

Key Findings:

  • Idle: ~3.9 MB/minion → ~9,000 minions at 75% resources
  • Running: ~16 MB/minion (4x overhead) → ~2,500 minions at 75% resources
  • Memory is the limiter, not CPU

Benchmarks

Metric Result
Scan execution time 20-50μs (5000 servers)
Minimum scan interval 100μs sustained
Modbus throughput 89,769 req/sec (100 connections)
Modbus scalability 5000 servers (780 MB), 500 clients (0 errors)
PTR_QW writes ~300,000 registers/sec
DataLayer latency <1ms P50, <3ms P99
Memory footprint ~65MB typical, ~150MB with DataLayer
Distributed speedup 10.4x throughput (same workload, 10 minions)
Aggregate throughput 620,949 scans/sec (31 minions at 50μs)
ST functions 1,900+ available
Lines of code 280,000+ Go

Latency Distribution (2ms scan, DataLayer TCP)

Latency Distribution

ctrlX EtherCAT Native IPC (March 2026, X3 Hardware)

Measured on Bosch ctrlX CORE X3 (ARM64 Cortex-A53) with XI110116 (16 DI) + XI211116 (16 DO) physical loopback:

Metric REST Mode Native IPC Mode
Poll interval 100ms 2ms
Task scan time 50ms 5ms
Avg scan duration 1.2ms 0.69ms
Max scan duration 30ms 13ms
I/O update rate 10 Hz 500 Hz
Read errors 0 0
Watchdog trips 0 0

The native IPC path uses the official Bosch ctrlx-datalayer-golang/v2 SDK — direct function calls through libcomm_datalayer.so instead of HTTP/TLS/JSON. The EtherCAT bus itself cycles at 2ms (500 Hz), and native IPC matches that rate with zero errors.


REST API

Full REST API for integration with SCADA, MES, and custom applications.

Key Endpoints

Endpoint Description
GET /api/tags List all tags with values
GET/PUT /api/variables/:name Read/write variables
POST /api/runtime/start Start PLC runtime
POST /api/runtime/stop Stop PLC runtime
POST /api/tasks/:name/reload Hot-reload a single task
GET /api/diagnostics Full runtime diagnostics
GET /api/capabilities List supported protocols, functions, clustering
GET /api/docs/functions All 1,900+ function signatures
GET /api/analyzer/transactions Protocol capture data
GET /api/cluster/:name/*path Proxy to cluster minion
GET /api/nodered/status Node-RED subprocess status
GET /api/debug/step/state Debugger state and position
GET /ws WebSocket for real-time updates

See docs/API.md for complete API reference.


Diagnostics

Per-Module Debug System

Runtime-toggleable logging with per-module granularity. 15+ modules including webui, nextion, modbus, fins, enip, opcua, datalayer, hal, and more.

# Get debug status for all modules
curl http://localhost:8082/api/debug/status

# Set module-specific log level
curl -X PUT http://localhost:8082/api/debug/runtime/modules/modbus \
  -d '{"level": "trace"}'

# View debug ring buffer (optionally filter by module)
curl http://localhost:8082/api/debug/log?module=modbus

# Enable/disable entire debug system
curl -X POST http://localhost:8082/api/debug/runtime -d '{"enabled": true}'

Use Cases

GOPLC is designed for:

  • Industrial Automation - Replace or supplement traditional PLCs
  • Protocol Gateway - Bridge between different protocols (data center, building, utility)
  • Edge Computing - Run on Raspberry Pi, industrial PCs, Bosch ctrlX CORE
  • Distributed Control - Boss/Minion clustering for large installations
  • HMI/SCADA Backend - Node-RED dashboards + high-performance data collection
  • Fleet Management - Centrally manage and deploy to hundreds of remote GOPLC nodes
  • Robotics & Motion - MC_* motion control functions, servo coordination, sensor fusion
  • Simulation - Test automation logic without hardware
  • Education - Learn PLC programming with modern tools

Whitepapers

Whitepaper Description
Clustering: Distributed Real-Time PLC Performance (PDF) Architecture, benchmark methodology, and measured results: 10.4x throughput improvement, 620,949 aggregate scans/sec, linear scaling to 500+ minions, water treatment plant validation
Datacenter Gateway: Universal Protocol Gateway (PDF) Three-tier DC hierarchy, 12 protocol drivers, dual-path MQTT + DNP3 store-and-forward, redundancy strategies, AI-assisted commissioning, ctrlX CORE deployment
DC Simulation: Hardware Gateway Architecture (PDF) 11 device simulators, 6 gateway blueprints, scale estimates 50 MW–1 GW, ctrlX CORE edge SBC deployment, standalone vs cluster decision matrix, full cost model
DC Simulation: Virtualized Gateway Architecture (PDF) Server VM gateways via Cisco SVI routing, 51–66% total cost reduction vs hardware, migration path, IEC 62443 security considerations
The Operator's Revenge: Industrial Control at Software Speed Why industrial automation needs a software-native PLC runtime — 30 MB install vs multi-GB IDE installs, browser-based programming, zero proprietary cables
Planetary Scale: From Edge to Orbit 10,000 full runtimes on one desktop, 250M+ projected deterministic runtimes at datacenter scale, memory-wall analysis, DataLayer at planetary scale
Humanoid Robotics: Real-Time Control for Next-Gen Robots (PDF) GOPLC as a real-time control backbone for humanoid robotics — servo coordination, sensor fusion, safety interlocks, deterministic motion planning

License

GOPLC is proprietary software. Contact jbelcher@jmbtechnical.com for licensing inquiries.


Built with Go
Industrial-grade automation for the modern world

About

Industrial-grade PLC runtime in Go. IEC 61131-3 Structured Text, 14+ protocol drivers, Web IDE, AI-native MCP server. Runs on Windows or Linux.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors