Skip to content

Below is the practical industrial-software view. This topic sits directly in your roadmap under Real-time, Timing, Threading & Concurrency, especially “soft real-time vs hard real-time,” “determinism vs best-effort execution,” and “coordinating hardware-triggered events” .

Real-Time vs Non-Real-Time Communication in Industrial Systems

PART 1 — Why This Distinction Matters

Industrial machines almost never have one kind of communication.

They usually contain both:

text
Timing-critical communication
    -> motion synchronization
    -> camera trigger timing
    -> safety IO reaction
    -> fieldbus cyclic updates

Non-timing-critical communication
    -> HMI updates
    -> logs
    -> alarms history
    -> reports
    -> MES communication

The key point is this:

Some communication affects physical correctness. Some communication only affects visibility, reporting, or operator experience.

For example, in a wafer inspection machine:

text
Motion controller coordinating X/Y stage
    -> timing matters deeply

Camera trigger linked to exact stage position
    -> timing matters deeply

HMI showing "Stage Moving..."
    -> timing matters, but not deterministically

MES receiving inspection result
    -> important, but not real-time

If the camera trigger arrives 50 ms late, the image may be captured at the wrong position. That can invalidate inspection results.

If the HMI status update arrives 500 ms late, the operator sees slightly stale information, but the machine may still be correct.

This is why experienced industrial architects do not ask:

“Is this fast?”

They ask:

“What happens if this message is late?”

That question usually reveals the correct architecture.

Treating everything as real-time is expensive and unnecessary. You end up over-engineering UI updates, logs, reports, database writes, and factory integration.

But treating timing-critical communication as best-effort is dangerous. You may build a system that works in a demo, then fails when CPU load increases, logging becomes heavy, the UI freezes, or the network has jitter.


PART 2 — What “Real-Time” Really Means

Real-time does not mean fast.

Real-time means:

The operation must complete within a known timing deadline.

A real-time system can be slower than a normal system, but if it always responds within its deadline, it is more predictable.

A non-real-time system may usually be fast, but occasionally delayed. That occasional delay is the problem.

text
Best-effort communication

Time  ------------------------------------------------------>

Message expected:     |---- maybe here ---- maybe later --------|
Actual arrival:                         X

Result:
Usually OK, but no strict guarantee.
text
Deterministic / real-time communication

Time  ------------------------------------------------------>

Cycle boundary:       |----10ms----|----10ms----|----10ms----|
Update must happen:        X             X             X

Result:
The system is designed around known timing windows.

In practical industrial terms:

text
Hard real-time
    Missing the deadline can cause unsafe behavior,
    machine damage, or invalid physical operation.

Soft real-time
    Missing the deadline degrades quality, throughput,
    responsiveness, or accuracy, but may not be immediately unsafe.

Most PC/.NET machine applications are not hard real-time systems.

They may participate in soft real-time behavior, such as responsive monitoring, fast status updates, or timely supervision. But hard deterministic timing is usually delegated to PLCs, motion controllers, embedded controllers, FPGA logic, or real-time fieldbus systems.

That separation is one of the biggest mindset shifts from enterprise software.


PART 3 — Non-Real-Time / Best-Effort Communication

Best-effort communication means the system tries to deliver the message, but timing is not strictly guaranteed.

Messages may be:

text
- delayed
- queued
- retried
- batched
- reordered depending on design
- dropped if the system allows lossy updates

This is acceptable for many parts of machine software:

text
UI updates
Logging
Reports
Alarm history storage
Recipe transfer
Configuration loading
Production result upload
MES communication
Non-critical monitoring

Best-effort communication is not bad. It is often the correct choice.

For example, the HMI does not need every single position update from the stage controller. If the controller produces position data every 1 ms, the UI may only need an update every 100 ms.

Bad design:

text
Controller publishes 1000 updates/sec
UI tries to render all 1000 updates/sec
UI freezes
Operator loses visibility

Good design:

text
Controller publishes high-rate data
Monitoring layer samples/throttles
UI renders latest meaningful state
Machine remains stable

Best-effort communication is valuable because it allows buffering, batching, retries, persistence, and decoupling.

That is exactly what you want for logs, diagnostics, UI, and reporting.


PART 4 — Real-Time Responsibility Boundaries

In real industrial systems, timing-critical control is often owned by lower-level systems:

text
- PLC
- motion controller
- embedded controller
- FPGA / dedicated hardware
- servo drive
- real-time fieldbus network

The PC application usually coordinates, supervises, configures, visualizes, and records.

It should not usually own the precise timing loop.

