Welcome to the Industrial Automation website!

NameDescriptionContent
XING-Automation
E-mail  
Password  
  
Forgot password?
  Register
当前位置:

CODESYS Control Win SL Soft PLC

F: | Au:FANS | DA:2026-05-15 | 577 Br: | 🔊 点击朗读正文 ❚❚ | Share:

CODESYS Control Win SL Soft PLC Deployment and Troubleshooting

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


Fieldbus Integration: From Configuration to Troubleshooting

CODESYS Control Win SL supports multiple mainstream fieldbuses from the factory at no additional cost (some protocols require installation of Npcap). The following is the complete support list and configuration points:

The protocol role requires Npcap. Typical application common faults

CANopen manager/device is not distributed I/O, drive control baud rate is inconsistent, terminal resistance is missing

EtherCAT main station is motion control, high-speed IO network card is not compatible (requires Intel PRO/1000 series)

EtherNet/IP scanner/adapter communication with Rockwell PLC package timeout set improperly

J1939 device has no vehicle/engine data address conflict

Modbus TCP master/slave is a universal SCADA connection port 502 intercepted by a firewall

Modbus serial master/slave, old instrument level conversion error (RS232/485)

PROFIBUS DP master station, Siemens system integration, GSD file missing, terminal resistance error

PROFINET controller/device does not match Siemens I/O exchange data device name

Sercos III main station is a high-end motion control ring network disconnection

4.1 EtherCAT Configuration Troubleshooting Example

Phenomenon: After the EtherCAT master station scans, some slave stations display abnormal "Op" status or experience periodic communication interruptions.

Steps:

Confirm that the Npcap driver has been installed correctly and that the network adapter is not occupied by other applications (such as Wireshark).

In the CODESYS device tree, right-click on the EtherCAT master → "Append Device" → select the correct slave XML description file (provided by the slave vendor).

Check physical wiring: Use a cross test wire to connect the PC to the first slave station and observe the slave station indicator light. If the LED "L/A" does not flash, try replacing the network card.

Network card compatibility: CODESYS Control Win SL has poor support for Realtek network cards (prone to frame loss), and it is recommended to use Intel PRO/1000 or PCIe network cards based on Intel chips.

Set task cycle: EtherCAT data refresh should run in a separate high priority task, typically with a cycle of 1-4ms. If the task cycle jitter exceeds ± 20%, the Windows timer resolution needs to be increased (using timeBeginPeriod call or automatically optimized through CODESYS).

4.2 PROFINET device name malfunction

PROFINET IO devices are identified by device names rather than IP addresses. If CI871 or third-party slave cannot connect:

Use PST (Primary Setup Tool) or CODESYS's built-in "PROFINET Device Scan" function to read the current device name.

In the CODESYS configuration, set the "Device Name" to be exactly the same as the slave entity (case sensitive).

If the factory settings are restored from the site, the name needs to be reassigned.

4.3 Modbus TCP connection rejected

In most cases, it is due to the Windows Firewall blocking port 502. Solution:

Add an inbound rule in the control panel for 'CODESYS Control Win SL.exe' to allow TCP port 502.

Or temporarily shut down the firewall for testing (non production environments only).

License management: Avoid two-hour interruptions

5.1 License Types

CODESYS Control Win SL adopts a single device license and can be bound to:

Software container: Bind with the hardware fingerprint (network card MAC, hard disk serial number, motherboard UUID) of the target PC, permanently valid. After replacing the hard drive or network card, reactivation is required.

CODESYS Key (USB hardware dongle): Simply plug it into any PC for easy mobility and temporary replacement.

Order information: Product number 2302000003, purchased through CODESYS Store.

5.2 Activation Process

Install the runtime system on the target PC and obtain the 'Container ID' (displayed in the CODESYS Control Win SL control panel).

Log in to the CODESYS Store, enter the activation code obtained at the time of purchase, and submit the container ID.

Download the license file (. crypto) and import it into the runtime system (via web interface or local file).

Restart the runtime service and confirm that the 'License Info' display is valid.

5.3 Common License Malfunctions

