Situation
The manufacturer sold electrical-resistance corrosion probes and transmitters whose readings were collected by hand or with fragmented utilities. Its customers ran plants with dozens or hundreds of probes on the mix of buses found in industrial sites, serial RS-485 and TCP/IP, speaking Modbus or the manufacturer's own protocol. They needed one system that polls every instrument on its own schedule, turns raw readings into metal loss and corrosion rate, watches instrument health, and loses nothing when a link, a device or the collector itself fails. Plant security rules excluded the cloud at the time, so installations had to run on the customers' internal servers and still be ready for a cloud future.
What we built
Our part was the data collector, the piece of the monitoring platform that talks to the instruments, and its integration with the rest of the system. A partner software company designed and managed the overall platform and built the backend, web, desktop and mobile clients to a shared specification. We managed our own scope and team and coordinated with that company on the interfaces between the collector and the backend.
The collector runs as a Windows service next to the plant network. It polls each probe transmitter at its own interval, from one minute to one week, over Modbus on serial and TCP and over the manufacturer's own protocol on both bus types, decodes the readings and the instruments' error codes, checks each asset's health every two minutes against thresholds, and ships measurements, health reports and error reports to the backend over a TLS-protected REST API. Health checks flag unreachable assets and out-of-range readings for email and SMS alerts. Configuration is pulled from the server at a polling interval, with a local fallback so a lost connection does not stop collection.
The product was planned in three editions from one specification: a standalone install for a single asset, a mini edition for up to 32 assets, and a plant edition for up to 255 assets and 25 users.
The hard part
Reliability had to be designed in, because a corrosion reading that is lost is gone for good. Acquisition writes every reading to an internal message queue with local persistence. A separate consumer uploads from that queue to the backend. A watchdog monitors both processes, restarts either side on failure and posts an error report. A dead network, a crashed process or a rebooted server therefore delays readings and never loses them.
The second problem was the plant itself. Dozens of serial and network channels have to be polled concurrently, and a slow or silent device on one bus must not hold up the others. The collector runs on an asynchronous event loop, so channels are polled in parallel without threads blocking on slow devices, and the guard time each transmitter needs on a shared serial bus is respected per bus rather than per system.
Outcome
- Four device protocols and both plant bus types, RS-485 and TCP/IP, handled by one collector (specification).
- Per-asset polling from 1 minute to 1 week, health checks every 2 minutes, threshold alarms by email and SMS (specification).
- Designed capacity of 255 devices per installation at one reading per device per minute, 367,200 readings a day (specification for the plant edition).
- Queue, persistence and watchdog so that device, network or process failures do not lose data (architecture).
- Delivered as one of two vendors: Encode built the collector and integrated it with the backend a partner company built.
What changed: an instrument maker whose readings were collected by hand or with fragmented utilities got a collector that polls every probe on its own schedule, keeps every reading and feeds its monitoring platform, with the plant deployments and the cloud path specified from the start.
Fact sheet
| Client | a US manufacturer of corrosion monitoring probes and instruments. |
|---|---|
| Engagement | September 2016 to September 2018. A monthly retainer for the lead engineer plus hourly work, in bursts with maintenance periods between them. Encode responsible for the collector and its integration, managing its own scope and team. A partner software company designing and managing the overall platform and implementing backend and clients to a shared specification. The client providing device models, protocols, thresholds and domain expertise. |
| Devices | electrical-resistance probe transmitters on RS-485 buses and Modbus TCP/IP devices. |
| Collector | a Python service on Windows with an asynchronous event loop, a persistent message queue between acquisition and upload, a watchdog with automatic restart, a TLS REST client. |
| Platform around it, by the partner | a Python REST backend with TLS and OAuth2, WebSockets, a per-edition database, OPC server integration, email and SMS notifications, web, desktop and mobile clients. |
| Editions | plant (255 assets, 25 users), mini (32 assets, 5 users), standalone (1 asset, 1 user). |
| Numbers | 4 protocols, 2 bus types, polling from 1 minute to 1 week, health checks every 2 minutes, 255 devices and 367,200 readings a day by design. |