Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Live data: show a value within 1 s of its change

Aperta
#116 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@mrcsin ci sta già lavorando.

Dal 8/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug enhancement

Problem

The chart's live edge comes from the archive: RealtimePoll reads trends every second. The archive cannot carry a live edge. Simple-Scada buffers each variable in memory and writes it to trends in batches of about 50 rows or every ~8 minutes, so the newest row of a pen lags the plant by 1-3 min for a pen changing every second, ~8 min for a slow one, hours for a rarely changing one, and up to a day for a constant one (docs/architecture/scada-archive-observed.md#how-late-a-value-arrives). No setting controls the buffering.

Requirement: a change on the plant reaches the chart within 1 s.

What the SCADA's built-in OPC UA server gives (measured 2026-10-08, 2.7.6.0 demo-64)

  • Available in Minimal, Standard and Professional (manual, version table); enabled per project in Проект -> Настройки -> OPC UA-сервер, endpoint opc.tcp://<host>:<port>. The scripts manual (2.10.6) names it the usual way to hand current values to other applications.
  • Node of a variable: ns=3;s=<project ID><trends.id>, e.g. ns=3;s=FD34514A352 for id = 2. The project ID is in Проект -> Настройки -> Общие; changing it changes every address. Namespace URI http://simple-scada.com/UA.
  • Latency from the server's source timestamp to the client, 100 ms publishing interval: median 3-4 ms, max ~190 ms.
  • SourceTimestamp (UTC) equals the archive's t (local time): 119/119 rows of a by-change pen and 68/68 of a deadband pen matched on (t, v). A by-time pen matched 79/92; the other 13 archive rows sit on the archiver's own tick a few ms after the live change, sometimes with the previous value.
  • Live is denser than the archive: every change arrives (117 notifications in 2 min for Time10s, ~12 archive rows).
  • A new subscription delivers the current value at once, also for a pen that has not changed.
  • Anonymous, security mode None works; SemiPlot and the SCADA always run on one machine.

A question to the vendor (is OPC UA the intended route, does an OPC UA client take a licence seat, is the node address format stable, HistoryRead) is out; the expected answer is OPC UA.

Design proposal

  • Live source. A new SemiPlot.DataSource.* sibling subscribes over OPC UA (OPCFoundation.NetStandard.Opc.Ua.Client) to every pen of the catalogue, publishing interval ~100 ms, and emits the same Sample stream the poll emits today. Endpoint port and project ID are configuration keys under connection/.
  • Archive watermark per pen. The archive poll stays and advances, per pen, the newest t seen in trends.
  • Live buffer per pen. Holds live samples newer than the pen's watermark, bounded in time (e.g. 24 h); samples at or below the watermark are dropped. Stitching is by watermark, not by matching points, because by-time pens do not match exactly.
  • Rendering. History from the archive up to the watermark, the live buffer after it; when the archive catches up its rows replace the live points. At start-up the first notification of each pen draws a step from its last archived value to now; live history exists only while the window runs.
  • OPC UA down. Archive only, a message on the panel, reconnection in the background.

Related findings that touch the read path

  • Layers 1 and 2 hold at most 2 points per period (min and max), not 4: AggregationLayer.ToPointSpacing is off by a factor of two.
  • Layer 3 can be empty (2.7.6.0 wrote none in 48 h): a window that selects the day layer draws nothing; the hour layer has to stand in.

Acceptance

  • A value change on the SCADA appears on the chart within 1 s, measured on the bench with the demo SCADA.
  • No visible seam or duplicate when the archive catches up with the live buffer.
  • With the OPC UA server off, the chart works from the archive alone and says so.
Lingua principale
C#
Stelle
0
Fork
0
Merge medio
2h 32m
PR unite (30g)
43

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Semiteq/SemiPlot

Tutte le issue di Semiteq/SemiPlot

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.