IMD SolutionComputing LibraryShop main store

Explainer

Run Soft DPAC on an Edge Computer Alongside Analytics

Edge computing and IIoT Published 10 min read

Short answer

Yes: a soft DPAC built on IEC 61499 can share an edge computer with analytics, provided the control runtime keeps dedicated CPU cores isolated from the kernel scheduler, memory locked against paging and a separate NIC or VLAN for I/O traffic, while analytics reaches control only through asynchronous, gated interfaces.

On this page
  1. Can one edge computer run soft DPAC control and analytics together?
  2. Is the standard IEC 61499 or IEC 64199?
  3. How do I partition CPU cores and memory on the edge computer?
  4. Does the control network need its own path?
  5. How should analytics exchange data with the control runtime?
  6. How do I gate analytic setpoints into a live control loop?
  7. Should the control runtime run in a container like the analytics?
  8. What happens when the analytics side fails?
  9. Questions asked

Yes, one edge computer can host a soft DPAC and software analytics at the same time, and this article gives the partitioning, gating and container rules that make it hold up in production. A soft DPAC is a distributed process automation controller built as software: an IEC 61499 function-block application runs as a normal process on an x86-64 or ARM64 edge computer instead of inside a proprietary controller chassis. Co-hosting analytics - model evaluation, soft sensors, anomaly detection - is then a resource-partitioning problem, not an architecture problem. The control runtime keeps dedicated CPU cores, locked memory and its own network path, and analytics reaches control only through asynchronous interfaces and a gated write-back. Get those four things right and a stalled model, a restarted container or a saturated historian link degrades nothing but the analytics.

Can one edge computer run soft DPAC control and analytics together? #

Yes: a modern x86-64 or ARM64 edge computer with at least four cores, 8 GiB of RAM and two Ethernet ports can run an IEC 61499 soft controller beside analytics containers, provided the control runtime gets two dedicated cores, locked memory and its own network path.

The co-hosting works because the control application is already decomposed into function blocks with explicit event and data interfaces, so an analytics service consumes values and injects results through normal application interfaces instead of a bespoke gateway welded into the loop. Same silicon, two deliberately separate domains.

The floor in the answer is derived from the partition itself: one core pair for the runtime, one core pair for the operating system and at least one core left for analytics means four cores; two ports mean the I/O path and the IT path never share a queue; 8 GiB covers a locked control image plus containerized analytics with headroom. A two-core box, a platform that cannot lock memory, or a single-port box without a proven VLAN split fails that floor - run the analytics somewhere else, because no runtime setting repairs a shared resource.

If the analytics side is Node-RED flows and Python scripts, the co-location pattern in run Python and Node-RED beside PLC code on an edge PC is the same arrangement; the difference here is that one tenant is a loop with a deadline, which is why every rule below exists.

Is the standard IEC 61499 or IEC 64199? #

The standard is IEC 61499, whose part 1, edition 2012, defines the architecture for function blocks in distributed industrial-process measurement and control; IEC 64199, as the number is sometimes quoted, does not exist in the IEC catalogue.

IEC 61499 defines a generic architecture for distributed control built as an event-driven, vendor-independent function-block model that continues the IEC 61131 lineage. Part 1, published as edition 2 in 2012, is the document to cite when a specification says distributed function-block control. Where the number 64199 appears in a requirement or a vendor claim, correct it before sign-off: conformance statements are written against real part numbers, and a wrong citation invites a wrong product comparison.

Three properties of the model make it unusually friendly to a co-tenant. A function block separates event inputs and outputs from data inputs and outputs, so an analytics request arriving at an arbitrary moment cannot shift the phase of a periodic task, because there is no fixed scan to shift. The application is mapped onto devices and resources at deployment time, which makes blocks location-transparent: a publishing block can sit on the edge PC today and on a second device tomorrow with only the mapping and the communication service blocks changing. And service interface function blocks are the standard's extension point for anything that is not control logic, which is where an MQTT publisher, a WebSocket client or an OPC UA client belongs.

Decision: cite IEC 61499-1 in the specification, and accept a vendor's soft-controller claim only against its declared conformance to that standard.

