IMD SolutionComputing LibraryShop main store

How-to

Export historian trend CSV at one-minute intervals

Edge computing and IIoT Published 7 min read

Short answer

Export the trend's recorded values and you get change-based events, about 17 minutes apart in this case, because the historian stores a value only when it changes. To get one row every minute, query the tag in the Query tool with regularly spaced retrieval at a 60-second interval and export that result; the grid comes from retrieval, not storage.

On this page
  1. Why does my trend CSV show timestamps about 17 minutes apart?
  2. Should I fix the export or the way the historian stores data?
  3. How do I query the tag to get one row every minute?
  4. Which retrieval mode fits a one-minute reporting grid?
  5. How many rows should the CSV contain for a known time range?
  6. How do I tell sparse storage from a broken acquisition path?
  7. What still makes a one-minute CSV misleading after import?
  8. Questions asked

The fix is not in the export dialog. Open the Query tool that ships with the historian client, select the same tag the trend displays, switch to a regularly spaced retrieval mode with a 60-second interval, and export that result set. The trend export lists recorded values, and a change-based historian such as AVEVA Historian, the former Wonderware Historian behind Historian Client Trend, records only when a value moves, which is why the CSV in this case shows timestamps roughly 17 minutes apart. A one-minute grid is produced by retrieval, not by storage, so no setting on the recorded-value export will create it.

Why does my trend CSV show timestamps about 17 minutes apart? #

Because the historian stores change-based: it writes a record only when the tag value moves beyond its change threshold (the deadband), so a steady signal can sit 17 minutes or longer between records and the CSV simply lists those stored events.

The trend draws a continuous-looking line between stored values. That line is display interpolation, not stored measurements, and the horizontal axis is a time scale, not a row-count guarantee. A CSV exposes exactly what the underlying request returned, so sparse storage becomes obvious the moment it lands in a spreadsheet.

The 17-minute figure in this case is an observed gap, not a configured 17-minute acquisition cycle. Change-based recording shortens the gaps while the process moves and lengthens them while it holds steady, so the spacing in any export varies with how the plant ran that day.

Should I fix the export or the way the historian stores data? #

Fix the retrieval, not the storage: a storage change affects only data recorded after the change, while a regularly spaced query produces the one-minute grid from the history that already exists, so decide first whether the report needs reported values or genuinely measured ones.

If the requirement is one reported value per minute for a spreadsheet or a report, retrieval answers it today, over history already collected. If the requirement is an actual measurement every minute, totalized energy, batch records, anything audited, that is an acquisition decision: logging PLC process data to Excel at one-minute intervals walks that path, and no query mode substitutes for a measurement nobody recorded.

Tightening the deadband or adding fixed-cycle recording affects future data only. It cannot recreate last month, and it increases storage for every tag it touches, so make that change for measurement reasons, never to fix a report format.

How do I query the tag to get one row every minute? #

Select the tag in the Query tool, choose a regularly spaced retrieval mode, set the interval to 60 seconds across an explicit start and end time, test on a short range, then export the result, and the numbered steps below walk each control in order.

  1. Select the same historical tag the trend displays. Same tag name, same source server. A different tag or a different source returns different data and the comparison means nothing.
  2. Enter explicit start and end timestamps. Align the start to a minute boundary, for example 07:00:00, if the rows must land on clock minutes.
  3. Choose a regularly spaced retrieval mode. AVEVA Historian Client Web, documented for the 2023 R2 SP2 release, offers six retrieval modes; average, maximum, minimum, last and total are five of them. Server releases earlier than 9.0 support two retrieval modes, so an older server offers a narrower set.
  4. Set the interval. If the control takes an interval with units, enter 1 minute; if it takes seconds, enter 60.
  5. Pick the value meaning. A value at each minute boundary and a summary over each minute are different reports; the decision is in the next section.
  6. Run a one-hour test query first. Confirm spacing, values and quality flags before the full range, because row count is one of the inputs that decide historian data retrieval speed.
  7. Export the result grid to CSV through the client's supported export path, keeping the timestamp and quality columns if the dialog offers them.

Where the trend itself exposes retrieval styles versus custom retrieval options, pointing the trend at a one-minute style regularizes its own export the same way. The mode-plus-interval decision is identical in every historian client; an easy chart export with minute-interval data in another package walks the same choice.

Which retrieval mode fits a one-minute reporting grid? #

Use average for analog report rows, a point value at each boundary for snapshot comparisons, and never average or interpolate a discrete state: use last for those, because averaging on and off states invents values such as 0.6 that no machine ever occupied.

Average returns a time-weighted summary of the minute between grid points, the right row for load profiles, usage reports and anything someone will sum later. Total answers when the report needs a per-minute totalized quantity; maximum and minimum answer peaks and dips inside each minute. A point value at the timestamp suits point-in-time comparison between lines or systems.

