A trend's Total Stored Samples setting decides how far operators can page back through a trend, and the panel charges memory for every stored sample at download. Size each trend to the look-back operators actually use, keep long-term records in data logging to external storage, and a project that reported a 10 MB limit downloads with room to spare.
When a project that sits on the hard disk at 976 KB refuses to download, check the trend objects first. The panel reports a 10 MB memory limit even though the file is small. Each trend's Total Stored Samples setting decides how many points stay browsable behind the trend cursor, and the panel charges that allocation against project memory at download. The fix is to size every trend to the look-back operators actually page through. Leave anything longer to data logging, which writes to an external destination and stays out of that budget. The numbers below come from a reported case in which each trend added about 750 KB. If the floor also needs a separate notice or andon board, our shop-floor displays are built for that job; they are not HMI replacements.
Why a small file fills the panel at download
The file size on disk and the size the panel reports at download are two different measurements. The download figure is the one the limit applies to, and it grows with runtime allocations, trend history above all. Match what you see against this list:
- The download stops with a memory-limit message while the file on disk is small. In the reported case, 976 KB on disk against a 10 MB download cap. Points to allocations charged at download.
- The download figure is many times the disk figure. The case grew about tenfold on download. Points to per-sample allocation, and trend history is the usual driver.
- One trend accounts for hundreds of kilobytes. About 750 KB per trend in the case. Points to that trend's Total Stored Samples count.
- The SRAM diagnostic reads almost empty. The case showed 3 KB used of 256 KB. The SRAM page tracks a 256 KB pool and the download limit was a 10 MB project budget, so read the download message for project-size questions.
- A trend is set to 65535 samples. People set the maximum believing it feeds data logging. It sets cursor depth only, and at 65535 it costs about six and a half times what a 10,000-sample trend costs (the example below works that scale out).
History can also bite at runtime, after the download has succeeded. If the panel freezes while trend history fills its memory, the panel-memory freeze article covers that separate failure.
What Total Stored Samples sets, and what it leaves alone
The setting is the number of samples the panel keeps behind the trend cursor. The trend object draws a fixed number of points per screen, 99 on the reported panel. Your panel's programming manual documents the trend object's settings and log types in its objects chapter, so check your own points-per-screen number and use it in every calculation below. Paging back walks the stored samples screen by screen, so a trend holding 10,000 samples at 99 points per screen takes about 101 page-backs to reach the oldest point. Almost nobody makes that trip.
Two nearby settings do different jobs:
- The trend's sampling interval spaces the points the trend draws. Interval multiplied by stored samples is the time the cursor can reach back.
- Data logging collects temperatures, flows, levels, pressures and alarms as records and writes each one to an external destination, CF1, C2 or USB in the reported setup. Your panel family's help system documents that job in its logging and trends section. Trimming the cursor history leaves the logging configuration and its records in place.
And when the real requirement is weeks of history for engineering review, that belongs in the PLC or a logger; the historical trend graphs and PLC memory article covers that split.
Checks to run before you cut anything
- Record the exact download message and the project size it reports. That number is the budget.
- Record the panel's memory pages as a baseline: SRAM and built-in flash. The case's flash page read 9,870 KB used of 49,312 KB.
- List every trend object with its Total Stored Samples value and its sampling interval.
- Ask the operators how many screens back they actually page while troubleshooting. Their answer sets the target.
- Measure your panel's bytes per sample: download once, remove a known number of samples from one trend, download again, and divide the change in reported size by the samples removed.
The fix: size each trend to the real look-back
- Convert the operator answer to a sample count: look-back time divided by the sampling interval, rounded up to the next hundred for headroom. If the answer came in screens, multiply screens by points per screen.
- Set Total Stored Samples to that count on each trend. Work through the largest counts first; each one freed returns the most budget.
- Leave the data logging configuration untouched: same destination, same interval. If records run to the CF card, keep them there; the CF card data logging article covers picking the safe slot.
- Rebuild and download. The limit message should clear. Re-read the memory pages and compare against the baseline.
- Open each trimmed trend, page back to the oldest kept point, and confirm the window matches what operators asked for. If the trend stops moving after you page back, the scroll-back article lists the checks.
- If the message survives the trim, compare the before-and-after download sizes; the remaining allocation shows up as the difference. Repeat per trend, largest first, then work through other project resources with the panel's diagnostics.
Example: the panel that filled a 10 MB limit with trend history
Inputs, and where each comes from:
- Download limit: 10 MB, read as 10,240 KB at 1,024 KB per MB (the case's reported limit).
- Project file on disk: 976 KB (the case).
- Download cost per trend: about 750 KB (the case).
- Points per screen: 99 (the case's trend object).
- Configured history: one trend at 10,000 Total Stored Samples (the case's working example).
- Illustrative resize inputs: operators page back about three screens, and the trend samples every 5 s. These two are this example's assumptions; take yours from your operators and your trend configuration.
Rule in words: samples to keep = look-back divided by sampling interval, and the download cost falls in proportion to the sample count. The case's numbers set that scale: 750 KB ÷ 10,000 samples ≈ 75 bytes per sample.
Arithmetic:
- Growth at download: 10,240 KB − 976 KB = 9,264 KB. Against 750 KB per trend: 9,264 ÷ 750 ≈ 12, so the growth is about twelve trends' worth of sample allocation, and the 976 KB of screens is a rounding error beside it.
- Page depth as configured: 10,000 ÷ 99 ≈ 101 page-backs to reach the oldest sample. The three screens operators actually use come to 3 × 99 = 297 points, so set 300.
- Coverage check: 300 samples × 5 s = 1,500 s = 25 minutes of look-back. If a shift needs more, 600 samples × 5 s = 50 minutes.
- New cost per trend: 300 × 75 bytes = 22,500 bytes ≈ 22.5 KB, down from 750 KB. Twelve trends: 12 × 22.5 KB = 270 KB, down from 12 × 750 KB = 9,000 KB.
- Freed budget: 9,000 − 270 = 8,730 KB, about 8.5 MB of the 10,240 KB limit. The deployed project lands near 976 + 270 = 1,246 KB, about 12% of the budget.
Result: the download clears with roughly 9,000 KB free, so screens can be added again. Decision: any trend whose operators stop within three screens gets about 300 samples; any trend that must reach back further gets sized from its own look-back and interval; anything longer, a week of process records for instance, moves to data logging on the external destination, outside the download budget.
Recommendation
Recommendation: Size every trend's Total Stored Samples to the look-back its operators actually page through, computed as look-back time divided by sampling interval, or screens back multiplied by points per screen. Treat about 300 samples as the starting point for a trend nobody mines deeply, and set no trend to 65535. Keep Total Stored Samples out of every logging decision: long records belong in data logging to the panel's external destination, which stays outside the download budget. Confirm with one download; in the reported case each trimmed trend freed about 730 KB, from 750 KB at 10,000 samples to 22.5 KB at 300.
Questions
What does setting Total Stored Samples to 65535 actually cost?
At the reported case's scale, 750 KB per 10,000 samples, or about 75 bytes per sample, one trend at 65535 samples holds 65535 × 75 = 4,915,125 bytes, about 4,800 KB. That is nearly half the case's 10,240 KB download budget for a single trend, and with 99 points per screen it is about 662 page-backs to reach the oldest point. The setting extends cursor depth only, and the trend still draws 99 points at a time, so nothing on screen improves with the extra samples.
Does trimming Total Stored Samples delete records already logged?
No. Data logging writes each record to its external destination, CF1, C2 or USB in the reported setup, as the values are collected, so stored records exist from the moment they are logged. Reducing the cursor history shrinks only the window an operator can browse on the trend. Keep the logging configuration unchanged through the resize, and pull a few records afterwards with your usual retrieval procedure to confirm the destination still receives them.
How many samples should a trend keep when nobody knows how far back they page?
Start at 99 samples, one screen on the reported panel, and watch one shift. Raise the count one screen at a time, to 198 and then 297, only when an operator reports hitting the end of the history while troubleshooting. Each added screen of 99 samples adds about 7 KB of download allocation at the case's scale of 75 bytes per sample, so the cost of learning the real look-back this way stays small.
Does the trend's sampling interval also set how often data logging records?
No, the two intervals are separate settings. The trend's sampling interval spaces the points the trend draws and the cursor walks. Data logging has its own interval that sets how often a record is written to the external destination. Slowly changing switch states are commonly logged at a 10-minute interval, while process values that move quickly need a shorter one to stay useful.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.