How do I partition CPU cores and memory on the edge computer? #

On an eight-core machine, give the control runtime cores 6 and 7 outright, leave cores 0 and 1 to the operating system and its interrupts, confine analytics to cores 2 through 5, and lock the control runtime's memory so no page fault can stall a cycle.

Concern Control domain (soft DPAC) Analytics domain
Scheduling Real-time priority, fixed affinity Best effort
CPU Cores 6 and 7, isolated Cores 2 through 5
OS and interrupts Cores 0 and 1 none
Memory 512 MiB locked, no paging Up to 12 GiB, free to page
Storage I/O None on the control path Historian writes, model files, logs
Network Dedicated NIC or I/O VLAN Plant/IT port
Failure Must survive an analytics restart Restartable at any time

The memory arithmetic on a 16 GiB machine: 512 MiB locked for the runtime and 12 GiB capped across the analytics containers leave 16 - 0.5 - 12 = 3.5 GiB for the operating system and page cache. Locking matters because one page fault that reaches storage costs milliseconds - the entire budget of a 10 ms cycle - and a runtime that pages mid-cycle is a runtime you cannot commission.

The mechanics are kernel-level, not application-level: the CPU isolation features documented in the kernel administrator's guide remove the dedicated cores from background kernel housekeeping, a fixed affinity mask pins the runtime process to them, and the analytics port's interrupt handling is steered onto the analytics cores. Interrupts land on core 0 by default, which is exactly why cores 0 and 1 stay with the operating system.

Specified as new hardware, this partition reads as a plain requirement list: an industrial mini PC with eight cores, 16 GiB of memory and two Ethernet ports covers it, and the second port matters more than the clock speed.

Does the control network need its own path? #

Yes: fieldbus and I/O traffic get their own network interface or their own VLAN, because bulk historian uploads sharing a port with deterministic I/O add exactly the milliseconds of jitter a 10 ms control cycle cannot spare.

Two ports is the default answer: one interface for fieldbus and I/O devices on a control VLAN, one for the plant network where brokers, historians and dashboards live. A single port with VLAN separation is acceptable only after a loaded test shows the control task holding worst-case cycle time at or below 70 percent of the period - 7 ms against a 10 ms cycle - with the historian uploading at full rate. That line leaves the remaining 3 ms for interrupt service and one late activation, which is what a bulk upload on a shared queue costs when it hurts.

Traffic shaping and time-sensitive networking change that arithmetic only when they are implemented and demonstrated under load on your stack; a datasheet mention of TSN is not a separation scheme. Put broker and historian endpoints on the plant port, keep the control port for I/O devices and any peer runtime devices, and steer the plant port's interrupts onto the analytics cores so an upload burst competes with the analytics containers, not with the loop.

How should analytics exchange data with the control runtime? #

Pick asynchronous request/response for on-demand model calls, publish/subscribe for streaming values out and OPC UA where SCADA must interop, and make every call that leaves the control execution path non-blocking: fire the request, return at once, handle the reply on a later event.

Mechanism Best fit Watch out for
Asynchronous request/response Optimizer setpoint requests, on-demand model evaluation Head-of-line blocking; define a timeout and a default result
Publish/subscribe Streaming process values to several consumers The broker becomes a dependency; QoS and retained-message settings change what fresh means
Persistent stream (socket) Dashboards, simulation links Reconnection storms after an outage; use backoff and a bounded outbound buffer
OPC UA client/server SCADA and historian interop with typed data Heavier stack footprint; budget subscription intervals against the analytics cores

A blocking synchronous call inside a control block converts a network stall into a control fault, so the async rule has no exceptions: the block posts the request, returns, and receives the reply as a later event carrying a timeout and a default result.

Moving values out through OPC UA or MQTT is the outbound pattern described in bridging OPC UA PLC data to MQTT with an edge PC: publish a read-only copy of the tags, and treat everything in the reverse direction as a gated request rather than a direct write into a block's data input.

How do I gate analytic setpoints into a live control loop? #

Route every analytic write-back through a gate that checks validity, freshness, range and rate before the value touches the loop; with a 10 ms cycle, a 20 ms staleness limit and a 1 °C/s ramp, a move from 185.0 °C to 191.0 °C takes 600 cycles, which is 6 s.