Possible causes and solutions for the fault phenomenon

Still showing that the demo mode license file has not been loaded. Check if the file path contains Chinese or spaces; Re import using the 'Manage License' tool

After activation, it prompts "mismatched" hardware fingerprint change (such as replacing network card). Contact CODESYS support to regenerate container ID

USB dongle not recognized, missing driver installation CODESYS Key driver (located in installation directory Drivers)

The license validity period is shorter than expected. If you purchase a subscription version (annual fee), renew it annually, or purchase a permanent version

Tip: When deploying redundant systems, it is necessary to purchase independent licenses for each PC (redundancy options require additional fees, see the next section).


Product option: Expand the boundaries of soft PLC

CODESYS Control Win SL offers multiple charging options, significantly expanding its application scope. Here are the four most commonly used:

6.1 CODESYS Redundancy SL

Supports redundant switching between primary and backup soft PLCs, suitable for critical processes such as wastewater treatment and energy management. Working Principle:

The main controller monitors the status of the backup machine through heartbeat monitoring

Maintain data synchronization through Ethernet (supports up to 4 redundant devices)

The fault switching time can be configured (typical 100~500ms)

Attention: Redundant functions are sensitive to network latency and must use independent redundant networks (not shared with the control network).

6.2 CODESYS SoftMotion SL

Upgrade the soft PLC to a motion controller that supports:

Single axis position/speed/torque control

Electronic cam (electronic gear)

Multi axis interpolation (lines, arcs, spirals)

Supports EtherCAT or Sercos III drivers

Hard real-time warning: SoftMotion's high-precision interpolation (e.g. cycle 1ms, requiring jitter<50 μ s) may not be met on Win SL. For CNC or robot applications, please upgrade to CODESYS Control RTE.

6.3 CODESYS WebVisu / TargetVisu

Built in web server or target visualization, allowing monitoring of controller status through a browser or local touchscreen. No additional purchase of SCADA is required.

6.4 CODESYS BACnet SL / KNX SL

A protocol stack specifically designed for building automation, capable of connecting HVAC, lighting, and security systems. These two options do not rely on Npcap and have extremely low real-time requirements, making them very suitable for Win SL.


Typical application scenarios and limitations (mandatory for engineers)

✅  Suitable for scenarios using CODESYS Control Win SL

Factory data collection and edge computing (running SQL database or Node RED at the same time)

Building automation (HVAC, lighting, elevator group control)

Material sorting conveyor line (cycle 10-50ms)

Water treatment process control (PID regulation, second level response)

Education, laboratory prototype verification

❌  Scenarios that are not suitable or require careful use

Safety related systems (not SIL certified)

Stamping machines, injection molding machines, and other equipment that require microsecond level response

Multi axis CNC interpolation (jitter can cause machining errors)

Containerized deployment (officially prohibited virtual machines/containers)

Embedded headless device (without Windows environment)

Alternative Proposal

If hard real-time is necessary, you can choose:

CODESYS Control RTE: Based on Windows+INtime real-time extension, supports deterministic cycles (≤ 50 μ s jitter).

CODESYS Control for Linux: runs on the Linux+PREEMPT_RT kernel and performs better in hard real-time than Windows.

Hardware PLC: such as ABB AC 800M (refer to previous text), suitable for extreme reliability and safety situations.


Performance optimization: making Windows more like a real-time system

Although it cannot completely eradicate the non real time nature of Windows, the following measures can significantly reduce latency spikes:

8.1 Close unrelated services

Windows Update (Automatic updates consume a lot of CPU and I/O)

Disk Defragmentation (Planned Task)

Print backend processing program (if not used)

Windows Defender (Reduce real-time scanning frequency or exclude CODESYS process)

8.2 Setting processor affinity

In the task manager, bind the CODESYS Control Win SL process to a specific CPU core (such as Core 3) and exclude other user processes from using that core.

8.3 High precision timer

When CODESYS is running, the system defaults to calling the Windows multimedia timer (timeBeginPeriod (1)), setting the system clock resolution to 1ms. UseHighResTimer=1 can be forcibly enabled by adding it to the registry in the fields of iPadOS SOFT CODESYS ControlWin.