For run or stop states and other discrete tags, last at each grid point reports the state in effect at that minute. Interpolating across a step change computes a value halfway between two real states, and a regular grid will regularly straddle step changes, so treat every interpolated point as a computed value, not a measurement.

If the tag is an unscaled PLC integer, apply scaling before the numbers reach the report; historian tag scaling for an unscaled PLC integer value covers the conversion.

How many rows should the CSV contain for a known time range? #

For a two-hour window from 07:00:00 to 09:00:00 at a 60-second interval, expect 121 rows with both endpoints included: 2 h × 60 = 120 minutes, 120 ÷ 1 = 120 steps, plus the end timestamp.

Verify the file, not the screen: the first timestamp reads 07:00:00, the last reads 09:00:00, and every consecutive pair differs by 00:01:00. A count of 120 means the client excluded the end point; the grid is the same with one row fewer, so match the report template to what your client returns before automating it. Missing rows inside the range are not storage spacing: a regularly spaced request returns every grid point, so an interior gap is a query or export fault.

If the interface asks for a number of points instead of an interval, the count is intervals plus one, the same arithmetic.

How do I tell sparse storage from a broken acquisition path? #

Query one hour in which the process certainly moved: if the values track those known movements and long gaps appear only in steady periods, change-based storage explains the spacing; if known movements are missing from the history, treat it as an acquisition fault.

What you see Where to look What it means
Trace shows the wrong process value Tag selection and source mapping A binding fault; retrieval settings cannot fix the wrong tag
Correct values, wrong CSV spacing Retrieval mode and interval in the query The export followed recorded events; re-query on a grid
Known process changes missing Acquisition path and driver diagnostics An acquisition fault, not storage behavior
Quality flags mark values bad or unavailable Quality column of the query result Data was not collected; chase communications, not formatting
Gaps only during steady operation The same query over a moving period Normal change-based storage; no fault

When changes are missing, work the collection side: PLC tag collection troubleshooting covers that path. A correctly bound tag with healthy acquisition can still produce an irregular export, and that is the retrieval case, not a fault.

What still makes a one-minute CSV misleading after import? #

Two things: spreadsheet timestamp handling that hides seconds or rewrites date formats, and multi-tag exports where each tag carries its own timestamp column instead of one shared minute grid, so compare the raw CSV text before blaming the historian.

Open the file in a text editor and read the timestamp text as stored. If the text is right and the spreadsheet is wrong, import the column as text or apply an explicit timestamp format before any sorting or charting. For multiple tags, check whether the layout is one wide table on a shared grid or timestamp and value pairs per tag, and shape the report to the layout the client actually writes.

Questions asked

How do I keep seconds visible when the CSV opens in a spreadsheet?

Import the timestamp column as text, or apply an explicit time format such as hh:mm:ss to it before any sorting or charting. Automatic date conversion often displays only the hour and minute, which hides the one-minute grid even though the underlying text still carries the seconds. Verify against the raw CSV in a text editor first.

Can several tags share one one-minute CSV?

Yes. Add the tags to the same query and export once. Check whether the client writes one wide table on a shared timestamp grid or separate timestamp and value pairs per tag; run a one-hour test export and count the columns before you build the report around either layout.

How many rows will a full week at one minute produce?

10,081 rows with both endpoints included: 7 days times 24 h is 168 h, 168 times 60 is 10,080 minutes, and 10,080 intervals plus the end timestamp gives 10,081 rows. If the client slows on large grids, query in daily chunks of 1,441 rows and append the files.

Why does the average row differ from the value I see on the trend at that minute?

Because they answer different questions. The trend shows a value at an instant; an average row summarizes the entire minute between grid points, so movement inside the minute shifts the average even when the boundary snapshot matches the trace. Across a step change the two can differ by the full size of the step.

Keep reading

  • How-to

    Backfilling trend history from a plant historian

    Yes, you can backfill trend history from a plant historian into a SCADA server. Extract the stored records through the historian's native export or ODBC interface, map each source point to its destination object with original timestamps and quality, insert the batches through the destination's documented history methods, and prove the import by reading the interval back from the destination. A saved CSV is a bridge, not proof of import.

    Edge computing and IIoT

  • Explainer

    Sizing a self-hosted Node-RED InfluxDB Grafana historian

    Self-hosted on the open-source editions, the software licence cost is zero: a 600-point historian polled once a second tops out at 600 point-samples per second, 51.84 million a day. Size the SSD from a measured pilot week against that ceiling, and treat change-only logging as margin — at this rate capacity, not endurance, sets the drive.

    Edge computing and IIoT

  • Comparison

    Choosing edge storage for high-rate vibration data

    Keep the CSV-in-ZIP vibration archive that already works at 10 kHz, and treat Parquet as a candidate format, not a capacity fix. Move only after the Parquet writer proves exact sample fidelity, sustained throughput at the real acquisition rate, and recoverable completed archives after power loss. A format change is an engineering change with its own acceptance test, and compression in either format never repairs precision lost upstream.

    Edge computing and IIoT