Learn how EdgePLC with CODESYS, 6 TOPS NPU, and local AI agents cuts changeover from 90 to 15–25 minutes and raises die-casting yield by 4.2% on a flexible line.
Case Details
The Challenge
A precision die-casting manufacturer running high-mix, low-volume orders faced familiar problems: manual machine adjustment with long changeover times, process knowledge concentrated in veteran workers, a stack of separate devices (PLC + industrial PC + vision host + gateway), AI inspection that only rejected defects without closing the control loop, cloud-dependent analysis with latency and connectivity risks, and fragmented protocols across equipment brands.
The goal: a locally autonomous industrial AI agent that brings perception, inference, decision-making, control, and self-learning to the edge—so the controller itself can understand conditions, adjust parameters, handle anomalies, and keep improving.
Why EdgePLC
EdgePLC was selected as the hardware foundation. Based on Rockchip RK3588J with a 6 TOPS NPU, Linux-RT kernel, native CODESYS Runtime, IEC 61131-3/61499 support, EtherCAT, and distributed I/O, one device carries three roles:
- Real-time control: CODESYS runs standard PLC logic for die-casting machines, mold temperature units, robots, and conveyors. Engineers keep ladder diagram and ST development; existing programs migrate.
- AI agent engine: Vision inspection, process optimization, fault diagnosis, and scheduling agents run inside the same EdgePLC, supporting YOLO inference, time-series prediction, and parameter optimization.
- Protocol gateway: BLRAT remote O&M and Node-RED orchestration connect to MES/SCADA via OPC UA/MQTT, uploading on demand without continuous cloud connectivity.
Unlike separate AI and control devices, EdgePLC links AI inference results directly to PLC variables. Optimized parameters and anomaly commands reach the real-time control layer in milliseconds, forming a local closed loop: perception → inference → decision → execution → feedback.
Agent Architecture
Multiple EdgePLCs form a distributed agent cluster:
- Visual inspection agent: Runs defect detection locally—cracks, porosity, missing material, flash. Extracts defect type and location, correlates with the full process curve, and sends results to the process agent and PLC.
- Autonomous process optimization agent (core): Reads pressure, temperature, and speed curves in real time, compares against the optimal baseline, and outputs adjustments for holding time, injection pressure, and cooling. Updates PID and recipes automatically. For new materials or products, proposes an initial process plan and converges quickly with minimal trial data.
- Equipment diagnosis and safety interlock agent: Monitors vibration, current, and oil temperature for early wear, valve sticking, and abnormal temperature. A safety vision agent detects intrusion or door opening, triggers IEC 61499 events, and shuts down with alarms—cross-controller interlock within 100 ms, no cloud relay.
- Flexible scheduling agent: Matches MES orders to process packages, coordinates robots, die-casting units, and inspection stations, and generates batch reports and adjustment logs.
All agents are containerized on EdgePLC. The cloud only handles model updates and data review. During network outages, all agents continue autonomously.
Results After Six Months
- Changeover time: 90 minutes → 15–25 minutes; process knowledge retained in edge agents.
- Yield: +4.2%, with defect traceability and process pre-prevention replacing after-the-fact rejection.
- Hardware: A single EdgePLC replaced industrial PC, vision host, and gateway—deployment cost down about 55%, with less cabinet space, wiring, and O&M.
- Downtime: Unplanned downtime down 28% through predictive diagnosis; millisecond safety interlock improves high-risk station safety.
- Flexibility: Seamless small-batch multi-order switching; more models per day.
- Network independence: Inspection, process control, safety, and fault warning run independently during outages; data caches and syncs on recovery.
Customer Feedback
“We used to think of AI as cloud reports and image review. With EdgePLC, AI became an on-site agent that adjusts processes, manages safety, and understands equipment. The controller does PLC real-time control while autonomously thinking and optimizing—real industrial AI, not a demo.”
Value and Expansion
The solution provides a replicable path: no need to overturn existing automation. On top of the familiar CODESYS PLC ecosystem, edge agents add large-model, vision, and autonomous optimization capabilities while preserving deterministic safety.
Applicable to injection molding, die-casting, stamping, chemical and pharmaceutical reactor APC, energy storage BMS thermal runaway warning and cell balancing, logistics sorting with vision, and multi-AGV or inspection robot local perception and decision-making.