HMI datalog file retention: what fills USB storage over months

7 min read · Published November 13, 2026

Alarm and Message logs carry a fixed 365-day retention. Datalog files are different: they stay on the CF card or USB drive until someone deletes them, so storage fills at a rate you can compute from rows per day and bytes per row. Size the drive from that growth rate and check free space at half the days-to-full figure.

A fixed 365-day retention on the settings page looks like a storage promise. It is one for exactly two of the files an HMI panel writes. Alarm logs and Message logs expire after a year. Datalog files do not: they stay on the CF card or USB drive until someone deletes them. The drive fills at a rate set by the logging interval and the bytes per row, not by that calendar figure. This page gives the retention rules, the growth formula, a worked example for a 10-second log and a 10-minute log, and the check schedule that keeps a drive from filling mid-run.

Do HMI datalog files expire after 365 days?

No. On panels configured through Panel Manager-style settings, Alarm and Message logs carry a fixed 365-day retention. Datalog files stay on the CF card or USB drive until someone physically deletes them.

The 365-day duration is a label on the Alarm log and Message log entries in the panel configuration tool. The Datalog entries on the same page carry no duration at all: files accumulate from the day the project goes live. The space they hold is the sum of every row ever written. That difference decides the maintenance plan. Alarm log storage reaches a ceiling within a year and stays there. Datalog storage grows without a ceiling, so it is the only log that needs a storage budget and a calendar entry.

What does the 365-day log setting actually control?

The fixed retention governs the Alarm log and the Message log only: rows older than one year are dropped, which is why those logs hold a steady 3.7 MB on a panel writing 50 alarms a day at 200 bytes per row.

The arithmetic behind the steady state: 50 alarms/day × 200 bytes/row = 10 kB/day, and 10 kB/day × 365 days = 3,650,000 bytes ≈ 3.7 MB, held there by the pruning. The 365-day durations are fixed in the tool; there is no setting to retune. Nothing in the Alarm or Message log entries touches Datalog files. When a drive fills, the fix lives in the datalog files or in whatever else is growing, and the file list on the media tells you which. Retention labels differ between HMI families, so read the labels on your own settings pages before you size anything.

How do you calculate datalog growth before the drive fills?

Rows per day is the whole calculation: divide 86,400 seconds per day by the logging interval in seconds, multiply by the bytes per row, and multiply by the days of retention you want.

Three lines cover it:

  • Rows per day = 86,400 ÷ interval in seconds. A 10-second log writes 8,640 rows per day; a 10-minute log writes 144.
  • Megabytes per day = rows per day × bytes per row ÷ 1,000,000.
  • Days to full = free megabytes ÷ megabytes per day.

Measure the bytes per row; do not guess it. Export one datalog file and divide its size in bytes by its row count. A text row with a timestamp and a few numeric channels lands between 50 and 70 bytes, and 60 is a fair planning value. The interval is the lever that matters: most notice and status logging runs far slower than once a second. Logging switch states at a 10-minute interval is a deliberate choice that keeps the files small.

Worked example: how long until a 512 MB card or a 4,000 MB drive fills?

One datalog recording four process values every 10 seconds writes 8,640 rows per day, about 0.52 MB per day at 60 bytes per row and 189 MB per year. A 512 MB card fills in about 2.2 years and a 4,000 MB drive in about 20.

The run-through:

  • Rows per day: 86,400 seconds ÷ 10 seconds = 8,640 rows.
  • Per day: 8,640 rows × 60 bytes = 518,400 bytes ≈ 0.52 MB.
  • Per year: 0.52 MB/day × 365 days ≈ 189 MB.
  • On a 512 MB card: keep about 100 MB for the project, alarm log and trend files, leaving 412 MB free. 412 MB ÷ 0.52 MB/day ≈ 792 days ≈ 2.2 years.
  • On a 4,000 MB drive: about 4,000 MB minus the same 100 MB leaves 3,900 MB, and 3,900 MB ÷ 0.52 MB/day ≈ 7,500 days ≈ 20 years, longer than most panels stay in service.

The same four values at a 10-minute interval: 144 rows/day × 60 bytes = 8,640 bytes/day ≈ 8.6 kB/day, which is 3.2 MB per year. Even the 512 MB card outlasts the installation. The decision follows from the interval: a 10-second log fits a small USB drive with years of margin, and a 10-minute log fits any card the panel accepts.

What else fills the USB drive besides datalog files?

