In industrial control systems based on embedded Linux, achieving deterministic execution alongside general-purpose processing is a key requirement. PLCnext provides an architecture that combines a real-time Linux kernel with a dedicated control runtime, enabling predictable PLC cycle execution while maintaining access to standard Linux capabilities.
What makes PLCnext interesting is not just that it runs on Linux, but how it structures execution, scheduling, and data exchange so that PLC behavior remains deterministic even when mixed with C++ applications and services.
Introduction
Industrial systems are no longer isolated control loops; they are expected to be connected, data-driven, and continuously adaptable. Traditional PLCs provide reliability and deterministic behavior but often limit integration with modern software ecosystems.
PLCnext Technology addresses this by combining PLC reliability with Linux flexibility. However, this is not simply a coexistence of PLC and Linux - it is a tightly integrated system where a dedicated runtime coordinates execution.
This allows control logic, diagnostics, communication, and higher-level processing to run together, while still respecting strict real-time constraints.
Plcnext architecture overview
PLCnext combines an embedded Linux environment with industrial control and PREEMPT_RT is a key enabler for reducing latency. However, deterministic behavior does not come from Linux alone, it is enforced by the PLCnext Runtime.
Figure 1. PLCnext Technology system architecture
The runtime is responsible for:
- Executing IEC 61131-3 tasks cyclically
- Scheduling components in a deterministic order
- Managing shared data access
- Handling application lifecycle
Execution and Synchronization Manager (ESM)
A key part of the runtime is the Execution and Synchronization Manager (ESM). Instead of running independent tasks, PLCnext builds an execution graph.
- Defines execution order of PLC and C++ components
- Ensures deterministic timing within a cycle
- Coordinates data flow between components
This is what allows IEC logic and C++ code to coexist safely within the same control cycle.
Global Data Space (GDS)
PLCnext uses the Global Data Space (GDS) for data exchange instead of traditional Linux IPC.
- Centralized variable storage
- Cycle-synchronized access
- Prevents race conditions and inconsistent reads
Although it looks simple from the API perspective, GDS is one of the main reasons deterministic behavior is preserved.
PREEMPT_RT and Real-Time Guarantees
Although it looks simple from the API perspective, GDS is one of the main reasons deterministic beh>The PREEMPT_RT patch is fundamental to PLCnext's ability to deliver real-time performance on Linux. Without PREEMPT_RT, Linux kernel operations can cause unpredictable latency spikes that violate timing deadlines. PREEMPT_RT addresses this by:
- Making more kernel code preemptible: Tasks can be interrupted at more points, reducing maximum latency.
- Converting spinlocks to mutexes: Prevents busy-waiting and allows fair priority scheduling.
- Improving interrupt handling: Hard interrupts are converted to threaded handlers with configurable priorities.
- Supporting priority inheritance: Ensures high-priority tasks are not blocked by lower-priority ones.
Core PCLnext Components
PLCnext Control Hardware
The PLCnext Control device is the hardware foundation. It combines a real-time PLC runtime with an embedded Linux system.
Key Features:
- IEC 61131-3 compliant PLC runtime for standard automation tasks
- Linux-based OS for running complex applications (C++, Python, etc.)
- Real-time deterministic control alongside high-level computation
- Open architecture for third-party apps and libraries
PLCnext Engineer IDE
PLCnext Engineer is a programming environment designed for control engineers. It allows:
- Development using IEC 61131-3 languages (Ladder, Function Block, Structured Text)
- Integration of C++ libraries and applications into PLC projects
- Deployment of applications directly to PLCnext hardware
- Task cycle times and priorities
- Program instantiation
- Process data mapping
Incorrect configuration here can directly affect real-time behavior.
Example Use Case: You can use Ladder logic for controlling a motor while simultaneously running a C++ vision algorithm to detect defects on a conveyor belt. Both execute deterministically on the same hardware without compromising either.
PLCnext Toolchain and SDK
For C/C++ development, PLCnext does not rely only on the IDE. It provides a dedicated toolchain and SDK that defines how applications are built, packaged, and deployed to the controller.
The PLCnext SDK is based on a Yocto-derived cross-compilation environment and includes:
- Cross-compiler targeting the PLCnext architecture
- Target sysroot with headers and libraries matching the runtime
- Predefined templates for C++ components and applications
- Build and packaging tools compatible with the PLCnext Runtime
A key point is that applications must be built against the same runtime environment as the controller. This is why the SDK is tightly coupled with firmware versions—mismatches can lead to runtime issues or deployment failures.
SDK Extensibility and Yocto Integration
Since the SDK is based on Yocto, it can be extended with additional layers and packages. This allows developers to include:
- Additional libraries (e.g., database clients, communication stacks)
- Frameworks such as Qt
- Custom system services
However, extending the SDK must be done carefully. Adding heavy dependencies or modifying the base system can introduce timing issues or break compatibility with the PLCnext Runtime.
In practice, a good approach is to:
- Keep real-time components minimal and deterministic
- Move complex or non-deterministic logic into separate processes
- Validate all additions against the target firmware and SDK version
plcncli and Build Workflow
The PLCnext Command Line Interface (PLCnCLI) is used to manage the full development workflow:
- Project creation using templates
- Building and packaging applications
- Deployment to the controller
Typical workflow:
# Create new project from template plcncli create project MyComponent # Build project plcncli build # Package for deployment plcncli package
The template system is important because it enforces the correct structure for components, libraries, and metadata required by the runtime. Skipping templates or manually structuring projects often leads to subtle issues during deployment.
C++ Integration via Application Component Framework (ACF)
C++ applications are integrated through the Application Component Framework (ACF), meaning they become runtime components.
- IProgram: cyclic execution (like PLC)
- IComponent: service or event-driven logic
#includeusing namespace pxcIec61131; uint32_t ReadMotorSpeed() { return Gbl_MotorSpeed.Get(); } void SetMotorCommand(uint16_t command) { Gbl_MotorCommand.Set(command); }
Access goes through GDS, ensuring synchronization with the PLC cycle.
System Manager and Component Lifecycle
The System Manager controls:
- Component startup and shutdown
- Monitoring and supervision
- Dependency handling
Each component follows a defined lifecycle (init, start, run, stop), ensuring predictable system behavior.
Operating System Considerations
- Overlay filesystem: not all changes persist
- Root access: powerful but risky
- ACLs: restrict access to runtime resources
- System time: critical for synchronization
Practical example: Railway infrastructure control
In industrial automation scenarios such as railway infrastructure, precise timing and deterministic execution are critical for safe and reliable operation.
Figure 2. Deterministic control in railway applications
A practical example is the use of PLCnext Technology in systems designed to remove weeds from railway tracks, where control actions must be executed in strict synchronization with train movement and environmental conditions. By using a real-time–managed execution layer, PLCnext ensures that control applications and additional software components run in a predictable and coordinated manner, even when the system is under load.
This allows both traditional PLC logic and higher-level applications to operate together while maintaining the timing guarantees required for real-time control. The combination enables:
- Reliable weed removal: Synchronized control with train position ensures safe and effective operation.
- Data logging: C++ applications capture operational metrics for analysis and reporting.
- Diagnostics: Linux services provide remote monitoring and predictive maintenance.
- Adaptability: Software updates and new features can be deployed without hardware changes.
Why PCLnext is attractive for C/C++ and Linux Developers
Many C/C++ and Linux developers have traditionally worked outside industrial automation, often in domains such as embedded devices, networking, desktop software, or backend systems. PLC engineering can seem like a different world, with different tools, workflows, and expectations.
Figure 3. Bridging technology for industrial automation - PLCnext connects software engineering culture with industrial control practices
PLCnext Technology helps close that gap by combining classic PLC reliability with an open Linux-based development model. This means developers can apply familiar skills such as:
- Modern C++ (C++11 and later standards)
- POSIX/Linux tooling and APIs
- Cross-compilation and embedded development
- Version control (Git) and CI/CD pipelines
- Standard software architecture practices (MVC, design patterns, testing frameworks)
For developers who have never worked with PLCs, this is a practical entry point into a new industry without abandoning their existing technical strengths. Instead of switching to a completely unfamiliar ecosystem, they can build on what they already know and contribute to real-time industrial applications using technologies like those used in other Linux-based software projects.
In this way, PLCnext creates a bridge between established software engineering culture and modern industrial control. It also creates professional resilience. If there is instability in the current sector, these developers can look for opportunities in industrial automation, where software and control systems are increasingly converging. In that sense, PLCnext is not only a technical bridge, but also a career bridge: it opens access to a different industry while still rewarding the same core engineering strengths.
Technical Challenges
The technical challenges of PLCnext encompass several key aspects that ensure system reliability and efficiency in real-time:
- Balancing real-time and general workloads: Real-time tasks must remain uninterrupted even when Linux applications are running simultaneously. PLCnext achieves this through priority-based scheduling and clearly separated execution environments, which guarantee predictable system behavior at all times.
- Inter-process communication (IPC): Instead of traditional mechanisms, the Global Data Space (GDS) is used to exchange data between processes. This approach enables deterministic data access, which is critical for the stability of real-time systems.
- Debugging and monitoring: Debugging PLCnext systems requires a combination of tools. PLCnext Engineer allows detailed inspection of program logic, buffered logging tracks the execution of C++ code, and SSH access enables system diagnostics. It is important to avoid breakpoints in real-time paths to preserve timing accuracy.
- Memory management: Dynamic memory allocation in real-time code is not recommended due to unpredictable execution times. Instead, pre-allocated buffers and memory pools are used, ensuring consistent and reliable behavior.
- Future development directions: PLCnext is continuously expanding its capabilities through AI acceleration, FPGA integration, and distributed real-time systems (TSN). It is also enhancing debugging and monitoring tools and applying edge machine learning technologies to address modern industrial challenges.
This combination of solutions allows PLCnext systems to remain flexible, stable, and prepared for modern industrial challenges, while maintaining high precision and real-time control.
Conclusion
PLCnext Technology successfully bridges classical industrial automation with modern software engineering by combining a PREEMPT_RT-enabled Linux kernel with an IEC 61131-3 compliant PLC runtime. This architecture enables C/C++ developers to contribute to automation systems without abandoning their existing skills or adopting rigid, proprietary toolchains.
For industrial systems, PLCnext offers tangible benefits:
- Determinism: Real-time control tasks maintain predictable cycle times and latencies.
- Openness: Standard languages, tools, and libraries are available for application development.
- Flexibility: Systems can evolve with modern capabilities (cloud connectivity, diagnostics, AI) without sacrificing control reliability.
- Accessibility: Software engineers can enter the automation industry with existing knowledge, creating a talent pipeline for modernization.
While challenges remain—particularly in managing shared resources, debugging deterministic code, and maintaining vendor support during customization, the PLCnext architecture and ecosystem provide practical solutions. Organizations adopting PLCnext gain systems that are both robust and adaptable, positioning themselves for long-term success in increasing software-driven automation.
Further improvements and research areas for PLCnext could be integration with FPGA or dedicated AI accelerators while maintaining determinism through careful resource scheduling incorporating lightweight ML models for predictive control and anomaly detection while preserving real-time guarantees.



