IMDTouchKnowledge BaseShop main store

How-to

MP270 analog trend curve setup in ProTool and WinCC flexible

HMI and touchscreens Published 6 min read

Short answer

A linear trend on an MP270 needs three pieces: the S7 tag carrying the raw analog word, an HMI REAL tag scaled from it, and a trend view with a sampling cycle. This article walks the ProTool, WinCC flexible 2008 and RT Professional paths with the scaling arithmetic worked out.

On this page
  1. Worked example: one analog input, scaled to percent
  2. Step 1: define the tags on the panel side
  3. Step 2: insert and configure the trend view in ProTool
  4. Step 3: the WinCC flexible 2008 path after migration
  5. Step 4: the trend curve in WinCC RT Professional
  6. Troubleshooting a curve that does not look right
  7. Decision
  8. Questions asked

A linear trend on an MP270 comes down to three coordinated pieces: an S7 tag that carries the raw analog word, an HMI REAL tag scaled from it, and a trend view with a defined sampling cycle. The X axis is time, the Y axis is the scaled value, and the curve is only as good as the scaling between the two tags. This article works a concrete example end to end — one analog input word scaled to 0.0 to 100.0 percent — in ProTool, in WinCC flexible 2008 after a migration, and in WinCC RT Professional if you have moved the project forward. If you only need a single live number instead of a curve, the approach differs; the article on displaying a PLC real value over Modbus on an HMI covers that case.

Worked example: one analog input, scaled to percent #

Assume an SM 331 analog module delivering its channel 0 value in the peripheral input word PIW 304, with a raw range of 0 to 27648 across the nominal span (that 0 to 27648 integer range is the documented nominal span for S7-300/400 analog input channels). You want the panel to plot percent, so 0 to 100.0.

The slope is engineering span divided by raw span:

slope = (100.0 - 0.0) / (27648 - 0) = 100.0 / 27648 = 0.003617
offset = 0.0 - 0.003617 * 0 = 0.0

So the HMI tag is a 32-bit IEEE REAL at DB100.DBD0, computed in the PLC:

L PIW 304
ITD
DTR
L 1.000000e+002   // engineering span
*R
L 2.764800e+004   // raw span
/R
T DB100.DBD0      // REAL, 0.0 .. 100.0 percent

If you prefer to scale on the panel instead, create the HMI tag directly on the raw word as an INT and apply the slope 0.003617 with offset 0.0 in the tag's linear scaling settings. Doing it in the PLC keeps the scaling in one place when several panels read the same value. The same raw-word-to-engineering-unit question comes up when you first select which analog inputs a system needs at all; the article on which analog inputs an S7-1200 water monitoring system needs covers that selection side.

Step 1: define the tags on the panel side #

In ProTool, open the project for the MP270 and create one HMI tag:

  1. Name it for the process value, for example AI_Level_PV.
  2. Set the type to REAL, 4 bytes.
  3. Bind it to the S7 connection over MPI or PROFIBUS.
  4. Point it at DB 100, DBD 0, matching the STL store above.

Check the connection parameters on both sides: the MPI address of the panel and the PLC must differ, and the bus profile must match what the PLC network is configured for. If the tag address or type is wrong, the trend will draw a flat line, not an error.

Step 2: insert and configure the trend view in ProTool #

Open the screen that should host the curve and insert a trend view either with the toolbar button or through Insert, then Trend View, from the menu — this is the documented path in the ProTool manual for graphics-based units. In the trend view dialog, work through the settings in order:

  1. Source tag: AI_Level_PV.
  2. Sampling cycle: 500 ms for a live curve. The panel redraws the view at this rate, so a 500 ms cycle on a 60 s window gives 120 visible points.
  3. Y axis: 0.0 to 100.0, linear, gridlines every 10.
  4. X axis: time-based, in minutes and seconds.

Compile, transfer to the panel and run. The curve should sit at the value the PLC currently writes to the DB.

To verify it, force a known value from STEP 7 — for example store 50.0 into DB100.DBD0 — and watch the curve jump to mid-scale within one sampling cycle, here half a second. If it jumps to the wrong height, the slope is wrong; if it stays flat, the address is wrong.

Step 3: the WinCC flexible 2008 path after migration #

If the project moves to WinCC flexible 2008, migrate the ProTool project first, then open the migrated trend view and re-check three things:

  1. The tag data type: the migration renames REAL to Float; confirm the address survived.
  2. The connection: re-enter the MPI address and bus profile if the migration left them blank.
  3. The sampling: a live 500 ms cycle migrates, but a logged curve needs a tag log. Create the log, set its acquisition cycle to 1 s, bind the trend view to the log instead of the live tag, and give it a retention period that fits the storage on the panel.

