IMDTouchKnowledge BaseShop main store

How-to

Displaying S7-200 Analog Inputs on a WinCC HMI

HMI and touchscreens Published 6 min read

Short answer

Copy the channel word into V-memory with LD SM0.0 and MOVW AIW0,VW1000, put the CPU in RUN, then read VW1000 with a WinCC tag typed as a 16-bit integer and bind it to a numeric field. Four readings — channel word, destination word, tag, display — isolate any fault; the first one that fails names the layer to fix.

On this page
  1. Why the input word needs a copy rung
  2. Find the channel word
  3. Add the copy rung
  4. Point the WinCC tag at VW1000
  5. Scale the raw counts into engineering units
  6. Worked example: first EM 231 channel shown at VW1000
  7. Questions asked

Analog inputs reach a WinCC display through one added rung and one tag. The S7-200 presents each analog channel as a read-only input word such as AIW0; copy that word into a reserved variable word with LD SM0.0 and MOVW AIW0,VW1000, compile, download, and put the CPU in RUN. Then create a WinCC tag at address VW1000 typed as a 16-bit integer and bind it to a numeric field. The connection that already carries your digital inputs carries this value unchanged. The sections below give the channel addressing, the rung, the tag setup, the scaling rule, and a four-reading sequence that pins any fault to acquisition, PLC logic, or HMI addressing.

Why the input word needs a copy rung #

The S7-200 maps analog inputs to read-only input words, AIW0 through AIW62, one word per channel. An HMI shows a value by polling a tag, and the dependable target is a V-memory word your program owns. Driver support for polling the input image directly varies; a copy costs one instruction and works with any tag that can reach V-memory, so it is the standard practice. It also gives you exactly one place to scale the value later.

The mirror-image rung LD SM0.0 with MOVW VW1001,AQW0 runs the other way: it writes a V-memory word to an analog output channel. It belongs to output control and has no role in displaying an input. Keep input copies and output moves on separate words, or the commissioning record turns into guesswork.

Find the channel word #

The number in AIWn is a byte offset, and one channel is one 2-byte word, so consecutive channels sit two addresses apart: a 4-input EM 231 occupies AIW0, AIW2, AIW4 and AIW6. What the counts mean is fixed by configuration switches 1, 2 and 3 on the EM 231, and all inputs share the single selected range; the module's data sheet table maps the switch positions to ranges. Set the switches and land the loop wires with the module powered down, and keep the measured signal inside the range you selected.

Before writing any logic, open a status chart in the programming software and watch the candidate word while the transmitter moves. A count that tracks the signal confirms the channel; a dead or frozen count means the terminal, the wiring, or the switch setting — nothing an HMI tag can repair. Fix acquisition first, then continue.

Add the copy rung #

  1. Reserve a V-memory word that nothing else writes — VW1000 in this example — and record the reservation in the project documentation.
  2. Enter one network in the PLC program:
Network 1 : HMI copy, analog channel 0
LD   SM0.0
MOVW AIW0, VW1000
  1. SM0.0 is the always-on system bit, so the move executes on every scan while the CPU is in RUN: no conditions to wire, no update rate to tune.
  2. Compile, download, and switch to RUN.
  3. Test it in a status chart with both AIW0 and VW1000 displayed while the signal varies. The pass condition is equality on every update. A value that jumps or lags means some other rung, initialization routine, or communications task writes the same word — move your HMI word to a free address or remove the competing write. That single collision explains most "the number jumps around" reports.

Point the WinCC tag at VW1000 #

  1. In the tag editor of your WinCC project, create a tag on the connection you already use for digital inputs, with address VW1000.
  2. Set the data type to the 16-bit integer or word that matches the PLC word. Identical bits must display as an identical number: a width or sign mismatch shows a different value for the same pattern, and a signed read of a count with its high bit set goes negative.
  3. Place a numeric field on a screen and bind the tag to it. Leave it display-only — the rung rewrites VW1000 every scan, so an operator entry there is overwritten immediately.
  4. Transfer the project to the runtime and compare the field against the status chart: the two numbers must agree.

Tag editors differ between WinCC generations, but every one has address and type fields; set those two and the menu layout stops mattering. The same two steps — declare a tag against the connection, bind a display — apply on larger CPUs, and connecting an HMI panel to an S7-1500 PLC shows that variant with its own addressing.

Scale the raw counts into engineering units #

VW1000 holds a raw count, not volts, psi or degrees. The count limits come from the range table the EM 231 switches selected, so read raw low and raw high off the module's data sheet before converting anything.

