Building a professional industrial control system
Step-by-step optimisation at the hardware and application layers can bring the frame transmission jitter of an ordinary PC down to the microsecond range (verify by measuring on site).
Real-time tiers
Darra EtherCAT provides three tiers of real-time solution. T1 is the default tier supplied with the SDK; T2 / T3 are custom solutions for more demanding hard real-time scenarios and are provided on request.
| Tier | Real-time class | Implementation | Product form |
|---|---|---|---|
| T1 | Soft real-time | Official real-time components + system real-time configuration | Standard with the SDK |
| T2 | Hard real-time | Dedicated real-time partition | Custom solution (provided on request) |
| T3 | Hard real-time | Custom real-time integration | Released later with other products |
For the great majority of industrial scenarios T1 soft real-time (frame jitter 1.2 µs average / 4.5 µs maximum) is sufficient. A T2 / T3 custom solution is needed only when the business logic itself requires a hard real-time guarantee (rather than just frame timing).
SMI note: with T1, T2 or T3 alike, SMI jitter caused by mainboard firmware SMM (power management / USB Legacy / thermal control and so on) cannot be removed in software; it must be suppressed in the BIOS (disable C-state, lock the frequency, disable USB Legacy and so on). Intel TCC platforms already bundle most of that tuning at the firmware level.
Recommended OS versions
Windows versions differ markedly in their support for real-time modes; for production deployments prefer the versions rated ★★★★★ below:
- Windows 10 IoT Enterprise LTSC — real-time support: full support, soft real-time mode OK; rating: ★★★★★; positioning: strongly recommended for production machines (no Defender interference)
- Linux RT — real-time support: real-time deterministic mainline; rating: ★★★★★; positioning: high-determinism production deployments (the Linux edition is planned, there is no public evaluation version; contact us to purchase)
- Plain Windows 10 Pro 21H2+ — real-time support: compatible, real-time modes are limited; rating: ★★★☆☆; positioning: not recommended for production
Diagnostic metrics
Check the effect before and after optimisation in the diagnostics panel:
| Metric | Meaning |
|---|---|
| Jitter (avg/peak) | Average jitter / peak jitter. The average reflects normal performance; the peak includes hardware interference |
| Maximum jitter excluding interference | Maximum jitter after hardware interference (SMI) is excluded; reflects the system's real real-time performance |
| Round-trip latency (RTT) | Round-trip time of an EtherCAT frame from transmission to reception |
| Application jitter | Timing deviation of PDO data arriving in the user program |
| SMI count | Cumulative number of cycles disturbed by hardware interrupts |
| Transmit rate | Actual PDO frame transmit rate |
| Offline slaves | Number of slaves currently offline |
| Frame loss rate | Proportion of frames lost |
- Low average jitter (< 10 µs), high peak (> 100 µs) → hardware-layer interference (SMI), so optimise the BIOS
- Both average and peak are high → the system is overloaded, so optimise the application layer
- Low bus jitter, high application jitter → a user process scheduling problem, so raise the process priority
Hardware-layer and application-layer tuning
BIOS options (USB Legacy / C-States / SpeedStep / Turbo Boost and others), the Windows power plan and the NIC's advanced properties, trimming the system down, and on Linux the kernel parameters / PREEMPT_RT / process priority all affect jitter and must be tuned item by item on site.
Expected results of optimisation
Real-time metrics
| Metric | Not optimised | Hardware layer optimised | Fully optimised |
|---|---|---|---|
| Average jitter | 5~30 µs | 3~10 µs | 1~5 µs |
| Peak jitter | 100~300 µs | 5~50 µs | < 10 µs |
| Maximum jitter excluding interference | 10~50 µs | 3~10 µs | 1~5 µs |
| Application jitter | < 50 µs | < 30 µs | < 20 µs |
| SMI count/second | 10~300 | 0~5 | 0~2 |
System health metrics
The table compares typical figures for a standard system and a deeply optimised industrial control system:
| Metric | Standard system | Control system (target) |
|---|---|---|
| Boot to application ready | 30~60 s | < 12 s |
| Background processes | 150~300 | < 50 |
| Background threads | 1500~3000 | < 600 |
| Idle CPU usage | 3~10% | < 1% |
| Memory usage (idle) | 3~5 GB | < 1.5 GB |
| Disk activity (idle) | Continuous read/write | Close to 0 |
Application execution metrics
| Metric | Target | Meaning |
|---|---|---|
| PDO callback execution time | < 50% of the cycle | User business logic should not exceed half a cycle |
| Control algorithm time per call | < 100 µs | Core algorithms such as motion interpolation and PID calculation |
| GC pause (.NET/Java) | < 1ms | A pause in a garbage-collected runtime blocks the callback |
Memory and resources
| Metric | Target | Meaning |
|---|---|---|
| Application memory usage | Stable, no growth | Memory must not keep rising after several hours of continuous operation, otherwise there is a leak |
| Page faults/second | < 10 | Many page faults mean memory is short, triggering disk swapping and stalls |
| Handle count | Stable, no growth | File/socket/event handles that keep growing = resource leak |
| Virtual memory (commit) | < 80% of physical memory | Above that the system starts using the swap file and real-time behaviour degrades sharply |
| Kernel pool usage | < 200 MB | An oversized non-paged pool indicates a memory leak in the driver |
An industrial control system usually has to run continuously, 24 hours a day, 7 days a week. Run a 24-hour stress test before deployment and record memory usage every hour to confirm there is no sustained upward trend.
Reliability
| Metric | Target | Meaning |
|---|---|---|
| Continuous run time | > 7 days | No restart, no crash, no hang |
| WKC match | expected fixed / actual as reported | actual < expected = a slave has dropped: alarm + diagnostics, do not lower expected, do not stop PDO |
| Slave dropouts | 0 | No slave should drop during normal operation |
| Frame loss rate | 0% | EtherCAT runs on Ethernet; physical-layer problems cause frame loss |
| Application exception handling | Full coverage | Every exception in a PDO callback must be caught; an uncaught exception can stop the bus |
| Watchdog triggers | 0 | When the user program hangs, the real-time driver's watchdog stops transmission; find the cause of the hang |
| Blue screen / hang | 0 | Check driver compatibility, memory hardware and power stability |
| Cable/connector quality | Industrial grade | Use shielded cable and industrial-grade RJ45 connectors to avoid poor contact |
- Enable the Slave Watchdog; slaves enter a safe state automatically when the master misbehaves
- Enable the Master Watchdog; transmission of stale data stops automatically when the user program hangs
- Keep diagnostic logs and check regularly for trends such as the gap between
actual_wkcand the fixedexpected_wkc, and the port error counters - Use a UPS (uninterruptible power supply) so that a sudden power failure does not lose data or leave slaves in an abnormal state
- Turn off automatic restart after Windows Update, or use Group Policy / the registry to forbid automatic restarts
Windows: Task Manager → Performance → Open Resource Monitor; watch CPU/disk/network/memory activity
Linux: htop for processes/threads/memory, iostat for disk activity, vmstat for page faults
Two steps — BIOS power management and the system power plan — are enough for 99% of projects, including humanoid robots and CNC.
With all optimisations in place, frame transmission jitter is usually in the range of 1.2 µs average / 4.5 µs maximum (verify by measuring on site).
Hard real-time execution at the business-logic layer (microsecond-level motion interpolation, deterministic control cycles) cannot be met by standard Windows/Linux user mode.
We provide a complete hard real-time solution for the soft PLC; please contact us.