How-to
Showing a historian maximum on an operator text field
Short answer
Bind the text field to a History Summary custom property on the Industrial Graphic: set the attribute, choose Max, and set the end boundary to the current time with the start one hour behind it. The property queries the historian with no scripting. Attribute Statistics is the wrong tool here — it keeps running figures over the last 60 values, not over an hour.
On this page
Bind the operator's text field to a History Summary custom property on the Industrial Graphic and the requirement is met without a line of script: the property queries the historian for the transmitter attribute, runs Max over the interval you configure, and the text field displays the result. Put the end boundary on the current time and the start boundary one hour behind it, and WindowViewer shows a rolling one-hour maximum. The Statistics capability on the object attribute, where most people look first, keeps running figures over the last 60 stored values — a different window, and only an hour by accident of update rate.
What answers "maximum in the last hour" #
Three mechanisms in this stack produce numbers that look alike and answer different questions. Pick by the window, not by which configuration screen happens to be open.
| Mechanism | Where it is configured | What defines the window | Decision |
|---|---|---|---|
| History Summary custom property | Inside the Industrial Graphic editor | Start and end boundaries you set explicitly | Use this for the operator's one-hour maximum |
| Statistics capability | On the object attribute in the System Platform IDE | The last 60 values by default; runs without a historian | Running figures when a value count is acceptable |
| Scripted historian query | IDE object script, optionally calling a stored procedure | Your query logic and execution schedule | Calculations the summary cannot express |
The History Summary type sits in the custom property type list inside the graphic editor; it is not an attribute data type in the System Platform IDE. Because the object and its graphic are edited from the same engineering environment, the attribute's Statistics panel is what you reach first, and it is the wrong panel for a time-bounded maximum.
Configuring the History Summary property #
- Open the Industrial Graphic that carries the operator's text display in the graphic editor and add a custom property.
- Set the property type to History Summary. If that type is missing from the list, identify your installed release and graphic technology and check that release's product help before substituting anything.
- Point the property at the transmitter attribute exactly as the historian stores it. The object name, the live attribute reference and the historian's tag identifier are three different handles; settle the mapping against the historian's tag list now, not at runtime.
- Choose Max from the summary calculations: Average, Min, Max, StdDev.
- Set the interval. Boundaries relative to the current time — end on now, start one hour behind — give the rolling hour the operator asked for; fixed start and end freeze a historical interval permanently even while the screen refreshes.
- Bind the text element to the summary property, not to the live temperature attribute, and label the field with its period and engineering unit: "Max temp, last 1 h".
- Accept the display in WindowViewer. A number that looks right in the graphic editor is a design check, not an acceptance test.
Why 60 values is not one hour #
Statistics counts values, not minutes, so its window moves with the store rate. Say the historian writes this transmitter every 30 s: 60 values then span 60 × 30 s = 1800 s = 30 minutes, and the running maximum covers half the hour the operator asked for. Store only on a 2-minute cycle and the same count stretches across 120 minutes. Deadbands, scan-rate changes and delivery interruptions all move it further. Check timestamps to learn what a value count covers; never infer duration from the count.
The decision that follows: any requirement phrased in minutes or hours gets History Summary with explicit time boundaries; Statistics answers requirements phrased as "last N values". Statistics also needs no historian at all — it works on values the platform object already holds — which is exactly why it cannot promise a window in time.
One boundary choice to settle before configuring: a rolling hour ending now, or the previous completed clock hour such as 13:00 to 14:00. Both are legitimate reporting periods with different boundaries. Pick one and make the field label say which.
Pointing InTouch at the historian #
The summary can only query a history source the HMI has been given. In WindowMaker, open Configure on the File menu, select Distributed Name Manager, and set the historian server on its Distributed History tab, then confirm the graphic runs against that source in WindowViewer. The summary also returns only what was actually stored: if collection or retention started 20 minutes ago, the first "hourly" maximum is computed from the 20 minutes that exist. Sizing the storage that keeps the summarized window available is its own exercise — sizing a self-hosted Node-RED, InfluxDB and Grafana historian works through that arithmetic for one common edge stack.
Reading the number on the screen #
A genuine maximum of zero, a window with no usable samples, and a failed retrieval are three different states; use the status or quality the graphic feature exposes so an operator never reads a blank or a stale figure as a measured result. Keep the current value and the historical maximum in separate, labeled fields, because "maximum temperature" without a time basis stops meaning anything the moment someone asks "since when?". And keep the roles straight: a historical maximum on the screen is operator information — trips, interlocks and alarms stay in the controller, and nothing displayed on an HMI figure protects the process.
When scripting is the right answer #
Script the historian query instead of configuring the summary when the calculation combines several tags or applies math beyond Average, Min, Max and StdDev, when the result must be written back or logged rather than only displayed, or when your release does not offer the History Summary type. The object's script engine can run historian queries, and a stored procedure called from the IDE script keeps heavy query logic on the server — but from that day you own connection management, execution scheduling and failure handling. Schedule scripted queries on a period or an event, never on every window refresh: the operator's screen should not be a query trigger loading the historian and the PC behind it. The configuration-before-scripting line holds across SCADA packages as well: wherever a platform offers both a named, configurable query mechanism and free scripting, configure the query first and script only what it cannot express.
Questions asked
Can the operator pick the period on the screen, like 30, 60 or 120 minutes?
Yes. The same graphic can carry buttons that set the summary's boundaries to different periods — last 30, 60 or 120 minutes, or periods measured in days — with no scripting. Tie the on-screen interval label to the selected period so a two-hour maximum is never read as a one-hour figure.
Why does the displayed maximum sit still while the live temperature moves?
Usually correct behavior. A rolling one-hour maximum changes only when a new value exceeds it or the previous peak ages out of the window; between those two events it holds still. If it has not moved across an entire shift, inspect the boundaries — fixed start and end freeze the interval even while the screen keeps refreshing.
How do I check how much time my Statistics window actually covers?
Log or export the timestamps of the attribute's last 60 stored values and subtract the oldest from the newest. At a 30-second store rate the span is 30 minutes; at a 2-minute rate it is 2 hours. That difference is the elapsed time the running maximum genuinely represents.
History Summary is not in my custom property type list. What now?
Identify the installed product release and graphic technology, then check that release's product help for the supported custom property types; the list differs between releases and between InTouch for System Platform and OMI. Do not switch the display to attribute Statistics merely because it is the statistics setting visible in the IDE.