The Trend Analyst is different from the Trend Object, whereas the Trend Analyst is a power trend tool for extensive process analysis, while the Trend Object is rather used to show live trending on the screens itself. The Trend Analyst. To get started, create a button with the action “Trend Analyst”:
The Config will first be empty and will open an empty Trend Analyst with no pens configured. Opening the Trend Analyst will navigate the screen to the Trend Analyst screen. If you wish to return, use the Return icon on the Trend Analyst screen to navigate back to the previous screen. Using the Settings icon, you can now add pens, change colors, ranges, etc… until you are satisfied with the result. In the settings screen, export this configuration file and it will download a JSON config file. Using the import button, you can always restore this trend configuration again. You can also use this configuration to be loaded automatically by copy-pasting the JSON data from inside the config file into the Config field of the action like this:
It will now load this configuration automatically when triggering the action. The config inside the Trend Analyst action can also be dynamically replaced by the replacers, see chapter Symbols. This means that you can dynamically replace the pens in the config to be shown in the Trend Analyst when clicking a certain pump, valve, sensor, machine, etc… You can also hide the menus, and change the colors inside the JSON:
- Allows to dynamically display (and configure) different pens and display a real-time trend, or an historic trend data.
- You can zoom in or out and pan back in time and it will automatically load the data from the database.
- You can save the data to Excel or download a screenshot from the shown trend.
- It is possible to put pens on two different time axis and compare their data with each other in a different time window.
Embedded on page
You can add a Trend Analyst to a page using the Trend Analyst Viewer object. Place the object on the page and give it enough room for the toolbar and the summary table, about 1200 by 700. Open Config and paste the Trend Analyst configuration in JSON, the same configuration the export in the Settings screen produces. Beautify formats the text.
Config also accepts the name of a variable holding the configuration, which is the usual choice for a client variable: the operator selects a configuration on the page and the trend is rebuilt in place. A configuration is applied while the trend keeps running, so switching configuration keeps the page as it is. See the chapter Viewers.
Set HideMenu, HideSummary and HideSliders to true inside the JSON for a chart-only view on the page.
The WebFrame Object serves the same purpose when a custom URL is wanted. Set the URL like this: https://<server>/TrendAnalyst?handler=Embedded
Enable PostMessage
And fill in the JSON config inside the Message
The bold part is the URL-encoded JSON. You can now use this inside an embedded WebFrame:
Quick Trend
Quick Trend opens the Trend Analyst with variables collected on runtime pages, without a configuration. On a page with Allow Quick Trend on, right-click a value, or press and hold it on a touch screen, and select Add to Quick Trend. The Quick Trend panel opens the collected variables in a Trend Analyst window over the page with Open, or on the Trend Analyst page with Open in Trend Analyst. The Return icon of the Trend Analyst navigates back to the screen, and the Quick Trend list is kept. See the Quick Trend article.
Display Format
The values the Trend Analyst shows for a pen follow the Format of the pen: the value in the tooltip and the Value, Min, Max and Avg columns of the summary. When a pen is added, its Format is taken from the Format setting of the variable, in the same way as Min, Max and Unit, and it is listed in the Format column of the pen list in the Settings screen. Select the pen there to change its Format; a Format that is not a valid pattern is marked and not applied. The Format is saved with the pen in the exported JSON config file.
| Format | Value | Shown |
|---|---|---|
| 0.00 | 20 | 20.00 |
| 0.00 | 20.1 | 20.10 |
| 0.00 | 20.23439483434 | 20.23 |
| 0.0## | 20.23439483434 | 20.234 |
| #,##0.00 | 1234.5 | 1,234.50 |
| 0 | 20.5 | 21 |
No rows match the filter.
A configuration without a Format for a pen, such as a config file exported by an earlier version or a Quick Trend, shows the pen with the current Format of the variable. An empty Format shows the values as received. The tooltip lists every visible pen at the hovered time. A pen without a sample at exactly that time shows its latest sample before that time. The Format applies to real-time and historic values alike and only changes how a value is shown; the trend line keeps the full value.
In a JSON config file the Format of a pen is the format key in chartPenSettings:
"chartPenSettings": {
"pen1": { "name": "PLC1.Flow", "unit": "m3/h", "format": "0.00", "min": 0, "max": 100 }
}History Sources
The Trend Analyst reads the history of each pen from the history source of its variable: the EnvisionSCADA Historian, a query on a Database Connection or a Python Module script. See the History Sources article. The live values of a pen always come from the variable itself.
When the history of a pen cannot be read, a message above the chart shows the reason: History could not be loaded: History source of '<variable>': <reason>. The message disappears when the pen is read again without error, or when the pen is removed.