A trend graph plots whatever value the pen's tag holds, across the range its limits set. A limit of 20.00 never turns a raw 1750 into 17.50, and the data log records exactly what it receives. Combine the registers and apply the decimal scaling in the PLC, then trend the finished result tag.
A line trend on an HMI panel plots the value its tag holds, across the range its limits set. That one sentence explains a trend that draws nothing while the process sits at 17.50: the pen is on a raw register holding 1750, and an upper limit of 20.00 is a plot bound, not a scaling factor. The data log behaves the same way and records exactly the value it receives. So stop looking for a formula box in the trend configuration. Combine the registers and apply the decimal scaling in the PLC, then point the trend pen and the log at the finished result tag. The sections below give the symptoms, the fix with the arithmetic worked through, and the checks that prove screen, trace and log all show the same number.
Why a 20.00 graph limit plots 1750 off-scale
Three documented behaviors decide the outcome, and none of them lives in the trend's math, because the trend has none.
The plot range is a window, not a converter. Upper and lower limits choose the span the screen shows. The same is true of a spreadsheet chart's value axis: changing its scale, to a logarithmic scale included, changes how the numbers display and nothing in the data. A pen value of 1750 against an upper limit of 20.00 is off-scale by 1750 ÷ 20.00 = 87.5 times, so nothing draws.
The data type is a representation, not a calculator. A floating-point pen lets the panel draw fractional values such as 17.50. It combines no registers and rescales nothing.
The trend and the log each follow one tag. Trend chart help across HMI software packages states the same pattern: the chart displays data from a data log for the tag you specify. Neither object reaches into the PLC and does math across four registers.
| Change in the trend setup | What it actually does |
|---|---|
| Upper limit set to 20.00 | Sets the plotted span only. 1750 stays 1750 and plots off-scale. |
| Floating-point pen selected | Lets the panel draw decimals. Combines and rescales nothing. |
| Limit widened to 2000 | Makes a trace appear, with counts on the axis instead of degrees. |
| Data log opened | Stores exactly what its tag holds at each sample. |
A single register drawn at the wrong magnitude is the simpler cousin of this problem, and its fix lives in the graph limits and that register's implied decimal, covered in setting trend graph limits for an implied-decimal register. This article handles the case where the value you want exists only after math across several registers, so the PLC has to create it first.
Symptoms and what each points to
- Trace missing or pinned flat along the top. The value exceeds the plot bounds. The register is unscaled, or the pen points at a raw register.
- The trend reads 1750 while the process gauge reads 17.50. The register holds counts with an implied decimal of 2, and nothing divided by 100 on the way to the screen. A value that lands ten times too small or a hundred times too large is the same fault at a different scale, covered in why an HMI shows a value ten times too small.
- The screen looks right but the log record says 1750. The display object points at the calculated tag while the log still points at the raw register. Each object follows its own tag.
- One pen flattens whenever the process moves. Pens with very different magnitudes share one axis, and the big one squeezes the small ones into a flat band.
- Decimals show on the screen and vanish in the log. The decimal lives in one object's formatting rather than in the value itself.
The fix: build the value in the PLC, then trend it
- Write the formula down before touching logic: which registers combine, with which operators, in what units, and how many decimal places the result carries. Note the expected low and high of the result; those become the graph limits later.
- Confirm each input's stored scale in the PLC program: raw count, scaled integer with an implied decimal, or floating point. A register holding 1750 means 17.50 only where the program defines a scale of 100. Reading one input's scale and converting it to engineering units is its own job, walked through for a 4-20 mA pressure transducer scaled for an HMI display.
- Compute in new registers and leave the raw inputs untouched for diagnostics. Size the intermediate math before the download: a 16-bit signed integer tops out at 32,767, and four worst-case inputs can sum to 4 × 32,767 = 131,068, so run the sum in a 32-bit register, whose signed limit is 2,147,483,647, and divide back down to the result.
- Apply the decimal scaling once, at the end of the calculation, and store the result in its own register.
- Point the trend pen and the data log at the result tag, and set each object's data type to match the result register.
- Set the graph limits from the result's engineering range. For a value that idles near 15 and peaks at 19, limits of 0.00 to 20.00 put the trace between 15 ÷ 20.00 = 75% and 19 ÷ 20.00 = 95% of the graph height. The limits also set the resolution you can see; why a trend graph resolves only 1% of full scale shows that arithmetic.
- Download, then run the checks in the next section.
If the PLC program is out of reach, check your HMI or SCADA software's own manual: many packages document a calculated or derived tag that computes in the software layer. If yours has one, use it, and point the trend pen and the log at that finished tag. The trend still plots a single finished tag; the arithmetic has moved up a layer. Where nothing in the data path can compute, no trend setting will combine the registers.
Example: average four registers into one trended value
Scenario: an oven with four probes, one average temperature on the trend, two decimal places, in degrees Celsius.
- The four input registers hold counts with an implied decimal of 2: 1725, 1738, 1750 and 1787, meaning 17.25, 17.38, 17.50 and 17.87 °C.
- Sum in a 32-bit register: 1725 + 1738 + 1750 + 1787 = 7000 counts.
- Divide by the number of inputs: 7000 ÷ 4 = 1750 counts.
- Scale once at the end: 1750 ÷ 100 counts per degree = 17.50 °C. Store the result as a floating-point register.
- Point the pen and the log at the result tag and set the limits to 0.00 to 20.00. The trace sits at 17.50 ÷ 20.00 = 87.5% of the graph height, and 1% of the graph spans 20.00 ÷ 100 = 0.20 °C.
- The contrast case: a pen left on one raw register against the same 20.00 limit. The value is 87.5 times the limit, so nothing draws. Widen the limit to 2000 and a trace appears, but the axis reads counts, the operator reads 1750 as degrees, and every logged sample says 1750. The screen gained a line and lost its units.
Check the value at three points
After the download, freeze one moment in time and read all three: the raw input registers, the PLC result register, and the value the trend shows. Repeat at a low, a typical and a high operating point, and include the cases your formula cares about: a zero input, a negative input if the probes can produce one, and a result close to a graph limit. Then open the log record for the same timestamp. The common split shows up here: the screen shows 17.50 and the record says 1750, which means the log tag still points at a raw register. Point it at the result tag and re-download.
If the trend also has to show earlier hours, the samples themselves live in PLC memory, and the memory budget for that history is its own sizing job, covered in historical trend graphs and PLC memory history. Log the raw inputs under their own tags as well if maintenance will ever want them.
When one graph has to carry different magnitudes
The old workaround is to condition every pen into a common range, say 0 to 1000, and print the real scale under the graph. It serves a diagnostic board where the operator watches relative movement. Two rules keep it readable: the note under the graph gives the operator the conversion, and anything logged, alarmed or used for a decision goes back to the real scaled value. Past a quick diagnostic, give each magnitude class its own graph.
The decision
Recommendation: When the value you want to trend combines two or more registers, or needs a fixed number of decimal places, do the arithmetic and the decimal scaling in the PLC and point the trend pen and the data log at the finished result tag. Set the graph limits from the result's engineering range, and match every object's data type to the result register. Where the PLC program is out of reach, use the HMI software's documented calculated-tag feature if it has one. Keep the 0-to-1000 conditioning trick for short-lived diagnostic screens only.
Questions
Does the divide by 100 go before or after the average?
After. Keep every input in counts through the sum and the division by the number of inputs, and scale once at the end. Scaling each input to degrees first rounds four times before the average, and those roundings can shave a few hundredths off the final number. One scaling step at the result rounds once, where the display format absorbs it.
Can one panel log both the raw registers and the calculated value?
Yes, as two separate logged values. Configure one log on the raw registers for diagnostics and a second log on the result tag for the record anyone will read. Each log stores exactly what its tag holds at every sample, so one shows counts such as 1750 while the other shows 17.50. Match each log's data type to its tag and label the two records clearly, so nobody reads counts as degrees.
Should the PLC result be floating point or a scaled integer?
Floating point is simpler at the panel: the pen and the log draw 17.50 with no formatting, and the graph limits read directly in degrees. A scaled integer holding 1750 keeps the PLC math in whole counts, which suits controllers without floating-point support, but then the panel has to apply the implied decimal of 2 everywhere the value appears. Pick the floating-point register when the controller offers one, and match every pen, log and display object to it.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.