IMDHMIControls LibraryShop main store

How-to

Moving an S7-200 analog input word into VW memory for an HMI

PLC programming Published 7 min read By IMDHMI controls team

Short answer

An S7-200 analog input lives at a fixed hardware address, AIW0, AIW2 and onward in steps of two, which you cannot renumber. To show it in a tag that points at VW800, add a word move in the PLC program from the confirmed input address to VW800, confirm it in a Status Chart and compare the panel's live value.

On this page
  1. Where the AIW address comes from
  2. Find the word your channel uses
  3. Confirm the reading live in a Status Chart
  4. Working example: Port A on the first EM 231 into the VW800 tag
  5. Add the word move in the program
  6. Point the tag and the I/O field at the same word
  7. Decide where the scaling happens
  8. Decisions to take away
  9. Questions asked

The tag name connects nothing. On an S7-200, the reading of every analog channel sits in a fixed input word — AIW0, AIW2, AIW4, and onward in two-byte steps — that the hardware layout assigns and that you cannot renumber. A WinCC flexible tag reads PLC memory, never a terminal, so the panel shows the channel only after the program copies that input word into the memory the tag watches. The fix is a word move in the PLC program, from the channel's actual address into the tag's word: for a tag built on VW800, that is AIW0 -- MOVE -- VW800 once a Status Chart run confirms AIW0 is your channel. Place the instruction where it runs every scan, then verify it online and on the panel.

Where the AIW address comes from #

An S7-200 reads each analog input as a 16-bit word in the AIW area, and the words follow the installed hardware order: the first input word is AIW0, the next channel is AIW2, the one after that AIW4. Two rules fix your channel's address:

  • Onboard analog claims the front. If the CPU has analog inputs on board, they occupy the first words, and the first expansion channel takes the next even address after them. If the CPU has none, the first input of the first expansion module is AIW0.
  • The numbering is not editable. You cannot renumber inputs; you map your terminals to the addresses the layout gives you.

A panel tag never binds to a terminal. A WinCC flexible tag follows a PLC memory address over its configured connection, and the article whether WinCC Flexible Runtime can read remote I/O without a PLC shows how far that reading reaches: memory areas only, never a physical terminal. The word at the AIW address holds the module's converted value, and how PLC analog input and output modules convert signals explains what produced that number.

Find the word your channel uses #

  1. List the hardware in physical order: the CPU model first, then every expansion module as installed, left to right.
  2. Note the CPU's onboard analog inputs, if any, and count how many input words they occupy.
  3. Take the first expansion input word as the next even address after the last onboard word. With nothing onboard it is AIW0; otherwise add one word per channel past the onboard words.
  4. Write each terminal designation next to its computed input word, so "Port A" always means a channel on an identified module, and keep that sheet with the panel project.

Confirm the reading live in a Status Chart #

The S7-200 system manual documents the Status Chart as the online table for watching addresses and their current values. Use it before you write any logic, because a plausible value at a wrong address hides a channel mix-up.

  1. Create a chart listing the candidate input words from your mapping.
  2. Go online and read the values with the machine in a known state.
  3. Change the signal on the physical channel you believe is Port A and hold everything else steady. The word mapped to that channel must move.
  4. Step the signal to a second level. The same word must move in the same direction and settle the way the module normally settles.
  5. If a different word responds, stop and correct the mapping before you write any logic — a move would only copy the mistake forward.

Feed the channel only a signal its configured range accepts: a voltage source on an input wired and configured for current corrupts the reading or damages the input.

Working example: Port A on the first EM 231 into the VW800 tag #

Inputs for this case: an S7-200 CPU with no onboard analog inputs, four EM 231 analog input expansion modules, a signal wired to Port A on the first module, an MP 377 panel, and an existing WinCC flexible tag on VW800, a word in V memory.

Rule in words: with no onboard analog ahead of it, Port A on the first analog module is the first input word, and every following channel advances one word.

Arithmetic:

  • Port A on the first EM 231 is AIW0.
  • The next channel is AIW0 + 2 = AIW2, because one word is two bytes.
  • The channel after that is AIW2 + 2 = AIW4.

Result: the program needs a word move from AIW0 to VW800 on a path that executes every scan — AIW0 -- MOVE -- VW800 — and in the Status Chart both words must show the same raw number while the signal varies.

Decision: if AIW0 tracks the signal but VW800 stands still, the move is not executing or something else writes VW800; if neither word moves, the wiring or the mapping is wrong. With onboard analog present, the same Port A shifts to the next even address after the last onboard word, and the whole example shifts with it. Both words tracking the signal is the pass condition; until it holds, the panel number means nothing.