text
+--------------------------------------------------+
|                 HMI / .NET App                   |
|--------------------------------------------------|
| - operator commands                              |
| - recipe selection                               |
| - workflow orchestration                         |
| - status display                                 |
| - logging / diagnostics                          |
| - reporting / MES integration                    |
+-------------------------+------------------------+
                          |
                          | supervisory commands
                          | "Start scan"
                          | "Load recipe"
                          | "Move to inspection position"
                          v
+--------------------------------------------------+
|           Real-Time Controller / PLC             |
|--------------------------------------------------|
| - deterministic sequence execution               |
| - cyclic IO handling                             |
| - motion coordination                            |
| - hardware trigger timing                        |
| - safety-related control boundaries              |
+-------------------------+------------------------+
                          |
                          | deterministic control
                          v
+--------------------------------------------------+
|              Hardware / Motion / IO              |
|--------------------------------------------------|
| - motors                                         |
| - drives                                         |
| - sensors                                        |
| - cameras                                        |
| - lights                                         |
| - actuators                                      |
+--------------------------------------------------+

The .NET app might say:

“Execute scan recipe A.”

The controller decides:

text
1. Move stage to start position
2. Wait for in-position signal
3. Start synchronized motion
4. Trigger camera at precise encoder positions
5. Monitor IO during scan
6. Report completion/fault

The PC should not do this:

csharp
MoveStage();
await Task.Delay(10);
TriggerCamera();
await Task.Delay(10);
MoveNext();

That is a false real-time assumption.

It may work in the lab. It may fail under CPU load, GC pause, UI blocking, antivirus scan, driver delay, or network jitter.


PART 5 — Communication Examples by Timing Requirement

Real-time / deterministic communication

These interactions need predictable timing:

text
Synchronized axis control
    Multiple axes must move in a coordinated way.

Safety-critical IO response
    A door, light curtain, or emergency condition must be handled predictably.

Hardware trigger timing
    Camera, light, sensor, or acquisition must align with motion or position.

Fieldbus cyclic updates
    Devices exchange control/status data on fixed cycles.

Servo/motion control loop
    Position/velocity/current control requires deterministic timing.

These usually belong below the PC application boundary.

The PC can request behavior, but the controller should execute the timing-sensitive details.

Non-real-time / best-effort communication

These interactions can tolerate delay:

text
Operator screen refresh
Alarm history storage
Recipe transfer
Production reporting
Logs and diagnostics
MES upload
Dashboard updates
Trend visualization
Service data export

They are important, but late delivery usually does not immediately corrupt physical behavior.

How to decide

Ask these questions:

text
1. If this message is late, can hardware move incorrectly?
2. If this message is delayed, can safety be affected?
3. If this message jitters, can inspection quality be invalid?
4. Does this interaction need a fixed cycle time?
5. Does correctness depend on exact timing?
6. Can the system safely retry later?
7. Can the latest value replace older values?

If correctness depends on exact timing, it probably belongs in the real-time layer.

If delay only affects visibility, reporting, or convenience, it is likely best-effort.


PART 6 — Real-World Failure Scenarios

Scenario 1: PC app controls a timing-critical loop directly

What it looks like:

text
PC sends command
waits a short delay
sends next command
waits another delay
triggers camera

It works during testing, but occasionally the captured image is misaligned.

Why it happens:

text
Windows scheduling delay
.NET GC pause
UI thread contention
network jitter
driver delay
background CPU load

Experienced redesign:

text
PC sends high-level command:
    "Start synchronized capture"

Controller owns:
    motion timing
    trigger timing
    IO timing
    completion/fault reporting

Scenario 2: UI thread delay affects command timing

What it looks like:

text
Operator clicks Start
UI becomes busy
command is delayed
machine response feels inconsistent

Why it happens:

text
UI thread is doing too much work:
    rendering
    data binding
    logging
    synchronous device calls
    file IO

Experienced redesign:

text
UI thread only handles presentation.
Workflow/service layer handles command orchestration.
Controller handles deterministic execution.
Status updates are asynchronous and throttled.

Scenario 3: Network jitter causes missed synchronization

What it looks like:

text
PC sends trigger command over Ethernet.
Most of the time it arrives quickly.
Sometimes it arrives late.
Inspection result becomes inconsistent.

Why it happens:

text
normal Ethernet/TCP communication is not a deterministic trigger mechanism
packet timing varies
OS scheduling varies
network congestion can occur

Experienced redesign:

text
Use hardware trigger line, encoder-based trigger,
real-time controller, or deterministic fieldbus.

PC configures trigger behavior.
Hardware/controller executes it.

Scenario 4: Logging interferes with timing-sensitive operation

What it looks like:

text
Machine runs fine with light logging.
Under debug logging, timing problems appear.