The distinction matters: a live trend with a 500 ms cycle redraws only what is on screen now, while a log sampled at 1 s keeps history you can scroll back through. Both can run on the same tag at the same time.

For deeper background on the migration path itself, the article on how to simulate a PLC behind WinCC flexible 2008 SP3 uses the same tool generation and shows how to test a project without hardware attached.

Step 4: the trend curve in WinCC RT Professional #

On a PC runtime or a newer panel, the configuration moves to the Inspector window: select the trend view object, then under Properties, Properties, General, Display set the trend type, the source or logging tag, the update cycle, the time range and the linear value range — this is the documented location for the trend curve settings in RT Professional. Use the same example values: update cycle 500 ms for the live curve, a logging tag acquired at 1 s for history, Y axis 0.0 to 100.0 linear, and one trend entry per channel if you plot several inputs. The trend axis behavior on newer panel generations has its own quirks; the article on why a Comfort Panel trend axis shows points instead of time covers that symptom if your migrated project lands on that hardware.

Troubleshooting a curve that does not look right #

  1. Flat line at zero: tag address mismatch or the PLC is not writing the DB. Re-check the word against the STL store and confirm the DB is transferred.
  2. Curve jumps to the wrong height: slope wrong. Recompute it from the actual raw span; if the module is configured for a different measuring range, the raw span changes with it.
  3. Jagged or stepped curve: the sampling cycle is slower than the process change. Shorten the cycle, or smooth the value in the PLC if the signal is genuinely noisy.
  4. Trend freezes after a while: no log configured or the storage is full. Configure the tag log and its retention.
  5. Invalid tag warning: data type mismatch between the HMI tag and the PLC declaration. INT for the raw word, REAL for a scaled tag.

Decision #

If the panel is an MP270 running ProTool, configure the trend view directly with the 500 ms live cycle and scale the value in the PLC — that is the shortest working path on that hardware. If the project already lives in WinCC flexible 2008, keep the migrated tags and add a 1 s tag log when the operator needs history, not just the live curve. If you are building new on a PC runtime, configure the trend curve in the Inspector window under Properties, General, Display with the same scaling and sampling values. In all three cases the scaling is the same one calculation: divide the engineering span by the raw span, here 100.0 over 27648, about 0.003617, and verify by forcing a known value and watching the curve land at mid-scale within one sampling cycle.

Questions asked

What scaling does an S7 analog input need before it can be plotted?

The peripheral input word carries a raw integer in the range 0 to 27648 for the nominal span. Divide the engineering span by that raw span to get the slope; for a 0 to 100 percent range the slope is 100 divided by 27648, about 0.003617, with a zero offset. Set the HMI tag type to REAL and apply that slope in the tag or in the PLC.

My trend line is flat at zero even though the input changes. What do I check first?

Check the tag address first: the HMI tag must point at the same peripheral word or DB double word the PLC writes, and the data type must match the PLC declaration, integer for the raw word and REAL for a scaled tag. A second common cause is a sampling cycle set slower than the process change you expect to see.

Can one trend view show several analog inputs on an MP270?

Yes. Create one HMI tag per channel, each scaled the same way, and add one trend entry per tag inside the same trend view, each with its own color and line style. Assign all entries to one time axis so the curves stay comparable.

Keep reading

  • Troubleshooting

    Why WinCC Flexible Shows an Empty Screen After Migration

    WinCC flexible 2008 shows an empty screen at startup when its stored last-project location is a network station that is offline. Clear the recent-project entry under the WinCC flexible 2008 registry key, point it at a local folder, and migrate only from a local-drive copy. Do the ProTool migration on SP2, because SP3 removed the ProTool import, and keep the license key on either the XP virtual machine or the Windows 7 host, never both.

    HMI and touchscreens

  • Troubleshooting

    Why Your HMI Runtime Shows a Demo Mode Message

    A demo mode banner means an enabled runtime option on the panel has no valid license: install that option's license key or disable the option. The SD card recording failure is a separate storage condition — measure archive growth and fix retention or media instead of clearing records again.

    HMI and touchscreens

  • Troubleshooting

    Importing a ProTool .lib library into WinCC Flexible

    WinCC flexible cannot import a ProTool .lib object library, and no utility converts .lib files to the .wlf format it expects. Plan the OP270-to-TP177 migration around reusing an existing .wlf library and rebuilding the remaining objects in the TP177 project, then verify each object on the panel.

    HMI and touchscreens