# Save trend sets

> Keep named lists of variables to trend together in the eaxPLC project, add variables from the tag database, the cross-reference, the editor or the quick-watch card, record and read them as a chart, a values grid or both, export PNG and CSV, and get the sets back with a rollback.

Product: eaxPLC · Type: How-to guide · Editions: Free, Pro
Source: https://eaxware.com/docs/eaxplc/how-to/save-trend-sets/
Verified against commit 154d4dd.

## Goal

Save the variables you always look at together (a tank's level, its pump, its valve) as a **trend set** in the project, so you and your colleagues open them in one click, and the set follows the project's history.

## Before you start

- The PLC keeps a project. Without one, the view says *This PLC keeps no project: trend sets cannot be saved here.*
- Anyone signed in can open trend sets. Creating, saving and deleting them needs an engineer (Lead_Engineer or Administrator).

## 1. Open Trends and pick a set

Click **Trends** in the toolbar (or **View → Trends**). Pick a set in **Trend set**, or click **New** and give it a name: 1 to 64 letters, digits, spaces, `_`, `.` or `-`, starting with a letter or digit.

## 2. Add variables

A set holds up to **32** variables: a name, a member or index path (`T1.ET`, `Recipes[2].Temp`) or a direct address (`%IW4`). Add them from:

- **Add variable** in the Trends view (type the name or address, then **Add**);
- the **Trend** row action of the **Tag database** and of the cross-reference's variables grid;
- **Add to trend set** in the editor's context menu;
- **Add to trend** on the quick-watch card ([Watch a value on hover](/docs/eaxplc/how-to/watch-values-on-hover/)).

Each variable is a chip under the toolbar; its **×** removes it.

## 3. Record and read

Click **Start Recording** (**Pause Recording** stops it; **Clear** drops the samples). The samples are the live values the Studio already receives from the PLC: recording asks nothing more of the PLC and never touches its scan.

The chart and the values share one container with three tabs:

- **Chart**: a time axis with zoom (mouse wheel and the slider below), a legend that hides or shows each variable, and a tooltip with the values.
- **Values**: one row per sample time, with a value and a quality column per variable, column filters and **CSV**.
- **Split**: both side by side, on screens at least 1400 px wide.

The last tab is remembered in your browser. Zooming the chart filters the values grid to the same time range (**Show all** clears it).

**Quality.** A sample the PLC could not read is **Bad** with no value: the chart shows a gap, never a 0, and the values grid says **Bad**. A BOOL is drawn as 1 or 0, a timer instance as its elapsed time.

**Export.** The chart's toolbar saves a **PNG** image and a **CSV** of the plotted data; the values grid has its own **CSV**.
[Image: The Trends view in Split: the trend set "Tank level (4)" with New, Save, Delete, Pause Recording and Clear, four variable chips, the chart of the tank level ramping and the BOOL variables at 0 and 1, and the values grid with time, value and quality columns.]
[Image: The Trends view in Split: the trend set "Tank level (4)" with New, Save, Delete, Pause Recording and Clear, four variable chips, the chart of the tank level ramping and the BOOL variables at 0 and 1, and the values grid with time, value and quality columns.]

A trend set in the Split tab: chart and values of the same samples.
## 4. Save, delete

- **Save** writes the set into the project (`trendsets.json`, next to the POUs). If someone saved the same set since you opened it, the save is refused (`409`): reload and add your change again. Switching sets with unsaved changes asks before discarding them.
- **Delete** removes the set from the project, after asking. The variables are not affected.

A project holds up to **64** trend sets. Saving, creating and deleting are recorded in the audit trail (`TRENDSET_SAVED`, `TRENDSET_CREATED`, `TRENDSET_DELETED`).

## Versions and rollback

The trend sets are part of the project tree that every deploy records, so each program revision carries the sets as they were saved at that deploy. A **rollback** puts the revision's trend sets back with the project; a revision recorded before trend sets existed leaves none. The samples are never saved: only the list of variables is.

## Related

- [Watch a value on hover](/docs/eaxplc/how-to/watch-values-on-hover/)
- [Find references and the I/O map](/docs/eaxplc/how-to/find-references-and-io-map/)
