Skip to main content

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.

TierReal-time classImplementationProduct form
T1Soft real-timeOfficial real-time components + system real-time configurationStandard with the SDK
T2Hard real-timeDedicated real-time partitionCustom solution (provided on request)
T3Hard real-timeCustom real-time integrationReleased later with other products
Choosing a tier

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.

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:

MetricMeaning
Jitter (avg/peak)Average jitter / peak jitter. The average reflects normal performance; the peak includes hardware interference
Maximum jitter excluding interferenceMaximum 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 jitterTiming deviation of PDO data arriving in the user program
SMI countCumulative number of cycles disturbed by hardware interrupts
Transmit rateActual PDO frame transmit rate
Offline slavesNumber of slaves currently offline
Frame loss rateProportion of frames lost
How to tell where the jitter comes from
  • 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​

MetricNot optimisedHardware layer optimisedFully optimised
Average jitter5~30 µs3~10 µs1~5 µs
Peak jitter100~300 µs5~50 µs< 10 µs
Maximum jitter excluding interference10~50 µs3~10 µs1~5 µs
Application jitter< 50 µs< 30 µs< 20 µs
SMI count/second10~3000~50~2

System health metrics​

The table compares typical figures for a standard system and a deeply optimised industrial control system:

MetricStandard systemControl system (target)
Boot to application ready30~60 s< 12 s
Background processes150~300< 50
Background threads1500~3000< 600
Idle CPU usage3~10%< 1%
Memory usage (idle)3~5 GB< 1.5 GB
Disk activity (idle)Continuous read/writeClose to 0

Application execution metrics​

MetricTargetMeaning
PDO callback execution time< 50% of the cycleUser business logic should not exceed half a cycle
Control algorithm time per call< 100 µsCore algorithms such as motion interpolation and PID calculation
GC pause (.NET/Java)< 1msA pause in a garbage-collected runtime blocks the callback

Memory and resources​

MetricTargetMeaning
Application memory usageStable, no growthMemory must not keep rising after several hours of continuous operation, otherwise there is a leak
Page faults/second< 10Many page faults mean memory is short, triggering disk swapping and stalls
Handle countStable, no growthFile/socket/event handles that keep growing = resource leak
Virtual memory (commit)< 80% of physical memoryAbove that the system starts using the swap file and real-time behaviour degrades sharply
Kernel pool usage< 200 MBAn oversized non-paged pool indicates a memory leak in the driver
Detecting memory leaks

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​

MetricTargetMeaning
Continuous run time> 7 daysNo restart, no crash, no hang
WKC matchexpected fixed / actual as reportedactual < expected = a slave has dropped: alarm + diagnostics, do not lower expected, do not stop PDO
Slave dropouts0No slave should drop during normal operation
Frame loss rate0%EtherCAT runs on Ethernet; physical-layer problems cause frame loss
Application exception handlingFull coverageEvery exception in a PDO callback must be caught; an uncaught exception can stop the bus
Watchdog triggers0When the user program hangs, the real-time driver's watchdog stops transmission; find the cause of the hang
Blue screen / hang0Check driver compatibility, memory hardware and power stability
Cable/connector qualityIndustrial gradeUse shielded cable and industrial-grade RJ45 connectors to avoid poor contact
Recommendations for long-term operation
  • 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_wkc and the fixed expected_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
How to check system status

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

Most scenarios

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).

Need higher real-time capability?

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.