Yes: a historical trend on an HMI panel is a Line Graph that redraws a block of up to 24 consecutive PLC memory locations per pen, on a timer or on a trigger tag. The panel keeps no samples of its own, so the PLC program must shift older readings through the block. Build the rolling buffer, match the pen's point count to it, and set a short time refresh.
Yes, the readings have to live in the PLC. A historical trend on an HMI panel is the Line Graph object, and that object draws its line straight out of PLC memory: each pen displays up to 24 consecutive memory locations, and the whole line is redrawn at every refresh, on a timer or on a trigger tag. The panel adds nothing between refreshes and keeps no samples when the screen closes, so the history exists only where your PLC program puts it. The other trend object, the Real Time Graph, behaves the opposite way: it starts at point 1 whenever the screen opens and adds one point per refresh. Once you know which object is on the screen, the fault usually names itself.
Why the two graph objects behave differently
Two trend objects ship with these panels, and they look similar on screen.
The Line Graph, documented in the current help as the Line Trend Graph, plots each pen across a block of PLC memory. One pen reads 4 to 24 consecutive registers, and one graph carries up to 8 pens, each with its own block. Every refresh draws the complete line again: set the pen to 20 points and all 20 points draw at each refresh, whether the refresh runs on a time setting or on a trigger tag.
The Real Time Graph accumulates points on its own. It draws point 1 when the screen opens and adds one point at each refresh interval. Nothing from before the screen opened is plotted, and coming back to the screen starts the trace over at point 1.
That difference is the whole fault in most cases. A Line Graph never creates history, so a flat or frozen trace means the PLC block is not turning over. If the trace should start empty each time an operator opens the screen, the Real Time Graph is the right object. If the last half hour should be visible whenever the operator looks, use the Line Graph and let the PLC keep the block.
Symptoms and what each points to
- A flat line at one value. Every location in the block holds the same number. Either the PLC copies the live value into the whole block, or it writes one register while the rest keep their initial values. Watch the block online while the process value moves.
- Only the newest point moves. The sample event writes a fresh reading but never shifts the older ones, so every point except the newest stays frozen. Add the shift step to the sample logic.
- The trace zigzags or jumps in time. The block is out of order or not consecutive. The pen plots location after location in address order, so a gap or a swap shows immediately. Confirm the start address and the write sequence.
- The line lags or never redraws. The refresh sits on a Trigger Tag that never changes state, or the time refresh is far slower than the sample interval. Check the refresh method and the Trigger State setting.
- The trace starts empty every time the screen opens. The object is a Real Time Graph, not a Line Graph. Open the object properties and read the type before you change any PLC logic.
Read the pen configuration first
Open the pen's properties in the HMI project and record three things: the PLC start address, the configured point count, and the refresh method. The documented block is 4 to 24 consecutive registers, and a pen cannot plot more than 24, so set the point count at or below that ceiling before you touch anything else.
Then compare the configured block with what the PLC actually writes. The addresses must be consecutive, and they must hold the sample sequence, not repeated copies of the latest value. Off-by-one point counts are common enough that why an HMI trend chart plots one more sample than you configure is worth a read before you resize the pen.
If the block turns over as samples arrive, go on to the refresh check. If it sits still, or only the first location changes, the fault is in the PLC history logic, and no graph setting will repair it.
Make the PLC keep the history
At each sample event, the program moves every reading one position along the block and writes the newest sample at the end you chose. Standard shift and move instructions do this. The only design decision is which end holds the newest value, because the pen draws the block in address order.
Back up the HMI project and the PLC program before you change the logic, make the change with the machine in a safe state, and keep test writes away from any register the process depends on.
Watch the block online and match what you see to one of three outcomes. Every location tracking the live value means the block is not retaining history. Locations changing in the wrong order mean the shift sequence or the newest-end choice is wrong. Stale or broken values mean the sample event never fires, or the panel is reading addresses the PLC never writes.
Example: a 30-minute trend on one pen
A tank pasteurizer needs the last 30 minutes of product temperature on one pen, and the object allows 24 points per pen.
- Required span: 30 min = 1800 s.
- Points available: 24. Sample interval = 1800 ÷ 24 = 75 s. Program the PLC to sample every 75 s.
- Block: 24 consecutive registers, inside the 4-to-24 range, one pen of the 8 the graph supports.
- Refresh: set the time refresh to 5 s. All 24 points redraw at each refresh, and 75 ÷ 5 = 15 redraws fall between samples, so each new point appears within 5 s of the PLC writing it.
- Verify: after 4 samples the block holds 4 distinct readings and 20 initial values; after 24 samples, 30 minutes of running, the whole block is live.
If the same tank later needs 10 s sampling for a fast test, the identical 24-point block spans 24 × 10 = 240 s, or 4 minutes. The point count stays at 24; the sample interval alone sets the span. For a span that no 24-point block can cover at a workable interval, see fitting a multi-hour temperature trend on an HMI without scrolling.
Set the refresh and the trigger
Both refresh methods redraw the complete line from the block, so the refresh setting only decides how promptly the drawn line tracks the PLC data. A short time refresh is the default choice: 5 s costs one pen of 24 points per redraw, which is negligible, and the drawn line then never lags a sample by more than 5 s.
When samples happen at irregular events instead of a fixed cadence, refresh on a trigger. The Line Trend Graph documentation states the behavior directly: a data point plots whenever the Trigger Tag, a discrete tag picked from the Tag Name Database, comes ON or goes OFF, according to the Trigger State. If the PLC pulses a bit ON once per sample, set the Trigger State to the ON transition and the trace gains one plotted point per pulse. Why an HMI trend graph will not update every half second goes deeper into the refresh-side settings.
Save the points to a data log
The trace on screen is only the block. When someone needs readings after the screen closes, or further back than one block, the documented path is the graph's own logging option: the Line Trend Graph options let you save the Data Points to a Data Log, and a Visibility option shows or hides the object while you stage it.
Logging also covers the slow signals. A switch state that changes a few times a shift logs cleanly at a 10-minute interval, which the 10-minute switch-state logging interval sizes out, and whether an HMI panel can store PLC data for later retrieval explains where logged values end up.
The fix, in order
- Open the object properties and confirm it is a Line Graph, not a Real Time Graph.
- Record the pen's start address, point count, and refresh method.
- Back up both programs, then reserve a block of consecutive registers sized to the point count, clear of live process tags.
- Write the sample-and-shift logic so every reading moves one position and the newest sample lands at your chosen end.
- Match the pen's point count to the block length and set the refresh: the example's 5 s time refresh as the default, or the Trigger Tag with the Trigger State matched to the pulse edge the PLC sends.
- Run a controlled change and watch the block and the line together: distinct readings accumulate in order, and the drawn line matches the block after every refresh.
If the register map for the block is unknown, pull it from the machine's controls documentation before writing anything; a wrong guess inside live PLC memory stops processes, not just graphs.
Recommendation: feed every historical trend from a PLC rolling buffer sized to the pen limit, with the sample interval chosen to divide the required span and a short time refresh (in the worked example: 24 registers, 75 s sampling, 5 s refresh). Use the Real Time Graph only when the trace should start empty each time the screen opens, and enable the option that saves the Data Points to a Data Log as soon as anyone needs readings beyond one block or after the screen closes.
Questions
Do the trend history values have to sit in V-memory?
No specific data area is required. The pen reads consecutive locations through the project's Tag Name Database, and V-memory is simply one PLC family's name for its data registers. What the object needs is a block of 4 to 24 consecutive locations that your program keeps in sample order. Address them like any other tag the panel reads, and keep the block clear of registers the process itself depends on.
How much history can one trend graph hold?
One pen plots at most 24 samples of a single tag, and a Line Graph carries up to 8 pens, so one graph tops out at 8 × 24 = 192 plotted values. No setting extends a single trace past 24 points. When one tag needs a longer window, slow the sample interval: 24 points at 150 s spans a full 60 minutes. Or enable the option that saves the Data Points to a Data Log and read the values back after the run.
What happens to the trend after a power cycle?
The Line Graph redraws whatever the PLC block holds when its screen reopens, so the trace resumes from the last samples the PLC retained. Whether those samples survive a power cut comes down to the PLC's retentive memory: a block in retentive registers comes back with its history, a block in volatile registers refills from empty as the program samples again. A Real Time Graph restarts at point 1 every time the screen opens.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.