One boundary comes before any code: an analytic write-back never overrides an interlock, a rated equipment limit or anything the safety review owns. The gate enforces the safe envelope; it does not define it.

The gate is four checks in front of the ramp. Names below are illustrative - keep the four checks and rename them to your runtime's style:

SP_Req_Value : REAL := 0.0;        // requested setpoint, degC
SP_Req_Time  : DATE_AND_TIME;      // when the model produced the value
SP_Req_Valid : BOOL := FALSE;      // set by the analytics service
SP_Applied   : REAL := 185.0;      // running setpoint, degC
SP_MinLimit  : REAL := 150.0;      // hard range, degC
SP_MaxLimit  : REAL := 220.0;      // hard range, degC
SP_MaxAge_ms : REAL := 20.0;       // two cycles at 10 ms
SP_MaxRate   : REAL := 1.0;        // degC per second
Cycle_ms     : REAL := 10.0;       // control cycle period

SP_Age_ms := Elapsed_ms(SP_Req_Time, Now);
FreshOK   := SP_Req_Valid AND (SP_MaxAge_ms >= SP_Age_ms);
RangeOK   := (SP_Req_Value >= SP_MinLimit) AND (SP_MaxLimit >= SP_Req_Value);
RateOK    := Ramp_Rate_OK(SP_Req_Value, SP_Applied, SP_MaxRate);

IF FreshOK AND RangeOK AND RateOK AND Operator_Enable THEN
  SP_Applied := Ramp(SP_Applied, SP_Req_Value, SP_MaxRate, Cycle_ms);
  SP_Source  := ANALYTIC;
ELSE
  SP_Source  := LOCAL;   // hold last good setpoint
  Diag_Code  := Reject_Reason(FreshOK, RangeOK, RateOK, Operator_Enable);
END_IF

The test that proves it, with the numbers from the answer: SP_Applied sits at 185.0 °C when a request of 191.0 °C arrives stamped 12:00:04.180. The gate runs at 12:00:04.196, so SP_Age_ms reads 16.0 against the 20.0 ms limit and every check passes. The ramp step is SP_MaxRate times Cycle_ms: 1.0 °C/s × 0.010 s = 0.01 °C per cycle, so replaying the request every cycle moves the setpoint 6.0 °C in 6.0 / 0.01 = 600 cycles, which is 600 × 10 ms = 6 s. Feed the identical request again at 12:00:04.210 and SP_Age_ms reads 30.0: freshness fails, SP_Source stays LOCAL and Diag_Code records the reason. Every rejection is observable, which is the point - an analytic that is silently ignored is worse than one that is offline, because operators believe it is working.

Should the control runtime run in a container like the analytics? #

Containerize the analytics by default and the control runtime only when the runtime vendor documents real-time support inside containers, because dependency isolation and independent model updates are worth having, while an unverified container layer adds scheduling latency nothing downstream removes.

Containers earn their place on the analytics side for two reasons. Dependency isolation exists because host library updates are what break edge applications - the classic case being the Docker shared library error on an edge PC - and an independent update cadence lets a retrained model deploy without touching the control project. Published edge architectures already deploy IEC 61499 runtimes as containerized microservices, which simplifies rollout across a fleet of gateways.

The decision rule stays conservative: run the control runtime natively on its isolated cores until the runtime vendor documents, for your runtime version and kernel, what real-time behavior survives the container layer. That answer comes from the vendor's support statement, not from a container feature list.

Version the interface contract separately from both artifacts: a schema listing tag name, engineering unit, range, update rate and quality, treated as the change-controlled item. Model retraining then never requires a control download, and a control update never silently changes what the analytics expects.

What happens when the analytics side fails? #

Design so an analytics crash, restart or outage degrades the analytics and never the control: every analytic-derived input carries a validity flag and a staleness timeout, bounded queues drop the oldest events on overflow, and the loop reverts bumplessly to its base-layer strategy.