The conversion is a straight line: engineering value = eng low + (raw − raw low) × (eng high − eng low) ÷ (raw high − raw low), with eng low and eng high the span you want the operator to see. Implement it in the PLC or in the HMI, in exactly one place, and keep the raw word visible on a commissioning screen so a wrong number splits cleanly into a scaling fault or an acquisition fault. The arithmetic of scaling a PLC integer into an HMI display value works the same formula end to end.

Worked example: first EM 231 channel shown at VW1000 #

Inputs:

  • Module: EM 231 with four analog inputs (module data sheet).
  • Signal: wired to the first input terminal, channel index n = 0.
  • Address map: analog input words run AIW0 to AIW62, one word per channel (S7-200 addressing).
  • HMI destination: VW1000, reserved, from the copy instruction above.
  • WinCC tag: address VW1000, 16-bit integer.

Rule in words: the channel word sits at a byte offset of 2 bytes per channel times the channel index, counted from the module base AIW0.

Arithmetic:

  • Channel 0: 2 bytes × 0 = 0 bytes → AIW0.
  • Channel 1: 2 bytes × 1 = 2 bytes → AIW2.
  • Channel 2: 2 bytes × 2 = 4 bytes → AIW4.
  • Channel 3: 2 bytes × 3 = 6 bytes → AIW6, the module's last word and well inside AIW62.

Runtime: enter LD SM0.0 with MOVW AIW0,VW1000, compile, download, RUN, and vary the transmitter. Read four values: AIW0 in the status chart, VW1000 in the status chart, the tag online in WinCC, and the bound field on screen.

Result and decision: equality at all four readings is the pass condition, and the first mismatch names the work. A dead channel word means acquisition — terminal, wiring or range switches. A wrong VW1000 means PLC logic — a competing write or a rung that is not scanned. A wrong tag means address, type or connection. A wrong field means the binding or a transfer that never reached the runtime. In this example, once the field equals the status chart at VW1000, the path is proven end to end; any number that still looks wrong to the operator is scaling, not communications.

Questions asked

Do I have to add the rung in the PLC before WinCC can show the value?

Yes. The copy has to exist in the controller: enter LD SM0.0 with MOVW AIW0,VW1000, compile, download, and put the CPU in RUN. WinCC reads memory through tags; it does not create the copy for you. Once the rung executes, VW1000 refreshes every scan, and any tag addressed to it shows the live value on your existing connection.

The display stays flat while the transmitter moves. Where is the fault?

Read four values in order: the channel word, the destination word, the online tag, and the screen field. The first one that fails to follow the signal names the layer: acquisition, PLC copy logic, or HMI address, type and connection. Fix that layer alone before touching anything else; changing the HMI tag cannot repair a dead input word.

How do I show engineering units instead of raw counts?

Take raw low and raw high from the range table the EM 231 configuration switches select, choose the engineering low and high you want displayed, and apply the straight-line conversion between the two pairs. Do it in one place only, in the PLC or in the HMI, and keep the raw count visible while commissioning so scaling errors stay separable from acquisition faults.

Can I control an analog output from the same screen?

Yes, mirror the rung. Let the HMI write a word such as VW1001 through a tag, and move it to the output channel every scan with LD SM0.0 and MOVW VW1001,AQW0. That instruction drives an output; it has no role in displaying an input, so keep the two words and their tags on separate addresses.

What does SM0.0 do in the rung?

It is the always-on system bit, so the move executes on every scan while the CPU is in RUN and the HMI word never goes stale between polls. If you want the copy at a fixed rate instead of every scan, replace it with a timer contact; SM0.0 itself needs no configuration.

Keep reading

  • How-to

    Testing HMI Simulation Against a Live PLC

    A standalone HMI simulator proves screens and navigation, not communications. Test against a live controller only through a documented online-simulation mode or a physical panel, and verify every read at two data states and every write at the controller before release.

    HMI and touchscreens

  • Troubleshooting

    Why an HMI Freezes or Updates Slowly Over Serial

    A panel-wide freeze or slow updates over serial is a link fault — driver, PLC port, wiring, or startup timing — not a screen-object fault. Test the two field-proven fixes first: a 10-second startup delay before the first poll, and a port set to four-wire RS-422 at 19,200 baud. Fix an isolated stale tag separately, by address and data type.

    HMI and touchscreens

  • Troubleshooting

    How to Keep HMI-Entered Timer Presets in PLC Memory

    The presets return to zero because the V-memory word they are written to falls outside the PLC's configured retentive range. Open the retentive ranges setup in the programming software, extend the V register range to cover the preset addresses, download the change to the PLC, and save the project.

    PLCs and controllers