Why it happens:

text
synchronous logging blocks threads
disk IO becomes slow
log formatting allocates heavily
shared locks create contention

Experienced redesign:

text
Timing-sensitive layer avoids blocking logging.
Events are buffered carefully.
Critical control is isolated from diagnostic pipelines.
Logs are asynchronous and bounded.

Scenario 5: System works in lab but fails under load

What it looks like:

text
Demo works.
Factory run fails after hours.
High-throughput mode exposes missed events.
UI slows down.
Queues grow.
Commands become delayed.

Why it happens:

text
lab conditions do not represent real concurrency
less data
less logging
fewer alarms
less operator activity
lower image volume
less MES traffic

Experienced redesign:

text
Separate deterministic control from monitoring/reporting.
Apply backpressure.
Throttle UI updates.
Use bounded queues.
Move hard timing to controller/hardware.
Design for sustained operation, not just happy-path demos.

PART 7 — Software Design Implications

Industrial architecture should separate three responsibilities:

text
+--------------------------------------------------+
|              Monitoring / Reporting              |
|--------------------------------------------------|
| logs, diagnostics, history, MES, dashboards       |
| best-effort, retryable, buffered                  |
+--------------------------------------------------+

+--------------------------------------------------+
|              Supervisory Control                 |
|--------------------------------------------------|
| recipes, workflows, operator commands, states     |
| timely, reliable, but usually not hard real-time  |
+--------------------------------------------------+

+--------------------------------------------------+
|              Deterministic Control               |
|--------------------------------------------------|
| motion timing, IO timing, triggers, safety loops  |
| owned by controller / PLC / hardware              |
+--------------------------------------------------+

A bad architecture mixes these together:

text
+--------------------------------------------------+
|                  .NET Application                |
|--------------------------------------------------|
| UI rendering                                     |
| database writes                                  |
| motion timing                                    |
| camera triggering                                |
| logging                                          |
| MES upload                                       |
| safety decisions                                 |
+--------------------------------------------------+

Problem:
Everything affects everything.
A slow log write can delay a command.
A UI freeze can affect machine timing.
A database retry can interfere with operation.

A better architecture separates them:

text
+-------------------+       +----------------------+
|     HMI / UI       |       | Diagnostics / MES     |
| best-effort        |       | best-effort           |
+---------+----------+       +----------+-----------+
          |                             |
          v                             v
+--------------------------------------------------+
|            Supervisory Workflow Layer             |
|--------------------------------------------------|
| recipe execution, state machine, command intent   |
+-------------------------+------------------------+
                          |
                          v
+--------------------------------------------------+
|         Controller / PLC / Motion Controller      |
|--------------------------------------------------|
| deterministic timing, cyclic IO, trigger control  |
+-------------------------+------------------------+
                          |
                          v
+--------------------------------------------------+
|                  Physical Hardware                |
+--------------------------------------------------+

The contract between PC and controller should be explicit.

Bad contract:

text
PC: "I will send commands at exactly the right time."

Good contract:

text
PC: "Here is the operation to execute."
Controller: "I will execute deterministic timing and report state."

This aligns with the machine-control principle that industrial systems must be state-driven, deterministic, and safe, not just call-driven .


PART 8 — Interview / Real-World Talking Points

A strong explanation:

Real-time communication is not about being fast. It is about meeting a known timing deadline predictably. In industrial systems, some interactions, like synchronized motion, safety IO, fieldbus cycles, and hardware triggers, require deterministic timing. Those should usually be handled by PLCs, motion controllers, embedded controllers, FPGA logic, or deterministic hardware paths. The PC/.NET application should supervise, coordinate, configure, visualize, and record, but it should not own hard timing loops.

Common mistakes software engineers make:

text
They assume fast average response is enough.
They use Task.Delay as if it were a timing guarantee.
They let UI thread behavior influence machine commands.
They send timing-critical triggers over best-effort networks.
They mix logging/reporting with control paths.
They design everything as request/response from the PC.
They treat controller logic as a dumb device instead of a timing boundary.

What strong engineers understand:

text
Real-time means deadline-bound, not merely fast.

Best-effort communication is acceptable and desirable for many parts
of the system.

The architecture must assign timing-critical responsibility to the layer
that can actually guarantee it.

PC software should express intent and supervise state.

Controllers and hardware should own deterministic behavior.

A machine that works in the lab may still fail in production if timing
boundaries are wrong.

The practical rule:

If lateness changes physical correctness, move it closer to the controller or hardware. If lateness only affects visibility, history, or reporting, keep it in the best-effort software layer.

Docs-first project memory for AI-assisted implementation.