Industrial Networks and OT · #88
Online PLC Data Buffer Sizing
Calculates how large the on-site buffer must be so data is not lost when the central link drops.
- Data is processed in your browser and not sent to a server
Tool
What does this tool do?
An edge gateway or PLC buffers measurements locally when the historian/cloud link drops (store and forward). When the buffer is full the oldest data is deleted and production records get gaps. The tool gives hourly data volume from tag count and sample rate, the memory needed for a target outage and how long existing memory lasts.
How to use it
- Enter tag count and samples per second per tag (1 = every second, 0.1 = every 10 seconds).
- Enter record size (value, timestamp, id/quality bytes) and the share of samples stored.
- Enter the outage duration to cover and, if known, available memory; press Run.
Fields
- Tags
- Samples/s (per tag)
- 1 = every second; 0.1 = every 10 seconds.
- Value bytes
- REAL/DINT 4, LREAL 8, BOOL 1.
- Timestamp bytes
- Id/quality bytes
- Share of samples stored
- Below 100 % with report-by-exception (deadband).
- Outage to cover (hours)
- Structure overhead
- File/database format headroom.
- Available memory
- Optional.
Worked example
| Input | Value |
|---|---|
| Tags | 200 |
| Samples/s (per tag) | 1 |
| Value bytes | 4 |
| Timestamp bytes | 8 |
| Id/quality bytes | 2 |
| Share of samples stored | 100 |
| Outage to cover (hours) | 24 |
| Structure overhead | 0 |
| Available memory | 128 |
Expected result: 200 tags, 1 sample per second, 14-byte record: 2.8 kB/s, 241.92 MB for 24 hours; 128 MB lasts about 12.7 hours of outage.
An outage unnoticed over a weekend means data loss. Slowing sampling of low-priority tags to 10 seconds or storing only changes with a deadband extends the buffer several times.
Second scenario
| Input | Value |
|---|---|
| Tags | 1500 |
| Samples/s (per tag) | 0.2 |
| Value bytes | 4 |
| Timestamp bytes | 8 |
| Id/quality bytes | 2 |
| Share of samples stored | 30 |
| Outage to cover (hours) | 72 |
| Structure overhead | 10 |
| Available memory | 512 |
Expected result: 1,500 tags, every 5 seconds, 30 % changes, 72 hours: 359.25 MB; fits in 512 MB.
Method and assumptions
Record = value + timestamp + id/quality bytes. Bytes/s = tags × samples/s × stored share × record × (1 + overhead). Needed = bytes/s × hours × 3600. Duration with memory = memory / bytes/s / 3600.
Using the result and troubleshooting
Size the buffer for the longest expected outage (weekend, maintenance) and set a buffer fill alarm. Use the Historian Storage Calculator for the historian side.
Limits and common mistakes
- Compression, batching and the gateway software's internal structures are not modelled; prefer vendor memory figures.
Frequently asked questions
What happens when the buffer is full?
Most gateways overwrite the oldest data (FIFO); some reject new data. Check which behaviour is configured.
Related tools and service
- Historian Storage CalculatorEstimates the space a production data archive takes over the years.
- Modbus RTU Polling Time CalculatorCalculates how many milliseconds it takes to read every device on an RS-485 line once.
Related service: IIoT and Production Data Collection