8.4 Network Isolation

Assign a dedicated network card to EtherCAT/PROFINET and disable the following features of the network card:

Large scale Send Offload (LSO)

Receiver Scaling (RSS)

IPv4 checksum offloading

These uninstallation functions will introduce unstable packet latency.

8.5 Monitoring jitter

Use the built-in 'Task Monitor' in CODESYS to record cycle deviations. If it frequently exceeds 30% of the set value, it is necessary to reduce the CPU load or extend the task cycle.


Common fault codes and solutions (quick reference table)

Troubleshooting steps for error logs or indicator lights

Unable to start event log at runtime: 0x80070005 Running with administrator privileges; Check User Account Control (UAC)

Fieldbus initialization failed with "Adapter not found" installation of Npcap; Disable firewall; Replace the network card

Watchdog reset C016: Task timeout extends the task cycle; Optimize code (avoid long loops)

License expiration demonstration mode countdown, re import license; Check if the system time is correct

There are a large number of CRC errors in the communication intermittent bus statistics to check the grounding of the cable shielding layer; Reduce bus speed

Unable to download program device not ready to restart runtime service (command line: net stop CODESYSControlWin/net start)

High CPU usage (>90%): Windows Task Manager checks if soft PLC is enabled to execute multiple tasks simultaneously; Reduce the number of loop tasks


Selection Comparison: CODESYS Control Win SL vs Competitors

Features CODESYS Win SL TwinCAT 3 (Beckhoff) Raspberry PLC (open source)

Operating System Windows 10/11+Real time Kernel Linux RT

Real time level: Soft real-time, Hard real-time (via TcRtAcc), Soft real-time (PREEMPT_RT)

Supports a wide range of buses (>15 types) native to EtherCAT, with limited support for others through gateways

License fee payment (~€ 300) based on performance level (~€ 800 starting) free of charge

Visualization WebVisu/Target Visu TwinCAT HMI requires third-party support

Redundancy support with built-in paid options (requires additional authorization) None

Applicable to virtual machine prohibition (requires dedicated network card direct access) permission