Add the word move in the program #

  • A move copies at the moment it executes; it is not a permanent bind between the two addresses. Delete the instruction and the destination stops updating.
  • Put it on a path that runs every scan, not behind a one-shot or a rarely executed branch, so the tag refreshes continuously.
  • Search the program for every other reference to the destination word and its bytes before relying on it. A second network, a recipe write or an operator field aimed at the same memory will overwrite the reading.
  • Keep the source address exactly as the Status Chart confirmed it, not as the layout seemed to suggest.

Point the tag and the I/O field at the same word #

In WinCC flexible, verify four things on the tag, then the field:

Element What to verify Symptom when it is wrong
Connection Points to the S7-200 CPU in this project Error indication, or values with no source
Tag address The same V-memory word the move fills Panel number ignores the channel entirely
Data type Word width and signedness match the module range Magnitude wrong on one side of the range
I/O field Uses that tag, displays raw counts, entry disabled unless a write is intended Wrong decimal position, or an operator can type over the reading

Run the panel beside the online Status Chart and compare raw values. A formatting difference shows up as a shifted decimal, never as a different number.

Decide where the scaling happens #

The moved word is a raw count: the module's numeric representation of the signal, not volts, bar or degrees. Source and destination hold the same raw number, so engineering units need exactly one deliberate conversion:

  • Scale in the PLC: convert after the move and hand the tag an engineering value.
  • Scale in the panel: leave the PLC word raw and let the tag's scaling convert it for display.
  • Never both: a panel-side scale on an already scaled value applies the range twice, and the displayed reading moves too fast.

For a linear range the conversion is engineering value = engineering low + (raw - raw low) * (engineering high - engineering low) / (raw high - raw low). Take the raw endpoints from the configured module range and the engineering endpoints from the instrument range, and size the intermediate arithmetic for the product before the division: a 16-bit word overflows quickly when a large raw count meets a large span multiplier. Scaling on the PLC side, with the same V-memory pattern, is walked through in how to assign V-memory values and scale analog in ladder.

Decisions to take away #

  • The address is fixed, not chosen: onboard analog first, expansion after it, one word per channel. Confirm the channel's word in a Status Chart before you write logic.
  • The bridge is the move: the tag reads memory, so a word move from the confirmed input word to the tag's word, executed every scan, is what puts the channel on the panel.
  • One conversion owner: scale in the PLC or in the panel, never both, and record which side owns the range.
  • The pass test: source word, destination word and panel field agree at two signal levels.

Questions asked

Can the panel read the analog input word directly instead of a VW address?

Yes, when the panel driver supports reading S7-200 input words. A tag aimed at the AIW address works without touching the PLC program, and the word move is only needed when the tag is already built on a V-memory address or the program wants its own copy of the reading. The direct read does tie the display to that fixed hardware address, so a later hardware change re-maps the tag as well.

Why does the panel value differ from the Status Chart for a moment?

The Status Chart, the PLC scan and the panel's acquisition cycle each sample at their own instants. Watching the source and destination words online can briefly show two different numbers even when the move runs correctly, because the two tools did not read at the same scan. A persistent difference, rather than a flicker, points to a move that never executes or a destination that something else overwrites.

Why does a nearly zero bipolar signal show a huge number on the panel?

That is a signed-interpretation mismatch. On a bipolar range a slightly negative reading is stored as a two's-complement negative word, and a tag that reads the word unsigned shows it near the top of the range instead of just below zero. Set the tag data type to a signed word for bipolar ranges, then re-check the display at both ends of the signal.

Keep reading

  • Explainer

    Why an S7-300 analog input reads 0 to 27648 counts

    An S7-300 analog input digitizes a 0-10 V signal into a signed 16-bit integer in the peripheral input word: 0 V reads 0 and 10 V reads 27648, the rated full-scale count. Readings continue to 32767 as overrange before overflow. The program reads the raw word directly and scales it to engineering units with the Standard Library block FC105.

    PLC programming

  • Explainer

    How Q series PLC addressing works for I/O and analog modules

    A Q series point's address comes from the I/O assignment: 16-point hex blocks numbered in mounting order through one sequence shared by X and Y, so two 32-point input cards then two output cards land at X0000, X0020, Y0040 and Y0060. Analog values never appear in X/Y space; they sit in the module's buffer memory, read with FROM or TO through a head number equal to the Start XY with its last hex digit dropped.

    PLC programming

  • Explainer

    What decides an S7-300 to S7-1500 wiring adapter

    An S7-300 to S7-1500 wiring adapter only routes conductors between two front connector footprints; it never translates electrical functions. The adapter that fits your swap is the one whose terminal mapping, checked against both module manuals, lands every signal, reference and transmitter supply on the terminals the S7-1500 module assigns for that measurement type. For analog inputs, select the measurement connection at order time.

    PLC programming

Write HMI device data into an S7-400 DB with an external tag