How it works
This Coreflux LoT template reads a live Allen-Bradley CompactLogix tank and republishes process values, metadata, and derived topics under demo/tankwatch/#. It turns four raw alarm bits into a single state word, builds a 1-minute level trend, and emits a snapshot report every 15 seconds.
Key features
- PLC polling: Reads
Tank.Level.Value,Tank.Temperature.Value, alarm bits, and metadata from oneALLEN_BRADLEYroute. - Derived alarm state: Collapses
highhigh,high,low, andlowlowbits into one consumable topic per signal. - 1-minute trend: Keeps count, sum, min, and max, then publishes a closed-window trend model.
- Snapshot report: Publishes level, temperature, states, and PLC description as collapsed JSON.
- Self-contained demo: Uses one route, four actions, and two models; no external APIs required.
Prerequisites
- Coreflux broker build with the ALLEN_BRADLEY native dependency
- Network access to the target PLC
- A controller address and tag paths adapted to your own site