For projects with limited budget and low real-time requirements, CODESYS Control Win SL is a highly competitive choice.

  • Alcatel-Lucent 9500 MPR ODU Outdoor Unit 300 11GHz TX Low HP 3DB23035AAAA01
  • Alcatel-Lucent ECNT-C 3FE25676 BA AK 06 Termination Card
  • Alcatel Lucent MDR-8000 Microwave Digital Radio MDR-8606-45 with 13 Modules
  • Alcatel-Lucent 849144415 KS-24829L1 Remote Radio Head v1.4
  • Alcatel CFF 450 Turbo Pump Controller 137171
  • Alcatel-Lucent ACS108 109579896 004 Access Controller
  • Alcatel-Lucent OS6850-48 Network Switch with PS-126W-AC Power Supply
  • Alcatel Lucent DFP-CM-14B/2T Filter DCMA Base Station
  • Alcatel Lucent ESX-K100C32W4 ESXK100C32W4 Power Supply Module
  • Alcatel Lucent 91-E03100-A 91E03100A Interface Module
  • Alcatel-Lucent STGR-LIM-A2P-72-HBI ADSL2+ High Bandwidth Module
  • Alcatel-Lucent 9500 Microwave Packet Radio MPT-3DB20547BBAA02
  • Alcatel Lucent Enterprise 4049-4059 MMK Keyboard Console Kit
  • Alcatel-Lucent RRH4X40-1900 Remote Radio Head
  • Alcatel Lucent OS6450-P48 Switch
  • Alcatel Lucent 625617-000-001 Cable Assembly
  • Alcatel Lucent 108320 Module
  • Alcatel Lucent TN801B Board
  • Alcatel-Lucent RRH2X50-800 LTE Remote Radio Head
  • Alcatel Lucent CPU8 Board 3BA23258AB OmniPCX 4400
  • Alcatel-Lucent 3EM22617AAAE 9500 MPT-HL Microwave Radio Transceiver
  • Alcatel-Lucent CPU7-2 3BA23259AAAD 7750 SR Control Processor Module
  • Alcatel-Lucent 9500 Microwave Packet Radio MPT-3DB20371BCAA01
  • Alcatel-Lucent Enterprise 4059 MMK Keyboard + Phone PAC Kit
  • Alcatel-Lucent Nokia 3HE10329AA 7750 SR Series Router Module
  • Alcatel-Lucent 7705 SAR-W IP MPLS Service Aggregation Router 3HE07349AA
  • Alcatel-Lucent-Nokia 3HE08429AARC01 7750 SR SFM5-7 Switching Module
  • Alcatel-Lucent 3HE00272DB 7750 SR-7 DC Chassis with PEM3+EFT
  • Alcatel-Lucent ACT 1300M/1600M HT Turbo Pump Controller
  • Alcatel Lucent IMM48-1GB-TX 3HE03625AAG01 48-Port 7750 SR-12 Interface Module
  • Alcatel-Lucent AP-500 Wireless Access Point
  • Alcatel-Lucent ATP-150 Power Supply
  • Alcatel-Lucent 622-8603-012 Optical Transceiver
  • Alcatel-Lucent 270-0038-010 10.5 VDC Power Supply
  • Nokia 9500-MPR Microwave Radio Module XPIC-RPS/3DB20116BCAA01
  • Alcatel-Lucent 3DB19017AB EAS Access Switch v2
  • Alcatel-Lucent 3AL81072AA Matrix Enhanced Unit - Cross-Connect Module
  • Alcatel-Lucent MDR-8606-135 6GHz Digital Microwave Radio
  • Alcatel-Lucent 3EM09626AD RF Transmitter - MDR-8000 Component
  • Alcatel 3HE03619AAAF01 Network Module
  • Alcatel-Lucent 3EH76027AEJC OmniPCX Enterprise Communication Server
  • Alcatel-Lucent 9500 MPR 11GHz Microwave Link - 3DB22001DA
  • Alcatel-Lucent GSX-FM-4W - Gigabit Ethernet Fiber Module 4-Port
  • Alcatel-Lucent 270-0038-020 - Power Supply Interface Module
  • Alcatel-Lucent LNW64 - Network Processor Module for Switching Systems
  • Alcatel-Lucent 3DB19017AB - High-Density Interface Module Board
  • Valmet U4600063 - Industrial Automation Module
  • Valmet M851040 M1 MEMU Module - Memory and Expansion Unit
  • Metso Valmet A413016 NCU2 Board - Network Control Unit Model 17
  • Valmet A413115 TCU41 Board Ver.06 - Temperature Control Unit
  • Metso Valmet PEFT A413792 - Power Supply Module for Automation Systems
  • Valmet ABTU M2512201 - Analog Binary Termination Unit Module
  • Valmet ABMB MT036 PCB Card - Auxiliary Backplane Motherboard
  • Valmet A413345 FPUS Battery Backup Unit - Standby Power Module
  • Valmet A413060 DMU Rev 04 - Drive Monitor Unit Board
  • Valmet BOR82 A413292 - Binary Output Relay Module
  • Valmet A413383 Ver.04 ESW - Electronic Switching Module Board
  • Valmet Neles A415579 Valve Controller
  • Metso Valmet A413381 ESW Drive Board
  • Valmet ABTU Module 545266-2A 2-545264-2B - Analog Binary Termination Unit
  • Valmet ABMB MT838 PCB - Backplane Bus Mother Board
  • Valmet LEV-EL PG4 N1 H2S Sensor - 600mbar Gas Detector
  • Valmet ABMB MT940 PCB - Analogue Bus Mother Board Backplane
  • Valmet VAT65425921A MT241 PCB Board
  • Valmet A413310 VPU Power Unit - 230VAC 1.5A Automation Supply
  • Valmet Metso IOP303 Input Module 181504 - 32-Channel Digital Input
  • Valmet A413060 DMU Rev 07 - Data Management Unit
  • Valmet M851220 M1 PCB Card - Process Automation Interface Board
  • Valmet A413042 Ver.06 CPU
  • Valmet A413200-01 AIU 8 Analog Input Module
  • Basler DECS-250-CGCM-LN2SA1C Digital Excitation Control System
  • Valmet Automation PLC Module A413171
  • Valmet Automation 542852-3A Rack-Mount Cross Connect Panel
  • Valmet Marine Damatic M851565 Main Keyboard
  • Valmet TIU 6 Printed Circuit Board A413110
  • Metso Valmet U4440253V1.1 RMI CPU 300
  • Metso Valmet A413016 Ver.12 NCU2
  • Valmet M851565 Damatic Keyboard
  • Valmet ATB16-4 16 Channel Relay Card
  • Valmet Metso A413331 SPU Power Supply
  • Valmet PUD 10B Automation Control Rack
  • Valmet MT917 ABMB DMU PCB I/O Module
  • Valmet M851565 Damatic Keyboard Mkb2
  • Valmet EDS-518A-MM-SC Ethernet Gateway
  • Valmet 542836-6A PCB Card
  • Valmet ATB16-4/2 Terminal Board 9144047
  • Valmet ATB16-4 Controller Board 0-50°C 4-20mA Analog Output
  • Valmet 542852-3A Slot Rack Chassis Module
  • Valmet A413026 Ver.M1 FBC Board
  • Valmet IQ Basis Weight SH Sending Assembly A418081
  • Valmet PMB 2R Monolithic Backplane 8-Slot PCB 542821-5A and -5B
  • Valmet ATB16-4 16-Channel Relay Card Controller Board 22195028
  • Valmet Diff-EL SL6NK227SF0 Pressure Transmitter 0-380 mBar
  • Valmet A413110 TIU6 Board Ver.M1
  • Neles Automation A413278 Control Module
  • Valmet BCUTB Terminal Module 10101006 11091002
  • Valmet Senso 160 Measuring Station Display 160.2
  • Valmet AIU 1A Analog Input Unit M851245
  • Valmet IQ Web Caliper Sensor A420734
  • Valmet M851040/M8510401 Memory Board
  • Valmet AN35S1MC02RA Valve
  • Valmet M851121 M2 Cross Connect Panel
  • Valmet AIU-8 Simulator Board 421522-1A
  • Metso BIU 82 D200533 Binary Input Unit
  • Valmet M851121 M2 Module Rack
  • Valmet A413383 PC Board Module
  • Valmet N0542 NO54 ABMB PCB - 545200-3A Board
  • Valmet Metso IOP304 Input Module 181503
  • Valmet PDP601 Distributed Processing Unit 181585
  • Valmet A413084 CPU Board - Processor Module for Automation Systems
  • Valmet AIU 16T Analog Input Module M8512081 M1
  • Valmet AIU 16 Analog Input Module 545100-3A and 545100-3B
  • Metso Valmet BIU4 A413146 Binary Input Unit
  • Valmet AIU-8 Simulateur Board 421522-1a Analog Simulator
  • Valmet BIU8A Binary Input Unit 542803-3B M851222 M1
  • Valmet IQ Web Color DH Photoelectric Sensor A418182 2.04
  • Valmet A413200 AIU-8 Simulator Board 191151 421522-1A
  • Valmet Automation SCU M851006 System Control Unit Module
  • Valmet 857565/851565 Damatic Keyboard IP40 5V Operator Interface
  • Valmet A413077 FBC2 Module Rev 06 Field Bus Controller
  • Valmet DMU 2 PCB Module 545142-3A DM Data Management Unit
  • Valmet AIU16T PCB Card M851208 Analog Input Module
  • Valmet A413181 PLU Board
  • Valmet m851006 SCU Module
  • Valmet Metso 181226 Digital Input Module
  • Valmet AIU16T Analog Input Module - 16-Channel 65421466-2B MT924 V1.3
  • Valmet WIN3136875 Slide Clutch
  • Metso Valmet TIU61 A413111 Temperature Input Unit