Introduction: When Industrial PC Meets Soft PLC
In the field of automation, traditional hardware PLCs such as Siemens S7-1500 and Rockwell ControlLogix have long dominated. However, with the soaring performance of PCs and the maturity of the industrial software ecosystem, PC based soft PLCs (SoftPLCs) are gradually penetrating into scenarios such as process control, discrete manufacturing, and building automation. CODESYS Control Win SL is a representative product of this trend - it transforms an industrial PC running Windows into a high-performance controller that complies with the IEC 61131-3 standard, with performance almost linearly expanding with PC hardware.
But soft PLC is not omnipotent. Its "soft real-time" feature determines that it cannot replace hard real-time systems (such as VxWorks with RTX extensions or Windows with INtime). This article aims to provide engineers with a comprehensive guide from deployment to troubleshooting, covering installation, fieldbus configuration, license management, redundancy options, and in-depth analysis of common faults.
System architecture and real-time performance: understanding the boundaries of 'soft real-time'
2.1 Working principle
CODESYS Control Win SL runs as a Windows user mode process, using CODESYS Development System (V3.5.17.20 or higher) to write, compile, and download applications. The runtime system is responsible for:
Load and execute application code in binary format
Manage I/O systems and fieldbus stacks
Support retention data (battery backup SRAM, flash memory, CF card)
Provide debugging interfaces (breakpoints, single steps, variable monitoring)
2.2 Soft Real Time vs Hard Real Time
Unlike controllers based on dedicated RTOS, Windows itself is a non real time operating system (thread scheduling latency can reach several milliseconds). CODESYS Control Win SL does not provide a "hard real-time" guarantee, but has soft real-time features:
In most cases, the IEC task cycle can be maintained within the expected range
But occasionally there may be significant delays, and the frequency of delay exceeding the limit may be high
Suitable for control circuits that are insensitive to time jitter (such as HVAC, material handling, non safety level process control)
Typical latency data: On a regular industrial computer (Intel Core i5, 8GB RAM, Windows 10 LTSC), the typical jitter of a 1ms cycle task is ± 200 μ s, but a long delay of 10ms may occur every 10 minutes (caused by Windows backend services). For applications that require sub millisecond level certainty, such as servo interpolation and high-speed injection molding machines, please choose CODESYS Control RTE (with real-time extension) or hardware PLC.
2.3 System Requirements and Limitations
Project requirements
Operating system Windows 10/11/Embedded (32 or 64 bit), requires official Microsoft support version
CODESYS Development System V3.5.17.20 and above
Hardware arbitrary industrial PC, it is recommended to disable CPU power-saving mode
Explicitly prohibit running in containers (Docker) or virtual machines (VMware/Hyper-V)
Real time level soft real-time, does not meet the requirements of hard real-time
Why ban virtual machines? The hypervisor can introduce unpredictable scheduling delays and timer drift, causing IEC task cycles to deviate significantly from set values and even trigger watchdog resets.
Installation and Basic Configuration: Step by Step Towards Stable Operation
3.1 Installation steps
Download the installation package (zip file containing 32/64 bits of Setup. exe) from the CODESYS Store.
Run Setup. exe as an administrator and select the target folder (it is recommended to default to C: Program Files CODESYS).
During the installation process, check the required additional components (such as OPC UA Server, Npcap driver - the latter is required for EtherCAT/PROFINET, etc.).
Restart the PC (some network drivers require a restart to take effect).
3.2 First Startup and Demonstration Mode
After installation, launch "CODESYS Control Win SL" from the start menu. The system defaults to demonstration mode:
Can run continuously for 2 hours without a license
After 2 hours of operation, the system will stop and the service or PC needs to be manually restarted
Demo mode supports all functions, limited to continuous running time only
Verify the running status: In the CODESYS development system, click "Online" ->"Login", and select the "CODESYS Control Win SL" target. If the connection is successful and the task cycle is normal, it indicates that the installation is correct.
The Importance of Npcap Driver 3.3
Many fieldbuses (see table below) rely on Npcap (a network packet capture library based on WinCcap) to transmit and receive raw Ethernet frames. If it is not installed or the version is incompatible, it will cause the bus to fail to initialize. Suggestion:
Download the latest official version (≥ 1.10) from the Npcap official website
Check 'Install in WinCcap API compatible mode' during installation
If using Wireshark at the same time, ensure that the Npcap driver is not overwritten