Screen captures, dated log files and the alarm and message logs share the same drive as the datalog. Each fills in its own way, so count them all in the storage budget.

A trend history kept in panel memory causes a different failure, the frozen screen. Why an HMI panel freezes when trend history fills panel memory covers that one. On the drive, watch two things. First, log files with dated names pile up one file at a time, so before you blame the datalog for a full drive, confirm how the oldest files roll off; the checks are in confirming oldest-file rollover when the USB log drive fills. Second, short file names can exhaust their numbering and stop trend logging while space still remains, which why trend logging stops when short file names run out explains. The free-space figure therefore hides file-count problems: at each check, read the count of files alongside the megabytes.

How do you delete datalog files without losing records you need?

Archive first, delete second: copy the datalog files you must keep off the panel, confirm the copy opens, then delete only the files outside your retention window, and check free space afterward.

Agree the window with whoever owns the process record; a quality department that needs 13 months of temperature history changes the plan. Then work in order: list the datalog files with their date ranges, copy the keepers, open one copied file and read real rows out of it, delete the rest, and read the free-space figure again. Before you close the job, confirm the next logging interval produced new rows; a cleanup that stops collection is worse than a full drive. Treat the panel's datalog as the only process record for a batch until a copy exists somewhere else. The panel-side sequence, archiving before deleting, is written up in clearing HMI USB log storage from the panel.

How often should you check free space on the panel's storage?

Compute days to full as free megabytes divided by megabytes per day, then put the drive on the calendar at half that interval. 412 MB free at 0.52 MB per day gives 792 days, so the check lands about every 13 months.

At each visit, write down three things: the free-space figure, the dates of the newest and oldest datalog files, and whether the latest interval produced new rows. The oldest-file date is the retention report. The free-space figure is the fill report. The new-row check proves the logger still runs. The 4,000 MB drive from the example runs decades to full, so an annual glance during the shutdown round is plenty; the 512 MB card needs the 13-month visit. If growth jumps between checks, a datalog was added or an interval shortened, and the budget needs recomputing from the formula above.

When is a bigger drive the wrong fix?

A bigger drive only buys time when the files are the record. If the datalog holds values you genuinely need, size it from the formula. If the log exists to work around a missing export path, fix the delivery, because no drive size makes an unwanted log stop growing.

The delivery gap is real. Some panels email alarms well but cannot attach one named datalog file to a scheduled message, and they offer no age-based datalog deletion. A promise to send a customer a daily file of room temperatures needs a plan outside the panel. Verify what your panel's scheduled actions can attach before you promise the same. Where the panel cannot deliver, the working pattern is upstream: a scheduled export of the datalog to USB or a network share, and a PC or historian that emails, graphs and archives it. Keep the panel as the collector of recent values and alarms and it stays inside any reasonable drive budget. If what you want beside the panel is a line-side status or notice board, that is the job our shop-floor signage category covers.

Recommendation: Size the panel's storage as megabytes per day × retention days × 1.5 for margin. Archive before any deletion. Calendar a free-space check at half the days-to-full figure. When the job needs a specific datalog file delivered on a schedule, move that delivery to an upstream PC or historian instead of enlarging the drive.

Questions

Does re-downloading the HMI project wipe the datalog values already stored?

No. A current HMI help file documents that adding a new data log, deleting one, or re-downloading the project retains the values of the previously configured data logs. The values live on the storage media, so a software update clears neither them nor the space they occupy; only deleting the files from the media does that.

Is there a limit on how many data logs one HMI project can define?

Yes, and it is generous: one current panel manual instructs you to manage the data logs you keep and not to exceed 1,000 of them. Each data log writes its own files on its own interval, so a project near that count multiplies the storage growth on the drive and the length of the file list you maintain.

What happens when the USB drive on an HMI panel reaches 100 percent?

Find out on your model before it happens. Panels differ: some stop writing new rows, some roll over to the oldest file, some log an error and continue. The 365-day alarm setting protects only the alarm log, so a datalog arriving at a full drive either stalls or stops, and the half-days-to-full check schedule exists so you never learn the answer live.

When is logging on the panel itself good enough?

When the record is short and local: alarms, recent trends and a few weeks or months of values on one panel, with an annual USB copy for the archive. Move to a historian or SCADA collector once you need years of history, scheduled delivery of named files, or the same cleanup across many panels, because manual deletion does not scale.

Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.

Keep reading

Build your signAsk for a quote