Why an HMI trend chart plots one more sample than you configure

5 min read · Published November 9, 2026

On HMI panels that plot a trend chart's first sample at position zero, the screen shows one more point than the configured Samples per chart. Set the field to one less than the points you want, 6 for 7, and confirm the convention once with a timed run: at 10-second logging the reference chart drew its first line at 20 seconds and showed 7 points from 6.

Set a trend chart for 6 samples and count the plotted points: 7 appear. On panels that plot the first sample at chart position 0, the drawn count is always the configured count plus one. The fix costs nothing: enter one less than the number of points you want, then prove the convention once on your own panel with a timed run at a fast logging interval. This page explains where the extra point comes from, states the count rule, works a weekly example, and walks through the 10-second test that settles it.

Why the chart draws one more point than you set

A trend chart plots numbered positions, and the numbering begins at 0. A setting of 6 therefore opens positions 0 through 6, and counting 0 through 6 gives 7 positions. The arithmetic behaves like fence posts: 6 gaps between posts means 7 posts, and the setting counts the gaps while the screen shows the posts.

In the timed test further down this page, the reference panel logged every 10 seconds with a setting of 6 and drew exactly 7 plotted points, numbered 0 through 6. The same run drew no line for the first 20 seconds, which is the second quirk the test exists to catch: a zero-based chart fills slowly, and a count taken before the chart is full reads short.

The count rule: enter one less than the points you want

On a chart that numbers its first position 0:

Visible points = Samples per chart + 1, so configure N - 1 to draw N points.

Want 7 points on a weekly board? Enter 6. Want 12? Enter 11. The subtraction touches only the chart-width field. Two neighboring settings keep their own jobs: the logging interval, which sets how often a new point lands and which runs into its own update ceiling, covered in why an HMI trend graph will not update every half second; and Total stored samples, which sets how much history sits behind the chart.

The interval is what turns a point count into a time span. Seven plotted points at one sample per day cover 6 days, first point to last. The same 7 points at 10-second logging cover 60 seconds. That points-times-interval span is the same math used to fit a multi-hour temperature trend on an HMI without scrolling.

Prove the convention with a timed test

Run the test once per panel model at the bench, before the chart is copied into production screens. It belongs in the same commissioning pass as testing an HMI panel's startup and runtime before you commit.

  1. Configure a small known count: 6 in Samples per chart.
  2. Set logging to a fast interval: every 10 seconds.
  3. Start the timer when logging starts and leave the screen alone.
  4. Note when the first line draws. The reference run stayed blank for 20 seconds.
  5. Let the chart fill completely, then count the plotted points. The reference run drew 7 from a setting of 6.
  6. Read the result: 7 plotted from 6 configured means the chart numbers from 0, and every production chart on that panel gets the same subtraction. A count exactly equal to the setting means the chart numbers from 1, and the setting stays as entered.
  7. Repeat the count at the production logging interval and compare the on-screen span with the shift, day or week the chart is meant to cover.

Example: a weekly trend at one sample per day

Inputs:

  • Wanted display: 7 points, one new point per day, the weekly board where the off-by-one shows most clearly.
  • Production logging interval: 1 sample per day.
  • Field under test: Samples per chart, the trend object's chart-width setting.

Rule in words: on a chart whose first point plots at position 0, visible points equal the configured count plus 1, so the configured count equals the wanted points minus 1.

Arithmetic: 7 wanted - 1 = 6 to enter. Check: 6 + 1 = 7 plotted points, numbered 0 through 6. Span: 7 points one day apart have 6 intervals from first to last, 6 × 1 day = 6 days, so the chart fills on day 6 and shows one reading per day across the week.

Result: a setting of 6 draws all 7 daily points, day 0 through day 6.

Decision: enter one less than the points you want, once the timed test confirms the zero-based numbering. A 5-day work week at one point per day needs 5 plotted points, so it takes a setting of 4 (5 - 1 = 4), drawing points 0 through 4.

Samples per chart and Total stored samples are two different settings

Samples per chart sets the width of the visible chart: how many points draw at once. Total stored samples sets the archive: how many samples the panel keeps for paging back through time. Raising the chart count widens the picture; raising the stored count extends the history operators can scroll through.

When the two counts are equal, the paging buttons have nothing older to fetch, so they sit dead on the screen and cost graph area on a small panel. That makes them a quick diagnostic: paging buttons that never do anything point at two equal counts.

What one extra point changes on the floor

The extra point is exactly one logging interval wide, so the cost of ignoring the rule equals the interval. At 10-second logging, a mis-entered chart hides 10 extra seconds, which no operator will notice. On a daily chart, the same mistake adds a whole extra day to a window meant to show a week. On long trends, a year of machine vibration history at one point per day, an uncorrected count leaves the chart one day off its label for the entire year.

The count matters wherever the window is named: a chart labeled past 7 days, a previous-shift graph, a day-long batch review. Run the timed test, apply the subtraction the test proves, and print the real span on the chart label from measured numbers: points minus 1, times the logging interval.

Recommendation: Once a timed test on your panel shows one more plotted point than configured, enter one less than the points you want in every production trend chart, keep Total stored samples larger than the chart width when operators need to page back, and label each chart with its measured span, points minus 1 times the logging interval, so the window on screen matches the window in words.

Questions

Why did the chart sit blank for the first 20 seconds of the test?

A zero-based chart fills one logging interval at a time. In the reference run, logging every 10 seconds, the first line drew only after 20 seconds. Plan the bench test around that quiet start: start the timer when logging starts, note the first line, then wait until the chart is completely full before counting points. A count taken mid-fill reads short and can tempt you into subtracting a point the chart was about to draw.

How much history should Total stored samples hold?

Enough for the pages back operators actually use. Samples per chart sets one screenful; Total stored samples sets the archive behind the paging buttons. Divide stored by chart width to get the screens of history: 24 stored samples behind a chart of 6 holds 4 screens, so a control room that wants 4 pages back enters 24. Keep the stored count above the chart width only where someone will genuinely page back, because stored samples cost panel memory.

Can the paging buttons be cleared off a small screen?

Yes, with layout. When Total stored samples equals Samples per chart the buttons never move anywhere, so they only take up graph area. Two layout fixes that work: place a useful object over each paging button and bring it to the front of the screen stack, or nudge the whole trend object up so the button strip hangs partly off the top edge. Check the result at runtime, because a cover object can hide a label the operators need.

Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.

Keep reading

Build your signAsk for a quote