Measurements (real boards, firmware 0.3.39–0.3.71, November 2026)
| What | Value | Where |
|---|---|---|
| LD → ST network (3 VM instructions) | 788 ns | ESP32-WROOM 240 MHz |
| Network with ADD DINT on DB | 1,364–1,460 ns | ESP32 |
| Empty scan (I/O, system DB, checks) | ~0.13 ms | ESP32 |
| carico-100fc: Main + 101 FCs, 14.8 KB | 1.44 ms | ESP32 |
| 4.3 MB of machine code, 129 blocks: VM / mixed | 209.7 / 38.9 ms | ESP32-P4, 60 comparisons with the interpreter identical |
| Small program with loops: VM / machine code | 136 / 168 µs | ESP32-P4 |
| Free work memory, WiFi + Ethernet | 11,702 bytes | ESP32 |
| Free work memory | 7,989,150 bytes | ESP32-P4 with PSRAM |
| µLink, average round trip (3 ESP32 modules) | 309–495 µs | P4 PLC, 5 ms period |
| µLink, late replies under stress | 0.06–0.42 % | 22,608 exchanges per module |
| µLink, ESP32-C3 + W5100 (SPI) module | 4.7–7.3 ms | the SPI chip is the bottleneck |
| µLink, 8 modules | ~1.3 ms of bus every 5 ms | µLink documentation |
| µLink, 192 modules (test) | 16 ms to send everything | ESP32-P4 |
| Download of 127 KB over USB (serial cable, including STOP and flash write) | ~28 s | ESP32-P4, MiaConfig automatic measurement |
| Editor over Ethernet / USB | 0.7–1.3 s / 33.5 s | 370 KB, 18 files |
| Status request over Ethernet, PLC in RUN | 31–40 ms | ESP32 and P4 |
Estimates (to be confirmed)
- P4 with the interpreter VM: at least 1.5× the ESP32 (RISC-V CPU at 360–400 MHz; the estimate ranges 1.5–2.2×). We use 1.5× in the maths.
- FC call: ~0.3 µs, plus ~0.25 µs per parameter.
- Room: 23 bit networks, 3 boxes (climate scaling and comparisons), 26 parameters → ~29 µs on ESP32, ~19 µs on P4; 107 bytes of call + 24 bytes of DB; the “Room” FC 600 bytes, once. 12 outputs per room: 5 rooms per module with 63 usable outputs.
- Hectare: 2 sectors × (5 networks, 4 boxes including the timer, 12 parameters) → ~26 µs on ESP32; 102 bytes of calls, 56 bytes of DB (two 16-byte TIMERs, times, thresholds, probe). Fixed station: 4 KB of code, 1 KB of DB, 0.4 ms.
- Conveyor: 20 bit networks, 10 boxes (tracking, timers, comparisons), 15 parameters → ~34 µs on ESP32, ~23 µs on P4 with the VM; with the P4's machine code 5.4× faster (the value measured on the large program). 63 bytes of call, 64 bytes of DB (bag queue, timers); 4 inputs per conveyor: 15 conveyors per module. Target: everything refreshed within 20 ms.
- Bus: period = at least 5 ms, with the bus busy at most 60 %; on the P4 0.083 ms per module (192 modules in 16 ms). Worst-case reaction = 2 periods + 1 scan.
- P4 extended configuration (in development): 1000 I/O boards, 128-kbit I/O areas, a REAL area of 131,072 values (128k). One REAL probe per room and per hectare.
The formulas
scan = 0.13 ms + N × (networks × 0.79 + boxes × 1.4 + 0.3 + params × 0.25) µs ÷ speed memory = fixed code + N × call bytes ≤ work memory data = fixed data + N × DB bytes ≤ DB area period = max(5 ms, modules × time per module ÷ 0.6)
The calculator is in the site file assets/js/prestazioni.js: all starting numbers are at the top, with their source.