A watchdog makes the degradation automatic: the analytics side publishes a heartbeat, the control side counts it, and when it stops, every value sourced from analytics is flagged invalid and the loop follows its defined fallback - last-good value, default constant, or bumpless transfer to the base-layer strategy. Between the domains sit fixed-size, non-blocking queues that drop the oldest event on overflow instead of back-pressuring the control task.

Size the queue for the longest analytics outage you intend to ride through: 10,000 events at 64 bytes each is a 640 kB buffer, which holds 10,000 / 100 = 100 s of a 100 events/s publish rate, or 10 s at 1,000 events/s. On the far side of that boundary, store-and-forward pipelining takes over - the pattern in MQTT to Kafka edge data pipeline without losing messages absorbs disconnections between broker and store without any of it touching the control task.

The acceptance test for the whole design is unplug-the-analytics: kill the container, pull its link, restart it under load. The loop should show nothing but invalid-data flags while the model is gone, and no disturbance when it returns.

Questions asked

Does co-hosting analytics change how the control runtime is licensed?

It can. Many soft-control runtimes license per instance, per socket or per core count, and some tie the license to the hardware profile first activated. Before committing to one box, read the runtime vendor's license terms for multi-tenant hosts and confirm that adding analytics containers does not push the machine into a higher tier. Where the terms are unclear, a written answer from the vendor is the only sound basis for the design.

Can analytics still read process values if I/O traffic sits on a separate network path?

Yes, and that is the normal arrangement. The control domain publishes a read-only copy of tags and events onto the plant network, and analytics subscribes to that copy. Separation protects the control loop from IT traffic; it does not hide data from analytics. Keep the publisher on the control side non-blocking, and treat anything analytics sends back as an untrusted request that enters only through the write-back gate.

What cycle time can a soft DPAC realistically hold on an edge computer?

With two isolated cores and locked memory on current x86-64 edge hardware, cyclic tasks in the 1 to 10 ms range are a realistic working band on a standard Linux kernel. Below about 1 ms, scheduler and interrupt jitter start to dominate, and you move into real-time kernel patches or a dedicated RTOS. State the target cycle in the specification and prove it with a loaded soak test rather than trusting a datasheet.

Does a soft DPAC replace the existing PLC?

Usually it complements it. Hard interlocks, emergency stops and certified safety functions stay in rated safety hardware regardless of what the edge computer runs. A soft DPAC typically takes supervisory loops, sequence logic and the analytics-facing data layer, either beside the PLC or in its place for non-safety duties. Keep the safety review's limits as hard boundaries in every write-back gate, and never let an analytic value become the only path for a function the process depends on.

How do I prove the split holds before go-live?

Run a loaded soak: full historian upload rate, model retraining and dashboard traffic together, while the control task logs every cycle time for at least 72 hours. Accept only if the worst case stays at or below 70 percent of the cycle period. Then kill the analytics container mid-run, disconnect its network and restart it, confirming the loop bumps through each event with no operator-visible disturbance beyond the invalid-data flags.

Keep reading

  • How-to

    Run Python and Node-RED beside PLC code on an edge PC

    Keep the IEC 61131-3 program in the controller runtime and run Python and Node-RED as separate Docker containers on the same edge PC. Exchange data over one MQTT interface with a fixed publish period, and declare data stale after three missed periods. One container per workload, and nothing from Python or Node-RED inside the control project.

    Edge computing and IIoT

  • Troubleshooting

    Fixing a Docker shared library error on an edge PC

    A container on an edge PC that exits with an error while loading shared libraries was built for a different controller firmware generation than the one installed. Pull the image revision rebuilt for your firmware, recreate the container, and verify with ldd, the linker cache and a restart-count check. Never symlink across major library versions: on a machine driving physical outputs, a mismatched library produces wrong I/O data instead of a clean error.

    Edge computing and IIoT

  • How-to

    Install licensed software on an industrial edge PC

    Install vendor-licensed container software on an industrial edge PC by passing four gates in order: a purchased license with the installer obtained only from the vendor, a verified Docker engine, an installer build that matches the CPU, and a proven open-internet path before the pull. Vendor guidance budgets the install command at 30 minutes to 1 hour; at a 5 Mbit/s link a 2 GB payload alone needs about 53 of them.

    Edge computing and IIoT